Ruby Internals

Here’s an interesting article about how Ruby (the programming language not the gem) is interpretted or compiled. (It’s funny to contemplate what that question might mean to someone who thinks we are talking about a gem and not a programming language. ‘Is Ruby Interpretted or Compiled’ ? Say what??)

Anyway, to whoever is left reading this, I thought this article was quite interesting: Is Ruby interpreted or compiled? – Pat Shaughnessy. Here’s a quote to give you a taste:

“Ever since I started to work with Ruby in 2008, I?ve always assumed that it was an interpreted language like PHP or Javascript ? in other words, that Ruby read in, parsed and executed my code all at runtime, at the moment my program was run. This seemed especially obvious since the default and most popular implementation of Ruby is called ?MRI,? short for ?Matz?s Ruby Interpreter.? I always thought it was necessary to use an interpreter to make all of the dynamic features of the language possible.” (from Is Ruby interpreted or compiled? – Pat Shaughnessy)

[GEEKY] Sublime Text surpassing TextMate?

I’ve been doing some more coding these days in Ruby.

I’ve had great success and fun (especially when debugging) using RadRails, which is an Eclipse based IDE for Ruby and Rails. It’s quite nice.

With introduction of RVM, bundler, and so on, I’ve gotten a feeling that RadRails maybe too much. It seems to get contexts confused and create more hassles. I am not sure yet, but it’s caused me to go back and use TextMate, which I’ve always had in an honored spot in my toolset.

Poking around forums and other resources there seems to be some frustration that TextMate 2 has not been completed yet, having been ‘in development’ for I think over two years. Also there seems to be more and more talk of Sublime Text 2 as a great alternative to TextMate. So… Here I go. I will report back.

MapReduce Patterns and Examples

Great review article:

“In this article I digested a number of MapReduce patterns and algorithms to give a systematic view of the different techniques that can be found in the web or scientific articles. Several practical case studies are also provided. All descriptions and code snippets use the standard Hadoop’s MapReduce model with Mappers, Reduces, Combiners, Partitioners, and sorting. This framework is depicted in the figure below.” (from Highly Scalable)

Worth reading if you are interested in how Hadoop and friends might apply to the problems that you are trying to solve: “MapReduce Patterns, Algorithms, and Use Cases”

I wish I knew more JavaScript

I know basic Javascript. I think I will be learning more soon. I think JavaScript is the language of the (near) future. Predicting what the language of the (further) future is would be impossible, as programming languages come and go. Hopefully they get better as they evolve.

Why do I say that it is the language of the (near) future? Compared, for example to Java, or Ruby or Python, or even Erlang? Here’s an article I wrote about that: how JavaScript may be the most important language for the web for the near future. Do you agree?

With that context, I was very interested to see Jon Ressig’s article about how Khan Academy is thinking about teaching programming languages. You know I am a big fan of Khan Academy: see Khan Academy to the Rescue.

Here’s what Jon has to say about JavaScript as a first language:

“At Khan Academy we’ve been investigating teaching Computer Science to students in some new and interesting ways. The most interesting aspect of which is that we’re likely going to be teaching them JavaScript as their first language.” (from: JavaScript as a first Language)

Read the whole article, it’s pretty cool!

 

[GEEKY] Full Applications that run in the browser

Sproutcore is a JavaScript framework for writing powerful web applications with less code. It looks to me as a way to write a lot more of your application in JavaScript running in the browser. And this involves moving the logic of the application’s own logic there.

Sproutcore is a big complicated system that I have not fully investigated. It comes with a good pedigree though and is very nicely documented and designed. Worth a look if you want to have a super responsive browser based app that will continue to work even when the network connection is gone.

Here is their own blurb: “SproutCore applications move business logic to the browser so they can respond to your users’ taps and clicks immediately, avoiding an agonizing roundtrip across often intermittent network connections.

As web application users go increasingly mobile, applications can no longer depend on reliable connections to a remote server to do the heavy lifting.

At the same time, web browsers continue to radically improve their ability to quickly process data and deliver polished user interfaces—a perfect opportunity to rethink the architecture of modern web applications.”

 

[GEEKY] JavaScript – Universal Language of the Future

JavaScript is the language of the future. Why do I say this?

I love Ruby, I respect Java, and I am jealous of Python. And of course I have a warm spot in my heart for C++. Think about it. JavaScript is unique among all those languages:

  • Any computer you can get your hands on nowadays has a working, and probably very fast JavaScript compiler/interpreter. Laptops, Desktops, Servers, Mac, Pc, Linux, Phone, Tablet. ALL OF THEM.  You can’t say that of any of the other languages.
  • Because of the browser wars, and probably spurred on by Google and Chrome, there has been enormous investment in JavaScript performance so that it is now respected as a viable high performance language for server side apps.
  • As a language, it’s not shabby. Most people don’t think about JavaScript as a full fledged programming language, but it does have some great characteristics.

If you don’t believe me, here’s another person who comes to the same conclusion by a slightly different route:

“Web servers, rich web client libraries, HTML5, databases, even JavaScript-based languages: I see JavaScript everywhere. If you have avoided JavaScript, this is the year to learn it. There’s no excuse — and if you don’t, you risk being left behind.” (from “Why a JavaScript Hater thinks everyone needs to learn JavaScript in the next year.”)

So, go learn JavaScript. You will need it for your next job.