The year was 2007.
O’Reilly Media, a top-shelf technical publisher, had approached me with an idea.
It was tied up with browser compatibility issues, slow, insecure, and distinctly unreliable.
That idea seemed as pointless as the animated gifs of rotating globes that were all the rage in the early days of the Internet.
Needless to say, I didn’t write the book.
I kept coding on the web server and writing about my favorite technologies (usually C# and the .
Then something strange happened.
I don’t even think it’s a particularly good language, if we’re being completely honest.
But I have changed my mind about one thing.
In fact, it’s already hard to remember the not-so-distant past when companies would roll out client-server applications² on their internal networks, spending weeks wrestling with setup issues and unexpected errors.
It only needed to become good enough.
A similar dynamic is at work when it comes to learning to code.
At first, the issue of reach doesn’t seem as important for a person who’s only goal is to learn good programming practices.
But many of the same issues come into play with learning to program as in professional development.
For example, say you’ve built an amazing personality-predictor-quiz app.
Setting up a development environment is relatively easy.
But what happens when you want to send your program to a friend?.Do they need to install a runtime or set up the same development environment?.Does their computer need its security settings tweaked before it allows them to download and install your program?.Maybe your friend is using an operating system that doesn’t support your program at all — or a mobile platform that only allows professional applications that are distributed in iTunes or the Google Play store.
And if the new coder-to-be is a kid, here’s an indisputable fact: kids and browsers are a tight fit.
If you’ve watched a child at work on a computer (not a mobile device), you’ve probably noticed that at least 98% of their time is spent in a browser.
They play games there, use social media, and review schoolwork through Google classroom and Google Docs.
It’s only natural that the code they create is consumed inside the same browser world that they already inhabit.
Fortunately, there are modern solutions that can prevent most of the pain.
Let’s look at the top four most common complaints.
It accepts things that don’t seem right and ignores obvious problems.
Its laziness can turn small typos into code-crashing disasters.
Here’s an example of some code that’s doomed to fail:var myNumber = 100;myNumber = myNumbr + 1;Did you catch the mistake?.The second line actually uses two variables: the myNumber variable that was defined in the first line and an imaginary myNumbr variable.
The same issue happens if you use a variable name with inconsistent capitalization (like MyNumber instead of myNumber).
A similar problem occurs if you think a variable is holding a number when it really has a piece of text, and so on.
It’s hard enough to learn to code without needing to worry about the ways your programming language is sabotaging you at the same time.
But, happily, type safety problems are easily fixed with the right development tool.
One of my favorite code editors — both for learning and for professional use — is Visual Studio Code.
It’s free, lightweight, open source, and endlessly extensible.
Done right, OOP helps programmers create simpler, better organized code.
It also makes it easier to reuse important bits of functionality.
These techniques might make sense to someone who’s already learned to program (and even if they don’t, you can simply copy the pattern into your own projects and learn to live with it).
But if you’re completely new to coding, using a kludge for a basic programming concept is an obvious fail.
My favorite is TypeScript, an open source project launched by Microsoft in 2012.
But here’s the magic part.
Best of all, this whole process happens automatically if you use a tool like the Visual Studio Code.
But so what?.The programmer gets to learn OOP concepts, the finished code works without a hiccup, and modern computers handle the whole mess with ease.
One of the most impressive examples is Visual Studio Code.
It’s really a matter of choice.
Choosing the right ingredients — ones that work well, will be supported long into the future, and won’t conflict with one another — isn’t as easy as it seems.
Most languages face a version of this problem.
As bad as these headaches are, they don’t really affect new coders.
Eventually, after a new coder has a solid command of programming fundamentals, they’ll probably want to explore at least one of these frameworks.
But that’s a topic for another day.
Matthew MacDonald is a coder and former developer evangelist.
¹ Server-side code is the code that runs on a web server, far away from your computer.
Client-side code is the code that runs right in your browser.
For example, search for a product on Amazon and server-side code scours Amazon’s databases, generates the HTML with a list of possible matches, and sends it to your browser.
² Client-server applications are an older model of application that divides the work into two parts.
One part runs on a desktop computer (the client), which communicates with the other part (the server) on another computer.
.. More details