• 0 Posts
  • 84 Comments
Joined 6 months ago
cake
Cake day: January 16th, 2024

help-circle

  • This is bad practice.

    More accurately it should look something like this:

    # Load sys library for exiting with status code
    import sys
    
    def sayHelloWorld(outPhrase: str="Hello World"):
        # Main function, print a phrase and return NoneType
        print(outPhrase)
        return None
    
    if __name__=="__main__":
        # Provide output and exit cleanly when run from shell
        sayHelloWorld()
        sys.exit(0)
    else:
        # Exit with rc!=0 when not run from shell
        sys.exit(1)
    




  • I remember getting sent to the principals office for “hacking” (pinging the computer in the next room) in like 8th grade.

    Back in 4th/5th I actually was hacking, modifying our user menu to add Windows 3.1 and a password (copying config from a teacher’s profile). Also brute-forced at least two teachers passwords.

    I’m a network architect now, so there’s that.








  • JasonDJ@lemmy.ziptoScience Memes@mander.xyzEvery base is base 10
    link
    fedilink
    English
    arrow-up
    38
    arrow-down
    2
    ·
    1 month ago

    Jesus Christ.

    I just realized that we call binary base2 and there’s no 2 in that numbering system. We call hexadecimal base16 but there’s no 16 (at least not like we know it). But then why is base10 base10? We have a 10…but it’s not a single digit number.

    Why is this reminding me of Project Hail Mary?


  • JasonDJ@lemmy.ziptoScience Memes@mander.xyzMushroom ID
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 month ago

    “There’s always a price to pay” is basically what engineering is.

    Anybody could build a bridge to last 100 years, or to survive a barge ship crashing into it, but it takes an engineer to build a bridge that will barely last 100 years, or barely survive a bridge crashing into it (which you could kind of say the F.S.Key bridge did, since only really the middle section was taken out).

    Put another way, in the real world, there are budgets and sacrifices.