Wednesday, November 26, 2008

The Pyramid of Software Priorities

Ok - so a pyramid is probably the most overused illustration for.....anything...but bear with me...

There are several basic priorities you need to consider when writing software (from a code perspective)... the lower priorities are foundational to the ones above them - if you don't have a priority in place, you have no business even thinking about the next level. Also, I would probably say that the higher up the pyramid you are, the more mature you are as a developer.

So what are they??


Bottom Level: "It Works" - sometimes this is all you need.

One Level Up: "It is Readable" - if your code is to be maintainable - it needs to be readable and quickly interpretable...by the next HUMAN to read it.

Two Levels Up: "It Does Not Inspire Hate" - if that next human not only is able to read your code, but doesn't hate it, you have thrown additional value into the pot -- good job.

Three Levels Up: "It Inspires" - if the next human is able to read, and actually has a positive emotional response to your code - I think you have reached the pinnacle of achievement in software development - you've added the most possible value to those that will follow you, and thus to the software product itself.

So - next time you're building something - consider things from the bottom up....and don't try to skip steps.. the more deliberate and intentional that you are about your coding, the higher up the pyramid you will find yourself.

Monday, October 20, 2008

Cause for Code

So - you get caught up in the day to day, same old routine - things get boring and stale - and sometimes you wonder why it is you do what you do. Coding takes a lot of focus - and like anything else that you have to concentrate on - it can cause you to lose your perspective. So if you're in that place right now - let me remind you why you do what you do......(and it's probably not the millions of dollars, rock-star status, and adoring-obsessive fans).....


This is from "Good To Great" by Jim Collins:

No, those who turn good into great are motivated by a deep creative urge and an inner compulsion for sheer unadulterated excellence for its own sake. Those who build and perpetuate mediocrity, in contrast, are motivated more by the fear of being left behind.


We create - we build... we pull together a myriad of different pieces of technology (most of which are far short of being mature) and piece them into working systems that not only help people accomplish - but often times, inspire and direct that accomplishment.

But take a step back with me....take a deep breath. If you notice in the passage from Collins, he discusses two motivations - which, I believe are both very prevalent in software people - the deep creative urge for excellence, and also a certain level of fear. I think everyone has a measure of both of these drivers threaded through our lives and our work - but the extent to which you can let the drive for excellence defeat fear determines the level of your work, the level of your influence on others, and the level of your own personal enjoyment of your work....(yes, you should enjoy your work - but that's a discussion for another time).

So - hopefully you know about how neat it is to nail the details of a particular system in such a way that you can just look at it and tell that it is solid and well put together. Hopefully, you are hungry for more of that. Hopefully you have that deep creative urge for excellence for its own sake....

Even though you have the hunger for excellence, fear can come into an environment in many ways - and many of us are very familiar with this. It can come from miscommunication with co-workers, being mistreated by a co-worker, or even if you mistreat a co-worker. Though, when you think about things, you can usually trace it back to its origin.

So - what is there to be done? Take responsibility for the situation - make it your mission to remove fear and feed your own hunger for excellence. If there is something that is keeping you from feeling free and empowered to do your work, identify it and deal with it - if it means doing something scary, like confronting someone, or even moreso, finding different working arrangements. Make sure that YOU are putting yourself in an ENVIRONMENT that will allow you to have your hunger for excellence. This is your responsibility - don't pass it off on to someone else.

Friday, August 29, 2008

Software Development Myth #3: My Development Velocity Is Based Solely on Me

One of my managers in the past used to say that every developer has a factor that you multiply his or her development estimates by to get a "more accurate" estimate. Ok, I believe this - some developers tend to be opptimistic in their views of how quickly they can get things done - others tend to be more pessimistic.... I even had a co-worker who thought he gave "more accurate" than other estimates...(yeah, right).... so bottom line is there's a sliding scale that you probably fall on as a developer with regards to how optimistic or pessimistic your estimations are... (I won't try to dive into the psychological reasons for how you arrived there -- anyone else want to take that post? :))

But this manager was only concerned with the developers in his environment (not surprising)... however, there is another factor to enter into the equation - and it relates to the organization - and how a particular developer relates to that organization...... so to simplify - the factor that this manager shared about is not simply to be defined by the estimating practices of the particular developer... but also how the developer works in the larger context of the organization.....

For example - at one job - I thought I had honed my estimation skills - working in a particular environment with small, packaged deliverables, and management focused on keeping hard deadlines... yeah, I could narrow things down to almost every line of code I would have to write to make something happen - not taking into account much back and forth with the folks that were requesting it........definitely easier to estimate, and it definitely pulled me from the "pessimistic" side that I tend to be on........then I worked at another company - where there was a little more back and forth - a little less rigid with regards to requirements....so my estimates probably bounced a little more toward the pessimistic side, to compensate for that.... and in yet another organization - a massive organization with many, many parties to deal with and negotiate with - I found my estimating to be on the optimistic side....and it shifted to more pessimistic, to compensate for all the challenges bringing pieces together....

I'm sure anyone who's been in the industry for any amount of time has seen similar sort of pattern... but it's something to keep in mind if you have to make a move to another organization....time moves differently in different places..... :) And you don't usually know the arate at which it moves until you have existed in it for a little while..........

Tuesday, August 19, 2008

The .NET Dilemma

So there exists a bit of a dilemma in the .NET world ... having come from the Java world recently, I think I can probably see it a little more clearly than others.... it is this:

you must use only microsoft tooling, even though it is ages behind the rest of the world

Let me give you one of a few real-world examples to kind of explain what I mean -- let's start with the "you must.." part...............I'm currently doing web apps with C#/ASP.NET - and I would have liked to use an MVC framework...HOWEVER, Microsoft's is not done yet - it's on preview 4 or something... so, the other option is to use Spring.NET or another third party MVC framework... the only thing is: I know Microsoft is working on a MVC framework - and when it's done - they'll make sure there are no competitors - that means there's already a ticking clock on the lifetime of Spring.NET and any other third party projects.... so that's the "you must" part - there's really no realistic choice other than to wait for Microsoft's stuff - or just to not worry about your application becoming *legacy* as soon as you write it.....

Ok - next part - ages behind the rest of the world -- that's right - Java (among others) has had MVC frameworks for a number of years now - they're a well understood thing - they're helpful - and darn it they make you more productive..... why is Microsoft JUST now developing something? Who knows - all I know is that it's way behind the times......

Anyway - that's the dilemma in a nutshell - the fact is - the .NET environment works just fine -- but if you want leading edge power and flexibility -- mmm.. I donno... :)

Thursday, August 7, 2008

LINQ to SQL!! Key Conflicts

Ok all - just a cautionary tale... if you see anything similar to the following when working with LINQ to SQL, consider what I'm about to tell you...

"Cannot add an entity with a key that is already in use."
or any other message about conflicts or whatever.....

I've had this problem probably four times, and for some reason, the symptoms still fail to trigger my previous memories.....and btw, there seems to be no tooling around how to figure out what data LINQ is talking about when it makes claims about bad primary keys,etc...(if I'm wrong, please let me know..)

Anyway - I use SQL Server generated identities for rows... and if that is not annotated on the LINQ to SQL generated code, it will not use the generated key - it will assume the key you are giving it is accurate (be it a 0 or null or whatever....)

So just remember this...... it's annoying....and it's probably, overall now, cost me a week of dev time for this project.... BOOOO


:)

Till Next Time...

Thursday, July 17, 2008

Behavior and Rest

So here's an interesting angle (from someone that seems pretty intelligent) concerning one of my main disappointments in the 'rest' approach to web services. That is, the rest approach only encapsulates five possible behaviors (corresponding to the five HTTP verbs). In my mind, any other behavior encapsulation doesn't fit in the rest model. This guy disagrees...and he does so fairly eloquently....

http://www.xent.com/pipermail/fork/2001-August/002923.html

Unfortunately, this doesn't cut it for me - because, you're still not encapsulating any new behavior - your factoring it out into its crud operations, and then doing the behavior in the client code. So - it appears to me that rest is just not really suited to situations where you're actually trying to encapsulate behavior (such as non-trivial business logic)... but it is VERY nice for quickly modeling things that can be thought of as a resource or as a piece of data, that you want to be able to view or modify in a sort of low-level kind of way....this resource-centric approach is probably the best part of rest and would probably fit in well with other modes of web service delivery - but because of this short-coming - probably not a suitable replacement........at least IMHO. :)

Tuesday, July 15, 2008

We're Not Resources

Why actually blog myself... when everyone else is saying everything.... here's a great post about how insulting and counter-productive it is to manage software engineers as if they were replaceable cogs....let's do like a commentor says, referring to people as "Resources" should be recognized as a bad word in polite, tasteful companies....

http://blog.markturansky.com/archives/95