Skip to content

SF-WDI-LABS/idiomatic-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

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 our class Google Drive folder 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:

About

Landing page for idiomatic ruby lecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published