How to Debug web sites on Mobile Devices

Android Remote USB DebuggingIf you’ve ever designed a web site, you know that the ‘dev tools’ built into browsers are invaluable.

You can play with the CSS, debug JavaScript, see requests in realtime, and so on.

That’s all great for desktop, but what about debugging on mobile?

Typically, developers jump through all sorts of hoops – including hacks in their code that are added strictly for development debugging.

Isn’t there a better way? Why yes, there is…

(more…)

Is Chrome’s Idle Detection really a threat to privacy?

IdleDetector APIChrome 94 was recently released with a new feature: Idle Detection.

Specifically, there’s a new JavaScript API called IdleDetector. It reports two things to the JS code of the web page you’re viewing: keyboard/mouse activity, and if your screen is locked or not.

Much has been said about the diabolical nature of this new capability in Chrome…

Thing is, while we can be forgiven for doubting Google’s motives in adding this feature, it just so happens that Idle Detection is actually quite safe – and useful!

(more…)

Why your WebRTC calls aren’t working: Timing is everything!

WebRTC Code ExplainedWebRTC is pretty cool. It allows any web browser to make voice and video calls to any other browser – no extra software required!

The problem is that while there are tons of guides and gobs of sample code out there, nobody really explains how it works.

The end result is that you program away, and then discover that OOPS! It’s not connecting…

So, let’s see how to make WebRTC actually work!

(more…)

The EASY way to use Material Design Icons

Material Design Icon Font ViewerIf you’re a web developer, you’ve probably used Google’s Material Design Icon font. It’s a great way to include 1 small file and get gajillions of icons – instead of making 20 different pixel sizes of numerous icons, and then creating sprites and all that jazz.

The trouble is that until now, there was no reference for PAST versions of the MD icon font. You’re supposed to just load it from Google’s servers and be happy.

But what if you you don’t need 1800+ icons at 102kB in file size?

What if an older version of the MD icon font is just fine, you want to load the font file from your own servers or CDN, and you just want to know what icons are available in that older version?

Now, you’re all set!

(more…)

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?

(more…)

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…

(more…)

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…

(more…)

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.

(more…)

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?

(more…)