#defensiveprogramming — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #defensiveprogramming, aggregated by home.social.
-
Good advice from the 'bind_cols' documentation: "Where possible prefer using a join to combine multiple data frames. bind_cols() binds the rows in order in which they appear so it is easy to create meaningless results without realising it." #RStats #DefensiveProgramming
-
#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.
-
#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.
-
#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.
-
#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.
-
Patterns for Defensive Programming in Rust
https://corrode.dev/blog/defensive-programming/
#HackerNews #DefensiveProgramming #Rust #Patterns #Coding #BestPractices #SoftwareDevelopment
-
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.
-
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 -
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.
-
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.