Rails FTW!

Second Rails post of the week. I don’t really mind since it’s just going to be a small post and would let me reach my 2 post per week quota this early.

Rails for Windows

Remember that post about Ruby on Windows? Well, one thing led to another and PhRUG thought it was a good idea to fork the RubyInstaller to create an installer which includes everything one needs to create a Rails 3 app (Ruby + Rails + SQLite). Being the sneaky guy I am, I decided to create a proof of concept installer by hacking away at the RubyInstaller source code.

Here’s that installer: Rails For (the) Windows, version 0 (edit: latest version is v0.4. grab it here)

With this installer, you can create Rails apps in just a few steps:

  1. Download and run the RailsFTW installer.
  2. Start Command Prompt with Ruby. If you ticked “Add Ruby executables to your PATH” in the install process, you can simply open a normal command prompt

Command Prompt

From there, you can now create the 5-command rails app:

C:\Users\me> rails new blog 
C:\Users\me> cd blog
C:\Users\me\blog> rails generate scaffold entry subject:string content:text
C:\Users\me\blog> rake db:migrate
C:\Users\me\blog> rails server

You may have to unblock ruby in the firewall prompt to make the server work.

Open http://localhost:3000/entries to see your new app.

blog app

We still have a long way to go before we could supercede InstantRails, but this little hack job looks promising. Luis Lavena, a main contributor to RubyInstaller, even approves of this venture. Maybe later we could move on to other Ruby frameworks… Merb FTW or Sinatra FTW anyone?

Tax for the poor and mathematically challenged

lotto simulator

The Lottery: another way for the government to tax the (typically tax-exempt) poor.

As much as I’d like to shy away from yet-another-“greed is evil” post, recent circumstances have led me to mingle with people who still think spending money on the lottery is a good idea. So instead of being a jerk IRL, I’ll just post the arguments against the lottery here online.

The first argument against the lottery is that the odds are stacked waaaaay against you. Anyone who has even the basic knowledge of Combinatorics and ROI knows that the lottery is a loser’s game.

Don’t believe me? Why not try this little app I made using Rails 3 and a dash of jQuery. You could even check the source code to see if the drawing algorithm is sound.

(It’s not an original idea, though. I just based it on a Hacker News link last week.)

The second argument is that the people likely to win the lottery are the people least likely to have the financial literacy to handle such a large amount. But I guess you already knew that.

Keeping your goals to yourself

It’s been a very busy week so I wasn’t able to write a post last Thursday. I’m still pretty busy with a bunch of stuff so this will just be a quick post.

Here’s a TED talk about what happens when you announce your goals to the world:

This has happened way too many times earlier in my life, back when I was still a hyperactive (yet introverted) loudmouth. Fortunately I learned to shut up about my goals about the time I got into college.

One good example: in my past job, there was a gym fad going around a few years back. Those who were actively announcing that they were to lose weight didn’t follow through with their gym plans, while those who just kept quiet about the whole thing (e.g. me) had the most visible results.

And that’s why I’m not talking about the stuff that’s keeping me busy these days.

Biggest Financial Obstacle: Your Pride

mo money mo problems

I’ve mentioned multiple times before that earning more money does not equate to financial stability. You may think that that’s just some theory I picked up in random financial books, but thanks to a certain show of internet drama last week, I now have a good example of why Notorious B.I.G. was right:

For those of you who don’t have time on their hands to read the posts and comments, here’s the summary:

Law professor and his Oncologist wife earns over half a million dollars a year. They’re going to lose the Bush-era tax cuts they have, and so he’s whining that he won’t get to pay for all of his expenses i.e. he’s going to be poor.

Before you go “WTF, I’d be happy to earn just $20K a year!” I would like to point out that the couple’s problem isn’t limited to people earning that much. A lot of middle class people also fall into the same trap as that family.

It all boils down to pride.

Say you’re a twenty-something professional earning PhP 25K a month after taxes. It’s not hard to imagine what type of people you’re hanging around with: yuppies obsessed with getting the latest cellphone models, clubbing and out of town gimiks, and looking forward to getting that promotion/credit limit increase so that they could get a car loan.

You basically have two options here. The “easy” route is to just go with the flow: spend your money like them. Get your monthly cash flow to negative just so you could appear as rich as your friends. Don’t worry about debt: you’ll eventually get promoted later and by then you’d be able to pay all of them off.

But you won’t. By the time you’re earning more, your colleagues have changed too. They’ll be spending more so you’ll also be spending more. Before you know it, you’ll be pulling in a 7 digit yearly salary but still have money problems like the good professor in the story above.

Or you can take the second option: swallow your pride.

The most glaring indication that the professor in question has no financial literacy whatsoever is his insistence to get a loan for a $1M home when he hasn’t even paid off his student loans yet. This irrational focus on appearance has ruined many relatively well-off families (including my family, but that’s a different story altogether).

Don’t think of it as “living below your means”; think of it as “not living beyond your means.” I’m not asking you to take a vow of poverty here; it’s still ok to hang around with your gadget obsessed friends, just don’t get pressured into doing (financially) stupid things.

If all of them are carrying iPhones and Android phones just for show, why should you waste a month’s worth of effort on such a device instead of putting it in better investments? You will be teased, yes, but in the long run, who’s going to have a lot less financial problems when shit hits the fan?

Bonus:

Here’s what happens when whole nations get the “get a crapload of money but don’t know how to spend it” dilemma: The Resource Curse.

The Inefficiency Factor

Busy day so just a short post for tonight:

room full of typists

The IT industry isn’t a manufacturing industry: it’s a service industry. Whether you’re a developer, a tester, or an ops/sysad, your purpose isn’t just to code, test, or run programs: your purpose is to make sure those programs work well enough to provide tangible benefits to the user.

But what if the software you’re providing poses some problems or negative effects on the users?

No, I’m not talking about malware or crappy software. I’m actually talking about good software that makes processes and tasks much more efficient than they are.

They can cause problems because some people actually thrive on inefficiency.

These are the back room personnel that block any sort of automation process because they know they will be rendered redundant (i.e. fired) once it’s implemented.

These are the software vendors or internal IT departments that refuse to allow third party companies/consultants to fix or replace their buggy systems because the former earns a lot of profit on support call fees.

Sadly, I don’t have any quick advice on dealing with these people. I’m just here to point out again that Software Engineering isn’t about technologies and processes: it’s always about people.