Go, Diego, Go – Building a web app with Go

For over a year I wanted to build something with Go and for whatever reason I never came around to it. The simplicity of the language, the sheer speed and the portability of the compiled program make for an attractive combination so I was eager to try it out.

The procrastination stopped last week when during a trip I finally had some down time to build an app.

I’ve been doing some presentations and tried multiple systems to do it. Powerpoint and Keynote are trusted tools but projects like Reveal.js make an impact. After using Reveal for the first time I realized there was an opportunity to build an app that helps in the process of creating and showcasing a presentation with it.

The idea is simple, a hosting app for javascript presentations with a couple tools that are unique to the web (like multiplexing and easy sharing).

Golang itself is not hard to understand but there is something about it that was just different than what I am used to. After taking the tour a couple times the time came to start coding (kept having to retake the tour because I never did anything past it). The app itself is open source and you can follow the process here: https://github.com/dlapiduz/jprezo.

I’m planning to write reports on my progress building this app, and these are some of the topics I will touch on:

  • Choosing a Go web framework
  • Choosing an ORM
  • Building a Go app with Websockets
  • Deploying a Go app to something like Google AppEngine

Go diego Go

WhatsApp: much more than a messaging app

With the recent news of Facebook’s WhatsApp acquisition, there has been a lot of talk about the how simple the application is. The feature list doesn’t differ from other apps or even SMS. You can send and receive messages for free, and that is pretty much it.

Being  a simple application it might be hard to pin point its success. You have to look beyond the features and understand what this app is about. The benefit of this application is not just about messages. It is about communication. It is about being in constant connection with friends and family around the world.

Other products had similar features. But they were restrictive and would only let you connect with a limited set of users.
BlackBerry Messenger was a notorious case. Multiple users sticked to the company just to be able to talk to other BBM users but no one else was allowed. SMS would let you send messages to anyone with a cell phone but the cost made international communications prohibitive.

Then came WhatsApp, the first true multi-platform messaging app. A tool that would let you talk to anyone in the world that has a capable phone regardless of the platform. It took the world by storm. Without any marketing, PR or advertising, it has reached over 400 million active monthly users. And these numbers are not the usual Silicon Valley talk, they are users that have verified their phone number and continue to use the application.

The benefit of allowing users to stay connected with family and friends is a strong one. Over the years several companies have made huge strides in this field. Facebook, Skype and Flickr championed this benefit. WhatsApp is a company that, with excellent execution and a short feature list, brought this benefit to our pockets.

What programmers do matters

This is a cross post from Medium: https://medium.com/p/6dab6b48d838

When I was about to graduate from a computer science academy, my friends and I were all eager to go out, find a job and start our professional lives. One night, over a beer, one of them said something along the lines of “Why do you care so much about what the company does? Just get the highest paying job. It’s not like we’re doctors; what we do doesn’t really make a difference.”

That message hit me like a brick. What do you mean that we don’t get to make a difference? Do you have to be a world leader, a doctor or a teacher to leave your mark? What impact does code have in the world? How does it change people’s lives?

Those were a ton of question which answers led me to believe he was right. Making an impact was reserved for computer scientists at NASA or IBM, the rest of us were stuck doing accounting systems.

The years passed by, and along came the Internet revolution. Programmers led this revolution from the front, but some people still doubt the impact we have.

There is no question about it anymore, what you do as a programmer makes a difference. Even if you don’t count the engineers that build software for medical equipment or artificial intelligence for the military, the work that coders do affects people in radical ways.

A developer at Twitter is giving voice to people who were mute before. Engineers at Kickstarter are enabling innovators around the world to build products which would have never seen the light of day before. Projects like Kiva make connections that were unimaginable before. Software is literally letting you help someone from a country you have never heard of buy a cow.How crazy is that?

As programmers, we are makers. We build tools that inspire people, generate action and change lives. Being a developer in this day and age is just amazing. There are huge opportunities to change the world. It’s up to you to write code that makes that difference.

Confessions of a product hacker


This is a cross post from Medium: https://medium.com/p/2e37fc516a31

It has been about 10 years since I started doing web development and I’ve always struggled to find my spot in the project ecosystem. You could describe me as a full-stack developer but that misses the mark. I am in

clined to believe that product hacker fits me, and here are some ramblings that will explain why.

I don’t dream about code, I dream about the product

Code, to me, is a means to an end. Some people like to do really awesome things just for the sake of hacking away and love solving riddles in obscure languages.
That’s not me, I love building productsIf someone is not going to use what I am building then, What is the point of building it at all?

This means that I blow every interview riddle or code competition but ace doing the actual job of being a developer and even win some hackathons.

Don’t get me wrong I obsess about code, not for the sake of it, but because it is extremely important to have a consistent and clean codebase when you are moving fast.

The lines between front-end, back-end and operations

are extremely blurry

When you are building a product, you think about the whole experience. I’ve spent countless hours working on setting up servers to improve load times yet you’ll also find me working on perfecting an interface.

Most of my time is spent on the back-end but that swings from one to the other quite often and I operate under the believe that all the work needs to be performed in a holistic manner.
A piece of back-end code can be great on itself but it needs to work within the environment.

I would rather learn about marketing instead of new algorithms

OK, I said it. This will get me extradited from the developer community but I had to say it out loud.
As a product hacker I want people to actually use my software and if that means doing marketing, UX or customer discovery so be it.

Rarely do I see scientific papers that would really improve the work I am currently doing. That said, without them there wouldn’t be any advances to the whole ecosystem but it’s not up my alley.

The more people that use my products the better I feel. Every time a new user interacts with a product I build we establish a relationship and we talk through features and feedback.

It feels lonely in the middle

Given that it is pretty hard to even describe what is my expertise, it is extremely hard to find peers that are on the same bo


Technical product managers or full-stack developers are the people who I feel comfortable amongst but I struggle belonging some times.

Repeatedly I heard startup CEOs mention that they are on a similar situation so, maybe, I should try that.

If you think you too are a product hacker or feel identified by any of this please write to me @dlapiduz. I would love to chat about how it has worked out for you.

Curiosity is dead – A take on Heroku

When Heroku launched in 2007 it stirred the web deployment industry in a way that I have never seen before. The worry free, scalable and easy to deploy solution created waves in the Rails community and got noticed in almost every tech circle.

The “black box” approach to deployment was very controversial and there is still a fair amount of criticism for the system since most people who are deploying to it don’t understand what is going on under the hood. That said the deployment system of just “git push heroku master” makes it so easy for a developer to deploy an app that it’s hard to blame anyone for using it.

After multiple (failed) attempts in the past, I decided that I would make Heroku work this time and, after a few hurdles, I was finally able to deploy a small Rails app to Heroku. Once everything is in place re deploying is so easy and quick that I started to wonder why I had delayed using it.

Basically any developer can outsource the operations department at a very low cost while he can focus on creating the code. David Ricardo’s theory applied perfectly. You can even outsource other services, like DBs, search or emailing, as plugins.

That said when you deploy to Heroku there is a feeling of using an appliance that you don’t have when you deploy to a regular server. Everything is out of your control, if you had to fix something you wouldn’t even know where to start. It has been over 10 years for me since I started placing web applications online and even though I am not an operations expert I know my way around a server. On Heroku there is nothing to do, no settings to tweak, no man pages to read. There are probably some optimizations you could do but most likely people just add more dynos to their configuration and that is it.

My main concern though is not that, but the fact that you have to work within the Heroku ecosystem. Do you want Mongo? Use mongohq or mongolab (and pay extra). Do you want to compile it from source? Good Luck! Do you have your own fork of a project? Deploy it somewhere else, this is an appliance.

So, what is the problem? you may ask. The problem is that by limiting the exposure to the underlying systems and reducing friction on deployments, developers don’t feel the need to improve the back-end projects. Why would I work on the Redis core if I can’t even deploy my changes?.

The worst part is this change is a piece of a whole movement to become an industry of abstractions. I would bet that most of young developers don’t even know how to assemble a server or how the network is connected to them.

Curiosity outside our comfort zone is dead. If you are a developer you should try to learn as much of the whole ecosystem as you can. That makes you a better engineer. If after playing around with multiple systems you still want to deploy to the black box, great. The good thing is that it won’t be a black box anymore.

Here is a relevant TED Talk:

Minority? Me? Really?

This year I was lucky enough to attend Railsconf. Even though I’ve been a Rails developer for the last 6 years I never attended one. It was an enlightening and interesting experience but I’d like to write about a situation that took me aback.

I knew some guys from Uruguay and Argentina and we were ready to go to dinner with a few others. We all spoke Spanish except from one guy from the US. He is very renowned and smart but he said something that was just off.

“Please keep speaking in Spanish, I am a white American guy, I’ve never been the minority before” (I am paraphrasing but he used the word minority).

That would mean that the rest of the time I spend in the US I am the minority.

I started thinking about the times throughout the years when I’ve had to fill out forms that ask: “Check here if you are latino”, “What is your race?”, “Question about Hispanic Origin,” and how I never knew what to say.

I was born in Argentina (Southern South America) but to be honest I don’t really feel latino. I don’t watch Univision or eat any more tacos than my neighbor. I don’t sleep siestas every day or celebrate cinco de Mayo. That’s what I think that he (and a lot of other people) think about latinos and hence me but I couldn’t fit that stereotype any less.

It’s not only that I don’t feel latino, but I don’t feel like I am part of a minority. I speak with a bit of an accent but it’s not only a direct consequence of switching from the switch from Spanish to English. Some people don’t understand when I speak Spanish either. And who doesn’t have some accent for crying out loud?

I am a white-ish guy under 30 years old with a pretty successful professional career, a lovely wife with a great home in an awesome city. If I am being discriminated against for being part of a minority please keep at it. But I doubt it has anything to with race or ethnicity. It comes down to the fact that I have worked my ass off since before I went to college, and worked both in academia and private businesses to reach where I am. So shut the hell up. Minorities are just bloody boxes to put people in. I am a jew latino geek, kind of fat, with disposable income, who likes cars, loves his family and is an apple fan. There you go lots and lots of boxes for you to put me in.

In any case, my point is this: in this day and age thinking about minorities is just wrong. Who cares what the color of your skin is, how deep your accent is or where your family comes from? Everything changes so quickly these days that minority segmentation is just irrelevant.

From Rackspace to Engineyard: Diary of a moving Rails app

About a year ago we decided to rebuild gamezone.com from scratch since it was built on Expression Engine and not only it had poor performance but it also was very hard to add features to.

As my weapon of choice Rails was used and with a very small, but great, team we were able to do it all in about 3 months.

Once we had the project working the question came up on where to actually host it. Gamezone is a site with a lot of traffic and the hosting is really critical.

We had a couple servers with Rackspace already and we decided to use their cloud for this site too. Setup with them is always a breeze. The load balancer, app and db servers were up in minutes and after the standard configuration the site was ready for testing.

We used LoadStorm to load test the servers and it worked flawlessly.

The problem started when we had to scale the service from the initial load to support the additional users that started to join after we started to add more features.

We had some scripts but it was very labor intensive to add servers or move stuff around. Moreover we started to run into some issues with Rails scaling and as we started to add more caching layers the pain grew. That’s why we decided to shop around.

I’ve been hearing great things about Engine Yard for a long time so we decided to take them for a spin. And since they have a free trial account it was even better.

The deploy process is really easy and their GUI/CLI tools are great so we were up and running in no time. You just pick the packages that you want to use and boom they are just there. I know that this is just a bunch of chef recipes in the backend but it is just beautiful how it works.

It was all very rosey until we decided to proceed and actually move to their services. Setting up the cluster was also a breeze just like the demo. The only problem was that some servers didn’t provision correctly so we had to terminate them and re create them, but no big deal.

After we had everything setup I noticed something: every time you deployed code that needed a migration the maintenance page would go up. I don’t know about you but I cannot have the server down for 5 minutes or more waiting for the migration to happen.

I contacted EY support and, always graciously, told me that Rails couldn’t handle rolling migrations but you could disable this at your own risk. Scratching my head a bit since I’ve always done migrations on live apps without problems, I decided to disable the “feature” (here is the code). Lo and behold nothing happened and we could do rolling migrations just fine.

Once that was settled we moved the DNS records and all went pretty smooth from there.

We had two minor issues worth mentioning. The first one was that with Rackspace we were used to having 4 virtual cores per server and now we have 2 (on the Medium High CPU instances) so we had to use large instances for the DB servers. The second one was that we had custom config settings for nginx and we didn’t know how to “keep” them. You can actually create “keep” files that engineyard won’t get rid of every time you apply the configuration.

If you have any questions about Rackspace, Engineyard or the process please comment below and I’ll do my best to answer!

The web is dead, long live the web!

Since the release of the App Store from Apple there was this talk about apps killing the web. Particularly this couple months there has been a lot of buzz about this and how the web would be dead in a couple years.

The idea is that people would use the Facebook app instead of using the web site. You would use the Yelp app instead of googling where to go to dinner, and so on.
This not only sounds good but it is actually a trend. Time spent inside apps in mobile phones is greater than web usage as a recent study pointed out.

There are a couple problems with this approach though:

One is that we are considering “apps” as a whole and we should split it in, at least, three categories: gaming/entertainment (like Angry Birds and Netflix), productivity, and informational/news.

For the first two categories I would definitively agree that the apps are killing everything else. My PSP is gathering dust like there is no tomorrow and I would use my basecamp app over any mobile web interface all day long. But for the news and information I don’t think they will ever replace the web.

The nature of the online world there is no app that will ever contain the amount of data (or be able to connect to an API to get it) that could live on a phone. Unless you consider the Google App a real app then nothing is going to beat a quick search on your browser to get some sports result, the definition of “bibulous” or what car brand has the most safe lineup.

There are apps dedicated to some of those things but that leads me to the second problem: discovery.

If you keep yourself within the limits of your apps you are missing a whole world out there. Even if you get news on you USA Today app you might not see what the Washington Post said. Even if you look at the cars.com listings you are missing a bunch of other postings in some other site.
And moreover, how would you find new apps? Just the market? Don’t think so.

Anyway I believe that we will have a long living ecosystem of apps and web for a long while so lets be all friends!


The pace of technology

The passing of Steve Jobs and, the following week, Dennis Ritchie made me think about what they did and we all do in technology.

Usually you hear people say, and even complain, that technology changes too quickly. That what you get one day the next is obsolete. And you can argue that at some point that is true but it is mostly a marketing gimmick.

If you start to think of what Mr. Ritchie created you can’t be short of amazed. He created the programming language C and was part of the development team of Unix.

Those two tools are not only the building blocks of a lot of technologies, like Mac OS and Objective C (the language for iOS apps), but they are tools that are being used Today. Those projects have moved forward from what was the original versions, probably beyond recognition of the first version, but still keep the same structure and idea.

You can say the same thing about the windowed GUI for personal computers. It started in the Apple Lisa about 30 years ago and we still use the same concept. The look and finish are completely different but I am typing this in a window not a door, or a cube or a quantum space.

Basically you can say the same thing about hardware and software, the fit and finish change on every breathe but the underlying technologies are pretty much the same. In fact I believe that there is less focus these days in figuring out the deep end of the technology and there is an overrated bias towards the “revolutionary” applications that come and go.

My Startup School 2011 recap

After applying a couple times to Startup School I was finally invited this year. Every year I hear the talks online and look at the lineup and just feel that I had to be there.

And, well, it didn’t disappoint It was a great summit, great speakers and a superb audience. This was my first time in the valley but I will write about that in another post.

The first talk was by Marc Andresson and was great start since it was so cool learning a bit about the beginnings of the modern web. And how he could barely believe what it was being unlocked by the browser, people would not only post existing stuff but create new content just for the web.

Another very inspiring talk was Ashton Kutcher’s. Even though most wouldn’t think much about him, he is very smart and was very nice during the day. He did a bit of story telling but the message was that you should help people not only for the money but to be good.

Zuckerberg was interviewed by Jessica Livingston and it was really funny how some times it felt like Facebook was a bit of an accident and he didn’t think it would become what it is Today.

Max Levchin’s talk was the most practical of them all and, also, one of the most candid ones. He was another great speaker.

A recurring topic was that you should think big, think long term and don’t try to “flip” a business. A startup is where you would be for at least 5 years and you should pick your idea carefully.

Here is a snippet of each speaker of what stuck with me most of what they said:

Marc Andressen (Netscape, Andressen Horowitz): It’s better to be a technical CEO who learnt the business stuff. CEOs are not born with shiny hair and a suit.

James Lindenbaum (Heroku): Building tools for developers is very hard but very good. And being bashed by Larry Ellison is a good sign.

Jim Goetz (Sequoia): Build companies that last. Think big but start small, unknown entrepreneurs are the future leaders.

Ashton Kutcher (Agrade): “If you want to be the next Mark Zuckerberg, you will always be second best, because Mark Zuckerberg will always be a better Mark Zuckerberg than you.” Don’t jump to the effect, start by the cause of the problem.

Matt Mullenweg (Auttomatic): Be your own user and force the whole company to do support so all of you feel the pain.

Mark Pincus (Zynga): Never waste a single engineering hour. Test, test, test. Go all in.

Paul Graham (Y combinator): Look for problems to solve not random startup ideas.

Mark Zuckerberg (Facebook): The biggest risk is not taking any, try moving fast even if you have issues. Also, you don’t need to be in Silicon Valley unless you know nothing about businesses and you need lots of help.

Stephen Cohen (Palantir): Trying to fix huge problems can actually work. The product advice you get from a VC is worth as much as you are paying for it.

Max Levchin (Paypal): You don’t need a cofounder but you do need someone to tell you that “everything is going to be fine” without being complacent. Ignore your mistakes.

Ron Conway (SV Angel): Design and user experience is the new IP. Entrepreneurs who own their user’s mind succeed.

Drew Houston (Dropbox): The fastest way to learn about startups is being in one, not b-school. Learn a bit about everything. And surround yourself with people that can help you.

Overall I found the talks very inspiring and most of the speakers very kind.

Thanks to Y combinator for inviting me and all the speakers for taking the time.