Wednesday, September 22, 2010

Happiest Now

I can say that I am the happiest right now than I have been in a long time. How long? Since I got married long. Don't get me wrong, I have been happily married, but right now things are just awesome. Why? Some people say that happiness is related to community. Right now my community is pretty spectacular.

Family is near by. I talk to my dad daily, my little brother at least once a week, usually more. My kids and I have daily conversations. And my wife and I have been growing as a couple for the last 5 years, the relationship just keeps getting better every day.

I have a bunch of close friends. This is actually a new thing for me. My wife and I talked about moving back closer to our families, and I ended up not wanting to. Why? Primarily because my friends are here. I have work friends and gaming friends and old friends and new friends. And most of the world doesn't understand that this is a new thing for me. It is almost like Christmas every day. Growing up we moved, alot. We moved so much that in 12 years of school, I went to 9 different schools. Which means I had new friends pretty much every year. The years that we didn't move just happened to coincide with the years that I would change schools (going from elementary to middle school). So now, I have friends that I can say, "remember that time ** 9 ** years ago?" and they can say, "Yeah, that was great". Most people in this world have experienced that by the time they are 18. It took me until the age of 36 to have that happen.

My work life is stabilized as well. I am with a good company, that I trust, and that appreciates me. This is new as well. Looking back at that last paragraph I wonder if there was something wrong with me that caused me to jump companies every other year, because that is exactly what happened. The longest I was ever in one place was 2 years. I was never taught how to be planted. The people at my company are great. The company isn't just stable, it is growing. In this economy that is huge.

So, between my family, my friends and my work relationships, my community is pretty strong right now. Which means, I am a happy man.

Don't change my code!

Dear developer peer,

May I bring up a delicate subject? You were offended because I changed code that you had written. You got upset because there was some sense of ownership of the code. You put time and energy into the code. You had to sweat to get the code to do what you wanted it to do. You pressed CTRL+C and CTRL+V six times to get the code in the right place, and write some very funky if statements to get it to work correctly.

All of that was lost to your wailing about lost code is that now TWO people have had to spend time trying to understand what the code does. Your time and mine. I needed to alter the behavior of your code in some minor way, but before I could do that I had to go through and figure out the twisted logic. What gets lost is that I am offended when I find in your code of 60 lines of nested ifs (4 deep). I am offended when after spending 45 minutes trying to understand the intent, I can, in 10 minutes, convert said atrocity to 20 lines and 1 if.

You yelled at me because I wanted the code to be "my way". And that "there is more than one right way". But when your way is 9 if statements and mine is 1 then, well, I don't feel bad. I changed your code because I was offended. I never got a chance to tell you that because you were so pissed, so, now, 10 hours later, I am telling you. If you don't want me to change your code, then write clean code that doesn't offend me. Write code that doesn't offend the compiler. Write code that won't put the CPUs at 100% for 25 seconds. Write code that lets the database limit the dataset instead of returning everything and then looping through it to discard what isn't needed. And for sanity's sake, don't have the exact same code copy and pasted six times in the same method/function.

And don't take this as me thinking that my code is great. I know my code sucks. I look at the code of other developers that I know are smarter than me and try to mimic their style. I try to improve my code every day. The difference between you and me is that I know my code can be improved and would love it if someone came in and showed me how.