lunes, 27 de abril de 2020

Pair Programming


This technique has been in my repertoire since the beginning of my career as a software developer and is the cornerstone of many of my projects. Therefore I am well versed in what it involves, benefits, challenges and so on.

I agree on what the authors are saying in this article mostly and I am kinda glad that I read it because I noticed some stuff that they say it is wrong and that I do a lot of the time when I am giving classes or I am working on a collective project.

Like for example the micro managing part.

In my entire carrier I never understood what that term meant and it describes almost perfectly what I have been doing most of the time in my projects. Most of the time I assume the role of navigator while pair programming either in a project or during a class, I would think it is because I consider myself a very good programmer, and because my mind most of the time already knows or imagines what must be done in order to solve the problem I always tell the driver exactly what to do. And sometimes the driver is just so, sooooo slow. And rather frequently I just tell them to change places with me and let my code.

Because of my impatience I can see now that I have been doing this stuff wrong. I mean sure, I have been a rather good navigator a lot of the time, but also I have been a prick most of the time. And I am sure that I have made some people very, very angry.

Thanks to this article I will improve my soft skills, because being a good programmer isn’t enough in the modern world to be successful. You must also be a good team player.

JVM Garbage Collectors


I really liked the phrase that the author put in his presentation. “Garbage Collector is really hard, and we get it for free”.

This phrase really gets to me because I'm a big pusher of Open-source. And he is right, this kinda stuff is hard and there are people pushing the limits of code in order to make our codes better. And I love that.

The author explained a lot of stuff of how a GC (Garbage Collector) works, and the benefits it brings having one always checking what you don’t need anymore inside your code.

What I found most important is the different techniques and philosophies that implementing a GC involves.

My opinion is that a GC needs to run in the background as a separate thread from the main app, and must not interrupt the functionality, because it would be very user experience-wise deficient and tedious. Therefore my believe is that a GC should be run on a different thread and use a technique with which it will compact as much as possible the info in the heap and at the same time will prevent memory leaks in a way that doesn’t interrupt the user experience.

Of course this is no easy task and maybe in some way ,because I (of course) am no expert in the subject, might be impossible to achieve. But that is the wonder of Open-source. In the section above it was described that the newest GC that the JVM uses at the moment is the Shenandoah, which was invented by de Red Hat Linux organization as a open-source gift to the world.

The fact that the most brilliant minds in the world are all working together in order to further improve the algorithms and processes that everybody else write is wonderful and necessary. This is the philosophy of Open-source and free software, and I love it.

lunes, 13 de abril de 2020

Roots of Lisp


What a find remarkable of the paper that I just read, is the idea of creating such a powerful language, with its own language. To me that is such an elegant solution.

I didn’t get to use Lisp in a professional environment due to it being such an old language. However I do take some lessons from the way it was programmed. The fact that a language can be written using itself to compile itself is remarkable and really shows a great abstraction from the part of the author in a way that for 1960 was never seen before.

Here is why, this resembles a lot the idea of recursion, which for Lisp and languages like Clojure, which I will be touching on in minute, are the main way of “iterating” through some stuff in order to get to a result that cannot be immediately obtained from a math formula. And is truly amazing that this idea was implemented not only as one of the necessities of any programming language, but as a way to compile the language itself.

But there is something that I cannot overlook, now that I know Clojure and Lisp I understand the difference between the two and where Clojure got the inspiration from. And from the file itself I get the idea that lisp isn’t simply a programming language, but a family of languages called lisps. And the doubt that pops into my head is; What is the difference between the lisps?

Of course if I take the time to do some research I could get the answer but for me it would be pretty obvious that if someone like Richard Hickey (Clojure Creator) developed Clojure as a modern and more powerful lisp I don’t see the necessity for any of the other lisps that were referenced.

domingo, 5 de abril de 2020

Rich Hickey on Clojure


It is interesting to hear the creator of a language talking about how the language came to be.

As he describes it, he created Clojure as a way to update, and optimize a Lisp in order not to become mainstream, like Python, Java, C, etc, but to be a powerful tool so scientists can perform important work in an elegant and simple way.

For instance he describes the way the information is being manipulated in a very optimized and simple way. Basically by sacrificing memory space he optimized de speed upon which the operations are executed in a way that makes the information persistent, immutable, and fast.
Although not very optimal for space, this increases speed by a lot. Also the innate implementation of data structures such as atom and Java libraries for big numbers. Makes the mathematical implementation of complex and big operations super easy for scientists and specialists to develop important work.

I agree with Dick, Clojure is a powerful language, and in some ways with the analogy that he gives, about if you had to explain someone a code in Java, it would be really difficult and we just have accepted that reality, and because of this most of us, me included, dismissed it almost immediately because it looked weird and in my indoctrinated eyes it did not look like a normal language.
Most of the times I still think looks weird and get frustrated about the syntax. However, I must admit is a very powerful language with a unique implementation. And it has given me a new interest in how to program efficiently and abstractly. High order functions have been always been present in my repertoire ever since I started programming in C. And multithreading is something I consider personally very important for a program to be perfect. And this language already has native implementation, more than surprised I am impressed.