Gillius's Programming

All Posts

Start « Prev 1 2 3 4 5 6 Next »

Don't be Afraid of the Monolith

A common mistake I’ve seen is developers over-engineering new applications. While it can be partially caused by “ resume-driven design”, I feel it mostly comes from the assumption that the latest techniques seen online from large tech companies apply to everyone. Sure, the Googles and Facebooks of the world can be a great technical role model, but not every application has to be built like Netflix. I would even argue that a “next Netflix” shouldn’t be built initially like Netflix.

A city of 1,000 wouldn’t start with building airports, trains and highways even if it will become a city of 1 million. The same applies to software. Sure, consider the future of maximum scale, but new requirements and technologies will foil even the best plans. You just need to leave a way to evolve to the next stage.

A design pattern I see commonly abused in new projects is picking microservices over modular monolith. It’s hard to imagine a new application that should start its life as microservices. Even with a skilled team, the pressure to deliver the minimum viable product is strong enough such that there is a high risk of getting the worst of both worlds: a distributed monolith, or at best an over-designed and complex to debug system requiring dedicated DevOps engineers before you need them. In the beginning you should focus more on business requirements and value. I’ve seen this push to over-engineer many times – once, I was presented with a proposal to create a Kubernetes cluster for an application that otherwise ran with very little utilization on a single server with 1 vCPU and 4 GB memory.

Some rules of thumb that I have:

Continue Reading >

Enhance Your Search With Embeddings

You don’t need to use full AI models to get some of the benefits that have come out of the Gen AI / large language model (LLM) wave, especially when it comes to search.

One of the interesting components that have come out is practical uses for embeddings, which represents a concept as a high-dimensional vector (series of decimal numbers). While the idea of embeddings predate LLMs (such as Word2vec in 2013), the embedding models we have access to now like OpenAI’s text-embedding-3-small have been enhanced to understand context, for example the word “ruler” can refer to a measuring device or to a king. The term used here is “attention” in the sense of paying attention to the rest of the context. Humans can easily differentiate the two different meanings of “ruler” in the phrases “I want to measure this wood, please give me the ruler” and “King George was a ruler of England”.

Continue Reading >

2025: Year of the Linux Desktop (for me at least)

Every year since the dawn of time someone has declared “it will be the year of the Linux desktop!” I don’t know if that will be true in 2025 for everyone, but it is for me. I’m now using Kubuntu exclusively on my home desktop after initially leaving Windows on as a dual boot. Once I realized I went 4 months without even starting Windows once, I knew it was safe to drop it.

Now, I have been exposed to Linux for a long time. I first set up a system in 1999 with Mandrake Linux (most recently called Mandriva), and loved it. I set up a server for development at work with Ubuntu Server in 2006 and since have used Linux servers at work almost exclusively. For a few years in the late 2000s I had an Ubuntu Desktop as my work machine.

In this post I want to share why I switched now and some “risk free” things you can explore if you are interested in switching away from Windows on your PC.

Continue Reading >

Site Redesign With Jekyll

Welcome to the newly redesigned gillius.org, built with Jekyll and CSS by hand, based on some CSS resets I found online.

This has been a long time coming – I last moved to Movable Type Open Source edition in 2011 and the last major CSS design I did in 2006. I’ve been working on this for some time and there’s still more updates I’d like to make, but it’s far past time to cutover at this point.

Some of my very old content has been removed such as C++ and Allegro tutorials and articles from the late 90s and early 2000s which is very out-of-date.

Keep reading for more details and my reasons in picking Jekyll.

Continue Reading >

Removal of Forums

Since 2011, the forums have been read-only since there was not much activity except for spammers. I am cleaning up all unnecessary old software after this site was compromised via a PHP exploit in the past few days. As the domain has been read only for 10 years, I have decided to shut down forums.gillius.org.

Pointing Poker

I developed a Pointing Poker backend and frontend web application (GitHub Page) that works well enough for an internal team to use. It requires nodejs on the backend. The front end was built with React.

I built it because I was frustrated with the performance and reliability of public servers, and because I wanted to learn more how to use React beyond a trivial tutorial. It’s based on websockets, and all data is immediately replicated between all clients. There’s no code to reconnect if the websocket fails or if websockets don’t work, but it’s worked without a single flaw within an internal network, which is how I’ve used it.

Thanks to Mischa Berlin for a submission allowing random name generation!

Read on for more details on the implementation.

Continue Reading >

The Lunchbus

I made a project ("lunchbus") to play with Spring Boot + websockets + AngularJS 1.5 + Groovy + Redis. This may be interesting to those who are interested to see how these are set up. The project also has the configuration to run on Heroku.

The lunchbus app keeps track of who owes lunches and to whom, a list of people and places that can be selected, a button to randomly select a place, a chat functionality, and a demonstration of high-speed log output from backend. Persistence is provided by Redis. Due to how it uses Redis, it's just almost ready for horizontal scaling with multiple servers, for that time that you have over 100,000 people going to lunch with you. All that's needed for that is to integrate Spring Boot to Redis pubsub.

My goal is to learn Spring Boot and websockets primarily, and also to see what does an application relying solely on websockets look like and its strengths/weaknesses.

jalleg Update

The jalleg binding for Allegro covers essentially the entire library now, with all of the major parts tested. It is at the point I believe it is good enough to start using. Any feedback is appreciated, and if no issues arise, I will probably make a 0.1 release, although the binding itself is more like "1.0 beta". The library has been tested on both Windows and Linux (Ubuntu) at this point. I've also set up a wiki page on getting started in Windows and Linux.

There are a few examples but the default one that runs is a ball and paddle game using a handful of Allegro features:

  • Display and primitives addon
  • Font addon for scores
  • Keyboard: A/Z left player, up/down right player
  • Mouse: click where you want the paddle to be
  • Joystick: controls the right player
  • Haptics addon: if you have for example XBox controller as your joystick, you get rumble effect when ball hits
  • Audio addon: sound effects generated by square waves

jalleg, JVM binding for Allegro

jalleg is a JVM binding for Allegro 5.2 to be used by any JVM language (Java obviously, but also other languages such as Groovy, Kotlin, JavaScript, Scala, Jython, JRuby, and Clojure).

I've just put up a new repository for those interested in following the progress. Currently I have a working but not fully tested JNA-based binding auto-generated by JNAerator.

Allegro was a library I originally worked with a lot when I was learning C/C++ development in DOS in the late 1990s, and has always had a special meaning to me. Allegro 5 is a modern, cross-platform variation of the library supporting hardware rendering and even mobile development. Allegro is a simple library to use and programming a game is a great way to get into learning programming. My hope is that jalleg expands the Allegro fun to Java and all the JVM languages.

jalleg is on GitHub

JFXUtils 1.0 Released

Version 1.0 of JFXUtils is released now.

JFXUtils is now available on Maven Central, so no custom repository settings are needed! The maven coordinates for this release are org.gillius:jfxutils:1.0.

A special thanks goes to gforman44, who contributed a lot of code and ideas for this release and encouraged me to finish to 1.0. Also thanks go to Daniel Weil for bug fixes.

You can find more information at the GitHub Project Page.

Continue reading for the full list of changes.

Continue Reading >
Start « Prev 1 2 3 4 5 6 Next »