Good Coding Practices

April 9, 2008

I’m fresh to the industry, but I know a thing or two about good coding practices. And one of them saved my sanity today.

I’m learning Qt, as it is something they don’t deign to teach you in school. Moreover, I didn’t even know a tool like this existed until I entered this company. Something that converts UI development into drag-and-drop? Sign me up!

I like UI development. But sometimes you really just want things to be pre-made for you. Like trees and tabs and radio buttons.

In this thing I’m working on, I had to find a way to convert this Tree Widget to go from single-select to multi-select. Try as I might, I couldn’t find the stupid function call I needed.

Eventually, I gave up and guessed.

And I guessed right.

How could I possibly guess right? Consistent naming conventions. It’s something so simple, so basic, but so often ignored. I can’t tell you the nightmares I’ve gone through in the month-and-a-half I’ve been on this team with code that is inconsistent in how things are done, not just across various components, but even internally, within small sub-divisions of the application.

Naming conventions. Learn them. Use them. Enforce them.

4 Responses to “Good Coding Practices”

  1. Thank god for Visual Studio Intellisense. I’d never be able to know everything .NET or C# can do without it. Plus I’m lazy, and I don’t want to type any more code than I have to.

  2. Rachna said

    You should try bug fixing solutions on this page. It has very bad bug. http://aruljohn.com/fun/j/bug/

  3. morgandempsey said

    Rachna — I see the problem. The bug is running in an infinite loop in that for statement :)

  4. You people are very luck to have these GUI interfaces with drag and drop technology. I started programming in the 70’s and all coding was done by hand in a text editor like Wordstar. 89 percent of my time was in the debugging of the code. With C++ if you left out one little semi colon your program would not work at all.

    I am now using Visual web Developer which Microsoft gives away for Free. Free video training, drag and drop application generator, etc.. plus great debuggers. It is soo much easier in todays world.

Leave a Reply