Category: Theory

  • It’s LEMP not LAMP!

    I’m sure many of you have heard the term LAMP before – standing for Linux Apache Mysql and PHP.  This is a very typical setup for many open source websites.  It’s been around for ages.  But make way for LEMP.  In a recent report by w3techs, a new HTTP server is climbing its way up the ranks called nginx, but it is pronounced Engine-X; hence, the term LEMP – standing for Linux Engine-X (nginx) Mysql and PHP.

    According to this w3techs report nginx is now used by almost 12.5% of the websites we know what web server they are running on.  More significantly a staggering 28.2% (of the 12.5%) websites rank in the top 1,000 worldwide (according to their Alexa ranking).

    Along with my recent switch to Amazon EC2, I also decided to switch to a LEMP stack.  I thought I should throw out another shout out to HowToForge.com for this AMAZING step-by-step tutorial on installing a LEMP stack with extremely simple to follow instructions on my brand new Ubuntu 12 server.

    Check out the step-by-step instructions to setting up your LEMP server.

    I think I only had to make one modification to this instruction set before being able to perform one of the apt-get install commands I had to perform an update on the box.  Luckily enough, the OS told me exactly what to do!

    A friend and former colleague introduced me to nginx a while back with his blog about Setting up WordPress with nginx and FastCGI.  This is quite useful for understanding the nginx configuration for a virtual host that requires rewrite rules as nginx currently has no support for .htaccess files!

  • Amazon EC2 Shoutout!

    I was previously hosting all of my sites with GoDaddy, using one of their unlimited domain hosting services.  While this was pretty inexpensive compared to similar services, I was never truly happy with the load time.  Often taking over 1.2 seconds to load this blog!

    At my current job, I had the pleasure of doing of some speed testing with some Amazon EC2 services.  I was certainly impressed with them.  While I was doing some costing for work, I decided to do a bit of costing for myself.  I run several websites, no hits by any means, but enough that I care about the poor performance I was getting at GoDaddy.

    My annual fee at GoDaddy was in the neighbourhood of $100/year.  Quite decent for the 7-10 websites I’m currently hosting.  However, I started looking at the micro instances that Amazon offers.  These start as low as $0.02 per hour.  When you cost this out over the entire year, it works out to around $180/year.  Obviously more expensive, but Amazon also offers reserved instances.  Knowing that my sites will be around for the whole year, getting a 1 year reserved instance brings it down to $130/year; much closer to the previous $100/year that you barely notice it!

    If you’re a regular visitor of this blog, you’ll now notice that the site takes less than 0.5 seconds to load!  Not too shabby for a few bucks more a year.

    Now, here’s the real kicker, Amazon is offering FREE micro instances for a year with certain usage limitations!  So far, my sites are taking complete advantage of it and I’m extremely happy.

    Before making the jump, please remember there is a big difference; one is managed by a team of professionals to keep running versus running your own dedicated server with EC2.

    If you have a little bit of knowledge and know what you’re doing, I definitely suggest taking advantage of Amazon EC2’s free micro hosting!

    P.S. I am not getting anything in return from Amazon for writing this post, just thought Amazon deserved the recognition for providing me with free micro hosting!

  • A Simple But Effective Speed Comparison

    A little while ago, I wrote a simple .NET application that performs X amount of requests and calculates an average speed of those requests.  It does this by dropping the highest and lowest request times, then taking an average speed on the remaining requests.

    This does a decent job for a straight up speed test.  However, a few possibilities could arise, such as CPU hogging that could skew the results.  Instead, I’ve made a few alterations and converted the speed tester to not be based on the number of requests, but instead based on a specific amount of time.  This should help eliminate some inconsistencies of doing a straight number of requests.

    (more…)

  • 2011: Year in Review

    The New Year has arrived, I wasn’t quite prepared to sum up my year on December 31st because I was busy spending time with the kids during my, well deserved, one week off for the holidays.  This last year was probably the hardest year of my life.  At my current job, I stepped up and took on a big management role while being lead developer on multiple projects – for some reason I made this mistake again…

    Even though this was a hard year, there certainly were big rewards.  I dove into some new technology with the Photon Socket Server from Exitgames; got back into C# and .NET; released two books and currently editing my third; watched my kids walk for the first time; visited Seattle twice and met one of the now former lead developers of MVC .NET; launched a new website (Webistrate – Draw your own conclusions) – very happy with the creative name on this one!; and many, many more things.

    What did I learn this year?  Don’t bite more than you can chew!  Don’t make a major platform change during an extremely tight deadline!  Don’t carry your anger with you everywhere – the world truly isn’t out to get you, well maybe sometimes it is!  Interviewing people is not an overly enjoyable process, mostly because it takes 3 bad interviews for even 1 mediocre one.  However, the one that’s really good is always easy to pick from the bunch.  A few late hires were made at the end of the year that will be starting soon, hopefully all the hard interviewing will truly pay off and more fantastic people will join the team we are building.

    That’s quite a bunch of negatives up there, but we do typically learn from our mistakes, so what about some positives?  Writing books are hard work; but a lot more fun than doing day-to-day development work.  When I write books, I find that I really take my time and think more about how I want to accomplish something because my solution will be used by many people in many different scenarios.  Blogging is also a lot of fun, but is probably more time consuming than book writing, blogs are typically successful because of repeat, good, quality content – hence why this blog is not allowing me to stay home every day and write (not that it’s not good quality of course :p that I unfortunately do not blog as much as I would like too!).

    So what can we look forward to in 2012?  Well another book from me, this time on PhoneGap.  Mobile development and more specifically the adoption of HTML5 in the main stream (Microsoft, Adobe, etc…) will make it extremely important for us developers to focus more on attempting to build one codebase for many different platforms, not just the web anymore.  Instead we will need to develop for mobile devices (the one million and one different kinds of course), pad devices, even Windows 8 devices!

    Hopefully from all of the lessons learned in 2011, this New Year will be a lot less stress free!

     

  • IBM’s Watson on Jeopardy, The Final Saga

    In yesterday’s article I focused mainly on Watson.  So, in case you missed the episode last night, BIG SPOILER ALERT, Watson won.  Ken was actually pretty close after Double Jeopardy; in fact he was leading after the Jeopardy round.  If Ken would have bet bigger in Final Jeopardy it wouldn’t have been a gigantic blow out…

    Now, in today’s article I wanted to focus specifically on how incredible Google’s search technology is.  Below are the 5 categories from the Jeopardy round and a sample of questions from each category.  Beneath the question is the answer and whether Watson was wrong.  Beneath the answer is the result of a Google search and how easily and where the answer could be found. (more…)