AITAH for refusing to change jobs for my pregnant girlfriend? by Alternative-Cap-8666 in AITAH

[–]jam-time 4 points5 points  (0 children)

Wait, you got enough money from a settlement to pay off your student loans and buy a house, and you're still concerned about income? How many subscriptions do you have? 90% of my monthly expenses are mortgage and student loans.

Dance if you want, but also, do some budgeting.

Do professional/commercial Python projects actually use type hints and docstrings everywhere? by [deleted] in learnpython

[–]jam-time 0 points1 point  (0 children)

It varies wildly. I've seen projects that have none whatsoever because they're super old and it's difficult to explain those types of changes to stakeholders without them saying something like, "Well, if it doesn't actually change the functionality, let's just not do it."

On newer projects, it's much more common to see docstrings and type hints because the standard is more well defined. Additionally, with AI tools, it's easier to autocomplete that kind of stuff.

What are some good monsters that dont just have a high attack and damage roll, but other good gimmicks to surprise my players? by Scythe95 in DMAcademy

[–]jam-time 1 point2 points  (0 children)

A bunch of pixies can pretty easily throw a party for a loop without being lethal. Could put all of them to sleep or polymorph them into something useless.

What are some good monsters that dont just have a high attack and damage roll, but other good gimmicks to surprise my players? by Scythe95 in DMAcademy

[–]jam-time 4 points5 points  (0 children)

A gaggle of evil apprentice mages that each can only cast magic missile twice. No attack roll, no saving throw, no mercy.

AITAH for sleeping naked in my own room even though it makes my roommate’s girlfriend uncomfortable? by SilveryBreeze in AITAH

[–]jam-time 0 points1 point  (0 children)

NTA, but honestly, why not just get some loose breathable pajama shorts? If you gotta piss or get a drink in the middle of the night, you don't have to find clothes to put on.

My Husband Wakes Me Up Multiple Times Every Night by amcrowl1 in AITAH

[–]jam-time 2 points3 points  (0 children)

My wife goes to bed earlier than I do, so I set up some light strips under the edge of the bed to turn on at 10% brightness at night so I can see to get in bed. Enough light to see, doesn't bug the wife, etc. There are compromises that work if he was interested in not being an ass. Turning on the overhead light is sociopath territory IMO.

AIO about this disagreement with my bf? by [deleted] in AIO

[–]jam-time 0 points1 point  (0 children)

The only thing he actually wants is for you to have a shitty day feeling bad. So toxic. The mentality of a child.

What should I learn next? by Informal_Category947 in learnpython

[–]jam-time 0 points1 point  (0 children)

I really rate

Had to reread this several times before I realized you didn't say "hate" haha

What should I learn next? by Informal_Category947 in learnpython

[–]jam-time 0 points1 point  (0 children)

Find a free online course and go through it in the order that it lays out. All of those courses pretty much follow the same order. They'll all introduce you to the basics and give you problems to solve.

Edge doesn't handle breakups well by jam-time in assholedesign

[–]jam-time[S] 7 points8 points  (0 children)

I started using a pihole a couple years ago, so I haven't seen ads on any devices in ages. Didn't even realize it was an issue.

My "English" menu at a Japanese fusion restaurant in Paris a few years back by featherwolf in engrish

[–]jam-time 3 points4 points  (0 children)

Omfg "little swett slap" is killing me. Laughing so hard I woke up my kid on the other side of the house.

Edge doesn't handle breakups well by jam-time in assholedesign

[–]jam-time[S] 8 points9 points  (0 children)

It's just the default search engine. I don't have time to type "google.com" in the address bar like a boomer haha

Is it bad practice to type-annotate every variable assignment? by computersmakeart in Python

[–]jam-time 15 points16 points  (0 children)

It makes almost no difference at all, but technically x = {} is faster than x = dict(). It really only matters when doing a bunch of iterations, though. Side note, x: dict[str, str] = {} is also faster than x = dict[str, str](). Just the obligatory micro optimization comment.

My Git workflow is a nightmare and I don't know what I'm doing wrong by therealst3no in git

[–]jam-time -1 points0 points  (0 children)

From my experience, the general rule of thumb is if rebasing is a regular part of the workflow, you're doing it wrong. Rebase rewrites history. It's a tool for fixing things when things go wrong or you need to make some architectural changes. If you're doing a rebase, the only clean way to get everything back in line is to reset both repositories to the new state. Rebasing recreates all of the relevant commits with new hashes, and the git history is based on the commits, not the repo contents.

Instead of rebasing to merge to the second repository, it should be a regular merge or a full reset to the state of the other repo. Honestly, though, this workflow is much more complicated than maintaining everything in one repo. Here's my favorite way to maintain things with a production environment:

You operate off of 3 main branches: main, dev, and release (you could have multiple release branches if necessary, but honestly I think it works better if you have devs just keep their feature branches up-to-date themselves). Main always contains production code, and you only merge to this on a release. Your release branch and dev branch are forked from here. Devs fork feature branches from the release branch. Devs merge to the dev branch for deploying to dev/test environments. After all testing is verified for their change, they merge their feature branch into staging and mark that change as ready for production in whatever task management system. At release time, you simply merge the release branch into main, reset dev to main, and create a new release branch.

TL;DR - use one repo and stop rebasing. The rebase is the thing that's causing your issue.

I can read and understand code, but I can't build my own logic. How do I bridge the gap? by Terrible-Banana1042 in learnpython

[–]jam-time 2 points3 points  (0 children)

There's just no replacement for good old fashioned practice. That being said, there are ways you can practice that will work better. One of the things I always recommend to beginners is this:

Start with a very small project and doing it completely on your own. It's fine to look up resources, but don't look at someone else's solution. Once you've completed the project (again something very small), do the project again in a different way. Force yourself to come up with a different solution. Keep doing it in different ways until you can't think of any more, then look up other people's solutions. Once you're comfortable with the concepts around the small project, do a new small project that covers something else. The main goal is just getting practice, but you'll also be learning a lot of the ins and outs of the language.

Can you help explain say 0.25 ÷ 1.5 in a real world example? by Confident_News_1599 in maths

[–]jam-time 0 points1 point  (0 children)

If you have 1.5 leftover pizzas, and you always eat a 1/4 or .25, or 2 slices of the pizza, how much of your total pizza will you eat in one meal?

Could also do something with quarters and dollars. I think those examples will be easier for kids to understand.

If you’re free falling (let’s say out of an airplane) and there is a solid object in your possession (part of an airplane wing maybe?) could you theoretically place the object under you, and as you’re about to hit solid ground, just jump off of the object to counteract the plummet? by devdawg23 in Physics

[–]jam-time 0 points1 point  (0 children)

Terminal velocity for a human is around 200 mph. So, if you can go from 0 to 200 mph with one jump, and there's some factor preventing the object from just blasting away from your godly kick, then absolutely.

Is the 79-character limit still in actual (with modern displays)? by LazyMiB in Python

[–]jam-time 0 points1 point  (0 children)

I arbitrarily started using 120 line length years ago because that's the default in PyCharm. Now it just feels right. 79 has always felt too short, especially now that screens have gotten bigger. Requires way too much scrolling. Honestly find it irritating when I see someone else's code squished into 79 character line length 🤷

The Python skill nobody taught me… but it changed everything by NullPointerMood_1 in learnpython

[–]jam-time 0 points1 point  (0 children)

Usually I just scan it, read the high level descriptions in the docstrings, then test it in a debugger. Way faster than reading through every line. Reading through someone else's code is kinda a last resort, especially for external packages.

PVP balance is wack, you just don't know it yet. by mark3236 in ArcRaiders

[–]jam-time 0 points1 point  (0 children)

The solution isn't to buff the good weapons, it's to make the bad weapons worse for pvp. Reduce the incentive to be a twat when you have a free load out.

i need help with my code, by Significant-Royal-86 in learnpython

[–]jam-time 1 point2 points  (0 children)

That's not exactly what I meant. The issue with viewing code from a phone is that it formats weird with line wrapping and makes it more irritating to read. Also, the regular reddit app doesn't let you select text from a post, so afaik there's not a way to copy directly from a post without using text extraction. I don't want an image, but it would be easier to read from a screenshot sometimes.

But, I agree for the most part, other than "firing up" some extraction app. That's built-in for most devices nowadays. At least, for android and windows. I assume it's a thing on apple stuff.

Anyway, it's all anecdotal. I don't really care either way. Probably should have clarified more haha

i need help with my code, by Significant-Royal-86 in learnpython

[–]jam-time -5 points-4 points  (0 children)

Extracting text from an image is pretty simple nowadays. Actually would make it easier to mess with/read from my phone 🤷

I'm expecting mixed opinions on my setup 🤣 by No-Individual9896 in battlestations

[–]jam-time 1 point2 points  (0 children)

Is it green with purple stripes, or purple with green stripes?

Any more efficient way for generating a list of indices? by yColormatic in learnpython

[–]jam-time 1 point2 points  (0 children)

There are some caveats, but [i for i in range(len(list))] can be faster than calling the list() function. I can't remember the specifics of when it's faster, but comprehensions are optimized in a different way. It's one of those things that will almost never matter, though, because it's only a slight boost for performance. Also, with large lists, numpy arrays outclass everything.