Update webwords blog post with Makefile details and add webwords to gitignore

This commit is contained in:
Russell Ballestrini 2025-10-10 10:19:07 -04:00
parent cfd26c2cad
commit bd22daed57
2 changed files with 40 additions and 51 deletions

1
.gitignore vendored
View file

@ -75,3 +75,4 @@ vars.fish
blog-multi-mower/
webwords/

View file

@ -9,87 +9,75 @@ webwords reaches 42 languages: the ultimate programming kata
**The companion** `webwords git repo <https://github.com/russellballestrini/webwords>`_ **lives here.**
Eight years ago, I started webwords as a simple programming kata to practice writing the same web application in different programming languages. Today, I'm thrilled to announce that **webwords now supports 42 programming languages** — from mainstream languages like Python and JavaScript to esoteric ones like Brainfuck.
**Webwords now supports 42 programming languages.** TimeHexOn assisted with this milestone over 2 days using a code agent tool.
42 languages. Same as the answer to life, the universe, and everything. Coincidence? Probably. But each implementation solves the exact same problem in completely different ways.
.. contents::
the journey to 42
==================
the spec
========
What began as a weekend hackathon project to learn Docker has evolved into something I never expected: a comprehensive showcase of how the same simple web service can be implemented across the vast landscape of programming languages.
The number 42 feels particularly fitting — it's the "Answer to the Ultimate Question of Life, the Universe, and Everything" from The Hitchhiker's Guide to the Galaxy. While webwords might not solve the mysteries of the universe, it certainly demonstrates the beautiful diversity of approaches to solving the same programming problem.
what makes webwords special
============================
The beauty of webwords lies in its simplicity. Every implementation does exactly the same thing:
Every implementation does exactly the same thing:
1. Accept two query parameters: ``keyword`` and ``target``
2. Fetch the content from the target URL
3. Search for the keyword in that content
4. Return ``true`` or ``false`` as plain text
This spec is small enough that someone new to any language can understand it quickly, yet complete enough to demonstrate real-world programming concepts like HTTP servers and HTTP clients.
the 42 languages
testing webwords
=================
**Native HTTP Server Implementations (33 languages):**
To test any implementation, try searching for ``potato`` on `Remarkbox <https://www.remarkbox.com>`_:
From the expected (Python, Java, Go, JavaScript) to the surprising (Assembly, Brainfuck, COBOL), each implementation showcases the unique characteristics and idioms of its language while maintaining functional compatibility.
.. code-block:: txt
**Wrapper-Based Implementations (9 languages):**
http://127.0.0.1:8888/?keyword=potato&target=https://www.remarkbox.com
Sometimes the most interesting solutions come from thinking outside the box. These implementations use creative approaches like Bash scripting and language-specific processing to achieve the same goal.
Returns ``true`` because potato exists on Remarkbox.
why this matters
================
the implementations
===================
Programming languages are tools, and like any craftsperson, the more tools you understand, the better equipped you are to choose the right one for each job. Webwords serves as a practical laboratory for exploring these tools.
**Native HTTP Server Implementations (33 languages)**
Each language brings its own:
**Wrapper-Based Implementations (9 languages)**
- **Syntax and semantics** — How does the language express ideas?
- **Runtime characteristics** — How does it perform under load?
- **Ecosystem and tooling** — What libraries and development experience does it provide?
- **Deployment story** — How easy is it to containerize and deploy?
docker deployment
=================
docker makes it possible
========================
Every webwords implementation ships with a Dockerfile, making it trivial to build and run any version:
Every implementation ships with a Dockerfile:
.. code-block:: bash
cd rust
docker build -t webwords-rust .
docker run -d -p 8888 webwords-rust
cd language-directory
docker build -t webwords-language .
docker run -d -p 31337:31337 webwords-language
This consistency was crucial for the project's growth. When someone wanted to contribute a new language, they didn't need to worry about installation dependencies or environment setup — Docker handled it all.
the makefile system
===================
lessons learned
===============
The project includes a comprehensive Makefile that manages all 42 implementations:
Building the same application 42 times teaches you things you can't learn any other way:
.. code-block:: bash
**Language ergonomics vary wildly.** Some languages make HTTP servers trivial (Python), others require significantly more boilerplate (Java), and some are just exercises in persistence (Assembly).
make build-all # Build all 42 Docker images
make test-all # Test all implementations concurrently
make benchmark LANG=python # Benchmark a specific language
make help # Show all available commands
**Performance isn't everything.** While Go and Rust implementations are blazingly fast, the Python version is often easier to understand and modify. The "right" choice depends on your constraints.
Each language has individual targets:
**Community matters.** Languages with rich ecosystems and good documentation make development faster and more enjoyable, even when the language itself might be more verbose.
.. code-block:: bash
what's next?
============
make build-python # Build Python implementation
make serve-python # Run Python container on port 31337
make functional-test-python # Test with potato/lemon cases
make clean-python # Stop and remove container
With 42 languages reached, webwords feels complete in a way that's hard to describe. But programming languages continue to evolve, and new ones emerge regularly.
The testing process validates that each implementation correctly returns ``true`` when searching for ``potato`` on ``remarkbox.com`` and ``false`` when searching for ``lemon``.
The project remains open to contributions. If your favorite language isn't represented, or if you think you can improve an existing implementation, pull requests are always welcome.
what's next
===========
**Maybe we'll see webwords in Zig, Carbon, or whatever language emerges next.**
Until then, I'm proud to say that webwords has become what I always hoped it would be: a practical playground for exploring the wonderful diversity of programming languages, one HTTP request at a time.
---
*Try it yourself: Pick a language you've never used before, implement webwords, and see what you learn. The spec is simple, but the insights are profound.*
The project is complete at 42 languages. The community will determine what happens next.