#TodayILearned #TIL ... that you can use combining accents on the # of a #hashtag! For example #̧Cedilla. Why? Because someone, in a heroic feat of #DefensiveProgramming, thought "I bet some #weirdos will do that, I'd better deal with it sensibly". Why would weirdos like me do that? Because we're weirdos!

Also, you can pile them on top of each other! Therefore the official hashtag of #Zalgo is not #Zalgo, it is #̶̧̼͖̖̦͍͉̝̗͐̈́̏͜Zalgo.

#Unicode

Patterns for Defensive Programming in Rust | corrode Rust Consulting

I have a hobby. Whenever I see the comment // this should never happen in code, I try to find out the exact conditions under which it could happen. And in 90% of cases, I find a way to do just that. More often than not…

Corrode Rust Consulting

Working at #InternetArchive is helping my #DefensiveProgramming a lot. Situations like poweroutages, hard-drive failures, network congestion errors, etc that are once in a lifetime in other environments are encountered regularly for our code.

In that regard, the code reviews at the Core Infrastructure Engineering are highlighting the depth of problems that need to be tackled in our environment.

Il mio collega del team di security ma soprattutto amico Paolo Perego ha scritto un bel post 💚

Programmazione Difensiva: Chiudere la Finestra su una Race Condition Critica

https://codiceinsicuro.it/blog/programmazione-difensiva-chiudere-la-finestra-su-una-race-condition-critica/

#DefensiveProgramming #Security #openSUSE

Programmazione Difensiva: Chiudere la Finestra su una Race Condition Critica

La programmazione difensiva è una filosofia di sviluppo che si basa su un principio semplice ma fondamentale: scrivere codice che sia robusto e sicuro anche quando opera in condizioni impreviste o in un ambiente potenzialmente ostile. Invece di fidarsi che tutto sia configurato perfettamente, il codice prende la responsabilità della propria sicurezza.

Codice Insicuro, blog di Cyber Security, sviluppo sicuro, code review e altro.
A large chunk of client JS code is just this over and over and over again. In case *I* removed a necessary element when *I* wasn't watching. 🤦‍♂️
```
const x = document.getElementById("X");
if (!x) {
console.error("X element not found.");
   return;
}
//later
alert("Check console.");
```
#technology #programming #JavaScript #defensiveProgramming
5 Reasons I Distrust Coding Tests - Doug Wilson - Medium

“OK, we’d like to move forward in the interview process by inviting you to take an online coding test!”, wrote the hiring manager. Which got me thinking ...

Medium

Weekly Dev Chat 2024-10-22: Winterizing Your Codebase: Preparing for Stormy Weather

https://weeklydevchat.com/2024-10-22-winterizing-your-codebase-preparing-for-stormy-weather/

Everyone and anyone is welcome to join as long as you are kind, supportive, and respectful of others.

#weeklydevchat #resilientsoftware #defensiveprogramming

2024-10-22: Winterizing Your Codebase: Preparing for Stormy Weather – Weekly Dev Chat

Write More Robust Code: Sub-ranges in Object Pascal

Want to write better, bug-free Object Pascal code? Dive into defensive programming with sub-range types to make your code stronger and less prone to errors. We'll break down how to set up sub-ranges, explain why they're awesome, and give you real-world examples to improve your code.

References -
https://wiki.freepascal.org/subrange_types

https://youtu.be/jTnhu6NzNLw

#objectpascal #defensiveprogramming #subranges #programming

subrange types - Free Pascal wiki

I set up my Python code to make sure that (a) we're in a clean git state and (b) we haven't already run an experiment with the same ID number.

This has saved my bacon more than once, preventing either wasting days of computation or overwriting hard-won data.

#python #DefensiveProgramming #git

Defensive driving on American highways is when you assume that everyone wizzing past you at 30 above posted is out to do you in, so you use more-than-warranted caution.

Likewise, in #IT, #DefensiveProgramming is when you assume that every piece code—functions your team wrote, libraries and frameworks that were foisted upon you, all of them—are out to get you.

And like defensive driving, defensive programming turns a freeing, joyous activity, namely programming, into a paranoid schizophrenic #disorder.