This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.
Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.
We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:
-
Shaming.
-
Attempting to 'build consensus' or enforce ideological conformity.
-
Making sweeping generalizations to vilify a group you dislike.
-
Recruiting for a cause.
-
Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.
In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:
-
Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.
-
Be as precise and charitable as you can. Don't paraphrase unflatteringly.
-
Don't imply that someone said something they did not say, even if you think it follows from what they said.
-
Write like everyone is reading and you want them to be included in the discussion.
On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.

Jump in the discussion.
No email address required.
Notes -
To be fair, as a math enthusiast, I really dislike how high school "math" worked, which was mostly just training kids into executing algorithms, most of which have no application in real life for almost anyone.
Numeric skills were essential in the era before computers for a lot of people. Today they are not of much practical relevance. I dearly hope that anyone who encounters 332423/234 in their professional life will have the good sense to use a computer instead of trying long division.
I mean, basic numericy is essential. If you only encounter numbers as things which you enter into your calculator, you will not have a good grasp on them. So most of elementary school math is probably fine.
But mostly of what follows was 20% motivated by requirements of science classes, 20% stuff people should probably know, and 59% pointless algorithmic wankery for its own sake.
Take long division of polynomials, which is just long division on steroids. Now, there is a lot of interesting theory for sure, how the polynomials form a ring and how you can algorithmically factor out one known root. But this is not what we focused on. Instead, we solved toy problems "Here is a cubic polynomial. You magically know that x=3 is one root. Find all the roots."
Being able to solve quadratic equations is probably ok, because they often pop up in toy physics problems, but boy did we spend a lot of time on that. Just another pointless monkey-training thing.
Likewise linear systems of equation and Gaussian elimination. Again not completely pointless, but trained to the point of pointlessness.
Or take the unit about other bases than 10. There are only two cases here with any practical relevance -- base 2 to understand how computers work and base 16 which is commonly used to represent binary numbers. Of course base 16 was judged to hard for us poor kids, and while base 2 appeared occasionally, nobody thought to teach us about bitwise operations and shifts (never mind 2-complements).
Speaking of the failure of school to teach much more relevant CS topics, IEEE 754 came out in the year I was born. You would be forgiven to think that a school preparing me for a life where floating point numbers are everywhere would have tried to teach what catastrophic cancellation means and how to avoid getting wrong results when using calculators. But no, the only accommodation made to the existence of computers was that instead of having me find pointless analytic roots of quadratic functions was that instead they trained me to use my TI-82 to find pointless numerical roots of more general functions.
Mathematics is all about proving theorems, so you might think that I liked the section about induction more, but the opposite is the case. You take a beautiful mathematical concept and turn it in another rote exercise. "Take this pointless sum formula and apply the stored algorithm 'induction' to 'prove' it."
The TL;DR version of this whining about high school math is that basically, the test questions do not require you to think. It is sufficient to be able to apply the correct algorithm learned by rote. With any real world problem, it is very unlikely that you will have an algorithm in the cache which you just have to apply, apart from "write down the problem, think really hard, write down the solution".
If we want to torture students with pointless intelligence-linked tasks, my suggestion would be to get rid of 'math' and substitute puzzles such as Sudokus. At least when trying to solve NP-complete puzzles, you sometimes have to stop and think, or try different ways to attack the problem. Which is all not the case for typical high school math problems.
Actually, this isn't too hard if you note that both the numerator and denominator are multiples of 13, and so it reduces to 25571/18, which (if you need it as a mixed number) is much easier to compute as being 1420 and 11/18 — or 1420.6111…
Then again, I'm someone who has a habit of trying to mentally decompose various integers I encounter into their prime factorizations, basically for fun, so…
(I'll also compute square roots by hand from time to time, just to keep my skills sharp.)
Based, but I personally don't find it very fun once the numerators and denominators of the approximating fractions start exceeding three digits.
I think we might be using different algorithms. I generally use the "long division method" — though I admit that for later digits it mostly reduces to increasing amounts of tedious multiplication and subtraction. Do you use Heron's method?
Yes.
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link
How the fuck do you notice that? I know how to tell if a number is a multiple of 2 (last digit is even), 3 (all digits add up to a multiple of three), 4 (last two digits are divisible by 4), 5 (last digit is 0 or 5), or 6 (divisible by both 2 and 3). But not 13.
Okay, looking it up, there are divisibility rules for 13, but none I ever learned. Do you seriously have one memorized?
Well, first I factored the denominator into 234=2913. The tests you mention quickly ruled out 2 and 3 as divisors of the numerator, so that leaves trying 13.
Now, in this case, a used a particular divisibility rule that works for numbers with 4-6 digits, which is based on the fact that 1001=71113 is a multiple of 13. Thus, if you "split" the number into its last three digits — in this case, 423 — and the preceding 1-3 digits before that — in this case, 332 — and take their difference, then the original number is divisible by 13 if and only if this resulting difference is also a multiple of 13. In this case 423-332=91=713, so it's divisible by 13; a bit of mental long division gives 332423= 2557113.
(To explain in slightly more mathematical detail, I'm essentially taking 332423 and subtracting 332*1001=332332 to get 91, and since 332332 is a multiple of 13, 332423 and 332423-332332 are thus equivalent modulo 13.)
I also know divisibility tests for 7 and 11; the latter is particularly simple: add the two sets of alternating digits, then take the difference of those two sums; if that is also a multiple of 11 (including 0), then so is the original number.
Ex. 120681: 1+0+8=9, 2+6+1=9, 9-9=0=110, so it's divisible by 11 (note we also see at the same time that the digits all sum to 9+9=18=92, so 120681 is also divisible by 9). Much as the "sum up the digits" test for divisibility by 3 and 9 derives from 10^n ≡ 1 mod 9 (and thus also mod 3), this test for divisibility by 11 derives from 10 ≡ -1 mod 11, and thus 10^n ≡ (-1)^n mod 11.
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link
This is octal erasure
Damn right it is.
In a world where a byte is 6 or 9 bits, octal would be useful. But for obvious reasons world length tend to be powers of two. So we want a basis of 2^(2^n) for some n. The two choices closest to the base widely used by humans are n=2 (base 16) and n=1 (base 4), which can represent a byte in two and four digits, respectively. Relatively speaking, base 16 is closer to base 10 than base 4 is, so it is the obvious choice.
Let us say you are searching for an IPv4 address in a byte-aligned data stream. In hexadecimal, it will always be the same sequence of eight digits, for example 0xc0a810ff. Converting it to dotted quad is simple, network byte order is big endian, 0xff is 255, 0x10 is 16, 0xc0 is 1216 which is 364 which is 192, which tells us that 0xa8 is likely 168.
Now let us try the same in octal. If an oct digit ends with the least significant byte, the string we are looking for is (0o)30052010377. Otherwise, it might also be (0o)60124020776 or (0o)140250041774. Three different representation for the same sequence of bytes! (Yes, you could also use 3 digits to represent each byte separately, at the cost that 0o,000,377 +1 is not 0o,000,477 but 0o,001,000. At this point, the gains over denoting your words bytewise in decimal a la 192.168.16.255 seem slim.)
There are two reasons why programmers in this century might want to be slightly more aware of octal notation than of EBCDIC. Traditional unix file permissions (and umasks) use octal. But using chmod 755 should probably be replaced by the more verbose chmod u=rwx,go=rx (or setfacl) in any case.
The other reason to be aware of it is that it is a pitfall in C, C++. While the prefix K&R chose for hexadecimal numbers, 0x does not collide with common usage elsewhere, they made the terrible decision that octal integer constants should be marked with a leading zero of all things. (I imagine they got into a lot of disputes at gas stations when trying to pay $0060 with a $50 bill.)
Python here does the sane thing and straightforward forbids leading zeros in integer constants, instead telling you to use the 0o prefix if you really want octals.
There was a short period in 2005-2012ish where FPGA programming languages like VHDL and Verilog had to work on so badly constrained environments that octal bases were worth the obnoxious overhead, but either none of them retained support or no one uses that support for normal code this decade.
More options
Context Copy link
More options
Context Copy link
It deserves to be erased.
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link