Saw this on Mastodon:
https://racingbunny.com/@mookie/114718466149264471
18 rules of Software Engineering
- You will regret complexity when on-call
- Stop falling in love with your own code
- Everything is a trade-off. Thereâs no âbestâ 3. Every line of code you write is a liability 4. Document your decisions and designs
- Everyone hates code they didnât write
- Donât use unnecessary dependencies
- Coding standards prevent arguments
- Write meaningful commit messages
- Donât ever stop learning new things
- Code reviews spread knowledge
- Always build for maintainability
- Ask for help when youâre stuck
- Fix root causes, not symptoms
- Software is never completed
- Estimates are not promises
- Ship early, iterate often
- Keep. It. Simple.
Solid list, even though 14 is up for debate in my opinion: Software can be completed. You have a use case / problem, you solve that problem, done. Your software is completed now. There might still be bugs and they should be fixed â but this doesnât âaddâ to the program. Donât use âsoftware is never doneâ as an excuse to keep adding and adding stuff to your code.
Okay, hereâs a thing I like about Rust: Returning things as Option and error handling. (Or the more complex Result, but itâs easier to explain with Option.)
fn mydiv(num: f64, denom: f64) -> Option<f64> {
// (Letâs ignore precision issues for a second.)
if denom == 0.0 {
return None;
} else {
return Some(num / denom);
}
}
fn main() {
// Explicit, verbose version:
let num: f64 = 123.0;
let denom: f64 = 456.0;
let wrapped_res = mydiv(num, denom);
if wrapped_res.is_some() {
println!("Unwrapped result: {}", wrapped_res.unwrap());
}
// Shorter version using "if let":
if let Some(res) = mydiv(123.0, 456.0) {
println!("Hereâs a result: {}", res);
}
if let Some(res) = mydiv(123.0, 0.0) {
println!("Huh, we divided by zero? This never happens. {}", res);
}
}
You canât divide by zero, so the function returns an âerrorâ in that case. (Option isnât really used for errors, IIUC, but the basic idea is the same for Result.)
Option is an enum. It can have the value Some or None. In the case of Some, you can attach additional data to the enum. In this case, we are attaching a floating point value.
The caller then has to decide: Is the value None or Some? Did the function succeed or not? If it is Some, the caller can do .unwrap() on this enum to get the inner value (the floating point value). If you do .unwrap() on a None value, the program will panic and die.
The if let version using destructuring is much shorter and, once you got used to it, actually quite nice.
Now the trick is that you must somehow handle these two cases. You must either call something like .unwrap() or do destructuring or something, otherwise you canât access the attached value at all. As I understand it, it is impossible to just completely ignore error cases. And the compiler enforces it.
(In case of Result, the compiler would warn you if you ignore the return value entirely. So something like doing write() and then ignoring the return value would be caught as well.)
We really are bouncing back and forth between flat UIs and beveled UIs. I mean, this is what old X11 programs looked like:
Good luck figuring out which of these UI elements are click-able â unless you examine every pixel on the screen.
@prologic@twtxt.net Iâm trying to call some libc functions (because the Rust stdlib does not have an equivalent for getpeername(), for example, so I donât have a choice), so I have to do some FFI stuff and deal with raw pointers and all that, which is very gnarly in Rust â because youâre not supposed to do this. Things like that are trivial in C or even Assembler, but I have not yet understood what Rust does under the hood. How and when does it allocate or free memory ⊠is the pointer that I get even still valid by the time I do the libc call? Stuff like that.
I hope that I eventually learn this over time ⊠but I get slapped in the face at every step. Itâs very frustrating and Iâm always this đ€ close to giving up (only to try again a year later).
Oh, yeah, yeah, I guess I could âjustâ use some 3rd party library for this. socket2 gets mentioned a lot in this context. But I donât want to. I literally need one getpeername() call during the lifetime of my program, I donât even do the socket(), bind(), listen(), accept() dance, I already have a fully functional file descriptor. Using a library for that is total overkill and Iâd rather do it myself. (And look at the version number: 0.5.10. The library is 6 years old but theyâre still saying: âNah, weâre not 1.0 yet, we reserve the right to make breaking changes with every new release.â So many Rust libs are still unstable âŠ)
⊠and I could go on and on and on ⊠đ€Ł
OpenBSD has the wonderful pledge() and unveil() syscalls:
https://www.youtube.com/watch?v=bXO6nelFt-E
Not only are they super useful (the program itself can drop privileges â like, it can initialize itself, read some files, whatever, and then tell the kernel that it will never do anything like that again; if it does, e.g. by being exploited through a bug, it gets killed by the kernel), but they are also extremely easy to use.
Imagine a server program with a connected socket in file descriptor 0. Before reading any data from the client, the program can do this:
unveil("/var/www/whatever", "r");
unveil(NULL, NULL);
pledge("stdio rpath", NULL);
Done. Itâs now limited to reading files from that directory, communicating with the existing socket, stuff like that. But it cannot ever read any other files or exec() into something else.
I canât wait for the day when we have something like this on Linux. There have been some attempts, but itâs not that easy. And itâs certainly not mainstream, yet.
I need to have a closer look at Linuxâs Landlock soon (âsoonâ), but this is considerably more complicated than pledge()/unveil():
On my blog: Developer Diary, Day of the African Child https://john.colagioia.net/blog/2025/06/16/african-child.html #programming #project #devjournal
So I was using this function in Rust:
https://doc.rust-lang.org/std/path/struct.Path.html#method.display
Note the little 1.0.0 in the top right corner, which means that this function has been âstable since Rust version 1.0.0â. Weâre at 1.87 now, so weâre good.
Then I compiled my program on OpenBSD with Rust 1.86, i.e. just one version behind, but well ahead of 1.0.0.
The compiler said that I was using an unstable library feature.
Turns out, that function internally uses this:
https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.display
And that is only available since Rust 1.87.
How was I supposed to know this? đ€šđ«©
CNCF Kubestronaut Program Momentum Highlights Asiaâs Role in Growing Cloud Native Talent
Upcoming Kubestronaut celebrations in China and Japan to honor global program growth Hong Kong, Chinaâ 10 June, 2025 â The Cloud Native Computing FoundationÂź (CNCFÂź), which builds sustainable ecosystems for cloud native software, today announced continued⊠â Read more
Having some fun with SIRDS this morning.

What you should see: 
And the tutorial I used for my C program: https://www.ime.usp.br/~otuyama/stereogram/basic/index.html
How can one write blazing fast yet useful compilers (for lazy pure functional languages)?
Iâve decided enough is enough and I want to write my own compiler (seems I caught a bug and lobste.rs is definitely not discouraging it). The language I have in mind is a basic (lazy?) statically-typed pure functional programming language with do notation and records (i.e. mostly Haskell-lite).
I have other ideas Iâd like to explore as well, but mainly, I want the compiler to be so fast (w/ optimisations) that ⊠â Read more
$7,500 Bug: Exposing Any HackerOne Userâs Email via Private Program Invite
How One GraphQL Query Turned Private Invites into Public Data Leaks
[Continue reading on InfoSec Write-ups »](https://infosecwrite ⊠â Read more
[ On | No ] syntactic support for error handling - The Go Programming Language
Comments â Read more
On my blog: Developer Diary, International Sex Workersâ Day https://john.colagioia.net/blog/2025/06/02/sex-workers.html #programming #project #devjournal
First ever vintage at new Tasmanian winery
Tasmaniaâs newest winemaking operation has passed its first test, processing its first ever vintage. â Read more
Senior Canadian diplomat compares Trumpâs Golden Dome missile program to a âprotection racketâ â Read more
Part 3: How to Become a Pentester in 2025: Programming & Scripting Foundations for pentester â Read more
plwm: X11 window manager written in Prolog
plwm is a highly customizable X11 dynamic tiling window manager written in Prolog. Main goals of the project are: high code & documentation quality; powerful yet easy customization; covering most common needs of tiling WM users; and to stay small, easy to use and hack on. â« plwm GitHub page Tiling window managers are a dime-a-dozen, but the ones using a unique or uncommon programming language do tend to stand out. â Read more
On my blog: Developer Diary, Memorial Day https://john.colagioia.net/blog/2025/05/26/memorial.html #programming #project #devjournal
For context, this is a funny
Interaction between an engineer and copilot on Microsoftâs core programming Language đ€Łđ€Ż
JubilejnĂœch 280 rokov prĂchodu SlovĂĄkov do Petrovca
BĂĄÄsky Petrovec sa v dĆoch 22. aĆŸ 25. mĂĄja 2025 niesol v slĂĄvnostnej atmosfĂ©re pri prĂleĆŸitosti DnĂ Petrovca a vĂœznamnĂ©ho jubilea â 280. vĂœroÄia prĂchodu SlovĂĄkov do tejto vojvodinskej slovenskej osady. Program bol tradiÄne bohatĂœ a poÄas troch dnĂ ruĆĄno bolo nielen v Miestnom spoloÄenstve, ale aj v Turistickej organizĂĄcii Obce BĂĄÄsky Petrovec, v MĂșzeu vojvodinskĂœch SlovĂĄkov, v Spolku PetrovskĂœch ĆŸien, na NĂĄmestà ⊠â Read more
One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:
- Go:
25keywords (Stack Overflow); CSP-style concurrency (goroutines & channels)
- Python 2:
30keywords (TutorialsPoint); GIL-bound threads & multiprocessing (Wikipedia)
- Python 3:
35keywords (Initial Commit); GIL-bound threads,asyncio& multiprocessing (Wikipedia, DEV Community)
- Java:
50keywords (Stack Overflow); threads +java.util.concurrent(Wikipedia)
- C++:
82keywords (Stack Overflow);std::thread, atomics & futures (en.cppreference.com)
- JavaScript:
38keywords (Stack Overflow); single-threaded event loop &async/await, Web Workers (Wikipedia)
- Ruby:
42keywords (Stack Overflow); GIL-bound threads (MRI), fibers & processes (Wikipedia)
Googleâs âAIâ is convinced Solaris uses systemd
Who doesnât love a bug bounty program? Fix some bugs, get some money â you scratch my back, I pay you for it. The CycloneDX Rust (Cargo) Plugin decided to run one, funded by the Bug Resilience Program run by the Sovereign Tech Fund. That is, until âAIâ killed it. We received almost entirely AI slop reports that are irrelevant to our tool. Itâs a library and most reporters didnât even bother to read the rules or even look at what the intend ⊠â Read more
On my blog: Firefoxâs Tabs https://john.colagioia.net/blog/2025/05/21/firefox-tabs.html #programming #techtips
On my blog: Developer Diary, Malcolm X Day https://john.colagioia.net/blog/2025/05/19/malcolm-x.html #programming #project #devjournal
10 Most Devastating Computer Viruses
Long before computers made their way into workplaces and homes everywhere, people theorized about a destructive kind of program that could replicate itself and spread between networked machines. In the 1980s and early 1990s, those programs became popularly known as âcomputer viruses.â Youâve probably had one at some point. All it takes is one wrong [âŠ]
The post [10 Most Devastating Computer Viruses](https://listverse.com/2025/05/19/10-most-devastating-comput ⊠â Read more
What were the MS-DOS programs that the moricons.dll icons were intended for?
Last time, we looked at the legacy icons in progman.exe. But what about moricons.dll? Hereâs a table of the icons that were present in the original Windows 3.1 moricons.dll file (in file order) and the programs that Windows used the icons for. As with the icons in progman.exe, these icons are mapped from executables according to the information in the APPS.INF file. â« Raymond Chen ⊠â Read more
New Life Hack: Using LLMs to Generate Constraint Solver Programs for Personal Logistics Tasks
Comments â Read more
What Problems are Truly Technical, not Social?
Most âtechâ problems (and solutions) seem social, with e.g. most newer startups relying on internal connections to gain real world adoption, otherwise blocked due to institutional apathy and bad regulations (sms 2fa, hospital faxesâŠ)
A recent (unlocated) poll asked a similar question: âwhat percent of workers in the software industry are employed writing programs that should not exist?â While we do have NP-hard problems, politically hard problems like avoi ⊠â Read more
Rust celebrates ten year anniversary with Rust 1.87.0 release
I generally donât pay attention to the releases of programming languages unless theyâre notable for some reason or another, and I think this one qualifies. Rust is celebrating its ten year anniversary with a brand new release, Rust 1.87.0. This release adds anonymous pipes to the standard library, inline assembly can now jump to labeled blocks in Rust code, and support for the i586 Windows target has been rem ⊠â Read more
Using AI to build a tactical shooter
This video demonstrates a nice mental model of how to structure AI assisted programming for building prototypes (planning stage and implementation stage), how to increase speed by varying the input (audio vs. text), along with different smaller tactics to improve the process.
On my blog: Firefoxâs Local Storage https://john.colagioia.net/blog/2025/05/14/firefox-local-storage.html #programming #techtips
600 per cent fruit fly rise feared as pest program runs out of cash
Kids at a small country school in Victoriaâs fruit bowl watch their iconic fruit fly warning sign come down â just as government funding to fight the pest runs out. â Read more
I have zero mental energy for programming at the moment. đ«€
Iâll try to implement the new hashing stuff in jenny before the âdeadlineâ. But I donât think youâll see any texudus development from me in the near future. âčïž
End of an era: Tropiculture Australia closes down
One of the Northern Territoryâs biggest and most loved commercial nurseries has closed down. â Read more
tar and find were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net Given that all these programs are super old (tar is from the late 1970ies), while trying to retain backwards-compatibilty, Iâm not surprised that the UI isnât too great. đ€
find has quite a few pitfalls, that is very true. At work, we donât even use it anymore in more complex scenarios but write Python scripts instead. find can be fast and efficient, but fewer and fewer people lack the knowledge to use it ⊠The same goes for Shell scripting in general, actually.
On my blog: Developer Diary, International Nurses Day https://john.colagioia.net/blog/2025/05/12/nurses.html #programming #project #devjournal
Hidden HackerOne & Bugcrowd Programs: How to Get Private Invites
âPrivate programs are where the real gold lies⊠but no one tells you how to get there. Let me break it down for youâââwith secrets mostâŠ
[Continue reading on In ⊠â Read more
Fifty years of poppy growing in Tasmania
The push for pharmaceuticals to combat diabetes and weight loss is leading to a revival of the poppy industry in Tasmania. â Read more