September 26, 2007
A Good Book on MS Compilers
Rant-time...
I've been learning to use Windows development tools lately. I have roughly 800,000 books on programming with Microsoft Visual Studio. None of them are as good or as thorough as the GCC/libc man pages and some newsgroup archives.
I created a simple class that depends upon some external functions. One of the functions just so happens to be able to return a class object pointer (but I don't want it to be an object method, nor even a static method, for some weird reasons). So the header files are cross-dependent (class headers and function headers). This kind of stuff was simple with g++ and make, I just compile -o and the compiler worries about resolving symbols later on. Declare as extern if it complains for functions or globals. VS2005 barfs all over the place with a rather curious error code (the documentation is helpful "the library needed is probably not in the compile path, or does not exist"), and the linking options are so obscure as to be meaningless. GNU stuff makes you learn what's really happening (like, this is how to compile, this is how to link, these are the explicit errors you'll get if the compiler couldn't find something, and GCC/make won't clean up a failed project for you so can assess what actually failed). Or at least, that's how I learned -- handmaking my own Makefiles and writing all of my code in emacs. VS is trying to make coding perhaps too accessible, and hiding a lot of that stuff, automatically generating build scripts with obscure gui configurations. I did a recent and informal survey of Windows programmers, simple questions like, "Do you know what an object method versus a class method looks like in memory? on disk?" I get quizzical stares from folks that grew up writing VC++ code and never having the distinct pleasure (and it is a pleasure!) of writing C data structures with function pointers, assigning callbacks at runtime, etc. I even got strange looks from a person or two that I interviewed with at Microsoft itself.
I suppose that, on the whole, questions like that are irrelevant. I would also say that, on the whole, kids that grew up with GNU understand their compiler way better. I won't say that they make better coders (I'm a horrible horrible programmer, for example), but they have a deeper understanding of what code does once it is written out to disk. And understanding things like that is a whole lot more fun...







by reid
on March 06, 2011
by reid
on November 23, 2009