What have you done for me lately?

Blogging is a great way to learn about development.  It is also a great way to motivate you to keep learning.  Another way to do this is doing side fun projects in your spare time, which is what I did before blogging.  I have been doing this instead of my regular blog since late 2011.  I had some old MVC  1 work that I did back in mid-2010 that wasn’t being used, so I upgraded it to MVC 3 and added some polish.  I put it live yesterday.  You are welcome to try it out and let me know what you think.


Posted in Non-technical | Leave a comment

The Debt Crisis – In Your Code!

A new term has sprung to fame in the past few years, technical debt.  For me, technical debt is basically what gets created when a developer cheats and does a quick and dirty change to their system, usually due to time constraints.  The formal definition of technical debt is below.

Technical debt and design debt are synonymous, neologistic metaphors referring to the eventual consequences of slapdash software architecture and hasty software development.

If you Google “Technical debt”, you will find over 200,000 results.  There’s not a lot I can say that is new.  I will make the points I feel are most important.  Some are mine, others are my take on what others have said.

Accumulating debt by doing work in a minimal or wrong way is very similar to financial debt.  It is usually created by inexperienced people under stressful conditions that need quick assistance.  The debtor can sometimes grow accustomed to this quick and easy relief and start building debt more frequently without need.  The debtor often gets into a perpetual cycle of creating debt under the false belief that their shortcuts will be corrected “one day” when the crisis of the month passes and they suddenly have 2-3 weeks of free time.

In my experience, most technical debt occurs due to time constraints.  We cut corners because we feel we don’t have time to do things exactly how they should be done.  More often than not, if you talk to your manager, a customer or other developers you work with and explain your situation, you will get the extra time you need.  Don’t be afraid to ask or communicate.

Know the law – Parkinson’s Law.  Work expands to fill the time available.  If you believe a task will take 3 days to do correctly and you only have 2 days available, don’t start cheating.  Do things the right way and you will find that your work will naturally adjust and you will do things the right way in the available time.

Bob Martin made a great analogy about developing the way a good sushi chef does their work.  They subtly clean their tools as they slice and dice as a natural and important part of their process.  It’s best to refactor and clean your code as you develop rather than waiting for the magical time afterwards to clean up things to the way they should be.

Don’t be afraid to delegate.  Some examples of technical debt are not fixing compiler warnings or attending to TODO comments.  If you are a senior developer and don’t really have time for these, they are great bits of work for a junior or new member of staff to work on.

If you absolutely have to cut corners and write code that breaks good design rules, below are the situations where it is okay.

  • You are fixing a problem in an old legacy system or component that will be replaced very soon.  Preferably tomorrow.  The technically correct solution will take weeks or require a full rewrite.
  • You are fixing an urgent emergency problem.  E.g. your website has crashed.  In this case, it’s better to make a quick fix that works right now, then start work on a clean layered solution to include in a later release.
  • Capitalising on an opportunity.  Just as a company can take on debt to give them the resources to capitalise on opportunity, so can a development team.  For example, if you work for a games company and your game is targeted to be finished for the Christmas shopping season, take on some debt to be finished for then.  It’s no good having a perfectly designed video game released January 1st, after everyone has done their Christmas shopping.
Posted in Non-technical | Tagged | Leave a comment

Speed up your website with a Content Delivery Network (CDN)

In basic english, a Content Delivery Network (CDN) is when other servers, besides those of your website, host some of your website’s content.

More technically and specifically, a content delivery network (CDN) is a collection of web servers in multiple locations to deliver static content more efficiently to users.  This is usually images, css and javascript files.  When a user’s browser resolves the URL for these files, their download will automatically target the closest available server in the network.

When Yahoo introduced CDNs into their websites, it improved end-user response times by over 20%.

For the smallest of websites, your CDN use will be limited to including common javascript files that are hosted worldwide by Google and Microsoft.  Google and Microsoft host jquery and MVC javascript files freely for developers to include.

For medium sized websites with a larger budget, you can hire a company to host static content for you.  Three of the most popular are Akami, Level 3 and EdgeCast.

The largest blue-chip websites like Yahoo, CNN or Google own and use their own CDN to deliver content faster around the world.

Posted in Technical | Tagged | 1 Comment

Steve Jobs’ Stanford Commencement Address – Video

One pastime of mine is watching the commencement speeches by various famous and no-so famous accomplished people of this world.

A commencement speech is a speech given to graduating students, usually at a university.  It is typically given by a notable figure.

These are great because you get an entire lifetime of wisdom condensed down to 10 or 15 minutes.

It was only 2 weeks ago that I saw the commencement speech of Steve Jobs on YouTube.  His speech was one of the best ones I have seen and it had many thoughtful and inspirational parts.  The link is at http://www.youtube.com/watch?v=UF8uR6Z6KLc

Two others that I enjoyed and learned from are below.

Conan Obrien 2011 Commencement speech at Dartmouth

Denzel Washington 2011 commencement speech at the University of Pennsylvania

Posted in Free Videos, Non-technical | Tagged , | Leave a comment

Multiple File Uploads with Jquery

If you search online there are over a dozen sites and blogs offering ways for developers to allow multiple file uploads on a site.

I have tried the top 10 most offered solutions, and the best one I have found is on CodeProject here.

The code solution offered above is based on another developers open source solution by fyneworks here.  The CodeProject solution removes the excess code around the fyneworks code, allowing you to quickly, cleanly and easily integrate his code into your web page.

The CodeProject solution works in both asp.net webforms and MVC.  Two valuable options not explained in the CodeProject introduction is the maxlength and accept attributes below.

<input type="file" class="multi" maxlength="2"/>
<input type="file" class="multi" accept="gif|jpg"/>
Posted in Technical | Tagged | Leave a comment

Installing a Service on a Windows Server

Web application developers will eventually at some point need to install a service on a server that is running their system.  It seems like something only an administrator can do, but it isn’t a difficult or lengthy task.

To begin, copy the exe and app.config files of your program into a benign folder of the server.

Then, copy the InstallUtil.exe file into the same directory of your program.  The InstallUtil.exe file is in the %windir%\Microsoft.Net\Framework\<DotNetVersion> folder of the server.

Open a command line window and navigate to the above folder.  Then simply type InstallUtil <file name>.exe.

If  reinstalling a program, you need to precede the above command with

InstallUtil -u <file name>.exe


Posted in Technical | Tagged , , | Leave a comment

Telerik MVC Controls Free

Telerik are the gold standard for non-native .net controls.  Their products usually come with a hefty pricetag to match their quality, but not always.

Telerik has released free to the community their ASP.NET MVC extensions, include 16 controls such as Grid, Menu and TabStrip.

There are no strings attached and it is not just for a “trial period”.  Download, drag and drop and enjoy.  Link is below.


Posted in Technical | Tagged , , | Leave a comment

Brilliant Tech Interviews – Google, Twitter, Microsoft, Groupon

One of the world’s best interview shows, Charlie Rose has on it’s website a section dedicated to technology. It features amazing interviews with Twitter founder, Jack Dorsey, Google CEO Eric Schmidt, Microsoft co-founder Paul Allen and many others. These are great for a developer or anyone with an interest in business or technology.

Did you know that Twitter was actually developed over two weeks in 2000, but the owner did not want to release it then because of limitations in SMS technology? Did you know that China, during it’s negotiations with Google insisted that Google filter out anti-communist websites for searches done outside of China. Did you know that Microsoft co-founder Paul Allen, who had to temporarily leave the company at the age of 30 due to cancer treatment, had Bill Gates and Steve Ballmer conspiring behind his back to dilute his share of the company? This and other great tidbits are included. Link is below.


Posted in Free Videos, Non-technical | Tagged , , | Leave a comment

WAVE Accessibility Toolbar – Find Exact Source of Errors

The WAVE Accessibility Toolbar is an indispensable add-on for creating an accessible website. Unfortunately, when it evaluates your page, it does not always tell you exactly where the errors are. To know the exact location, simply disable styles, as shown below.

Wave Showing Error Source

Posted in Non-technical | Tagged , | Leave a comment

Semantic HTML5 Across All Browsers (and without Javascript)

HTML5 and it’s new semantic elements give developers a much larger toolset to give meaning to your HTML.  As usual, IE6 almost ruins it for
everybody 🙂  Fortunately, there is a way for the new semantic elements like section, article and aside to be used and still work with any browser.  It excludes
the need for the shim javascript file as well, enabling your site to be
compatible with the approximate 10% of users who disable javascript.

To use an element such as section, write your code like below.

<div class=”section”>lorem ipsum …</div>

You then add css styling to the div class, rather than the element.

font-size: 11pt;

Posted in Technical | Tagged , , | Leave a comment