📜 ⬆️ ⬇️

I invented Erlang because it did not exist.


Article author - Joe Armstrong, Erlang developer

I, as an old-time programmer, sometimes like to remember my youth ...

When, back in 1967, I was just starting to learn programming, I chose between the languages ​​Fortran and Algol. There were a lot of rumors about Algol, but practically no useful information could be found, so I started with Fortran.
')
On average, it took 3 weeks to write one program:

Week 1 - writing a program on paper and sending it to a computer center, where I made punched cards;
Week 2 - punch check, and download them to the computer;
week 3 - obtaining and analyzing results.

When the compiler reached the first syntax error in the program, it stopped, and it threw me back to the very beginning, to the first week. To fix 10 errors in the program it could take 30 weeks!

Although in some ways it was even good - it taught to think before writing the program and not to make mistakes.

In 1970, I studied at the university. I could print my own punched cards, and the time required for this stage, from a week reduced to 4 hours. I still wrote on Fortran.

In 1974, I had access to the computer Honywell DDP516 - with a huge memory of 32 KB. Finally, the Fortran compiler compiled a program of 100 lines in less than a week!

And in the same year I started working at CERN and using the CRAY1 supercomputer, which compiled 100 thousand lines of Fortran code in 1 picosecond (haha, in fact it was a million times slower than my current mobile phone)!

And I still wrote on Fortran.

Soon I was able to play around with DEC10 - now I could write code on Fortran, Basic and Assembler, and it was multitasking! If I lived in the USA, I would become Bill Geyts, but I lived in Edinburgh.

In 1976 I got a job at NORD10 on Fortran and Assembler, and this computer was really fast, coping with programs in seconds!

In 1980, I was still programming on FORTRAN (I forgot the name of the machine). All files were in the same folder, there was no full-screen editor, there was no version control system. I wrote about 150 thousand lines of Fortran code for all of this!

1985 - I joined Ericsson with a terrific VAX11 / 750 . Finally, I was able to fully learn new languages. Goodbye Fortran!

I studied (to varying degrees) Lisp, Prolog, awk, bash, smalltalk, TCL, and became a pro at Prolog (arrrrr - my darling)

I played with almost all the languages ​​that I just came across (ML, forth, ...)
1986 - the beginning of the Erlang period (I could not study Erlang, since it did not exist then, so it can be said that I created it) - this was a scion from Prolog + Smalltalk.

Then I studied (crap) C. Mike Williams (co-developer of Erlang) said that my C code is crap and it looks like my Fortran. His phrase sent my C to the trash ...

When I started to gain popularity of C ++, I tried to read a book about him ... There is still a dent on the wall at the piano, where I threw it in a fit of anger! After all, I thought that improving C should make things easier, and everything turned out to be even more confusing!

As time went.

I tried Java, was not impressed, although of course it is better than C ++, but how verbose it is! Fingers go numb when you write hundreds of lines of code in Fortran to implement the simplest things - the same goes for Java. I also later programmed in Python (norms), Ruby (norms), Lua (better), Javascript (my love :-). Learning these languages ​​really took me a long time. I have 15 years of Fortran experience - enough to become a pro in it, 10 years Prolog, 20 years Erlang, and so on.

It took a lot of time to learn new ideas. Fresh ideas in programming come very rarely. About once in 20 years someone has a really good, fresh idea. Programming is now not far gone compared with the level of 20 years ago - in fact, as there was a mess in the code, it remained so.

IDE's and version control systems have made our world only worse. You have all the old versions of the mess and the mess itself, and IDE means that you can't even see this mess. Yet the best IDE in the world is your brain.

So what to do with your education? I will try to suggest where to start.

You can choose from more than 20 languages ​​(all of them are good for a particular task). What took me 40 years of study, you can try to learn in 2-3 years, there is nothing impossible.

What languages ​​should a beginner learn, what should be taught in schools?

Despite the huge variety of languages ​​for every taste, to stop at one thing is not an easy task. The old men say: “choose the language in accordance with the problem that needs to be solved”. It is easy to say so when you know 20 (or even more) languages ​​(with varying degrees of professionalism) - but if only Java and C are important, this advice will not help you much! It is especially fun when solving a problem in the CLP language takes only a few lines, and on the same C, thousands!

So, here are my recommendations for learning:



A couple of years should be enough (ONE LANGUAGE). I do not mean “quick start”, or something like that. If you want to quickly code-run immediately to the store for the book "PHP for Dummies" and spend the next 20 years, Google questions like "how to calculate the length of the line."

We are still extremely weak in the interaction of different programs and modules written in different languages. Still, the best way to interact is to use unix-like find ... | grep | uniq | sort | ...
The fundamental reason for this is that there must be some intermediate language for the interaction of various components with well-defined protocols.

Interaction by passing messages is one of the ways that is the basis of object-oriented programming, but this is poorly implemented in most languages. If all applications in the world were communicating over sockets and Lisp S-expressions and had standard descriptions of exchange protocols, then we could reuse code more efficiently.
Today, the concentration of languages ​​and various methods is enormous, but how to combine these methods together is extremely poorly implemented. Learn protocols, not languages.

And learn ALGORITHMS.

To your health!

PS Years in the article approximate

Article author: Joe Armstrong; Original article in English ; Translation author: metadiel

Friends, I urge everyone who is not indifferent to IT topics and start-ups and knows English to join the translation of interesting English-language articles! At the exit: pumping English, expanding horizons and respect from those who can not afford to read them in the original. Write in a personal!

Source: https://habr.com/ru/post/169977/


All Articles