Skip to content
DevMeme
1997 of 7590
CodeQuality Post #2226 · source on Telegram

Code Confessions: The 'Less Gross Name' TODO

Description

A screenshot of a code editor with a dark theme, displaying what appears to be JavaScript or TypeScript code. The focus is on a JSDoc comment block above a function definition. The comment contains a humorous and relatable developer note. The visible code includes functions like `isInsideParentTop(elementY)` and `isInsideParentBottom(elementY)`. The highlighted comment block reads: '/** * TODO find a less gross name. * @param elementY * @return {boolean} */'. This image captures a candid moment in software development, where a programmer leaves a self-deprecating note for their future self or colleagues. The humor resonates with experienced developers who understand that naming things is one of the hard problems in computer science and that sometimes you have to leave a 'gross' name as a placeholder just to keep moving, flagging it as a piece of technical debt to be addressed later

Comments

17
Anonymous ★ Top Pick There are only two hard things in Computer Science: cache invalidation, naming things, and TODO comments that become permanent architectural features
  1. Anonymous ★ Top Pick

    There are only two hard things in Computer Science: cache invalidation, naming things, and TODO comments that become permanent architectural features

  2. Anonymous

    This code finally reconciled CSS layout with Euclidean geometry; the price was a function called isInsideParentBottom() - proof that eventual consistency applies to naming conventions too

  3. Anonymous

    After 15 years in the industry, I've realized that 'grass name' TODOs are the technical debt equivalent of 'temporary' AWS resources from 2019 - they become permanent fixtures that future archaeologists will puzzle over while refactoring your legacy codebase into whatever quantum-blockchain-AI framework is trendy in 2030

  4. Anonymous

    Nothing says 'I know this is terrible but I'm shipping it anyway' quite like a TODO comment admitting your function name is gross. At least they documented their shame in JSDoc format - that's the kind of professional self-loathing that separates senior engineers from juniors. The function will probably still be called 'isInsideParentBottom' in production five years from now, with three layers of wrapper functions around it, each with their own TODO about renaming it

  5. Anonymous

    Define the coordinate contract once; otherwise every isInsideParentBottom() becomes bottom + padding + size.height + hope - and the drag feels flaky at 125% DPI

  6. Anonymous

    isInsideParentBottom(y) + safePadding + size.height + getClientRects()[0] - frontend’s eventual consistency: if it looks right within a couple pixels, we call it inside

  7. Anonymous

    TODO: less gross name. Reality: DOM parenting was never meant to be pretty - it's all gross margins and boundary issues

  8. Deleted Account 5y

    Лан

  9. @LastStranger 5y

    In java you need two monitors, the first vertical orientated, for code and the second horizontal orientated to see full name of method in one string

    1. Deleted Account 5y

      one for class names and one for stack trace

      1. dev_meme 5y

        stack traces for C

        1. @zvr63fu 5y

          > стек трейс в С Segmetation fault (core dumped)

    2. Deleted Account 5y

      that's js tho

    3. @doorhinge 5y

      alt+z

    4. @nameToString 5y

      System.out.println

  10. @obemenko 5y

    Damn this method names look kinda thicc

  11. @crysknight 5y

    Easy: isInsideStepParentBottom

Use J and K for navigation