Live data from Hacker News

Ask HN: Anyone know any funny programming jokes?

news.ycombinator.com

861–870 of 905 posts

Re: Ask HN: Anyone know any funny programming jokes?

#862
post #513
post #481

Earlier quoted context omitted.

A Soviet engineer needs some plumbing done in his apartment, and calls for a plumber. The plumber arrives, does his thing, and hands over the bill. The engineer is shocked. -'What, this is like a quarter of what I make in a month - for half an hour's work???' Plumber shrugs. -'Well, why don't you come join us? Easy work, well paid, no responsibility - just remember to keep mum about your degree, as we're not supposed…

I think the integral is 4 * integrate sqrt(r^2 - x^2) w.r.t. x from x=0 to x=r which is from the equation of circle with radius r centered at the origin: x^2 + y^2 = r^2 => y = sqrt(r^2 - x^2) any other way achieve the same using integration?

You can arrive at the same by slicing in nearly any manner you wish: vertical dx strips, horizontal dy strips, radial dtheta strips, concentric rings treated as rectangles, diagonal strips, literally anything you wish.

If you've never set up and worked a few, try the dx version and the dy version, then maybe fiddle with a few others. They all work.

The concentric rings one is trivial to work out. Integrate over r from 0 to R. Each ring at radius r has thickness dr, and has length 2 pi r, treated simply as a rectangle, which is "close enough" since each is arbitrarily thin. Then the integral is

int_0^R 2 pi r dr = 2pi r^2/2 from 0 to R = pi R^2.

A really pretty one cuts the circle into wedges, then rearranges them by alternating direction to make a "rectangle" approx r high, approx pi * r wide, with bumpy top and bottom. In the limit this has area pi * r * r, and can be shown to kids without needing calculus.

And it's not magic or circular, since pi is defined (in this case...) as the ratio of circumference to diameter.

Re: Ask HN: Anyone know any funny programming jokes?

#865
post #185

Earlier quoted context omitted.

Reminds me of There are only 2 hard things about programming: - Cache invalidation - Naming things - Off-by-one errors

Cache invalidation isn’t hard, but it used to be and now we can’t get people to think otherwise.

cache invalidation is not hard indeed, but people always forget about it (so caches aren't caches aanymore, they become stale copies of things...). People tend to forget that a cache has to have a fixed size and an eviction policy.

Re: Ask HN: Anyone know any funny programming jokes?

#867
A programmer and his wife moved to a new house. When they arrived, he looked around and said, "I think the moving company ripped us off... I paid them to move 40 boxes of our belongings, but I count only 39." His wife said, "Maybe you should count them again to make sure." The engineer started counting again, saying, "Zero, one, two, three..."

Re: Ask HN: Anyone know any funny programming jokes?

#869

This isn't exactly a programming joke but considering how many of us physics majors become programmers, I think it works: Heisenberg, Shrodinger and Ohm were driving down a highway when they get pulled over by a cop. The cop asks Heisenberg if he knew how fast he was going, as you can surmise, he claimed he didn't know because he knew exactly where they were. The cop, finding this suspicious (and because this is not…

In real life, an interviewer was talking to Werner Heisenberg. They were getting to the end of the interview, but before they wrapped up, the interviewer asked, "So, tell me Mr Heisenberg... What do you think of the jokes?" Werner Heisenberg sat forward with a twinkle in his eye and said, "What jokes?"

Re: Ask HN: Anyone know any funny programming jokes?

#870
post #362

An infinite number of mathematicians walk into a bar. The first mathematician orders a beer. The second orders half a beer. "I don't serve half-beers" the bartender replies. "Excuse me?" Asks mathematician #2. "What kind of bar serves half-beers?" The bartender remarks. "That's ridiculous." "Oh c'mon" says mathematician #1 "do you know how hard it is to collect an infinite number of us? Just play along". "There are v…

I prefer snappier versions of the first half, like: An infinite number of mathematicians walk into a bar. The first says, "Give me a beer." The second says, "I'll have a half a beer." The third says, "A quarter of a beer, please." The bartender pours two beers and says, "Come on, people. Know your limits." Copy-pasted from https://owlcation.com/stem/Worst-Math-Jokes-and-Math-Puns , but there are many similar versions…

Yes. The version before was like going nowhere.
Post reply on HN