I'm not a poet, but I can appreciate some poetry. I've been thinking about how people appreciate beauty in all forms, but for programming I don't think there is much you can do to be a good programmer.

What is really beautiful (as in any language) are the concepts expressed through the language - so perhaps you'd find something like a haiku in a mathematician's code for HPC programs. But in most programming tasks, there's really nothing beautiful. It's boring stuff like setup this box here, setup this checkbox there, link that to that, make sure input is tolerable... so what makes a good programmer? Is it the whitespace?

Attention to details, being able understand the system you are working in, understanding the impact to the system when you make changes, understanding the scope of your work, being able to debug, understanding how to design a feature, being able to conform to a coding standard/style for the current code you are working in, being able to work with others.

You list sounds like how a fresh out or college student would look at a homework assignment or a response from someone that has nothing invested or pride in the work they are doing.

I think there are two sides to your question.Content vs Style. It seems like you're really asking about what makes someones style unique & "good".A "good programmer" in my book would be someone who covers both.

Good Progammer:Uses elegant design. Simple over complex where possible. (no over-engineering)Uses readable code. Commented. team code style compliant. Good variable names - don't be schmuck and use short/dumb abbreviations. It's 2013.Tests their own code. I know several knowledgeable programmers who do not test their own work. Knowledgeable programmers who do not test their own work still = bugs.Unit tests their own code. All logic should be code covered by unit tests.A doer not a talker. Thinks "big picture". time zones. globalization. performance. scalability.I like to think that programmers can be "good" without having all the knowledge - as long as they understand not to change / design what they don't understand. IE - gain the knowledge when necessary - always learning.

I'd rate myself a 6/7 on scale of 10 for content/knowledge... and a 9.5 out of 10 for style.

Writes readable a reusable code, uses design patterns where applicable, comments appropriately, unit tests appropriately, understands their languages' weaknesses and strengths, recognizes their own weaknesses and strengths, works well alone and with others, admits to and fixes their own mistakes. The last one especially. I cannot tell you how frustrating it is fixing someone else's work when you flat out ask them to their face " DID YOU X THIS Y?" and get lied to, only to find out with certainly they did. I'm human, and I'm not even a great programmer. Own your mistakes so that the project and other people don't suffer because of your ego.

I think you are missing that in every programming puzzle there are many solutions. A good programmer implements a truly beautiful solution that is concise and simple enough for other programmers to not only understand easily but see clearly that it covers all possible corner cases and is obviously correct.

There are very few of these works of art out there, but they sure make you feel humble when you stumble across one in someone else's code.

A bad programmer implements a tangled web of complexity that other programmers can smell the stench of bugs in just a single glance. It's probably 10x-100x the number of lines of code and requires note taking to keep the context whilst trying to work through the simplest cases including many dead ends that make you go WTF!

Unfortunately there are many of these heaps of excrement out there, and they sap your soul when you have to work with them.

There is a ton that you can do to be a good programmer. Generally don't be an a**hat or make everyone else's job harder. For instance, comment what you write and write actual documentation that is useful.

In a broader sense, being good is all about attention to detail and understanding how things work. It's the little things that matter, like checking input and error handling, and it's the little details that really set products apart. Unfortunately, the details are also tedious, but the results are amazing when everything is taken as a whole. Understanding how things work means explaining the design decisions and how the decisions cascade down through the stack. Like why using pointers is preferable to just passing a variable, or why passing a pointer is a bad idea and the extra few CPU cycles should be spent on the memory store.

To find beauty in programming, you really need to distill it down it's base math and mechanics. There is a lot of other stuff that goes into building a program, like checking input and building GUIs (if you go that route), and that stuff is necessary for a program, but it's not the cool stuff. The cool stuff is the algorithms and how, as well as why, they run, or don't run, efficiently, or tuning code to minimize wasteful calls. The fun stuff is the low level stuff, which your not going to get to do if you're just starting out.

The programming language also helps. C/C++ will let people manipulate pretty much everything. Something like Python or Ruby are more about productivity since the point is to abstract a lot of the work and let the programmer concentrate on getting the job done.

What make a good programmer is not the 'white spaces' but the transformation of idea/concept into code (the quality of that code is another thing).

Sometime people discover amazing concepts that only a computer can interpret and feed the result back to us.Human appreciate visual & audio stimulation, but their is also beauty in pure logical or mathematical algorithm and how they are expressed.Example making a fast version of anything usually require skillshttp://badassjs.com/post/1298940200/stackblur

One one particular project, ID was looking to outsource programming of parts of a game. So they got a quote, which basically said that a team of programmers would do it in 30 days. Carmack says **** that -- too long, and does the entire thing himself in 3 days.

I'm not a poet, but I can appreciate some poetry. I've been thinking about how people appreciate beauty in all forms, but for programming I don't think there is much you can do to be a good programmer.

What is really beautiful (as in any language) are the concepts expressed through the language - so perhaps you'd find something like a haiku in a mathematician's code for HPC programs. But in most programming tasks, there's really nothing beautiful. It's boring stuff like setup this box here, setup this checkbox there, link that to that, make sure input is tolerable... so what makes a good programmer? Is it the whitespace?

There is no "beauty" in programming (certainly no "timeless" beauty which can still be appreciated by many people not related to programming even after a few centuries)... As for being a "good programmer" it all comes down to being able to finish your assigned tasks during the assigned time period, that is all

My subscription allows you people to exist on this site and makes me a better human being than you'll ever be

I'm not a poet, but I can appreciate some poetry. I've been thinking about how people appreciate beauty in all forms, but for programming I don't think there is much you can do to be a good programmer.

What is really beautiful (as in any language) are the concepts expressed through the language - so perhaps you'd find something like a haiku in a mathematician's code for HPC programs. But in most programming tasks, there's really nothing beautiful. It's boring stuff like setup this box here, setup this checkbox there, link that to that, make sure input is tolerable... so what makes a good programmer? Is it the whitespace?

There is no "beauty" in programming (certainly no "timeless" beauty which can still be appreciated by many people not related to programming even after a few centuries)... As for being a "good programmer" it all comes down to being able to finish your assigned tasks during the assigned time period, that is all

Au contraire. The ones who just finish their assigned tasks are generally lesser beings. A real monster will write elegant code that often is a small fraction of the size of what your "good programmer" who does their tasks in the framework you have placed them in will produce.

There is no "beauty" in programming (certainly no "timeless" beauty which can still be appreciated by many people not related to programming even after a few centuries)... As for being a "good programmer" it all comes down to being able to finish your assigned tasks during the assigned time period, that is all

I know you're joking. But that is the exact type of answer that would immediately rule a person out if I were interviewing them.

The beauty of good code may not be obvious to someone outside of the trade, but anyone of ordinary skill in the art can tell instantly whether the coder was within their depth, or not. Simple, elegant solutions will show evidence of an organized problem-solving process that gets the job done and makes adequate provisions for the future.

My college-level experience with software coding resulted in enough bowls of spaghetti to open an Italian restaurant, upon which I concluded that I am not a good programmer. So, I abandoned the task to more able hands than mine. But I did end up doing some of my work in an engineering field that has similar characteristics -- analog control systems -- and the same principles apply. A well designed system has a beauty that greatly surpasses a convoluted "good enough, it works" approach.

in addition to what has already been said, a good developer will produce solutions with a focus on usability. There is a big difference between a program that 'does the job' or solves a problem, and a program that is intuitive, easy to use and elegant.

A lot of programmers have tunnel vision and can only see 'it works for me'

1. Take the time and effort to understand the problem to be solved before making key architectural decisions or writing substantial amounts of code. This includes understanding the performance requirements of the application, and any constraints of the platform (hardware and software) being used. Occasionally, you may need to do a substantial amount of up-front prototyping to achieve a reasonable level of understanding; but you and your management both need to acknowledge that the prototype code may need to be thrown away, and allow for that in the schedule.

2. Structure the code such that it reflects the structure of the problem being solved, and factor the code to make it modular and maintainable.

3. Refrain from using tricky or clever constructs which hurt the readability/maintainability of the code, just for the sake of being tricky or clever. OTOH if there are good reasons (significantly better performance, resource usage, etc.), then by all means go for it; but carefully document your work so that others can maintain it if you get hit by a bus tomorrow.

I would say that a good programmer writes good code, and good code is:

1. Functional2. Easily Understood

As others have pointed out, there are language mechanics, hardware, and other factors to consider, but obviously, it has to work.

The second feature of good code can really apply to any language, but it is important to code because the "final" product is rarely the final revision. If it is to be reused or maintained at all, someone else must be able to understand it and potentially modify it.

1. Take the time and effort to understand the problem to be solved before making key architectural decisions or writing substantial amounts of code. This includes understanding the performance requirements of the application, and any constraints of the platform (hardware and software) being used. Occasionally, you may need to do a substantial amount of up-front prototyping to achieve a reasonable level of understanding; but you and your management both need to acknowledge that the prototype code may need to be thrown away, and allow for that in the schedule.

Working in an industry where all of my main heavy-duty applications are custom code created by gov't employees, I find that #1 never gets the respect it deserves. Several (extra, from the POV of the Project Manager) months spent in the "just exactly what are we trying to solve" phase would eliminate years of bug fixes, belated function additions, undocumented error codes, and catastrophic UI decisions made in a week because they had to meet a target date.

At least the next abortion I need to deal with is written in .NET and SQL 2008 R2 instead of the atavistic need to keep compatibility and try it in Access yet again. It still sucks, it's still harder to use than the original Access lash-up, and it's designed to "reduce paper". That never works.

If the Earth were flat, cats would have pushed everything off of it by now.

I'm still waiting for that "paperless office" we were all promised back in the 1980s. IMO computer tech is still, on balance, more of a paper generator than a paper saver. Clicking the "Print" button is just too easy, and you have a lot of people who believe that *their* PowerPoint is important enough that everyone at the meeting will surely want their very own hardcopy.

And then you've got the utter insanity of printing out a document so you can sign the paper copy, scan it back into the computer, and e-mail it somewhere.

At least my co-workers don't print out all of their e-mails any more...

And then you've got the utter insanity of printing out a document so you can sign the paper copy, scan it back into the computer, and e-mail it somewhere.

Until earlier this month my bi-weekly time sheets and expense reports REQUIRED a physical signature because HR believed that an e-signature would not stand a legal test against the language on the forms about accuracy, perjury, misrepresentaion and all of that bit.

If the Earth were flat, cats would have pushed everything off of it by now.

1. Take the time and effort to understand the problem to be solved before making key architectural decisions or writing substantial amounts of code. This includes understanding the performance requirements of the application, and any constraints of the platform (hardware and software) being used. Occasionally, you may need to do a substantial amount of up-front prototyping to achieve a reasonable level of understanding; but you and your management both need to acknowledge that the prototype code may need to be thrown away, and allow for that in the schedule.

2. Structure the code such that it reflects the structure of the problem being solved, and factor the code to make it modular and maintainable.

3. Refrain from using tricky or clever constructs which hurt the readability/maintainability of the code, just for the sake of being tricky or clever. OTOH if there are good reasons (significantly better performance, resource usage, etc.), then by all means go for it; but carefully document your work so that others can maintain it if you get hit by a bus tomorrow.

I have been working as a programmer for the past 6 months. Mainly debugging, implementing new features, changing app functionality. While everyone can conform to general rules each programmer's style is different and nothing can be done about it. I have colleagues with more than 10 years experience and they complain about each other's style because each problem has multiple solutions and every individual is bound to arrive to the solution differently.

Personally I strive to adhere to the following:* Ensure that previously fixed issue never comes back to me.* Spend hours analyzing old code (not mine) before starting working on a resolution.* Attempt to not introduce new bug(s) while fixing current one(s).* Take time to attempt to find more unknown bugs and fix them. It bodes well with management and results in fewer issues reported by customers which leaves good impression.

I do not agree with the thesis that code has to be "maintainable", without "tricky" or "clever" constructs. It does not mean anything useful to me. It sounds like programmer designed the app for the programmer and not the end-user. Always think how your work will impact customer and their business because in the end their success is your success.

Ahhh, this is actually a tricky question because the correct answer is who you are asking the question to. An end user (which makes up 99+% of computer users) doesn't care how it was coded just that it works and looks how they expect it to. They really could care less if it is code that is poorly commented, dirty hacks, etc. If you ask a coder, they will compare the code to what they think is ideal. This is where the war begins. Many coders don't give a crap about the actual end user of the code.

Personally I strive to adhere to the following:* Ensure that previously fixed issue never comes back to me.* Spend hours analyzing old code (not mine) before starting working on a resolution.* Attempt to not introduce new bug(s) while fixing current one(s).* Take time to attempt to find more unknown bugs and fix them. It bodes well with management and results in fewer issues reported by customers which leaves good impression.

These are good "low level" goals. With experience, you'll also get a better feel for (and develop stronger opinions on) the higher level concepts as well.

michael_d wrote:

I do not agree with the thesis that code has to be "maintainable", without "tricky" or "clever" constructs. It does not mean anything useful to me. It sounds like programmer designed the app for the programmer and not the end-user. Always think how your work will impact customer and their business because in the end their success is your success.

Go back and read what I wrote before. I didn't say programmers shouldn't be tricky or clever; I said it shouldn't be done unless there's a good reason. If there's a straightforward way to do it that doesn't noticeably compromise performance or resource usage, then that method should be preferred over a "tricky" method.

Obfuscating the design of a non-performance-critical application just to improve performance by an insignificant amount isn't good programming; it misses the big picture. Someone else may be maintaining your code in the future; by avoiding unnecessarily tricky/clever constructs, you're making that person's job easier. By making that person's job easier, you're reducing the cost of maintaining the software, and reducing the odds that future modifications (or a port to a different OS, or a different platform...) will introduce new (and possibly subtle) bugs.

If anything, writing tricky code just for the sake of writing tricky code is the ultimate case of "coding for the programmer". End users don't even see it. It is basically a way of gratuitously tooting your own horn -- essentially, it says to other programmers who read your code in the future "Look at me! Look at how f**king clever I was!"

I will take modular, well-documented code with a well-thought out overall design over "clever" code any day.

Obfuscating the design of a non-performance-critical application just to improve performance by an insignificant amount isn't good programming; it misses the big picture. Someone else may be maintaining your code in the future; by avoiding unnecessarily tricky/clever constructs, you're making that person's job easier. By making that person's job easier, you're reducing the cost of maintaining the software, and reducing the odds that future modifications (or a port to a different OS, or a different platform...) will introduce new (and possibly subtle) bugs.

If I have to choose someone to program with, I'd want someone like you. I've met way too many speed freaks who will spend hours gaining 0.5% efficiency in a snippet that might get used a couple times a month and only lasts a few milliseconds anyway. Speed freaking is the most unhealthy thing a programmer can get into.

I'm not a poet, but I can appreciate some poetry. I've been thinking about how people appreciate beauty in all forms, but for programming I don't think there is much you can do to be a good programmer.

What is really beautiful (as in any language) are the concepts expressed through the language - so perhaps you'd find something like a haiku in a mathematician's code for HPC programs. But in most programming tasks, there's really nothing beautiful. It's boring stuff like setup this box here, setup this checkbox there, link that to that, make sure input is tolerable... so what makes a good programmer? Is it the whitespace?

In a human language, we say someone is 'good' at it when they can eloquently get their message across in as few words as possible and in a way that everyone can understand. The same goes for a computer language: a programmer's algorithms should be efficient and understandable.

Obfuscating the design of a non-performance-critical application just to improve performance by an insignificant amount isn't good programming; it misses the big picture. Someone else may be maintaining your code in the future; by avoiding unnecessarily tricky/clever constructs, you're making that person's job easier. By making that person's job easier, you're reducing the cost of maintaining the software, and reducing the odds that future modifications (or a port to a different OS, or a different platform...) will introduce new (and possibly subtle) bugs.

If I have to choose someone to program with, I'd want someone like you. I've met way too many speed freaks who will spend hours gaining 0.5% efficiency in a snippet that might get used a couple times a month and only lasts a few milliseconds anyway. Speed freaking is the most unhealthy thing a programmer can get into.

Years ago I was on a project where one developer pushed and got management approval to implement pooled reusable database connections from the app. He ran some benchmarks showing the connect speed improved from 0.1s to 0.01s and management loved it.

I found several bugs in his code (which admittedly he did address) whilst looking at why some of the queries took 15 minutes, put some proper indices in and had them running in sub 15-seconds. I was branded a trouble maker for complaining about the extra complexity of his code which improved things from 15.1s to 15.01s.