Programming
JEP 457 Hello World
This is an updated version of the Java Advent 2022 "JVM Hello World" using the JEP 457 Class-File API.
Writing a “Hello World” program is often a rite of passage for a software engineer when learning a new language.
If you’re a Java developer, you might even remember the first time you typed public static void main(String[] args) in your editor of choice. But did you ever wonder what’s inside that “.class” file that the compiler spits out? Let’s look at how we can write a JVM “Hello World” by creating a class file programmatically.
We’ll work through creating a class file for the following simple Java Hello World application.
JVM Hello World
Writing a “Hello World” program is often a rite of passage for a software engineer when learning a new language.
If you’re a Java developer, you might even remember the first time you typed public static void main(String[] args) in your editor of choice. But did you ever wonder what’s inside that “.class” file that the compiler spits out? Let’s look at how we can write a JVM “Hello World” by creating a class file programmatically.
We’ll work through creating a class file for the following simple Java Hello World application.
How To Build A Log4Shell Detector
Log4Shell (CVE-2021-44228) is a zero-day vulnerability in Log4J, a popular open-source Java logging framework used by many organizations around the world. Though the vulnerability has been patched, and upgrading to a newer Log4J version solves the problem, not everyone has completed the necessary upgrade.
I've written a Guardsquare blog post showing how you can be build a Log4Shell detector using ProGuardCORE to determine if applications are using an older Log4J version that is susceptible to the vulnerability.
Klox: A Kotlin implementation of lox with a JVM backend built using ProGuardCORE
A Kotlin implementation of lox, the language from Crafting Interpreters, with a JVM backend built with ProGuardCORE. The code is availble on GitHub here.
Example Lox program
fun hello() { print "Hello World"; } hello();
Brainfuck Interpreter
As an exercise in using Scala's parser combinator library I implemented a Brainfuck interpreter - see my Github.
Advent of Code 2018
I am taking part in Advent of Code 2018 and you can find my answers on my Github, written in Scala.
Advent of Code 2017
I am taking part in Advent of Code 2017 and you can find my answers on my Github, written in either Java, Scala or Python.
Coding Tasks
You can find on my Github some answers to various coding tasks from interviews and/or online coding test websites, coded in Java, Scala and/or Lisp.
Simple PHP Shopping Cart Tutorial
This is a very simple shopping cart that I wrote at university because many of my peers were asking for help with similar problems for assignments. It is incomplete and is not intended for use on a production website!
