Thursday, August 10, 2006

Statements I have recently heard

I had an conversation recently with a number of folks; all of whom are having fairly consistent problems with their system's stability. Each of these statements come from individuals who make their living as a senior level developer or a manager of a team of developers.

Can you tell them why they are having problems?

These statements are from the same person:
"We don't have the time to test thoroughly and meet out deadlines. Besides the users are supposed to test."
"We test the application every which way from Sunday. Testing wouldn't have caught the [run-time] error."

As a note - the error was fundamental and a standard regression test of the module explicitly changed would have caught it (in my opinion).


Other great statements:
"Standards are just loose guidelines. As long as I can read the code and it works, it's good. I don't need to be picky." - responsible for team of 7 developers working on the same code base. The week prior to this statement, the system had crashed due to use of poorly scoped variables (something you often see covered in standards)

"Patterns (such as the GoF patterns) are a great theory, but we code in the real world." - HUH?

"We like to make fun of [insert name here]. He's a real stickler for standards and stuff." - responsible for team of 20+ developers all working on the same application - making reference to one of their own employees.

"We almost had to quit doing code reviews... people kept criticising each other's code." - one of my personal favorites

Monday, August 07, 2006

Code Naming Conventions

There is a pretty good (albeit brief) series on Code Naming Conventions by The Igloo Coder:
http://igloocoder.com/archive/2006/07/04/394.aspx

The series first looks at the need for conventions and essentially makes the argument that consistency is paramount to good team coding. I agree.

He then covers Local Variable, Module Variables, Functions, Methods, Parameters, Properties, Classes, Interfaces, Super (and Base) Classes, UI Controls, and SQL Server Objects (also applicable to Oracle, MySQL, etc.)

I happen to agree with his observations as well as his conclusions. These are the same standards I use when something else is not mandated.

The following is a brief summary. Do read the series; there is more detail. It's an easy read.


Local VariablesstrHungarian (Yes, seriously, Hungarian Notation) strEmployeeName
Module Variables_strHungarian _intRecordCount
FunctionsPascalCase (Verb-Noun) DeterminePrice()
MethodsPascalCase (Verb-Noun) PoundSalt()
ParameterscamelCase DoThing(bool isGoodBoy) * He actually makes note to avoid bool and use enum instead
PropertiesPascalCase read his blurb for more details
ClassesPascalCase
InterfacesIPascalCase ICanPontificate
Super(Base) ClassesRead his blurb
UI ControlsstrHungarian txtUserName * Alternate is to prefix HTML controls with 'h' => htxtUserName
SQL Server ObjectsPascalCase (Noun-Verb) EmployeeAdd * The Noun-Verb is specific to Stored Procedures

Thursday, August 03, 2006

JSR 168, WSRP, Portlets & Enterprise Portal

Decent Blog on the general Portal Market, the emerging standards, and the players:

JSR 168, WSRP, Portlets & Enterprise Portal