Programming Leftovers
-
Rlang ☛ The Sanctuary: Stats and data from {survivoR}
I wanted a space to throw all my tables and charts made using the {survivoR} R package […]
-
Qt ☛ Qt for Android Automotive 6.5.6 is released
The latest patch release for Android Automotive 6.5.6 is just released. This release is based on Qt LTS 6.5.6 with 280 bug fixes, security updates, and other improvements.
-
Idiomdrottning ☛ Coding for yourself is OK
I also… I think “programming for the household” is actually awesome. Automating our own lives, autonomously, not squeezing our lives into someone else’s automation.
-
Carl Svensson ☛ Stupid Slow
There's recently been some discussion about why computers feel slow today. Discussions like these return with regular intervals. Sometimes the focus is on bloat and resource glut, sometimes on the fact that despite ample hardware resources, software still runs slowly. The discussion has been going on for a while. One of its most famous installments is Niklaus Wirth's A Plea for Lean Software.
I agree with most of the critique and could easily write a very long and very bitter essay about the state of modern software. But I also think that abstraction is both too useful and too profitable to go away anytime soon. The key is balance, but balance is problematic in itself, because it isn't an absolute. One person's necessity is another person's bloat.
-
[Old] Daniel J. Bernstein, ☛ A Plea for Lean Software [PDF]
[...] With a touch of humor, the following two laws reflect the state of the art software admirably well:
• Software expands to fill the available memory (Parkinson)
• Software is getting slower more rapidly than hardwre becomes faster. (Reiser)
-
[Old] Nikita Prokopov ☛ Software disenchantment
Only in software, it’s fine if a program runs at 1% or even 0.01% of the possible performance. Everybody just seems to be ok with it. People are often even proud about how inefficient it is, as in “why should we worry, computers are fast enough”:
-
Rlang ☛ R One Billion Row Challenge: Is R Viable Option for Analyzing Huge Datasets?
R, being single-threaded in nature, isn’t the fastest programming language out there. You have options when it comes to parallelism, but these often don’t reduce the runtime as much as you’d want.
So when the official 1 Billion Row Challenge popped up, our interest went through the roof! The challenge doesn’t allow for third-party packages. We’ll start the article by obeying the rules, but later, we’ll see what sort of performance benefits DataTable and DuckDB offer. For reference, the fastest Java implementation takes 1.535 seconds, and pure Python is around 10-15 times slower than that.
-
Python
-
Modus Create LLC ☛ Safe composable Python
Writing modular code is a challenge any large project faces, and that stands even more true for Python monoliths. Python’s versatility is convenient, yet a very big gun to shoot one’s foot with. If there’s one thing I’ve learnt over the years of building software, it’s the importance of testing to mitigate risks and allow refactoring in the long run.
In my experience however, I’ve seen much less testing in projects than I would’ve liked. If it can be rarely attributed to plain malevolence or stupidity, the most recurrent reason is: it is hard and it takes too much time. The issue is, it’s often true!
So how can we lower the barrier to make testing easier?
-
James G ☛ Python pattern: Ordered list of lambda functions
For these ordered checks, I like to use an ordered list of lambda functions. Lambda functions defer execution until they are called, which means you can have a list of functions and run them in order, without running all functions. You can accomplish the same behaviour of performing multiple checks with a series of if statements, but such code can get verbose quickly, particularly if you need to perform a dozen or more checks.
-
-
Shell/Bash/Zsh/Ksh
-
Clayton Errington ☛ Bookmarks in Bash
Yes, zsh, ohmyzsh, and others have command prediction and auto completion, but there is something that it’s missing, and something like a static bookmarks prcocess like this works better for me in some cases.
I created bookmarks.sh in my ~/.local/bin and got to work. I recreated the logic and process that aligns with how bookmarks for PowerShell operates. Keeping the same aliases or function names is great for my muscle memory while typing.
-
-
Java
-
Frank Delporte ☛ JFX In Action with Pedro Duque Vieira, aka Duke
People who follow me, know I have a big love for JavaFX. It’s my go-to for every desktop user interface application I build. I love the simplicity of quickly creating an app that makes full use of the “Java powers” to build both multi-threaded “backend services” combined with a beautiful-looking UI into one executable. I’m starting a new video series “JFX In Action” in which I talk to developers to show the world what is being developed with JavaFX.
-
-
Education
-
Robert Haas ☛ 2024.pgconf.dev and Growing the Community
I think 2024.pgconf.dev was a great event. I am really grateful to the organizing team for all the work that they did to put this event together, and I think they did a great job. I feel that it was really productive for me and for the PostgreSQL development community as a whole. Like most things in life, it was not perfect. But it was really good, and I'm looking forward to going back next year. It was also a blast to see Professor Margo Seltzer again; I worked for her as a research assistant many years ago. She gave a wonderful keynote.
-