Want a new $$$ stream for your Rails consulting business?
Summary: click to select
Ruby on Rails started in the DHH’s “basement” and was picked up by alpha geeks around the world over the last few years. Now, beta geeks and business people are picking it up. This is a good thing - it means you can get a job in Rails, or do Rails consulting/freelancing and have clients who know what Rails is and what it can do for them.
But they don’t know code. They don’t know good code, and they don’t know good developers.
Aha! You are a good developer; perhaps you can help?
Start offering “code audits” and “code reviews” to companies/teams/other freelancers, as recently offered by Robby Russell’s Planet Argon company.
Its an awesome opportunity for you to help other developers with feedback, help business owners know what’s going on with their development teams, and make $$$.
$$$ is good and making it should make you happy.
Should you be in a situation where you have gaps of time between consulting projects, or your a full-time employee looking to start into the consulting world, perhaps start offering Code Reviews and Code Audits as a service.
Its also a nice service to offer companies that didn’t hire you for a job, but went with someone else instead.
Thank you for considering us for your project. Although you did not select our company for the development, we know you’ve chosen someone competent. You may be interested in our complimentary service - code audits and code reviews. If its ok, we’ll contact you in a month or so to offer you this service so you know that your developers are on track and doing an excellent job!
Ok, that’s a crappy sales letter, but you get the gist.
[Story] The teacher’s job is simple: Ask the right questions
I’ve lived in India and one thing is immediately apparent: they’ve got more people than you do. And most of them are poor, by our standards. Poor people don’t get to use computers, do they?
One very interesting experiment showed what happens when you install computers connected to the Internet in “holes in the wall”, and observed what they did. The article is an interview with the man who setup the experiment, and covers subsequent experiments he ran, such as “Can year 9 students answer questions from the year 10 exam if you give them 2 hours and the internet?”
It leads the introduction of the term “minimally invasive education”. For the most part, this is just how you learnt Ruby, Javascript or anything else since you left school. I bet you are a better student now than you were then too. That’s not the case for most adults - see the last quote below.
It is a fascinating article on learning, on how children learn, and on the consequences of 1.2 billions Indians “going online”.
Interesting quotes
the most avid users of the machine were ghetto kids aged 6 to 12, most of whom have only the most rudimentary education and little knowledge of English. Yet within days, the kids had taught themselves to draw on the computer and to browse the Net.
If the adult was simply underestimating the child’s ability to cope with a computer, then that should happen with any child. And I asked myself, “Why then would we want to use the same teaching methods for children as we use for teaching adults?”
I went to a middle-class school and chose some ninth graders, two girls and two boys. I called their physics teacher in and asked him, “What are you going to teach these children next year at this time?” He mentioned viscosity. I asked him to write down five possible exam questions on the subject. I then took the four children and said, “Look here guys. I have a little problem for you.” They read the questions and said they didn’t understand them, it was Greek to them. So I said, “Here’s a terminal. I’ll give you two hours to find the answers.” … They answered all five questions in two hours.
What is important is infrastructure and access … The teacher’s job is very simple. It’s to help the children ask the right questions.
you can multiply the effectiveness of 10 teachers by 100 - or 1,000 - fold if you give children access to the Internet.
There are 50 or 60 million cable-TV connections in India at this point in time. The guys who set up the meters, splice the coaxial cables, make the connection to the house, etc., are very similar to these kids. They don’t know what they’re doing.
The only reaction we got from adults was, “What on earth is this for? Why is there no one here to teach us something? How are we ever going to use this?” I contend that by the time we are 16, we are taught to want teachers, taught that we cannot learn anything without teachers.
[Wish] Spam filter by Language
Does anyone know to whom I address and send this letter?
Dear Gmail,
Thank you for Gmail. I love it and would hug it if it were a teddy bear and no one was looking.
Recently, some Asian-origin spammers have included me in their lists. A while back, it was some Russian spammers, or thereabouts.
If the contents of my emails don’t fit into the basic English ASCII set of characters, plus some of those European characters with the cute accents on the tops, then the email probably isn’t one I can read, thus spam or not, I’m just not that interested.
I doubt I’m alone in my mono-linguistic capabilities either.
Either help me filter out foreign language spam, or let me translate it and then with confidence I can say “No I don’t want a chinese nor russian penis enlarger, but thanks for asking”.
Yours sincerely,
Dr Nic
Do you write code and smile?
Do you write code and smile?
Do spend two hours on a hack to save yourself one hour of time?
Is being a great coder important to you, even if you don’t know why its important?
Do you derive a sense of pride from a few lines of code you wrote?
I thought of all these questions whilst watching a great guitar clip… he’s gone beyond learning Pachelbel’s Canon in D Major, and overlayed his own code. Underneath the hat, I’m sure he’s smiling.
His pride for his guitar work makes me happy for my coding. You?
Ajax on Rails - Prototype vs JQuery
[Original article published on DevLounge - please post comments there]
When you unpack your shiny new version of Rails and generate your first Ajax link, you are using the Prototype library. It’s beautiful to use. It adds many Rails-like constructs into the Javajscript language, e.g. the each method to iterate a closure over an array. Sexy stuff.
But the following effect isn’t done using Prototype:

It was done in a few lines of Javascript using the jQuery library [1].
$(“.tick”).hover(function() { $(this).removeClass(“tick-off”).addClass(“tick-on”).announceButton(this) }, function() { $(this).removeClass(“tick-on”).addClass(“tick-off”); });
Prototype provides a comprehensive library of base classes, such as Element and Hash, where as jQuery is fundamentally different. It provides just one entity - the jQuery object. This is created using the familiar $ function and represents a collection of DOM nodes, rather than just one.
The jQuery object is then extended and extended and extended with all the functionality you need - scriptaculous-like effects, Ajax calls, prototype-like manipulations, etc. JQuery plugins
Yehuda Katz - author of autoDB - the dynamic admin console for Rails apps - has his feet deep in jQuery land as well. He manages the Visual JQuery documentation, and recently wrote an article comparing the philosophies of Prototype and JQuery, to help people understand how they are different.
The core problem for Rails developers who might like to try out jQuery is that it eventually conflicts with the prototype library when you start to use Rail’s “in-built” helpers for prototype.
But perhaps you do not need to use these helpers, as an increasing number of jQuery plugins start to provide more and more elegant client-side functionality. For example, an InPlaceEditor extension, and many others.
Want something truly pretty developed using jQuery - how about the planets revolving around the sun?
Work is also underway to integrate jQuery into Rails, including its own set of helpers, code named JQuails.
Many Rails developers might not be familiar with the abilities of alternative Javascript libraries as they get prototype/scriptaculous embedded for free. Yet it would be wise for all developers to be aware and competent in multiple frameworks, so that the best tools for each job can be selected. There is certainly some momentum behind jQuery in the wider development community. To Rails developers I say, Keep a Look Out!
[1] The Hover Demo Script was written as pure Javascript to make it easy to download. Firstly it disables the static image (for RSS feed and non-JS environments), and then creates the DIVs for the effect. The hover effect is then setup by applying the hover function to all elements of the class tick. The two functions we pass it perform the CSS class manipulation that gives the effect. Note the use of chain calls that make the syntax so attractive.
Note also that we’ve added a custom function to the jQuery object - announceButton. It assumes that only one button is active at a time, uses this[0] to determine which one it is. The function then returns the jQuery object (stored as this) to allow the standard method chaining to continue.
