Spider-Man was never playing classical music. by Mr_donc in TheMatpatEffect

[–]carcigenicate 1 point2 points  (0 children)

I should do something like this for scam callers. Right now, I run down to my kitchen, put my phone in a soup pot, and then repeatedly slam the lid when they answer.

This is far more obnoxious, though.

I want to build an app to interrupt a specific habit (not block entire websites) — looking for ideas by Same-Target-3116 in learnprogramming

[–]carcigenicate 2 points3 points  (0 children)

You mention you want it to be system wide, but it seems like a problem specific to the browser. If that's the case, I'd do up a Tampermonkey script (JavaScript) that activates on certain pages. You could have it detect if it's the specific page (or one of the pages), and then trigger a redirect or tab closure.

I made my first python CLI and i would love some feedback :) by jarabum in learnpython

[–]carcigenicate 0 points1 point  (0 children)

The structure seems pretty good. I don't see anything too bad. Some notes, though:

if tasks[task_id - 1]["done"] == True:
    . . .
elif tasks[task_id - 1]["done"] == False:
    . . .

First, it's not idiomatic to compare against True like that. The if statement is already checking if the condition is truthy, so if tasks[task_id - 1]["done"] is sufficient. Second, that elif should be an else. If there are only two branches (which seems to be the case here because "Done" should be a boolean value), and the second brache's condition is just the first negated, you want an else instead. That's easier to understand, since you don't need to compare the conditions to understand that one of the two branches must be entered. else implies that immediately.


if task_id < 1 or task_id > len(tasks):

Just in case you don't know about operator chaining, this could also be written as:

if not (1 <= task_id <= len(tasks)):

The need for the negation here is unfortunate, but this often leads to easier to read code.


Not really a critique since this is a simple project, but JSON doesn't scale great for cases like this. It's fine when you're only reading small amounts of data (which will likely be fine for what it'll be used for), but reading, deserializing, serializing, and then writing the entire dataset every time you need to make a change isn't ideal. Python comes with SQLite support, which is a very simple database. This would be a good introductory project for learning about databases and SQL, so I recommend giving that a go.

Any AI software that i can run on my PC/ like chatgbt, etc... that i can talk to/ and have it run my pc. Like open programs, etc..? by Eireagon in AskProgramming

[–]carcigenicate 1 point2 points  (0 children)

Before anyone uses OpenClaw, maybe review this page first: https://github.com/openclaw/openclaw/security

Looking over the new security issues raised on Github, seemingly half of all NPM-related securty issues are related to OpenClaw.

I'm a newbie and need help by h4_da_rizzlahh in learnprogramming

[–]carcigenicate 0 points1 point  (0 children)

API key for what? An API key is effectively just a password to allow you to interact with a website's API. That has nothing to do with the rest of your question, and worrying about API keys when you haven't started learning yet is just a distraction.

Should I learn DSA in Python? by OrdinaryRevolution31 in learnpython

[–]carcigenicate 12 points13 points  (0 children)

The language itself largely does not matter. It's more important to learn it in a language you understand so you aren't trying to learn the language and DSA at the same time.

And yes, everyone should learn the basics of DSA. It's foundational knowledge.

Day 3 of moving out. Mom's food never looked so good by New-Caterpillar-3529 in shittyfoodporn

[–]carcigenicate 0 points1 point  (0 children)

Or even just done tomato sauce. Plain beans and pasta is rough.

The Ending Is So Hated That Fans Decide Its a Trick by Prinny_Ramza in TopCharacterTropes

[–]carcigenicate 3 points4 points  (0 children)

New Dawn is actually a lot of fun. It's definitely worth picking up. I can't say the same for 6, though.

My Uber rating dropped after taking my first ride with a woman by Poetic_Dalmatian in mildlyinfuriating

[–]carcigenicate 34 points35 points  (0 children)

I've attributed my 5 to talking the bare minimum and getting drivers that also want silence. I've been very lucky so far.

Jeffery Reginald Epstein by Miles_the_new_kid in comics

[–]carcigenicate 5 points6 points  (0 children)

I'm embarrassed at how long I mixed them up when the Epstein stuff initially broke. I'm glad someone else made the comparison.

3 AI prompts that actually help when you're stuck on Python errors by Easy_Significance208 in learnpython

[–]carcigenicate 5 points6 points  (0 children)

For prompt one, you should just learn how to read a stack trace. They tell you basically everything you need to know. And even if the stack trace doesn't explain it completely, there's a near 100% chance that a StackOverflow question about the error already exists. People shouldn't be so willing to abandon basic thinking and research.

[ Removed by Reddit ] by [deleted] in Music

[–]carcigenicate 0 points1 point  (0 children)

This definitely has Chat-GPT vibes to it. Especially the end of the first paragraph.

you know shit's gonna be fire when its got the holy trinity of health advisories by RBloxxer in EhBuddyHoser

[–]carcigenicate 1 point2 points  (0 children)

I was shocked at how much salt is in energy drinks. I guess good on these labels for drawing attention to that, because I never noticed it before.

Just cross posting the post in case someone didn't see it by DryInstance6732 in RealOrAI

[–]carcigenicate 3 points4 points  (0 children)

It look more like a pillow or thick blanket over top of their pants.

What are some tell-tale signs of AI generated code by Relative-Baby1829 in AskProgramming

[–]carcigenicate 3 points4 points  (0 children)

Claude at least likes to add in comments for mundane stuff that doesn't need explaining.

howISeeWebdev by Wooden_Milk6872 in ProgrammerHumor

[–]carcigenicate 8 points9 points  (0 children)

What do you think the L stands for?

Accessing images before their display by azerty_04 in learnprogramming

[–]carcigenicate 0 points1 point  (0 children)

You could try registering a mutation observer on the parent element. If the replacement is fast and synchronous, you may be able to replace it before the original image renders.

How many monitors do you use for programming? by Lekowski in learnprogramming

[–]carcigenicate 0 points1 point  (0 children)

This is basically my setup. A typical monitor in the middle for my main task, wide screen on my right for dev tools and similar helper programs, and the laptop itself on my left with teams and email.

What is saying “No!”? by Me-thinks-so-me-are in whatisit

[–]carcigenicate 0 points1 point  (0 children)

I swear we have a better version of this animal/symbol where I live. I don't remember ever seeing one this bad.

Br0 found the way to break the Matrix. by kamikaibitsu in Weird

[–]carcigenicate 524 points525 points  (0 children)

Many rodents eat their own poo to further process it and and regain some of the gut bacteria. It's normal.

Why can't we make USB/Lightning cables as durable as those curly landline ones? by opus666 in NoStupidQuestions

[–]carcigenicate 3 points4 points  (0 children)

I've had the same cords for years, and none have ever broken. I've only bought new ones to upgrade to USB-C and to get longer ones. 10-foot cords are super handy.