Archive for the 'Web Development' Category

A Tip for Webrat

Monday, July 26th, 2010

I had my first experiences with Webrat last Thursday and I came across this error:


NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.fields
(eval):2:in `choose'

Not being able to decipher that, I turned to the web and found this helpful link which didn’t completely solve my problem but did point me in the right direction: check the markup.

Looking at what I had:

<tr>
<td>
  <input type="radio" value="1" name="my_radio_btn" id="my_radio_btn">
</td>
<td id="l">
  <label for="my_radio_btn">My Radio Button</label>
</td>
</tr>

…there wasn’t a <form> anywhere in sight. Once I fixed the markup to be:

<tr>
<td>
  <form id="better_markup">
      <input type="radio" value="1" name="my_radio_btn" id="my_radio_btn">
  </form>
</td>
<td id="l">
  <label for="my_radio_btn">My Radio Button</label>
</td>
</tr>

… Webrat worked like a charm.

Shop It To Me: My First Day

Tuesday, June 29th, 2010

There was a point today, sometime in-between the deluge of new-hire paperwork, getting to know a new office-space, having to configure a new Microsoft system because my Macbook Pro hasn’t yet arrived, the multitude of new names, and a code overview for (just one) part (of many) of an intricate Rails system, when I thought: “this is exactly what I was looking for.”

Today ranks as one of the best first days I’ve had since starting as a software engineer. I like the people I’ll be working with, I like the company, I like the product, and I like the numerous challenges before me.

Although, I’ll admit that I didn’t sleep very well last night. It was mostly due to the heat in San Francisco but partially due to one nightmare I had about showing up unprepared. I don’t exactly remember what happened in the dream; I either wore shorts or didn’t have any pants on when walking into the office. One is certainly worse than the other, but considering the magnitude of change from my previous position, only one (fairly harmless) nightmare is doing pretty well for the night before a new job.

There was, however, a funny moment at lunch today. The question came up: “so how did someone from Yahoo! get a job at a rails shop?” (alluding to the fact that Yahoo! is primarily a PHP shop.) It reminded me of the time just over three years ago when I caught the Yahoo! shuttle bus back into San Francisco after a day of interviewing in Sunnyvale (which ultimately resulted in my first job at Yahoo!.)

On the shuttle, I started chit-chatting with the guy next to me. He asked if I had snagged the interview through a friend or relative and when I responded that I had landed it after an application through HotJobs, he jolted a bit and responded, rather surprised: “you must have some pretty special skills, then…”

Special enough, I guess…

On the Future of RIAs

Friday, April 30th, 2010

At work, I’m transitioning off of the Mail team into a project where we’ll be prototyping some new functionality in HTML5.

While I originally thought we would be analyzing HTML5 as it will affect organizational strategy (can you imagine how much impact that would have?) it turns out that we’ll be implementing prototypes for a very specific need. Either way, it’s very exciting to be working in this emerging space in a team of top-notch FEs along with one of Yahoo’s top UEDs. Although not an explicit thought-leadership effort per se, I’m sure engineering will inform strategy will inform engineering.

On that note, I’ve started to reflect on the Adobe vs. Apple fight and future of RIAs, particularly in the online advertising space. According to the Apple iPhone OS 4 keynote:

“Users spend 30 minutes a day in apps. Say an ad every 3 minutes…10 ads per day. We’ll be at 100 million devices soon, so that’s 1 billion ad opportunities per day.”

1B impressions/day, as achieved with HTML5/CSS3/JavaScript?!? That’s certainly nothing to sneeze at. Is Flash really on its way out as the default interactive media platform? How long before it’s replaced by HTML5, if at all?

I don’t personally think that the move by Apple will completely eliminate the need for Flash, ever, even if the company continues its rapid growth in the mobile hardware sector. As much as I - as a web developer - would like to simplify my life by having one language (for both client and server-side) on one platform, I know we won’t ever get there (proof? that would imply a monopoly and current US regulation prohibits that, no?)

After some reflection on just how much has been invested in Flash as an industry standard in the last 14 years in addition to reading this article and its comments, I would tend to agree with this assessment on the future of Flash.

I have found myself wondering: “for all those developers and businesses who have legacy systems built around Flash, how will they transition from Flash to HTML5?” and that’s when I remembered OpenLaszlo. It’s been a while since I’ve looked at it, but I was duly impressed by its ability to generate both SWF and DHTML output.

For all of you developers who have never touched Flash in your life and are jumping on the HTML5 band-wagon right now, you have bright futures in 3-5 years when HTML5 matures and you’re already experts on it. For all of you SMBs (and enterprises?) who have heavy investments in Flash and want to migrate to capture more market-share, I wonder if it wouldn’t make sense to port your current solutions to OpenLaszlo and “compile” for both Flash- and non-Flash-enabled platforms. I think there’s a real opportunity for OpenLaszlo and the company behind it - Laszlo systems - to assist in the transition and/or bridge the gap as HTML5 becomes more of an industry standard.

Disclosure: I am an Apple fanboy, in spite of everything that’s happened recently with their developer policies, but I do not have any interest in Laszlo Systems.

Nice Overview On Catalyst

Friday, April 23rd, 2010

Having worked with Catalyst extensively before getting into RoR, I have to give props to Dan (who I know from work) for an intro screencast on what I regard as the best web framework for Perl:

If you have any problems viewing it, you can see the video at the following URL:

Intro to Catalyst, Part I

Isn’t Hindsight 20/20? RE: Zynga’s Recent Valuation

Saturday, April 17th, 2010

In February 2010, I hit the GDC when I came to SF with the hopes of finding a job. I thought, “surely, with my web skills… I’ll be in-demand” but oh how sobering of an experience it was.

A few months later in July 2010, Zynga was formed.

Fast forward three years and I just caught the other day that Zynga’s been reportedly valued at $5B. A $5B business in three years?!? Amazing.