Getting started in Ruby

Coding, Web 2 Comments »

ruby.pngSo one of my New Years resolutions was to learn Ruby, and make a website in Rails. Actually, I’ve challenged myself to make a new site every 2 months in 2007. I’m not doing too well for Jan-Feb, but I’ve made my first website project my class final for the Database Design grad class I’m taking. The class ends at the end of Feb, so I guess I’m going to have to be on time!

I’m using Ubuntu Edgy Eft (6.10) and have no prior knowledge of Ruby or Rails. I figured I’d post here and let all you other want-to-be-ruby/rails developers how to get started, based on my experience on what hasn’t worked in my last 2 weeks of learning Ruby and Rails.

There’s a lot of tutorials out there, and most of them are difficult to understand. Unfortunately, genius programmers sometimes have a difficult time explaining complex subjects in human-ese. :-) So here’s my attempt to point you in the right direction:

1. Get Ruby installed. If you’re on Windows, go grab the installer. If you’re on Linux or OSX, you can throw a command or two at the terminal:

  • Linux: sudo apt-get install ruby irb rdoc
  • Mac (MacPorts): port install ruby

2. OK, so we have Ruby and we have Rails, time to jump in, right?  Not exactly.  Ruby takes Object Oriented Programming to the extreme, so you’d better be very, very familiar with the ideas of OOP, Classes, Objects, Inheritance, and so on.  If you’r not, keep reading Wikipedia until you are.  You might want to look into data types (string, integer) and other concepts like arrays.

Ruby isn’t hard, the concepts behond Ruby are hard.  If you’re a CS or IS major, you probably has a semester or two to figure this stuff out, but I found it a good reminder just to read through the Wikipedia article on OOP anyway, Ruby is severely into objectification.  (even an integer, like “1″ is considered an object – yeah, I know…like I said…crazy objectification)

3. OK, so now we’re ready to get started.  The best tutorial I found, and the only one that seemed to clearly describe Ruby from the ground up is Learn Ruby on Rails: the Ultimate Beginner’s Tutorial by Patrick Lenz.  It just came out about a week ago, and just in time.  Read through it.  Slowly.  Do the examples in your own Ruby shell.  (for me, I got in the Ruby shell by typing ‘irb’ on Ubuntu’s command line).  Do the examples along with the tutorial.  Did I mention the examples?

If you have previously programmed in C/C++, Java, Perl, PHP or Python, you might want to have a look at how Ruby compares to those languages to get a better understanding of why (or why not) you might want to switch over.

4. Alrighty, so now we’re all official Ruby Newbies.  Where to go from here?  I mean the examples in the tutorial were good, but the tutorial definitely didn’t tell us everything you can do to a text string, for example.  And what about all the weird stuff you can do to an array? Well, Ruby comes with a manual, and the download over at ruby-doc.org has a bunch of other great stuff too.  The manual is for version 1.4, but it still will serve you well.

Good luck!

Have fun getting started and playing with Ruby, I’ll be posting my experiences as I go along.

Google Image Search gets new interface

Web 4 Comments »

If you haven’t heard by now, Google Image Search has a new interface. All of the technical information is hidden via javascript until you mouse over the image. People have their own opinions about this, but I hate it. Part of the way I qualify an image as useful or not is its dimensions – basically, I’d rather have a 500×500-sized image than a 50×50 of the same thing. To do this now, you have to mouse over every image to check, instead of being able to do it at a glance.

image_search.png

Google really isn’t known for doing these types of ‘do it because we can’ type stylings, and it’s a little disappointing. I understand the desire to have a clean-looking interface, and that maybe the bulk of their users don’t care about the technical data, but at least just grey it out or something, instead of hiding the whole thing.

If you really want to, you can still see Image Search the old way by turning javascript off, but why would you want to do that? Maybe this could become part of a new feature for your google account – so you can choose whether or not to display extended data?  Like how WinXP shows tiled view by default in a folder, but you can choose ‘detailed’?  Seems like you should probably allow the people to get what they want, instead of forcing one design on everyone…

Wootable Awards at CES

Geeky, Web No Comments »

I rarely post twice in one day, but this is too perfect to not send out on a Friday.  The guys over at Woot give some good deals on stuff every now and then, but they’re pretty funny too!  Check out the Wootable Awards for CES 2007.  For all the work I’m sure some engineer puts into a consumer electronics product, it’s a shame for them to be revealed so poorly by some marketing flunkie.

Ugh, my sides hurt.  Check this out, but first think up an excuse about why you’re laughing at work.  (or maybe think of a reason why to work where you can’thave a laugh every now and then…? )
CES 2007: The Wootable Awards

Techdirt: ‘It’s about the concept, not the implementation’

Audio & Video, Web 1 Comment »

Well, the Pandora story continues, this time with Techdirt.  The headline reads “Pandora Goes With Old Intrusive Ads To Boost Their New Media Product”.  That certainly does capture what I’m trying to get across with my past few posts, and I’m glad to see it wasn’t lost on them.

I love Pandora, and although I agree that the current ads are only intrusive to a minor degree, I’m worried about backlash to their service if this pilot program goes into full swing.  I ended up writing more than I wanted to in the comments over at Techdirt, but I wanted to share it with my readers as well.

By the way, if you haven’t heard of Techdirt, subscribe to their feed, they’re very good.  They’re responsible to a large degree (in addition to my own reasons) why I’ve decided my organization will never buy Sony products, among other things.  OK, back to the idea of new media monetization vs. old:

While I agree that it is definitely possible to use “old” advertising methods in the new media, I feel this is artificially placing the required negative aspects of monetization on a media where it’s not required.

A simplified example of this can be seen in the domination of iTunes. By making it “grandma-easy” for iPod owners to get music on their iPods, Apple has boosted their revenue in both the hardware and music sales businesses to a height greater than the sum of these products individually.

Apple could easily make a lot of money by selling ads with the music they sell on iTunes, but they don’t. They instead choose to maintain and grow a great service, and take advantage of the efficiencies in their market to add value to ancillary products.

Overall, I think a worthy goal for a new media company like Pandora is to identify the future market and application of online music early enough to be able to define it themselves, instead of taking a great implementation and trying to apply it to a solution that was the product of limitation.

I’d like to state again that behind *.google.com, Pandora easily comes in second, and I have nothing but hope for them that they will find a way to completely dominate a self-defined market. I feel that all they have to do is choose to do so, and they will be well on their way.  I look forward to continuing to broadcast my personalized stream of new music across my office and the adjoining lab.  :-)

Alternative revenue ideas for Pandora

Audio & Video, Web 2 Comments »

Pandora logoAs Mashable pointed out, I’ve expressed my disappointment in the idea of audio advertising on Pandora, along with a few others. To me, Pandora represents a very pure service, offered for free, that has become one of my favorites out of the hundreds of web services I use on a monthly basis.

In true conversational-web form (otherwise knows as Web 2.0), I wanted to not only express my concern but offer a few suggestions on alternate methods of monetization of the Pandora services in order to keep the audio stream ad-free (or, as I like to say, unpolluted). I think this is important, as it’s not all about firing off your gripes…

Tom Conrad, Pandora’s CTO, commented that “[user] responses are just the kind of thing we need to hear during this period; so thanks for posting about this”. Tom, I value Pandora’s service greatly and agree that Pandora deserves to turn a profit for its wonderful service. Here’s how I see this done without changing its product to something listeners might see as undesirable.

  1. Communicate with the community. On Pandora’s landing page, you say “We created Pandora so that we can have that same kind of conversation with you.” I understand this is relation to the music selection, but please be open to accepting comments back from the user base when implementing a change such as this. Explaining any new features and explicitly asking for feedback can go a long way in a product’s lifecycle. You may get positive or negative feedback, but in any case both you and your advertisers will immediately know the response to any new advertising tactic, instead of having to wait and see what the fallout is. By then, it will have already been too late.
  2. Go Mobile. By all indications, the mobile scene is gearing up to be very interesting in 2007. Carriers are starting to push WiMax to a degree they haven’t approached before, starting in December. Mobile devices are reaching new penetration and are consolidating services on a massive scale. We’re quickly approaching the tipping point where residential consumers are starting to abandon the thought of having just a mobile phone instead of a multimedia device. people want to be mobile, go for it! We’ve got two directions to go here, both of them profitable.
    1. License the Pandora service to any mobile device equipped with WiMax or WiFi. They’ll be glad to add value to their existing products and compensate Pandora for it.  In the case of Palm/Treo/WinCE devices, it wouldn’t be difficult to get a mobile app out there, preferably factory installed and used as a selling point. You’ve got expanding WiFi service (even mobile!) on your side…not to mention expanding muni-WiFi coverage. (I’m seeing an ad campaign based on the STate of CA’s State Park beaches – they’ve got access)
    2. Work with a developer to get a Pandora-specific hardware device out there. The slingbox is great, but trends are going towards mobile on a much more massive scale than home theater. I’m imagining either a WiMax- of WiFi-enabled personal media player, much like the satellite radio companies have. Except you’d be looking at AM/FM(HDFM?)-mp3-Pandora functionality. The Pandora part of this will kill a battery, so that would have to be addressed, but if Apple can get away with the weight of a standard iPod, you’d be able to put quite a Li-Ion battery in there. Here’s the kicker – make it mountable on a standard dashboard-slot vehicle faceplate. Now, future vehicles with wireless access just became Pandora-equipped. Ask any commuter if they would prefer targeted commercial-free music during their commute. :-) This leads to other mounting fixtures (boombox, desktop cradle, etc.) that also lend themselves to profitability.
  3. Leverage User Accounts for sales. You’ve got a record of people’s favorite artists and songs, use it! Possible uses might be “Your favorite artist xxxxx has released a new single on Amazon/iTunes. Purchase (for xx% off, courtesy of McDonald’s)?” or “We’ve noticed you have bookmarked 8 of 12 songs from a particular album, purchase the album (for xx% off, courtesy of McDonald’s)?” I know it seems obvious that someone might want to buy an album if they like 11 of 12 tracks (maybe they just haven’t heard the 12th, too), but this probably isn’t the case. I just can’t see people extracting these types of realizations from tracks added over a great amount of time.

That’s what I’ve been able to come up with in the last day or so. I encourage other bloggers to post their ideas and link here, or list them in the comments if they don’t have a place to write their thoughts.

Pandora has supplied us with a great service for free. Let’s repay the favor and help create a revenue stream for them. While I agree that ads are the easiest way for monetization, Pandora and similar services can earn a living without resorting to the tactics of the old media. After all, the tactics of the old media are the reason why we have the new media!

Pandora gets commercials

Audio & Video, Web 17 Comments »

Unfortunately, it looks like 2007 has brought a dark cloud over one of my favorite sites, Pandora.com. While you can still get great music tailored to your tastes (and wonderfully based on music characteristics instead of user demographic averaging), it appears that there are now short audio commercials inserted into your audio streams. You are unable to fast-forward past these commercials.
Pandora ads

(click thumbnail for larger view)
Advertising on Pandora is nothing new, but in the past it has been non-invasive. I much prefer the static ads on the page, and even admire the different stylesheets they would use to match the page’s color scheme to the ad. It gave a nice ‘branded’ look to the Pandora page, and in effect labeled the advertiser as the nice people who were bringing you such great music at no cost, monetary or otherwise.

However, now (as seen in the picture) short commercials are now playing in the audio stream, as in this case here for McDonald’s Dollar Value menu. This change has the opposite effect – I now know exactly who is keeping me from hearing my music, both visually and via audio, and casts a negative light on both Pandora and the advertiser.

Please Pandora, no more audio advertising! Keep the (audio) stream unpolluted!

edit: I’ve posted a few alternative ideas for Pandora.  Please check them out and let me know what you think!

Platewire sucks, calling all developers!

Coding, Web 2 Comments »

On July 20, 2006, I submitted the following idea to the Cambrian House community. I thought it was a good idea, but the community decided instead that there are more worthy projects. Now, the whole reason I signed up for Cambrian House is because I already know I have great ideas, but don’t have the time or money to act on them. CH suggests that they will take the ideas in as a community, and help you make a success out of them if you’re in a position like mine.
Here was my idea, submitted 7/20/06:

The Idea:
Implement an eBay-like feedback system for other drivers. The idea here is to make the person’s individual score an indicator of how considerate they’ve been, penalize those who aren’t, and publish their standings to the public.
Subject to abuse, so there would probably have to be some sort of normalizing mechanism where all your scores move one point towards zero every day or week. This would mean that you would have to be consistently good (or bad) to maintain any score.
You also would be able to look back and see historical monthly scores, to see if the person is consistantly bad or just had a bad month.
Also, the police would have the ability to see this ranking too, since it’s public knowledge. If someone was -50 in a week, they might take a closer look at addressing the issue.

I thought of this idea when I was…
While waiting in traffic, I watch people bypass the entire line of cars waiting to exit the highway and cut in front of everyone. Following closely behind are the people who just drive on the shoulder past everyone.
I’m looking for a way to promote driving courtesy. This is an embarrassment-based system, which usually works pretty well as a deterrent. Plus the fact that anyone (police, spouse, employer) can look up your plate #…that would be a fairly large deterrent as well…

…and what do you know, WIRED magazine posts this up in their RSS feed a few days ago:

Online service PlateWire lets motorists, pedestrians and cyclists keep tabs on the good, the bad and the ugly behind the wheel. In Autopia.

I went over to the platewire site, not believing my eyes. It’s a horrible implementation of my idea, but in surfing the founder’s blog, I found something more interesting: platewire.com launched on July 29, 2006… 9 days after I posted my idea. What’s worse is that the guy is on CNN and WIRED with this bag of crap.
Now, at first I was pissed, because I assumed some visionless hack stole my idea and implemented some junk site based loosely around it. I felt a little better when I noticed that the domain name had been registered in May.

Of the few ideas I’ve posted to Cambrian House, this is one of my favorites, and I hate to see it bastardized like this. I’ve got a whole lot of ideas about how to improve the service and make it workable and profitable… all I need is some help developing the site.

We’ve already seen the idea is good, I know how we can make it great. If you think you can handle making a clean, database-driven site (preferably with MySQL, CSS, PHP or Ruby), shoot me a message and let’s hop on this gravy train and blow platewire out of the water.

edit: I’ve had to close commenting, due to OT posting and spam.

Improvements progressing, distractions abound

Web No Comments »

I’ve dumped snap, I found it to be annoying and pop-up-ish. I have, however, pimped up my feed a bit. I hadn’t logged into feedburner in a while, there certainly are a lot of options I wasn’t taking advantage of.
In particular, I’m glad that they offer a service to splice in your del.icio.us links. I use that service a lot, and I’m happy to share them! If you’re a blogger, and have a del.icio.us account that you use to mark sites interesting to your readers, I would recommend using the splicing feature.

I’m also as happy as…well…a car guy at Christmas-time, I suppose. Have you seen how many Top Gear videos are on metacafe?!? It’s unbelievable! They canceled the show here in the US, but I’m willing to go out of my way to catch it. IT’s probably one of the better evaluation/testing shows I’ve ever seen, and hilarious at the same time! I’ve been watching so many videos lately that I’m starting to accidentally use English vocabulary in my everyday life. I’m subscribed to anything tagged “Top Gear” on metacafe, and expect to be for quite a while.

Besides being excellent car reviewers, they do some very strange things that somehow are always very interesting.
Right! On to a proper show!

Oh, and by the way, metacafe, what’s with not having a plugin for embedding videos from your site into wordpress?  Isn’t this a given for any of these multimedia sites?  We’re all not on blogger/myspace, you know…  Anybody have one?

Trying out snap

Coding, Web No Comments »

I’m trying out the service from Snap. Hover over any links here and tell me what you think. Not bad functionality for a single line of script in the header…
Snap

EFF

via Natalia Menezes

Google releases web toolkit source under Apache 2.0

Coding, Web No Comments »

Digg This 

This might be a viable alternative to my recent struggles with Ruby on Rails… (or I might just need to take it slower than a 4-hour marathon of tutorials). I’m looking forward to seeing the functionality added to this toolkit by the open-source community.

What functionality do you think might be added by the community that would make this the “next big thing” in framework-based development?

If you’re not familiar with GWT:

“Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don’t speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript’s lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.

GWT lets you avoid many of these headaches while offering your users the same dynamic, standards-compliant experience. You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.”

Here’s a sample widget written with the GWT, seems simple enough…

public class Hello implements EntryPoint {
public void onModuleLoad() {
Button b = new Button("Click me", new ClickListener() {
public void onClick(Widget sender) {
Window.alert("Hello, AJAX");
}
});
RootPanel.get().add(b);
}
}
Looks like those of you who already use Java/Javascript might have a new option out there for rapid web development.


WordPress Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in