Friday, March 27, 2009

Python back on my desktop

This week I was doing some stuff with some log files. In the logs there were some periodic logs that appeared every 30 seconds which was distracting and annoying.

In UNIX this is of course swoosh, its

tail -f logfile | grep -v pattern >> outfile

Alas running on my Windows desktop Microsoft in its wisdom sees no need of such conveniences like tail and grep.

So what to do? Of course, what I did back at SupportSoft when I had to deal with this. Write a Python script to tail and grep. It was pretty easy since there was already stuff on the Internet for that - of course in Python it was only about three lines anyway. And just like that I was in business, no more annoying periodic log messages.

It was a bit strange though when I went to write the script. I was surprised to notice that I didn't even have Python installed on my desktop. That's weird, have I really gone that long without it? Maybe since I switched jobs close to a year ago it takes a while to properly get settled in and comfortable to the point of firing up Python to make your day more productive and enjoyable. Plus I've switched to a new team recently so maybe the dynamic here is somehow different in some more positive way that steered me back toward my correctness of the past.

Anyway I'm glad to have it. Since then I've had my interpreter up all day long and it's just pleasing to see it there on my taskbar, like an old friend. I even found some more uses for some quick one line things. So welcome back to my desktop Python.

Monday, March 09, 2009

Non functional requirements

This is kind of a strange one if you think about the name. I mean, why would you want the software to be non functional?

Of course we know what non functional requirements are. That is stuff that an end user or even tester cannot verify directly by using the system. Such as "all code is reviewed", "JSF will be used to generate the GUI web pages", "database access will be through stored procedures", "development will follow the S methodology". Stuff like that. But if you look at the name itself in isolation it's kind of funny.