Losing Hackathon Virginity: AngelHack San Francisco 2012

UPDATE: 06/28/2012 Today we received an email from AngelHack.com organizers. FashionMetric was selected to participate in the Grand Finals Demo on July 12. What are the odds? They choose 6 wildcards from over 40. Unbelievable! Main prizes include airfare to Silicon Valley, other team members are in Los Angeles, hotel and other things.

AngelHack Grand Finals Demo
We are the finalists, AngelHack Grand Finals Demo

I have been writing code for many years but somehow I managed to avoid hackathons till last weekend. I was wondering why would somebody spend their time and energy, deprive themselves of sleep and stress to deliver half-backed products in such a short time? Yet I’ve heard that it could be fun. When I got email with early bird 75% off code for AngelHack 2012 in San Francisco I didn’t hesitate to register. I’ve heard that it’s one of the biggest and the best hackathons around. Teams from different cities compete with each other using sponsors’ APIs.

Teams pitch their ideas
Team pitch their ideas to attract designers and developers

On the day of the event I still didn’t have my own team or even any decent idea due to being busy with other things. I thought I can still come and check it out, say “hi” to friends and meet new people. Immediately I was drawn into auditorium on the first floor to hear teams pitch their idea to attract designers and developers. I’ve heard a few good pitches and approached people. One of them was FashionMetric, they won Lean Startup Machine last week in Los Angeles and as a prize got tickets to this hackathon. Nevertheless I liked much simpler idea after I realized that it could be done in 24 hours and I decided to give it a try. Too bad there was only high-carb breakfast food and when I came back after lunch in downtown Palo Alto my team disassembled and their members split to contribute to other teams. Gladly, FashionMetric still needed developer so I joined them and was very glad that I did later!

Team FashionMetric
Team FashionMetric, winner of Lean Startup Machine in Los Angeles

I’ve noticed that there is clear separation between veterans of hackathons and just random curious folks. Former group bring sleeping bags, support teams, supplies, tooth brushes. They have strong teams of long time friends, know sponsors, their tech stack and stay heads down coding and hacking mostly all night. Latter group tends to be more individualistic, leave early to catch the last train back to San Francisco and seem to be less dedicated. I think there is nothing wrong with being casual but it could be distracting to more focused team members. We had funny situation when our designer disappeared leaving her laptop, food and 7th cup of beer on the table (she drank the previous 6). The AOL building provides many places to crash, in fact it’s the same building where startuper lived for free for 2 month escaping from security while building his prototype. She was nowhere to be found and our biz people, respect to them, had to master Photoshop, HTML and CSS to speed up our development :)

Hackers at rest at AOL lobby
Hackers at rest at AOL lobby

A few word about organizers. They were up all night bringing pizza, drink and normal food. They re-tweeted and responded to tweets quickly. I’ve seen somebody on Hackathon.io complaining about how they didn’t enforce rules of the hackathon: to limit development time to 24 hours, not to use code developed before the event, etc. but I’m personally not aware of bad were the violations.

Soldering and some real hardware hacking
Soldering and some real hardware hacking

Overall, despite the fact that our team, FashionMetric didn’t pass into second round I had fun working with awesome people. I was impressed by the amount of work we were able to accomplish, dedication and focus. Because we had everything brought and catered to us, even chair massage, we could concentrate on work. I think hackathons are good to test team, idea or even learn something cool like Firebase – I finally got beta invite! In addition we used Windows Azure cloud servers and BackboneJS as our thick MVC client framework.

15 things I learned from 500 Startups (aka Fail Factory)

Inspired by “50 things I learned at 500”, I decided to write my own but shorter version. It’s not as funny as Kim’s, but it will give you slight insight into this prestigious accelerator (chances to get in it is lower than acceptance rate at Ivy League colleges – 0.8%).

  1. 500 Startups is a fail factory for a reason: “…have fun cause most likely you are going to fail anyways” were the words of Dave McClure during one of our first batch meetings. Enjoy the amazing view from the 12th floor office while you can.

    2011-11-22 12.05.32
    View from the tallest office in Mountain View
  2. You can get into 500 Startups accelerator even if your idea or product sucks. Or even if you don’t have product yet. Killer teams of hackers, designers and hustlers – that’s what matter! Startups pivot a lot and often.
  3. Location matters: imagine if you have the greatest product, team and traction but in the middle of nowhere and there is a similar startup with inferior metrics in Silicon Valley. Mostly likely they will be founded! Connections and contacts are VERY important. Angels invest in faces and teams.
  4. Don’t f*ck up (or at least do it fast): the worst situation for founders (and investors) is when the startups in the land of “living dead” making some progress but not succeeding; failing fast and soon is important if you’re not blowing up.
  5. Many startups have similar recipes for failure. Too many non-tech founders in a tech startups is as bad as lack of focus and discipline.
  6. Don’t work with smart but unpleasant people. Business is personal no matter what other people tell you.
  7. Melissa and Christine are super friendly. Dave is super busy traveling most of the time. Spend your time wisely if you have office hours with him. True for any other office hours as well :)
  8. Living with co-founders is hard. Even if it’s okay for you it might not be okay for them and there is no easy way to tell how bad the situation is until the conflict comes up. So get your own place unless you are married or in a bromance with your co-founder :)
  9. Bunch of nerds in their 20s equals frat house like parties, beer-pong and poker nights, dirty dishes, messed up toilets (leads to public bashing by Paul).
    2011-12-08 19.40.00
    Beer-pong every other night
    2011-11-06 22.23.55
    Brazilian night

    2011-11-16 21.01.08
    Somebody going to get hurt
  10. Mentors, investors, angels, VCs, reporters, clients and random guests roam freely thru clattered office of cheapest kindergarten-like furniture. Be ready for it any time and keep your table neat.
  11. Get sh*t done: building things is more important than knowing some deep technical things and concepts. “Success theatre” could be fun (everyone like to be perceived as a next cool thing) but there is a problem if you start believing in it yourself!
  12. Don’t spend all your money on super duper rockstarts/ninjas/gurus with big titles in prestigious companies unless they really can deliver.
  13. Don’t spend your time on interns who slow or just not up to the tasks: it’s not fair to them and it’s just a waste of time for you because usually there is no time to teach them.
  14. Suburban life could be quite enjoyable: plenty of restaurants, trails, gyms, coffee shops, massages, etc.
  15. Naps are shameless and couches are precious.

    2011-11-01 16.24.04
    Power nap time

Now, enough writing – back to work.

Azat Mardanov (500 Startups F11)

Force Download Dialog on XML (or any other) File Type

Strangely, but Chrome browser doesn’t have build-in support to display XML in a pretty and colored format with expandable and collapsible pluses and minuses and indentation the way it’s in FF and IE.
Of course there are plug-ins but for regular users opening link with XML file brings inconsistent results: in FF and IE they see nicely formatted XML and in Chrome they see just plain text.
One of the solution is to force download dialog on opening the link.

We can do it by:

  • adding rules to htaccess
  • creating intermediate PHP (or any other) script which reads and outputs content of out XML file

Continue reading “Force Download Dialog on XML (or any other) File Type”

How to use PDO and Parameter Binding

Parameter binding is essential for protecting your web application from SQL-injection. Pretty much all data which is going to be used in SQL statement needs binding. Binding simply saying is just a way to tell engine that a particular piece of data is a string, number, character and so on. By doing this special characters like quotes and double quotes, semi-colons, etc. won’t be interpreted as commands by the database.


public function dbSelect($table, $fieldname=null, $id=null)        {
$sql = "SELECT * FROM `$table` WHERE `$fieldname`=:id";
$stmt = $this->db->prepare($sql);
$stmt->bindParam(':id', $id);
return $stmt->fetchAll(PDO::FETCH_ASSOC);

Continue reading “How to use PDO and Parameter Binding”

How to Get XML From Database – Simple Perl Script

Although Perl is relatively old programming language and there should be plenty of reference available online – I still find it challenging to write something new in Perl because of it’s unusual syntax and many ways of doing the same thing.
Here is a simple script to get XML from database.
Continue reading “How to Get XML From Database – Simple Perl Script”

Why and How to Write a Website Proposal

If you are reading this post probably you already know how proposal might be important, if not then it’s definitely worth repeating: bad or even worse no proposal at all could be not only a deal breaker but a could turn into a nightmare for you (price is too low, client’s expectations too high and so on). And having a proposal makes a beginner freelancer look more professional – that’s always a good selling point.

Continue reading “Why and How to Write a Website Proposal”

Quotes and Perl Script

Recently I encountered problem that some characters weren’t displayed correctly on a web page generated by CGI script – when I ran it in unix console I got following message:

Some character(s) could not be converted into client’s character set. Unconverted bytes were changed to question marks (‘?’)

It appeared all I needed to do is to explicitly set the character set when I create Sybase instance with DBSETLCHARSET:

$dbh = new Sybase::DBlib $user, $pwd, $server, DBSETLCHARSET('UTF-8');