Git Product home page Git Product logo

phase-3-metaprogramming-introduction's Introduction

Introduction to Metaprogramming

Ruby has impressive metaprogramming capabilities. A traditional program is mainly code that manipulates a data structure and produces output, but metaprogramming allows us to essentially write code that writes code. Metaprogramming is one of Ruby's most powerful features: it lets you perform tasks in a few minutes that may take hours to do in other languages. By cleverly planning your code and applying the techniques mentioned here, you’ll be able to write code that is DRYer, lighter, more intuitive and more scalable.

In this section we'll be discussing and working through the following metaprogramming concepts:

  • Mass assignment
  • Keyword arguments

Ruby's metaprogramming features offer a lot of functionality. You could, in theory, write everything from scratch yourself, but doing that is very inefficient. In this section of lessons and labs, we'll reveal how metaprogramming makes sense, and is very needed in many situations.

A word of caution: the code in this section will be among the most abstract that we'll deal with to date, so don't worry if the concepts don't make sense immediately! It takes a lot of practice and a bit of re-training your programming brain to identify the kinds of problems that can be solved with metaprogramming.

phase-3-metaprogramming-introduction's People

Contributors

ihollander avatar lizbur10 avatar maxwellbenton avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.