I learned to code, build a web app and launch it on Product Hunt in 2 months

Two months ago I started my journey to build my first web app. It’s a very basic web app called When To Surf for surfers to see when is the best time for them to surf every day. I’m launching it today.

I am Andrey

I’m from Ukraine, I work remotely at Railsware . Like many people in tech companies, I’ve dreamed of making my own product. My own app that people use on a daily basis. I would love to have that one day.

Problem

Right now, I’m working remotely from Bali. One of the best places to surf is coincidentally, Bali. I took classes to learn to surf here. But when I started to surf I had difficulties to understand information in weather and surf forecast apps like Magic Seaweed. There’s tons of data like tide, swell, period, wind speed, direction etc.

Having lots of data is great, but what if most people can’t read it? There was entire 10-page manuals on the internet on how to interpret all this data.

This seemed like a usability nightmare to me.

What if I could get the raw weather data myself and then with code analyze and score it for surfability (is that even a word?).

I wanted to do this, but I couldn’t. Because I had never coded seriously. And I had no idea where to start. I also didn’t have the money to hire some big team to build an app for me. So I gave up. For now.

Pieter Levels

A few months later, at Dojo, a co-working space in Bali, I met Pieter Levels, he set a goal to launch 12 startups in 12 months and built Nomad List from that. He inspired me to try to build own app. I really recommend to watch this video by him. Here’s his principles:

With those principles I wanted to try to learn to code and build it. I wouldn’t be a great coder, but good enough to ship my surf app idea.

Start

At December 3, 2016, I bought the domain whentosurf.co for $6 on Namecheap. Just buying the domain name, got me very excited.😎

I found free hosting atspace.com and uploaded my first ever HTML page “Hello world”:

I start to think where I can get data for my app? I Googled for weather APIs and found the World Weather API. It’s free for 2 month and they have all the data that I needed like wind direction, swell period and tide times.

I had zero experience coding. So I start trying the languages that I had seen before.

My first goal was simple: get data from API and print it in HTML. It should be as easy and with as little setup as possible. I wanted to be able to change one line of code and be able to test if it works quickly. It should be super simple as possible without installing servers, frameworks, compiling, deploying and all this stuff. I should develop fast. Not like 1 line of code per day to figure it out like some big teams who do things “properly” do.

Ship! Ship! Ship!

I first tried JavaScript. For a newbie like me, it’s cool that you only need a browser. But pure Javascript was very complicated to me. Especially the asynchronous call back functions were confusing.

// Javascript

var getJSON = function(url, callback) {
    var xhr = new XMLHttpRequest();

Scrap this. Too difficult! 😀

Python

I thought about Python. It has a super readable syntax but I’d need to install the Django framework and set up a special web server for it and all these things. Just to make a script run! So I skipped Python.

PHP

I tried PHP and it just works. I knew everyone says “PHP isn’t cool, you need Ruby, Node, React, Bla.JS”. But I didn’t really care. Because it was the fastest language to get me started from nothing. I mean PHP already run on my computer (macOS) and was pre-installed on my web server. No effort!

In just a few minutes of coding, I had made my first API call and got my data. Ladies and gentlemen, I present you: my first code!

$url=’[http://api.worldweatheronline.com/premium/v1/marine.ashx?key=2a5fc1776e234e14a7e172153160312&q=-8.659263,115.130158&format=json&tide=yes&tp=1&date=](http://api.worldweatheronline.com/premium/v1/marine.ashx?key=2a5fc1776e234e14a7e172153160312&q=-8.659263,115.130158&format=json&tide=yes&tp=1&date=);

$json = file_get_contents($url);

$data = json_decode($json);

$swell_period = $data->data->weather[0]->hourly[0]->swellPeriod_secs;

In 1 night I made my first web app (or site, really):

After a few days of working on it, I got some design inspiration from the internet, and made this layout:

I was very proud:

No git

Meanwhile, everyone around me started telling me to use GitHub, and stop uploading by FTP.

I don’t like to do this every time with git:

git add, git commit -m “Bla Bla Commment ”, git push origin master

Instead, I just made a folder and each time for backups I created a new one with yesterday’s date. So I avoid git. But I still had my own basic versioning system.

Setting up my own web server

My free hosting sucked pretty bad. And after a few weeks it stopped working well and people suggested I’d get my own VPS.

I was scared because I do now want to configure all this server stuff. But I didn’t really have a choice because my free hosting had stopped working. So I paid DigitalOcean $5, followed their instruction guides step-by-step and set it up. Oskar, a Swedish guy I met at the co-working space in Bali, helped me when I got stuck with my VPS server.

Moving to HTTPS 🔒

The obstacles didn’t stop. I had to get the user’s GPS location from their browser. I entered the JavaScript code to do it. But Chrome recently only allows location in HTTPS certificated sites. So to do this I had to learn to set up Lets Encrypt. This was crazy difficult, but again I just followed the instructions and it worked out. Then my site was HTTPS:

Half way there

After a month, my code had become massive. But I still understood what did what by my crazy inline comments:

Getting user feedback

Eric Ries from Lean Sartup recommends to ask for feedback as early on as possible.

Another person I met in the co-working space was Marc, he suggested to ask people by attaching an iPad with my app running on it with a feedback box to the wall. This made sense because 40% of people here are surfers (Dojo is 1 minute walking from the beach). My box looked like this:

After a day I only had a few comments. It didn’t work. I asked them for feedback and people seemed not very excited. People weren’t really interested in my app.

Dark swamp of despair

That’s when the early excitement of building my first app started wearing off. It wasn’t exciting anymore. It was mostly painful. I had now spend weeks working in the day on my main job and staying up at night to finish this app.

I showed my surf instructor my app, and he quickly said that the idea sucked because “surfing has too many variables to predict the best time to surf”.

I realized he might be right because I hadn’t been able to predict the time yet. My data was not extensive enough and I wasn’t good enough at coding to combine and then “rate” data and pick a surf time.

To add to that, my surf app ONLY worked in Bali. I hadn’t been able to make it reliable in other surf spots in the world. I wanted every surfer in the world to open my app and get their information for their surfing day immediately.

I wanted to give up because why make something that nobody is going to use? And how could I ever get all this data and make it work for everywhere in the world?

I also got some eye infections. My eyes was very red and it was hard watching in a laptop.

But I just put some eye drops and continue coding :)

Second round

I spoke to my friends here, and they told me to just keep developing it. Pieter told me that this was normal and “most people quit here and don’t launch because of the fear”.

The next weeks I went hardcore, we used an accountability system based on money to make us finish our tasks, and in my case, my surf app.

Even if nobody would use my surf app, I wanted to finish it. I wanted to launch.

Our nights of working where from 8pm to 6am. We listened techno and drank tea.

Formula of best surfing time

If I wanted to know how to get the best surf time, but I couldn’t code it. I had to start somewhere else. I built a spreadsheet and started experimenting with formulas:

These formulas I then after trial and error converted into code:

It worked, kinda!

I tried and it started giving ratings for every place in the world. Also places without beaches like, I don’t know, Kazakhstan. But that was okay, it was the first version. At least it kinda worked now:

Plan for launch

The first basic app is done. This is where this post almost ends, because today I’m launching it. I’ll update to tell you about how the launch went.

My plan is to:

UPD: JUST LAUNCHED on Product Hunt

Time & money spent

Time:

I measured all my time that I spent by using the Toggl app. So it’s around 118 hours

Money:

If I would have asked a company to develop my surf app, I’m sure it would have costed me $29,989 more :)

Tools used to built

I used:

My code is open source

All my code available on GitHub. It’s super hardcore. No MVC, it’s all in one file.

What did I learn?

Updates and press

Recently I quit my job and I have one year to get to profitability. Want to see if I reach my goal?

And if you’re feeling really generous, you can buy me a pack of ramen by sending $2 to my PayPal address

or become my Patron

Stay in touch

This is me and my to-do list on my arm :)