Code Monkey home page Code Monkey logo

idiomatic-ruby's Introduction

Idiomatic Ruby

Why is this important?

This workshop is important because:

The Ruby Programming Language is written to be as close to the natural English language as possible. To properly code in Ruby we should abandon our previous structures and explore the 'ease' of Ruby Idioms.

What are the objectives?

After this workshop, developers will be able to:

  • Discuss the proper usage of Ruby methods and syntax
  • Compare and contrast the difference between a Javascript way and Ruby way of approaching a problem
  • Create methods that demonstrate best practices and efficient code.

Where should we be now?

Before this workshop, developers should already be able to:

  • Synthesize basic Ruby statements
  • Understand the various data types in Ruby
  • Navigate and execute live code in irb, pry, or a .rb file.

##Overview Idiomatic is the concept of using, containing, or denoting expressions that are natural to a native speaker. Idiomatic programming means that your program contains statements that are unique to the language; i.e., you actually use the expressive power (or lack thereof โ€“ PHP) of the language in your programs.

Ruby takes advantage of having language-specific expressions and methods. The more comfortable you are with built-in features, the more succinct and self-documenting your codebase will become.

Don't talk so much!

##TODO: Navigate to this Google Document and create Ruby methods for each problem. You will be coding as a table group. Once your method achieves the provided input/output goals, submit your group's code in the appropriate space. Try to keep it short and sweet!

What did we cover?

  • Returning implicitly is now a thing
  • Return early and return often
  • Check if a helper method exists before creating one
  • Ruby has many built-in methods available to us.

Further Reading:

idiomatic-ruby's People

Contributors

justincastilla avatar

Watchers

James Cloos avatar Ben Manning 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.