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

Confession

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

at.

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:


Weekend project: Tweetiles

For the past couple months I’ve been looking to deploy a pet project. I started a bunch of things, learned a lot but finally this weekend I found something that I wanted to do and is really limited in scope.

I am not a huge twitter user but I use it frequently enough that I found me tweeting and retweeting a lot of links. Not only to share them with the world but also for me to look at them later so I said it would be cool to have a nice visualization of all the links posted on my stream.

And that is what Tweetiles is. A nice visualization (pinteresty) for all the links posted under a user’s stream. It is built mainly in javascript and I use node.js and phantom.js for the screenshots.

To use it just visit http://tweetiles.pxops.com.

You can look at the code here: http://github.com/dlapiduz/tweetiles

If you have any suggestions or comments please leave them here at, well, the comment section…

Tweetiles screenshot


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!

 


New widget: Syfy Faceoff custom ad

At Intergi we built a custom ad unit that is really nice. You can grab a bookmark let from a landing page and when you click on it on any website you can play change any picture of that page.

It allows you to add hats, change hair, add glasses and a bunch of other things.

After you are done you can submit it as a contest entry with just a click.

It was built using javascript, flash and ruby on rails.

You can check it out at syfy.gamezone.com

Syfy Screenshot


Pages:12