Learning a new language

It had been a very long time since I’d tried to learn a new programming language. I started C in 1987, S in 1992, and Perl in 1997, but nothing really new in the subsequent 15 years.

A friend now has me doing D, wanting to find time to learn ruby, and, most recently, playing with JavaScript and D3.

I’m really excited about D3. It’s long past time for dynamic, interactive graphics to be routine. And with D3, I think it can be.

The object-oriented stuff is most foreign to me.  When your programming skills are stuck in the early 90s, there’s a lot to catch up on.  It’s hard to adapt to a new way of thinking. But I’ve used “this” a couple of times, which makes me feel quite accomplished.

The hardest part has been slowing myself down; I’m too impatient. It’s critical to have a challenging problem for motivation, but I tend to want to jump into complicated things when I should be a bit more methodical.

I want to make things like this. (I don’t really see a use for it yet, but it’s fun.)  So I start mucking about with code that I don’t yet understand and end up going nowhere for hours.

The important thing is that I’m having fun; eventually I’ll be able to usefully apply some new skills.  For now I’ve got this: [Click for the dynamic version.]

PS: I really like Scott Murray’s tutorials on D3. After working through those, other tutorials became much more understandable. Eloquent JavaScript is a super-cool, open source, interactive text on JavaScript; also take a look at the “fork” for CoffeeScript, Smooth CoffeeScript. (I’m thinking I’ll switch to CoffeeScript once I’ve learned a bit of JavaScript; the useful libraries and examples are mostly in JavaScript.)

Tags: ,

2 Responses to “Learning a new language”

  1. Robert Young Says:

    If you want to know what OOD/OOP are about, visit Allen Holub’s site, and read his papers from the late 1990’s. That was when there was hope that OO would actually be done as defined.

    Hasn’t turned out that way. 99.44% of “OO” coding is just function/data, same as FORTRAN. The Keepers of the Flame (OO division) don’t like to hear that, of course. But it is true. The terms used, “action object” and “data object” reveal what’s really going on.

  2. roger tubby Says:

    I’m impressed by your example. Many thanks!

    The use of OO in the R context is mainly about object identification – it’s just letting a function know what type of object it is working on.

    I’ve been learning new languages since the 60’s and R is one of the most frustrating – only because I have to learn 100s of new packages that have no inherent naming scheme. If the ‘.’ (dot) subclass was enforced, perhaps it would help.

    It would be really nice to see someone tackle the prolific packages/libraries and put them into some logical schema/namespaces so us noobies wouldn’t have to do deep text searches.

Comments are closed.