bleistift2

joined 1 year ago
[–] bleistift2@sopuli.xyz 3 points 4 hours ago* (last edited 4 hours ago)

And don’t forget that 1900 still is a leap year in Excel.

Thank you!* Saying this finally made me realize why I always need to add/subtract one day when I’m trying to convert dates to and from the Excel representation. 🤦

[–] bleistift2@sopuli.xyz 4 points 4 hours ago

I have been able to outsource low level parsing to third party libraries

Hahaha!!!

Today I watched a Java server crash because a library decided it needed more than 3GB of heap space to read a 10MB file. That was after manually removed background colors from around 100,000 cells, which apparently caused the parser to create even more objects in its internal representation of the sheet.

[–] bleistift2@sopuli.xyz 14 points 4 hours ago* (last edited 4 hours ago)

1: what the frick are you doing in Excel that needs even 10^2 columns?

Nothing. Here’s this meme’s origin story:

At work we have a tool that imports Excel spreadsheets into user-defined data records. We let the user decide which column goes into which record field.

Today I noticed that when you upload a spreadsheet with more than 26 columns (that is, you enter the double-digit range), the columns aren’t sorted anymore. (When I programmed that, stupid me thought that it was absolutely unreasonable to import 26 columns, given the way the data is processed later.) Instead of A…Z, AA, AB, …, it was A, AA, AB, B, C, ….

So I thought: I should fix that. It’s easy. Just convert the hexavigesimal system to decimal and sort based on that. I even was happy that I could apply some school knowledge for once. (It wasn’t all useless, yay!) Then my math wasn’t mathing. It took me a few minutes to find the system by which Excel columns are numbered. In the end I was annoyed that a task of 5 minutes took… longer… and made this meme.

By the way, to come back to the 10² columns: I’ll take any bet that such a spreadsheet will be shoved into the importer before I retire from my current company.

[–] bleistift2@sopuli.xyz 6 points 4 hours ago (3 children)

I thought about that, but decided to leave it as an exercise for the reader.

Don’t forget that Integer8 (the middle dragon) counts increments of 100 nanoseconds, because… reasons.

And don’t forget that 1900 still is a leap year in Excel.

 
 
[–] bleistift2@sopuli.xyz 27 points 5 hours ago* (last edited 5 hours ago) (1 children)

“start of the century when we wrote it”

This meme wouldn’t exist had they done that. But they chose the zeroeth, not the first, of January for Excel.

 

Ich hab den hintergrundfreundlichen Hintergrund verkackt…

 
 
 
 
 
 
 
 

Explanation (which might be wrong, since I’m writing this after banging my head against a wall. Please do correct me if I’m wrong):

In regular numbering systems (i.e., decimal), we exhaust all 10 digits (0–9) before we reach two-digit numbers. The first number to require 3 digits is 10². The first to use 4 is 10³, and so on.

In music intervals, there is no “0”. The interval c’–c’, for instance, is called a prime (1). This has the funny consequence that moving by a fifth and then by a fourth doesn’t land you on the ninth, but the octave (8). Moving by an octave and then another octave gets you to the 15th, not the 16th.

In Excel, shit hits the fan when you need to convert column names (A, B, C…) to numbers (0, 1, 2…). Since we use 26 characters as our ‘digits’, we’re in the hexavigesimal system. Knowing what I told you in the first paragraph, you’d expect the first double-digit column (AA) to be 26. And you’re right.

However, when do we need 3 digits? Which column is column AAA? A sane person would say it’s 26², so 676. Ha! No. Column number 676 is actually ZA. What gives? Well, we only ditch the zero for single digit numbers. All subsequent columns actually use 27 different characters, the ‘empty character’ being one of them. That’s where we get the ‘single digit’ – there actually is a second digit, only it’s empty.

So the column AAA actually has index 702, or 26×27. Which index does the column AAAA have? 26×27². The system of adding powers of the base works, only we changed bases midway through.

You can see the lopsidedness in the index lookup table (I’m not displaying all characters for brevity). Sane number systems have square tables. Excel’s is 26×27 (shown are 4×5).

[–] bleistift2@sopuli.xyz 30 points 6 hours ago (1 children)
[–] bleistift2@sopuli.xyz 6 points 6 hours ago (1 children)

Wenn’s ein deutscher Zug ist, ist das nicht so schlimm…

[–] bleistift2@sopuli.xyz 1 points 8 hours ago (2 children)

Aber Wasser und bewegte Luft sind wirkungsvolle Maßnahmen gegen die Hitze. Zuhause musst du sie ja genauso ertragen.

[–] bleistift2@sopuli.xyz 3 points 8 hours ago

Same with chips or nuts.

[–] bleistift2@sopuli.xyz 30 points 8 hours ago (2 children)

strict ≠ abusive

[–] bleistift2@sopuli.xyz 13 points 1 day ago (4 children)

I found Watchdogs 2 weird in this regard. You steal money from random people, who often struggle themselves, steal cars like nothing, murder a suburb’s worth of people, and still you’re “the good guys”?

[–] bleistift2@sopuli.xyz 4 points 1 day ago

surprisedpikachu.gif

view more: next ›