TIL How a Java Debugger Works

I’m working with my friend on a project to implement a web based debugger for Java projects. Today I learned all about the Java Debug Interface (JDI, which I like to pronounce as ‘Jedi’).

It’s essentially an event-driven request/response API that allows all the features that a debugger supports - step over, step into, breakpoints, stack inspection, etc. For example, say we want to set a breakpoint on a certain line number. First, we load the target class, then create a breakpoint request, wait for the response which tells us the breakpoint event was handled successfully. Now, we can look at the stack at this point and inspect variables.

Add some websocket wizardry, and you can hook it up with a web application.

If you’re interested in the details, head over to the GitHub project https://github.com/jameslawson/webjdb.

Why a web based Java debugger? Aren’t you reinventing the wheel?

The idea isn’t to bring a fully-fledged code editor to the web. Plenty of those exist. Instead, the idea is to quickly debug an existing Java project in the browser. This simplifies the task of the web app - we don’t care about writing code, we just care about a simple and purpose-built debugging experience. It’s also useful for people who use Vim or Sublime instead of an IDE. Finally, at the moment this is just a proof-of-concept experiment. We’ll see how it goes.

TIL Watching People Code is a thing

So lately, thanks to Twitch, there’s been a new phenomenon on the interwebs to do with watching people play games. This craze got so big that large companies such as Google and Amazon are willing to spend millions to buy Twitch because of how successful it is.

Well, it looks like watching people write code live is now becoming a thing. There’s a growing reddit community (/r/WatchPeopleCode) dedicated to it, and a website was made to list the current live streams from reddit: watchpeoplecode.com. The purpose is simple. You watch someone write code live online. Sometimes it’s someone giving a tutorial and speaking to the audience. Sometimes it is just someone working on their own project - maybe there’s better productivity when you know someone’s watching you code.

Who knows I might try it out one day. Or maybe in the future ‘watch people blog’ will become a thing. Who knows?

TIL How easy it is to create a simple blog

Just clicked on a button on my admin backend (I use TSO Host) and everything was set up! It even came bundled with Clef, which allows super easy two-factor authentication so it’s super secure. I haven’t used WordPress in a while, but it looks awesome, especially the cool new editor!

Welcome to my blog!

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now