Remember  this?

Remember this?

I am a big fan of The Hitchhiker’s Guide to the Galaxy by Douglas Adams. In the Hitchhiker’s Guide it states that if you stick a Babel fish in your ear it will instantly translate any language.

I was reminded of this during my recent studies as there is a brilliant tool called Babel which does much the same thing in the web development world.

As many of you know I have been on a career break and I am currently refreshing my software development skills. Software development is a great thing to learn during the lockdown as there are so many excellent online resources that are free.

I am currently learning React which is a web development framework that was created by Facebook seven years ago. It allows you to write code easily that can be used cross-platform (desktop, iOS, android etc.). It is being used by more and more large organisations. In simple terms it works by allowing you to manipulate a virtual copy of your browser interface and then reacts to any changes by rendering the updated interface on the browser or mobile application, i.e. it just implements the desired results and you don’t have to worry about how it does it.

Most programming languages follow the imperative paradigm – you provide a list of instructions on how to achieve what you want. React follows the declarative paradigm which consists of instructing a program on what needs to be done, instead of telling it how to do it. It is a different way to code.

React generates a lot of JavaScript (the scripting language that makes web pages dynamic) and this is where Babel comes in. React uses Babel to ensure that its code works on any browser (or mobile app).

Not all browsers can handle recent versions of JavaScript. Babel (rather like the Babel fish), translates the JavaScript generated by React to a version that the browser can understand. It takes the source code, converts it and recompiles it behind the scenes. Mostly it translates the code to an older version. I just thought that it was brilliant and the most amazing thing is that it was developed by an Australian straight out of high school – see his article on Medium from 4 years ago: https://medium.com/@sebmck/2015-in-review-51ac7035e272

No alt text provided for this image
No alt text provided for this image

Here is the full quote on the Babel fish from The Hitchhiker’s Guide to the Galaxy:

“The Babel fish is small, yellow, leech-like, and probably the oddest thing in the Universe. It feeds on brainwave energy received not from its own carrier, but from those around it. It absorbs all unconscious mental frequencies from this brainwave energy to nourish itself with. It then excretes into the mind of its carrier a telepathic matrix formed by combining the conscious thought frequencies with nerve signals picked up from the speech centres of the brain which has supplied them. The practical upshot of all this is that if you stick a Babel fish in your ear you can instantly understand anything said to you in any form of language. The speech patterns you actually hear decode the brainwave matrix which has been fed into your mind by your Babel fish.”

Git Version Control  System

As I have mentioned the declarative paradigm where you specify the end state rather than how you get there, I thought that I would also mention Git, the distributed version control system which is now the standard for most organisations. It works in a similar way. Unlike most version control systems it does not store the process of getting from version of code A to version of code B. It just stores a snapshot of code version A and a snapshot of code version B. This is a simpler and more elegant way of managing versions. It also means that if you want to move from version A to version Z you can go straight there rather than having to go through the whole alphabet.

No alt text provided for this image

Octocat is the Git mascot (part cat, part octopus).

To view or add a comment, sign in

Others also viewed

Explore content categories