Friday, February 29, 2008

How much longer?


fixes
Originally uploaded by roupen
It's been about 48 hours since Flickr stopped showing updates to contact's photos. How much longer I wonder.

Update: 2/29/08 5:22PM Just noticed that this is now fixed.

Read more...

Thursday, February 28, 2008

100,004 views 2,759 pics

As of this post, my Flickr stream has 100,004 views on 2,759 pictures. My YouTube with 95 videos is at 85,386 video views.

My wife still doesn't get why I share this stuff -- I'm not sure I have a scientific answer for why I do it either. Seeing the views go up has its own reward (is it a "vitamin" or a "pill" hmm).

Read more...

Saturday, February 16, 2008

Deeper into R-o-R

After doing a few recipe projects, I've started working on a fresh idea from scratch with Chris Sargisov. It feels much like trying to go around the block without training wheels for the first time.

The project I'm trying to do (more on this later - when there is stuff to show) has quickly taken me down the path of polymorphic many-to-many relationships with Ruby Active Record. I'm getting my a** kicked but understanding it better with every error message - thanks for Eldon Alameda, again.

If you're also into HABTM, many-to-many, has_many :through then here are a few links that Eldon turned me on to that you might find as useful as I did:

Drop me a line if you know of others...

Read more...

Friday, February 08, 2008

My Ruby Arsinal


A few friends have asked about the books I'm using on Ruby - here they are (in order purchased - thanks for Sanjay for one of the recommendations and to Alex for a couple others):

I bought the books on Amazon - half.com didn't seem to have a price advantage. I usually buy used in good conditions.

I also picked-up the following O'Reily Pocket References:
  • MySQL Pocket Reference
  • CSS Pocket Reference
  • PHP Pocket Reference

Read more...

Wednesday, February 06, 2008

The Monkey's alive!


live
Originally uploaded by roupen
What a trip! From buying my first book Jan 12 to an app deployed live as of this post - very cool. The last time I wrote code was 10 years ago after doing it for 10 years. The last time I wrote code was for embedded systems - not web.

I took a deep dive into Ruby on the 12th of January, 2008, and flintstoning.com is the end result. I'm proud ;-) What a difference a decade and the web have made when it comes to programming.

If not for the tireless help of Eldon Alameda, author of the book Practical Rails Projects. His code warrior instinct and patience are much appreciated. Also thanks to the good folks at SpeedRails.com and Maykel Rodriguez Rivero for providing the hosting and excellent and equally tireless support. Lastly, thanks for Suren for key hints along the way.

The app has a few cool things going for it. For one thing, some cool Ajax that allows for drag-and drop of todo items under "Today's Tasks" in the center of the page. Plus Chronic natural language time parsing (so when defining a task you could specify things like "tomorrow" "next month", etc. Very cool).

From newb to first app in less than 4 weeks. This has been fun!

Read more...

Saturday, January 26, 2008

Practically Rails

I'm spending some time learning Ruby and Rails. The Web today belongs to those that can implement ideas (not just dream them). So I've been dusting off my OO and C++ knowledge which I hadn't used for about 10 years (it's all coming back pretty easily).

I've invested in a couple of books on the subject and one of them is Practical Rails Applications by Eldon Alameda from Apress. From time to time, I'm going to post typos, errata and other notes here as part of this journey.

  • Pg36: The index page that is produced for the today controller with Rails 2.0.2 is index.html.erb instead of index.rhtml The book references and older version.
  • Pg41: The text thats displayed at the end of script/plugin install acts_as_authenticated plugin looks like an error but its not (that part about acts_as being deprecated by restful_authentication).
  • Pg44: paragraph 3 "we're using it [to] call the login_from_cookie
Last night, I got as far as adding user registration and authentication (using the plug in acts_as_authenticated) in chapter 3 of the book. I ran into a few problems related to the mailer initialization. At the same time, I was tracking down a pesky layout issue on the login and signup pages, unrelated to the mailer issue, when I emailed the author, Eldon Alameda. Eldon responded right away and has been very helpful...

It turns out that the book was written based on Rails 1.2.3 while I was running 2.0 Among the changes is the ActionMailer initialization. So to keep moving forward, I decided to downgrade from InstantRails 2.0 back to InstantRails 1.7 and Rails 1.2.8 (close enough to 1.2.3). A lesson learned for being on the bleeding edge (Rails 2.0 was released late Dec - too new for my taste).

I am redoing the steps starting in Chapter 1.

Here's a trap I fell into a couple of times (the last time around, this was the fork in the road that took me down the path to upgrading to Rails 2.0
which proved problematic): You've just installed mongrel and you're all happy and snug and you do mongrel_rails start to see the fruits of your labor but you see this instead !!! Path to log file not valid: log/mongrel.log

Chances are, your mongrel is installed alright. The thing to remember is that mongrel_rails must run from within a rails app directory (if you use InstantRails and you haven't created a project of your own, go to cookbook or typo sample app directories and start mongrel there. Presto!

My current configuration: Ruby 1.8.6 Rails 1.2.3 mongrel 1.1
gem 0.9.2 rake 0.7.2 apache 1.3.33

Read more...

Friday, January 25, 2008

A fly in my cloud-computing ointment

So I've been happily using Gmail and Google Calendar (along with Google Docs) and enjoying my cloud computing bliss without Microsoft Office and Outlook.

Starting yesterday, however, Google Calendar has been acting-up for me on Firefox 2.0 running Windows XP. Note that the problem doesn't happen on IE (which I have also gave up on a while back).

The problem I am having is as follows - unfortunately - and this has rendered Google Calendar unusable under Firefox :(

I start Gmail and click on Calendar and the Ajax thing starts to happen... the lower left hand corner of the browser starts to show frantic activity (contacting google.com etc) and Firefox hour glass is there - all looks normal - EXCEPT I never come out of this state. Sometimes, I get the Calendar login screen often not. It just sits there...

I tried rebooting... restarting firefox... uh-ah, not working and that sucks!

Worse comes to worse, I am planning to move to an Apple MacBook soon and maybe/probably that will solve this issue. Just waiting for the new MacBook Pros with multi-touch...



Google Calendar not happning on FireFox from roupen nahabedian on Vimeo.

Read more...

Thursday, January 24, 2008

A Microsoft Moment sans Office & Outlook

I was at a meeting over lunch yesterday when one of my Vaio laptops started acting-up; I'd turn it on, Windows (XP) would boot-up I'd login and after a minute or two the blue screen of death would flash and the laptop would reboot. This happened about 5-6 times - different boot options didn't seem to make a difference - I was having a "Microsoft Moment" (MM).

This seems to happen about once every 6 months that you have to take time off, drop what you're doing, and pay homage to the gods of software and fix the problem... Normally, a MM is enough to ruin your day - you don't know if your documents and email are safe (you think to yourself "am i ever going to see my email ever again?" or "my god - all that STUFF that I can't live without"). And of course, you could/should have backed-up the stuff but...

Luckily this time around, I am no longer using Office nor Outlook - I made the transition a couple of months ago and I haven't looked back. Also this time around, the stress was much lower: my stuff and majority of my documents are on gmail and Google docs respectively. Saved!

I remembered that this kind of crash had happened on this laptop about a year ago and the solution then was to reinstall from the factory CD and wipe everything out. So not only was my stress level much less but when it came down to doing a clean-install, the whole process took about 1/3 as long since there was so much less to copy off and copy back on (at last check, my Outlook file was about 10GB).

So! A Microsoft Moment made much less stressful and painful not having Outlook and Office to deal with. Next stop? Back to an Apple Powerbook not to deal with Windows at all.

Read more...

Sunday, January 20, 2008

Mayhem-5


Mayhem-5
Originally uploaded by Almighty_Tuna
Ha? Watch me touch this mouse trap with my tongue... in the next photo, the trap closes on his tongue - ouch! The series gets worse, ending with people stapling dollar bills to his body (ha?)

DISCLAIMER: I came across this pic on a random walk on Flickr. I wasn't attending this event or anything.

Read more...

Sunday, December 30, 2007

mini-hack


mini-hack
Originally uploaded by roupen
We brought two laptops with us and uncle-H had just purchased a laptop -- so there were 3 laptops plus free Wi-Fi from a neighbor. It looked like a mini-hackathon. Too bad they don't web programming yet ;-) soon I hope...

Read more...