some folks left the angular codebase full of ridicolous console.logs, client was upset as he noticed it during UAT

1. add extra script in main template page
window.console.log = function(){};
2. translate it into JSFuck
3. if they ask, pretend it's a super-secret encryption algorithm to improve security

  • 0
  • 1
    But why jsfuck, isn't that just making life more complicated for the next Dev ?
  • 2
    Overriding built-in functions? Yikes! Better global replace "console.log(" with "//console.log(" ?
  • 0
    I joined the proj weeks before prod,codebase was a mess, no unit tests, and spies on integration tests on console.log calls... plus client pissed off because of those freaking logs. override the function was the quickest fix (and probably the dirtiest) that came to my mind on two legs
  • 3
    @incognito jsfuck was only to buy time with the client, as he was checking the bundle and the source code. even he's not into coding, he knows enough to be annoying (given that was also right...)
    Codebase needs to be fixed, the jsfuck thing is only a monkey patch that we didn't want to show
  • 0
    Just webdev things
Add Comment