Of course, but when indentation has a syntactic meaning the formatter often won’t be able to fix it.
Of course, but when indentation has a syntactic meaning the formatter often won’t be able to fix it.
It’s probably more prone to mistakes like that, true. But in practice I really never witnessed this actually being a problem. Especially with tests and review.
Yeah, that’s definitely a good point. But it’s a minor thing. Adjusting indentation takes 2 keystrokes in vim, I barely notice it.
So I’m going to say what I always say when people complain about semantic whitespace: Your code should be properly indented anyway. If it’s not, it’s a bad code.
I’m not saying semantic whitespace is superior to brackets or parentheses. It’s clearly not. But it’s not terrible either.
As someone who codes in Python pretty much everyday for years, I NEVER see indentation errors. I didn’t see them back when I started either. Code without indentation is impossible to read for me anyway so it makes zero difference whether the whitespace has semantic meaning or not. It will be there either way.
I’m pretty sure I have aphantasia. My mom, on the other hand, is an artist with very powerful imagination. She would often tell me how she sees something she’s imagining and I never really knew what she meant. I just assumed that it’s kinda a figure of speech. Only when I first read about aphantasia I realized that it probably really works completely differently for her.
I would like to know whether aphantasia has any practical impact on one’s life. For example, I had this suspicion that differences in my “mental image processing pipeline” might be a factor in my terrible driving skills. Quick visual assessment of the traffic situation, at an intersection for instance, is very hard for me. This is just me making stuff up though, no idea if it makes any sense. In fact, I think I’m going to research this topic and look for some papers now!
I think OP is worried about keeping their charged phone on the charger just for this feature. I also heard that keeping devices with batteries connected to a charger for a long time is not good because it generates a lot of small charging cycles pushing the battery to 100% repeatedly. I’m actually curious whether that’s true for the modern smartphones or not.
FWIW my Pixel has an “adaptive charging” feature that slowly charges the phone to 90% overnight and then tops it to 100% just before an alarm. It seems to be aimed at reducing this exact effect so I wouldn’t be surprised if there is something to it.
Recently I like to play some Twitch streams in the background when I’m not doing anything requiring a lot of focus. It makes me feel like I’m not really alone at home without any social effort on my side. You definitely have to find a right streamer for you though - most of Twitch is garbage in my opinion.
Someone mentioned going out to eat or sit at some cafe which I also like to do sometimes.
I’m not sure about the exact percentage but I don’t think it’s necessarily that far off. I spend a lot of time reviewing code, designing, documenting, reading documentation. Actually writing code is a cherry on top.
I would actually say it’s VERY complicated but in daily work you probably need like 5 commands and those aren’t hard at all.
I would prefer a laptop but every response is helpful. Thank you!
You’re right. Just building and publishing is definitely possible without owning a Mac. The thing is, I don’t have an iPhone too and I need to see my app in action. Thank you for the answer tho!
A laptop would be probably easier to manage for me and I see that both have a similar price so I would probably go with MBA. Thanks for the answer!
Thanks for the recommendation!
I just don’t think the majority of people are motivated enough. I have met many people who have no hobbies and no ambitions and just don’t want to do anything productive. They would like to spend their entire lives playing video games or partying or something similar.
And this is just about the lack of motivation, but what about malicious actors? People who would sabotage other’s efforts or try to profit in an unfair way? How would you ensure this won’t happen?
What about shitty and unpleasant but necessary jobs no one wants to do?
The idea that once you remove the money everyone will suddenly feel the desire to serve the society is bonkers. Don’t get me wrong, I don’t love capitalism. I want to believe the world like that is possible, I really do, but I just can’t see it working. I live in a society where I have to use a 3 kg bike lock in order not to lose my bike and even then I have to detach the $10 light and take it with me because otherwise it won’t be there when I come back. I have zero trust and belief that such society can magically self organize and work together towards a common happiness.
In such a system, people work on what they want, when they want, and provide for society because it’s their true desire.
I find it kinda hard to believe that people would be able to achieve the level of organization and would be willing to put in the effort required just by doing what they want when they want, without any outside incentive. I’m not talking about a painting or a book, that’s why I specifically mentioned things requiring large investments. And by investment I didn’t mean just money but time and effort in general.
That might be true in many cases but do you actually believe that things requiring immense investments and years of work like AAA games and high budget blockbuster movies would be created in any system?
Yeah, I didn’t mention this but if it’s just impossible to buy something then I don’t see anything wrong about piracy. No one looses anything.
I definitely mean “stealing” as “depriving the publisher of the cost”. Limiting the term “stealing” just to moving physical objects really makes no sense in the current world.
it only holds if you’d actually have ponied up were the content not available for free
That’s an interesting case I never really considered. If you only genuinely pirate stuff you would never buy otherwise then… I guess it’s fine? But this alone doesn’t put the end to the discussion because I find it really hard to believe that people would just give up all of the stuff they pirate if they had to pay for it. But in some cases, sure, sounds reasonable.
Artistic content is, believe it or not, produced outside of capitalism as well.
That’s true of course but I don’t think just pretending we don’t live in a capitalist world and taking stuff for free is making this world better in any way.
Let’s say something costs $20, from which 75% goes to make some rich guy even richer and only 25% goes to the actual author who put in the work. It’s more important to me to give that $5 to the author than NOT to give the $15 to the rich guy. Would I prefer there wasn’t a rich guy in the equation? Yes, of course, but that’s often just not possible.
In the end, I genuinely want the world to be a better place but I don’t really believe in extreme solutions. I appreciate your civilized answer despite different opinions. Peace!
No, I don’t, because I can afford stuff and pirating in this situation would be just pure stealing which I believe is morally wrong. Yes, being a billionaire is usually morally wrong too but I don’t think it just cancels out.
Justifying piracy by saying capitalism is bad sounds like a hypocrisy to me. You want to use something that exists thanks to capitalism without participating in it. You want to eat your cake and have it too.
Now, the case is different for people that can’t afford stuff, especially when they genuinely need it (but I don’t draw the line at entertainment, after all people NEED entertainment too). In that case, please pirate away. Everyone deserves a decent life. In general, I largely agree with OP’s friend.
Since you have all your
shutil.copytree
s andsys.path
manipulation at the top level of the test modules, they are executed the moment those modules are imported.unittest
likely imports all discovered test modules before actually executing the tests so the set up of both modules is executed in random order before the tests are run. The correct way to perform test setup is usingsetUp
andsetUpClass
methods ofunittest.TestCase
. Their counterpartstearDown
andtearDownClass
are used to clean up after tests. You probably will be able to get this to work somehow using those methods.However, I’m fairly certain that this entire question is an example of the XY problem and you should be approaching this whole thing differently. Copying the modules and their mock dependencies into a temporary directory and manipulating
sys.path
seems like an absolute nightmare and it will be a massive PITA even if you get it to a working state. I don’t know what problem exactly you’re trying to solve but I think you should really read up onunittest.mock
and even more importantly on dependency injection.