Good luck
Good luck
The bank doesn’t balance your checkbook. You do.
What would be an example where you need different logic based on a number’s parity? Why wouldn’t you write logic that ignores the number’s parity?
Part of getting better as a programmer is realizing which stuff doesn’t matter, and writing less code, as a result.
They do fail if there’s not enough balance. There is no overdraft bullshit, if you ask your bank to act that way.
Right but that’s a lot different than the loan being discussed here, which is when the bank capitalizes its own loans via deposits.
Loans don’t increase the money supply, though. They increase monetary velocity.
I’m curious about these places without overdraft fees. How far in the negative do they allow you to go?
None. None negative. They’ll deny the transaction or NSF the check if there’s not enough in the account to cover it.
Loans don’t devalue dollars.
(however, I don’t get why more loops and ifs makes a function harder to test, I’m just going to trust you and that I’ll find out later.
Well, it’s fairly easy to explain - each branching statement in your function doubles the number of discrete paths through the code. If there’s one if
statement, there’s two paths through the code. (The one where the if
predicate is True, and the one where it isn’t.) If there’s two if
statements, there’s four paths through the code. If there’s three if
statements, there’s eight paths through the code.
In order to test a function completely, you have to test every possible path through the code. If you used three if
statements, that means you have to devise and write eight tests just for the different code paths, plus testing various exceptional cases of the function’s input (“what if all inputs are 0”, “what if all inputs are null”, “what if the integer is a string”, etc.) That’s a lot of tests! You might even have to write tests for exceptional cases combined with different code paths, so now you’re writing eight times the number of tests you otherwise would have had to.
Whereas if your function doesn’t branch at all, there’s only one path through the code to have to test. That’s a lot fewer tests which means you’ll probably actually write them instead of saying “well, it looks like it works, I won’t spend the time on tests right now.” Which is how bugs make it all the way through to the end of the project.
An economic transaction was non-zero-sum and made us both money? You love to see it! Capitalism wins again.
I mean if you did withdraws down below the amount in your account and then paid overdraft fees, who’s fault is that? If you want to spend money you don’t have use a credit card.
then they processed the big one first (even though it was the last) then processed the small ones after and then they didn’t charge one overdraft fee, but multiple.
Yes, as per the explicit terms of your account agreement.
also there is the obvious case of the 2008 financial crisis
Yes, where a lot of people took out loans they knew they wouldn’t be able to repay.
You could just balance your checkbook, maybe
I think it just takes a not particularly reflective cynicism. “Banks actually steal from us” is just an edgelord “good things are actually bad” take.
Every time I’ve put money in a bank, I’ve gotten out more than I put in. Where’s the “robbery”?
I suspect “you’ll fail the test if you use break
” is more of a joke by your teacher than an actual grading rubric, although if you used it more than twice in the same test I wouldn’t award you better than a B.
Is there a benefit to not using breaks or continues?
The benefit is that you learn to write non-branching code. That’s important for beginners, who tend to write very complicated and complex code with lots of branching, which they then discover they’re not able to test and debug. Barring you from using break
and continue
forces you to write more abstract code to achieve the same level of function with less complexity, and that’s how programmers advance in skill - simpler, more abstract code.
Ultimately it’s an effort to kick a crutch out from under you. Whether you think that’s appropriate for a teacher is up to you, I guess - I’m inclined to think it is, but many students don’t respond well to being challenged.
Is this like how a city where people have lived since 1948, including several generations of people who have never lived anywhere else, is a “refugee camp”?
Yes in aggregate, that’s my point.
Yes, but you’re wrong. In aggregate political sophistication isn’t increasing. That’s my point.
You’re arguing against historical trends in radicalization despite mountains of evidence to the contrary.
There are no “mountains of evidence to the contrary.”
I have observed it, and of course conservatives aren’t going to admit to shielding themselves with it openly
“Everybody who disagrees with me is lying” is a view that’s not particularly sophisticated.
If someone holds largely conservative views, but pretends to be moderate to avoid backlash, they are conservative.
Right, but who is even one person who is doing this?
People’s exposure is increasing over time
Individually, sure, but not in aggregate. That’s my point. You’re ignoring how there are always new people who have not yet become politically informed.
My point is that the conservative is feigning that they have liberal views as a way to justify conservative views, this is a common occurrence.
Right, but what I’m asking you is why you think that’s a “common occurrence” when you’ve neither observed it nor had it reported to you by conservatives.
Wow, that sucks. Maybe you should talk to your bank about getting some kind of protection against a check being returned NSF and paying a massive-ass fine.