Hello internet world! It’s new blog time.
For my first post, I wanted to do something more than the classic “Testing 1, 2, 3.” Instead, I’m going back to basics and celebrating the simple joy (and occasional frustration) of getting code to run.
With no real point in mind, I’ve put together a few “Hello, World!” examples in some popular programming languages. Who knows, maybe there will be a nugget or two along the way. Apologies in advance if I didn’t include your favorite programming language.
HTML/CSS/JavaScript
<!-- Make a file named hello.html -->
<!DOCTYPE html>
<html>
<body>
<h1>My JavaScript demo!</h1>
<script>
alert('Hello, world!');
</script>
</body>
</html>
The beauty of web technologies is that anybody with a web browser can run this code immediately—no installation, no terminal, no setup.
After you create a HTML file, you can immediately open it in your web browser of choice and run your code. Alternatively… you can open up your web browser’s dev tools and paste the snippet alert('Hello, world!')
right into the console (see how).
Python
# Name this file hello.py
print("Hello World!")
That’s clean! To get this code running, you’ll need to install Python on your computer. And then have some basic command line knowledge (like setting your current directory to where you put hello.py
).
Once those steps are in place, run:
python hello.py
C#
// Name this file hello.cs
Console.WriteLine("Hello, World!");
Only a bit more typing compared to Python. However, prior to C# 9’s release in 2020, you would have needed to write something like this.
using System;
namespace Application
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
To run this, install the .NET SDK from Microsoft. In .NET 9 (the latest version as of July 2025), you also need a .csproj file. Set your current directory to match your new C# program and run:
dotnet new console
Technically this command will create the .csproj AND a hello world script..
In a few short months (November 2025), .NET 10 will let you run simple console scripts without a .csproj file. If I wait long enough, I can continue to remain ignorant.
Now that everything is in place, run:
dotnet run hello.cs
Java
// Name this file hello.java
void main() {
println("Hello World");
}
Before Java 21 (2023) you had to write a bit more.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Use the following command to run this Java snippet
java hello.java
PHP
PHP wraps code blocks within <?php
and ?>
tags. These tags can be mixed with HTML within the same file. Leave the final ?>
off if you’re only writing PHP code.
<?php
// Name this file index.php
echo "Hello, World!";
To install, you’ll need to follow the guide on php.net or install a third party tool to run PHP. I’m a big fan of DDEV (which uses Docker). If you’re looking for something with a simple installer and a UI, I’d recommend MAMP.
PHP is typically run as a web server, which means to run your code you’ll need to visit a local URL in your browser. If you have PHP installed on your command line, you can run the following.
Make sure your terminal is in the same directory as index.php
php -S localhost:8000
Then visit localhost:8000
in your browser.
Rust
Rust’s “Hello World” program uses a main
function as its entry point and the println!
macro for printing text. The exclamation mark (!
) signifies that println!
is a macro, not a regular function.
// Make a file named hello.rs
fn main() {
println!("Hello, world!");
}
- Install Rust so you can compile & run hello world program.
- Running
rustc [hello-world.rs](http://hello-world.rs)
will create a binary that can be executed.
# Create a binary that can be executed
rustc hello.rs
# Then execute the binary.
./hello
Go
// Make a file named hello.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
You know the deal by now. Install Go and run the following.
go run hello.go
Wrapping up
I went into this little exercise thinking it might hit a few snags with some of these language, but the tooling and tutorials have come a long way. It’s especially impressive to see how much simpler C# and Java have become in recent years.
Honestly, for newcomers, the trickiest part is often just getting comfortable with the command line. I still remember the early days of my career, constantly typing cd
and then dragging a folder from my desktop into the terminal window just to get to the right place.
That brings me back to where this post started: HTML, CSS, and JavaScript. Getting started with these foundational web technologies requires zero setup and zero terminal experience. That gentle learning curve can open up a wide world of backend development, strongly-typed languages, and even mobile apps (and you do end up using the terminal a ton).
# TODO VIDEO or GIF
Forget what the AI doomsayers say about the end of programming. 2025 is an awesome time to start coding. I hope you’ll join me in building cool things on the web.