The rock star programmer problem

Do you have a colleague that you look up to? That knows everything about the topic you would love to know more about? That always has an answer to any question you ask? Still you are not learning from this person, because this person is sitting on knowledge. Likes to do things alone. Never documents properly and is too busy to explain things, but complains about lack of help. Do you recognize this? It is the narcissistic programmer a.k.a. the rock-star programmer. ...

January 29, 2023 · Maurits van der Schee

Scaling 3 tier web development: 2 rules

Software development benefits from separating the presentation, business logic and data access. The concepts of “tiers” and “layers” in web development aid this separation. Within the application tier three layers can be identified. This blog proposes two rules to get a well-structured, more secure and more scalable application: (1) The data access layer and the presentation layer should be executed sequentially. (2) “Safe” requests should only read from the data access layer. This approach should be enforced by MVC web frameworks to guide developers towards better applications. ...

December 31, 2022 · Maurits van der Schee

Calling "ToList()" for LINQ performance

While I was doing AdventOfCode 2022 I ran into an issue that made my code run more than 30 times slower than I expected. I didn’t materialize the LINQ expression and I iterated over the sorted collection by position. To anyone understanding how LINQ does lazy evaluation this is an obvious error on my part, causing the sorting to be executed on every key access on the LINQ expression. Can you spot the bug? For anyone less familiar with LINQ the bug is hard to spot (especially in VB.net): ...

December 18, 2022 · Maurits van der Schee

A session locking test suite for PHP

Session locking is well explained by Mattias Geniar in his article “PHP Session Locking: How To Prevent Sessions Blocking in PHP requests” (please read that first). Now that you’ve done that you know what session locking is. My story is that I have once been bitten by this bug on a high traffic website while following best practices of a popular framework (CakePHP). I went on to do research and found that most major PHP frameworks (such as Symfony) do NOT lock sessions (while PHP natively does do this). ...

November 27, 2022 · Maurits van der Schee

PHPStan: Find bugs without writing tests

I’m not saying you shouldn’t write tests. But you may find bugs without writing tests using PHPStan. At least, that is what they claim on their website. I took a relatively big PHP project I run commercially to see whether or not PHPStan would help me to find and fix bugs. In this post I will explain how this works. Adding PHPStan config file You need to add a “phpstan.neon” configuration file to the root of your project. Mine looks like this: ...

November 15, 2022 · Maurits van der Schee

MintyPHP v3 is released

I use MintyPHP to quickly build web applications on the LAMP stack and I just released version 3 this month. Since v3 it relies solely on the composer generated autoloader, making the software faster and making it integrate even better with your IDE. Now the IDE can detect missing dependencies and can autocomplete the PHPunit tests. Also, since version 3 the config format has changed, allowing easier use of environment variables (via getenv) in the config files. ...

October 30, 2022 · Maurits van der Schee

Beelink "MINI S" N5095 under 200

I want my computers to be small, silent and repairable and use as little energy as needed, especially when idle. I recently bought a Beelink “MINI S” N5095/16GB/256GB computer with slots for both the DDR4 RAM and the M2 SATA drive. It has an external power supply and medium sized fan on a proper heat-sink. It can easily be used as a desktop replacement as it has a power efficient CPU, plenty of RAM and a fast SSD. The slot supports up to 16GB RAM and a 2TB M2 SATA SSD. Prices vary wildly (on AliExpress and Amazon) and if you search well you may find the 16GB/512GB model for less than 200 euro. ...

October 13, 2022 · Maurits van der Schee

Overengineering makes investors happy

Investors want tech startups to use a “latest technology” to gain an “unfair advantage” allowing them to compete in an established market. This “unfair advantage” may be a reason that the investment is going to pay off. therefore startups may say that they are using (for instance) blockchain, AI and distributed systems and that it brings them a lot. The real reason startups can compete with established players is that they are small and efficient with a clear focus on what to build and no customers that slow them down. These things are also called “second-mover” advantages. But in my experience few startups dare to say they are using second mover advantages and are planning to win with better marketing and sales. ...

September 18, 2022 · Maurits van der Schee

Getting started with Font Awesome 6

When you want to integrate the free Font Awesome icons in your application or website you are asked to “Enter your email to get started with a free Kit!” (source). It was always possible to just copy a single line in the head of your HTML. Fortunately this is still possible, this post will explain how. It will also show where to download the distribution for self hosting Font Awesome in your web site or web application. ...

September 17, 2022 · Maurits van der Schee

Web development in Visual Basic .NET 6

In 2015 I was working on a Simple web framework for .NET. Back then I wanted to create an MVC framework that would allow me to run .NET web applications on Linux. Last year I ported the code .NET 5 (cross-platform now) and today I updated the code to support .NET 6. In this post I will show how to write a Visual Basic web application. Install .NET 6 on Ubuntu 22.04 If you are not on Windows and cannot install Visual Studio Community Edition 2022 then these instructions may be welcome to you. On Ubuntu 22.04 you need to execute: ...

August 24, 2022 · Maurits van der Schee