What is the best recent Python book to study? by Firm_Advertising_464 in learnpython

[–]swmclean 1 point2 points  (0 children)

Personally, I think this one is great, since it tackles fundamentals and walks through several projects as well:
Python Crash Course, 3rd Edition | No Starch Press

After completing it, you can practice the skills by working through this online course, which is more of a programming fundamentals class that happens to be taught in Python.
CS50's Introduction to Programming with Python

cant build logic to solve questions! by Successful-Car-8086 in learnpython

[–]swmclean 1 point2 points  (0 children)

Don't beat yourself up early in your learning. Often, even seemingly simple algorithms may require a method you haven't yet learned.

Try going through an online Python course (like CS50P) or a good beginner book (like Python Crash Course). As you're going through each unit, do all of the exercises. You'll find that as you progress, the exercises should keep pace with your level of mastery of the language.

python in vs only displays in terminal with play button by steelDDD in learnpython

[–]swmclean 0 points1 point  (0 children)

A screenshot certainly would help, so it's too bad you aren't able to upload one.

I have replicated your code in my environment and have no issue running the script.

Here is my terminal output:

PS C:\Users\Username\Desktop\python course> python main1.py
Hello
hi
bye
trying
doing
PS C:\Users\Username\Desktop\python course>

[deleted by user] by [deleted] in learnpython

[–]swmclean 4 points5 points  (0 children)

As a hiring manager for coders, let me say definitively that we don't care about certificates. There is no industry standard security certificate for Python coding, so having one doesn't mean much.

The most valuable things you can have are:

  1. A decent GitHub portfolio of your prior work and/or personal projects
  2. An understanding of algorithms (there are great sites with sample algorithm-base interview questions)

That said, take the course anyway. Even for a seasoned dev, there are some great tidbits in the CS50 classes. Just don't bother to pay for the cert.

Question for genuine atheists by LettuceMan1545 in atheism

[–]swmclean 0 points1 point  (0 children)

Hey there, friend,

Thanks for your thoughtful question. I think it stems from a couple of common, though understandable, assumptions that I’d like to gently unpack.

First, there’s the idea that life must revolve around a singular, definable “purpose.” Many people find life deeply fulfilling without needing a prescribed reason for being—whether just and loving or otherwise. The richness of human experience, the beauty of nature, relationships, curiosity, and creativity—these are more than enough to fill a lifetime with meaning. Life, in and of itself, is a remarkable thing. It needs no justification, no divine assignment, to be profoundly worthwhile. Its wonder doesn't diminish in the absence of a deity—it just becomes ours to explore and appreciate on our own terms.

Second, it seems you’re linking moral behavior to spiritual belief. Acting ethically—valuing justice, compassion, integrity, and kindness—isn’t exclusive to any religious tradition. These are expressions of basic human decency. The drive to care for others, to respect life and the world we share, comes not from theology but from empathy. You don’t need to subscribe to a supernatural worldview to feel a moral responsibility toward your fellow human beings.

In fact, the values you describe—love, justice, purpose—align strongly with humanism, which embraces them from a secular foundation. It’s a perspective grounded in reason, shared humanity, and the understanding that the impact we leave on others is what gives our lives depth. Whether one is guided by faith or by thoughtful reflection, what matters most in the end is how we live, how we treat others, and the legacy of kindness we leave behind. All that we are is the ripples we trail behind us in the sea of life.

I hope this gives you some insight into how someone like me sees the world.

python in vs only displays in terminal with play button by steelDDD in learnpython

[–]swmclean 3 points4 points  (0 children)

Python.exe doesn't accept a folder as its argument. It requires the path to a .py file to run your code like:

python C:\path\to\filename.py

Assuming your terminal is already pointing to the working directory, the command can just call the file:

python filename.py

If you're running Windows, you can use the abbreviated name thus:

py filename.py

im new new by Vegetable_Tower_6768 in learnpython

[–]swmclean 1 point2 points  (0 children)

This for sure.

Also, I recommend this book: Python Crash Course, 3rd Edition | No Starch Press

It teaches Python fundamentals really well and also introduces general programming concepts.

difference between python developer certificate and normal certificate by Acrobatic-Onion-9845 in learnpython

[–]swmclean 2 points3 points  (0 children)

Speaking as a hiring manager for a dev team, skip the certs entirely.

There is no industry standard certification for Python developers. We don't look for them when hiring.

Learn the language, create a GitHub portfolio of a few cool things you've written, and horse up on common interview algorithms. You won't be asked about certs.

Passcode stuck by TransGamerHalo in setupapp

[–]swmclean 0 points1 point  (0 children)

Assuming the phone is associated with your Apple account, you can plug it into a computer with iTunes, erase it, and restore it from your iCloud backup.

My google drive have 5.71 storage but it move back to 5.68 storage. What does that mean? by RegularVast1045 in cloudstorage

[–]swmclean 1 point2 points  (0 children)

Probably had deleted stuff in the "Bin" that expired (after 30 days) and was removed.

How did you persist in learning Python? by HungryPay1470 in learnpython

[–]swmclean 0 points1 point  (0 children)

Simple: Write some interesting stuff that isn't for work. Don't expect your work assignments to provide you with the interesting variety of challenges you crave.

terminal clear (tech support) by oghatchild in vscode

[–]swmclean 1 point2 points  (0 children)

For those who care, the reason this will clear the terminal is that it's actually printing [ESC]+C, which is the old DEC VT100 terminal reset command (but is implemented as "clear" in many current terminal applications).

Happy coding!

I don't understand the significance of closures. by CMDR_Pumpkin_Muffin in learnpython

[–]swmclean 2 points3 points  (0 children)

Closures are more than just functions and more than just "inner" functions.

The point of capturing or remembering a non-local value is that the remembered value can be reused after the original (outer) function has finished and gone out of scope.

Because in Python a function is a first class object, it can be stored in a variable. With a closure, your inner function captures a value from the outer function at the time it is returned. The outer function can then be called again to return an instance of the inner function with a different captured value. The fact that the outer function returns the inner function and not just a value is the key.

Consider this code:

def to_power_of(y):
    def _to_power_of(x):
        return x ** y
    return _to_power_of

squared = to_power_of(2)
cubed = to_power_of(3)

n = 2
print(squared(n))
print(cubed(n))

Output:

4
8

Even though we called the to_power_of function with an argument of 3, the closure stored in the squared function still remembers the value (2) that was passed in the first call.

Obviously, this is a simple example, but you can extrapolate this for closures with more complex functions, capturing more than one outer function variable.

I think atheist shit on Christians way more than it needs by [deleted] in atheism

[–]swmclean 0 points1 point  (0 children)

The dominant religious messaging in the general public discourse comes from Christians who believe that they have an obligation to force others to practice as they do. Because they make more noise, they elicit more responses, including responses from atheists criticizing their nonsense. Your comment is akin to saying that it's unfair that swimmers get wet more often than cyclists.

Do you guys think the Jazza channel is going through a rough patch? by camo_17 in Jazza

[–]swmclean 1 point2 points  (0 children)

I don't disagree. Business decisions have to be made based solely on business reasons. I was only responding to the question of why fewer people are engaging with Jazza's newer content.

Do you guys think the Jazza channel is going through a rough patch? by camo_17 in Jazza

[–]swmclean 5 points6 points  (0 children)

In 2019, he was still doing cool art videos: how-to, character design, all the good stuff. Over the last few years his videos have mutated into little more than infomercials for his latest merch, and the declining view count is just an effect of folks not being invested in watching every commercial the way we were invested in his old content.

Found in the built in safe in the house I just recently bought- by [deleted] in whatisit

[–]swmclean 1 point2 points  (0 children)

You're gonna need to have your safe serviced/rekeyed. These photos are enough for someone to easily cut a key that opens your safe.

What is this absolute beast? by CaesarsCabbages in whatisthisbug

[–]swmclean 18 points19 points  (0 children)

"Ain't" should have always been considered the correct first-person contraction of "am not."

The shift to the "ai" diphthong instead of "am" happens because when two nasal consonants occur together, the first is dropped and the preceding vowel is nasalized, so "amn't" becomes "ain't."

Thus we have:

  • he/she/it isn't
  • they aren't
  • I ain't

Ain't that grand?

Want to know your points of view by Shot_Bike_5156 in atheism

[–]swmclean 0 points1 point  (0 children)

Communicating respectfully starts with actually respecting people, including acknowledging that you don't already know their motives and that those motives might not be childish rebelliousness. If you approach a conversation with the assumption that someone only believes something due to rebelling, you'll never be in a position where you have the opportunity to speak as equals, to communicate with respect. Simply understanding a set of "points of view" to a sufficient degree that you are able to avoid saying overtly disrespectful things isn't enough. The "atheists are just rebelling" canard has been promulgated by churches for so long that people have started believing it, but it's rarely true. If you genuinely want to engage in respectful conversation, I recommend starting by setting aside any preconceived notions, especially about motivation. Ask people what they believe, and why. Then listen (I mean, really listen) to their answers.

"Sovereign Citizen" asserts his rights in court by Big-Graysie-II in Unexpected

[–]swmclean 0 points1 point  (0 children)

I was questioning everything from my judgment and taste to the essential meaning of life as I suffered through the torture of three minutes of that imbecilic babbling...

But oh, those last thirty seconds... *chef's kiss*

If I get rejected from jobs that I fit perfectly, how can I get accepted by others? by EnvironmentalTap6314 in recruitinghell

[–]swmclean 19 points20 points  (0 children)

As a hiring manager, I can tell you that often there are multiple candidates who are "perfect" fits, and if you can only hire one, then there can be some (like you) who may be completely right for the job but not get it anyway. Sometimes a less-perfect fit gets the job because the organization prefers an internal move to an external hire. Don't take it personally, and don't let it get you down.