Anslem wrote: Granted one can understand indirection simply by using array indexes... but somehow understanding memory seems to be slightly different from simply understanding indirection.
One of the hardest things for me to understand about C/C++ as a Java developer was pointers. I spent three days reading every article about pointers that I could get my hands on. Learning about computer memory management, including pointers, did help me tackle a problem OpenJUMP had in running out of RAM with large datasets. If you don't know the basics about memory management you could easily write programs that greedily devour RAM. I would think this would be especially easy when working with geospatial datasets, which tend to be very large. Landon ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anselm Hook Sent: Monday, January 21, 2008 4:35 PM To: [email protected] Subject: Re: [Geowanking] RE: Geowanking Digest, Vol 50, Issue 33 Straying away from geo completely.... I will say that I've taught a few people how to program using Ruby and it was instructive to see that they didn't really 'get it' ; have a deep sense of what was going on - until they learned C and pointers... The abstraction away from the underlying hardware architecture seems to hinder understanding... It is hard to say if that is good or bad... There was a hilarious thread here that somebody pointed out a while back, http://news.ycombinator.com/item?id=87348 (It seems like having an intuition about indirection is so simple, trivial and obvious that it is hard to imagine that somebody wouldn't understand it, and the resultant choices and limits that reality imposes.) ( Granted one can understand indirection simply by using array indexes... but somehow understanding memory seems to be slightly different from simply understanding indirection. ) There was one slightly geo related issue in language choices - to find an excuse to draw geo back into this: I was monkeying around with building a cellular automata simulation (of rainfall) and I found java to be horrifically wasteful - hard to conserve against cache misses. You can't express a series of "structs" like in C or C++ or C# . If you wanted to build a sparse matrix implementation, like lapac uses etc - you have to do it in C as an external library. Since I had a mental model of how I wanted the cpu and the bus to stride across memory, minimizing de-references and maximizing cache coherence, I knew that Java was inexpressive... This actually made it hard for me to write the code - knowing how bad it was underneath slowed 'just getting it done'. It was an instructive example of where knowing too much was not helpful, and where the gap between the high level languages and say C exist... ( As well, there's a possibility that the optimizers might surmount these issues; so in fact the presumed mental model I had might in fact be wrong... ) On a vaguely related note - this language is accessible to small children - if you want to inflict knowing how to program on them: http://www.playfulinvention.com/rcx/software/index.html If there's a broader relevance, it is perhaps that most people will eventually probably be expected to have a basic literacy in programming .. seems like the new lingua franca ... and perhaps a best way to straddle cultural divides - more so than say all learning esperanto... - a On Jan 21, 2008 4:05 PM, Landon Blake <[EMAIL PROTECTED]> wrote: I've got a lot of respect for the guys that code in languages like C and C++. Using one of those languages is right up there with brain surgery. (To think programmers used to be responsible for memory management all on their own. Where is my garbage collection!) I think I could learn and use C if I needed to, although I'm always tempted to implement a system for managing "objects" whenever I use C code. I avoid C++ like the plague. :] It's a darn shame too, because Inkscape, one of my favorite FOSS programs, is written in C++. I bought a 900 page book on C++, and I've even read it a few times, but I never successfully used the language. It did teach me a lot about how object-oriented programming languages run under the hood. I never understood basic memory management in computer programs until I read it in a C++ book. That is a gem I'll treasure for a long time. I guess I'm just addicted to the syntax sugar in languages like Java, Python, and even Ruby. (I couldn't believe how easy it was to open a text file in Ruby.) Landon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Brandon Whitehead Sent: Monday, January 21, 2008 4:00 PM To: [email protected] Subject: [Geowanking] RE: Geowanking Digest, Vol 50, Issue 33 >I'm in my late twenties, and my languages of choice are Java and Python. >(I dabble in Ruby for customization of Google SketchUp.) >I'm guessing the old farts are using C, C++ or maybe Perl? >I wonder what younger people are using? I'm in your boat. Late 20's - Python & Java. -Brandon _______________________________________________ Geowanking mailing list [email protected] http://lists.burri.to/mailman/listinfo/geowanking Warning: Information provided via electronic media is not guaranteed against defects including translation and transmission errors. If the reader is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this information in error, please notify the sender immediately. _______________________________________________ Geowanking mailing list [email protected] http://lists.burri.to/mailman/listinfo/geowanking
_______________________________________________ Geowanking mailing list [email protected] http://lists.burri.to/mailman/listinfo/geowanking
