Ruby CSV write to a file – Gotcha!

Unlike the beautifully concise and familiar 1 liner of code to dump a document to a text file:

File.open(local_filename, 'w') {|f| f.write(doc) }

The ruby csv library requires quite a bit more typing, and the documentation for it is easy to misunderstand.

One of my primary needs, is often data wrangling.  Changing the contents of a csv file for use in another framework, whether it’s reverse coordinates, stripping unwanted columns, or adding needed columns to the data, and I always trip up on how to dump the changed CSV after manipulating it.

As a reminder to myself, and maybe a hint to others, I’ve include the proper way to dump out your arr_of_arrs, once you’ve manipulated it as you will,

CSV.open(newfilename, "w+",
             :write_headers => true,
             :headers => arr_of_arrs.headers) do |csv|
    arr_of_arrs.each{|row| csv << row}
 end

The important bit is remembering to do an each loop of your arr_of_arrays object. This for instance will not produce the desired results:

CSV.open(newfilename, "w+",
                :write_headers => true,
                :headers => arr_of_arrs.headers) do |csv|
   csv << arr_of_arrs
end

Eggsactly

Eggsactly the thing you need if you are looking for some variety in that old staple the Egg. Trying to get & stay fit is all about making it fun and trying new things.Love your life, if you don’t, no one else willhttp://m.shape.com/healthy-eating/…

Eggsactly the thing you need if you are looking for some variety in that old staple the Egg. Trying to get & stay fit is all about making it fun and trying new things.

Love your life, if you don’t, no one else will

Twenty Quick and Easy ways to Prepare Eggs

Bone Yard for Travel Startups

My personal math has the Travel Startup success rate at lower than 1/2 of 1%. I’m calculating over 1000 travel startups in the last decade with less than 50 ‘successful’ startups. The rate for Big Time success is even lower maybe 1/10 of 1% It may…

My personal math has the Travel Startup success rate at lower than 1/2 of 1%.

I’m calculating over 1000 travel startups in the last decade with less than 50 ‘successful’ startups.

The rate for Big Time success is even lower maybe 1/10 of 1%

 

It may be too early to tell, but I essentially agree with this post on Pando Daily from a few months ago.  Travel was one of the early candidates for a market that could be disrupted by the creation of the Internet.  There are several very profitable companies that have fundamentally monopolized the space.  In the US Market, there is Expedia (created by Microsoft in partnership with GDS’s) 1996.
Orbitz.com (created by United Airlines, Delta Air Lines, Continental Airlines & Northwest Airlines in 1999).  Two of Orbitz’s founding creators no longer exist.   Travelocity.com  was created by Sabre (a GDS) which was wholly owned by American Airlines at the time.  Priceline.com was founded by Walker Digital (a very successful company with over $300M in revenues in 1998).  
So of the big 4 Online Travel Agencies in the US, none  represents what we typcially consider a startup, and 2 were actuall existing players in the market just shifting from offline to online.

If you look at the last decade, there a few very successful companies but very few that started in a dorm room.  Kayak was started by Paul English (an exec at Intuit) and Steve Hafner who was part of the original Orbitz team.  They started with a ton of funding and industry experience.

ITA Software was essentially a true startup.  It slogged along in the “Might Make it” status for 15 years before getting snatched up by Google.  Granted they had > $100M in revenues and > $200M in funding for many of their final years, but with a limited supplier chain and colossal failures in attempting to scale from Shopping Engine to PSS provider there was never going to be any future other than an acquisition for ITA.  Still an $800M acquisiton deal is clearly a SUCCESS.

 

Tripadvisor.com (11 years since founding) certainly meets the criteria.

As does Tripit.com which was acquried for $120M by Concur.

Farecompare has done very well (founded by Rick Seaney & Graeme Wallace from work they did at Hotels.com)

There’s also Farecast (founded by Oren Etzioni) purchased by Bing.

Flightcaster (Evan Konweiser, ex-kayak staff member) was purchased by NextJump.  I’m not sure NextJump is successful, but I guess I count this as a good exit.

Portland based Flightstats.com (a Datalex spin-out) seems to be doing quite well.

More recently there is Gogobot (too soon to tell whether it will last, but it has strong user growth)

And of course there is star-studded Hipmunk.com

 

Sidestep and Swoodo, both acquired by Kayak can probably also be considered true startups that succeeded by getting acquired. ($200M for Sidestep, unknown for Swoodo).  But now we’re venturing outside the US Market where there are a few other notables:

 Cheapflights.com (founded in 1996)

 Skyscanner (11 years in the making, started on the backs of 3 guys, 2 of whom kept their fulltime jobs for a while)

Danish born Momondo, (6 years old),

Maybe you can count Datalex (founded in 1985) but they don’t really fit the criteria of a start-up

There are many more notables like ClearTrip.com from India, but the point I’m trying to get it is this:

In just 2010-2011 Tnooz lists in excess of 300 startups in the travel space, only Gogobot and Hipmunk from that era are surviving at any significant level of success.

The era of the Travel startup may be over.  The cost of creating a startup in other areas is just too low, and trying to disrupt the travel space without serious connections and money is seeming less and less likely.  I’m not sure if developers will ever stop trying to tackle this space, but it’s certainly beginning to seem less and less likely that they will succeed.

Want to mention some other companies that you think qualify as ‘successful’ travel startups?  Send me a note or comment and I’ll update my post. 

 

Startup Failure Analysis

I saw this on Mashable.com but the original source was AllmandLaw.com I’m always astonished by the articles that discuss startup failures. There are many definitions, but in the tech community. If you’re not fully funded or have overwhelming user …

I saw this on Mashable.com  but the original source was AllmandLaw.com 

I’m always astonished by the articles that discuss startup failures.  There are many definitions, but in the tech community.  If you’re not fully funded or have overwhelming user acquisition momentum within the 1st 12 months, you probably fall in the FAILED category.  This one doesn’t attempt to cover the whole 90% statistic, but looks at a few side by side cases.  Worth looking at.

 

Dung Zen Gem

I am subscribed to The List Serve, it’s a service where 1 member writes 1 email that we all receive each day. Content tends to be very advice oriented, “never give up, pursue your dreams, be happy”. Sometimes it’s confessional. Sometimes it’s inst…

I am subscribed to The List Serve, it’s a service where 1 member writes 1 email that we all receive each day. Content tends to be very advice oriented, “never give up, pursue your dreams, be happy”. Sometimes it’s confessional. Sometimes it’s instructional. Often it’s insipid. But I still skim it everyday and today there was a Gem so I’m re-posting it here without permission.

So the story goes…..A little bird was flying south for the winter. It was so cold that the bird froze and fell to the ground into a large field. While he was lying there, a cow came by and dropped some dung on him. As the frozen bird lay there in the pile of cow dung, he began to realize how warm he was. The dung was actually thawing him out!
He lay there all warm and happy, and soon began to sing for joy. A passing cat heard the bird singing under the pile of cow dung and promptly dug him out and ate him.

Moral of the story:

(1) Not everyone who shits on you is your enemy.
(2) Not everyone who gets you out of shit is your friend.
(3) If you are happy and warm in a pile of shit then it’s smart to keep your mouth shut!

………and the doctor recommends (I really am one) :-

1) Make an effort to smile everyday, it will help you live longer.
2) Don’t forget how to use a pen. 2) Enjoy your single malt scotch as it was intended…straight and unadulterated. 3) Take time to sit with your eyes closed for atleast 10 minutes…it will open up your mind.
4) Read IF by Rudyard Kipling and Auguries of Innocence by Wiliam Blake.
5) Everything will be alright at the end, if it’s not alright then it’s not the end

Live long and prosper my friends!

Aniruddh Behere
Springfield Illinois, USA

Follow them on Twitter @thelistserve
thelistserve.com
facebook.com/thelistserve

Adulthood isn’t abandonment of dreams

So, I’m 40. That’s not particularly old. But I am fully an adult. I have a 21 year old stepson, and 11 year old daughter, a wife, I used to have a mortgage and I have life and car insurance etc. Young Entrepeneurs constantly portray the mindset of…

So, I’m 40. That’s not particularly old. But I am fully an adult. I have a 21 year old stepson, and 11 year old daughter, a wife, I used to have a mortgage and I have life and car insurance etc.
Young Entrepreneurs constantly portray the mindset of older folks (adults) as having abandoned their dreams.

My take on it is that it comes down to your perspective of the future. As you age, the future becomes less abstract. It arrives, as it were, as it is. In the future you could have been the next Hemingway, except you’re not. You’re a 40 yr old serial entrepreneurial technologist with 2 kids.

In the future you could have invented Instagram and earned a billion in shaky Facebook stock. But you’re not. You still keep track of your hours and you usually invoice some one for Travel expenses and you pay attention to when the reimbursement check is scheduled to come.

So being an adult isn’t about abandoning your dreams. dreams just have shorter shelf life. There isn’t an opportunity to wait 5 years to be the next you. It’s today.

Dreams cost more because they last less long. And they mature into market value sooner. If I dream of being In band at 42. I pretty much need to learn to play guitar today. If I dream of running a marathon. I need to enter a 5k run for next month. If I dream of owning a home, I need to put away 15% of my next check towards a down payment.

So adults haven’t abandoned their dreams, they just have to work harder to have a dream, because tomorrow is today and dreams don’t come cheap. They live or die on what you did this morning.

Mountain Lion killed my apache, fixed

So, Mountain Lion upgrade generally went fine, but had some real problems with my MAMP stack (Mac, Apache, Mysql, Php). I program in a lot of languages in and keeping my stacks working with current development machine is usually no problem, but I …

So, Mountain Lion upgrade generally went fine, but had some real problems with my MAMP stack (Mac, Apache, Mysql, Php).  I program in a lot of languages in and keeping my stacks working with current development machine is usually no problem, but I ran into about 3 hours of confusion with Mac Mountain Lion and Apache.

 

Thanks to Neil Gee and this very idiot proof walk thru, I got it fixed up in a few minutes once I started looking for help.  Mysql,php,phpmyadmin on OS X 10.8 Mountain Lion

photo via

http://www.cultofmac.com/146957/mountain-lion-kills-os-x-support-for-a-number…

Quit while you are behind

This is in response to a recent post by OM Malik http://om.co/2012/03/20/entrepreneur-lesson-1-from-mark-pincus-stay-with-it/ Basically it’s that Stick With It advice you hear so often. I usually agree with most of his insights but this one just r…

This is in response to a recent post by OM Malik

http://om.co/2012/03/20/entrepreneur-lesson-1-from-mark-pincus-stay-with-it/

Basically it’s that Stick With It advice you hear so often.  I usually agree with most of his insights but this one just rubbed me the wrong way.

FACT => Most startups fail
CONJECTURE => Many go down in flames with debt, unpaid salaries, legal liabilities, broken promises, divorces, friendships ended etc

CONCLUSION => Most startups fail too late.


In my experience startup Entrepeneurs have by definition already got the stick with it gene. They wouldn’t be doing a startup of they didn’t. In fact I would say too many of them have a delusional sense that of they just keep trying to hang on, somehow it will all work out allright.

In fact the best piece of advice I can give is this: When you find yourself with a shovel, deep in a hole, STOP DIGGING.

Practically what this means is that it’s better to retreat when the writing is CLEARLY on the wall, regroup, maybe take a temp job, and come at it again a bit later when you’ve digested what went wrong how your luck worked against you.

So stick with it by all means, but don’t believe the fantasy that if you stick with something that isn’t working, all you need is persaverence.