Linked by Thom Holwerda on Wed 26th Sep 2012 23:25 UTC, submitted by MOS6510
General Development "Having read this, one realization is that better code often means less code. I don't think about lines of code exactly, or something similarly stupid, but in terms of meaningful code. However, argument for less code isn't about making code as compact as possible, avoid redundancy, etc. The argument is about not writing code at all whenever reasonable or possible. Should we focus on deciding what should and what should not built instead of polishing our software development craft then? Yes and no. Yeah, I know. Exactly the kind of answer you expected, isn’t it? Anyway, you can't answer this question meaningfully without a context."
Thread beginning with comment 536662
To read all comments associated with this story, please click here.
The Best Code
by Alfman on Thu 27th Sep 2012 14:32 UTC
Alfman
Member since:
2011-01-28

...is a futile metric. Sure there's good code and bad code, but it draws focus away from the solution itself and nit-picks at the implementation. Often times the developers are hired/contracted to implement totally asinine solutions for any given problem. The best code in the world isn't going to be appreciated by the users if the solution doesn't work for them.

Who is good code important to? It's important to us as developers. But in my experience users & clients don't care, at least as long as the developer is able to manage the mess (which isn't always a given).

A specific example I'm fighting with alot these days is OSCommerce. Unfortunately, the code is very poorly written. It is dependent upon php's notoriously problematic "magic quotes" feature. It supports a kind of plugin, but these lack modularity therefore each plugin needs to patch the base source code. Source patches often overlap with one another and our own customisations such that adding new plugins is error prone and not straightforward. These source patches are inherently version specific. Each adjustment we must make locally puts the code base that much further from the mainline. Software updates are non-trivial, which is a major problem due to OSC vulnerabilities. Also, there is tremendous functional overlap between include files of the website and administration panel, resulting in twice the maintenance burden.


So I hate OScommerce code, but it happens to be included at most hosting providers, and because of that many users will try it out and consider it a good base solution for their website without having looked at the code.

Edit: My conclusion is that both solution and the code are important, but they are important to different people.

Edited 2012-09-27 14:34 UTC

Reply Score: 2

RE: The Best Code
by emrehliug on Sat 29th Sep 2012 00:57 in reply to "The Best Code"
emrehliug Member since:
2009-12-27

...is a futile metric. Sure there's good code and bad code, but it draws focus away from the solution itself and nit-picks at the implementation. Often times the developers are hired/contracted to implement totally asinine solutions for any given problem. The best code in the world isn't going to be appreciated by the users if the solution doesn't work for them.

Who is good code important to? It's important to us as developers. But in my experience users & clients don't care, at least as long as the developer is able to manage the mess (which isn't always a given).


Agreed. In my experience, good code is code that gets the job done. If there is interest, money, and time enough to attempt to reach the other milestones - readability, maintainability, simplicity, speed, etc. - then I'm certain that good code can become better, maybe best. But users, clients, or managers, might not even notice that because they - more than often - don't care about those things we, as developers, care.

Reply Parent Score: 2

RE[2]: The Best Code
by ilovebeer on Sun 30th Sep 2012 17:48 in reply to "RE: The Best Code"
ilovebeer Member since:
2011-08-08

Agreed. In my experience, good code is code that gets the job done.

I would only add to that reliability. If the code does it's intended tasks reliably, it's good code. Anything beyond that is simply a matter of opinion.

Reply Parent Score: 2