#FootGun

2025-12-17

Python Path is great. Until it isn't.

Don't try this at home.

remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")

The result is disastrous, as it it is:

ssh homeserver rm -rf /*

Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.

It should have been remotePath / "*" or, even saner, just remotePath.

#python #footgun

wowiamreallyamazed🍉️wowiamreallyamazed
2025-12-13

Zig needs to add a hard copiler error for using spaces for indentation instead of tabs, because it is a to use a non-flexible indentation, and also for writing too many comments in one place because if you can't read the code to understand, you already have too many , and you are a bad programmer, and you have to stop programming, as we have stated in zig zen "Focus on code rather than style.
", this is not about style.

2025-10-22

I love variadic template arguments until ... #footgun. #cpp #metaprogramming

2025-10-21

I love template #metaprogramming in #C++ but am constantly afraid of #footgun.

Mathias ❄️🐺🐶 :pansexual_flag:mathias@pawb.fun
2025-10-20

Gee I wonder what could have lead to this #AWSoutage...

#RTO #braindrain #footgun

Screenshot of Fortune article dated October 18, 2024, showing that the CEO of Amazon Web Services "bluntly told colleagues that if they don't like the controversial [forced return to office] policy, they should leave".

The clean energy sector grew at a rate three times that of China’s economy overall, according to the report." That could have been, should have been, and won't be America's story. #CleanEnergy #China #FootGun https://www.nytimes.com/2025/09/08/climate/china-clean-energy-fossil-fuel-research.html

2025-09-10

"Investment and production in clean energy last year contributed nearly $2 trillion to China’s economy, a figure which the report said was around one-tenth of the country’s economy as a whole, or comparable to Australia’s entire economy. The clean energy sector grew at a rate three times that of China’s economy overall, according to the report."

That could have been, should have been, and won't be America's story.

#CleanEnergy #China #FootGun

nytimes.com/2025/09/08/climate

Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?

cnn.com/2025/08/06/tech/apple-

100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.

Where's that Trump-pissing-into-a-fan meme when you need it...

#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU

2025-06-25

TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (jerf.org/iri/post/2957/ argues this and has details).

But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.

This can make:

if (x != nil) { x.Foo() }

cause a segfault (inside Foo) because it gets called with a nil pointer (full code: go.dev/play/p/2SeoJj2Go_l)

Anyone know the rationale behind this #footgun?

2025-06-05

TIL In Jinja2 with autoescaping, `{{ unsafe_value }}` is the expected way to deal with potential XSS, but if you use the i18n extension, `{{ _(unsafe_value) }}` is a potential XSS, because the hooks mark the result of translation as clean.

This is dangerous code that looks right.

`{{ _(unsafe_value)|e }}` doesn't work, but `{{ _(unsafe_value|e) }}` does.

#footgun

2025-05-29

@SherBeareth

No-one checked with MS Legal team first.

That's going to backfire, as MS will lose it's Common Carrier Protection's, and become financially liable for all of the spam and hate-speech that is sent.

#spam #censorship #footgun

2025-05-29

And today, while peeling the #disaster #recovery onion, I found that I had a mild case of self-inflicted #footgun that went unnoticed for months because I didn’t read a certain bit of vendor documentation that I didn’t know about until today because of a link in another vendor’s documentation.

The fix is not difficult. Many (two? three?) new stories are about to spawn as a result of this discovery.

#hindsightis2020

Dave Lane :flag_tino: 🇳🇿lightweight@mastodon.nzoss.nz
2025-01-09

Wow. The US has apparently 'blacklisted' CATL, the world's largest battery manufacturer... because they're Chinese-owned.
yewtu.be/watch?v=mK9AIodJqSs or
youtube.com/watch?v=mK9AIodJqS

#FootGun #DownwardSlide #EndOfEmpire

Mel 🏳️‍⚧️ 💛🤍💜🖤 🐀meldrop@mas.to
2024-10-24

Wait. It's *implementation-defined* whether 'char' is signed or unsigned?!

C truly is the gift that keeps on giving.

#footgun #c #programming #programminglanguages

Taffer 🇨🇦:godot:Taffer@mastodon.gamedev.place
2024-10-17

D'oh, I just typo'd an "rsync" command and wiped a 2+TB backup instead of updating part of it.

🤦‍♂️

At least I didn't nuke the original disk!

Guess I know what my laptop is going to be up to for the next 6 or so hours. Sigh.

#doh #rsync #footgun

Sybren Stüvel 🧡🤍sybren@mastodon.art
2024-09-30

Pretty please with sugar on top, never, ever do this in Python.

Don't use a bare `except:` (it catches more than you may think), and especially never use it to silence errors. This makes bug hunting super, super hard. Instead, catch only those exceptions that you _know_ will be raised, and let the rest bubble up.

#Python #FootGun

Screenshot of Python code, with `try: ... except: pass` to silently ignore any exception that might be thrown.
2024-08-21

oopsie, I forgot to account for the fact that uppercase and lowercase letters are on completely different ranges of ASCII values when doing raw string comparisons 🤦‍♀️
go.dev/play/p/loDcqejLM9T
#footgun #programming #golang

2024-08-01

omg I spent a stupid amount of time debugging this

```go
switch val {
case 'option1':
// code
default:
if s1, ok1 := ...; ok1 {
if s2, ok2 := ...; ok2 {
if s3, ok3 := ...; ok3 {
// code

break // LOL THIS BREAKS THE SWITCH
}
}
}

// code which I was wondering why this wasn't running
}
```

my brain lost the fact that it was an `if` statement instead of a `for` loop because it was nested so deep 🙈

#golang #footgun

me·ta·phil, dermetaphil@chaos.social
2024-05-25

Important #ArchLinux PSA:
Don't drink and pacman. 🐧🪦 #footgun

Chris Combs (he/him)combs@mastodon.art
2024-05-09

my boo just pointed out--isn't the whole thing with Section 230 that the platforms claim no ownership over user-generated content?

but Stack is claiming that THEY own the content, not the users who contributed it. You're not allowed to delete or edit your own content to prevent their genai bs.

So does this mean Stack has become liable for its veracity, libelousness, etc..? Nice one if so :-P

#stackoverflow #enshittification #ugc #footgun

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst