How to learn to code (or anything else)

Learn to Code - or whatever else you want to do!For reasons unknown to me, other people are always asking me how to learn programming.

Well, there’s the traditional route: go to school, become a coder. Done!

But as we all know, many of the best and most famous programmers were those who dropped out of school and were essentially self-taught.

Are they onto something?


Fix stunnel “Bad magic at ssl.c” error / crash on Ubuntu

stunnel bad magic ssl.cUbuntu server 18.04 LTS is a rather popular linux OS for servers.

Unfortunately, it doesn’t come without its problems. For example, the current version of stunnel – an SSL tunnel – is woefully outdated.

It seems that although Canonical is aware of the problem, they have no intention of fixing it!

Fortunately, there’s an easy workaround that’s much simpler than you might think…


How to install ImageMagick 7 on Ubuntu

ImageMagick 7 on Ubuntu Server 18.04ImageMagick is great. It allows your web app to process, resize, filter, and do all kinds of other nifty things with images.

Not so long ago, ImageMagick 7 was released. One of the big new features was full support for WEBP images, the new image format from Google.

Now, you might think it’s easy to just upgrade to ImageMagick 7. If you’re using a linux OS like Ubuntu, you just apt install and you’re done, right?

Well, no…


How to debug JavaScript on mobile devices

Mobile JS DebuggingAh yes, the Mobile Revolution!

It’s fabulous – unless you actually create web sites and other stuff that use JavaScript.

In desktop web browsers, you generally get a web inspector / debug console that lets you do all kinds of fun stuff, including debugging your JS code.

But on mobile, well, no such luck.

In fact, most mobile browsers give you absolutely nothing! Fortunately, there’s a neat trick that fixes everything.


How to update or install “Linux on Windows” in Windows 10

In the olden days, there was only “Bash on Ubuntu on Windows 10”. This little gem gave you something like reverse WINE.

You got an Ubuntu linux install that’s running on top of the Windows kernel – with full file system access, the ability to install and run all kinds of linux command-prompty stuff like git, and even graphical linux apps like gitk.

Fast forward a few years, and things have changed…

What if you’re still running Bash on Ubuntu on Windows (Ubuntu 14.04) and you want to upgrade to the latest Ubuntu 16.04 without reinstalling everything?

Or, what if you want a different flavor of linux?


Meltdown & Spectre: DO NOT PANIC! Yet.

By popular demand!

Meltdown and Spectre are the recently-publicized exploits that take advantage of flaws in modern processors.

These flaws are big news, but what’s the actual scoop?

It turns out that they ARE a big deal, but with a few important caveats…

Since the exploits themselves are so technically complicated, I have tried to explain them in a simplified way without sacrificing actual useful details.

That way, you can make up your own mind as to whether or not you should run for the hills!


How to code smarter – now with 50% less irritation!

Everyone knows that coders are weird people.

Interrupt them, and you often encounter a rather strange and “interesting” reaction. Why is that?

Well, it’s all about what happens in your brain when you’re programming something. It’s probably one of the hardest things to focus on, at least for me.

There’s a reason why programmers tend to work late/early hours: fewer distractions!

Fortunately, there are a couple of tricks I have taught myself over the years that can make everyone much happier.

Even if you aren’t a coder, you can still benefit from these tips!


DIY Ultrasonic Fuel Gauge / Level Sensor

If you have a fuel or water tank that is either metal or colored plastic, you may have run into the same problem I had: How do you know when it’s empty?

Mechanical level gauges are nice, but not always practical or even possible. So, I went on the hunt for an ultrasonic level sensor for my fuel tank.

Alas, what’s available on the market is too expensive, not very reliable, and often goofy in terms of features. So I decided to build my own!

This ultrasound fuel gauge can be built for around $33 using a breadboard, Arduino Uno, and one of 2 different ultrasonic transceiver modules designed for use with Arduino or Raspberry Pi boards.


PikaJS: Think jQuery but smaller, lighter, and just as easy to use

(Updated February 2021 for PikaJS 1.2)

Introducing PikaJS: a jQuery-like JavaScript library that simplifies the client-side scripting of HTML.

I had been using jQuery and PrototypeJS, and I needed to ditch PrototypeJS at long last.

My colleague Michael Franzl said, “Hey! Check out this Balalaika thing!”

So I did.

Unfortunately, Balalaika doesn’t give you many methods to do cool stuff. That’s left as an exercise for the programmer…

So, I decided to make my own jQuery, and PikaJS is the result!


Notepad++: The best free text editor for Windows

If you’ve ever tried to open a text file in Windows that was not a Word Doc, you’ve no doubt been smacked in the face by the abomination known as Notepad.

Notepad is Windows’ built-in text editor. At this point, I think the program has not been changed since… forever. And it shows.

Notepad is slow, it has almost no features, and generally people just pray until they’re done doing what they need to do just so they can close down that flaming pile of garbage.

As it happens, there’s a great all-purpose text editor you can download for free, and it’s WAAAAY better than Notepad.