Two months ago, I started the path to creating my first web application. This is a very simple web application, called When To Surf, and every day tells surfers the best time to surf. Today I run it.
UPD: after launch, I wrote
an article about the results
My name is Andrey
I'm from Ukraine, working remotely in
Railsware . Like many people in IT companies, I dreamed of creating my own product. Its own application that people would use daily. I really wanted to make this dream come true.
')
Problem
I'm currently working remotely from Bali. And it just so happened that Bali is one of the best places to surf. Having moved here, I began to take lessons, but when I started surfing, I faced difficulty: it was very difficult to understand the applications for surfers like
Magic Seaweed , which give out weather information and forecasts. There is a whole bunch of different data - current, swells, wind speed and direction, and the like.
It's great, of course, when there is a lot of information, but what is the point of it if people can't understand anything? On the Internet there were whole manuals on 10 pages on how to decipher all this data.
From my point of view, this is just a UX designer nightmare.
And what if I could collect the raw data about the weather, and then with the help of a special code, analyze and evaluate it from the point of view of "surbility" (I wonder if there is such a word at all?)
I wanted to do it, but I could not. Because never seriously engaged in programming. I had no idea where to start. However, I did not have the means to hire a large team that would create an application for me. Therefore, I abandoned this thought. For some time.
Peter Levels
A few months later in
Dojo (collective office in Bali), I met
Peter Levels . Once he
set a goal to launch 12 startups in 12 months - and within the framework of this project, the
Nomad List was created. He inspired me to make my own application. I highly recommend watching
his video . Here are its principles:
- Solve problems that concern you personally
- Stop going to meetings of startups, avoid start-up coaches
- Learn to write code in two ways: practice and google search
- Forget about courses, trainings and books.
- Do the simplest things that can be mastered with your current level of knowledge (i.e. do not waste time on super-cool new tools, such as React, which you will have to master the year)
- Do it yourself
Guided by these principles, I wanted to try to learn how to write code and create applications. Of course, I did not expect to become a first-rate coder, but I hoped that I would be able to implement my idea of ​​a surfing app.
Start
On December 3, 2016, I purchased the
whentosurf.co domain for $ 6 on Namecheap. This alone has stirred me up.
I found
atspace.com free hosting and uploaded the first Hello World HTML page in my life.
Then I wondered where to get the data for the application. I googled the weather APIs and found the
World Weather API . They provide information for free for the first two months, and they have all the data I needed: wind direction, swell periods and tide time.
I had no experience writing code. Therefore, I began to sort out the languages ​​that I had met before.
My first goal was simple: take data from an API and display it in HTML. It is desirable that the whole process is as simple as possible and requires a minimum of preparation. I wanted to be able to change one line of code and immediately test whether everything works. Everything had to be elementary, without installing servers, frameworks, compiling, deployment - without this all. I needed to work quickly, and not thoughtfully write one line of code per day, like some big teams that do everything “as it should.”
Implementation
I first tried javascript. For a newcomer like me, a big plus is that only a browser is needed. But pure javascript was hard for me. Especially confusing asynchronous callback functions.
To hell. Too difficult!
PythonI was thinking about Python. The syntax is very readable, but I would have to install the Django framework, create a special web server for it, and so on.
And all this just to run the script! So Python is dropped.
PhpI tried PHP and immediately understood: here it is. I knew they were saying about him: “PHP is not cool, you need Ruby, Node, React, Bla.JS”. But I didn't care. Because this language was the fastest option for those who start from scratch. Seriously, PHP was already running on my computer (macOS) and installed on a web server. No extra effort!
It took only a few minutes to work to make the first API call in the life and extract the 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=; $json = file_get_contents($url); $data = json_decode($json); $swell_period = $data->data->weather[0]->hourly[0]->swellPeriod_secs;
For one night, I created my first web application (in fact, the site):
After several days of work, I was inspired by examples from the Internet and made this layout:

I was very proud of myself.
Only not git
Somewhere around the same time, everyone started advising me to use GitHub and stop downloading via 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 created a folder, and for backups I make a new one each time, registering yesterday’s date in the title. So I avoid git. But I still had my own straightforward version control system.
Create your own web server
My free hosting is no good. After a few weeks, it stopped working normally, and they offered me to start my own VPS.
I was scared: I didn’t want to do server configuration at all. But I didn’t have much choice, because free hosting did not work. Therefore, I paid
DigitalOcean $ 5, proceeded with the instructions prescribed in their step-by-step handbooks, and set everything up.
Oscar , a guy from Sweden, whom I met at the collective office in Bali, helped me with a VPS server when I came to a dead end.

Switch to HTTPS
The obstacles did not end. I needed to get the user's location data via GPS from browsers. For this, I entered the JavaScript code. But Chrome lately only allows you to locate sites with an HTPPS certificate. So first I needed to figure out how to configure
Lets Encrypt . It was insanely difficult, but again, I just followed the instructions - and everything worked out. Now my site has been transferred to https.
On the halfway
After a month of work, my code has grown to enormous size. But I somehow managed to understand what he was responsible for, thanks to his crazy built-in comments:

Collecting reviews
Eric Raise of
Lean Startup advised me to get user feedback as soon as possible.
Another friend of mine in the collective office,
Mark , suggested such a way to interview people: attach a tablet on which my application is running, and a box for reviews on the wall. It made sense, because here 40% of people are surfers (Dojo is two steps away from the beach). My box looked like this:

During the day I collected just a few comments. The idea is not shot. I asked for feedback from users, and they responded without much enthusiasm. They had no interest in my application.
Dark swamp of despair

At this time, the excitement of knowing that I was doing my first application began to disappear. It was no longer so exciting, rather painful. Now I worked for days at the day on my main job, and at night I stayed up late to bring the application to mind.
I showed the app to my surfing instructor, and he immediately said that the idea was a failure, because “in order to decide what time is best to ride the waves, you need to take into account too many factors”.
I understood that he was probably right - after all, I really could not yet predict time. I did not have enough data and code writing skills to summarize all the information, evaluate it and choose the time to surf.
In addition, my application worked ONLY in Bali. I was not able to provide reliable information for surfers from other locations. And I wanted surfers from anywhere in the world to open
http://whentosurf.co and immediately get all the necessary information for the current day.
I wanted to give up - what's the point of doing something that no one will use? And how can I get so much data so that the application can be useful to people around the world?
To top it off, I caught an eye infection. I sat with red eyes and could not even look at the laptop.
But I dripped drops in my eyes and continued to code.
Second round
I talked with friends and they advised to continue working. Peter said that this is normal and “at this stage, many drop everything, give in to fear and do not bring the product to release”.
The next few weeks I worked in hard mode. We introduced a system of monetary penalties to force ourselves to complete the tasks, in my case - an application for surfing.
Let no one need my application, I still wanted to finish it. I wanted to bring the project to launch.
Our “night shifts” started from 8 pm and lasted until 6 am. We listened to techno and drank tea.
The formula for calculating the best time to surf
I wanted to learn how to calculate the best time to surf, but I could not do it with code. So I had to start somehow differently. I made a table and started experimenting with formulas:

Then, through trial and error, I translated these formulas into code:

And it worked! Almost
After this attempt, the application began to issue ratings for any location in the world. Including places where there are no beaches for surfing at all - for example, I don’t know, Kazakhstan. But it does not matter, because it was the first version. At least, now everything has somehow worked:
Launch plan
First, the basic version of the application is ready. This post is almost complete, since today I run the application. Later I will update the post to tell you how it went.
My plan:
- Independently send an application to Product Hunt (I don’t want to be owed by the influencers success, I want my product to break through due to its own merits) - UPD: ONLY WHEN THE APPENDIXED ON Product Hunt .
- Find the surfing community on Facebook and the Web, share the app with the participants, ask what they think about it and continue to refine it.
- Collect email addresses using the MailChimp field at the bottom of the screen to send updates to users regarding surfing in their region (later, I haven’t written the code yet) and thereby pushing them to return to the site.
- If this works, compete with large players like Magic Seaweed , offering users a simpler and more convenient way to interact with the application for novice surfers.
Temporary and cash expenses
TimeI calculated all the time I spent using the
Toggl application. Approximately 118 hours
MoneyDomain Name = $ 6 / year
VPS = $ 5 / month
Total: $ 11
If I asked any company to implement my application for surfers, I’m sure it would cost me $ 29,989 more :)
Tools usedI used:
My code is open source
All my code is available on
github . He is super hardcore. No MVC, all in one file
What have I learned?
- Work on your own problems. This is best, because to them something you will surely care. Calculating the best time to surf was my obsession, and it made the whole process easier (although it was still difficult). Your first user is yourself.
- Good mentors who have already reached the level to which you aspire are very helpful. In this regard, collective Dojo -type offices are useful - there you will meet people working on interesting and successful projects.
- Learn by doing. No need to buy / read books. No need to sign up for courses. No need to pay teachers. Just google and use what you have already mastered. And if you need mentors, keep in mind: the best of them are consulted for free, because they are already successful and do not need your money! Also avoid startup coaches - these are leeches that only want to suck the last of you out.
- Do not be afraid to use new technologies. I was afraid to contact the code, then the API, then the server setup, then HTTPS. But I did it. And when I tried, everything was not so scary.
Act! Do not give up. Always try to finish your project.