Programming Leftovers
-
Clever Code Considered Harmful
There is something undeniably satisfying about coming up with clever solutions to hard problems. There is a joy when you challenge yourself to use recursion instead of iteration, for example, or when you create elegant, cascading layers of abstraction that ensure code is never duplicated.
My favourite outlet for this kind of programming is Project Euler.
Project Euler is a repository of challenges based around advanced mathematics, meant to be solved with software. The catch is that your program should run in under a minute, on 2004-era hardware. That means that a brute-force solution often won’t cut it, and you’ll have to come up with a smarter solution.
-
Stop saying “technical debt”
We were supposed to release this feature three weeks ago.
One developer got caught in a framework update. Another got stuck reorganizing the feature flags. A third needed to spelunk a long-abandoned repository to initiate the database changes. The team is underwater. Every feature release will feel like this until we get a few weeks to dig ourselves out of tech debt. We have no idea how to even get the business to consider that.
Does this sound familiar? It’s a disheartening conversation.
-
2023-03-03 Niko Matsakis: Trait transformers (send bounds, part 3)
-
Oxidizing bmap-tools: rewriting a Python project in Rust
Rewriting bmaptool in Rust to remove Python dependencies, create statically linked binary, and allow the bmap sparse file format to be used in other Rust projects.
-
Y2038, glibc and utmp/utmpx on 64bit architectures
On January, 19th 2038 at 03:14:07 UTC the 32bit time_t counter will overflow. For more information about this I suggest to start with the wikipedia Year 2038 problem article. That problem is long known and several groups are working on a solution for 32bit systems, but many people don’t know that pure 64bit systems could be affected, too.
The general statement so far has always been that on 64bit systems with a 64bit time_t you are safe with respect to the Y2038 problem.
-
2023-03-03 Kukuk: Y2038, glibc and utmp/utmpx on 64bit architectures
-
2023-03-04 CAP Theorem & UI Programming
-
[Old/undated] SymPy makes math fun again
I remember my own struggle with calculus at university. Limits, integrals, differential equations. Lots of practice, lots of homework. Pages and pages of exercises. I loved math, loved the connection between algebra and geometry, loved the very pleasure of solving problems by making different concepts work together. But I hated doing the “paperwork”.
Taking it seriously, I still studied through the semester, studied harder the week before the exam, studied even harder the night before. I got 62/100. That's 1 point above the lowest possible passing grade.
Well, maybe math is not for everyone. But wait a minute! The next semester I took part in the Math Olympiad, went through the faculty round, then through the university round, went to the nationals, and even managed to score a few points there. Which counted as a pass on that semester's exam.
-
Python packaging targets
As we have seen in earlier articles, the packaging landscape for Python is fragmented and complex, though users of the language have been clamoring for some kind of unification for a decade or more at this point. The developers behind pip and other packaging tools would like to find a way to satisfy this wish from Python-language users and developers, thus they have been discussing possible solutions with increasing urgency, it seems, of late. In order to do that, though, it is important to understand what specific items—and types of Python users—to target.
-
What’s new for QML Modules in 6.5
While QML modules have existed for a long time, their use had been rather sparse before Qt 6. With the introduction of
qt_add_qml_module
in Qt 6, they have however become much more prevalent. And with good reason: Only by placing all related QML in a module can tooling like qmllint or the Qt Quick Compilers work correctly. -
JUCE x Qt
Qt is used across many different industries, including the world of audio and music production software. As someone who occasionally dabbles in music production, I've always been motivated to keep Qt on the map for these use-cases, and to improve things where we can. To that end, during our latest company hackathon, I decided to explore the world of audio plugins.
-
How to make Java 8 Code Compatible With Java 11
If you still run your Java code with JVM 8, it's probably high time to move on and starting using a newer JVM version such as 11. For this reasons, you have to ensure your Java code is Java 11 compatible.
-
What is Boilerplate Code and How to Reduce It In Java
In programming, boilerplate refers to sections of code that are repeated in many places throughout a project or across multiple projects.
-
Popular Code Analysis Tools to Help with Java Programming
Code analysis tools are software tools that analyze source code for potential issues, errors, and vulnerabilities.
-
Difference between Mockito’s when/thenReturn and doReturn/when
A common dilemma while writing unit tests in Java is whether to use Mockito's when/thenReturn or doReturn/when stubbings. Both when/thenReturn and doReturn/when are used in Mockito, a popular Java testing framework, to mock behavior of methods in an object.