Configure git so that it shows green & red in my terminal

Create a file in your home directory here:

(The dot makes it invisible of course)

In this file, you can configure lots of git stuff:

email =
name = John Doe
rename = copy

# Always enable color, in all commands
ui = true

And if you want some handy aliases for typing less when using git, try these:

ba = branch -a
st = status
ca = commit -a -v
ci = commit -v
pl = pull –rebase
pu = push
cmp = gc –aggressive

Object Equality & States in Ruby

A good area to spend some time for someone new to Ruby is to understand about objects. This serves as a basic wrap-around over view of what you need to know to get going.

First off remember to use the .class method on any object too (in your IRB, for example), giving you its class name. If you’re playing along here, that’ll help.

You will need to know what object orientation is in programming for this to make sense, and I hope it is geared to people coming from an object orientation learned in a different environment.

Everything in Ruby is an object. Even true and false have their own objects. Occasionally operators (like << and ||) are language contructs, but that's really insignificant for the purpose of this lessen. When we say nearly everything in Ruby we mean everything you think is an object and then some. Other languages have what are called primitives -- numbers, integers or floats; strings; booleans, etc. These things are see by the compiler and treated as what they are. But in Ruby all the primitives are objects too: numbers, strings, even boolean operators have their own classes. So, you can do things like ask an object if it is a nil object. Since it is used to return a negative meaning to an operation or a non-result, it's a good way to catch edge cases. False and nil are trip-ups for programmers coming from other languages where because false does not evaluate to 0 and true doesn't eval to 1.


Arrays in Ruby

Ruby syntax for working with arrays (cheat-sheet):


CSS Symbols

Symbols used in CSS

symbol name what for notes
. dot (period) denotes class value
# pound denotes id value
* star universal selector
space descendant selector
, comma group selector
: colon used for pseudo-classes only :hover and :active are supported by older IE versions; different pseudo-class support based on browser
> greater than child selector not supported by IE6 & earlier
+ plus adjacent selector CSS3 only
[ ] brackets attribute selector CSS3 only

TechCrunch 50: RackUp and Udorse

Two more presentations from TechCrunch worth mentioning. The first, a interesting gift-card auction site that aims to expand retailers market for gift cards. RackUp is an EBay-like site where shoppers can bid on gift cards. The people who bid soonest (unlike ebay) and the most get the gift card, typically for less than the actual amount on the card. (You might pay $50 for an $80 gift card.) The discount you receive depends on a few factors which I didn’t quite catch, but it has something to do with when you bid (rewarding earlier bidders first) and your ‘score’ on RackUp. It sounded like they give frequent shoppers bigger bonuses.

How do they do this? The retailers buy this as a service from RackUp, providing the gift cards at 10-20% discount to company. RackUp then gives a bonus back to the buyer, on average about 8% discount. If you don’t win, you don’t pay anything, so it’s not an auction. The CEO says: “We are actually growing the pre-paid market for retailers.”

The gift card market is 100 billion and, according to the presentation, 7-8% of that is bought online.

Finally, UDorse was one of the best received (by the judges) presentations. By now it must be clearer and clearer that on the internet eventually every square inch of possible attention is for sale – even your private photos. This visual endorsement platform aims to transform the picture you are already sharing online into a product endorsement deal that earn can you money on. No joke. As you browse over the photo, there’s a little “U” icon that you can rollover and see what the thing is – for example, the dress or clothing you are wearing in the picture.

“We call them ‘udorsements’.” co-founder Geoffrey Lewis says. “A cool new brand, a hot new spot, travel (Hotels), anything,” he continues, in reference to what can be “udorsed.”

The floating box which appears when you rollover can include a little caption of the brand, how much it costs, and how you can get it for. While the app doesn’t work direclty on Facebook, the company says they pull in media from all your social networking sites (Facebook, Flickr, etc). They have an iPhone app, plans to expand to Twitter, and build Javascript plugin for your blog.

Marissa Mayer, from Google, responded: “I’ve always thought that this was one of the primary ways social networks make money.”

Tony Hsieh: “I do think it’s a little weird that if I’m your friend, you can get paid so I can look like you, dress like you.”

UDorse is a Manhattan-based company co-founded by Geoffrey Lewis, Trevor Austin, Jonathan Hoffman.


TechCrunch50: Story Something,, Sealtale, iTwin, 5to1, DataXU, FluidHTML ToyBots, DataXU, SeatGeek

TechCrunch50, the industry’s American Idol-like startup spring board, wasn’t immune this year to the usual roundup of mediocre start-up ideas. Most of them pimped by overly optimistic business types who have convinced themselves their ambitious yet somewhat dubiously profitable start-up dreams are going to make it.

Of the miss-worthy companies, a website to allow children to be characters in their own stores (“Story Something” is the name of the company); a GuitarHero-inspired game to let you be any member of a band (“”); a service that provides a “seal” to allow someone to have a image that represents them appear across various places of the web they might be represented like blogspot, tumblr, wordpress, facebook, myspace. (“Sealtale”); a hardware device that acts like an “invisible cable” – two usb keys that can be separated and plugged into any two computers (don’t even have to be on the same network), providing instant access to the remote computer’s drives (“iTwin”).

An interesting technical project which caught my attention is FluidHTML, a markup language derivative of HTML that allows you to write in HTML-like markup to create Flash applications. This solves three problems inherent with Flash, an Adobe technology which has received various adoption in the last few years. Once the foremost technology to build beautiful “rich internet” sites (the kind where things fly around, make noises, play movies, and the like), Flash is now experiencing a backlash as big players (most notably Apple with their refusal to include a Flash player in the iPhone) try to thwart the Adobe-dependance that would be created if Flash was the de-facto and only way to create animated sites (Many Web 2.0 site using animation libraries and AJAX come closer to providing rich internet experiences, are seen as competition for the Flash platform altogether).

FluidHTML, however, is not a Flash alternative, it is a markup language to make the creation of Flash embeds easier (and therefore cheaper) to code. It solves three inherent problems: 1) search engines can’t index Flash very well, 2) search engines can’t analyze Flash for deep links (the fundamental idea that pages link to other pages), and 3) browser history doesn’t work work because any “back” and “forth” within the Flash player isn’t part of the browser’s back & forth feature provided by the browser. Fluid HTML attempts to solve all of these problems by turning Flash into HTML-like content which can be search & indexed but is rendered to the user as a Flash movie. “We are making flash work the way the rest of the web works.”

One of the more popular companies was ToyBots and their forthcoming toy call Woozie. The device is basically a small electronic controller that goes inside of a stuffed animal, making the toy an interactive project between the child playing with it and other parents. In fact, ToyBots business plan to to build the platform that will facilitate all kinds of toys being made in this realm. Outlined in this slide, the device features thing a lot like an iPhone- GPS, accelerometer so it can react when the toy is shacked, etc.

The “Woozee” (toy) can wake up the child at a specified time, then tells the kid that she has a message waiting. “Using the accelerometer, I give Woozee a hop and he plays the message.” A message from ‘dad’ pays, saying that he has a great bedtime story to read the kid. The ‘dad’ is away on a business trip but using his iPhone has selected an audio book and remotely instructed the toy to play the audio book exactly at 8:30, bedtime. (Part of me thinks this is cool, and part of me thinks it’s a little creepy, but I don’t have kids.)

The judges response to the Woozie seemed to center around the porn industry and various adult uses of the toy, along the vein of whether or not this technology would be licensed to other people, if intellectual property is locked down and/or open to the public, etc.

“I’m amazed that a nation which can create this kind of sophisticated toy and send a man to the moon, cannot develop a toilet seat which doesn’t fall when you are using it.” – Yossi Vardi

In an impromptu calling up of a representative from Best Buy onto the stage, the judges wanted Best Buy’s reaction. For the most part, the representative was positive about exploring it more, but wouldn’t commit to numbers of how many he though Best Buy could move.

On the internet advertising front, two companies trying to create software to better tailor advertising (banner ads) – something which remains a problem for a lot of high traffic sites that run banner ads. Both attempt to eliminate the problem of inappropriate ads being run on sites that don’t want that kind of advertising. Pornography, or ads with an agenda clearly oppose the site’s because a computer matched keywords off the page but failed to realize that the ad’s agenda is opposite that of the sites, therefore degrading the brand of the site running the ad or the publisher showing the ad. (Like, a pro-Israel ad running on a news article that is politically pro-Palentine, for example)

First of the two was 5to1, a company which is competing in a space which is typically regarded as being dominated by Google: the reliability of targeted marketing advertising. Their claim is that many banner ads which run in the “remnant market” (when Google or their ad networks don’t sell ads at full price, they are sometimes sold to affiliates a lower prices).

Another company, DataXU, a start-up with a lot gusto (they claimed to have “several PhDs” as founders). “We create algorithms that figure out which are the best consumers, sites, and ad creatives are the most likely to drive sales.”

DataXU continually alluded to during the presentation (basically claiming that they had developed an algorithm better than any other for ad matching that was based on, yes, rocket science). When pressed by the judge for the “secret sauce” that he kept mentioning, the presenter offered no more than to say they were applying mathematical models of machine learning to get better ad delivery performance.

Finally, an interesting startup with the attractive charismatic Jack Ratzinger giving the presentation (always helps) describing, a concert & sporting events ticket brokerage site that tracks the prices of sales on the secondary-market (tickets bought & sold for an event on ebay, by scalpers, etc). The site attempts to track the fluctuation in price, then predict it as the event gets closer, allowing you to buy the ticket at lowest possible point.

According Ratzinger, the system crawls the internet and pulls in thousands of ticket sales. “We also pull in other external factors that we know that drives ticket prices: who’s playing, are they in a playoff, what’s the pitching match, is the ballpark holding a promotion, what’s the weather like, is there a Bruce Springstein concert right next door.”

As part of his demonstration, he showed the audience a slide with a line graph showing the ticket prices as the event got closer and asked by a show of hands how many people would buy a ticket today or wait (the room was evenly split). The second slide shows in red what actually happened – ticket prices when down.

Ratzinger claimed the software was currently testing at about 75-80% accuracy and improving every day.


TechCrunch50: American Idol for Tech Startups

One wonders just how far outside the echo chamber that is Silicon Valley a conference full of fanciful startups will matter. Yes, Tech Crunch, now in its third year, provides a media pulpit from which countless mostly-unknown tech industry startups launch their hot new idea. Problem is, most people who run startups are woefully deluded as to the probably of success and are running on the same kind of bravado found requisite to be a tech startup today: You believe you’ve got an innovating edge to a growing market (or you believe you can create a market where there wasn’t one anymore), you’ve got some piece of software that does something Web 2.0, and you’ve got a marketing team. Problem is, most of them don’t actually have anything innovative and are running on hot air.

TechCrunch is like American Idol for internet startups: 50 are selected from thousands of submissions. Through the course of the week, each one makes a presentation. Most of them have been in “stealth mode” (building a business without publicly telling anyone what you’re doing) until this event. Some of them have been around but are launching a new product. The presentations are then critiqued by a panel of experts (think, people who actually made it): Roelof Botha (from Sequioa Capital), Ron Conway (an industry veteran who invested in the early days of Google, Ask Jeeve, Paypal), Dick Costolo (Chief Operating Officer at Twitter), Reid Hoffman (co-founder of LinkedIn), Tim OReilly (Yes, Tim OReilly himself. if you don’t know who Tim OReilly is I can’t help you), Kevin Rose (founder of Digg), and several others (only a subset of all the panelists are on the panel each day).

While there is no rounds of elimination, the judges do offer candid critique American Idol-style. The official prize is $50,000 to the startup with the most potential, but the unofficial boon to the companies themselves it he publicity. Other investors might see or meet them and, if they are successful at generating interest, might invest.

Perhaps the funniest happenstance so far was the very first presentation who was none other than Penn Jillette of Penn & Teller. They were the first presentation to go up, the headlining event, and ironically the least understood. One imagines what TechCrunch was thinking when they accepted them and put them first: A good opening act, world famous Penn & Teller present their new iPhone app (yes, they wrote an iPhone app), which is – you guessed it- a card trick. As his usual style to debunk the allure of magic itself, Penn told everyone exactly how the trick works after he presented it a couple of times.

Penn & Teller got famous in the 90s by being the magicians who gave their secrets away. Literally, after doing a great trick they just tell the audience how it is done. Philosophically, they do this do make a break from the mystique of the supernatural magic act – think the Doug Henning, Siegfried & Roy, David Copperfield. While being bona fide magicians in their own right, they attempt to break the 4th wall and engage the audience by challenging us to see our own blind spots: Magic works because of confirmation bias. Magic is not so much about the concealing of certain things from the audience, it is about making the us pay attention to other things so that we don’t notice the trickery behind the illusion. In the business, this is known as “misdirection.”

But back to TechCrunch. So here’s how the trick works: You tell your friend that you are personally good friends with Penn & Teller and that you text (SMS, on your iPhone) all the time. You tell your friend to think of or pick a card from a deck of cards. You then hand your iPhone to your friend, and it comes up in the SMS application. You tell your friend to text either Penn or Teller and ask what the card was. The response is comical and often includes several text messages. (On stage, the response that came up was Teller saying “I’m thinking of a queen.” To which the participant said outloud “I didn’t pick a queen.” The next text message read: “But enough about my personal life…” before the final text which is, of course, the exact card you picked.) To find out how it works (clue: it’s not really Penn or Teller texting you back), you’ll have to buy the app or see the presentation.

The scene after Penn presented was comical. First, as best I could tell, the panelists seemed to have no clue who this huge (he is 6’6), sort of crass New Englander is. During his presentation he said that this card trick was used by a stripper in Vagas and has dramatically increased her tips. “If you can get noticed when you have tits & ass to misdirect, imagine how well it will do when you don’t have tits and ass.” A rather salacious thing to say at a tech industry conference, no? Well, it just got funnier.

Penn tries to again explain the whole trick again (after having just finished explaining it a first time) to the strained Ron Conway who responds, “So, it’s a card trick?”

Being TechCrunch panelists, they treated Penn as if he was a start-up. (One wonders, didn’t anyone tell them that this headlining act wasn’t really a startup but one of the world’s most famous magicians demoing a simple technology-based app). The panelists were so thrown off by Penn’s demeanor and crass that one of them said “Are we being punked?” 

“So your revenue model is selling the app?”

It’s cool that Penn & Teller are hip the times, but they’re not about to launch an internet startup, which the panelists just couldn’t seem to believe (that is, in fact, the point of Tech Crunch). Bluntly honest and slightly out of place at this dorky conference, Penn responds: “No, it’s not so much a money maker for us as a public service to get guys laid.” To cap it all off, another panelist says “I hope you don’t make me disappear from saying this, but I don’t know what the long term business that I’m investing in…”

Penn’s frank response: “No, there’s no venture capital required, we’re done and it’s for sale.”

Did someone miss the point here?