QueTwo's Blog

thouoghts on telecommunications, programming, education and technology

Monthly Archives: September 2009

Know the code you are in…

Last week I had the pleasure of attending the Detroit Java User’s Group presentation from Josh Holmes on Application Simplicity.  Walking into the presentation, I, along with most of the people that attended expected the typical UX presentation (keep it simple, stupid! among other common slogans), but I was pleasantly surprised at one of the tangents that we went across.

“If you have to think about how to explain the solution, it is entirely too complex.”

We then went into a great dialog about how you can best arrive to the most simple solution.   One of the things he kept drilling to us was this : If you don’t understand what your code is doing in the background, you can’t write good code.

Today, we live in a world of code-hinting, code-wizards, code cookbooks, and frameworks that write our applications for us.  Far too often I’ve been asked to help debug an application or help solve an issue where the person really has no idea what their code is really doing in the background.  Dragging and dropping a data-grid onto the stage, dragging a database connection to it and publishing the application is great — but can you actually tell me what is happening in the background.  Would you be able to explain why it starts to slow down after running the application was running for 5 minutes?

In the United States we tend to have two camps of people who create applications.  Some people are based in computer science or computer engineering.  These people have taken some sort of formal classes in computer science theory and understand memory management, multi-threaded computing, etc.  The other camp is primarily developers — people who typically don’t have formal CS/CE training, and often will require the use of tools or frameworks to complete their projects.  The difference is either engineering software or developing software.

Do you know what kind of code your tools or frameworks are creating?  How much overhead does storing that variable as a string vs. a boolean have?  How about creating your own class?  How does your framework / language manage CPU cycles when you store large amounts of data?

Just things to think about.  Knowing how your underlying code works, and not just relying on a tool to create your application can help you write better code.  Anybody can use a tool to connect a web page to a database, but not everybody can engineer an application.