DEV Community

Adam Rogers
Adam Rogers

Posted on • Edited on

Re: Learning to code

My dear brother emailed me asking how he could use all this free time he's got in "lockdown" to build an app he'd had an idea for. I'm sure he won't be the only person thinking along similar lines about now. Here's the response I wrote back:

Yo.

Programming, eh?

I am all for encouraging anyone to pick up programming, but I feel like we might need to adjust your expectations a little bit. What you're hoping to make is a pretty complex beast (there are more than a few moving parts) and I'm concerned that you'll be disheartened if you try to bite all that off at once. That Personal Record Club app I built took me like a month and I've been doing this shit for 10 years. I should be a lot better at it after 10 years and I'm not, and I'm certainly not suggesting it'll take 10 years before you could attempt to build your idea, but my point still stands - I didn't just knock it out overnight (despite appearances).

I think the first thing you (or anyone else) should learn to build is a blog. You already understand the domain of blogging (on the homepage there is a list of post titles in reverse chronological order, you click on a title and it takes you to the full article) and you can make it progressively more complex as you do (add a user to author the posts, add many users, show the word count for each post, convert that word count into an estimated reading time, add the ability to upload pictures, add the ability to search an API for recommended pictures, etc. etc. etc.) so you can focus on learning the programming stuff incrementally without having to think about all the edge-cases in the domain as well.

Of course nobody ever wants to build a blog, they want to build the whizzy app they thought up, so no one ever takes this advice. But it's good advice, David. Start with a blog.

Demoralised? Great. Get used to it. Programming sucks. 

What stack you build you blog in is up to you. I will be able to help you if you choose Rails, but Rails isn't the new hotness it once was. All the cool kids are learning JavaScript. Obviously all the cool kids are wrong, so choose Rails. Or JavaScript, it's really up to you.

There are loads of resources to learn how to program. Agile Web Development with Rails is the book I used way back when (you build a shopping cart app - they should've taken my advice) but there are loads of online schools for this and that as well.

Codecademy has been around forever and their webdev course looks like it goes down the JS-heavy route in a pretty sane way. I've seen a lot of people talk about The Odin Project for learning Rails these days. I'm sure you can find similar resources for Python (which is basically Ruby without a few keywords but has some awesome data science libraries so all the machine learning and AI kids love it), or any one of a number of other languages.

All I would say is pick a language and stick with it. Try and pick something that is a bit framework-agnostic. At the end of the day, Rails is just a bunch of Ruby, so I think that counts, and while you could say the same for any of the JavaScript frameworks, I think you'll get more mileage out of learning JavaScript at least a bit before diving into something like React, Vue or Angular (do people still use Angular?) which all require a bunch of tooling to get going with and you'll spend half your time learning configuration and not-programming stuff. Which you'll no doubt have to do at some point but maybe not right off the bat, eh?

Hope that helps. I think my main point is that I can help you with Rails but everyone will tell you to do JavaScript. They are probably right, but they should also get off my lawn.

Spoke to mom the other day. Hope the rash is better.

Cheers,

Adam

Top comments (1)

Collapse
 
cameronp profile image
Cameron Price

All good advice, I might add python to the list of possible first languages, and I might even suggest starting with something simpler than a blog, or a website at all. Reason being that to build a website that has dynamic content you need some language, say ruby, python, or js. And you'll need to also learn another language: HTML, and then you'll probably want at least a smattering of CSS, and then as soon as you think you've got it nailed, you need to learn how relational databases work. When I learned to program, in 1982, it was a lot harder to learn in some ways, because there was no internet to find answers, and normal bookstores didn't generally carry books on the subject. But it was much easier in one specific way, which was that you tended to set your expectations way lower. My first program that did anything you might consider vaguely useful, did nothing but print out the prime numbers.

UPDATE: as if to prove my point, the first time I tried to post this comment, the website threw an exception, the second time, it sent me through the crazy signup process, and brought me back here with the comment deleted. Fortunately, I knew that shit would happen, so I'd already copied it to the clipboard.