15

Don’t you hate it when people completly overcomplicates code?

The bottom one is my edit of the code.

Comments
  • 12
    it could be:
    - just for practice
    - easily reusable/extendable code
    - for further code split in blocks like methods/functions/data etc.
  • 6
    Abstracting code like this can be really useful in the long run. Me and a work colleague are currently re coding a web application as nothing was abstracted. If you wanted to edit something you had to do it in 50 places.

    Just think what happens if you now have to support multiple languages. Rather then editing one function you now have to edit everywhere where you print.
  • 5
    Short code isn't necessarily better
    In this case I'd suggest the first snippet is better, assuming they're using that decorator more than once, although I would argue it could be better to make a function to print a decorated string
  • 0
    Does it always take two weeks? Why is that length of time hard coded ?
  • 2
    @j4cobgarby but he only use it once
  • 2
  • 0
    Maybe he only used it once _yet_?
Add Comment