Some time back, don’t know when I saw this post https://www.ruby-lang.org/en/news/2022/04/03/ruby-3-2-0-preview1-released/ and I couldn’t sleep that night.

I am a programmer, like every programmer I want to finish a job quick for my client and get my pay with a smile. I was able to do it when I coded with PHP, I was able to do it when I coded in Ruby on Rails. In fact Ruby on Rails had a thing called RJS (Ruby Java Script). I don’t know who made it, but it was genius. In Rails it combined with Prototype and Scriptaculous and made writing front end a charm.

Then they moved to Coffeescript and jQuery, in my mind not a wise move, but it kind of worked, we were writing JavaScript-ish that sucked compared to RJS, but Coffeescript made it bit easy. I was presented with this learning curve to learn this jQuery. All this parent, child relationship made it suck, but I learned. I was still able to create apps faster.

Today while developing a Rails app I don’t understand what’s going on. There is thing called webpack, yarn and I have to search for blogs to make jQuery and Twittter Bootstrap work with it. That’s pain, but once done productivity improves unless some idiot propose a brand new JavaScript library to be included so the project becomes cool. I personally thought going JavaScript way sucked.

I for long wished Opal became a part of Ruby on Rails. I wished code was easy to write as in the days of RJS. Today if you are writing software with Rails 5 or 6, you need to know about node, yarn, webpack and blah blah to be comfortable with it. It’s like a mini framework in this framework called Ruby on Rails.

JavaScript has a philosophy that’s different than Ruby I suppose. Ruby was clearly written to make programmers life easy, when I switched from PHP to Ruby I could see it. PHP ecosystem meant deployment happiness, which Rails robbed away from us, thus paving way for companies like Heroku to overcharge us, but when it comes to total cost of developing webpages, Rails was okay. Butt this JavaScript, my God! It would make atheist like me to think that there was a previous birth and I had done very bad things to inherit this super bad Karma.

Thus reading that Ruby might run in the browser was a kind of faint light in a dark hell. A distant and very faint light, but better than nothing.

I used to think, even though Microsoft is an ultra evil company, they developed Blazor https://blazor.net:

They have this vision of making developers build full webapps with just C# and thus avoid JavaScript. Isn’t that good? For a while I even thought of ditching Ruby on Rails and switching to Blazor.

All hopes not lost

As a Rails developer I would say that all hopes are not lost, it’s possible to develop apps without writing much of JavaScript:

I see that Rails is getting matured. May be one day doing Rails project might be as good as doing a pure Ruby project. I have to go through this tutorial when I have free time https://www.hotrails.dev/turbo-rails. May be I can get off writing a web app with almost no JavaScript very soon. Let’s see.

On Time?

I am really pissed off creating web pages today. In India people jump into things without trying things out. People, even in small projects introduce Angular, React into front end without knowing who created it and why it was created. Today you are considered a full stack developer only if you know these JavaScript framework. May be one day a full stack developer would also include VHDL and chip design as their profile, after all webpages are served by Integrated Circuits which too are part of stack.

May be I will learn Julia (Python sucks for DataScience) or something, finish writing my DataScience book https://cliz.in/dsbuk and escape the world where we take stuff out and put into RDMS via web apps. I don’t know.

May be I will learn Clojure, avoid JavaScript all together by using it in backend and using ClojureScript in front end.

It’s nice to be in a world dominated by free software. We have lot of choices. It’s up to programming languages and frameworks now. Will they help us create better web apps without relying upon JavaScript, or else they will make people mad and drive them away? Time will tell.