this post was submitted on 12 Feb 2024
754 points (98.3% liked)

Programmer Humor

32443 readers
586 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 38 comments
sorted by: hot top controversial new old
[–] tsonfeir@lemm.ee 70 points 9 months ago (1 children)

Fuck you Excel, that’s a date, not $946,684,800

[–] deweydecibel@lemmy.world 56 points 9 months ago* (last edited 8 months ago) (2 children)

Honestly, the automatic datetime conversion is the worst part if you're just trying to keep it text. It's idiotic there isn't a simple way to turn off that off. That's not formatting, that's actually changing the data in those cells which may not be what you want.

[–] Identity3000@lemmy.world 25 points 9 months ago* (last edited 9 months ago) (2 children)

In case you're not aware, the latest version of Excel absolutely DOES have that setting (mentioned elsewhere here in the comments). While it's wild that it took so long, it's now a solvable problem and everyone should know about it (and upgrade)!

[–] Agent641@lemmy.world 14 points 9 months ago

It should be, and should always have been defaulting to the "dont fuck about with my data" setting.

Because there really aren't too many scenarios where I want my barcodes abbreviated to scientific notation.

[–] 30p87@feddit.de 3 points 9 months ago (1 children)

Also means one has to give up the license they bought years ago for Office 2019 and actually pay monthly now.

[–] Micromot@feddit.de 2 points 9 months ago (1 children)
[–] tsonfeir@lemm.ee 3 points 9 months ago (1 children)
[–] Micromot@feddit.de 4 points 9 months ago

The office activation method from massgrave.dev

[–] biscuitswalrus@aussie.zone 12 points 9 months ago

It should make me irrationally angry, but no, it's a rational hatred. It burns even more intensely.

[–] festus@lemmy.ca 45 points 9 months ago* (last edited 9 months ago) (1 children)

I'm not sure what version got this, but there's a setting now where you can disable auto-conversion and it's amazing.

https://mashable.com/article/microsoft-excel-disable-setting-auto-conversion-data-into-dates

[–] flambonkscious@sh.itjust.works 18 points 9 months ago (1 children)

Holy crap, that's amazing - I can't believe it would take this long! I presume straight up numbers are no longer affected, too, but I'm almost willing to trust it and try it out...

[–] festus@lemmy.ca 6 points 9 months ago (1 children)

Yeah it stops converting numbers too. At my job we have a lot of ids that start with 0, and it was super annoying to have '000123' turn into '123', now it keeps it as text.

[–] flambonkscious@sh.itjust.works 1 points 9 months ago

That might just be the top tool of the week, then!

[–] danc4498@lemmy.world 30 points 9 months ago (2 children)

CSV files having their leading zeros cut off fuck my entire world up.

[–] wizardbeard@lemmy.dbzer0.com 1 points 9 months ago

Instead of just opening them with Excel, make a blank workbook or sheet, go to the data tab, import from text/csv. It'll give you a bunch of menus and such where you can adnust how it reads the file and how it will format columns. Any column with leading zeros you want as text. It doesn't fuck with "as text" columns.

The only caveat is that once you've imported the CSV that way, you'll want to open the data sources tab and delete the connection to the csv file, otherwise changes in the original csv file will change shit in your spreadsheet, but only if excel feels like syncing it. Better to shut that off and do it yourself as needed.

[–] christophski@feddit.uk 1 points 9 months ago

Dealing with phone numbers and people using excel....

[–] potentiallynotfelix@lemmy.ml 28 points 9 months ago

libreoffice reigns supreme

[–] cupcakezealot@lemmy.blahaj.zone 23 points 9 months ago

can you imagine a world without excel?

[–] Blackmist@feddit.uk 20 points 9 months ago (1 children)

Nice barcode you have there. Be a shame if somebody took any leading zeroes off.

Nice Int64 you have there. Be a shame if somebody rounded it to 14 significant digits.

[–] wizardbeard@lemmy.dbzer0.com 3 points 9 months ago* (last edited 9 months ago)

Import from the data tab, force all columns as text formatting. Excel won't fuck with the formatting then.

[–] Omega_Haxors@lemmy.ml 10 points 9 months ago* (last edited 9 months ago) (2 children)

Openoffice does this too, and the worst part is that it will take something and interpret it as a date, but then you force it to interpret it as a number, instead of using the number you typed it will use the index number of the date which is a completely different and useless value.

In short, it takes the number you put in and converts it into a date against your will, and you can't change it back. It would be like if you typed in "sunshine" and it interpreted that as the temperature of a sunbeam and put that in the cell instead of the fucking thing you typed. So annoying!!

Another minor gripe is how their Pi() uses enough digits that it lands on a 5 and rounds up, which breaks all sorts of sine math. If they had rounded down or added/removed a digit of pi that wouldn't be an issue. I have to intentionally add error to my functions just so they work. On the up side I was able to provide mathematical proof that the human tendency to round up at 5 is at odds with the real world. It makes more sense to round down, though I always just add/remove a decimal point so I don't have add arbitrary information to the system by always assuming a roundup or rounddown. If I'm forced to end at a 5, I round down, which is at odds with how people do it but it breaks less.

EDIT: come to think of it, it makes a lot of sense for 5 to be a round-down situation. If a particle has just enough energy to jump to the next state but no extra, it would be far more likely to stay in its current energy state than it would be to expend energy to make that jump. Even an infinitesimally small increase over the exact amount required to make a jump would give it that necessary kick to actually make the jump.

[–] Ephera@lemmy.ml 15 points 9 months ago (1 children)

I don't know, whether these things have been fixed by now, but you should mind that OpenOffice's development has been basically dead since 2010. All the core devs moved over to LibreOffice, basically because Oracle had bought Sun Microsystems, who previously held the "OpenOffice" brand. You really want to be using LibreOffice these days.

[–] Omega_Haxors@lemmy.ml 7 points 9 months ago* (last edited 9 months ago)

That explains why I haven't got a response from them in over three years.

EDIT: I've downloaded LibreOffice. Their Pi() uses 3.14159265358979 which is an awesome number to end it on.

[–] bstix@feddit.dk 1 points 9 months ago* (last edited 9 months ago) (1 children)

Can't you just type in the digits of the Pi that you want to use in some cell and then refer to that cell instead of using the default Pi?

5 is mathematically a "round-up" number. If you want your numbers to behave differently I think you'd be better off using a different function.

[–] Omega_Haxors@lemmy.ml 1 points 9 months ago* (last edited 9 months ago) (1 children)

Five isn't mathematically a round-up number, we just arbitrarily decided to round up because numbers were used in merchant contexts where obviously you want to get people to pay more for their stuff than less. As for solutions I just introduce a tiny error because it's genuinely less effort than constantly referencing a cell and locking it so that it won't run away if you drag it around. It's a very easy to forget a lock.

[–] bstix@feddit.dk 1 points 9 months ago (1 children)

Name the cell "myPi" and use that instead of the Pi function.

[–] Omega_Haxors@lemmy.ml 1 points 9 months ago

That's a pretty high-q move. I've moved to LibreOffice which does Pi properly, but i'll keep that in mind next time I need a static data reference.

[–] Dirk@lemmy.ml 8 points 9 months ago
[–] Dave@lemmy.nz 7 points 9 months ago (1 children)

But treats a random half of your numbers as text

[–] Rookwood@lemmy.world 4 points 9 months ago

That's a good thing.

[–] quicken@aussie.zone 7 points 9 months ago
[–] ZoopZeZoop@lemmy.world 6 points 9 months ago (2 children)
[–] xpinchx@lemmy.world 5 points 9 months ago

Unrelated but alt+e+s+v is so ingrained into my muscle memory. I should really get a macro pad

[–] droans@lemmy.world 4 points 9 months ago

Ctrl+Shift+V exists now which does the exact same thing.

Actually it's a bit better. Excel always ignores alt codes for the first key press or two after switching windows.

[–] expr@programming.dev 4 points 9 months ago

https://www.visidata.org/ > excel for manipulation and navigation of data.

[–] thejevans@lemmy.ml 3 points 9 months ago

laughs in pola.rs