domingo, 26 de febrero de 2017

Mother of Compilers (Comment)

There has been only some women that have been recognized in the history of computers and given the situation that those machines were developed in a time in which women had more presence in working at the house while the mens in factories and offices, gives them more recognition. That is the case of Grace Hopper, or I should call her by her nickname, The Mother of Compilers.

When I first started to program in Python my mind was completely amazed of all the things you can code. From simple stuff to complex algorithms which make this world communicate faster. But this wouldn't be possible if Grace hadn't created the first compiler which was the Cobol Compiler. Even when it is an old programming language, it was the first time that an idea of such magnitude was made.

Hopper

She was one of the first persons to refer to a code failure as a 'bug' and that is quite used now a days. With the help of her team at Remington, they wrote the A-0 compiler. Making it possible to program things easier. And ACM created an award on her name, for young computer personnel. After reading all the things she did, you start to see how important she was for humanity. We could be coding in low level programming languages today.

A piece of her biography that gives you the idea of what type of person she was is this one:

"The most important thing I've accomplished, other than building the compiler, is training young people. They come to me, you know, and say, "Do you think we can do this?" I say, "Try it." And I back 'em up. They need that. I keep track of them as they get older and I stir 'em up at intervals so they don't forget to take chances."

She will always be remembered as a pioneering woman in computer science with all her contributions. In recent years there has been an increment of programs for women to bring them to technology, this is a result of the steps they have made to become more and more common in working at jobs that we only taught that a men could do. As we continue forward we will start to see more entrepreneur women directing the next innovations in programming solutions.

References:

Historian. 2013. "The Mother of Cobol". Retrieved 26 of February 2017 from: http://www.i-programmer.info/history/people/294-the-mother-of-cobol.html

McCann, A. 2015. "The Queen of Code". Retrieved 26 of February 2017 from: http://fivethirtyeight.com/features/the-queen-of-code/

domingo, 5 de febrero de 2017

Internals of GCC (Comment)

Compiler design is a subject that might not interest many programmers but it is the backbone of our code. Without them we couldn't write software as we now it today. Understanding how a compiler works allows us to understand how is our code interpreted and there is nothing better than knowing more about the thing that makes the magic come to life. As told in the podcast, it might not be really important but it is good to know it, just as being aware of how your car engine works, you never know when this can come in handy. 

The GNU gcc is one of the most used compilers in the world. One of the key points about is it's portability to many OS (Windows, MacOs, Linux, etc.) and it is very flexible to take source as C/C++, Java, Ada, Fortran to produce object code. This compiler is very modular, it has a front-end, middle-end and a back-end (Each of them have their own responsibility). Any source programming language mentioned comes inside the compiler and it checks if everything is ok. The compiler creates a tree (data structure) to give logic to the operations in the code. Then the middle-end creates a similar tree but slightly lower level representation with possibly some optimizations in space or time.

RTL then makes like a low level representation of the source code. This cannot be recognized anymore because it doesn't have any of the high level language references that you coded. Then the register allocation comes in and it assigns all the instructions. It stores frequently used variables in some registers to make it more efficient to run. RTL matches the registers with specific assembly instructions (using patterns) and it makes it possible to do the operations between them. Knowing which architecture are you going to use can allow you to create code that will run more efficiently on it.  

References:

Arno, 2007. "Episode 61: Internals of GCC". Software Engineering Radio. Retrieved February 5th 2017 in: http://www.se-radio.net/2007/07/episode-61-internals-of-gcc/