6 things to try in Rails this year

It seems that blog posts in the first couple of weeks of the new year (happy new year by the way) follow the “x things to do this year” meme as a virtual homage to new years resolutions. Never one to buck a trend, I have prepared this short list of things you should try in Ruby and in Rails – I hope to cover each topic in more detail over the next couple of weeks.

  1. Install Rails: This is aimed at those of you out there that haven’t tried Ruby on Rails yet. Jump in – have a go, there are plenty of resources out there, and it is fairly easy to install regardless of your platform
  2. Upgrade to Rails 2.0: I have covered what’s new in Rails 2.0 in a number of my previous posts, and upgrading isn’t really THAT difficult if you follow the steps and fix any deprecation notices.
  3. Write a plugin: Plugins allow you to re-use common patterns without having to resort to the dreaded cut-and-paste keys. Rails has a built in plugin generator that gives you the skeleton code, all you need to do is to mix-in the right modules – oh, and write the code…
  4. Try out RESTful routes: RESTful Rails have been around for a while now, but many of the tutorials around the net are still CRUD based, so if you are a Rails beginner, you might not have tried them out yet.
  5. Use Ruby as your scripting language: Because Rails does such an excellent job of doing the hard work, it is very likely that you have never had to manually connect to a database or read the contents of a directory or performed other mundane tasks in Ruby. If you have to do any scripting, instead of PERL or Python, use Ruby – it will help you better understand the nuances of the language.
  6. Refactor your code the Ruby way: If you have come from other C-like languages (such as PHP or Java) you would
    be used to the idioms from that style of coding. Try refactoring your code to use blocks instead of for loops, or using inline if statements – you can squeeze a lot into one line in Ruby, see how far you can push it. Again, this is a great exercise to learn the language.

Go on, try them out – the new year is a great time to try something new!


Category: programming Time: 2008-01-09 Views: 0

Related post

  • Plugin or theme that sort posts as 'top this year' and 'top last month"? 2011-03-22

    Is there any free WordPress plugin or theme that sort posts as 'top this year' and 'top last month" or 'top 24 hours' based on voting? I'm using the Vote It Up plugin right now. But it doesn't have the capability of sorting post as a loop. Any sugges

  • Why I obtain this error when I try to perform this simple bash script? 2014-08-03

    I am following this tutorial to correctly execute Aptana Studio on my Ubuntu 14.04: Command menu in aptana studio 3 is not working in ubuntu 14.04 So I have installed the Oracle JRE and finnally I have create this run.sh file that have to execute Apt

  • Printing the days of the week for every day this year 2015-09-10

    @chux pointed out that my attempted solution contained several problems. Since I screwed that up so badly, I figure that I should put my revised solution up for review. #include <stdio.h> #include <time.h> /** * The current year (number of yea

  • 4-year old CPU more powerful than CPU released this year? 2015-11-17

    My current laptop has a Core i7-2670QM CPU which was released in October 2011: When I look at more recent laptops, with CPUs released this year, it's not clear which one is more powerful. For instance the Core i7-5500U CPU released in January 2015: I

  • Have you been nice this year? 2015-12-20

    Introduction Santa has too many names to process, and needs your help! He needs you to write a program or a function, which outputs nice, naughty, very naughty or very very naughty. To determine how nice or naughty someone is, Santa had developed an

  • Retrieve mysql records using datetime a week before the event and then all events already expired this year 2016-02-02

    I have an exhibitions page on my website that I want to list all events coming up a week before they start and also to keep them displayed until the end of the current year after the event. We used to have them displayed all year but my employer now

  • Pop Quiz: What are the sources of this year's revenue? 2004-08-26

    Take a moment to list all of your projects from this year. Then list the source of each of the projects. What does that tell you about: – Marketing that is working for you? – Marketing that isn't working for you? – Business development activities you

  • Report: SaaS to Take Off This Year 2009-01-13

    According to a survey conducted by Evans Data Corporation, more than half of all developers around the world are expecting to work in some capacity on software as a service (SaaS) applications in 2009, reports InfoWorld. Evans Data surveyed 1300 deve

  • how can I try to revive this AGM deep-cycle battery which started to perform dramatically below specifications? 2011-03-23

    I have a AGM deep-cycle battery, 150 Ah, 12V: Banner "Stand By Bull" SBV12-150. 12V150AhC20. Up until recently it was working quite OK, I was able many times, for many months, to drain about 170 mA from the battery for a month before recharging

  • Day of the week for a given date of this year. Do not use any date tools 2012-07-14

    Please write a program that takes as input two numbers 'day of the month' and 'month number' for any day of this year (2012) and outputs day of the week. Examples: % ruby ./golf.rb 14 07 # 14th of July "Sat" % ruby ./golf.rb 14 7 # the same &quo

  • How to generate a list of years dynamically starting with this year 2012-12-07

    Wondering how I would use either EE or PHP to dynamically generate a list of years starting from this year. I'm doing this for a credit card expiry select box that needed to use EE global variables for the label, which is why i couldn't just use the

  • In QGIS, has FGDB support improved this year, 2013? 2013-08-30

    I'm aware that there are users who successfully use Esri File Geodatabases with QGIS 1.8 Lisboa. FGDB support in QGIS requires the Esri API for FGDB, which is not open source (as I understand), and QGIS does not support it by default. Has this year (

  • SOQL Query to count only Accounts with Opps in both this year and last year? 2014-08-01

    So rather than create an Apex class, run multiple queries then write some code to figure out the answer, I thought I'd take a stab at writing a complex query that would get me the answer I'm looking for. Naturally, it's harder than I anticipated... T

  • Will support for 14.10 stop this year? 2015-02-13

    This question already has an answer here: Why does Ubuntu only support versions for a limited time (and what does it mean)? 4 answers A month back I have transitioned from Windows to Linux and I have utopic installed in my system. No complaints till

  • SOQL query for events with who.createddate = this year 2015-04-23

    I'm trying to query for events where the Name (whoID) lead or contact was created within a certain time frame. This is what I have but it's giving me an error using the field who.createddate. select meeting_outcome__c, what.name from event where who.

  • Is there a way to get all the NEWS.gz which is/was this year in /usr/share/doc/ of $PACKAGENAME. 2015-09-25

    If people go into /usr/share/doc/$PACKAGENAME (you can use any valid package name which you have installed on your system) you will see that the directory has various files in it, at the very least changelog.Debian.gz, changelog.gz, copyright and som

  • ExactTarget list of unsubscribes this year 2015-10-28

    I'm wondering how to access a unsubscribe list. Usually in a given blast, for ex 250 approx I'll get 3 Unsubscribes. Where can I get a list of all Unsubcribes for this year? is there a place in ET? I've also looked in ExactTarget Reporting and I look

  • How to sync only those photos that were taken this year? 2015-11-07

    In my Photos.app (Mac), photos were taken from 2013, all of which are supposed to be synced to iCloud since OS X upgraded to EL Capitan. It's not possible to sync all to my iPhone because the total photo library size is bigger than 5G. Is there a sel

  • Check date if exist in this year or not in Objective c 2016-01-29

    I googled and found many link which compares 2 dates but my scenario is bit different and I am unable to found in google. I want to compare date either exist in this year or not. I have date like in this format. 2016-01-20T06:19:27 so If below than c

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 1.473 (s). 13 q(s)