An Introduction to Metaprogramming
Once you're familiar with the techniques, metaprogramming is not as complicated as it might sound initially. Metaprogramming allows you to automate error-prone or repetitive programming tasks. You can use it to pre-generate data tables, to generate boilerplate code automatically that can't be abstracted into a function, or even to test your ingenuity on writing self-replicating code.
The Jargon File: www.catb.org/esr/jargon
Ruby Cookbook by Lucas Carlson and Leonard Richardson, published by O'Reilly Media, 2006. Chapter 10 of this book contains 16 recipes on reflection and metaprogramming using Ruby. Highly recommended.
The Quine Page: www.nyx.net/~gthompso/quine.htm. This Web page contains quines in many different programming languages. It even has quines that work in more than one language.
Ariel Ortiz is a faculty member at the Computer Science Department of the Tecnolgico de Monterrey, Campus Estado de Mexico. He's been teaching computer programming for almost two decades. He's not too sure what his favorite programming language is, but he thinks it's either Scheme, Python or Ruby. He can be reached at firstname.lastname@example.org.
- Give new life to old phones and tablets with these tips!
- Memory Ordering in Modern Microprocessors, Part I
- Python Scripts as a Replacement for Bash Utility Scripts
- Source Code Scanners for Better Code
- Putlocker!! Watch Begin Again Online 2014 Streaming Full Movie
- RSS Feeds
- September 2014 Issue of Linux Journal: HOW-TOs
- Using Django and MongoDB to Build a Blog