Programming


I started in programming writing small functions for my Casio FX-680 calculator during my first engineering undergraduate years, then I took a programming course where I learned Pascal and implemented numerical routines, but I could not write a complete screen-oriented application because the library of objects to build menus and dialogs was too big for me at that time.


Then I found Linux, and read C code, I downloaded patches from internet and apply them using commands like patch, diff, etc. It was a side interest activity consisted of following instructions and learning through the process, I never wrote a serious program in C from scratch. I will describe what I have achieved in the main languages I worked professionally.


C++ was the language I was kind of forced to learn because of a job assignment. It took me  two months and had a happy end after completing a patch in a medium (10k lines of code) size software and deployed in production.

PHP was used for my side projects while I worked as a Network Administrator in a utility company, the projects I wrote in PHP became in real deployments and went into production for real clients. It was the classic LAMP environment, back then a coworker come up with and idea to use templates for HTML pages with a small API, an idea that I re-implemented in Java a few years later.

Java came to me as a consequence of  client’s requirements. My first contact with this language was when I had to evaluate the Internet platform as part of the IT department where I worked for; in that occasion I compiled small proofs of concepts to demonstrate how easy or hard could be administrate  certain technologies from a DevOps perspective. Then, in Compulinux (A company I founded), Java was the main language for our projects for many years (+10), we built information systems as contracted providers for government and private companies, during those years, my team and I wrote thousands of  lines in Java.

JavaScript is impossible to avoid, my projects were initially built as Web 1.0 (CGI to be more precise!) apps, so they were perceived slow for small interactions like reload selection lists, and we had to include javascript in our codebase. The main problem in that moment was to decide which JS framework to use, and this depends on how deeply we understood the issues involved to develop an interactive web application (Web 2.0 in buzzwords :-)). After evaluate JQuery, angularJS 1.0, Google Web Toolkit, and others, I decided we should use Google Closure Compiler and its library. The compiler guaranteed that our code follows certain rules (e.g. enforcing of  types and inheritance, similar to OOP) through a compilation stage. We were free of the kind of bugs that usually only happens  when you run your code in the browser, of course, we had other type of bugs related to the business logic, but that is part of the real complexity, not incidental.
Python, the reason I went into Python was that I have chosen Google Cloud Platform, and with this decision of using Google App Engine for Cloud developments, we found that Python was the primary language for their API, so use Python appeared to be an advantage. Our next cloud application was wrote in python instead of Java. The experience was more about learning the API of Google than the fact I was using and learning a new language. It could be because of this reason that I didn’t wrote complex things in python, just generation of HTML, receiving requests and interact with the database (Google Datastore), but my feeling with python was that I didn’t learn something fundamentally different that in JS or Java, from a paradigm point of view.

Clojure was the result of searching a language with  better abstractions for concurrency than just plain Java threads, I was involved in a project that needed to translate on-the-fly thousands of instructions between two telecommunications equipments, on one side it needed a telnet interface, and on the other side it required  HTTP, all had to be managed as “live sessions” to communicate telephone switches, I read about the concurrency advantages of Clojure, and it was the main reason to choose it. This was the initial motivation to try Clojure, but after using it for two months and watched many of the Rich Hickey’s talks [1] , it became one of my favorite language due to its pragmatic advantages.

Clojurescript, appeared after we wrote 25k lines of code in JavaScript using Google Closure Compiler, back then, we had to resolve many details for SPAs (Single Page Applications), like how to obtain remote data efficiently in harmony with the render cycle of the Google Closure Library, or, how to express the queries for data in every component in the page, and the solution to do routing in the active page and manage the History in the browser. We solved all these issues using the library, but the code grew too much, we were looking to reduce de codebase our initial intention was to incorporate JS and maintain the the least coding as possible.
I listened about ClojureScript in a Cognicast episode, the thing that caught my attention was that the guest said that he “was working with Google Closure library, but after 10k LOC written he could not manage the complexity, and found ClojureScript…and reimplemented everything with a fraction of lines of code.”, and it was exactly the situation we were in. This was the initial motivation to star using CLJS, now we are using mature frameworks that had allowed me to avoid writing JS et all.

REFERENCES

Rich Hickey's Talks

Comments

Popular posts from this blog