A Quick Roadmap To Learning To Program

There are a million and one ways to learn to code nowadays. Everything from a formal college education, to books, to free online classes to even paid for online classes. And they're not all the same and can result in a 100% different experience which will vary person by person. So choose wisely. Take a small wooden sword if need be.

In this quick guide I'll give a few tips on how to go about learning to code, how to stick with it and how not to get bored doing it, which is an obstacle that has stopped many from continuing in this pursuit.

Tip #1: Choose the method that best resonates with you. There are more professional programmers with college degrees than without, needless to say. In any interview, your level of education will undoubtedly play an important role and may determine whether you get hired or not. Having said that, there are many programmers that do not have any formal education, but who's work speaks for itself and thus they can bypass the whole formal education scenario. So if a college education is more up your alley and you have the time and funds, then tread lightly.

Step 1: Pick a programming language

So you have zero knowledge of anything programming, and the closest thing you've seen is CSS and HTML in an Instagram post. This is where you have to make a choice. You can't learn every programming language, at least not well, so you'll have to start with one. You're going to be spending some time with this language, which is why it is important that you choose a language that resonates with you.

A Quick Roadmap To Learning To Program

I advocate you pick a language that your current hardware can manage. For example, if you have an old outdated Windows Machine, you wouldn't want to choose a language that targets IOS. For that reason, many times I recommend using JavaScript as your first language, as all it requires to run is any text editor and a browser. If you take the formal education route, this is probably going to be a choice left to somebody else. C++ was the standard a decade ago in most colleges and universities. It then transitioned to Java some years later. So this is something that does change with the times and that again, is out of your hands for the most part.

. . .
Read more
Building Tetris In JavaScript Part 2

Welcome to part 2 in this building Tetris tutorial. If you missed part 1, feel free to check it out here. In this second part, we'll be finishing up the project by adding collision detection to each Tetris shape, generating new blocks, rotations and detecting when rows have been filled and collapsed.

Part 2 we will get to the heart of the matter and implement the majority of the game elements. There's much code and much to discuss up ahead. So to start off, head over to part 1 and get that code set up.

Recap of Part 1

In part we were able to render a 10 x 15 game board in JavaScript which ended up looking like the following.

. . .
Read more
Building Tetris In JavaScript Part 1

Tetris is one of the first games that many of us played as youth. It's fun and challenging and a level can take you from anywhere to a minute to forever if you so play your cards right. So in honor of the game, in this blog post we'll go over how to build a Tetris clone in JavaScript without using any 3rd party libraries. Just plain old vanilla JavaScript and CSS.

To keep the example as simple as possible, this will be a single level of Tetris that will reset after a game over state has been achieved. Let's get started.

Building Tetris In JavaScript Part 1

Step 0. Define a few variables

You can never have too many variables. A motto to code by. This isn't 1950, so memory is more than plentiful. Sometimes a single variable declaration can change the shape of your entire codebase. Here are all the variables that were defined in the making of this game.

var shapes = new Array();
var currentShape;
var height = 15;
var width = 10;
var state = 1;      // 1 running - 0 paused - 2 game over
var colors = ['black', 'orange', 'red', 'blue'];
var move = 0;
var occupiedblocks = new Array();
var direction = "";
var points = 0;

Step 1. Make the game board

First off, let's make a game board for our game. Based on old specs and images, the number of horizontal running boxes is 10 and I'll be making the height negligible on this one. The board itself will be comprised of div elements created dynamically in JavaScript.

. . .
Read more
Why You Might Be Debugging Your Code Too Much

There's this twitch that many programmers have. It can't just be me, I'm sure. In which they'll write a few lines of code, and then Ctrl + S and run their code to see the immediate result. It feels great. You get instant feedback to your current line of thought. Or, more commonly, you'll get an error and get distracted immediately and spend the next 30 minutes Googling a particular JavaScript error that one has ever seen before.

The effect of this, while dopamine inducing, is that it will completely take you out of focus and direct your thoughts elsewhere. Which is a problem when trying to get into the zone. You can think of it like reading a book and having to stop every page to take notes on it. Sure you'll have these great notes to look at later, but you'll have missed the entire purpose of reading.

Code first

More than likely, once you figure out what your next step is in your project, you'll have an immediate idea as to how to accomplish it. You won't know how you know it, but you'll just know it. For example, I was working on a Tetris clone recently, and when it came down to moving the shape downward to the ever loving floor, I had an idea on how to do so. I would keep track of the top-left coordinates and use it as an offset to calculate the next position. Easy enough.

I typed the first for loop , with a few console.log's, just in case I had forgotten what a for loop was. A few variables were wrongly spelled, so I went back and corrected and ran it again. More variables misspelled. Two things happened at this point.

. . .
Read more
The Next Generation Of Programmers

Online coding classes are all the rage this year. In lieu of attending a university for 4 years to earn a degree in order to become a software developer, you can now do the same in 35 hours of an online course. And rightfully so, as it seems more and more likely that the machines will take over sometime in the near future. Eventually right? Given enough time and advancement, it's bound to happen. So it's a good bet that a good portion of the next generation of programmer's will come from the coding marketplaces that are sprouting up online. The question that arises of course is, is the lack of overall technical knowledge detrimental to the next few decades of technical advancement.

A trivial thought some might say. But not so fast naysayers. It might not be noticeable now, as folks who have never taken a class in software development are in hour 29 or their 30 hour Python course, but if these indeed are the next group of individuals that will be maintaining and progressing our technology infrastructure in the near future, then we should be keeping a closer eye on the results.

Everyone can code! sounds like an amazing presidential campaign slogan to run under, but it's a very surface level look at something that not everyone can do well. If everyone can code, then why not have everyone cook, heal and teach as well. These are all worthy endeavors still needed in society that are no better or worse than writing software.

. . .
Read more
Learning Every Programming Language

In my early programming years, I had this strange pull towards every new programming language that was hitting the scene. I would begin to get familiar with my work language, only to steer completely away to something that was hitting the latest tech blogs. It was exciting at first. A brand new IDE was my reward along with this sense of being one with the technology community. Except that it didn't work out quite as I had hoped in those early beginnings. I didn't retain any of those languages in memory. Only one. The one that I use for work in my day to day.

Just like how most people have 1 primary spoken language, programmer's also have 1 primary programming language. It is their go to language when they create a new project. Sure, you can dabble in others for those "just in case" scenarios when you might be working on someone else's project. But you shouldn't make that your primary goal. Act as if there is 1 language and own it.

Younger programmers tend to want to jump on board and begin learning any new languages right away. Older programmers, know better. The following question permeates the air every now and then. Is PHP better than C# or JavaScript?. An odd question at my age. Probably a question that I would have asked in the past myself. Neither is right or wrong, it's just a matter of where your attention goes, your energy flows.

where your attention goes, your energy flows

. . .
Read more
The Programmer

The programmer

No language is better than any other. Those are strange thoughts that certain people with affinities for their own programming languages tend to perpetuate. Just as addition isn't any "better" than division, so C# isn't any better than PHP and vice versa. In the big battle for language supremacy, we tend to forget about one key component in that battle. And that is the programmer. The person who will piece together the logic using their years of accumulated knowledge. It's not the language that makes a great product. It's the programmer using a language that will achieve this.

In this day and age, you will see job postings for a myriad of programming languages. Everything from PHP to C# to Cobol to Pascal even if you look hard enough. The language out weighs the person. The personality that will be entering your doors everyday to create something. Companies aren't really looking for programmer's, but more for people with a long list of technical keywords at their disposal, which are two very different things.

So today's let's spend some time and talk about the programmer. Not the language. Not the framework, or the IDE. But the person sitting in that chair typing non-stop for minutes at a time building this picture in their minds as to what they need to build for a company. Let's talk about the human computer that calculates logic much faster than any machine can and or will.

They're quiet

At least, when they need to be. You won't see many programmer's spending their time co-mingling at office parties. And if you do, it's with other programmer's and nobody understands them. So they leave the party together to have their own fun. But they made their appearance at least. They enjoy eating lunch in small groups and eating at their desk is perfectly fine as long as they have a browser and a good playlist to work to.

. . .
Read more
The 5 Minute Rule To Get Things Done

Every individual has their own method of getting stuff done. Whether it's through some online to do list application or through their own handwritten set of notes scribbled on a yellow pad on their desk. Once we get used to our method, it sort of becomes our de facto standard for how we run our day. It may work, it may not work. We won't be able to tell easily. My normal routine consisted of opening notepad and jotting down a list of the first 10-20 things that came to mind to accomplish for the day. Does it work? To some extent. 40-50% of the items on that list get completed, in no particular order. But is there a better method?

Depends on who you ask. A popular method of getting stuff done, practiced by both Elon Musk and Bill Gates, two of the busiest people on the planet I'd safely assume, and I'm sure many others as well, is to break down your day to day activities with the following question in mind.

what can I do in the next 5 minutes?

. . .
Read more
Perks Of Being A Programmer

Aside from the ever increasing job market in the technology sector that sees no end in sight, there are quite a few perks to being a software developer / web developer, programmer, etc in this day and age. More so than just the assumed high paying job, growing as a computer scientist means a growing awareness to what's going on around you in the tech world in general. When you visit a website, it's no longer just visiting a website. You have a deeper understanding of the entire process. When new hardware is released you immediately have a basic understanding on how it works. It's an ever increasingly technological world and keeping up with it is becoming more important by the day.

You save a fortune

Software is expensive. Buying is expensive, leasing it is expensive. Even a simple watermarking tool that you can find online cost some amount of money. Fair enough, as someone spent a good amount of time building it. But if you're a programmer, you can build it too. And if you're a proficient programmer, you can do it quickly and efficiently. Companies nowadays charge an arm and a leg to build a simple application. We're talking $100+ per hour for a basic website.This is one of the major reasons that having a technical co-founder is important in bootstrapping a startup. Because otherwise you're going to require a high amount of funding before you even have a splash page ready to go.

. . .
Read more
Compilation Time Is Eating My Soul Slowly

One of the main reasons that I'm a huge fan of JavaScript is because of it's ease of use. You open up notepad, you type, you save and you're done. The browser will instantly turn your mental output of zeroes and ones into a visual representation of some type. It's fun. But then, you have your back-end languages, which of course, require some form of translation or compilation or interpolation, or some combination of all 3. And so we wait. And we wait. And wait while we watch the gears turn in our applications. In the business world, this has turned into the gap in your work where you're forced to browse the web and it's become an acceptable practice.

Compilation Time Is Eating My Soul Slowly

And it's understandable. The engine, framework, compiler, interpreter is taking your entire project and converting into something that . . .

Read more
Load older posts