Skip to content
DevMeme
957 of 7590
DevCommunities Post #1080 · source on Telegram

How an Engineer Names Every Computer

Description

A screenshot of a Twitter interaction. The first tweet, from a user named Abby Fuller, poses a challenge: 'you're an engineer? prove it. name every computer ever.' Below it is a reply from a user named Richard, who, instead of listing computer models, provides a snippet of code. The code is a 'for' loop written in a language like JavaScript, which iterates through an array called 'computers' and assigns the string 'ever' to the 'name' property of each element: 'for (let i = 0; i < computers.length; i++) { computers[i].name = 'ever' }'. The humor lies in the literal, programmatic interpretation of the ambiguous phrase 'name every computer ever.' Instead of reciting a list, the engineer provides an algorithm to perform the action of naming, perfectly encapsulating the logical and often pedantic mindset of a software developer

Comments

7
Anonymous ★ Top Pick The product manager said, 'I want you to touch every record in the database.' So I ran `UPDATE records SET modified_at = NOW()`. I don't see why she's upset
  1. Anonymous ★ Top Pick

    The product manager said, 'I want you to touch every record in the database.' So I ran `UPDATE records SET modified_at = NOW()`. I don't see why she's upset

  2. Anonymous

    Spec said “name every computer ever,” so the junior did a for-loop that set hostname='ever' across the fleet - now Prometheus thinks we’re running one giant existential monolith

  3. Anonymous

    This is the same mutation bug that caused our entire Kubernetes cluster to be named "production" last quarter, except the junior who wrote it used forEach and we couldn't even blame the off-by-one error

  4. Anonymous

    When asked to 'name every computer,' a true engineer doesn't waste time on enumeration - they just mutate the array in O(n) time. Bonus points for avoiding the classic 'computers.forEach(c => c.name = "ever")' because apparently we're still writing for loops in 2020. Though honestly, the real engineering flex would've been 'computers.fill({name: "ever"})' or just returning early with 'throw new Error("Insufficient memory to enumerate all computers")'. But hey, at least they didn't use 'var' and pollute the global scope

  5. Anonymous

    Classic requirements literalism: the O(n) mutating rename technically passes UAT, until the CMDB reports 30,000 identical hosts called 'ever' and SRE files a P1 for loss of identity

  6. Anonymous

    When 'name every computer ever' hits, engineers don't enumerate - they mutate the array in O(n) bliss

  7. Anonymous

    Proof of engineering: I named every computer “ever” - O(n) rename, O(1) creativity, and O(∞) tickets when DNS, AD, and the CMDB all insist we only have one very overworked host

Use J and K for navigation