An Introduction to Metaprogramming

In this blog, I will discuss the article titled "An Introduction to Metaprogramming" written by our professor Ariel Ortiz. Meta programs are basically programs that allow you to create other programs, or basically simplify the process of programming by reducing the size of the problem.

Like its said in the article: Metaprogramming allows you to automate error-prone or repetitive programming tasks. Some types of metaprogramming are source code generation, quines and modifying programs during runtime. It seems a bit difficult to find practical implementations to implement this methods in production software. But am sure there are many specific situations when metaprogramming can save you a lot of time and resources. In a way, this methods can be viewed as the equivalent of “party tricks” in the programmer world: not all people can write this type of code, but when someone can, it looks pretty cool.

Self replicating code is really interesting. Looking online you can find some neat examples of codes people have written.

This quote from Richard Sites is pretty interesting: “I’d rather write programs that write programs than write programs”. He is basically saying that he doesn’t want to build entire programs, but instead build programs that are good or smart enough to complete the task. This makes me think if in the future our “meta programming” skills will be so advanced that we won’t have the need to build entire systems, but instead code small scripts that would do it instead. Would be a bit like artificial intelligence, but not that much really.

It would have been interesting if earlier in our studies teachers could have challenged us to write metaprograms of easy programs, like the example of the Erika program in the article,  just to better grasp the idea of meta programming at an early stage in our learning.

Comentarios

Entradas populares de este blog

Is Design Dead?

Software Craftsmanship