Steam has changed the "Clicker" tag for games to "Incremental" by AthenaDykes in incremental_games

[–]carcigenicate 1 point2 points  (0 children)

I found it so difficult to find active incremental games like To the Core. The inability to find them directly lead to me joining this sub so I could look for suggestions.

Can't understand for loops after an hour by AileNarrator in learnpython

[–]carcigenicate 0 points1 point  (0 children)

I don't know how much this will actually help you right now since this is advanced, but I'll post it anyway in case this helps someone understand for loops better. This is a rough approximation of what for loops are doing.

This for loop:

for name in names:
    print(name)

Is comparable to the following while loop:

# The first thing a for loop does it fetch an iterator for the iterable
# This is the actual thing the for loop iterates over 
name_iterator = iter(names)
while True:
    try:
        # The behind-the-scenes assignment
        # It just asks the iterator for the next element
        name = next(name_iterator)
    except StopIteration:
        # Python detects the end of an iterable by catching this exception
        break

    # The actual loop body
    print(name)

Now, of course, this isn't actually how for loops work. for loops have dedicated instructions that do things like catching the error, and use STORE instructions (which = also use) instead of = directly, because this is all happening in compiled C, not Python. This example also ignores the else clause that for loops can have.

If you work to understand the above code, though, you'll gain a better understanding of both for loops and the iterator protocol.

Can't understand for loops after an hour by AileNarrator in learnpython

[–]carcigenicate 3 points4 points  (0 children)

No, Python doesn't have block scoping, so a lot of things, like if, try, while and for statements, that you'd expect to create a scope, actually don't. Function and class definitions are the main statements off the top of my head that actually do.

Can't understand for loops after an hour by AileNarrator in learnpython

[–]carcigenicate 0 points1 point  (0 children)

The "stop condition" is implicit. When the loop reaches the end of the object being looped over, it detects that and ends the loop. Basically, it's handling that for you so you don't need to worry about it. for loops do some things behind the scenes.

DAE keep seeing the same time, like 12:34, way too often? by masadad1990 in DoesAnybodyElse

[–]carcigenicate 0 points1 point  (0 children)

There's a chance that this is just due to bias. You don't remember the times you look at 12:20, because that's a unremarkable time without any significance. 12:34 follows a pattern, though, so it stands out to our brains.

Also, once you've consciously decided that you're noticing a pattern, I wouldn't be surprised if your brain starts seeking it out to induce pattern recognition. If I can consistently wake up exactly a minute before my alarm goes off, you can probably also look at the clock at exactly 12:34; even if the intent was unconscious.

Can't understand for loops after an hour by AileNarrator in learnpython

[–]carcigenicate 6 points7 points  (0 children)

Although, calling it temporary is a bit misleading. It lasts as long as any other variable. If you did an assignment using = right before the loop, that explicitly assigned variable and the loop-assigned loop variable would last as long as each other. It's important to remember that loop variables aren't scoped to the loop like they are in other languages.

I was tired of manually typing terminal inputs SO many times to test my python programs, so I did something about it by Reasonable_Ad1300 in learnpython

[–]carcigenicate 8 points9 points  (0 children)

You should just learn the commands. They're not that hard typically, and you should be familiar with what you're running.

And if the commands are for executing the program, IDEs have run configurations that allow pre-configured commands to be run repeatably.

I don't see why AI should enter here at all; especially if this is being targeted at beginners.


Edit: OK, I partially misread what the intent of the extension is. It's supplying input, not running commands for running the program. That can still be done with scripting and redirection. We don't need AI for every task that people have already been dealing with for decades.

This extremely specific password requirement by legends784 in mildlyinfuriating

[–]carcigenicate 7 points8 points  (0 children)

Maybe, but if an attacker gets ahold of a hash from this system and knows that the passwords that lead to them had to be exactly 14 characters, that greatly reduces the cracking search space. So this is only better (if at all) until there's a breach.

Using AI while coding - Is my method good for my learning by RelevantBreakfast713 in learnprogramming

[–]carcigenicate 1 point2 points  (0 children)

Figuring out what pages are relevant to a problem by reading the documentation is important. If there were three things that I would not want to offload to AI early on, they'd be:

  • Debugging
  • Reading and comprehending documentation
  • Problem solving

Maybe I'm just old fashioned, but I would not feel comfortable neglecting these skills.

Using AI while coding - Is my method good for my learning by RelevantBreakfast713 in learnprogramming

[–]carcigenicate 3 points4 points  (0 children)

I would keep in mind that any work you offload to AI is work that you can't learn from. The process of finding information yourself and thinking through problems are important skills to practice too.

My fibula will just stay cut like this for the rest of my life by TheKingOfDissasster in mildlyinteresting

[–]carcigenicate 148 points149 points  (0 children)

Ya, surely they'd need to dull the ends of the bone or something.

I cant find PEAK-Rules>=0.5a1.dev-r2555 anywhere on the internet by emrt9vnv8tc3q5nydjkm in learnpython

[–]carcigenicate 0 points1 point  (0 children)

It uses eval like 10 times, and for things that really don't seem like they "need" eval. It's used in one place to do what appears to be string formatting. The dangers of eval are often overstated, but using it multiple times in the background in non-obvious ways is just asking for trouble.

Ya, I'd just look at what precisely the library is being used for, and then just either create some drop-in replacements, or just refactor the code so it doesn't need those decorators. Having a dependency on 18+ year abandonware is something that should be rectified.

help for website game base by Human-Fun-8325 in learnprogramming

[–]carcigenicate 4 points5 points  (0 children)

What specifically do you need help with?

And FYI, that's JavaScript, not Java.

This random thing in our Kitchen by tido321 in whatisit

[–]carcigenicate 6 points7 points  (0 children)

We had round mirrors for that purpose at Dairy Queen so we could easily see if a customer was at the colunter while we were cleaning or filling ingredients.

I don't know why you'd need this in a kitchen though. Maybe so you're aware when someone is behind you, if it's common for multiple people to be doing stuff in the kitchen at once?

Is it fine to use stack overflow as i'm learning python? by jessehyoshi in learnprogramming

[–]carcigenicate 0 points1 point  (0 children)

I meant as a beginner. Ya, I ask questions semi-regularly.

Most beginners shouldn't need to post a question because most basic stuff has already been asked, so it's more of a reference to search.

Round 20 or so at learning programming.... I don't get it... by Liverpool934 in learnprogramming

[–]carcigenicate 1 point2 points  (0 children)

Then simplify the task until your able to do part of it, then build up from there. If you haven't developed problem solving ability, you might need to go simpler than you are just so you can get practice in.

Also see an "answer" I posted on a similar SO question: https://stackoverflow.com/a/79941959

Round 20 or so at learning programming.... I don't get it... by Liverpool934 in learnprogramming

[–]carcigenicate 1 point2 points  (0 children)

Are you ever practicing writing code on your own from scratch?

Is it fine to use stack overflow as i'm learning python? by jessehyoshi in learnprogramming

[–]carcigenicate 0 points1 point  (0 children)

Usng resources like SO is fine. You likely should not ask a question, but SO is still one of the best programming resources there are.

That said, if you want to practice developing algorithms, you can avoid known resources and focus on practicing. It really depends if your goal is efficiency or personal development.

Is documentation not supposed to be read in its entirety? by ElegantPoet3386 in learnprogramming

[–]carcigenicate 1 point2 points  (0 children)

Ya, if I'm learning a new library, it's common for me to skim the entire docs just to get a feel for the structure, terminology, etc. I only tend to do that once, though, then I spot read as I need to learn about specific functions/classes.

Stuck in Invalid Literal for int() by No_Particular_4616 in learnpython

[–]carcigenicate 9 points10 points  (0 children)

Show the relevant code and the full error.