Search this blog

23 June, 2008

Begin here

Often, people ask me how to begin programming. Or doing 3d effects. Or how to write elegant C code, how to develop an aestethic. Those questions are really hard to me. I can point you to some great books on C++ programming. Or on programming in general, but nothing for beginners.

How did I? Well I started poking characters on the screen of a commodore 64. Then I learned about the 16th dos interrupt
and the VGA memory starting address (0xa0000). Then I wrote my VESA library, started programming in protected mode, and then eventually moved to Windows and OpenGL. [note: Wikipedia is CRAZY]

Hardly anything I've read those days is useful now. Sadly I don't think that most future rendering engineers will ever learn how to properly draw a triangle in software (I don't really think they do now, and I don't even think most of them know how a GPU does). Most of the sites and resources I used are dead now.

So I don't know. I'm clueless. I know a few good books that I would recomend, but I don't know if they're really good for learning.

What I know is that you should always have fun. Do it for fun, noone starts with the maths. At least if you start young as I did, I don't think you'll really appreciate them, that comes later. And to me maths are fun now, they're much more fun than coding, so I'm still doing everything only for my personal enjoyment.

I would say, start with proce55ing. It's the most fun language I know of, and it's Java basically, so you will do graphics in a mainstream programming language. There are a few tutorials and courses on the processing site itself, there is an incredibly active community, and Java is an incredibly widespread language, you won't have any problems in finding tutorials and books for starters.

Then move to more serious 3d stuff. I would say, C++ or C#, and OpenGL. You could start with the famous NeHe graphics programming tutorials. Another good way is C# and XNA, especially if you have a 360. Then you will need CG to code shaders.

If you reach that level, you can start reading everything. Books. Papers.
Take your time. It could easily require your entire life.

Don't EVER think to know enough. You don't. If you've been programming for 4-5 years and took a 5 years university course, then you will have just the basics that are required to be able to understand almost anything, with some effort. They give you only the alphabet, from there on, there is the real knowledge! That's the single most important advice I can give you.
I've seen countless people making fool of themselves because they actually believed they knew how to do something, while they just knew the basics to start learning how to do it.
And they are evil, because they truly believe they can do it, and they will do it, and it will be wrong. Don't get me wrong, doing things wrong is fine. If you're not writing production code for a company, that is. Well, but that's another story...

I haven't finished to learn, I read every single day new stuff. And I hope I'll always do. And this is why I'm writing this blog as well.

P.S. Oh I forgot. This one looks promising too as a starting language. It seems to be made for the younger ones but I think it will be interesting for everyone. It's based on Ruby.

P.P.S. The "fatmap" article on triangle filling... is just a starting point, more advanced coders will like to add perspective correction to n-sided polygons to avoid the cost of emitting multiple triangles after clipping... ;)

5 comments:

Riccardo said...

great post Angelo! :)
do you think it could be a good idea to suggest to a noobie to learn assembly? I've found very useful to start from it, but years (and years and years...) ago!

DEADC0DE said...

Eventually everything is useful. Or it could be. I would not reccomend to start with assembly, but if one think is fun, go ahead. I just provided a couple of entry points, but there are so many different ways of entering this world, they are all perfectly fine.

DEADC0DE said...

For example, as of me, I've found fun many different assembly languages. I've started with 6502 but very briefly, then moved to 80x86 (starting from 80286 really as powerbasic inline asm was limited to that opcodes, then learning pentium MMX), then mips, java bytecode, shader bytecode, 6502 again, and now powerpc...

Riccardo said...

PowerPC...hmmmm... I could guess the reason ;)

Phillip said...

I think some of the worst code I've ever seen has been in "corporate production software". :) The dot-com era meant many companies started hiring anyone with the title "Engineer", be they, EE, ME, or (gasp) civil, to 'learn' programming on the job.

One time I found a guy who was tasked, (and was diligently working on), implementing a concrete solution to a known NP-Hard problem. I mentioned that to him, and he'd never heard of NP, or what NP-Hard meant, nor why he could never get the project to work properly. Civil Engineer there btw. sigh.