DEV Community

Discussion on: What's your favorite line of code?

Collapse
 
daniel13rady profile image
Daniel Brady

That sounds great, but I'm not sure I'll ever be good enough to write a line of code that never gets modified before being deleted. Seems like a good goal to strive for!

Thread Thread
 
bittnkr profile image
bittnkr

Sorry for the 'never'...

I mean, a line of code to be "perfect" must:

  1. Solve the problem
  2. Be reliable
  3. Be easily tested or (pardon the heresy) dispense testing
  4. Be as terse as possible
  5. I can forget about it.

But my really favorites, "the perfect ones" are those that beyond that, yet saves me the typing of another lines. :D