Re: What makes a good coder-what is the secret of programming ?
I met a few very good programmers that are a mess. They have fun in their code, they use useless variable names, etc, etc, etc.... Maybe because they are bored.
But what makes a good programmer a good programmer, #1 command of language, be able to write the code on the board, in the text editor, on the bench, and recognize what will work and what will not work. #2 performance, and optimization, knowledge of data structures, and internals. I remember a story where my friend from MS told me one of the MS clients declared bunch of objects in C# utilizing 20GB of memory. If you don't understand what your program does under the hood, you should start wondering, and once you understand that, you will be better programmer.
Now for those dealing with C/C++ - OS environment, Data Structures, Algorithms, Optimizations, Compilers, etc etc etc...
Re: What makes a good coder-what is the secret of programming ?
Quote:
Originally Posted by
Oliver Scantlebury
Also, never write a procedure, function or subroutine where the source won't fit on an eight-by-eleven sheet of paper.
Quote:
Originally Posted by
ofnuts
Who prints source code these days?
An alternative to physical printing might be to fit the function/subroutine/snippet on the screen without the need for scrolling or adjusting the font size.
Re: What makes a good coder-what is the secret of programming ?
Quote:
Originally Posted by
lisati
An alternative to physical printing might be to fit the function/subroutine/snippet on the screen without the need for scrolling or adjusting the font size.
All style checkers can check for a maximum line count in functions.
Re: What makes a good coder-what is the secret of programming ?
Quote:
Originally Posted by
hoboy
Sorry to bother you guys with this question.
What did you do to learn coding ?
is coding different from problem solving ?
how did you learn to be details focus witch is necesary for programming ?
what was your approche when learning programming ?
When you have learned some OO,and the syntax of a language you want to progamm in what did you do to be good at it ?
The question really is what is the secret of programming ?
What did I do to learn coding? - Read books, tutorials, etc. - ask questions, lots of questions; also program the same things over and over to learn the structure, code, and to remember how to solve certain problems e.g. collision detection (while this isn't one I know how to do, I know if I were to write the code a few times I'd learn it and memorize it).
I program to solve problems - e.g. I made programs to organize data, make my own windows in python and pygame, and to make programs which help me stay focused on tasks and such.
Detail focused? I'll read programs I've made before and have no clue what I was doing with the program, so I'm learning to comment better so if I re-read the code I'm like oh yeah that's what that does.
My approach was, dive right in, try a few simple programs, work up to the complex stuff.
Best approach for OO programming is when is extensibility more usable? E.g. with the windows in pygame, did I want to script all of those again or just make a class and be able to quickly create those objects over and over for varies use. Why write a script once when you need to reuse it? Here's an example:
Code:
...
stk_win1 = STKWindow(screen, 1, 25, 25, 200, 200, (MAXIMIZE, MINIMIZE, CLOSE))
stk_win2 = STKWindow(screen, 2, 30, 30, 500, 500, (CLOSE))
...
Secret to programming? Keep at it, don't just say I don't get it and give up; keep trying and if you have problems ask, we're here to help =D. The secret with me is to keep trying and pushing and you'll make wonderful things.
Re: What makes a good coder-what is the secret of programming ?
Re: What makes a good coder-what is the secret of programming ?
Quote:
Originally Posted by
hoboy
Sorry to bother you guys with this question.
What did you do to learn coding ?
Wrote programs and memorized algorithms.
Quote:
Originally Posted by
hoboy
is coding different from problem solving ?
Problem solving solves the problem once. Programming creates a solution to solve the same problem many times.
Quote:
Originally Posted by
hoboy
how did you learn to be details focus witch is necesary for programming ?
Focus comes with practice.
Quote:
Originally Posted by
hoboy
what was your approche when learning programming ?
Three simple steps:
- Practice
- Practice
- Practice
Quote:
Originally Posted by
hoboy
When you have learned some OO,and the syntax of a language you want to progamm in what did you do to be good at it ?
Three simple steps:
- Practice
- Practice
- Practice
Quote:
Originally Posted by
hoboy
The question really is what is the secret of programming ?
Three simple steps:
- Practice
- Practice
- Practice
Re: What makes a good coder-what is the secret of programming ?
I don't know if I'm a "good" coder since I'm largely self-taught. Nevertheless there are two principles that I have found important over the years:
1) Include clear comments
Go back and look at something you wrote a few years ago. Can you understand what the program is doing every step of the way? Do the comments you included help?
2) Anticipate the behavior of users
Most of what I write are PHP applications designed for dynamic websites with usually both a publicly-visible part and an administrative part. Usually both of these include forms. I make sure to include code to handle likely user mistakes like empty required fields, and I check the validity of user input. Over the years I've written some helpful functions for these tasks. For instance I have a routine to check the validity of e-mail addresses. I not only check that it conforms to the user@domain standard, but I also make sure that the domain has a valid MX or A DNS record as well.
Re: What makes a good coder-what is the secret of programming ?
I recommend reading (at least select chapters from) Code Complete 2 by Steve McConnell, ISBN 0735619670.
Re: What makes a good coder-what is the secret of programming ?
Like many have stated above, you become good by coding. A lot. And then coding some more. Programming is very much like a human language - the purpose is to express ideas in a clear and nuanced way, and the only way to acquire fluency is through immersion.
I think a very important step in good programming is being able to state the problem clearly before you write a single line of code. If you start coding in general, your purpose will meander all over the place and the code will make no sense in the end. No amount of comments will clarify code that is itself pointless.
You have to be willing to completely scrap a module and start over.
Also, realizing that data is meaningless unless it's in the right format. If information is in a form that is incomprehensible, it does not exist. I'm a physicist, so most programs I write are simulation or data analysis scripts. Sometimes this involves millions of data points and gigabytes of data. It would be impossible to sort though all of that data if it were disorganized. The same applies to internal communication - modules should spend a minimal amount of effort comprehending outputs of other modules.
Also, "import this" :D.