background preloader

What is ruby?

What is ruby?

19 Rails Tricks Most Rails Coders Don’t Know New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast. A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. Please note that this post is over four years old - it's from 2006! When looking at my own Rails code and that of the community as a whole, I often see places where certain Rails techniques could have been used, but weren't. Benchmark logic in your controller actions - It's really easy. User.benchmark("adding and deleting 1000 users") do 1000.times do User.create(:name => 'something') x = User.find_by_name('something') x.destroy endend Of course, your code would be a lot better ;-) The regular SQL logs are not shown when within the benchmark sections. acts_as_nested_set - Almost everyone is familiar with acts_as_tree, but acts_as_nested_set snuck into Rails quietly. You can learn a little more here. Get lots of info about requests - Checking request.post?

74 Quality Ruby on Rails Resources and Tutorials Learning Rails from scratch can be a pain. But don't fret, this guide provides the best Rails resources the Web has to offer. Ruby on Rails is quickly becoming one of the most popular modern programming language framework combinations. Related Articles: Fortunately for you, we've compiled a list of the best Rails resources the Web has to offer. Installation Sometimes, the most time consuming part of learning a new programming language is simply installing a working version of the software. Manual Installation If you're interested in getting Rails to work on your own, you'll need to follow the following steps: Ruby – First you need to download Ruby. Why do all of the work when someone else will do it for you? Instant Rails – One-click Rails installer for Windows. These step-by-step guides will walk you through the installation process. How-tos Installation – If you get stuck, or want to try to install Ruby to a more obscure operating system, look here. Tutorials Beginner Tutorials Try Ruby!

A MiniTest::Spec Tutorial: Elegant Spec-Style Testing That Comes With Ruby Despite RSpec's awesomeness, Test::Unit remains the most popular Ruby testing tool out there outside of Rails apps. I've recently been code walking through a lot of Ruby libraries for my Ruby Reloaded course and the typical arrangement is Test::Unit, sometimes coupled with Shoulda or Contest for some extra syntactic sweetness. Part of the reason for Test::Unit's enduring popularity is its presence in the Ruby standard library but, also, its general 'lightness' and speed. When you're writing a large app, using a powerful full-featured system like RSpec has significant benefits (particularly stakeholder involvement in writing the specs). But when you're working on a library that might spread far and wide and is aimed solely at developers, the pros of Test::Unit shine through. Enter MiniTest Note: Ruby 1.8 users can run gem install minitest to get MiniTest too but it's not part of the standard library there. What Does MiniTest::Spec Look Like? Nothing too unusual there, I hope. Give It A Try

21 Ruby Tricks You Should Be Using In Your Own Code Writing for Ruby Inside, I get to see a lot of Ruby code. Most is good, but sometimes we forget some of Ruby's shortcuts and tricks and reinvent the wheel instead. In this post I present 21 different Ruby "tricks," from those that most experienced developers use every day to the more obscure. Whatever your level, a refresh may help you the next time you encounter certain coding scenarios. Note to beginners: If you're still learning Ruby, check out my Beginning Ruby book. 2009 Update: This post was written in early 2008 and looking back on it, there are a couple of tricks that I wouldn't recommend anymore - or to which extra warnings need to be added. 1 - Extract regular expression matches quickly A typical way to extract data from text using a regular expression is to use the match method. email = "Fred Bloggs <fred@bloggs.com>"email.match(/<(.*?) Ultimately, using the String#[] approach is cleaner though it might seem more "magic" to you. x = 'this is a test' x[/[aeiou].+? puts x == 10 ?

Blog — All about Ruby programming. The Wonderful Tech Wizards of Oz Photo by David Jackmanson / Flickr The Information and Communication Technology sector is the fifth highest paying career group in Australia, with entry salaries starting at $88,000 and median salaries of $100,000. This ranking is both because of, and contributes to, Australia’s growing IT leadership. Over 50 software companies are listed on the Australian Stock Exchange. The growth of technology centers created by governmental planners and business networks, such as the Bentley Technology Park in Western Australia (adjacent to Curtin University of Technology), the Digital Harbour at Docklands in Melbourne, and the Macquarie Park in Sydney (including the Research Park and Macquarie University), combined with respected universities and the roll-out of the National Broadband Network, all demonstrate the IT successes of the Aussies! School ‘Em at Home! And Hook ‘Em All Up!

Ruby | PeepCode Screencasts ▶ We’ve been acquired by Pluralsight! ▶ Upgrade your account to Pluralsight ▶ More details… Filter by tag: Ruby on Rails · Ruby · Javascript · Play by Play · Unix · RSpec · Deployment · Pdf · Design · Cocoa · iPhone · Node · Databases · Productivity · Git Play by Play: Katrina Owen RSpec 2: with Rails 4 and Ruby 2 (Part 3 of 3) Play by Play: Refactoring with Ben Orenstein Play by Play: Aaron Patterson and Corey Haines RSpec 2: Tools (Part 2 of 3) RSpec 2: The Basics (Part 1 of 3) Meet Chef (Part 2 of 2) Meet Chef (Part 1 of 2) Play by Play: Jim Weirich Meet EventMachine: Part II Meet EventMachine: Part I Play by Play: Francis Hwang Meet PostgreSQL Play by Play: John Barnette Play by Play: Gary Bernhardt Meet Sinatra

Related: