By Andrey Azimov

译 文 : I learned to code, build a Web app and launch it on Product Hunt in 2 months

Translator: Garrik

Reprint please surface source



When To Surf


I am Andrey

I am from Ukraine and work remotely for Railsware. Like many people who work in tech companies, I dreamed of having an app of my own that people would use every day. I dream that one day I can make this wish come true.


The existing problems in

Now, I work remotely from Bali. Bali happens to be one of the world’s most famous surfing destinations. This is where I started learning to surf. But when I started to prepare for surfing, I found it difficult to understand the massive data provided by existing surf prediction apps, such as Magic Seaweed, such as tide, swell, cycle, wind speed, direction, etc.

The app provides ten pages of instructions on how to interpret the data. It’s great to have lots of data, but if most people can’t understand it, the app isn’t really usable to users.

Wouldn’t it have been better if I could have parsed the raw data in code and then suggested its availability?

I wanted to do it, but I knew I couldn’t. Because I’ve never actually written code. And I have no idea where to start. I didn’t even have the money to hire a team to make the software for me. So I can only choose to temporarily give up.


Pieter Levels

A few months later, at Dojo, a crowdmaker space in Bali, I met Peter Levels, who set a goal of launching a Nomad List of 12 startups in 12 months. His actions inspired me to try my hand at building my own app, and he suggested I watch this video.

Here’s his theory:

  • Solve your own problems
  • Stay away from those startup lectures
  • Use search engines to learn how to code
  • Stay away from courses, books, and training institutions
  • Do what your skills allow you to do (e.g., don’t waste time learning new things that are too difficult for you)
  • Do it by yourself

I wanted to try writing code and build my own app based on his concepts. I didn’t set out to be a tech juggernaut; it was enough to implement my ideas in code.


Let’s start

On November 3, 2016, I bought the whentosurf.co domain name at Namecheap for $6. Just buying a domain name made me very excited.

Then I found a free host on Atspace.com and uploaded my first “Hello World” HTML page.

I started to think where could I get the data I needed? I googled the Weather APIs and found the World Weather API. It offers two months of free use, and I can find all the data I want.

I can say that I am completely useless at coding. So I started experimenting with code languages THAT I had seen before.

My first plan was pretty simple: get the data from the API and print it on my HTML page. This should be very easy. I also wanted to change a line of code to see if the data could be used quickly. This shouldn’t be too difficult without applying any frameworks, servers, and compilations. It’s not like big companies that change a few lines of code every day and do things carefully. I should develop quickly.


Forward, forward, forward

I started writing JavaScript for the first time. For many novices, compiling your code with only one browser is great. But Javascript is still a little difficult for me. Asynchronous callback functions are especially hard to understand.

var getJSON = function(url. callback) {
    var xhr = new XMLHttpRequest(a);
Copy the code

God, it’s so hard


Python

When I think of Python, its code is pretty readable, but I need to install the Django framework and set up a server for it. So all this is just to run the code! I took the plunge and skipped Python.


PHP

I tried PHP again and I know a lot of people don’t like PHP, you need Ruby, Node, React, etc. But I don’t care. Because it’s the lowest learning cost for me. PHP is preinstalled on my macOs and browser. No extra effort needed.

Within minutes, I called my first API and got the data.

Here is my initial code:

$url = "http://api.worldweatheronline.com/premium/v1/marine.ashx?key=2a5fc1776e234e14a7e172153160312&q=-8.659263, 115.13015 8&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;
Copy the code

I made my first Web application overnight:

A few days later, I found some design inspiration on the Internet and made a new interface:

I’m really proud




No git

In the meantime, a lot of people around me are advising me to use GitHub instead of FTP.

But I really don’t like using Git like this every time

git add
git commit -m "Bla Bla Commment"
git push origin master
Copy the code

Instead, I just create a folder and back up yesterday’s data. I don’t use Git though. But I still have my own basic version control system.




Set up my Web server

My free host is a little broken. After a few weeks, it started not working well and people started suggesting THAT I deploy my own VPS.

I’m panicking. I really want to fix the server. But my mainframe has started to stop working. So I spent $5 on DigitalOcean and followed their tutorial step by step. Oskar, a Swiss guy, I met him in the creative space and he helped me a lot when I had problems in VPS.




Moved to the HTTPS

This little obstacle didn’t stop me. I now need to get the user’s location from the browser. I implement it in JavaScript. But Chrome only allows access to sites that have HTTPS authentication. So to do that I started learning to deploy Lets Encrypt. This thing is very difficult, but I will follow the tutorial step by step again to implement it. Then my site moved to HTTPS:




We’re halfway there

After a month, my code started to get bloated. But with my crazy comments, I still know what every piece of code is doing.




Get feedback from users

Eric Ries from Lean Sartup advised me to find out how users were feeling early on.

Marc, another guy I met at the creative space, suggested that I run the app on an Ipad and put it on the wall with a suggestion box. This is reasonable advice, as 40% of the population here are surfers (it takes only a minute to get to Dojo from the beach). My suggestion box looks something like this:

After a day, I had only a few comments. It is obvious that this method will not work. Surfers aren’t thrilled to see the app. People are not very interested in this application.


Black swamp of despair

When my initial blood began to burn out. The excitement was gone. It’s starting to get a little painful. I had to do my main work during the day and stay up late at night to finish the app.

I showed my app to my surfing instructor and he quickly said it wouldn’t work because there are too many factors affecting the best time to surf.

I realized he might be right, because I haven’t been able to predict surf times yet. I don’t have enough data, and I don’t have enough ability to put it together and figure out the best time.

My app is currently only available in Bali, and I haven’t been able to make it reliable enough to work anywhere in the world. I want every surfer in the world to go to http://whentosurf.co and immediately get information about his surfing.

I wanted to give up, because why would I want to make an app that nobody wants to use? And how am I going to get all the data to make my app available around the world?

My eyes are infected, too. My eyes were very red and I couldn’t stare at the computer screen for a long time.

But I finished my eye drops and continued typing:)


The second round

I talked to my friends about all this and they told me to forget about it and just keep developing. Pieter told me it’s normal, and many people give up here, just for fear of not going on.

The following week I started to hardcore, using a responsibility system based on money to push us to complete tasks and finish my surfing app.

Even if no one uses my app, I’m going to finish it, and I’m going to get it online.

From eight in the evening to six in the morning, we listened to songs and drank tea.


The formula for the best time

If I wanted to know how to get the best surf time, I wouldn’t code it yet. I’ll just have to try something else. I made a table and experimented with various formulas:

After experimenting, I converted them into code




Finally, that’s it.

Now my app can start scoring anywhere in the world. Even though the place doesn’t have a beach. That’s okay. This is just my first version. At least it’s almost presentable now:







Ready to launch

The first basic version is officially available. This blog should probably end here, because I just launched the app. I’ll keep you posted.

Here’s my plan:

  • I submitted the app to Product Hunt (I don’t want to rely on others, instead I want to rely on the app itself to be successful).

UPD: JUST LAUNCHED: When to Surf – Product Hunt

  • Connect with groups of surfers online and on social media, share the app with them, get feedback, and continue to improve the app.

  • Get the user’s email address in the bottom bar of the application, and I can continuously send them the latest surfing information based on their location. (ALTHOUGH I don’t have the code yet) to keep them in the app.

  • If all this is starting to work, it could give newcomers a better use experience against big apps like Magic Seaweed.

Time & money spent

Time:

I use Toggl to track my time, which is about 118 hours.

Money:

  • Domain name = $6/ year
  • Server = $5/ year
  • Total: $11

If I asked a software company to develop this app, I’m sure they would spend more than $29,989:)


Tool use

I have used:

  • Sublime Text Editor – Write code
  • Namecheap – domain name
  • Digital Ocean – VPS
  • LetsEncrypt – SSL
  • Google Analytics – Detect traffic
  • Toggl – Records the time spent
  • Plenty of post-it notes for daily planning


My code is open source

My code is open source on GitHub. Pure core, no MVC, all in one file.


What did I learn?

  • Solve your own problems. It’s better that way, because these are issues you really care about. Making it my obsession to find the perfect time to surf made the problem easier (but still hard). You are your first user!

  • Find mentors who are committed to your goals. A crowd maker space is a great place to find people who have already made success stories.

  • We learn by doing. Don’t spend time reading textbooks. Learn how to use search engines to match what you know. If you really need a mentor, the really good ones are the free ones, because they’re already successful and don’t need your money anymore! Don’t go to so-called mentors. They just want to suck your money out of you.

  • Don’t be afraid of new technology. I was afraid of writing code at first, then APIs, setting up the server, then HTTPS. But when I actually use them, they’re just paper tigers.

  • Forward, forward, forward! Don’t give up. Keep trying until you finish your application.


Keep in touch

This is me and the daily plan I write on my arm:)

If you like my story, you can get in touch with me on Twitter. Tell me what you think of my code and app, and how you can make my app better.

thank you

Andrey.


Disclaimer: This article is authorized by the original author. Please contact the translator for reprinting the Chinese version. Please contact the author for reprinting the original text.