Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Code For Computers or for People? [closed]

Ultimately, code compiles down (eventually) into instructions for a CPU. Code, however, (in my humble opinion) is for human beings to read, update, and interact with. This leads me to the following observation:

Code that is unreadable by other engineers, even if it's functional, is bad code.

With that in mind, what can this programmer do to make code more easily read by humans?

  • Naming Conventions? (Joel has a fair amount to say on that one)

  • Code Structure/Layout? (please, for the love of god, don't get into the { placement debate)

  • Phrasing? (Is it possible to write code that looks more like the English language)

Are there good articles out there beyond Joel's.

like image 359
haseman Avatar asked Feb 07 '09 00:02

haseman


People also ask

Is coding not for everyone?

Coding Is Not for Everyone While anyone can learn how to write code, that's not the same as enjoying a long career doing something you feel like you were made for. It's entirely possible to be a talented developer and still not find a perfect fit.

What code is used for computers?

Binary code comprises a series of zeros and ones, used to communicate instructions. This code is a low-level programming language. Each digit in a coded sequence connects to a switch in your computer.

Will computers be able to code?

Can Now Write Its Own Computer Code. That's Good News for Humans. A new technology called Codex generates programs in 12 coding languages and even translates between them.


2 Answers

Yes.

If the computer doesn't run it, it's broken. If people can't read it, it will be broken. Soon.

like image 197
Charlie Martin Avatar answered Nov 23 '22 01:11

Charlie Martin


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” -- Martin Fowler, "Refactoring: Improving the Design of Existing Code"

But since you've already reached that conclusion on your own, suffice to say that this is a huge topic. It's not something you'll be able to get a single answer on. Making your code maintainable is not limited to coding style, but also involves your overall design as well as your construction process. Here's some tags on this site where pretty much all the questions and answers will impinge on this topic:

  • coding-style
  • best-practices
  • refactoring
like image 45
Adam Bellaire Avatar answered Nov 23 '22 01:11

Adam Bellaire