Re: Learning to code
Tags: learning, isolation, rails, javascript
Published: 2020-04-01 19:31:22

_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](https://personalrecord.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](https://pragprog.com/book/rails6/agile-web-development-with-rails-6) 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](https://www.codecademy.com/learn/paths/web-development) 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](https://www.theodinproject.com/courses/ruby-on-rails) 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