Celebrate RubyConf with 40% off select Ruby and Rails books

Celebrate RubyConf 2012 with 40% off select Ruby and Rails books, limited time only.

A “FREE” Online Course: Programming for the Web with Ruby

Programming for the Web with Ruby

Registrations are now open for RubyLearning’s “FREE”, online course on “Programming for the Web with Ruby“. The previous batch had over 2000 participants. Web-based applications offer many advantages, such as instant access, automatic upgrades, and opportunities for collaboration on a massive scale. However, creating Web applications requires different approaches than traditional applications and involves the integration of numerous technologies. The course topics would hopefully help those that have some knowledge of Ruby programming to get started with web programming (this does not cover Ruby on Rails).

Who’s It For?

Anyone with some knowledge of Ruby programming.

Dates

The course starts on Saturday, 5th Jan. 2013 and runs for 2 weeks.

Is the course really free?

Though we would love that you pay at least US$ 10 for the course; the more the better! Yes, you are under no obligation if you do not want to pay anything at all and hence the course would be free for you.

How do I register and pay the course fees?

  • You can pay either by Paypal or send cash via Western Union Money Transfer or by bank transfer (if you are in India). The fees collected helps RubyLearning maintain the site, the various courses and provide quality content to you.
  • Once you pay the fees below, register on the RubyLearning.org site and send us your name and registered email id while creating an account at RubyLearning.org to satish [at] rubylearning [dot] com We will enrol you into the course which normally takes place within 48 hours.

After you click the “Buy Now” button below, you will be taken to a webpage as shown below.

Please enter the amount you want to pay for the course in the “Item price” field and click on the “Update” link. You can safely pay via PayPal.

You can now pay the Course Fees by clicking on the “Buy Now” button below.

Course Contents

  • DAY 1
  • Using Git
    • What’s Version Control
    • What’s Git?
      • Downloading and Installing Git
      • Create a local folder
      • Let us start using Git
      • Introduce yourself to Git
      • Create your SSH Key
  • Using GitHub
    • What’s GitHub?
      • Set up your GitHub account
      • Creating a new repository
      • Add your SSH key to GitHub
  • Using RVM (for *nix)
    • What is RVM?
    • Prerequisites
    • Installing RVM
    • Loading RVM into your shell
    • Reload shell configuration and test
    • Install a Ruby interpreter
  • Using pik (for Windows)
    • What’s pik?
    • Installing pik
    • Using pik
  • Exercise 1
  • DAY 2
  • Creating a simple webpage using HTML5, CSS and JavaScript
    • A Webpage, Step by Step
    • Before we begin, Launch a Text Editor
      • Step 1: Start with content
      • Step 2: Give the document structure
      • Step 3: Identify text elements
      • Step 4: Add an image
      • Step 5: Change the look with a style sheet
      • Add some JavaScript
  • Store your webpage files on GitHub
  • Exercise 2
  • DAY 3
  • Understanding HTTP concepts
    • What’s HTTP?
      • Loading a web page
    • HTTP request methods (verbs)
      • GET
      • POST
      • PUT
      • DELETE
    • Using cURL
    • HTTP response codes
    • net/http library
      • Using URI
    • Using open-uri
    • Using Hpricot
    • Using Nokogiri
      • Fetching documents from web
      • Searching inside HTML documents
  • Exercise 3
  • DAY 4
  • Creating one’s own Ruby Gem
    • What’s a Ruby Gem?
    • Let us create a simple Ruby library
    • Steps for publishing our gem
  • DAY 5 and 6
  • Learning Rack
    • Revisiting Ruby’s proc object
      • my_proc1.rb
    • Rack Specification
    • A simple Rack app – my_rack_proc
      • my_rack_proc.rb
    • Rack Documentation
    • Rack Source Code
    • Installing Rack gem
      • my_rack_proc2.rb
    • Another Rack app – my_method
      • my_rack2.rb
    • Using rackup
      • my_app.rb
      • Using Rack::Request and Rack::Response
      • A very basic practical Rack app
      • Another practical Rack app
      • Rack middleware
      • Using Lobster
    • Rack::Builder
  • DAY 7
  • Deploying Pure Rack Apps to Heroku
    • What’s Heroku?
      • Create an account on Heroku
      • Install Bundle
      • Deploy your app to Heroku
  • DAY 8
  • Deploying a static webpage to Heroku
  • DAY 9
  • What’s JSON?
  • Using MongoDB with Ruby Mongo driver
    • What’s NoSQL?
    • What’s MongoDB?
    • Setup MongoDB
    • MongoDB Core Concepts
    • The Basics
      • Switch databases
      • Insert a document
      • Use find()
      • Removing all documents
      • Query Selectors
      • Updating a document
    • MongoDB Ruby Driver – mongo
      • Installation
      • Using the mongo gem
      • Making a Connection
      • Getting a List Of Collections
      • Getting a Collection
      • Inserting a Document
      • Updating a Document
    • MongoHQ the hosted database
      • Sign Up
      • Create a database
      • Accessing the database
  • DAY 10
  • Sinatra
    • What’s Sinatra?
    • Create a folder on your hard disk
    • Install Sinatra
    • Which web server?
    • Our trivial Sinatra application
    • ERB and View
      • ERB
      • View
      • Handlers and Form parameters
  • Sinatra and mySQL interaction
    • Installing sqlite3 and activerecord gems
    • Understand CRUD, YAML and ActiveRecord
    • Building a CRUD app
    • Deploying our CRUD app to Heroku

The course contents are subject to change.

Mentors

Satish Talim, Victor Goff III and others from the RubyLearning team.

RubyLearning’s IRC Channel

Mentors and students hang out at RubyLearning’s IRC (irc.freenode.net) channel (#RubyLearning.org) for both technical and non-technical discussions. Everyone benefits with the active discussions on Ruby with the mentors.

Here are some details on how the course works:

Important:

Once the course starts, you can login and start with the lessons any day and time and post your queries in the forum under the relevant lessons. Just to set the expectations correctly, there is no real-time ‘webcasting’.

Methodology:

  • The Mentors shall give you URL’s of pages and sometimes some extra notes; you need to read through. Read the pre-class reading material at a convenient time of your choice – the dates mentioned are just for your guideline. While reading, please make a note of all your doubts, queries, questions, clarifications, comments about the lesson and after you have completed all the pages, post these on the forum under the relevant lesson. There could be some questions that relate to something that has not been mentioned or discussed by the mentors thus far; you could post the same too. Please remember that with every post, do mention the operating system of your computer.
  • The mentor shall highlight the important points that you need to remember for that day’s session.
  • There could be exercises every day. Please do them.
  • Participate in the forum for asking and answering questions or starting discussions. Share knowledge, and exchange ideas among yourselves during the course period. Participants are strongly encouraged to post technical questions, interesting articles, tools, sample programs or anything that is relevant to the class / lesson. Please do not post a simple "Thank you" note or "Hello" message to the forum. Please be aware that these messages are considered noises by people subscribed to the forum.

Outline of Work Expectations:

  1. Most of the days, you will have exercises to solve. These are there to help reinforce what you have just learned.
  2. Some days may have some extra assignments / food for thought articles / programs.
  3. Above all, do take part in the relevant forums. Past participants have confirmed that they learned the best by active participation.

Some Commonly Asked Questions

  • Qs. Is there any specific time when I need to be online?
    Ans. No. You need not be online at a specific time of the day.
  • Qs. Is it important for me to take part in the course forums?
    Ans. YES. You must Participate in the forum(s) for asking and answering questions or starting discussions. Share knowledge, and exchange ideas among yourselves (participants) during the course period. Participants are strongly encouraged to post technical questions, interesting articles, tools, sample programs or anything that is relevant to the class / lesson. Past participants will confirm that they learned the best by active participation.
  • Qs. How much time do I need to spend online for a course, in a day?
    Ans. This will vary from person to person. All depends upon your comfort level and the amount of time you want to spend on a particular lesson or task.
  • Qs. Is there any specific set time for feedback (e.g., any mentor responds to me within 24 hours?)
    Ans. Normally somebody should answer your query / question within 24 hours.
  • Qs. What happens if nobody answers my questions / queries?
    Ans. Normally, that will not happen. In case you feel that your question / query is not answered, then please post the same in the thread – “Any UnAnswered Questions / Queries”.
  • Qs. What happens to the class (or forums) after a course is over? Can you keep it open for a few more days so that students can complete and discuss too?
    Ans. The course and its forum is open for a month after the last day of the course.

Remember, the idea is to have fun learning Ruby.

Acknowledgments

About RubyLearning.org

RubyLearning.org, since 2005, has been helping Ruby Newbies go from zero to awesome!

Technorati Tags: , , , ,


(Powered by LaunchBit)

JRuby 1.7.0

Peter and Jason talk about JRuby 1.7.0, Phusion Passenger 4.0 beta 1, and much more.

Leaving a Legacy System revisited

Early last year, I posted about how we’ve unfortunately turned the word “legacy” into a bad word in the software industry.

At Nordic Ruby and again at Aloha Ruby Conf this year I turned this idea into an exploratory presentation. I think it turned out pretty well and is an important topic. Watch it and let me know what you think!

Velocity, Agile Estimation, And Trust

Charles Max Wood posted this on Twitter:

After trying like six times to fit my response in a tweet, I gave up and remembered that I had this web site where once upon a time I wrote things that were more than 140 characters.

Disclaimer: I have no idea how Charles’ team is working and what might have been said in planning meetings or anything else.

That said, here’s what I think.

The goal of agile project management is accepting the inevitability of change through continual feedback, continual improvement, and a realistic sense of progress. In an agile project, things that are hard when done in bulk — testing, integration, estimating — are done continually, in smaller pieces, to reduce complexity and risk.

Yes, in a functional agile project, velocity is set by team pace. Ideally, you had a meeting at the beginning of the sprint where you estimated velocity based on past performance, and determined the stories you hope to get done based on point estimates of the stories and that velocity. (Point estimates, remember, are measures of complexity, not time…)

It’s possible to be behind in a sprint, in some sense, if it doesn’t look like you are going to complete the agreed upon stories. For example, a story may turn out to be way more complex then estimated. Or a bug may have turned up. (Although agile point estimates are robust against bugs as long as bug fixes remain a roughly consistent percentage of your time).

Remedies for this problem might include changing the point value of a story when new information is determined, splitting the story, lowering velocity estimates going forward, moving a story to the next sprint. Retrospective meetings are a great place for trying to figure out why a story was mis-estimated.

However, trying to assess the state of the project in the middle of a sprint can be a little misleading. There can be a kind of optical illusion if a lot of stories start at the same time, where progress is being made but not booked because the stories aren’t finished. (Sometimes this means you need more granular stories.) Often, it’s helpful to organize the daily standup by outstanding story to give visibility to how stories are moving.

Charles is right that one of the points of Agile project management is not to work by wishful thinking of when you hope things will get done. If a story is more complex than we thought, then it just is, and you need to adjust to that by dealing with the software triangle — change scope, change time, change budget.

Granted #1: This requires a fair amount of trust between the team and the management that when the devs say something is taking longer than expected, that’s assumed to come from a place of expertise, not ignorance. You build trust by being right, and admitting it when you are not right.

Granted #2: Velocity and story points are robust against underestimating, as long as you are consistent. What will happen is that your velocity will settle at a point that factors in the overestimate. However, if specific stories or types of stories are continually taking more time than expected, it’s worth trying to figure out why. If for one reason or another, you aren’t the expected velocity isn’t being allowed to settle to a new state, that’s where the wishful thinking comes in. (Although if your actual velocity is continually dropping, that indicates a problem, too.)

Granted #3: Sometimes there are really are business needs for particular deadlines. That doesn’t change the laws of software physics, but it does determine what a reasonable response is from the team.

Okay, that’s more than 600 words, and I don’t know if I’ve answered the question.

  • In an agile project, velocity should be related to past performance, not hoped-for results.
  • If velocity is being determined top down — for example just trying to determine the velocity by guessing total story points in the project divided by sprints before deadline — that’s not really in the spirit of the thing.
  • It’s possible to miss expectations for a sprint, but the appropriate response to that is usually not “type faster”.
  • This all critically depends on trust between the project managers and engineers.

Wow, it’s been a while since I blasted out a blog post that quickly. Felt good. Hope this helps.

Velocity, Agile Estimation, And Trust

Charles Max Wood posted this on Twitter:

After trying like six times to fit my response in a tweet, I gave up and remembered that I had this web site where once upon a time I wrote things that were more than 140 characters.

Disclaimer: I have no idea how Charles’ team is working and what might have been said in planning meetings or anything else.

That said, here’s what I think.

The goal of agile project management is accepting the inevitability of change through continual feedback, continual improvement, and a realistic sense of progress. In an agile project, things that are hard when done in bulk — testing, integration, estimating — are done continually, in smaller pieces, to reduce complexity and risk.

Yes, in a functional agile project, velocity is set by team pace. Ideally, you had a meeting at the beginning of the sprint where you estimated velocity based on past performance, and determined the stories you hope to get done based on point estimates of the stories and that velocity. (Point estimates, remember, are measures of complexity, not time…)

It’s possible to be behind in a sprint, in some sense, if it doesn’t look like you are going to complete the agreed upon stories. For example, a story may turn out to be way more complex then estimated. Or a bug may have turned up. (Although agile point estimates are robust against bugs as long as bug fixes remain a roughly consistent percentage of your time).

Remedies for this problem might include changing the point value of a story when new information is determined, splitting the story, lowering velocity estimates going forward, moving a story to the next sprint. Retrospective meetings are a great place for trying to figure out why a story was mis-estimated.

However, trying to assess the state of the project in the middle of a sprint can be a little misleading. There can be a kind of optical illusion if a lot of stories start at the same time, where progress is being made but not booked because the stories aren’t finished. (Sometimes this means you need more granular stories.) Often, it’s helpful to organize the daily standup by outstanding story to give visibility to how stories are moving.

Charles is right that one of the points of Agile project management is not to work by wishful thinking of when you hope things will get done. If a story is more complex than we thought, then it just is, and you need to adjust to that by dealing with the software triangle — change scope, change time, change budget.

Granted #1: This requires a fair amount of trust between the team and the management that when the devs say something is taking longer than expected, that’s assumed to come from a place of expertise, not ignorance. You build trust by being right, and admitting it when you are not right.

Granted #2: Velocity and story points are robust against underestimating, as long as you are consistent. What will happen is that your velocity will settle at a point that factors in the overestimate. However, if specific stories or types of stories are continually taking more time than expected, it’s worth trying to figure out why. If for one reason or another, you aren’t the expected velocity isn’t being allowed to settle to a new state, that’s where the wishful thinking comes in. (Although if your actual velocity is continually dropping, that indicates a problem, too.)

Granted #3: Sometimes there are really are business needs for particular deadlines. That doesn’t change the laws of software physics, but it does determine what a reasonable response is from the team.

Okay, that’s more than 600 words, and I don’t know if I’ve answered the question.

  • In an agile project, velocity should be related to past performance, not hoped-for results.
  • If velocity is being determined top down — for example just trying to determine the velocity by guessing total story points in the project divided by sprints before deadline — that’s not really in the spirit of the thing.
  • It’s possible to miss expectations for a sprint, but the appropriate response to that is usually not “type faster”.
  • This all critically depends on trust between the project managers and engineers.

Wow, it’s been a while since I blasted out a blog post that quickly. Felt good. Hope this helps.

Heroku Postgres Releases Follow into GA


Today Heroku Postgres is releasing the ability to Follow your database General Availability: this lets you easily create multiple read-only asynchronous replicas of your database, known as followers.

Followers enable some great use cases:

Read more about this exciting feature on the Heroku Postgres Blog.

This Week in Ruby: JRuby 1.7.0, Passenger 4.0b1, Ruby 2.0 Feature Freeze

Welcome to this week’s Web-based syndication of Ruby Weekly, the Ruby e-mail newsletter.

Highlights include: a massive release for JRuby, a promising beta for Phusion Passenger 4.0, the announcement of a ‘feature freeze’ for Ruby 2.0, the Rails Rumble 2012 results, and just what did the Rails Rumble winners use to power their apps?

Featured

Ruby 2.0.0 ‘Feature Freeze’ Announced
Right on schedule, the core Ruby team have announced a ‘feature freeze’ for the forthcoming Ruby 2.0. All this means for now is that no features not already approved by matz will make it into 2.0.0.

Working with TCP Sockets: Jesse Storimer’s New Ruby E-Book
Jesse Storimer (‘Working with Unix Processes’) has released his latest book, Working with TCP Sockets. If you want to learn more about socket programming from a Ruby POV, check it out.

The 2012 Rails Rumble Results
A superb Rumble with 500 teams taking part and findthin.gs, a TV series and movie search tool, took the lead with the judges, with ‘Deploy Button’ being the public’s favorite.

Reading

Yehuda Katz: My Problem With Turbolinks
Rails 4.0’s ‘Turbolinks’ feature has been.. a little controversial. Yehuda explains what they are, as well as why he’s not entirely happy with them. And as a Rubyist who’s also very deep into JavaScript, his opinion counts for a lot.

Rails Rumble Winners, A Gem and Technology Teardown
The folks at Dwellable looked at the Gemfiles of the ten Rails Rumble winners and put together some interesting stats of what gems and technologies they used. Winning technologies included jQuery, CoffeeScript, Bootstrap, Sass, RSpec, Sidekiq and Haml.

Eating The (Ruby) 1.9 Elephant
The New Relic engineering team on the trials, tribulations, and eventual success in switching their app over to Ruby 1.9.

Version Your Ruby Objects with Aversion
Include the Aversion module into your objects and whenever the state of that object changes, Aversion remembers the change and keeps track of the history. Clever idea though beware of memory use if you go over the top with it.

Try mruby Today
mruby is a smaller, embeddable Ruby implementation that Matz is currently working on. This post by Richard Schneeman digs into what it’s about and how to give it a go for yourself. Aimed at an introductory level.

Create a Custom Slider With RubyMotion
A complete walkthrough of customizing a UISlider to get your own custom look and feel for a control within an iOS app built on RubyMotion.

Hybrid Concurrency Patterns: Threads and Events in Harmony with Celluloid
Describing a slide deck with ‘Ruby developers need to stop using EventMachine. It’s the wrong direction’ is a sure-fire way to get attention 🙂

Growing a Rails Application: How We Made Deploy Fast Again
The developers at PagerDuty brought their deploy time down from 10 minutes to 50 seconds. How? You gotta read for that.

Watching and Listening

Aaron Patterson on ‘Rails 4 and the Future of Web’
Earlier this month at Aloha Ruby Conference 2012, Aaron ‘tenderlove’ Patterson gave a keynote on a myriad topic of topics including threading, Rack, locking, and cats and how they relate to Rails 4.

Cache Digests (RailsCasts)
Episode 387 of RailsCasts is here(!) and Ryan Bates looks at the cache_digests gem which automatically adds a digest to fragment cache keys based on the template (so if a template changes the cache auto-expires).

The Ruby Rogues Discuss Service-Oriented Design with Paul Dix
Service-oriented design is the idea of taking a complex application with many parts and splitting them out into more modular parts that communicate with each other. Paul Dix chats to the Rogues about the concept.

Libraries and Code

GitLab 3 Released: An Open Source GitHub-Clone-In-A-Box, Sorta
GitLab is an open source Rails app that provides an interface for git repository hosting and management. Version 3 includes an in-page file editor. It takes a lot of inspiration from GitHub, though that’s not a bad thing.

RubyInstaller 1.9.3-p286 Released
In the last issue, we mentioned the new MRI 1.9.3-p286, released to patch up a couple of security vulnerabilities. Now, the Windows-based RubyInstaller distribution is also up to date (there’s also a build of 1.8.7-p371 if you’re still on 1.8.)

Gamebox: A Game Template for Building and Distributing Gosu Games
Generate a game and get it up and running quickly. Could be very handy for contests like Ludum Dare! It’s not new but somehow I hadn’t seen this before.

FIFO: Queueing Library Using Amazon’s Simple Queue Service
FIFO is a Ruby queueing library built on top of Amazon SQS. Like DelayedJob it encapsulates the pattern of executing tasks in the background but doesn’t rely on a database.

LiterateRandomizer: A Random Sentence and Paragraph Generation Library
Rubber tree and watched him. Vulgarized the larger than the faithful presence! Go slowly protruded round the beginning of shoulders.

Jobs

Rails Software Engineer at Sleepy Giant (Newport Beach, LA, Chicago)
Sleepy Giant is a game company based in Newport Beach. We are looking for Rails developers to join our talented team. You will work on high-profile, high-scale game services and franchise development projects, including green-field systems engineering.

Last but not least..

gSchool: An Intensive 6 Month Web Development Training Program
An intensive 6 month program to learn Ruby, Rails, JavaScript, CSS and HTML5 from scratch so you can build your own webapps. Run by esteemed Rubyist, Jeff Casimir.

40% off, Career Special!

40% off, Career Special expires 10/31/2012.

40% off, Career Special!

40% off, Career Special expires 10/31/2012.

#387 Cache Digests

The cache_digests gem (also included in Rails 4) will automatically add a digest to the fragment cache key based on the template. If a template changes the cache will auto-expire. But watch out for the gotchas!

Rails 4.0

In this episode, Jason and Peter talk about what’s new in Rails 4.0, Peter explains Ruby’s symbols, and there’s the usual round up of news and project updates.

The Past 2 Weeks in Ruby: 1.9.3-p286, JRuby 1.7RC2, Sidekiq Pro and Much More

Welcome to this week’s Web-based syndication of Ruby Weekly, the Ruby e-mail newsletter (just passed 17,000 subscribers – c’mon, sign up! :-)). While I have you, be sure to follow @RubyInside on Twitter as I’m going to be posting news more frequently there than on the Web site from now on.


The latest highlights include:

Featured

Ruby 1.9.3-p286 Released
The latest, official production patch-level release of MRI 1.9 is out. The primary motivation was for fixing a couple of security vulnerabilities and a handful of bugs.

A Whirlwind Tour of Rails 4
Andy Lindeman presents a 40 minute tour of some of the forthcoming Rails 4’s new features, including strong_parameters, Russian Doll caching, PATCH verb support, removal of Rails 2 finder syntax, and more. Recording and audio quality is very good.

The British Ruby Conference: Standard Tickets Now on Sale
Rubyists like Avdi Grimm, Russ Olsen, Dr Nic Williams, Aaron Patterson (and many more!) will be in Manchester, England in March 2013. Join us by grabbing a ticket now.

101 Things You Didn’t Know Ruby Could Do
James Edward Gray II just gave a talk at the Aloha Ruby Conference covering a bundle of random tricks you can do with Ruby. Here’s the slidedeck.

Sidekiq Pro: A Commercial, Supported Version of Sidekiq
Sidekiq is a efficient background job processor (think Resque on steroids) that’s free and open source, but creator Mike Perham is now offering a commercial variant with extra features and support.

RubyConf Australia 2013 Call for Proposals Open till October 31st
The conference itself is in Melbourne between February 20-22, 2013. Fancy a trip to the homeland of Dr Nic?

Reading

7 Ways to Decompose Fat ActiveRecord Models
Some handy tips and examples on breaking apart ‘fat models’ into separate objects that each encapsulate a concept.

So You Want To Optimize Ruby
Charles Nutter of the JRuby core team explains some of the ‘hard problems’ Ruby implementations need to solve before getting all gung-ho with benchmarks.

Explain: A Ruby Source to Natural Language Compiler
An interesting experiment in automatically converting Ruby code to English prose.

Would You Like A Mobile App With That?
Want to build your first Rails API-backed iPhone app? Follow along with Richard Schneeman here.

Lazy User Registration for Rails Apps
Goes into the concept of having your auth system providing an omnipresent anonymous user which can then be ‘upgraded’ to a regular user when the visitor chooses.

An Interview with Xavier Noria, The Code Gardener
Xavier Noria (a Ruby Hero and Rails core contributor) faces Pat Shaughnessy for an interview about how he got started with Ruby and Rails, what’s coming in Rails 4.0, and more.

Booleans are Baaaaaaaaaad
John Nunemaker is back and flying the flag for state machines saying that ‘using true/false for state is bad.’ Several interesting comments on this one; go join the fray.

Ruby Microframeworks: Camping and Cuba
Dhaivat Pandya looks at two unconventional webapp ‘microframeworks’.

How to Win a Hackathon
The Rails Rumble is just around the corner, so Brian Burridge has put together a series of seven short posts looking at how to do well in a hackathon situation.

Moving Forward With The Rails Asset Pipeline
A look at what’s happening with the Rails asset pipeline in Rails 4.0 and beyond.

Automating Web Performance with mod_pagespeed
mod_pagespeed is a just in time (JIT) performance compiler for the web. This free and open-source Apache module automates all of the most popular web-performance best practices by dynamically rewriting and optimizing your website assets. Google’s Ilya Grigorik shows it off.

Capistrano + Rails + Bundler + RVM + Unicorn + EC2 == Deployed
Practical instructions for deploying a Rails app on Amazon EC2 using Capistrano, RVM, Bundler and Unicorn.

Watching and Listening

Exploring RubyGems (RailsCasts)
In a mere 7 minutes, Ryan Bates offers some tips on researching gems to decide which ones to choose, or when to build something from scratch.

Ruby’s Symbols Explained
Never quite got your head around how Ruby’s symbols work and what they represent? Here’s a video from my Ruby Reloaded course now available to watch on YouTube.

Go Ahead, Make a Mess!
Sandi Metz, OO guru and author of ‘Practical Object-Oriented Design in Ruby’, talks about using the principles of object oriented design to make ‘messes’ in code manageable. Sandi always gives great talks; check it out.

How to Find Valuable Gems
At RailsConf 2012, Nathan Bibler talked about ways to find the right gems for your project (along similar lines to Ryan’s video above). My answer, of course, is to read Ruby Weekly and check out RubyFlow 😉

The Ruby Rogues on (Physical) Developer Environments
A discussion about ergonomics, chairs, standing desks, working in coffee shops, colors, multiple monitors, background noise, and more with the five always charming and chatty Ruby Rogues.

Live Reloading with Rails 4
Aaron ‘tenderlove’ Patterson shows off something he’s working on that brings live reloading functionality to edge Rails.

PeepCode Releases ‘Meet Chef’ Screencast
Chef is a handy sysadmin and server configuration tool and former 37signals sysadmin Joshua Sierles goes through the basics of building Chef recipes including for deploying Rails apps.

RubyTapas Episode 7: Constructors
Avdi Grimm continues with his RubyTapas project with this free episode digging into how Ruby constructs new objects and how to customize constructors for your own ends.

Libraries and Code

Opal: Ruby to JavaScript Compiler
A source-to-source compiler (so no special VM required) and the compiled code aims to be fast and efficient by mapping directly to underlying JavaScript features and objects where possible. Not the first such experiment but well presented.

Selfstarter: Roll Your Own Crowdfunding
A project called Lockitron raised $1.9m recently in a crowdfunding campaign. They had to build their own Kickstarter-esque software as Kickstarter rejected them and.. it’s in Rails and they’ve shared the source.

Fun with Unicode Math in Ruby
Want to use Unicode’s square root, sine, fraction, infinity, pi, or other mathematical symbols in your Ruby code? The unicode_math gem gets you there.

node-mruby: Embedding Ruby into Node.js
mruby is an embeddable Ruby interpreter and node-mruby makes it possible to embed mruby into Node.js. Very much a prototype/work in progress for the curious.

digest-sha3-ruby: An SHA-3 Library for Ruby
Based on the reference C implementation and attempting to maintain the typical ‘Digest’ API style, Phusion has released a library that implements the SHA-3 (Keccak) cryptographic hashing algorithm.

Poltergeist 1.0: Hooking Up Capybara to PhantomJS
Allows you to run your Capybara tests on a popular and powerful headless WebKit browser: PhantomJS.

ClientSideValidations 3.2 Released: A Key Release
ClientSideValidations extracts the validations from your Rails models and applies them to your forms directly on the client. 3.2 brings quite a few changes and extras, such as support for Rails 4.0’s Turbolinks feature.

Jobs

Ruby Engineer
Zendesk is looking for a Ruby engineer to join a team in San Francisco that’s focused on improving the application from the inside out. We care about elegant code and we are passionate about shipping great software – just like you.

Last but not least..

rubytune: Rails Shop Specializing in Performance and Troubleshooting
Joshua Sierles (ex-37signals) and Sudara Williams (ex-Engine Yard) have launched a consultancy focused on providing scaling, performance and server advice for Rails developers.

Next Ruby Reloaded Course to be Announced Soon
From time to time I run an online Ruby course aimed at intermediate Rubyists looking for a refresher or Rails developers who want more of a deep dive into Ruby itself. The 5th run finished a few weeks ago and I’ll be opening registration for Ruby Reloaded 6 very soon. Sign up to the list at the far bottom of the page to get a discount code and notified first (since it fills quickly.) Thanks!

Heroku Office Hours, Wed 10/17 at 3pm PDT

This Wednesday 10/17 from 3-5pm we will be holding office hours for customers and users in our San Francisco office.

This is an opportunity for you to come meet us and ask questions about developing your apps on Heroku. It is an opportunity for us to learn more about you and your needs.

.@heroku's front door.   /cc @maddox @rtomayko

Heroku engineers, product managers, and designers will be available to chat with you about your code, application, business, or whatever else you want. Maybe you’re a new user, and have some getting started questions. Perhaps you’ve been using Heroku for ages and have a high level architectural question. Or maybe you just want to shake someone’s hand from the Heroku Postgres team. Either way stop by our offices at 321 11th Street (at the corner of Folsom). We are next to Slims. We look forward to seeing you.


View Larger Map

The Value of Online Universities Courses for Learning Programming Languages

The Value of Online Universities Courses for Learning Programming Languages

Contemporary society is consumed with technology – and as such, trained computer scientists fluent in multiple programming languages often enjoy lucrative careers. Unfortunately, some traditional public schools and higher learning institutions continue to shy away from programs that specialize in these languages, many of which are extremely difficult to master. But in recent years, several prestigious colleges and universities have begun to offer online programming language tutorials – and most of the time, these web courses are free of charge.

Geekcorps computer training class, Bamako, Mali

Twenty years ago, computer science, much like biology, chemistry and other sciences, was an isolated field, and its applications had little relevance in other professions. Many people had computers in their office, but without the Internet these machines were little more than expensive typewriters and filing systems. Beginning in the mid-1990s, online access started to become prevalent in the United States, in households, workplaces and schools. According to a survey by NPR, 68% of adults used a computer for work in 1999, but only 34% had access to the Internet. In 2001, the U.S. Department of Labor reported that 38% of workers used the Internet for work; two years later, the number had risen to 41.7%.

The upward trend has continued ever since. In April 2012, Digital Trends reported that 94% of adults with a college degree utilize the Internet on a regular basis (household and/or workplace), while 80% of the total U.S. population uses the Internet at least sometimes (compared to 50% in 2000). As web access has become ubiquitous and more businesses have transitioned to online operations, computer science has become a field with ever-expanding reach. Virtually every office building employs an IT specialist to assist with computer problems, while some of the largest employers in the U.S. are software firms like Microsoft, Apple, Amazon and Google.

Despite all this, many experts argue that today’s computer specialists are not nearly as ‘specialized’ as they should be. InfoWorld contributor Neil McCallister recently noted that mandatory computer education for all students in public school – and an emphasis on programming languages for CompSci majors – would improve the overall rate at which our society functions. But so far, the public education system has hindered progress on this front. “The problem isn’t that computers don’t fit with the standard educational curriculum,” he wrote. “The problem is that the curriculum hasn’t evolved to incorporate the realities of the Internet Age.” Another problem, according to an April 2012 story by NPR, is a lack of computer science graduates. At the University of Washington, for instance, many students are unable to study computer science because the program has not increased its enrollment quota since 1999 – despite thousands of technology/IT positions in Seattle alone that need to be filled every year.

To amend this problem, many prestigious universities have come to the rescue in an unconventional way: by offering free online tutorials that teach web users programming languages such as Ruby, JavaScript, C++, and Alda. The Massachusetts Institute of Technology offers courses such as ‘Introduction to Mathematical Programming’, ‘Computer Language Engineering’ and ‘Multithreaded Parallelism Languages and Compilers’ to anyone with an Internet connection who wishes to take them. University of California, Berkeley is another school that offers a large number of online programming courses. Their current list includes ‘Java: Discovering Its Power’ and ‘PHP Programming for the Web’; the site also announces future term courses, such as ‘3-D Graphics and Game Engines’, ‘MATLAB and SCILAB for Economists, Scientists and Engineers’ and ‘Programming with Ruby’. There are even online courses for experienced computer science students. Stanford University, for example, launched a series of free online courses last year; the only stipulation for students is that they are already fluent in at least one programming language.

These online courses provide a short-term solution for the shortage of experienced programmers. However, the problem will not be effectively amended until public schools and higher learning institutions begin emphasize computer science as an essential field of study.

In September 2010, guest writer Geoffrey Grosenbach discusses how to learn Ruby (or any other programming language). In today’s guest post, Jennifer Jenkins adds a new insight into the discussion as she emphasizes the widespread availability of free online coding classes for prospective programmers and IT workers. Jennifer also regularly writes for http://www.onlineuniversity.net/, a website dedicated to revealing online resources for students of computer science and other fields. Please feel free to post your thoughts as comments to this post.

Technorati Tags: ,


(Powered by LaunchBit)

Upgrading to the Heroku Toolbelt

Heroku Toolbelt

The original version of the Heroku command-line tool was available as a Ruby gem. This made it easy to install on all platforms with just one command: gem install heroku. While we love this simplicity, it depends on a system install of Rubygems. To get this experience on widely varying development environments, we created the Heroku Toolbelt, a one-click installer for every major platform.

Going forward we will be sunsetting support for the heroku gem in favor of the Toolbelt. If you’re already using the Toolbelt, you’re fine to stop reading now. To verify whether you’re using the gem or Toolbelt, use heroku version:

$ heroku version
heroku-toolbelt/2.32.11 (universal-darwin12.0) ruby/1.9.3 autoupdate

If the output includes heroku-toolbelt, you’re all set.

Advantages of the Toolbelt

The Toolbelt is a self-contained installer that gives you everything you need to use Heroku. Some advantages of the Toolbelt include:

  • The Toolbelt is much faster, shaving several seconds off the startup of each heroku command.

  • The Toolbelt packages its own dependencies and will not conflict with your existing development tools.

  • The Toolbelt automatically keeps itself up to date with the latest available bug fixes, security updates, and new features.

Sunsetting the Gem

Starting today, all users still using the gem will see reminders to upgrade to the Toolbelt. This reminder will appear at most once daily when running a heroku command.

On December 1, 2012, we will stop releasing new updates to the heroku gem.

If you are using the heroku gem in your app to programatically access the Heroku API, we encourage you to migrate your code to the heroku-api gem. Existing versions of the heroku gem will remain on rubygems.org so any code referencing these gems should continue to function as long as the API they reference is available.

We encourage all users to upgrade to the Toolbelt today to take advantage of this new, streamlined CLI experience.

Ruby Programming 37th Batch: Registrations now open

Registrations are now open for RubyLearning’s popular Ruby programming course. This is an intensive, online course for beginners that helps you get started with Ruby programming.

Here is what Demetris Demetriou, a participant who just graduated, has to say – “When I joined this course I was sceptical about how useful this course would be for me instead of reading material and watching videos on YouTube and thus saving money. After the course started I realised how valuable this course was. In the past I had read many Ruby books over and over, but never got into really getting practical with it and never had confidence in it. Lots of theory but couldn’t use it. I feel that the exercises in this course and the support, monitoring from our mentor Victor, made the huge difference that all books in the past didn’t. It wasn’t about reading lots of books, but simply few things and get practical and understand them well. I feel I learnt a lot and I’m coming back for more to rubylearning.org Thanks a lot Victor and Satish and all the other Rubyists who gave us today’s Ruby.”

What’s Ruby?

Ruby

According to http://www.ruby-lang.org/en/ – “Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Ruby’s elegant syntax is natural to read and easy to write.”

Yukihiro Matsumoto, the creator of Ruby, in an interview says –

I believe people want to express themselves when they program. They don’t want to fight with the language. Programming languages must feel natural to programmers. I tried to make people enjoy programming and concentrate on the fun and creative part of programming when they use Ruby.

What Will I Learn?

In the Ruby programming course, you will learn the essential features of Ruby that you will end up using every day. You will also be introduced to Git, GitHub, HTTP concepts, RubyGems, Rack and Heroku.

Depending on participation levels, we throw a Ruby coding challenge in the mix, right for the level we are at. We have been known to give out a prize or two for the ‘best’ solution.

Who’s It For?

A beginner with some knowledge of programming..

You can read what past participants have to say about the course.

Mentors

Satish Talim, Michael Kohl, Satoshi Asakawa, Victor Goff III and others from the RubyLearning team.

Dates

The course starts on Saturday, 3rd Nov. 2012 and runs for seven weeks.

RubyLearning’s IRC Channel

Most of the mentors and students hang out at RubyLearning’s IRC (irc.freenode.net) channel (#rubylearning.org) for both technical and non-technical discussions. Everyone benefits with the active discussions on Ruby with the mentors.

How do I register and pay the course fees?

  • The course is based on the The Ultimate Guide to Ruby Programming eBook. This book is normally priced at US$ 19.95 and we are discounting it US$ 10.00 by combining it in the Course+eBook option below.
  • You can pay either by Paypal or send cash via Western Union Money Transfer or by bank transfer (if you are in India). The fees collected helps RubyLearning maintain the site, this Ruby course, the Ruby eBook, and provide quality content to you.
  • Once you pay the fees below, register on the RubyLearning.org site and send us your name and registered email id while creating an account at RubyLearning.org to satish [at] rubylearning [dot] com We will enrol you into the course within 48 hours.
  • If you have purchased the eBook at the time of registration, we will personally email you the eBook within 48 hours.

You can pay the Course Fees by selecting one of the three options from the drop-down menu below. Please select your option and then click on the “Buy Now” button.

Options

At the end of this course you should have all the knowledge to explore the wonderful world of Ruby on your own.

Here are some details on how the course works:

Important:

Once the course starts, you can login and start with the lessons any day and time and post your queries in the forum under the relevant lessons. Someone shall always be there to answer them. Just to set the expectations correctly, there is no real-time ‘webcasting’.

Methodology:

  • The Mentors shall give you URL’s of pages and sometimes some extra notes; you need to read through. Read the pre-class reading material at a convenient time of your choice – the dates mentioned are just for your guideline. While reading, please make a note of all your doubts, queries, questions, clarifications, comments about the lesson and after you have completed all the pages, post these on the forum under the relevant lesson. There could be some questions that relate to something that has not been mentioned or discussed by the mentors thus far; you could post the same too. Please remember that with every post, do mention the operating system of your computer.
  • The mentor shall highlight the important points that you need to remember for that day’s session.
  • There could be exercises every day. Please do them.
  • Participate in the forum for asking and answering questions or starting discussions. Share knowledge, and exchange ideas among yourselves during the course period. Participants are strongly encouraged to post technical questions, interesting articles, tools, sample programs or anything that is relevant to the class / lesson. Please do not post a simple "Thank you" note or "Hello" message to the forum. Please be aware that these messages are considered noises by people subscribed to the forum.

Outline of Work Expectations:

  1. Most of the days, you will have exercises to solve. These are there to help you assimilate whatever you have learned till then.
  2. Some days may have some extra assignments / food for thought articles / programs
  3. Above all, do take part in the relevant forums. Past participants will confirm that they learned the best by active participation.

Some Commonly Asked Questions

  • Qs. Is there any specific time when I need to be online?
    Ans. No. You need not be online at a specific time of the day.
  • Qs. Is it important for me to take part in the course forums?
    Ans. YES. You must Participate in the forum(s) for asking and answering questions or starting discussions. Share knowledge, and exchange ideas among yourselves (participants) during the course period. Participants are strongly encouraged to post technical questions, interesting articles, tools, sample programs or anything that is relevant to the class / lesson. Past participants will confirm that they learned the best by active participation.
  • Qs. How much time do I need to spend online for a course, in a day?
    Ans. This will vary from person to person. All depends upon your comfort level and the amount of time you want to spend on a particular lesson or task.
  • Qs. Is there any specific set time for feedback (e.g., any mentor responds to me within 24 hours?)
    Ans. Normally somebody should answer your query / question within 24 hours.
  • Qs. What happens if nobody answers my questions / queries?
    Ans. Normally, that will not happen. In case you feel that your question / query is not answered, then please post the same in the thread – “Any UnAnswered Questions / Queries”.
  • Qs. What happens to the class (or forums) after a course is over? Can you keep it open for a few more days so that students can complete and discuss too?
    Ans. The course and its forum is open for a month after the last day of the course.

Remember, the idea is to have fun learning Ruby.

Technorati Tags: , , ,


(Powered by LaunchBit)

Ruby 1.9.3-p286

Peter and Jason talk about the latest Ruby release, JRuby 1.7.0 RC2, what’s up in Rails 4.0, and more.

Booleans are Baaaaaaaaaad

First off, did you pronounce the title of this article like a sheep? That was definitely the intent. Anyway, onward to the purpose of this here text.

One of the things I have learned the hard way is that booleans are bad. Just to be clear, I do not mean that true/false is bad, but rather that using true/false for state is bad. Rather than rant, lets look at a concrete example.

An Example

The first example that comes to mind is the ever present user model. On signup, most apps force you to confirm your email address.

To do this there might be a temptation to add a boolean, lets say “active”. Active defaults to false and upon confirmation of the email is changed to true. This means your app needs to make sure you are always dealing with active users. Cool. Problem solved.

It might look something like

Continue reading “Booleans are Baaaaaaaaaad”