Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

>Another legacy app I'm employed to "repair" has one single 'template' for every page on the whole site. Its first ~500 lines conveniently consist of a giant and highly nested if/else clause to set the page variables and inline javascript.

oh, oh! I'm doing one of those. Only, it's a modern, MVC version, so there's actually a couple of dozen controllers with a single function each, and all actions snake through The Great Maze of Ifelsedom to set their rightful values, before traversing it once more on the page view file

Manager: "Uhm, I thought you said changing that label would be a 5 minute task?"



Whenever something like that happens, this is my reference: http://developerexcuses.com


  git commit -m "$(curl -s developerexcuses.com | sed -n '/<a.*>/{s/<[^>]*>//g;p}')"


Nice bit of sed. :-) Here's the best awk, I could muster:

  awk -F'>' -v RS='<' '/a href/{print$2}'


There's also:

    lynx -dump -nolist developerexcuses.com




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: