Related Articles

Back to Latest Articles
ADAM 5510E TCP

ADAM 5510E TCP

I got some days ago the new ADAM 5510E TCP. It is nicer than ADAM 5000TCP that we showed in August. We will not show photos of it this time because it looks the same as its brother ADAM 5000TCP. What makes the new ADAM better?  Mainly that we can get inside to program it with C. What is it inside? How to get inside? Through the RS-232 port for programming like this screenshot: What software is included with it? What can I do with it?: You can program yourself in […]

Likindoy’s name

Likindoy’s name

Finally, we got the name we were looking for in our program, and the “Chicken Man” legend was finished. Our old programs, Grafista and iScada, definitely changed the name to “Likindoy“. “Al likindoy” means watching something, taking care of something, and having a look. “Al likindoy” means to be in that status (being watching something). For example, you leave your car in a parking lot, and […]

The day I met Erlang

The day I met Erlang


Juanmi Taboada
Juanmi Taboada
The day I met Erlang

It happened some time (years) while I was thinking about the problem of programming languages nowadays. I mean, I was asking questions myself like:

– Is there some program that is able to write an if? (“if” is a very simple construction inside a programming language)

– Or maybe a program that is able to decide that it needs a loop somewhere when you ask about something that is looping?

– Is there some programming language that is able to write itself? We, humans, are not able yet (for those with quick thoughts, cloning is copying, but a simple “write your name…hello <name>” program maybe there are some)

Following my deeper thoughts, I concluded that I am not looking for a programming language that can write itself but a language that can describe itself. At that exact moment, I reminded myself about that knowledge I had already somewhere deep in my memories and almost forgotten. I mainly learned those functional languages at University: Haskell and Prolog. I remember how great it was to write what you wanted from the program; when you execute it, you get exactly that. I enlighten myself. That’s the way!

Imperative languages make you define how you want everything to be executed, while functional languages make you describe your target, the result. This is, in my opinion, a more natural way of building a program since you focus on the target, not the way to get to it. Of course, some purists will say that the way is also important…yes it is, but not on most of the programs you make (that is a different war I will get on a different day).

While using imperatives languages, you can get lost on the way. Using functional programming, you get nearer to the solution on each step, thanks to your target being better defined. Sometimes optimization is important, but in my career, I have seen so many programs with an awful design that I am pretty sure most of the programs in the world focus the most on the target, not on the way (thinking about optimization details), so in this point is always better to use a functional programming language since at least you get nearer to the solution.

I am pretty sure this is the natural evolution of programming languages. They go by the hand with the natural evolution of hardware (to increase the number of cores inside the processor). The more threads the hardware is able to handle in real-time stronger the selected functional programming language.

In a few years, we will get more parallel processors (real manycore processors and not what we have now, which I call fewcore). I am talking about 50-100 cores in one processor. At that moment, functional languages will make a lot of sense. I think Object Oriented Programming is living between imperative and functional programming languages.

The day I realized all of this, I met Erlang.

I recommend reading deeper at “Zen and art of functional programming“

Comments

Related Articles

Programación

Django 1.7 Review

Finally, Django 1.7 is out, and it is great. Even if it broke some of my oldest Django projects, I love their philosophy. They focus on doing things in the right way. Getting my oldest websites back to life took me a few minutes, but it helped me update them. The first project I made […]

Posted by Juanmi Taboada
Programación

Labelmate PM-300-CS: interfacing an industrial labeler with ESP32 and galvanic isolation

The Challenge I recently took on the challenge of modernising a Labelmate PM-300-CS dispensing machine (Internal Mother Board). Ideally, I wanted to control this industrial hardware from my computer, so I decided to interface an ESP32 microcontroller. However, there was a major hurdle: the machine operates on 15V logic with noisy motors, while the delicate ESP32 operates […]

Posted by Juanmi Taboada