Monday, April 25, 2016

uniq shell quickie quirks

I had a bunch of small text files in a directory, on some CENTos system, and I was pleased to realize
more *txt | cat
would print each file name as well as the contents.  But it didn't work in my default MacOS shell. This stackoverflow gave me a better idea:
grep "." *txt
which is nice because it was leaving out the empty files - it also did the format "filename:contents" which worked ok for my needs.

Ok, not rocketscience, but a reminder that different Unix-y shells have different implementations of some basic text manipulation commands.

Friday, April 22, 2016

tom chi on rapid prototyping and product managment



It's interesting comparing his "Culture of Yes + No" / "Culture of Learning" to the human development ideas of Fixed Mindset vs Growth Mindset.

Man, sometimes I do wish I was on a fast prototype team like that.... it's really the sweetspot of what I'm good at.

Thursday, April 21, 2016

old school unix text processing

Sometimes it's nice to know about old school unix command line tools - though I'd welcome other solutions to this problem:

At work, we wanted to move some "human readable error messages" processing to the front end. One aspect of this was to get a list of the error codes a certain service could produce (since we didn't necessarily want to come up with human readable version of VERY error the whole backend system could produce.)

The error constants where all of the form ErrorMessages.SOME_VALUE. so my first step was top copy and paste the contents of the file (a little easier than locating it on the file system in terminal) into
grep ErrorMessage > tmp.txt
Then I copy and pasted that (again, pipes is the cooler way, but whatever) into my editor, hand tweaked some of the content to make it consistent (push all the entries to the left side and getting rid of any other code that snuck in on those lines) and then copy and pasted THAT into
sort | uniq > tmp2.txt
(Uniq says show me only one copy of a line for a block of repeated lines, but if you sort it first, it will make sure you only see one per actually unique line.)

And now I have a list of potential error codes to ask my product manager about!

Monday, April 18, 2016

grumble grumble

Apologies for not much in terms of updates lately (combined with reassurances to anyone who might be looking in on this that this blog is indeed an active concern)

Today's random gripe: Safari's address bar autocompletion is slow enough, relative to habits trained into my physics on chrome, that I see more about Good Morning America (gma as in gmailand European Soccer (FA as in facebook) than I otherwise would.  Between that, clutzier download management, and inferior delete tab recall, it's a shame that Apple puts forth such a lagging browser.

Thursday, April 14, 2016

sweet bureaucracy

Sometimes I wonder if over-eager code testing policies are a bit like excessive password complexity requirements and expiry; both sound great on paper and give certain types of administrative types warm fuzzies, but unless used properly just make things worse.