Monday, May 20, 2013

Your Code Sucks

I’ve seen a few people that I know berate people for the quality of their code and say things like they should just go and deliver pizzas.

You aren’t your code. Code is an expression of the skill, mindset, and situation facing the person who wrote it at the moment it’s made. Nothing more. In fact, it may be the chaining together of those factors from several people as the code is maintained.

There may be things about the situation that you don’t know. Maybe the person was under insane time constraints. Maybe they were thrown into a technology they had no experience with. Hell, maybe they were just having a bad day.

You may not like maintaining the code – I know I don’t, but I try not to berate the person doing it because I don’t know what lead there. (If I know the person in question and know that they just don’t care, that’s a different story)

There are a couple of appropriate responses to “your code sucks”.

  • Where can I improve?
  • Yes, it sucks. So does everyone else’s. I’m working to improve. Are you?

Improvement is the important part.

Yes, my code sucks. It always will, but it gets better every day.

Does yours?

Current mood – tired
Current music – 10,000 Maniacs – Candy Everybody Wants

Wednesday, May 01, 2013


After a couple of false starts, I started digging into learning ASP.NET MVC a couple of months or so ago.

First, I decided that I also wanted to learn webforms, just in case.

Don’t look at me like that. I learned the error of my ways after my eyes started to bleed and hands began reaching out of the walls for me. Though I’m not sure that was caused exclusively by webforms. That may have been caused in part by my recitation out of a book of really odd Latin poetry that I ran across…

Either way, I stopped trying to learn webforms, so mission accomplished. Now if the really creepy looking guy would stop making faces at me in the mirror when I try to shave, that’d be great. Oh, wait, that’s me. Sorry.

Next, I tried just diving in by starting with Professional ASP.NET MVC by Galloway, Haack, Wilson, and Allen.

This, for me at least, was kind of a mistake. The first couple of chapters were okay, but the first chapter on the topic of Views was full of hand waving and a sense of go screw yourself. It all kind of boiled down to “I’m not going to discuss the code. I’m just going to go off on tangents that you don’t need right now.” (This is a pet peeve of mine)

That’s not to say that the book is bad. It’s actually quite good as long as you have a rough idea of what’s going on (which I didn’t at the time). Otherwise, it got a bit frustrating. I'm going back over the book now, in fact.

I ended up going online to find the music store tutorial that was mentioned in the book and working through that first. That worked a lot better for me, but it could just be that I’m a bit slow. Who knows.

Going on the premise that I learn a lot better by playing with something once I’ve figured out the basics, I decided to rebuild my website with MVC. After all, it was just static pages, so I wouldn’t have to worry much about the M portion of things.

As a result, I got a decent grounding in the use of Controllers and spent a small mountain of time re-arranging the structure of the website to comply with the MVC principles.

Of course, I also got to do some much needed housekeeping, so that’s a plus. It just took loads of time because there were probably 40 or so pages.

In all honesty, most of my frustration was dealing with CSS3 (the site’s last incarnation used CSS2 and a lot of things have changed) and getting all of the settings right (both on my end and on my hosting provider) to get web publishing to work from Visual Studio.

The site isn’t “finished”. I’ll probably always have things that I want to do to it, but it is published. The visual changes are fairly minimal. Mostly, the menu has just moved to the top instead of running down the left side. However, things are a lot different on the back end.

Now I get to move on to more complex stuff.

Current mood: tired
Current music: David Gray – Babylon