Programmer Humor
!programmerhumor
help-circle
rss
12



21




American Sort
If an element is out of order, remove it from the array. An example in everyone's (least) favorite language: ` const americanSort = (list, compare) => list.reduce((acc, cur) => { const lastElement = acc.length > 0 ? acc[acc.length - 1] : null; return lastElement ? compare(lastElement, cur) < 1 ? [...acc, cur] : acc : [cur]; }, []); ` `console.log(americanSort([5, 2, 6, 5, 20, 10, 40], (a, b) => a - b))` outputs `Array(4) [ 5, 6, 20, 40 ]`
fedilink
5



via this tweet from 2015 https://nitter.net/jaz303/status/573443775030259712 ::: spoiler explanation, for anyone lucky enough not to get it despite reading the Programmer Humor lemmy it's a parody of a terrible website called Hacker News https://news.ycombinator.com/ :::
17
Builder News



True Story
20





What do you call an open source developer?
An open sourcerer.
fedilink

22

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 0 users online
  • 1 user / day
  • 1 user / week
  • 14 users / month
  • 69 users / 6 months
  • 2.19K subscribers
  • 419 Posts
  • 817 Comments
  • Modlog