Monday, July 23, 2007

Installing Ruby on Rails on Mac OSX

I'm in the early stages of studying Ruby on Rails and I'm already in the part where I'm installing it on my mac. I have a MAC OSX Tiger and zero knowledge RoR. There are tons of press release about how easy RoR is but I failed to find the one about how easy it is to install on a mac. But being the never-bows-down-to-a-challenge dude that I am, I raised the bar a notch by sipping from a tall glass of strong beer every time I would get to a dead end from a thanks-for-nothing installation tutorial and proceed to install.

Ok, to document everything and maybe help mac users who wants to install RoR, you can get any installer on the Net. Since I'm a newbie, instinctively, I got one of those "one-click-install" type (fortunately or not). It's pretty forward, until the part where you need to install rails. In mac terminal, when you type:

gem install

or
sudo gem install


and you get the error:

Could not find rails (>0) in any repository


you need to delete the source_cache. First you need to find it. To do that, do this:

gem env


then you do this:

sudo rm -f /usr/local/lib/ruby/gems/1.8/source_cache


use sudo because chances are, like me, you're the admin user on your mac; that means you don't have permission to delete source_cache which is owned by the system(super admin)

then try doing:


gem install


or

sudo gem install


if this still doesn't work, do this:

gem update


then again, do:

sudo gem install


After doing the above line, my installation went through.

My tall glass is now dry, eyes heavy and head numb. Tomorrow is another day.

Friday, July 20, 2007

Firebug - The bug you'll surely love

Rarely do bugs get the right respect or love from most humans. We don't like them anywhere near our food, bed, skin and not the least, inside our computers. But I find it amazing how every now and then, somewhere, someone would come up with a brilliant idea and name it after something rather odd. For example,

Yahoo, which was probably named after a violent beast-like creature from a 1726 novel.
Beatles, the most successful musical artists in the history of mankind, and the beetle car, probably the coolest automobile of the flower-power era, both named after an insect.

When I first used Firebug, I told myself here's another invention with a peculiar name that will be loved by many - web developers at least ;)

I'm a relatively new user of Firebug (a couple of weeks). I got the bug inside my computer(lol) just a couple of weeks ago and in my short hot experience with the pyromaniac(lol), design time became shorter and more accurate.

I will be blogging more about this nifty tool soon. For now, to my fellow web craftsmen, here's an insect you wouldn't want to squash.

Friday, July 13, 2007

Some Valid Reasons to hate IE

More reasons why IE is making web designers' life more difficult. Check out this url using IE...Some Valid Reasons to hate IE. Then see it again using either Firefox, Opera or Safari latest versions.

What really sucks it that all web designers who truly understand the business of doing websites, must highly consider first and foremost how their website will look in IE. Why? Because majority of your business'/company's online customers would be using IE.

It's like building cars for a country with right-hand traffic streets but left-hand traffic highways.

Friday, July 6, 2007

Body Building Tips

I recently found a photo taken 2 years ago. It maybe improbable for any of my new friends now to believe that during those times, I looked like this:

And did it in less than two monts. How? Below was my routine.
  • Heavy breakfast
  • Light snack after three hours.
  • Lunch after three hours ( medium carbo-load, lot's of vegies, chicken/beef/fish)
  • Light snack after three hours (usually fruits)
  • Dinner after three hours (low or zero carbs, vegies only)
  • Hit the gym...1 hour a day, 4 days a week.
  • Compound exercises=quickly build muscles(e.g. bench press, squat, dead-lift)
  • Heavy weights=build mass
  • Light weights but higher reps=muscle definition
  • 8 or more glasses of water everyday.
  • No sugar, minimal salt
  • Brown rice and wheat bread = highly recommended
  • Avoid egg yolks
  • 8 hours of sleep. VERY IMPORTANT

I never used supplements ( or steroids ). What I did gave me the body I wanted...back then. It may not be the result everybody wants, but it's about having a goal, making a plan, finding out what works and sticking to it.

And yes, back then I have a regular job like you. I was a project manager and worked for more than 8 hours a day. It's about priorities and time management. It can be done.

Monday, July 2, 2007

Wrong IT specs: How it can happen fast

I was asked by a very good friend to help in coming up with a proposal/presentation for a website project. Time is of the essence but being someone who's unlikely to say NO to a good friend, I accommodated the request.

Project backgrounder

Unfortunately(fortunately, now that I think about it)I was not present at the kick-off meeting where the project was described and the parameters where laid down. I was told that there were about 4-5 IT people who gave the rules/guidelines. But the project itself was discussed only in general terms if you know what I mean. I can imagine it already, 80% of the time was wasted on technical jargons and their verbal display of business ignorance.

The guidelines were(among others):

  1. xhtml 1.0-strict validated
  2. must be able to accommodate dial-up users
  3. ability to manage content(CMS)
  4. ability to view via mobile phone (WAP)
If someone who's into doing website for a long time, this is really not a big deal. The only real challenge is to come up with something in 2 days! Long story short, I was able to come up with a mock-up design. An acceptable presentation: 7-page website, cms, xhtml-strict compliant...etc, all following the parameters they(IT) wanted.

Presentation day

Despite only 8 hours of sleep(for 2 days) I was up to face the IT people and answer any technical questions they have. Lo and behold, only 3 people were in the audience. And none of them are geeky looking. From their smart-ass comments and level of arrogance, one can easily say that Moe, Curly and Larry probably belong to marketing, PR or one of those prove-your-worth departments. We have not gone beyond our first slide when Curly said he didn't like it, because it's bland, very static and does not create "user-experience"(maybe he heard that from his wife last night in bed). Duhhhhh! xhtml-strict? Dial up connection users? what kind of experience does he wants? Blinking text, marquee messages and animated welcome gifs?

As it turned out, what they really wanted was a media-web 2-point-oh website type, branding(e.g. I googled you, or check myspace, or see me on youtube) kindda stuff. I don't blame them. I think that's good. I would certainly want to do that kind of a project. Many times, me and my friend were tempted to shout "Your IT people gave us the wrong specs!"

We finished our presentation(thank God) keeping our heads high and being firm to our battle cry..."customized development using open-source technology". I know, it was pointless.

Conclusion

The whole 45 minutes was a waste of time, for us and them. Moe, Curly and Larry have all the right to express their disappointments. They want something, have the money to pay for it whether or not it'll give any value to the public, it doesn't matter.

It also doesn't matter how standardized the codes are or how stable the back-end system is - they don't really give a rat's ass to these. In the end, no guidelines I mentioned will be followed. To the 3 stooges, it doesn't matter, as long as it works. I don't have any problems with that. My only qualm is why on earth did they let IT set rules on something they don't understand? Oh well, just one of those experiences I want to bury along with "My first public speech" and "I forgot to dress-down on Friday".

Sunday, July 1, 2007

Even heroes need to sleep

While everybody else is relaxing, having fun, just enjoying the good weather on a Sunday, I was working on a new project; hoping to finish it by tomorrow. I was not too certain I will be able to finish something acceptable though. I knew the odds were against me around lunch time, five hours after I started my day. It is now 2 am(yeah..Monday!). I'm calling it quits. There's just not enough time.

The project is a Content Management System, the basics plus podcasting and WAP version, and the website should be an xhtml-strict validated document. But for the record, I was able to pass the validation for the mock-up home page I made. Now I don't know if I can sing-and-dance during the presentation later(in 10 hours) with just a w3c validated page. Or maybe I can paint them a picture of the CMS-WML editor-FAQ Management-et al application they require. Bring out the snake-oil!

Meantime ZZZZZzzzzzzz....