Programming Leftovers
-
Sean Goedecke ☛ Mistakes engineers make in large established codebases
Working in large established codebases is one of the hardest things to learn as a software engineer. You can’t practice it beforehand (no, open source does not give you the same experience). Personal projects can never teach you how to do it, because they’re necessarily small and from-scratch. For the record, when I say “large established codebases”, I mean: [...]
-
Murtuzaali Surti ☛ 3 Steps To Think Like A Developer
If someone were to ask me, what does a software engineer do on a basic level and what makes a good software engineer? I would say, problem solving. Yes, it’s the most basic and the most important skill to have as a software developer/engineer, yet most people don’t think about it before getting into software.
But, it’s not that hard. In this post, I will list down three steps to better approach the problem given at hand, find the solution, and then improve upon it.
-
Rlang ☛ Some of the more useful Tidyverse functions
Tidyverse has long been an amazing collection of R packages, primarily for data engineering and data science. Common among these packages is the same language grammar, great design and structure, making data science easier.
-
MaskRay ☛ Skipping boring functions in debuggers
In debuggers, stepping into a function with arguments that involve function calls may step into the nested function calls, even if they are simple and uninteresting, such as those found in the C++ STL.
-
Sandor Dargo ☛ C++26: user-generated static_assert messages | Sandor Dargo's Blog
Our first quest into the world of C++26 was about =delete with an optional error message, which improves the readability of the source code and potentially the error messages. In this next part of our journey, we will continue to focus on readability improvements, particularly those for error messages.
With C++26 and the acceptance of P2741R3, we are getting better error messages for static_assert. Compile time assertions were introduced in C++11 with a mandatory message. Since C++17, the message is only optional. And with C++26, static_assert evolves further and the message can be a constant expression instead of an unevaluated string. In other words, it can have some dynamic elements.
This was not the first attempt to make such a feature part of C++, but back in 2014, when something similar was proposed, C++ didn’t have enough compile-time programming capabilities to make this easily implementable.
-
Sean Conner ☛ A preference for deterministic tools over probabilistic tools
Last month, I added code to my assembler to output BASIC code instead of binary to make it easier to use assembly subroutines from BASIC. But I've been working on a rather large program that assembles to nearly 2K of object code, and it takes a bit of time to POKE all that data into memory.
-
Groot Koerkamp ☛ Static search trees: 40x faster than binary search
In this post, we will implement a static search tree (S+ tree) for high-throughput searching of sorted data, as introduced on Algorithmica. We’ll mostly take the code presented there as a starting point, and optimize it to its limits. For a large part, I’m simply taking the ‘future work’ ideas of that post and implementing them. And then there will be a bunch of looking at assembly code to shave off all the instructions we can. Lastly, there will be one big addition to optimize throughput: batching.
-
Perl / Raku
-
Arne Sommer ☛ Zero Step with Raku
You are given an array of binary strings, @str, and two integers, $x and $y.
Write a script to return the size of the largest subset of @str such that there are at most $x 0’s and $y 1’s in the subset.
-
-
Python
-
Hackaday ☛ 2024 Brought Even More Customization To Boxes.py
If you have access to a laser cutter, we sincerely hope you’re aware of boxes.py. As the name implies, it started life as a Python tool for generating parametric boxes that could be assembled from laser-cut material, but has since become an invaluable online resource for all sorts of laser projects. Plus, you can still use it for making boxes.
-