Add to Technorati Favorites

« July 2007 | Main | September 2007 »

August 31, 2007

20 Tips to Improve ASP.net Application Performance

Not a .net Developer?

Are you an asp.net developer?  If you aren't don't worry, we have similar posts in the works for Ruby, PHP, and other developers out there.  If you are an ASP.net developer, listen up!

Get Ready for Massive Gains

There are certain things you should take into account when you are developing your applications.  Over the last 12 years or so of working with asp and asp.net, I have learned to avoid and do certain things that increase your application performance by a massive amount!  Below are my top 20 tips to improving ASP.net application Performance.

  1. Disable Session State
    Disable Session State if you're not going to use it.  By default it's on. You can actually turn this off for specific pages, instead of for every page:
    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" 
    AutoEventWireup="false" Inherits="WebApplication1.WebForm1" 
    EnableSessionState="false" %>

    You can also disable it across the application in the web.config by setting the <sessionState> mode value to Off.
  2. Output Buffering
    Take advantage of this great feature.  Basically batch all of your work on the server, and then run a Response.Flush method to output the data.  This avoids chatty back and forth with the server.
    <%response.buffer=true%> 
    Then use:
    <%response.flush=true%> 
  3. Avoid Server-Side Validation
    Try to avoid server-side validation, use client-side instead. Server-Side will just consume valuable resources on your servers, and cause more chat back and forth.
  4. Repeater Control Good,  DataList, DataGrid, and DataView controls Bad
    Asp.net is a great platform, unfortunately a lot of the controls that were developed are heavy in html, and create not the greatest scaleable html from a performance standpoint.  ASP.net  repeater control is awesome!  Use it!  You might write more code, but you will thank me in the long run!
  5. Take advantage of HttpResponse.IsClientConnected before performing a large operation:
    if (Response.IsClientConnected)
            {
                // If still connected, redirect
                // to another page. 
                Response.Redirect("Page2CS.aspx", false);
            }
    What is wrong with Response.Redirect? Read on...
  6. Use HTTPServerUtility.Transfer instead of Response.Redirect
    Redirect's are also very chatty.  They should only be used when you are transferring people to another physical web server.  For any transfers within your server, use .transfer!  You will save a lot of needless HTTP requests.
  7. Always check Page.IsValid when using Validator Controls
    So you've dropped on some validator controls, and you think your good to go because ASP.net does everything for you!  Right? Wrong!  All that happens if bad data is received is the IsValid flag is set to false. So make sure you check Page.IsValid before processing your forms!
  8. Deploy with Release Build
    Make sure you use Release Build mode and not Debug Build when you deploy your site to production. If you think this doesn't matter, think again.  By running in debug mode, you are creating PDB's and cranking up the timeout.  Deploy Release mode and you will see the speed improvements.
  9. Turn off Tracing
    Tracing is awesome, however have you remembered to turn it off? If not, make sure you edit your web.config and turn it off!  It will add a lot of overhead to your application that is not needed in a production environment.
    <configuration>
     <system.web>
     <trace enabled="false" pageOutput="false" />
     <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
     <compilation debug="false" />
     </system.web>
     </configuration>
  10. Page.IsPostBack is your friend
    Make sure you don't execute code needlessly. I don't know how many web developers forget about checking IsPostBack!  It seems like such a basic thing to me!  Needless processing!
  11. Avoid Exceptions
    Avoid throwing exceptions, and handling useless exceptions. Exceptions are probably one of the heaviest resource hogs and causes of slowdowns you will ever see in web applications, as well as windows applications.  Write your code so they don't happen!  Don't code by exception!
  12. Caching is Possibly the number one tip!
    Use Quick Page Caching and the ASP.net Cache API!  Lots to learn, its not as simple as you might think.  There is a lot of strategy involved here.  When do you cache?  what do you cache?
  13. Create Per-Request Cache
    Use HTTPContect.Items to add single page load to create a per-request cache.
  14. StringBuilder
    StringBuilder.Append is faster than String + String.  However in order to use StringBuilder, you must
    new StringBuilder()
    Therefore it is not something you want to use if you don't have large strings.  If you are concatenating less than 3 times, then stick with String + String. You can also try String.Concat
  15. Turn Off ViewState
    If you are not using form postback, turn off viewsate, by default, controls will turn on viewsate and slow your site.
    public ShowOrdersTablePage()
    {
        this.Init += new EventHandler(Page_Init);
    }
     
    private void Page_Init(object sender, System.EventArgs e)
    {
        this.EnableViewState = false;
    }
  16. Use Paging
    Take advantage of paging's simplicity in .net. Only show small subsets of data at a time, allowing the page to load faster.  Just be careful when you mix in caching.  How many times do you hit the page 2, or page 3 button?  Hardly ever right!  So don't cache all the data in the grid! Think of it this way: How big would the first search result page be for "music" on Google if they cached all the pages from 1 to goggle ;)
  17. Use the AppOffline.htm when updating binaries
    I hate the generic asp.net error messages!  If I never had to see them again I would be so happy.  Make sure your users never see them!  Use the AppOffline.htm file!
  18. Use ControlState and not ViewState for Controls
    If you followed the last tip, you are probably freaking out at the though of your controls not working.  Simply use Control State.  Microsoft has an excellent example of using ControlState here, as I will not be able to get into all the detail in this short article.
  19. Use the Finally Method
    If you have opened any connections to the database, or files, etc, make sure that you close them at the end!  The Finally block is really the best place to do so, as it is the only block of code that will surely execute.
  20. Option Strict and Option Explicit
    This is an oldy, and not so much a strictly ASP.net tip, but a .net tip in general.  Make sure you turn BOTH on.  you should never trust .net or any compiler to perform conversions for you.  That's just shady programming, and low quality code anyway.  If you have never turned both on, go turn them on right now and try and compile.  Fix all your errors.

There are hundreds more where these came from, however I really feel that these are the most critical of the speed improvements you can make in ASP.net that will have a dramatic impact on the user experience of your application.  As always if you have any suggestions or tips to add, please let us know!  We would love to hear them!

Have web development!

 

August 29, 2007

Software Development in the Real World Podcast!

Miguel and Erin Carrasco
First a Big Thank You!

A big welcome to all the new readers via Digg, Technorati, DZone, and del.icio.us!  Thanks for all your support, and great comments over the last few weeks.  For those that are not aware, Software Development in the Real World has grown nearly 1,000 percent in traffic over the last two weeks! 

I'm humbled, and excited to have all of these new readers, and look forward to feeding your thirst for knowledge over the next few years!  Although we are very far in software development, we still have even further to go!  It's exciting times to be in this industry!  Lets share our knowledge together, grow together, and live with undeniable passion for software development and our quality of lives!

Help Spread the word!

If you have not done so yet, help spread software development by adding this blog as your Technorati favorite! We started a contest to give away a free iPod once we are number 1 on Technorati!  We are actually nearly at the top 100!  we only need about 200 more favorite additions to make it!  Spreading the word will help us get better speakers, guest blogger's, and help make this blog a really awesome place to visit daily!

Software Development Podcast Coming Soon!

That's right!  Software Development in the Real World will be introducing a brand new podcast in the next few weeks!  We are really looking forward to starting the Software Development in the Real World podcast! We are planning on interviewing some of the most amazing software developers, managers, CEO's, and founders across the software industry.

Another great feature is you will see in the coming weeks is audio enabled RSS feeds!  This will allow you to easily subscribe to our audio RSS feed, and listen to our blog on your iPod or other MP3 player!  My lovely wife Erin will be voicing the new audio enabled RSS feeds!

If any of you have specific software developers, architects, CEO's, or blogger's you would like to see featured, please let us know via comments below!  All podcasts will also be converted to text for your downloading pleasure.

 

Speed Up Your Software Development in 10 Steps

Speed Up Software Development

While many of you are great software developers, you can always use a boost in speed!  Here are some tips that I try and instill in my software development team.

Learn the Keyboard Shortcuts

The mouse was one of the greatest inventions to come out of Palo Alto, however, it has made some of us a little too dependent on this great little invention.  How many times are you moving it around to find the file menu, or the tools menu, then moving along to find something else?  All this time can be saved by using the keyboard shortcuts.  Depending on your development environment, you should really make an effort to learn to do everything with your keyboard.

One way to do this, is set aside an hour when you will only use the keyboard to do your development.  This means no mouse movements or help from your little friend at all.  If you can train yourself to use your keyboard for most things and your mouse less, you will become extremely fast at development, and will be labeled the keyboard cowboy at your office.

Remove Unnecessary Dependencies

As your software expands and grows, the build process will start taking longer and longer. This will start affecting your productivity by making you sit there and wait for things to finish.  A large part of this process is caused by dependencies that are not needed.  Make sure you clean them up.  There are a lot of great tools to help you with this process, suggesting and guiding you along the way. 

Make sure you research these tools, but at the end of the day, just make sure you keep things clean on your own.  By removing these unwanted and unused dependencies, you will notice a huge improvement in speed of build, and even the overall software application.

Setup a Continuous Integration Build Environment

This tip will speed up your development time astonishingly!  One of the areas that always takes the longest is the code integration between different pieces of code, and different developers.  Software developers go and develop some great pieces of the software, time comes to put out a new version of the software, or a patch, and everyone scrambles to give the build master their new code files. 

Poor build master tries the build, and everything fails.  The software development team then spends the rest of their time for a week making sure everything works well together, and compiles.  Then come all the bugs, and it’s just a bad situation all around.  Setup a continuous integration build environment and enjoy the process of builds!

Put Source Control in Place

Source control is extremely important to any project, without it, you are going to develop slowly.  Period.  I've talked about this before, because it is extremely important.  It's the foundation to your project.  Even if you are coding a small project, make sure it's in source control.  Source Control will enable you to have a history, a journal, of you project. 

Let’s say at some point someone wanted to roll back a certain screen to a previous design, or worse yet, a huge bug was found with the current version.  What do you do?  Well if you don't have source control, you are in big trouble.

Write Unit Tests

By adding test cases to your software development, you will speed yourself up by not allowing things to be changed.  In a future article I will explain the best way to create these unit tests, but here are some of the basics for those of you that have heard about unit tests, but haven't had time to implement them into your software development lifecycle. 

There are a few common types of unit tests you will want to start with: Validation, Bad Input, and Code Path unit tests.  The main idea here is you will be writing these automates tests, that will run every time you check in new code, thanks to our source control and automated build environment combination we setup in the previous steps.

Remember the golden rules: If it’s broken, fix it!  If it passed, and it still broke, create the unit test.  If it’s hard to write the unit test, make your code easier to work with. If you need to do setup before executing the test, do not copy paste from the application.

Use Code Coverage Tools

Code coverage tools are fantastic and go hand in hand with unit tests.  If you want to know how much code your tests really exercise, or want to ensure that the outsourced code is tested, code coverage tools are for you.  Code coverage tools will allow you to understand what parts of your application are well tested and what is not tested.  Some of the best tools out there not only measure line coverage, but also measure branch & statement, and methods.

Become One with the Debugger

Becoming a debugger master will really speed things up for you.  I'm not going to spend a lot of time on this as its very basic, but it is far to important to not mention.  Learn all the basic and advanced features that are available to you in your debugger. Breakpoints, Watches, and Stepping will save you countless amounts of time.

Write Reusable Code

When you are writing code, don't just write code for the problem at hand.  Write code for thinking about the future! Create classes, and put things together into reusable custom frameworks and libraries.  How to write reusable code is another article, however just make sure that each of your classes or methods does one thing.  Try and reduce the coupling in your code.  Lastly, make sure you are always thinking "modular".

Take Advantage of Frameworks

There are hundreds of thousands of frameworks out there for you to use.  Pick one that suites your needs, and use it.  The main reason for the creation of software development frameworks is to allow software developers to focus on the software requirements, and less time on the low level details.  There are a slew of excellent frameworks out there, pick the area you need, select a framework, and you are off to the races.

Ensure Proper Testing and Quality Control

Do you have bug tracking software?  Do you have a process that works for finding bugs, reporting user issues, logging all feature enhancements?  If you don't, chances are you will be spending a lot of your time trying to keep track of all of these times.  Set yourself up for success.  Invest in some great bug tracking software.  Some of my favorites are Joel Spolsky's FogBugz, and Axosoft OnTime.

I love tools, and over the next few weeks I will start sharing with you some of the tools that we use to make our developers fly through the software development lifecycle.  Stay tuned.

 

August 27, 2007

Ultimate Server-Side Web Development Cheat Sheets

Even before the other Ultimate Web Development Cheat Sheet Guide became popular on Digg and del.icio.us, I was working on another version focused around Server-Side technologies.  I was going to add them into the other list, but removed them.  I wanted to have a list that was more focused, and only had the best Server-Side Cheat Sheets.  Also please note while there are hundreds of cheat sheets for each area, I try and only list at most the top 10 in each area, otherwise it makes the guide useless with repeated data. This makes these guides much more useful than the old guides out there.

PHP

Jack Daniel's PHP Cheat Sheet (HTML)

Interactive PHP Cheat Sheet (HTML)

Blue Shoes Developer - PHP Cheat Sheet (HTML)

PHP Cheat Sheet (HTML)

PHP Cheat Sheet (HTML)

Regular Expressions Reference Sheet (HTML)

Tiger PHP Cheat Sheet (PDF)

PHP 4 Reference Card (PDF)

PHP Templates Cheat Sheet (PDF)

Ruby

Ruby Cheat Sheet (PDF)

Jack Daniel's Ruby on Rails Cheat Sheet (HTML)

Textmate Rails Cheat Sheet (PDF)

Zen Spider Ruby Quick Reference (HTML)

Rails Reference 1.1 (PDF)

Rails Active Resource Cheat Sheet (PDF)

ActiveRecord Relationships (PDF)

Rails Strings Cheat Sheet (PDF)

What Goes Where Cheat Sheet (PDF)

Ruby on Rails Cheat Sheet (PDF)

Ruby on Rails Form Helpers (PDF)

Perl

Perl Quick Reference (PDF)

Perl Cheat Sheet (HTML)

Perl 5 Cheat Sheet (HTML)

Perl Testing Reference Card (PDF)

Perl Quick Reference Card (PDF)

ASP.net

ASP.net Page Lifecycle Diagram (PNG)

.NET Format String Quick Reference (PDF)

ASP.NET 2.0 Page Life Cycle & Common Events (PDF)

Visual Studio 2005 Built-in Code Snippets (C#) (PDF)

Visual Studio 2005 Default Keybindings C# (PDF)

Visual Studio 2005 Default Keybindings VB.net (PDF)

ASP.NET AJAX Client Life Cycle & Events (PDF)

VB.net and C# Comparison (PDF) (Word)

Casting in VB.net and C# (HTML)

ASP.net Basics (PDF)

Python

Python 2.4 Cheat Sheet (HTML)

Python 2.2 Quick Reference (HTML)

Python Cheat Sheet (HTML)

Python 101 Cheat Sheet (HTML)

Python PHP Cheat Sheet (PDF)

Python Quick Reference (PDF)

ColdFusion

ColdFusion Reference Sheet (PDF)

ColdFusion Cheat Sheet (HTML)

ColdFusion Quick Reference (HTML)

Java / JavaServer Pages

JavaServer Pages Syntax (PDF)

JSP 2.0 XML Cheat Sheet (HTML)

Java Cheat Sheet : Java Glossary (HTML)

Java Reference Sheet (PDF)

MySQL

Jack Daniel's MySQL Cheat Sheet (PDF) (PNG)

MySQL Reference Card (PDF)

Neal Parikh MySQL Cheat Sheet (HTML)

MySQL Reference Sheet (PDF)

Handy Cheat-Sheet of MySQL Commands (HTML)

MySQL Commands (HTML)

SQL Injection Cheat Sheet (HTML)

SQL Server

Jack Daniel's SQL Server Cheat Sheet (PDF) (PNG)

A to Z SQL Server 2005 (HTML)

SQL Injection Cheat Sheet (HTML)

 

 

August 26, 2007

I'm on a Mission, and Need Your Help

Software Development Should be Number 1

I woke up this morning, and I was thinking, wouldn't it be cool if a Software Development Blog became number 1 on the Technorati Top 100?  After all, without software developers and software development, we would not have the Internet at all.  Right now, the top sites are "Boing Boing" and a site about making money!  Let's change that!

If you have spent some time on my blog, you will see the purpose of this blog is to improve software development, and more importantly, try and help everyone improve their lives.  Help me spread the word, and let's put Software Development on the top of Technorati!

Win an iPod

To motivate everyone and put everyone into action, I will be giving away a free Apple iPod (80GB Brand New!) when Software Development in the Real World makes it to the top spot!  With the amount of readers we have and daily visitors, this should take no time at all!  All it requires is 2,700 or so people to add the site, and it takes less than one minute to do it!

What to do.

  1. Click here to add this site as your Technorati favorite.
  2. Once you have added the site, just leave a comment behind with your email address.
  3. When Software Development in the Real World is number one, I will add all the valid email address's in the comments into a random draw application, and pick the winner.
  4. The winner will be emailed, and I will send them a shiny free iPod!

Pretty sweet eh!

I will be checking hourly over the next few days, and the second we are number one, I will post the winner on my blog!

Add Software Development as your favorite here.

August 25, 2007

Ultimate Web Development Cheat Sheet Guide

So you're sitting there on Saturday morning, sipping on a nice warm cup of coffee or tea. You smell the freshness of the morning, and whipping up some html, CSS and trying out some new AJAX programming.  You're stuck on something! You wish you had a quick cheat sheet to get you back on track.  Look no further if you're a web developer!  This is the Ultimate Web Development Cheat Sheet Guide!

Check Out Part 2 of this List!
Ultimate Server-Side Web Development Cheat Sheets - As Promised! Enjoy!

10 of The Best Wed Development FireFox Extensions!

10 Must Have Web Development FireFox Extensions - Check it Out!

JavaScript

JavaScript Cheat Sheet

Addison-Wesley's JavaScript Reference Card

JavaScript Quick Reference

JavaScript and Browser Objects Quick Reference

JavaScript in 10 Minutes - Thanks Joseph

CSS

CSS Help Sheet

CSS Shorthand Guide

CSS Cheat Sheet

Cascading Style Cheat Sheet

CSS Cheat Sheet

CSS Quick Reference

Leslie Franke CSS Cheat Sheet

Design 215 CSS Quick Reference

CSS Level 1 Quick Reference

CSS Level 2 Quick Reference

CSS Property Index

HTML/XHTML

HTML Help Sheet

XHTML Cheat Sheet

HTML Cheat Sheet

HTML Character Entities Cheat Sheet

PDF HTML Cheat Sheet

Character Entity References in HTML 4 and XHTML 1.0

HTML & XHTML Cheat Sheet

HTML Tags

HTML Quick Reference Guide

A Simple Guide to HTML

Reference HTML Cheat Sheet

HTML Tags Cheat Sheet

AJAX

What’s Ajax? Cheat Sheet

Prototype Cheat Sheet

Scriptaculous Combination Effects Cheat Sheet

Scriptaculous Cheat Sheet - Thanks Joseph

AJAX for ASP.net Cheat Sheet

ASP.net AJAX Client Life-Cycle Events

MooTools Cheat Sheet - Thanks Joseph

Colors

RGB Hex Color Chart

Interactive Color Picker

HTML Color Codes

Color Reference Guide

Microformats

Microformats Helper Cheat Sheet

Microformats Cheat Sheet

Jack Daniel's Microformats Cheat Sheet

Browser Compatibility

W3C DOM Compatibility Tables

Browser Compatibility Interactive Table

XML

Fusebox 4.1 XML Cheat Sheet

VoiceXML Reference

MathML Reference

XML Schema 2001 Reference

XML Schema 2000/10

XSLT Quick References

XML TopicMaps 1.0 - Quick Reference Card

XML Quick References

XML Schema - Structures Quick Reference

XML Schema - Data Types Quick Reference

XSL FO Reference

XSLT Quick Reference Card

XSLT Reference

 

Check Out Part 2 of this List!
Ultimate Server-Side Web Development Cheat Sheets - As Promised! Enjoy!

10 of The Best Wed Development FireFox Extensions!
10 Must Have Web Development FireFox Extensions

 

Technorati Tags: ,

August 24, 2007

Make One Mistake Next Week!

Software Development

I'm going to start "Next Week's Challenge" on my blog.  Over the next few months, if you follow along with the challenges, together as a group of software developers, we should all grow, and as a whole, improve the software development world! 

At the end of each challenge week, I will ask you to post your feedback, so we can all grow together on how things went!  Sound like a good idea?  Let’s begin!

My Challenge to You

Here is an interesting challenge to get things moving! I challenge you to make one mistake next week.  If you reading this on Friday, think about it over the weekend, and try of think of something that might end up as a "mistake", and just do it.  Don't be afraid to fail, just do it!  This is my challenge to you.  Weird Eh?  This could have two possible outcomes:

You will be forced to try something you might not have tried, and you will do it:

  1. and nothing will fail, and you won't have made a mistake, and you will be rewarded by your awesome accomplishment!

    or
  2. and you will fall flat on your face!  If that happens, make sure you write down in detail what your execution plan was, and what went wrong.  Step back and think about it, and write down 3 things you could do differently next time.

Mistakes Make You Grow

Don't be afraid to make mistakes.  Some of the most significant advancements in science and humanity have been because of mistakes.  Unfortunately as software developers, we are trained to not make mistakes.  Heck, any mistake we make in code at the very least will cause a bug and testing time.  In the worst cases, you cause systems to go down and create extremely unhappy managers and customers.  However I challenge you today, to not be afraid to make them!  Just make sure you learn from them quickly, and adjust your approach, and keep going! 

Some of the most successful software companies have made disastrous miscalculations that can be conceived as mistakes, you can see some of them on my other blog, 10 Biggest Computer Flops of All Time.  Now, although the title says they were flops, and they were at their time, you could argue that all of these "flops" had huge contributions to our software and technology industries. 

Where Does the Problem Start?

The problem starts in school, where you are taught to not make mistakes.  You are basically punished if you think outside of the box, and make mistakes.  We are trained in this manor for at least twelve years of our lives.  While this is good while we are learning, we need to make a transition to being ok with making mistakes as we grow.

I would rather my software developers make a mistake, and learn from it, than sit there all day and not come up with anything original.  When a mistake is made, I simply ask that they try and not do it again.  The key here is not just trying to not make mistakes, but to put measures in place so that you can't make the mistake again!  Or so it’s harder to make the mistake. 

Some Personal Examples

I make mistakes all the time!  But I never make the same one's twice, and I try and improve things and learn all the time, constantly!  Let me pick a few examples that have happened on my blog in the last few weeks so you can follow along!

In the last two weeks as I dedicated more time to my blogs to take my mind off of some family issues.  My aunt is struggling with a battle with cancer, in and out of the hospital, cancer is brutal, nobody deserves to suffer like that.  I hope one day to make a difference in that area.  Anyway, during the constant postings, I learned a lot about other people through emails and comments.  For example in the post of "How to Win Friends and Make Developers happy" I deleted someone's comments because someone else was attacking them for bashing the post.  I was trying to be nice and avoid conflict, but soon got huge backlash for pulling the comments.  So I put the comments back, because I honestly liked the post, it was just I didn't want conflict on the blog. 

The lesson learned here:  If you’re going to run a blog, just let people say whatever, and if they start fighting with each other, oh well.  Don't delete others posts if you ask for their ideas.  Also, blogging might not be the best way to de-stress :).

In the post yesterday on normalization, I was trying to make a point that JOINS are slow, and in some cases, denormalization could be ok.  I found it interesting that some new Web 2.0 companies were following this path, and I wanted to let my readers know.

Lesson learned was:  "Don't over simplify a hot topic" because you will get flamed.  Also, be careful with titles, some people will not read your post, and just read the title!  Fair enough, I asked for it I guess.

Other lessons I've learned is not to use so much bold and highlighting in my posts, some said that it looked like someone spray painted all over it lol.  I thought that was clever, what does everyone else think?  What's a better way to draw attention to certain areas of the text?

So Don't Be Afraid, Just Learn From Your Mistakes

See, some people will follow the rules, be afraid to be out there, to grow their minds, to challenge the status quo.  They are afraid to say what's on their minds, afraid to be themselves, afraid to ask that girl to dance!  Others will challenge approaches to problems, create new innovative ideas, and ask the girls to dance!  When they are shut down, they will be ok with it, and change their approach.  They get better and better at it, and then you look at them and go "oh, they are naturals at that, I hate them!".  The trick, or sleight of hand, is that they fail 9 out of 10 times, but you don't see those mistakes because they handle the mistake properly, learn, and get better at it!

So be one of those people that makes mistakes, gets back up from the mistakes, learns from them, and try's a new approach. 

Sounds simple, but 90% of the people out there will either never try anything new because they are scared to make a mistake or fail.  The others will try something, make a mistake, not change their approach and try again, fail, and continue that vicious circle over and over.  A very select few will actually make mistakes "correctly".  This is great news for you, because if you learn this skill, you are far ahead in the race!

So What!  I'm A Software Developer, Not Thomas Edison

As software developers you might be thinking at this point, well, I'm a software developer, I'm not trying to be Thomas Edison.  That's fine, what I would say to you is, there must be some other area in your life that you can improve this very second, this very minute, if you were try a different approach.  You might be scared to do it because of the fallout of making a mistake, but why not try it and see what happens!  You can always take corrective action after, and the next time you get another idea, you might get it right!  The lesson should not be "Never Try".

Everyone makes mistakes, you just learn from them.  That is the key.  Easier said than done!  But if you read this blog, and read as far as you have read on this long winded entry, you must want to improve yourself!  So just do it! 

I look forward to hearing your "success's" next week, and even if you do make a "mistake" it will be a success because you will learn from it!

 

August 22, 2007

To Normalize, or Not To Normalize

Database Denormalization
 

Why You Shouldn't Always Be Normal

Before you read on and jump quickly to scream foul, please make sure you realize that I write this with some humor, to try and get at the point that "In certain situations, de-normalization is good!" I am not suggesting that we throw away normalization!  Are you kidding me?  Might as well go play Russian Roulette!  However, I think this is an interesting trend among large Web 2.0 companies that are heavy on read, and low on writing.  With that said as my preface, read on and joy.

I'm just going through the process of designing a database architecture for a Web 2.0 site we will be launching in a few months, and the first thing the database architect talked to me about at a review was "Don't worry, this design your about to see is going to rock, we have really normalized the data, its hot!".  I was happy he said this, but at the same time, it got me thinking about a lot of things.  Synapses started flipping through my brain as they do at night when I can't sleep (probably due to the Starbucks I was sipping on).

See, I have never seen eye to eye with database designers on their "Normalization" Zen.  When I first started getting into databases and teaching database design and architecture, I always thought to myself "Why all this normalization?".  I know, I'm treading into dangerous territory here, but I feel it has to be said.  What is dangerous about this topic?  I guess the fact that I think we should NOT normalize data for the most part in a Web 2.0 world.   Inexperienced DBA's I guess will find this completely incorrect and question my brain capacity, but I would bet experienced DBA's after thinking about what I'm saying, would agree with me.  I'll tell you why...

The Argument Pro Normalization

I won't go into too much detail, because all of you know that a proper database is normalized.  My guess is at least 80% of web sites out there are running on normalized relational databases.  In the current world of relational databases, we have all been taught that you must normalize your data to ensure data integrity by minimizing duplicate data.  By doing this, you are ensuring that no application can write data in one location, and not updating another location, and creating two different records, for the same data!  This is supposed to also simplify software development, by putting all the data integrity logic at the database layer.  You can user stored procedures, views, joins, and have fairly applications that rely on the database to keep the data integrity.

The Argument Against Normalization

How many freaking joins do you have to do to get all the data you want?  When I first started my career, I could write ASP pages amazingly fast, with simple databases in the back end.  As I started learning more and reading on "Normalizing" your data, I started feeling crappy about some of my designs.  I didn't use any joins, didn't really have any transactions, and had very few tables.  But, I wrote applications very fast, got results, and never really had any speed issues.  I never really had issues bad data either, but whatever.

I Learned to Normalize

I started writing more "enterprise" applications, and had to do more joins, left, outer joins, had to worry about transactions, and had layers upon layers of data access to go through in order to add a new customer.  I was told that "It's the databases job to maintain data integrity".  Ok it all made sense, I did this.  My code became way more complex, my database designs became way more complex, and you couldn't put bad data into the database.  Hot!  But, it took FOREVER to write the applications to put the data into the database.  Not only that, but now, if I needed to scale the application, I couldn't simply add more web servers!  I now had to worry about database replication, transactions, and indexes.  I soon realized that doing joins took an INSANE amount of processing power.

Normalization Is Slow To Design

Are you still with me?  Splitting up your data into small chunks and insuring that no data was stored twice, made writing even the simplest web forms super complicated.  Sure I could call a stored proc, but if it wasn't written, I had to get the DBA to write it, or write it myself.  If I had to get new data in a certain way, I had to create views, which I was told was fast!  Not (Ok, getting better... but still).  For one simple form, or simple display page, you could have an INSANE amount of joins!

Normalized Applications Are Slow On A Huge Scale

Why couldn't I just have a table, with all the data I needed for that page?  Then for other pages, I could have the same data duplicated!  This would actually take stress away from the JOIN, and just let me get data from either location.  When an update was done, say the user updates his address, it would be updated in two locations.  Is that all that bad?  I don't think it is.  Just add some constraints, and make sure the application layer follows the constraints.

If Web 2.0 is all about sorting data, indexing our knowledge, sharing our knowledge, speed in development, speed in viewing Web 2.0 applications, and scaling your sites quickly should you're site become the next YouTube, I challenge you to do this successfully with a normalized database full of joins, stored procs, views, and transactions.  You might do it, but you will need an army of rocket scientists to do it.

Final Thoughts

Do whatever works for your environment.  In an enterprise environment where you are working with financials and maybe have 1,000 people entering data and reading data, by all means, normalize your data.  If you are writing an application in the web world, where one day you might have 100 users, and a month later, 10,000,000 users, you better have a quick way of scaling!  If you have kept your database de-normalized, and just have tables, and your database is basically a storage area, and has no business logic whatsoever, you will be able to quickly scale your web application by adding servers, replicating code across your web farm, and even putting in cool appliances like BIG-IP in place to cache data and load balance your web farm.

Good luck doing this in a normalized database.  You will be able to, you will just be crying the whole way.

So, What Should We Do?

If you are doing more writing than reading, stick to normalized databases.  If you are doing more reading than writing, still normalize... but then denormalize your data!  Look at the web forms and pages you will have, and see what data will always be displayed, and if you have 18 tables needed to display a users profile, denormalize the data!  Imagine what would happen if you have 10,000,000 users reading profiles and running joins on 18 tables.

One of the Reasons for Web 1.0 Failure

I would argue that a big reason Web 1.0 companies failed was because you had an army of people getting money from VC's, getting expensive DBA's, armies worth, to write complex normalized databases, then getting web guys to create the application layers for these complex databases.  Why is this the reason for failure?  You had slow performing sites that didn't scale.  You had tons of bugs, bad performance, and sites and ideas that never even launched because they were "in development" forever!  In Web 2.0 you have things like Ruby on Rails, AJAX, and companies like eBay that rely on denormalized databases to scale.  You have good looking, fast performing, scalable web sites that are built fast, and not on overly normalized databases.

If you have read this far, I should share some sites with you that give me some legs to stand on for my arguments:

Let the comment bashing on denormalization begin!

 

August 19, 2007

10 Tips to Ace a Software Development Interview

Software Development

I've conducted hundreds of software development interviews over the last few years, and been interview more times than I can remember as a consultant.  My wife is now an HR Manager and a recruitment consultant, so I've been spending the last few days contemplating what goes well in an interview, and what goes terribly bad. 

This posting is an attempt at helping software developers land that awesome job they deserve!  In an upcoming post which I have been working on and editing, I will focus more on the actual technical side to the interviews. However, to be honest, at least 80% of the reason you will get the job, or lose the job, is covered in the tips below.  The other 20% is your technical Ability.

The Secret

There is one thing that you have to know, that will improve your interviews instantly!  It's something that some of you know and think everyone knows, but sadly, 90% of you have no idea!  What is the secret?  It's simple.  The secret is that when you come in to see me for an interview, you already have the Job!  I want you to do well!  The job is yours to lose!  So be confident and strut your stuff.

1. Arrive Early

This is an easy one, but for some reason, some of you insist on letting me weed you out before you even let me start the interview.  No amount of excuses is going to save you if you arrive late for an interview.  Arrive early, that's all I'm going to say about that one.

2. Dress Professionally

I'm expecting some flack on this one, but honestly, dress with at least dress pants, dress shirt, and if you want, a tie, or suit jacket if you have one.  Now on the flip side, one thing you could do is do your research on the company you want to work for, and see how they normally dress.  If you are applying at a Web 2.0 company that has everyone dressing in blue jeans and Abercrombie t-shirts, by all means, dress the part. 

All I'm saying is dress it professionally and clean.  Clean shaven, nicely cut hair, etc.  All these things help.  For example, even if it is a casual work environment, for the interview, wear some nice jeans (no rips), a nice casual dress shirt, nice belt, put on a blazer, and wear some dress shoes. Ok, now that I said my peace on the dressing professionally, let the flaming begin lol.

3. Show Your Passion for Software Development

If you read my blog regularly, you know passion is something I'm pretty much obsessed with.  If you are one of those developers that stay up all night long thinking about the solution to that insane software development problem at work, I want you to work for me!  Do you try and read every blog you can about software development, and stay up to date with everything you possibly can on technology, I want you to work for me!  Do you genuinely love software development?  Well?  I'll tell you what, if you do love it, it’s going to show through!  It's hard to hide! 

Every time you answer an interview question, your face will light up because you know the answer.  Every time you talk about a past experience, you voice will speed up, and you will forget you are in an interview for a few minutes.  Don't be afraid of this!  Let is shine through!  It separates you from the average developer that is in it for the money or the job.  And you better believe that YOU are the one I want on my team.

4. Show You Like Them and The Company

During the interview, you should try and say nice things about the interviewer and the company.  I'm not asking or suggesting that you "kiss up" to the interviewer and the company, but what I am suggesting is:  If you want to work for the company, things it's an awesome place to work, love their offices, love the personality of the interviewer, and love what you have heard from other people about the company, say so!  Honesty will get you far!

5. Avoid Discussing Salary and Compensation

Whatever you do, do not bring up compensation.  If it is brought up by the interviewer, ask it quickly, and move on.  Do not stumble on this question, or be the one to bring it up.  Once you have been offered the job, or just before you are, you will have a chance to talk about the compensation.  It should be avoided at all costs in the first interview.

6. Answer Questions From Experience

This goes for the personal and the technical side of the interview.  A lot of times I will specifically say "Thinking back on your experiences...", however if the candidate can bring up examples on his own, I usually start getting excited and start leaning towards giving the candidate some points.  If I ask a question like "What is Multi-Threading?" or "What is the difference between Finalize() and Dispose()?", don't just answer the question like you are the human programming dictionary.  Instead, impress the interviewer by giving examples!  Start your answer with "It's funny you brought that up, last week I was working on a project where we has to use Multi-Threading!  We had a situation where..." and go from there.

Not only are you answering the question, but you are also showing me that you have real world experience in working with the concept or technology!  Also (yes, there is more!), you are starting a more human like conversation with me, and we are talking and chatting!  You will become more comfortable, and I will also relax and get excited!  I will start seeing you on my team!

7. Ask Good Questions

When it comes time for you to ask questions of the company and interviewer, make sure you have some great questions!  Although it may seem like a great time to get to know the company, which it is, this is one of those rare golden opportunities that you have to put yourself over the top of probably 95% of every other person the interviewer has interviewed for your position.  Ask them about their quality assurance process, what kind of source control they use, if they use continuous integration, what they use for unit testing, etc.  In a future posting I will try and focus on just great questions to ask in an interview.

8. Do Not Be Negative

You would think nobody would have a negative attitude when going into an interview.  You would be shocked!  While you’re in the interview, take extra caution in not being negative.  There are a lot of people that fall into this trap.  One of the most common questions that gets a lot of potential software developers is "Why are you looking to leave your current employer?".  I don't really want to hear things like "My boss was an *** ****", or "I was never given the promotion I wanted, it really pissed me off."  Even though those things could all be true, do not answer this question this way!  Be careful.  The better way to answer this question is "I'm looking for new challenges, learn new things, and I have learned so much where I am now, I'm ready to push myself further".  Saying negative things puts negativity into the air, and it will be there when they think about you later!

9. Constant Eye Contact

So many people have lost me here because they keep looking at their shoes, and not at me.  Even worse, sometimes there are a few people in the room and you need to look at everyone!  What to do?  Look at everyone!  Alternate!  But whatever you do, do not look at one person, and nobody else.  Or even worse, do not ignore one of the people, because you think they are less important.  A few times I've had interviews where I have a few of my senior developers in the room, and the candidate doesn't even bother to look at them, just constantly looking at me!  While it can be flattering (I joke), you are demonstrating to me that you play sides, and view certain people higher than others. 

10. Do Not Appear Overconfident and "Know It All"

I've had so many interviews where the candidate was amazing, and I wanted to hire them so badly!  But they blew it!  How?  They were over confident. Every question I asked they answered with some attitude like they were saying "please don't bother me with these silly questions".  Answering the question of "Name a time when you made a mistake or a misjudgement in timeline, and were going to be late on a milestone.  How did you handle it?" with "My estimates are always perfect, I have never been late, and I have always met all my milestones." does not impress me at all.

 

August 17, 2007

How To Win Friends and Make Developers Happy

Happy Software Developers 

They Should Jump Out Of Bed Every Morning!

How to win friends and make software developers happy!  Sounds simple, however, as most of you will know, managing software developers is tricky business.  Making them happy day to day is even harder. I would strongly advise that anyone managing software developers should be a developer first.  It is true that just because you are a great software developer doesn't mean you should be promoted to a manager. However, I strongly feel that if you have not been in the trenches, on death march projects, or simply do not understand the developer’s mentality inside out, you will be at a loss when trying to figure out this "special" bunch of people.

I'll try and take this from where my other post, The One Minute Software Development Manager left off because I had a lot more to say, and didn't want to lose anyone in my boorishness.

I will try and touch on just a few areas you should always think about when you work with developers on a day to day basis.  The goal?  Make them jump out of bed, excited to get to work to solve problems!

Your Attitude

Managers that want to be mangers to boss people around, give orders, or think that if you make them a manager, they will suddenly be looked up to by people in the organization and team, are probably the worst managers you could ever have!  This is the wrong attitude!  You should never, never, never promote someone to a manager that craves the title, or the responsibility. Just look at what happens in the history books to people that craved power, and were given power. 

The Right Attitude

So what is the right attitude to have?  Managers should be facilitators of the development process.  If you hire a new manager, make sure they absolutely love software development, and understand software developers.  If you are promoting people from within, my preferred method, take software developers that are natural leaders, that have the team already looking up to them.  Take developers that have been doing development for years, and want to get more done by leading a team, and growing that team to succeed!

So, make sure you have the right attitude, be a 360 degree leader, and everyone will want to follow you.  People should want to be on your team because you are an awesome leader, motivator, and coordinator, not because you are a manager.

Challenging Problems

Software Developers want to work on challenging problems.  They love solving things!  They love puzzles, riddles, quizzes, new approaches to solutions.  If you make the mistake of assigning your developers non challenging problems, or worse, no problems to solve at all, you will see some extremely unhappy developers.  Getting developers to write documents, answer help desk calls, and create project timeliness is a crime punishable by death of your team.

At this point you’re thinking, well, I need status reports, and I need someone to answer the phones.  Again the finesse factor comes into play. Let’s try some examples shall we:

Scenario A:

"Hi Sean, I need you to answer some help desk calls for the week, we are totally swamped."

Scenario B:

"Hi Sean, I have noticed an increase in help desk call volumes, and the help desk does not seem to be finding any patterns or rhyme or reason as to why.  I'd love it if you could take help desk calls next week, to help me find patterns and ultimately come up with a solution to why the spike in volumes!"

Which scenario is the right one?  B of course!  And you will probably get your software developer to solve some serious problems that sometimes get lost in the QA process through miscommunication from the help desk.

Micro Management

This is the deadly sin if you are trying to manage software developers.  If you start to use this tactic at any point, watch out, you will lose developers like the plague has infested you team.  The second you fall into this trap you are instantly questioning their ability, and their skills.  You have just managed to demotivate your team in the worst way you possibly could.

Project Delayed?

If a project is delayed, or a system is not functioning to spec, you can count on your software development team to be more freaked out about it, than you are probably.  The absolute best thing you can do is show them you are confident in their ability, and let them solve the problem. At the same time you obviously need to stay on top of the situation, and ensure that they are on the right path to solving the problem.  This is where prior programming experience is vital if you are going to be a great software development manager. 

You Must Have Software Experience

An experienced software developer will have that "blink" instinct to know if his team is on the right path, or the wrong one.  He will be in sync with his team when problems arise, knowing quickly if they are approaching the problem correctly, and will have it resolved shortly.  An experienced manager, with no software development experience, will be freaking out at the first sign of a problem with an application, because they simply do not know what is truly going on, and feel helpless as a team of developers is trying to solve a problem.  They will cause havoc, stressing out the developers, and ultimately causing them to make silly mistakes.

Trust Your Team

Showing your team you are confident in them, while at the same time staying on top of the situation and making sure that Titanic is not going to hit an iceberg requires some serious finesse, and software development experience.

Think about this for a second.  When you hire a software developer, or even a graphics designer, or a video producer, why do you hire them?  You hire them so you can have someone that is highly skilled (hopefully if you have done your job) focus on an area and exceed your expectations for the job!  Does it really make any sense for you to tell them what to do at a micro management level?  If you answer yes, it does make sense, then you have hired the wrong person.

Meetings

I hate to break this to you, but software developers view meetings as a complete waste of time.  Software developers are much more real time when it comes to things, and if you are sticking with Agile, you shouldn't really have your developers in a whole lot of meetings.  Developers live by e-mail. They can easily review their emails, make sure things are complete, and move on.  Should an email come in that is far too complex to figure out without asking more questions, they will then go and ask the sender for more direction (at least if they are awesome developers).

Conduct Short Meetings

Stick to keeping your meetings as short as possible, and if at all possible, just have SCRUM meetings at the end of the day and that's it.  Any time you have a few developers in a room to meet on something is seriously unhappy time for a developer.  The reason being they instantly start calculating things like:  How many lines of code could I have written already,  How many people are in this meeting that are not needed, How many man hours are we loosing per week in meetings. 

Run Efficient Meetings, Don't Waist Their Time

I am by no means saying meetings are useless, but make sure they are action oriented, to the point, and do not involve a lot of people.  For example if you have 15 people in a meeting, and you only need 1 person at a time for 5 minutes at a time, do everyone a favor and just go to that person, then the next, and so forth.

At the end of the day, your team leaders can withstand more meetings than the software developers because they are trying to work on their management skills and executive skills, but your software developers want to program and solve problems!  Let them.

Teach Them New Things... Feed Their Brains

You don't necessarily have to be the one teaching, but it would help if they had a mentor to look up to and learn new skills from.  If there is nobody in your organization setup as a mentor, create them, or feed their brains other ways! Let them buy any book they want, take classes they want, and take any certification exams they want.  Let your developers work on the latest platforms and give them the latest tools to learn their trade better!  The more you have your developers learning, the happier you will make them!  Let’s try another scenario:

Scenario A:

You have the best working conditions, nice office, great compensation package, free lunches and dinners.  Breakfast is waiting for your developers every morning.  However, they are all working on Visual Studio 6.0, with no add-ins, and developing on Windows 98 computers.

Scenario B:

You have your developers working in a basement, no windows, terrible compensation package, no free food at all, and no health benefits whatsoever.  However you give them Dual Core machines with 4GB of Ram, triple 22Inch LCD Panels, and have them developing AJAX applications, creating Web Services, learning ASP.net 3.0, PHP, Java, Web 2.0, XML.

Which one of these scenarios do you think a software developer would rather work in?  B of course!  Now sure I painted an extreme picture to make a point, but it’s true, and constantly forgotten!

Build Software That Matters

Something Steve Jobs has always done phenomenally well, is created a cause, and a purpose in his software development teams, and the companies he has managed.  People want to change the world; people want to do things that matter!  Being significant is a human need that we all need to fulfil! 

Create A Cause

If you create a cause in your team to want to be bigger than themselves, you will not only have amazing software, and probably do things that no other team can do, you will also have some of the happiest, motivated developers around working on your team!

Don't expect to keep a developer around if all you have him doing is crystal reports, adding in new functions into programs that are 5 years old, and updating ancient stored procedures.

Highly Used Software

Get them to write software that will increase sales of the entire organization, and help the company grow and donate even more money to a local charity.  Get them creating new software interfaces that will make using your software easier, faster, and more efficient, helping the order entry team go home earlier on the weekends! Get them to build software that will get used by thousands of people, not by five users!

Help Them Find Their Passion

At the end of the day, when the dust settles, developers are on a journey to find themselves, to find out what they like doing best, and excelling at it.  Will they be a Software Architect, a Lead Developer, an Executive Vice-President, or a Business Analyst?  Will they choose Windows, database, or web programming?

If you can help your software developers find their passion, what they are truly made to do, you will be rewarded by having some of the happiest developers around.  You will also make friends with some of the c00l3st people you will ever meet!

The Conclusion?  It's a Two Way Street!

I love working with software developers!  I give them as much respect, advice, leadership, responsibility, and personal time I can possibly give them.  They in turn, love working on our team and love getting up every morning.  Together we achieve some pretty awesome stuff! 

Going through both sides in the last 12 years, from help desk to pay for school, software developer, consultant, software development manager, to Vice President of Technology, I have definitely see both sides! I've had to do my fair share of firing and dealing with lazy programmers that think they are the second coming.  I just plain don't accept that on my team, and honestly, neither do the other team members.  Nearly every member on my team scores extremely high in my 15 point, How to Rate a Software Developer, but is at the same time humble, compassionate, and caring.

If I had a flat tire, ran out of gas, or any other emergency, they would come help a the drop of a hat, and they would treat each other the same way.  When review time comes, they know how their reviews will go before we even do them.  In a competitive market, assuming you have the best developers, and assuming they treat you fabulously and with respect, you need to follow these rules, period.  The days of Laissez Faire leadership and Transactional leadership are over.  You need to be Transformational.

 

That's Hot Code. Code That Scales

In software development, you have to write awesome code!  Code that scales! Bottom line, I love developers that write wicked code that scales, that functions to perfection, and that looks "Hot"!  I just don't understand people that think their super hero name would be "The Human Obfuscator".

The Hot and Ugly of Software Development

You know the feeling of hot code!  It's so easy to read, things just seem to flow together, you get into this state of happiness that all is good with the world?

Don't you hate that feeling in your stomach when you open up code, and there are no comments, and it's impossible to read, nothing seems to flow, you get into this state of crying and angriness!

I love asking white boarding programming questions in interviews, not so much because I want to make sure the guy can put together come code that will execute, but because I love seeing how pretty their code is.  I look for things like separation of code, is the developer putting related pieces together?

Someone Else Will Look at What You Developed

As developers, we often forget that chances are, someone besides you will be touching your code, and they will be lost reading it if your code is ugly.  You should always be thinking in the back of your mind "How can I make sure that people reading my code will say, "That's Hot Code!"". 

See I think successful software developers view writing code more like an art form, than a science.  Sure there is a lot of science in software development, however, once science becomes so complex that it requires finesse to get it done, it becomes art.

Software Development Requires Comments

So much code out there is not commented at all.  During software development, it seems some developers don't see the importance of it.  When I look at code, I would love a brief explanation of what you are trying to do, any code hacks you used that need to be cleaned up later, etc.  Adding a nice description to functions is awesome.  Adding smaller bits of comments when needed within the code itself is also awesomeness.  However, be careful not to go overboard and add to much detail!  Your code should use variables that make sense, should flow, etc.  However even the prettiest of code needs comments to make everything flow together nicely!

Comment your code as you go about development.  If it took you a few weeks to figure out an algorithm, or how you needed to make a certain recursive function flow, make sure you comment it for goodness sakes!  I can't count the amount of times as a software consultant that I was reading other peoples code, and wasted days trying to figure out what they were doing, simply because they refused to take 2 minutes to add a few simple comments.

I've also run into the other side of this coin where some developer made it his life mission to over comment everything!  I'm talking every single line.  "What I'm doing here is going into a case condition.", "This is and If statement.", or how about "I'm going to assign 5 to the integer i.".  I get it!  Reading through this kind of code also takes forever, as it becomes almost as annoying as using Microsoft Bob, or dealing with Clippy saying "It looks like your writing a letter!".

Develop Readable and Well Formatted Code

Have you ever heard the argument that you save bandwidth by not spacing things out, not tabbing, and using small variable names?  Let me just save you trouble by telling you, do not hire anyone that believes this theory.  Machines are the best at saving bandwidth, if you are concerned with bandwidth and file size, run compiled or compressed code on your web sites.  People that write code like they are a human obfuscator perplex me. If you are out there and reading this, please explain your logic in the comments...

Make sure you use indentation and your margins correctly.  It's nearly impossible to read code that has poor indentation, or none for that matter.  I mean sure it's readable, but it cause massive migraines, and it's just something that should not be dealt with if you are any kind of professional developer.

You know how in English glass the teacher explained how run on sentences were bad?  The same applies to programming.  Try and keep your lines no longer than 80 characters wide.

Also please make sure you use variable names that make sense! Booerns (This is a Simpson's technical term) to using letters that mean nothing!  Be creative and come up with some nice variable names that make sense.  And don't try and be the smart ass that creates variables that make the Great Wall of China seem like a tiny stretch.

Follow coding standards set forward in your organization.  What you don't have coding standards?  Get some!  While you're at it make sure you add in some casing and naming standards!

Separate Logic

New developers do this all the time, they will create functions like "submitOrder", and place every piece of logic into the "submitOrder" function, from sending the order, to calculating totals for the order, and even figuring out the taxes on the order.  Instead, please do everyone a favor and create an "Ordering" class, and create functions like "getSalesItems" and "calculatePST" and "sendOrder". 

You really have to make sure you separate out your logic whenever possible as it will make unit tests, later bug fixes, and re-usability much easier tasks to accomplish.  Even if you already have a huge function that does everything but flush the toilet, make sure you go back and re-factor the function.

Code Review

Probably the single best thing you can do to make sure your code is "Hot" is perform code reviews!  This will force you to want to write readable code that everyone will want to look at, instead of code that makes developers want to run away screaming. 

Final Thoughts

As you grow in your software development career, you will start to realize that very little time is spent writing new code, and a lot of your time will be spent looking at old code, and figuring out how to tweak it, and extend it.  Make it easier on yourself, and the other developers that will have to look at your code, by writing "Hot" code!

At the end of the day, "Hot Code" is readable, maintainable, less bug ridden, artistic, and scalable.

 

August 15, 2007

10 Software Quotes from 6 Titans of Software

Love them or hate them, these figures have changed, created, and re-booted the software industry we all live and breath in.  Bill made it profitable, Steve made it sexy, Larry gave us Larry, Google boys made it searchable, and Marc killed the desktop.  The one common denominator between all of these visionaries is extremely clear.  Passion! 

There is something to be learned from every one of them!

Bill Gates - Co-Founder and Chairman - Microsoft

Bill Gates

"The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that automation applied to an inefficient operation will magnify the inefficiency."

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight."

www.microsoft.com

Steve Jobs - Co-Founder and CEO - Apple

Steve Jobs
  • "A lot of times, people don't know what they want until you show it to them."

  • "We made the buttons on the screen look so good you'll want to lick them."
  • www.apple.com

Larry Ellison - Founder and CEO - Oracle

Larry Ellison

"You have to act, and act now!"

 

"When you innovate, you've got to be prepared for everyone telling you you're nuts. "

www.oracle.com

 

Larry Page - Co-Founder - Google

Larry Page

"We have a mantra: don't be evil, which is to do the best things we know how for our users, for our customers, for everyone. So I think if we were known for that, it would be a wonderful thing."

"If you have a product that's really gaining a lot of usage, then it's probably a good idea.”

www.google.com

Sergey Brin - Co-Founder - Google

Sergey Brin

“We believed we could build a better search. We had a simple idea, that not all pages are created equal. Some are more important.”

www.google.com

Marc Benioff - Founder and CEO - Salesforce.com

Marc Benioff

"Always pitch the bigger picture. Salesforce.com was about "the end of software," not customer relationship management software or software as a service."

www.salesforce.com

August 14, 2007

How To Kill Your To Do List, Developer Style!

Are you one of those people that creates to do list's, action plans, project plans, and seems to have millions of things to do?  There is actually a simple "Hack" you can use today to get your life back on track.  I just finished reading David Allen's book Getting Things Done: The Art of Stress-Free Productivity: Books: David Allen, and have taken some great ideas from the book!  I highly recommend reading it. Follow along with me on this journey to getting more stuff done than you ever imagined, developer style!

Set Yourself Up For Success

Before we start, the whole idea here is to process things fast!  If you can't do something in two minutes, figure out what you will do with it.

Create 5 folders on your computer.  Inbox, Action Items, Incubate, Current Projects, Archive.  Create shortcuts to these fo