Learning Ruby – Day 2

Day 2 starts with one of the most valuable programming exercises. What can I do with an object? Just ask it:


self.methods

With ‘self’ being the current object, the above question returns a list of all the questions ‘self’ knows how to answer.

Every object in Ruby can be asked this question. So many languages are only object-oriented, not object-saturated like Ruby. Back in my REALbasic days, I’d scan an objects auto-complete menu looking for the right method or attribute. More than once I was baffled in the differences between objects. I was also baffled by the difference between ‘self.’ and ‘me.’ in RB. No sign of ‘me.’ yet in Ruby.

If you ask 10 people “What is your name?”, you’ll receive 10 different answers. In programming, this is called ‘polymorphism’ and it means different objects can respond differently to the same question. A useful example comes from Object-Oriented Thought Process: all shapes – circles, squares, triangles – have a perimeter and an area. Thought the equation to calculate each is different.

Occasionally, I’ll hit a programming problem where it makes sense to return multiple values out of a method. Normally, I take this as a cue I’m not being clear about what I’m trying to accomplish and make 2 methods. Looks like Ruby can return multiple values separated by commas. Seems useful for debugging.

The Ruby syntax is truly Zen-like. No semi-colons explicitly declaring the end of a line made me smile. Now Slagell’s saying ‘return’ at the end of a method isn’t needed either. Without an explicit ‘return’, the last thing evaluated is returned.

me.jump(up, down)

Here’s a useful tip I learned going through today’s exercises. Between 2 datetime strings, Ruby doesn’t know what ‘+’ means. For example:

return Time.now + Time.now

returns an error, where as

return "it's #{Time.now}" + ", now it's #{Time.now}."

spits out a sentence.

Good to know.

Al Abut’s 2nd day


This post documents my journey through Sam’s Teach Yourself Ruby in 21 days. I’ll be joining Al Abut in his effort to learn Ruby and blog along the way.


RSS is Advertising, Not a Channel for Advertising

(originally published at MNteractive.com)

This afternoon, I was listening to an interview on RSS advertising. Overall, it sounded like Pheedo is shoehorning the dying interruption-based ad model into the relationship-based world of RSS.

There are a number of companies trying to make RSS measurement more accurate (Pheedo, Feedster, FeedBurner). This is excellent, RSS feeds are the way to connect with passionate, influential people on their terms. The more tools available to refine RSS feeds, the stronger the relationship.

The problem is, “the RSS feed is itself an ad.”. Putting an ad in a feed is like putting an ad within a 30 second spot. Like Crest buying product-placement within a Coke ad. That doesn’t make sense.

Instead of advertising within another feed, I recommend companies publish their own feed, start their own relationships with customers – directly. Stop being parasites. New product announcements, press releases, customer research inquiries, and promotions are all useful, valuable items to publish in a feed.

If a company publishes a feed and no one subscribes, is the company relevant to the marketplace?

Learning Ruby – Day 1

Mark Slagell’s writing style is conversational and educational. I’ve gone through a number of software language tutorials. I found Slagell’s first chapter a comfortable mix of background info, simple examples, and experiments.

On the outset, Slagell states Ruby is based on the:

Principle of Least Surprise:
“If you don’t know how to do something and you try to say clearly what you mean, there’s a good chance it will work.”

This principle’s more descriptive if less sexy moniker is the principle of maximum boredom.

The remainder of Day 1 is examples proving his point.

Al Abut’s first day


This post documents my journey through Sam’s Teach Yourself Ruby in 21 days. I’ll be joining Al Abut in his effort to learn Ruby and blog along the way.


Punch Pizza No Knock Out

Last night Jen, Jer, Sam, and I went for a leisurely dinner at Punch Neapolitan Pizza.

Punch Pizza is continually declared the best pizza in the Twin Cities. The City Pages included Punch on their Best of Lists in 2003 and 2004, the Mpls.St.Paul Magazine also ranks it highly.

On this particular Saturday night, the space was loud. So loud, catching up with friends was impossible. The only way to keep a conversation going was to lean halfway over the table (also the only way for to get comfortable in the tiny chairs). Conceivable for a party of 2, impossible for 4.

I’m a big fan of rosemary and quite enjoyed the foccaciafocaccia bread. My main course, the Cortin – gorgonzola, sun-dried tomatoes, mushrooms, and garlic – I did not enjoy. I expected subtle, rich flavors. All I tasted – crust.

Jen had a fantastic time. She gives high praises to the roasted olives, and her selection – topped with capers, olives, onions. “I wouldn’t have stopped eating it, except I wanted left overs.”

We took half of each pizza home, put it in the fridge. I had the Cortin for breakfast this morning. Perhaps it was the quiet leisure of cold pizza on a Sunday morning, I finally tasted the deep flavors I expected the night before.

My vote for best pizza in the Twin Cities: Pizza Luce’s garlic mashed potato with chicken on Punch’s crust.

Be sure to catch Scott McGerik’s review of Punch Pizza. He and I agree Pizza Nea offers the best non-mashed potato pizzas.

If this was helpful for you,

Podcasts for Learning Foreign Languages

Last fall when I was just getting into podcasting, I was enamored with the idea of using podcasts to learn a foreign language. I even commented on it in First Crack #6.

If you’re following my ThingsToDo list, you see I’d like to get my tongue around Dutch and bring my German back up to speed. Then there’s French. Always took classes as a kid. Never quite got it.

Anyway, my favorite Deutschlehrerin, Steffanie aus Stockholm, just wrote about the power of podcasting to learn a foreign language.

It looks like my German is still good enough to understand that Steffanie and I share the same views on this:

  • There are so many podcasts, you can find a subject that interests you in a language you want to learn. Like learning 2 things for the price of one.
  • The best podcasts are normal people, talking about normal things, in normal voices – ideal for understand how language is acutally used, and different dialects.
  • You can listen to podcasts over and over again. Picking up something new each time. I always keeps the good ones, and Steffanie’s.

How long does it take to build a website?

A year or so ago, I had this ‘Website-in-a-Weekend’ idea. Walk a group of people from nothing to a nice looking, easy-to-update, custom website in a weekend using WordPress.

Something like this;

  • Day 1: Install WordPress ( ), define categories, pages, generally get everything in place. Add some images and text.
  • Day 2: Edit the layout and CSS. Launch.

WordPress’ Themes are so much more mature in v1.5, so Website-in-a-Weekend is even more do-able.

Digging around the triple-dub this evening, I found some folks that, in the spirit of Scott McCloud‘s 24 hour comic, have raised the bar: Write an entire webapp in 24 hours, including Photoshop comps, CSS, & Javascript.

Considering the months- and years-long projects I’ve been involved in, this makes me wonder: How long does it take to build a useful website?

Learning Ruby in 3 Weeks

A year ago I dropped REALbasic. Since then, I’ve struggled to get my head around Cocoa and Objective-C.

With the recent hype around Ruby on Rails, I started looking at Ruby and found a Ruby/Objective-C bridge. To me, this means there’s a huge potential to have tightly-integrated desktop and web-based applications in a single, easy-to-maintain language. Therefore putting a different spin on REALbasic’s cross-platform promise, while still giving me platform-specific functionality.

With this in mind, I’ve picked up the ebook version of Sam’s Teach Yourself Ruby in 21 days. I’ll be joining Al Abut in his effort to learn Ruby and blog along the way.

One Foot Forward, Repeat.

Last winter, I biked at least 10 miles everyday. From the home office to coffee shops and client meetings. Only missed 2 days due to awful weather. This winter, traveling to my clients wasn’t as convenient. Both my road and mountain bikes gathered dust all winter. This week, just in time for spring, I got out on the bike and made that ride downtown.

A couple summers back, Milo, Bob and I spent a week canoeing through the Boundary Waters. As you may have gathered from my Weekend in the Northwoods post, lack of mobile phone service makes me uneasy.

In the middle of a lake, exhausted from paddling all day, with the closest shore a few hundred yards away and still portages away from our day’s target, I came to the simplest of conclusions:

If you stop paddling, you stop moving, and you’ll never get there.

This afternoon, halfway through the ride home, I was winded. Done. Rusty from not riding for 3 months, my legs had enough. At that moment, 4 miles from home, near nothing, I remembered the simplicity of canoeing through the Boundary Waters and thought:

If you stop pedaling, you stop moving, and you’ll never get home.

Cars, buses, and the momentum of our working day often make arriving at our destinations inevitable. Out of our direct control. It’s unfortunate. There’s something refreshing when the only way to move forward is to put one foot forward and repeat.

Fake Data to See if Anyone’s Paying Attention

When putting together a prototype for usability testing, it’s best to use realistic data. If you’re evaluating the readability of a search results screen, put in the actual results. If you’re evaluating a check-out process, make all the information throughout the entire process real.

Then, after, tweak the data just slightly. Make it humorous, make it unrealistic, throw in a knock-knock joke.

I’m a big fan of this. It’s an excellent way to find out what people pay attention to and what they completely disregard.

In his post, Amazon’s Time Machine, Seth Godin ponders:

“Why don’t they slip in ridiculous items or funny descriptions? It’s not like they’re going to run out of shelf space or have a problem with inventory.”

It’s an interesting question. Ridiculous items or funny will polarize customers. Some will love it, some will hate it. It’s a big company that can walk away from disenfranchised customers.