Set an image for Matt Rajkowski

Sign In or Register

Matt Rajkowski

Employee
  • Raleigh-Durham, NC
CRM Account Management Event Promoter Employee
PUBLIC PROFILE

Coding Guidelines and Removing the IDE from the Equation

Posted by Matt Rajkowski on May 28, 2009, 10:00 AM EDT
Default user photo

Every so often the topic of which IDE do you use comes up.  I've posted about this in the past and while I passionately have a preference, as do others based on the comments to that article, I've found that given the requirement of writing good code, the modern IDE choices are interoperable.  Let me explain...

A bunch of us here at Concursive pay for our IDE.  Others have chosen Eclipse.  From my point-of-view I'm ok with that as the developers have proven that the IDE choices are interoperable.  At the end of the day I can't distinguish code done in, let's say IntelliJ IDEA (my preference) to Eclipse (the preference of our other developers).  I also have friends who use NetBeans (I only mention that for completeness).

What makes interoperability possible are coding guidelines and best practices...

 

At the top of my list is code consistency.  This includes deciding on the code formatting, file structure and package names used in the project.  It also includes using standard coding conventions, like those from Sun.  If you're coding JSPs, look at the JSP and JSTL documentation.  If you're coding the UI layer, be familiar with CSS and HTML specifications.  Make code that is easy for others to maintain with the lowest learning curve.

Another topic is resource allocation.  Use resources sparingly and effectively. Use only one database connection at a time, and obtain and release it from the pool as soon as possible.  Also, avoid using per-user resources like session variables.  They add to the application's memory overhead and to any replication that occurs between servers.  Leverage caching and services.

Write tests while implementing code.  We're not striving for 100% code coverage, because that often comes at the cost of maintaining the tests, and slowing down the build process, but do write tests for complex code.

Understand the key validators of code. Reliability, security, performance and scalability, maintainability and upgradeability.  Collaborate on these topics before writing code.  Also strive for customizability and configurability of the application.  The framework allows code to be repurposed fairly easily.

UI consistency.  Expect the unexpected.  A couple of arguments here... several years ago no one said that 800x600 needed to be supported based on statistics... today there's now an influx of netbooks and other devices with tiny screens.  While I wouldn't go down to 800x600 as a default, I would say that 1024x768 is a good compromise.  Others have said be scalable.  Regardless, ensure web applications work on the major browsers: IE (6,7,8), Firefox, and WebKit (Safari and Chrome).  In addition, expect that the content will be dynamic.  Users can zoom in and out with the browser, and content can be added and deleted.  Allow the rendering to adapt.

Log application events.  The guideline might be: ERROR -- an application exception occurred and the condition needs to be reviewed; WARN -- unexpected, but handled conditions occur; INFO -- used for one-time messages that describe the startup, initialization and shutdown of various components; DEBUG -- for displaying messages that help in debugging the application, without inundating the typical developer with messages; TRACE -- for low-level in-depth messages that help in debugging the application.

Choose technology wisely.  There are many libraries and frameworks out there, and deciding when to use one is important.  Make that decision as a team.  There's nothing more frustrating then having to maintain a library when you haven't had a chance to work with it.  On the other hand, if you've got spare time, become an expert on rising technologies.  This will make you a better developer.

So, while the IDE is important, it's what you do with it that's more important.  What do you do with your IDE?

There are no comments

Sign in to add your comment.

Recent Posts

Code for Cary, North Carolina – Code for America
The other night I attended a Code for Cary meeting… a part of the larger Code for America, and even...
read more
Build times for various Java web apps here at Concursive (updated)
Concursive generates web application archives (.war files) for their apps. These are done all over...
read more
Apps I Use in 2012 for Design (IA, UI), Development (Web, Mobile) Collaboration and Documentation
 Design/Documentation: * Pages * OmniGraffle * Keynote Productivity/Project...
read more
First impressions of the new MacBook Pro with Retina display for Developers
I went to the Apple store at lunch and I played around for about 45 minutes on both the new MacBook...
read more
Why the web needs a universal decision support system and not just another decision engine
The best social sites and search engines alone won't tell you how valuable your business is, but a...
read more
Distributing and promoting Open Source projects
The Open Source files for ConcourseConnect (OSI approved AGPL license) are being hosted by Google...
read more
IntelliJ IDEA 10 [u]
My favorite IDE reached version 10 in December and I finally got around to downloading a demo of the...
read more
Skipfish - Google's automated web security scanner - A use case
Google recently released Skipfish, a command-line tool for testing the security of web applications....
read more
Can a corporate web site be a social networking community?
This is a question that we have internally discussed for years.  We decided that the answer was yes,...
read more
IntelliJ IDEA Community Edition 9 Preview (quick insights)
JetBrains recently released a preview version of IntelliJ as Open Source.  The marketing page...
read more

Go to blog