Enderman
5.81K subscribers
380 photos
24 videos
7 files
137 links
A software engineer, a malware enthusiast and most importantly, a weird tall creature.

https://enderman.ch
https://youtube.com/endermanch
Download Telegram
📟 How Apple blasted the competition with their iPhone

Above are the slides from a 2007 Nokia emergency meeting presentation.
🤔90🎉14👍8😱64😢1
🌎 The first ever advertisement

Did you know the first ever ad on the Internet looked like this? It was a banner for the AT&T campaign that appeared on Hotwired on October 27, 1994.
😱968👍6👎1😢1
🤬 Safari is atrocious

How does Apple keep getting away with this?
🤬83😱12😢6👎32👍2🎉1
😱6925🤔15
90👍17😢4
🤯 The first successful AI pull request

Yesterday a person submitted a low-level optimization PR written 99% by DeepSeek-R1.

Is it over for software engineers, boys?
😱105🎉13😢10👍52👎2
🔮 Counting days in a month

I was tired of lookup tables so I came up with this optimized algorithm counting days in a month. The operations seem simple enough, and the √3 can be replaced with a constant. To me it seems like the bottleneck of the algorithm is all the float operations. The rest can be very elegantly optimized with bitwise.

def days(y, m):
if m == 1:
return 28 + int(y % 4 == 0)

p = m / sqrt(3)

return 31 if p - floor(p) < 0.5 else 30


Super lenient on storage, but slightly more complex in computation. Developers, what do you think about this?
51👍8🤔6👎1
Enderman
🔮 Counting days in a month I was tired of lookup tables so I came up with this optimized algorithm counting days in a month. The operations seem simple enough, and the √3 can be replaced with a constant. To me it seems like the bottleneck of the algorithm…
😔 The boring way

Well, for one, I fucked up the leap year check, because I didn't know they are skipped every century unless the year divisible by 400.

Float operations are obviously super slow, and even though my solution was mathematically elegant, I think basic comparisons are way to go for time optimization... Shame

int days(int y, int m) {
if (m == 1)
return 28 + ((y & 0b11) == 0 && (y % 100 != 0 || y % 400 == 0));

if (m == 3 || m == 5 || m == 8 || m == 10)
return 30;

return 31;
}


I'd actually bet my money this approach is slightly more optimized than a lookup table, if we consider storage:

const int lookup[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

int daysLookup(int y, int m) {
return lookup[m] + (m == 1 && ((y & 0b11) == 0 && (y % 100 != 0 || y % 400 == 0)));
}
27🤔10👍5
50👍121
Enderman
Voice message
👍35🎉32
🎉23👍72😱2
👍123🎉1
👍8
🖌 Drawing

I don't think I've said it publicly before, but I also enjoy drawing for fun. I'm a poor artist, but pixel art is my weakness, as much as long-haired girls are 😌
155👍14🤔3😱3👎1🎉1
Enderman
This is how she looks
The comments asked me to make the outline uniform, and that actually looks significantly better
35😱2👎1