Re:Programming by Coincidence
by chaosphere2112 on Saturday April 04, 2015 @01:55PM
(#9321569)
This is something I'm constantly struggling with as I try and teach myself OpenGL. Tons of tutorials available, but many have little context or explanation about what it is that they're demonstrating, and I keep finding them via Google searches for how to use a specific function. I'm almost never trying to do what they're doing, just having some small degree of overlap. I've got a copy of the Red Book, and it's pretty handy, but man is that a big pile of "well, this is pretty close to what I want".
[ Parent
| on HN ]
Re:Programming by Coincidence
by brandonbloom on Saturday April 04, 2015 @10:35PM
(#9322940)
I'm having a similar experience now working with FFmpeg. None of the examples match each other or any of the tutorials on the web. In my experience, this problem is particularly bad with imperative APIs, doubly so in C. There's just too many unanswered questions in the API signature, especially around cross-cutting concerns like global state, memory ownership, and thread safety. Worse yet, when you do find an example that matches what you want, you quickly discover an obvious bug and suddenly lose faith in it!
Speculating: This frustration occurs when an API doesn't cue the user to a useful mental-model. Then the user has to fall-back on a strategy that has a tinge of ritual lever-pulling.
Have you tried the Wikibook? http://en.wikibooks.org/wiki/OpenGL_Programming
Is it any good?
Re:Programming by Coincidence
by chaosphere2112 on Saturday April 04, 2015 @09:21PM
(#9322768)
I think I've googled into chapters of this; I'll have to give it a more thorough perusal.