Seen bySam Stephensonon July 1 2010.
There are19 comments.
SS
on 01 Jul 10
The “notify_form_options” helper mixes permissions, type conditions, and column output formatting all in the same method. And its original intent is long lost on us now.
DHH
on 01 Jul 10
I think I originally came up with the non-word notifee. Now it reads like “noti FEE” to me. Like something a bank would charge.
During my last conference on human computer interaction, I tried to convince some scientists to open source their software. I’ve seen very nice stuff there.
But everyone was telling me, they won’t because their code is way too embarrassing.
I love the fact, that you’re talking about embarrassing code. Everyone writes it, most of them see it, few take the time to improve it ;)
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
on 02 Jul 10
I actually find it easier to write messy code in Java ;)
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.
SS
on 01 Jul 10The “notify_form_options” helper mixes permissions, type conditions, and column output formatting all in the same method. And its original intent is long lost on us now.
DHH
on 01 Jul 10I think I originally came up with the non-word notifee. Now it reads like “noti FEE” to me. Like something a bank would charge.
Ben S
on 01 Jul 10Which blame viewer is that? Looks nice!
Anonymous Coward
on 01 Jul 10Textmate
riethmayer
on 01 Jul 10During my last conference on human computer interaction, I tried to convince some scientists to open source their software. I’ve seen very nice stuff there.
But everyone was telling me, they won’t because their code is way too embarrassing.
I love the fact, that you’re talking about embarrassing code. Everyone writes it, most of them see it, few take the time to improve it ;)
Soleone
on 01 Jul 10@Ben S It’s from the Git Textmate bundle (by default the menu opens with CTRL+Shift+G) . I use it all the time, so handy.
gmile
on 01 Jul 10Offtop: the font is pretty darn good! What is it?
Andrew McKinney
on 01 Jul 10My 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 10Letting other people see your sourcecode sometimes feels like letting people see you naked
Richard
on 02 Jul 10This 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
on 02 Jul 10I actually find it easier to write messy code in Java ;)
Pies
on 02 Jul 10Most 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 10It is clear from this code that companies love firm people.
:-)
Tom G
on 02 Jul 10Huh, 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 10I’d love to see some of your well-written Ruby code … mainly from controllers.
Erich Timkar
on 03 Jul 10Well written controller code is boring code.
RF
on 07 Jul 10Jamis’s 5-year-old “end” is the cleanest part. :)
This discussion is closed.