My iPhone code is a hot, hot mess at the moment. I basically put aside proper object oriented code to get a prototype working, and then worked off of the prototype, and now… well… it’s not pretty…

I began the process of refactoring it recently but ultimately decided to keep it the way it is until I actually launch. There’s something to be said for simply getting things out the door and cleaning up your mess later. It would take me a week to clean it up and debug. Rather than trying to tie up the loose ends now, i’m just commenting my code as best I can with plans to refactor later.

Don’t be ashamed of your messy code :)

Trausti

on 01 Jul 10

Letting other people see your sourcecode sometimes feels like letting people see you naked

Richard

on 02 Jul 10

This is why I use Ruby for only the simplest of things, and Java for everything else.

Stephen

on 02 Jul 10

@Richard: Because you can’t write Ruby code very well? :P I don’t see what relevance language choice is in this case, it’s perfectly possible to write messy Java code too.

Adam

Most of this code should be in a view. Then again, most of my code should undergo a review, so props to you guys for finding, sharing, and (presumably) fixing it.

GrainBeard

on 02 Jul 10

It is clear from this code that companies love firm people.

:-)

Tom G

on 02 Jul 10

Huh, it’s kinda like opening up an old tv set and looking at all that dust and complexity.

First impression is that there are insufficient comments and that the names haven’t been selected optimally for self documentation. In the interest of brevity, too much functionality is overloaded into too few lines of code, but this is a preference counter to popular concepts.

That said, it probably works, and from a functional standpoint has all the beauty of a hammer.

Now the idea of ‘blame’ is interesting. Many programmers will look at old code they’ve worked on and say, “I wouldn’t have done that!” This way of viewing revision history seems like a good way to use peer pressure to increase code quality.

Anonymous Coward

on 02 Jul 10

@All

Am I the only person who does NOT like the new basecamphq.com?

Tom

on 02 Jul 10

I’d love to see some of your well-written Ruby code … mainly from controllers.