News for hackers. Stuff that matters.
Re:A conjecture about code reviews by debacle on Tuesday September 25, 2012 @04:46PM (#4572569)
I can write you code that will pass all static analysis tests with full code coverage and complete dependency injection that still makes you taste your lunch in the back of your throat. I think any good programmer could.

> forgetting that the reviewer just skimmed it over to get it out of their queue.

There's a difference between cargo cult code reviews and an actual, formal code review.

Re:A conjecture about code reviews by lawnchair_larry on Tuesday September 25, 2012 @10:23PM (#4573914)
There is a ~9 year old buffer overflow vulnerability in sendmail (crackaddr) that no static analyzer can identify even today (and they are specifically targeting it as a test case).
Re:A conjecture about code reviews by ecopoesis on Tuesday September 25, 2012 @05:36PM (#4572803)
And what exactly is wrong with the code that passes all the tests and works? Its aesthetics offend you? Should the first priority of code be to work to just work?

Beauty is only a nice-to-have feature. If the pretty way is about as fast to produce as the "lunch in the back of your throat" model, sure lets go pretty. But if it's going to cost me 50% of my developer's time, I'll take the quick and dirty every time.

Re:A conjecture about code reviews by philwelch on Tuesday September 25, 2012 @06:26PM (#4573036)
It's not so much about "beauty", but long-term maintainability of code makes development faster in the long run and reduces the murder rate within your dev team.
Re:A conjecture about code reviews by senko on Tuesday September 25, 2012 @06:41PM (#4573104)
The wrong part here is in "passes all the tests and works" assumption. In my experience, static analysis, unit tests and reviews all help minimize errors (amongst their other benefits), ideally you'd make use of all three.
Re:A conjecture about code reviews by debacle on Tuesday September 25, 2012 @08:44PM (#4573619)
You can write unmaintainable code that is still testable and passes static analysis tests.
Re:A conjecture about code reviews by lwat on Tuesday September 25, 2012 @07:08PM (#4573240)
> I'll take the quick and dirty every time.

This is gonna start biting you in the ass after a few years.