tags:

views:

331

answers:

5

I'm a self taught programmer that has tried to cover as many CS bases as possible: learning erlang to understand concurrency, lisp to understand functional programming, C & some assembly to understand hardware, etc. The one arena I've constantly avoided is computer graphics (other than using pre-made packages such as lattice in R). Do you think learning computer graphics is necessary to becoming a good, well rounded programmer? Also, what's the best language/library to begin with?

+11  A: 

Computer graphics? No, not really. Computer graphics is a specialized application of applied computational algorithms. I believe the more generally applicable area of understanding algorithm complexity is a vital tool that any experienced programmer should have an excellent understanding of.

Programmers with strong experience in computer graphics are simply demonstrating one area where following those foundations helped them become a leader in their specialty.

Edit: I'll expand a small amount on where I really came to this conclusion. Gaining real experience in computer graphics involves a great deal of work in applying math to several specialized APIs. These APIs are non-trivial to learn, and for a "new" programmer (or one that's not planning to specialize in graphics), spending the time required to learn them may not be as beneficial in the long run as other uses of time. Personally, I would spend time attacking Project Euler first, since it forces you to come up with the algorithms (the truly intellectually challenging part) without burdening you with memorizing an API. Trust me, no matter what area you end up working in, you'll get your chance to memorize API after API after API.

280Z28
+3  A: 
Alex Martelli
+2  A: 

I would say that if you were interested in being well-rounded then you should at least have a passing familiarity with the 2D drawing API in your language / platform of choice, such as System.Drawing in .NET, as these concepts are often utilized in UI development.

I see computer graphics as a specialized field, particularly 3D - it requires an immense amount of effort to become truly proficient at it, and it doesn't transfer to other areas of programming. I might be able to transfer my SQL skills to different database products across numerous business roles, but my in-depth knowledge of OpenGL and DirectX won't do that very easily.

(I don't actually have in-depth knowledge of OpenGL or DirectX - but I sure did enter a lot of manual DATA / POKE statements on my C128D when I was 8!)

Sam
+1  A: 

No, it is not necessary for becoming a well-rounded programmer because most languages and libraries today abstract much of the complexity associated with graphics programming. That said, it is definitely a niche skillset. A good graphics programmer can drastically improve the aesthetics of a desktop application or web page.

As for the best language/library to begin with, I would suggest OpenGL if you are looking for a generic introduction to graphics programming. It is cross-platform and would thus likely expose you to a broad cross-section of ideas and concepts. For Windows platforms, I've heard nothing but rave reviews of XNA within my sphere of influence, although I have not had a chance to experiment with it.

Matt Davis
+4  A: 

Do you think learning computer graphics is necessary to becoming a good, well rounded programmer?

While there certainly are talented programmer who have never touched a graphics related program, I still think people should write at least one or two graphics applications in their career.

When I took Computer Graphics in college, I was slightly annoyed. I didn't want to waste time writing trivial graphics demos and spend a significant amount of time learning OpenGL just for this class. I didn't plan on getting into games programming!

However, I quickly found that even though I still didn't plan on writing any professional games, writing some graphics programs definitely made me a better programmer.

Some things I discovered about graphics programming:

  1. Performance Matters - Our machines are so powerful now that I rarely have to worry about performance. I could do things in an inefficient matter and it just wouldn't change anything in most of my programs. The difference between 12ms and 15ms isn't worth being bothered with. However, in graphics programs you'll quickly find that performance matters! You'll quickly be keeping an eye on the frame rate of your programs. You'll start using screen buffering techniques, you'll find yourself being concious about calling Sqrt, you'll consider using floats over doubles when you don't really need a double. I learned a lot about profiling and eeking out that extra performance from my graphics programs.
  2. They are fun! - Getting immediate feedback on your programs visually is really gratifying. You make a change in your code and you are immediately rewarded with the visual implications of that change. I spent a little time writing a physics simulator with balls bouncing around and colliding on the screen. When I first got it to "work" how I wanted it to, I was literally bouncing around the room I was so happy. It got me back in touch with why I like programming.
  3. They are challenging - You'll find yourself utilizing Math that you thought you forgot long ago. You'll be using trig, physics, and much more. Even if you don't use these things in your normal day to day job I think they are a good exercise for your brain and they help keep you sharp. I needed to speed up my collision detection for my program and I ended up stumbling onto all kinds of different data structures I had never used before: BSP Trees, Quadtrees, Spatial hashmaps, oh my!

In short, I think that every programmer should at least write one graphics program. They push you in areas you normally aren't required to go in and they are very rewarding.

Simucal
+1 "They are fun!" It's hard to be a good programmer if you're not having fun! I found graphics programming can be very "modivational."
NoMoreZealots