views:

173

answers:

12

Possible Duplicate:
What programming basics should I learn?

What rules / guidelines / ideas / concepts are so fundamental, that everyone who programs should know them and therefore learn right from the start? I'm looking for things that are independent of language, system and platform.

Looking forward to inspirational answers :)

UPDATE: Many great answers so far! - now I'm wondering if there are more high-level ideas (e.g. "find the best tool for the problem at hand" or "break problems into smaller sub-problems").

PS: The reason for the post is finding the essentials for a programming tutorial series I'm planning.

+1  A: 

Have you seen this StackOverflow question: What should a developer know before building a public web site?

Cimm
great hint, thanks :)
stephanos
A: 

Variables and conditional statements (loops and if statements) are the absolute basics.

jmoreno
A: 
  • Control structures
  • Data structures
  • Design of algorithms

etc, etc, etc...

eKek0
+2  A: 

Learn Algorithms (recusrion, backtracking, data structure, how to use for and while loops,..etc) ..

M.H
Meh, while this can be useful, I would say that many algorithms (sorting, and data structures) are already implemented in common library functions. I learned all my sorting methods in university, But I'll never have to write a sorting function in real life. It's a solved problem.
Kibbee
it is a bad idea to be a "coding machine" without knowing what really happening!.Do you think they taught you that in the university without a reason?
M.H
I think doing the work yourself before using stock functions is important. I mean, there are times you need to know what implementation to pick. For example, quicksort is not deterministic, there are times (rare granted), that this can actually matter. You won't know that by just using the default sort function in a language
Steve Sheldon
A: 

Keep your code in source control and make sure your source control is backed up. I've written a lot of cool code over the years, and I've lost a lot of code. I really wish I had every piece of code I've ever written.

Kibbee
+1  A: 

Databases, certainly. Virtually every enterprise applicaiton stores data there. Get one of the free SQL databases and just play around learning SQL.

Cylon Cat
Quite true. I find they ignore databases way too much in university. They are probably some thing that most developers use every day, and yet when I went to school (graduated only 5 years ago), there was only 1 course that was on databases, and I don't think it came close to covering what we needed.
Kibbee
+4  A: 

Hey Stephanos, I think what you are looking for is an answer that fits in a box but honestly, thats a lot to ask in this instance... What you sound like you need is a computer science curriculum. Are you looking to do this for fun or as a professional? If you are looking to work professionally in software I really recommend going to college and actually getting the degree. I personally believe it's paramount in this field.

If I had to suggest some things, here is where I would start.

  1. Basic Multi-Base mathematics.. know how to do addition/subtraction/multiply/devision in binary. Learn how to convert numbers between bases

  2. Read about logic circuits, understand them fundamentally from the logic gates up, from simple logic gates (and/or) all the way up at least to flip flops

  3. Read about how processors work, what registers are, how memory works, how devices are communicated with, what it means to be a 32 bit or 64 bit cpu

  4. Learn assembly... but not yet

  5. Learn a low level language like c ... but not yet

  6. Start with a language like c# or java, at first don't think about what object orientation is, it's a little too soon, in this language at this time focus on

  7. Start learning to work with variables, then with various statements, next get into branch statements like if, else, switch.

  8. Cover enums or enumerations and the role they play in readible code, while on readible code, study conventions like commenting well

  9. Start working on iteration, study for loops, while statements and general design patterns when using these

  10. Start learning to write functions, really focus and understand well how paramater passing works and the various ways in which parameters can be passed (in, out or in out).

  11. Study good procedural practice, like single entry, single exit code blocks, revisit how to write clean code using functions to avoid repetition./

  12. Spend some time understanding how to use recursive functions.

  13. Write a lot of projects in this language of choice at this level, then personally next I would probably look at something like the c language.

    In c, focus on how ptrs work, how memory allocation works and how to write code that is meticulous when it comes to memory management, this kind of level is hidden from you in a higher language like c# or java. Now when you need to understand garbage collection, you will have a clue what it's talking about.

  14. Now look at data structures and algorithms, learn to write these for yourself, there are many books in this area but they usually focus on various sorting techniques from basic selection sorts to quick sorts. You will also want to learn how to write linked lists, trees and hash tables in their various forms. Do this in c so you understand the pointers and the memory management.

  15. Now maybe a touch of assembly just to tie together a lot of concepts

  16. Maybe start looking at object orientation

  17. Start getting comfortable with working with multiple threads

  18. Study relational databases, normalization and just get really comfortable with creating them, indexing them, querying them etc

  19. Spend some time learning about test driven development, personally I think its a great paradigm

  20. Somewhere way down the road, start learning how some platforms you are interested in programming work. There are many, some for web apps, some for writing desktop applications, mobile applications and probably everything in between.

Anyway, this isn't comprehensive, its a starting point that will lead to many tangents, I left out areas like how to write artificial intelligence or neural networks or anything specific like that but computer science really is a lifetime of learning.

Steve Sheldon
A: 

I'd say if you can master reading comprehension, critical thinking, and Google Search, you're well on your way to coding just about anything. That's about as fundamental as it gets.

Isaac Truett
A: 
  • Naming your functions and variables intelligently.

  • Writing clear comments

Christian
A: 

Read "The Pragmatic Programmer" and worship your new bible.

Terje
A: 

Read McConnell's Code Complete.

CesarGon
A: 

Data structures, algorithms. Many of these are available as libraries/modules in many programming languages. But knowing what every DS is, and what every algorithm, its time/space complexities, etc should help a programmer. Besides, if they learn to build algorithms to solve unsolved problems, they might achieve something Google scale.

vpit3833