Live data from Hacker News

Your code may be elegant, but mine works

omniti.com

41–50 of 174 posts

Re: Your code may be elegant, but mine works

#41
post #36

... and as expected, it's always the manager, not coding types that state this so aggressively. I know the servers are beefy at OmniTI, so I suspect there might be a code problem related to handling the load. If I see sloppy code, or have to write sloppy code, I move to another company, and will continue to do so. So how's that employee turnover rate (hint, use the internet archive and check the about us page)?

I am a coder type, and I mostly support the sentiment. Over the years, I gradually drifted from doing things the Right Way to doing things that are good enough. Doing things elegantly in practice unfortunately adds zero flexibility for non-trivial changes in business direction: you simply can't foresee everything. One swift decision at mid-management level and your elegant framework suddenly becomes an unwieldy Titan…

So the key is making the right call for the situation, which brings me back to the point, managers are not the ones maintaining the code.

Re: Your code may be elegant, but mine works

#42
This article reads like its written by someone trying to extrapolate some specific experiences of conflict on teams he worked into a general rule.

I would recommend keeping an open mind and looking for programmers to work with that are able to teach you and that you collaborate well with.

If you find yourself being self-righteous too often when coming home from the job (or on the job) its time to find new folks to work with.

Re: Your code may be elegant, but mine works

#43

My code might not be that elegant, but it's maintainable . I've followed "hey, it works" developers who knocked out functionality quickly. Their by-product was Lovecraftian code.

Yeah, the code may work, but making changes to it may make me want to shoot myself.

I work with the same types of devs, and modifying/extending their code could lead one to alcoholism. Seriously. No joke.

I have quite honestly considered changing teams, just to get away from a code base that may "work", but induces nightmares.

Re: Your code may be elegant, but mine works

#46
I think the real sentiment is "sometimes you just have to get things done" (which I agree with) but I have a few issues. I tried to bake them in to something which wasn't a bullet-point list, but perhaps this is just how my brain works...

1) Over-engineering is a separate discussion to elegance, let's not mix them. 2) You can be both on-time and elegant - it's not one or the other, like the title implies. 3) Often, if that fails, the deadline can be moved without any real consequence. 4) Consistent failure to be elegant "because deadlines" is probably going to make later deadlines harder to meet - it seems like a bad cycle to start.

Re: Your code may be elegant, but mine works

#47
I'm honestly sorry I gave that a pageview.

It's an article chock full of caveats (Best practices vary wildly across the board, except for the ones any decent programmer obviously knows.), straw-men (Someone spending a week to implement caching on a 20-row table probably wasn't crafting elegant code anyway.), and contrived anecdotal examples (Christmas apps must be out by Christmas. My God, what a breakthrough. Most projects are not nearly this straightforward.).

Re: Your code may be elegant, but mine works

#48
post #6

> If the client needs a Christmas promotion, and you > deliver the best product in the history of promotions -- > on December 29th -- it's worthless. Isn't the point to set a deadline that allows the product to be built to a certain standard of quality? If you only ever have time to write untested copy-paste "code that fucking works" then you don't have a problem with your development approach ... unless you're convi…

Just reminded me of a story about the designer Peter Saville (from the film 24 Hour Party People) Tony Wilson: "You've got the posters? It's the fucking gig!" Peter Saville: "Yeah, I know - it just took ages to get the right yellow." Tony Wilson: "The gig's over." Peter Saville: "I know." Tony Wilson: "It looks fucking great actually - yeah, really nice. It's beautiful - but useless. And as William Morris once said:…

Oscar Wilde: "All art is quite useless"

Therefore, no art is truly beautiful?

Re: Your code may be elegant, but mine works

#50
I hear these arguments all the time, fundamentally though as the author states, using best practices should get your code out the door quicker.

If best practices make your code take longer to develop then one has to question whether they are best practices at all.

Post reply on HN