Old Man Learning to Code

If you’ve been following Good and Geeky for a while you’ll know that I am keen to use Shortcuts, Keyboard Maestro and other tools to automate whatever can be automated. It’s all part of the plan to be as good and geeky as possible. With shortcuts you have a simple linear coding process. You can throw in information at the beginning of a shortcut and use that information later in that shortcut. So if you are new to any sort of programming this is the basics of having a variable. It was inevitable that I’d feel the need to take it a step further and learn some actual coding. I have tried in the past to learn aspects of coding with Python and I think I might have looked at JavaScript before. I’ve checked out AppleScript and even thought that Swift looked interesting. Before Swift came along I did look at how you could do coding for iPhone apps but I really couldn’t find my way through learning the code being used then. It was Objective C and quite difficult. So I decided this winter to really dive in and push on learning JavaScript. I’ve also had some fun with Swift Playgrounds.

Good book to learn Javascript.

Where to Start Learning Code

YouTube is the obvious answer and especially so for me because I learn in a visual way. I like to see examples, diagrams and lots of things with pretty colours. I want to be educated with visual representations to show what the words mean. More than half the time when you’re listening to a code expert, a programmer talking about code. it sounds like they could be speaking Russian or Japanese or a mixture of the two. It doesn’t take long for my eyes to glaze over. They always seem to assume a level of understanding of the programming terms without ever explaining the basics. It’s because of what I’ve encountered before when trying to learn programming I’ve always got to a plateau point which could also be described as a big brick wall. I need to get past that some how.

So on YouTube you have to pick and choose your teachers carefully. If you find someone on there who is explaining things well with diagrams and good metaphors then you should make a note and see what other content they have. I found a few that I like and sometimes it’s good to have more than one explanation of the same concept. What one of them might miss or not explain quite so well, another will describe perfectly.

Mosh the Iranian Guy

I found Mosh on YouTube with his excellent course on SQL. The content of the course was explained efficiently, clearly and concisely. He didn’t jump from absolute beginner mode to almost an expert, so I didn’t get put off. I started with learning about SQL and moved on to JavaScript. It soon became clear it would be a good idea to get the full courses and they seemed to be fairly reasonably priced. In the end I went for the season pass for the year which gives me access to all of his courses. This is because the has courses on a wide range of coding topics. I also have interest in how to use Git and GitHub so I dived in with both feet and spend some money.

So far I’m happy with the courses and I made it all the way through the first JavaScript course. I did get a little bit bogged down with the next course which covered object oriented programming. I really need to go back over some of the elements of the first JavaScript course. There are exercises to get you more involved in the subject. Mostly I follow these through step-by-step and use them as an extra learning experience. I have to go back over them again and work it out for myself. I’ve struggled a bit with the thinking process needed to be a coder or programmer. By making myself solve the problems presented helps me get past this blockage.

While these courses are good, you do need extra information coming in. I thought there were not quite enough exercises and small tests of the subject matter. For this I went to other places where they had bite -sized tests and one of these I used was called Codecademy and W3 schools. I liked the way they have the ‘try this yourself’ sections in their lessons. You get to a page where the code is already on the page and you can play with it, adjust it and see what happens. They also have an iOS application which does bite-size lessons with exercises to test your learning.

I still like the content from Mosh because his explanations are so good. I need to work on my own learning abilities. I try to be as interactive as possible. So as I’m getting the information I’m typing the code in VS Code. Naturally I made a few mistakes as I do this and I have to solve the problem. Matching up what I’ve put into the code editor with the lesson information helps me to learn. Sometimes I think it’s a good idea to watch the lesson without doing anything with it. Then watching it again and being interactive.

Programming with Pax

Pax is a young chap and I like the way he explains the code. He doesn’t have as much content as Mosh, but it takes time to build up this sort of stuff. He also has information on CodePen.IO which is another place you can go to try things out if you haven’t got yourself sorted out with a code editor you like. Pax, Just like Mosh recommends the use of the VS Code editor. I’ve tried this and I like it and there are all sorts of extensions you can use to make it work just the way you want it to. I’d recommend following this YouTube guy as one of the starting points if you want to learn how to code.

Swift Playgrounds

This application from Apple has been around for a while. Just recently had an update which allows you to create applications to the point of being able to submit them to the Apple App Store. It’s also been updated to use the latest Swift code and it has excellent teaching materials. When you first look at this you might think it is more for children to learn coding. There are the Learn to Code Playgrounds which have some very simple coding problems to solve. You get a bouncing cartoon figure in a small environment and you have to make it move around and complete certain tasks. These coding problems start simple and gradually get more complex. Because there is such a high level of interactivity and an extremely visual learning experience I have found them to be excellent to learn the basics of thinking like a programmer. I really got the concepts of for and while loops by solving the game like programming challenges. It was fun too and it always helps to have some fun while learning new things.

My grandson came to visit and is seven years old and I showed him the Swift Playgrounds and he took to it like a fish to water. He easily got the idea of functions to get a set of steps into one command that could be called later more than once. No problem for him with for loops either. Hopefully he will be able to get back into it back at home. I’d consider buying him an iPad so he could do more. Although, with kids it is too easy for them to get distracted and use it just for playing games. That would be a waste.