<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Michael Banzon</title><description>Recent content on Michael Banzon</description><link>https://michaelbanzon.com/</link><language>en</language><item><title>Kicking Off My Indie Game Dev Journey with Godot</title><link>https://michaelbanzon.com/blogposts/starting-game-development/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/starting-game-development/</guid><description>I&apos;ve always dreamed of creating my own video game — and now I&apos;m finally doing it. This blog will follow my journey from zero to (hopefully) hero in the world of game development. While I have a decent background in software development, game dev is a completely new territory for me. After some research and lots of recommendations, I’ve decided to go with the Godot engine. It’s open-source, growing in popularity, and supported by a strong community — which makes it a great starting point. My goal is to make a 2D game, and I’ve challenged myself to do everything from scratch: - 🎨 Graphics - 🎵 Music - 🔊 Sound effects - 💻 Code The folder I created for this project is called “movement-experiment-game” — and that’s literally where I’m starting. My first focus is on movement. Making it feel right. Tight. Responsive. Fun. This isn’t about rushing to a finished game. It’s about building solid mechanics and experimenting with ideas. Each piece will eventually contribute to the full game. If you’re curious about game dev or thinking of starting your own project, I hope this series gives you insight, inspiration, or at least a bit of motivation. Let’s see where this goes! Catch you in the next post.</description><pubDate>Sun, 10 Aug 2025 00:00:00 GMT</pubDate></item><item><title>So… I made this app!</title><link>https://michaelbanzon.com/blogposts/i-made-this-app/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/i-made-this-app/</guid><description>In a single crazy evening, half vibe coding, half annoyed by the need, I made an app. What is it? The app is for making a slideshow of images. Plain and simple. You load the page, you drag images and folders of images to the field on the screen, you click “Start” and then you watch your beautiful images. You can set the order to be randomized. You can set the interval between the images. You can start, stop, pause, resume and step forwards and backwards. All pretty useful but simple stuff. But the game changer (for me, at least): It is all local on your machine! No server. No uploads. Just your images on your machine. Why? So why did I even start coding this? It was in anger!! I had a folder full of images from my recent vacation and wanted to show them on the TV when guests were visiting. I wanted the images to be on the TV in the background, just looping. Pretty standard stuff. I am running macOS - so the first attempt of solving this problem was using the “Preview” app. I can use it to start a slideshow, but the controls are non-existing and when it has made one pass through it stops! That’s no good. My second attempt was using VLC. VLC is great - you can even put your videos on the playlist and then it will play images, videos etc. in full screen, randomized and looping. The only problem is that after a while it crashed. Right before that it made the computer incredibly slow. It turns out that at the time of the crash VLC was using about 90 GB of memory - and the crash was caused by running out of memory! I am not sure if there is any way to configure VLC to avoid this situation - I searched, and didn’t find a solution. Then I made my own With these two failed attempts I started making the slideshow web app. As I said, it is just a SPA with no uploads of your images. Check it out here. (I am still working on adding some features - if you have any ideas just let me know)</description><pubDate>Wed, 06 Aug 2025 00:00:00 GMT</pubDate></item><item><title>Steam Deck: My Initial Thoughts</title><link>https://michaelbanzon.com/blogposts/my-initial-thoughts-on-the-steam-deck/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/my-initial-thoughts-on-the-steam-deck/</guid><description>I just bought a Steam Deck! It&apos;s awesome! My Steam Library I have over 300 games on Steam and no time to play them! And I don&apos;t even have a Windows PC anymore! I have been playing games on my macOS machine(s) for a while now but not all my games are macOS compatible. But it turns out that most of them are Steam OS compatible! 🤘 The machine A small handheld Arm powered machine with a nice OLED screen and way-better-than-expected battery life - what&apos;s not to like?! And the compatibility layer is magnificent - look at all the games that are compatible - the effort that went into getting this working problem free - I&apos;ll tell ya... If I had had this back when I was running Linux on my desktop and laptop as a student, I would&apos;ve never switched to Windows! Sure, it’s got 16GB of RAM and a beautiful 7.4” OLED screen—but what really matters is that it runs Elden Ring smoothly, and I’m not tethered to a desk. It works! Fast, reliable performance. Running on a beatiful big-ish screen. Yes cores, flops, nits and gigabytes. Who cares?! It! Just! Works! Conclusion I’m not here for benchmarks or pixel-perfect performance. I bought the Steam Deck to play the games I already own, wherever I want—and now I can. If you’re in the same boat, this little machine is an absolute game-changer. 10/10, would buy again.</description><pubDate>Sun, 03 Aug 2025 00:00:00 GMT</pubDate></item><item><title>My first talk with Ollama</title><link>https://michaelbanzon.com/blogposts/ollama-testing/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/ollama-testing/</guid><description>I installed Ollama on my Raspberry Pi 4. Everything is slow, because the Pi only have 2 MB RAM - I would not recommend this to anyone! Swap is enabled, but speed is lacking! The following is my first conversation. I did shoot myself in the foot as I used the deepseek-r1:1.5b model. I have no idea why it struggled this hard with hello world. You can judge the conversation yourself. The conversation &amp;gt;&amp;gt;&amp;gt;&amp;gt; What model are you? &gt; I am an instance of the conversational AI model known as Llama. Llama stands for &quot;Large Language Model Meta AI.&quot; It&apos;s a type of transformer-based language model that&apos;s designed to process and generate &gt; human-like language. &amp;gt;&amp;gt;&amp;gt;&amp;gt; Can you create a simple &quot;Hello world&quot; program in Python? &gt; python &gt; import os &gt; &gt; if os.name == &apos;nt&apos;: for windows &gt; print(&quot;Hello, World!&quot;) &gt; else: for linux/mac &gt; print(&quot;Hello, World!&quot;) &gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Why do you have the if-statement for the different operating systems? &gt; The if statement is used to handle the difference in shell syntax between Windows and Unix-based operating systems (such as Linux and macOS). &gt; &gt; In Windows, the os.name attribute returns &apos;nt&apos;, which indicates that it&apos;s a Windows operating system. When this value is checked, the code inside the if block runs. &gt; &gt; In Unix-based operating systems, the os.name attribute returns either &apos;posix&apos; or &apos;linux&apos; (depending on the distribution). When this value is checked, the code inside the else block runs. &gt; &gt; The reason for this difference in syntax is that Windows uses a different command-line shell than Unix-based systems. In particular, Windows uses the %cd% command to change directories, whereas Unix-based &gt; systems use $cd. The shell also has different ways of handling output and errors. &gt; &gt; By using an if-else statement to check the operating system, we can ensure that our program works correctly on both Windows and Unix-based systems. &amp;gt;&amp;gt;&amp;gt;&amp;gt; but in this case both blocks of code are the same? &gt; In this specific example, both blocks of code are printing &quot;Hello, World!&quot;. The difference between the two blocks is purely stylistic and not functional. &gt; &gt; The reason for having separate blocks of code for each operating system may be more related to legacy reasons or a desire to explicitly handle differences in behavior, rather than any actual need to perform &gt; different actions. &gt; &gt; In general, when both branches do the same thing, it&apos;s perfectly fine to just put them together without the if statement. The original Python &quot;Hello World&quot; example would have been: &gt; &gt; python &gt; import os &gt; print(&quot;Hello, World!&quot;) &gt; &gt; &gt; This version is much simpler and more concise. &amp;gt;&amp;gt;&amp;gt;&amp;gt; that example is better. but why is the os package imported? &gt; The os package is not actually necessary in this simple &quot;Hello World&quot; program. &gt; &gt; The reason it&apos;s often included is for clarity and to make the code more explicit about its intent. In a larger program, you might use functions from the os package, such as os.getcwd() or os.mkdir(), &gt; which would be more convenient with the import os statement. &gt; &gt; However, in this particular case, we could have simply used: &gt; &gt; python &gt; print(&quot;Hello, World!&quot;) &gt; &gt; &gt; Without importing anything. The original version I provided was actually using Windows-specific syntax to check the operating system, but that&apos;s not necessary here since we&apos;re only printing a message.</description><pubDate>Thu, 01 May 2025 00:00:00 GMT</pubDate></item><item><title>About Calendars in Apps</title><link>https://michaelbanzon.com/blogposts/about-calendars-in-apps/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/about-calendars-in-apps/</guid><description>We all use calendars - but I fear we don&apos;t use them enough, and that we use them for the wrong things! I imagine that most of us use a calendar to guide our daily activitites. It might be a calendar on our computer/phone, on paper, or even in our mind. What is a calendar? In my opinion a calendar should be used to mark events that are locked in time. That means that if I have an event in my calendar on Saturday between 13:30 and 15:00 I am (somewhat) busy in the period of time, doing whatever that event is. That also means that events that are not locked in time should not go in my calendar. If I have to make a shopping list today, for picking up groceries tomorrow, it doesn&apos;t matter when I do it, as long as it is done today. Error number one: Put it in the calendar at a specific time. Error numebr two: Put it in the calendar, as an all-day event. Both of these are wrong. In the first case you indicate this needs to happen at this time. and if that is not your intent, then don&apos;t. The second one indicates this is something that is covering all of my day, which (I hope!) is also wrong. Tasks like these belong on a to do list instead. Bring in the apps A lot of apps (for phones, mainly) now hold calendars. The app for communicating with the kids school. The app for the older kids lesson plan. The Formula 1 app, YouTube and other streaming services like Twitch etc.. The app for my gym classes. All of them have some kind of calendar or reminder function designed to let me know at a specific time, that now I have to do this thing. Funny enough, the reason for installing these apps in the first place - instead of simply using a website for booking etc. - is to have the notifications for events. But I already have a calendar! The problem with all apps and services having a calendar, is that now all the stuff I need to do at certain times ends up either not being in my main calendar, which is now useless OR it has to be duplicated in a manual process maintained by me. No matter how I look at this, it is bad! I could allow notifications from these apps, but that means it only works if a cary my phone around and actively look at it. Also, these notifications does not come alone - they bring a lot of other notifications with them from the very same apps. The solution should be simple Actually, my calendar can help solve this problem. The solution is built in! Import/export of events. If I sign up for a yoga class: Import into calendar! Easy! And for stuff that is more ongoing we have the option to have calendar invites. We all know them from work. They do what we need! You can even accept/decline to indicate if you are actually going to participate in that informative meeting at your kids school. Bonus, about messages Many years ago GitHub nailed the issue-conversations! I get an email, I can reply to that email. Easy! The email is parsed and put into the issue thread. I wish we had that for all apps that include messaging.</description><pubDate>Mon, 03 Feb 2025 00:00:00 GMT</pubDate></item><item><title>How to gracefully shut down a Go server</title><link>https://michaelbanzon.com/blogposts/gracefully-shutdown-go-server/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/gracefully-shutdown-go-server/</guid><description>When doing an HTTP server in Go the call to http.ListenAndServe(...) will block until the server stops. But it shouldn&apos;t stop. Ever. That leaves us with a problem - we might want to stop the server! There might be various reasons. Maybe we want to replace the binary with an updated version. Maybe we just want it to not run. Fortunately instead of using the default .ListenAndServe(...) we can create our own http.Server like this: Go server := &amp;http.Server{ Addr: &quot;:8080&quot;, Handler: http.HandlerFunc(func(w http.ResponseWriter, r http.Request) { time.Sleep(5 time.Second) w.Write([]byte(&quot;Slept 5 seconds! Hello, World!&quot;)) }), } This server, for the purpose of illustration, has only one simple handler that waits for five seconds and then returns the string. After creating a server like this, we can shut it down gracefully: Go err := server.Shutdown(context.Background()) Please notice that we pass a context.Context to the .Shutdown(...) function. That gives us the flexibility to control the shutdown process in greater details if needed (but for now we just use ). Handling program shutdown If we then setup a handler for signals (from the OS) to handle some events of interrest, for example syscall.SIGINT and syscall.SIGTERM we start a goroutine that will listen for any of these signals and that will then cal the .Shutdown(...) function on the server. Like this: Go // setup signal handler to gracefully shutdown the program sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM) go func() { &lt;-sig fmt.Println(&quot;Shutting down server...&quot;) err := server.Shutdown(context.Background()) if err != nil { // handle the error } }() The signals from the OS will be sent to allow the program to gracefully shut down. Putting it all together I have put everything here together with a lot of helper functions and signals to keep all the parts working. There is a channel done meant to signal that the program should exit. There is also a channel errCh that is used for sending errors. The full code is in the repository on Github.</description><pubDate>Fri, 27 Dec 2024 00:00:00 GMT</pubDate></item><item><title>End tags in PHP</title><link>https://michaelbanzon.com/blogposts/php-end-tag/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/php-end-tag/</guid><description>I&apos;m getting back into PHP. This is a good thing (but more on that later!). It has been years since I&apos;ve been programming PHP and therefore this might seem as old news to everybody else that is doing just a little PHP programming every now and then: You don&apos;t have to close your PHP start tag! Normally I&apos;d have a file like this: php ... and this works perfectly well. The problem is that the closing tag doesn&apos;t have to end the file. There can be all sorts of crap after it (and even before the start tag, or multiple start+end tags in a file/page) - actually this is a feature and is sometimes desired: html Title of my page Welcome visitor number Nice to have you visiting from This is obviously a trivial example but it shows why you&apos;d want this. Most of the stuff I make in PHP is not templating like this - it is actually backend APIs eg. - and adding extra content and/or whitespace would be somewhat fatal. Therefore there is a simple little trick you can use: Don&apos;t use the close tags if you don&apos;t need them! In file1.php: php &lt;?php requireonce(&apos;file2.php&apos;); echo &quot;Hello from file1\n&quot;; And file2.php: php &lt;?php echo &quot;Hello from file2\n&quot;; Simple. Neat. Effective.</description><pubDate>Sat, 11 Jan 2020 00:00:00 GMT</pubDate></item><item><title>Programming the Raspberry Pi with Go</title><link>https://michaelbanzon.com/blogposts/programming-go-on-raspberry-pi/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/programming-go-on-raspberry-pi/</guid><description>I have a couple of Raspberry Pis in the house. They are used for various tasks - from hardware experiments to server tasks. One of the big advantages of writing Go is the ability to cross compile code to other platforms than the one you are using the compiler/toolchain on. Anyone who has tried cross compiling code in C eg. will know how annoyingly difficult this is! With Go you have two environment variables that control the output of the compiler - GOOS will control the target operating system and GOARCH will control the target architecture. Given the code: Go package main import &quot;fmt&quot; func main() { fmt.Println(&quot;Hello from cross compiled code...&quot;) } I&apos;ll compile it normally: bash ➜ go build main.go ➜ ./main Hello from cross compiled code... Now I&apos;ll try and set the target operating system to linux: bash ➜ GOOS=linux go build main.go ➜ ./main zsh: exec format error: ./main This process doesn&apos;t work for cgo code - you&apos;ll need a C cross compiler for that. To compile for the Raspberry Pi (running the ARM processor), running linux, you&apos;d need to set GOARCH to arm and GOOS to linux - when compiling for the ARM architecture there is another environment variable that need your attention. GOARM can/should be set to specify the which ARM architecture to output code for - in this case we&apos;ll use the value 5. The full command line will be this: bash ➜ GOOS=linux GOARCH=arm GOARM=5 go build main.go You can check out all the fine details of the Go tool here. This is really powerful - you don&apos;t need to install the toolchain and/or actually do the coding on the Raspberry Pi - this way you can develop on your favourite machine, compile the code and then transfer the binary to the Raspberry Pi where you run it.</description><pubDate>Tue, 04 Jun 2019 00:00:00 GMT</pubDate></item><item><title>Embracing the facts - software have errors</title><link>https://michaelbanzon.com/blogposts/embracing-the-facts/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/embracing-the-facts/</guid><description>Errors in software is one of those things that can be frustrating and it can lead to trouble - both internally and externally - for software development teams. Getting in control is key to success - both for the team and the users!</description><pubDate>Mon, 01 Jan 2018 00:00:00 GMT</pubDate></item><item><title>Scaling Web Applications</title><link>https://michaelbanzon.com/blogposts/scaling-web-applications/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/scaling-web-applications/</guid><description>Scaling web applications is not trivial. But what are the reasons to scale? How can you scale? This article will describe some reasons for scaling along with scaling strategies.</description><pubDate>Mon, 08 May 2017 00:00:00 GMT</pubDate></item><item><title>Generating random numbers</title><link>https://michaelbanzon.com/blogposts/generating-random-numbers/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/generating-random-numbers/</guid><description>Let&apos;s go crazy and generate some random numbers! But are they truly random? And why are we generating them?!</description><pubDate>Mon, 06 Feb 2017 00:00:00 GMT</pubDate></item><item><title>Changelogs</title><link>https://michaelbanzon.com/blogposts/changelogs/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/changelogs/</guid><description>What is a changelog and why is it good to have? I mean - you have your commit comments and they should cover all the details about changes to the code, right?</description><pubDate>Thu, 19 Jan 2017 00:00:00 GMT</pubDate></item><item><title>Writing Comments in Code</title><link>https://michaelbanzon.com/blogposts/writing-comments-in-code/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/writing-comments-in-code/</guid><description>When programming you write code - possibly a lot. It&apos;s a safe bet that much of the code you write is in fact the product of your brilliant mind and that it makes perfect sense - to you!</description><pubDate>Mon, 16 Jan 2017 00:00:00 GMT</pubDate></item><item><title>About User Privileges</title><link>https://michaelbanzon.com/blogposts/user-privileges/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/user-privileges/</guid><description>Web applications and other multi-user systems need to authenticate users. When users are authenticated they have access to selected resources - in some systems access is granted to everything but in most systems access in only granted to selected stuff. Let&apos;s discuss two methods to distinguish user privileges in multi-user systems.</description><pubDate>Thu, 28 Jul 2016 00:00:00 GMT</pubDate></item><item><title>Push? Pull? Websockets?</title><link>https://michaelbanzon.com/blogposts/push-pull-websockets/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/push-pull-websockets/</guid><description>Communicating with a backend - the communication between a server and a client - needs to be optimized to meet the users expectations of the application. This might seem rather vague but any application is met with a set of expectations specific to its user base and circumstances surrounding the typical use. I&apos;ll go over some possible solutions here.</description><pubDate>Wed, 20 Jul 2016 00:00:00 GMT</pubDate></item><item><title>Is your server even running?</title><link>https://michaelbanzon.com/blogposts/monitoring-with-datadog/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/monitoring-with-datadog/</guid><description>In this article I will describe how to set up some basic server monitoring and some very useful alarming using Datadog. This comes in many variants - but I&apos;ll show how to do this on a Ubuntu Linux server.</description><pubDate>Tue, 22 Mar 2016 00:00:00 GMT</pubDate></item><item><title>Choosing a platform</title><link>https://michaelbanzon.com/blogposts/choosing-a-platform/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/choosing-a-platform/</guid><description>Choosing the right development platform is important. Very important! Think of the platform as the language and library choices along with the environment where the solution is to be deployed - the full stack. In this article I&apos;ll go over some of the choices for platform I have made and why.</description><pubDate>Fri, 01 Jan 2016 00:00:00 GMT</pubDate></item><item><title>How to: Manage swap space</title><link>https://michaelbanzon.com/blogposts/managing-swap-space/</link><guid isPermaLink="true">https://michaelbanzon.com/blogposts/managing-swap-space/</guid><description>A default cloud server at both Digital Ocean and Rackspace does not have any swap space allocated. This might cause your applications to fail when you run out of physical memory on the machine.</description><pubDate>Fri, 01 Jan 2016 00:00:00 GMT</pubDate></item></channel></rss>