2012w15

This has been a pretty rough week, but I guess there is nothing less to expect when deadlines are drawing near.

This week I found myself wanting to count all the occurrences of “foo”, but ONLY if they occurred BEFORE “bar”:

awk 'BEGIN { fooCount=0; stopCounting=0 } /bar/ { stopCounting=1 } /foo/ && stopCounting=0 { fooCount = fooCount + 1 } END { print fooCount }' <myfile>

And despite the quite hectic schedule, I did manage to help a colleague with a little scripting, and those are two things which almost always sets me in a better mood: scripting (problem solving), and helping others (of course, if I don’t manage to be of any help, that kindof defeats any positive mood change I get from scripting, but in this particular case it all worked out really well in the end) :)

And now for the mandatory collection of links from this week:

  • This must be a joke right? The US can’t really, for real, be irritated with Australia for preferring national service providers over American ones, right? Especially when it could come down to storing data about Australian citizens, or in other ways vital to the government. This has to be a joke right?
  • I wonder if this is something most programmers can relate to or if it’s just me
  • This post could have been written by me… well, not as articulate, but the spirit of it. What’s even more interesting is the response this triggered on HackerNews.
  • QArt Codes is where QR codes, Solomon-Reed error correction, some extra calculations and your imagination mix together ;)
  • Hilarious post making fun about certain governments and their want for even more snooping laws, especially about conducting surveillance in in-game chats…

:wq

Tags: , ,

Comments are closed.