_THE_PLAGUE | 14 years ago | on: Paul Graham: SOPA Supporting Companies No Longer Allowed At YC Demo Day
_THE_PLAGUE's comments
_THE_PLAGUE | 14 years ago | on: Why We Haven’t Met Any Aliens
_THE_PLAGUE | 14 years ago | on: John Resig: JavaScript as a First Language
_THE_PLAGUE | 14 years ago | on: John Resig: JavaScript as a First Language
I learned programming a bit ass-backwards. I got a "teach yourself Java" kind of book, went through that, and generally learned things "on the fly" as it were, and, in so doing, in time, eventually was comfortable with the "Java world" of Java SDK (basic Java), XML, XSLT, and some DOS / UNIX scripting skills as well. Still to this day, Java is a language I feel very "at home" in, and would choose if I had to build something up really fast. It is my "GOTO" or "default" language if you will.
Later, though, I started to study C++ and C, first for a job that required me to write unit tests using CPPUnit (the C++ port of Java's JUnit) and just sort of "learning on the fly" began to be able to understand and edit C++ code, though I was not then (or now) as proficient there as in Java. Still later, I studied C proper and read Kernighan and Richie's classic book, "The C programming Language". I think it was then, and only then, that I really understood the fundamentals of programming, by which I mean the principles of it, not just memorizing syntax to get stuff done, but rather having a deep understanding of things like memory allocation, processes, stacks, etc.
The thrill of creating dynamic (re-sizable) arrays using C-style pointers is something that still gives me a bit of a high, because there are many situations in which resizable arrays are needed or desirable, and doing this via C-style pointers is the most efficient way of doing it.
I can say that while today I still would choose Java if I were doing a personal project of some size or complexity just for expediancy's sake, I love C the most, for it is the most efficient (fast, using less memory, etc.).
To make a comparison to poetry: Java is Ginsberg and C is Eliot. Both of whom I love, but they are different styles. Ginsberg is the Jazz musician of poetry - creating crazy yet haunting melodies by going "off the map" if one wills in terms of traditional styles. Eliot is the baroque musician of poetry - using the fewest notes to create the greatest effect - precision is the key word here - no room for an off-note here or there but every note having a purpose. Both have their place. I love Jazz. But in terms of aesthetic efficiency, baroque has something to be said for it. Ginsberg is poetry's Jazz - wild, haunting, all over-the-place in a good way. Eliot is poetry's baroque - precise, haunting as well if more in a subtle way, and always having a precise direction or purpose.
Well, Java is the Ginsberg / Jazz of this analogy. It is easier / quicker to mess around and improvise and come up with a Jazz tune. It takes longer and it is more painstaking to come up with a baroque melody. Both are great and have their place. However, while I would use the quicker thing to come up with something on a deadline (Java / Jazz) there is a certain satisfaction to be had with taking longer and having to put more effort in order to produce precise, efficient, parsimonious code, and by parsimonious I mean not wasting any memory or CPU cycles, but having each bit of memory serve a purpose, just like each note of a baroque piece or each line of an Eliot poem has a precise purpose and taking one line out or one note out would ruin the whole thing.
So, while I still would use Java probably the most, I find a certain nobility in C, much as while I might probably listen to Jazz (or its descendants) the most, I find a certain nobility in baroque, and whereas I love and relate very much to Ginsberg, there is a certain appeal in Eliot's ability to say so much with so little that will always hold an attraction for me.
This is why the above article I came across, in which a computer science professor is talking about using, not even Java, but JavaScript for goodness sake, as the first language to teach students, is so tragic. Like I intimated before, if I had to do it all over again, I would have studied C before I even got into Java. That would have taught me correct principles and just a better "philosophy" of programming. As it was though, I was lucky. I worked with a math PhD who was a C++ whiz, a guy named Dr. Mark T. Lane, Chief Scientist at what is now mobi (mobicorp.com) who imparted to me the basic concepts of efficiency and attention to detail that I could never have gotten from the Java world, so, although it was later that I seriously began to study C, even early on I had some of those benefits, for which I will always count myself lucky and grateful.
But not everyone is going to luck out like me and get to work with such brilliant folks. I can only feel sorry for those aspiring computer scientists who go to a computer science program and get freaking JavaScript as the opening silo in their introduction to the world of programming, and I can only feel contempt for those professors who would advocate such a fool's errand.
When I was a kid, I loved this old 1950's teen sci-fi novel called "The Forgotten Star" featuring a character named Digby Allen who travels to the 50's version of a moon base and a Mars base, and eventually lands on Eros, an asteroid. Turns out in the book the asteroid is a space ship and inside are people from another planet (from a "forgotten star") who long ago have forgotten the knowledge that propelled them into space in the first place. The interior of the ship has a simulated earth-like environment, with a sky, fields, etc., and these people live like primitive savages, in huts, etc. not knowing there is a world outside the interior of their space ship, not even knowing, for that matter, what a space ship even is. They have a cool contraption which can convert atoms into anything asked for, so they get their food from that. The contraption (as near as I can recall) would basically take atoms from space and convert them into the molecules for whatever the user requested, so I could say ask it for bread and it would give me bread. To these inhabitants it was like a magic thing, for they had lost the knowledge that went into producing that contraption to begin with. And I suppose the young space adventurer Digby Allen saves the day and brings them into the modern age, though now I forget just how that ended. But I will never forget the impression which the book had upon me - the concept, the very sad concept, of a people once-advanced who through laziness had allowed themselves to descend into ignorance and dependency upon technologies they could no longer understand.
I was reminded of this tragedy when I saw the above article. Already I had read essays about computer science professors lamenting that C / C++ is no longer at some schools taught, Java being the preferred language. And now, it seems we are descending yet another rung, with JavaScript now being the preferred language. What is next? HTML? How about just forget about teaching kids how to write code and teach them how to use point-and-click tools like say WordPress which does not require any code skills at all to at least be able to use the basics thereof.
If we go down this road enough, we will be in the "Forgotten Star" situation - able to use tools built in the past but not having the knowledge anymore to build those tools again. Because you can only create great Jazz if you also know how to play baroque. You can create mediocre jazz I am sure - hell, a chimpanzee, given enough time, also could. But you cannot play great jazz without the underlying principles that led to it. Neither can we expect great code to be developed without the understanding of the underlying principles which led to our current languages (like JavaScript) in the first place.
Oh, and one more thing, subverting a function into an "object" has its purposes in terms of being able to code things up faster, more easily understanding the architecture, etc., but here is a dirty secret that apparently contemporary self-styled computer science professors won't tell you: a mathematical function is not an "object", sweetheart. Because "objects" belong to "sets" which may describe computational functions, but are not the functions themselves.
Deal with it, Java cultists. :-)
_THE_PLAGUE | 14 years ago | on: John Resig: JavaScript as a First Language
_THE_PLAGUE | 14 years ago | on: Qantas flight plunge blamed on computer
_THE_PLAGUE | 14 years ago | on: What is the single most influential book every programmer should read?
_THE_PLAGUE | 14 years ago | on: Poll: HN readers, where's your residence?
_THE_PLAGUE | 14 years ago | on: Are you able to solve it? (from the teenagers programming contest)
_THE_PLAGUE | 14 years ago | on: How automatic transmission almost made sperm whales extinct
_THE_PLAGUE | 14 years ago | on: How automatic transmission almost made sperm whales extinct
_THE_PLAGUE | 14 years ago | on: How To Make Money From Your Passion
_THE_PLAGUE | 14 years ago | on: How to Build a Computer Model of God
This is my problem with "Simulationism". It assumes such a "super P" property for the "super-set containing all universes". This property of course is time. The entire universe could be describable by a bit-string (Tegmark, et al) but that does not mean it has to "run" on anything, any more than a super-set S of s worlds each with property p has to have its own "super-property" P. I think it is a common misconception but not easy to clear up for people who don't have a technical background.
_THE_PLAGUE | 14 years ago | on: Diaspora Co-Founder Ilya Zhitomirskiy Passes Away At 21
_THE_PLAGUE | 14 years ago | on: Diaspora Co-Founder Ilya Zhitomirskiy Passes Away At 21
_THE_PLAGUE | 14 years ago | on: Ask HN: Finding the perfect job for the burned-out developer
_THE_PLAGUE | 14 years ago | on: Rob Pike: Dennis Ritchie has died
_THE_PLAGUE | 14 years ago | on: The last time I saw Steve Jobs
_THE_PLAGUE | 14 years ago | on: Ask HN: Best way to accept payments online?
_THE_PLAGUE | 14 years ago | on: The philosophy of applied mathematics