You know it’s a Monday when you accidentally click on a banner ad.

Blur: 2014-09

I opened Steam for the first time in a while, and I realized how long it’s been since I’ve played a video game. Hell, I even forgot this site existed for the past few weeks.

I wrote a few times into a journal recently, and in general I’ve been writing, but not in this format. It’s getting even more tricky, in some ways, because media is so split all over the world. Facebook has a good hold, as does Twitter, as does so many other forms of media. It’s harder to get attention.

I went back to old emails, and I got a lot pouring over those pages. I used to write long letters, not all that often, but enough where I remembered writing them. I’ve been trying to do that a bit more lately. That concept swims against the tides of today a bit, though it can be intensely rewarding, much more so than the Social Media Zombie mode.

If you have any desire to write me, please do.

Technology has been in such a crazy state lately, enough so that it’s all getting to be a bit blurry. What Apple is doing looks a lot like Android, looks a lot like Apple. The science of UI has pushed forward; everyone has been stepping up their game. Processors are better than we need them to be, too, and the displays and cameras are so top notch that even the baselines push well past last year.

In the past few weeks, I’ve been relegating all my news viewing to Feedly, and setting limits so that I only go through the list twice a day. Same goes for most social networks. It’s full courses of information to replace incessant snacking. It’s working. I’m more relaxed. I still feel the twitch to break the rule, but when I do that’s time to zone out a bit and take a breath. I don’t need those updates; nothing all that new has happened that I cannot wait to read.

Zen mind is about clean pipes which can take in the full throttle of life with no congestion, processing streams with aplomb.

NYT: Soda as 12k Steps

Drink Soda? Take 12,000 Steps. Yup. Sugary drinks are total bullshit. Those 12,000 steps clear 75g of sugar, which is just two cans worth.

Tor: Viking Warriors 50% Female

So this is flippin’ awesome. Thank you to Jason for sharing.

It’s with a heavy heart that I admit that Philadelphia’s Federal Donuts is no longer a part of my daily routine. #IllBeBack, though

Bear Saves Crow

Pretty awesome video. Them bears, they often get no respect, but..

grep for naming conventions

I’ve used grep for years, now, though in the past few days I found a nice combination of it and some other command line utilities to do a bit of an audit as to how I’m naming methods and variables in the code I’m writing.

-oh # that’s how it works

a shortcut for --only-matching, this option won’t show the whole line, just the part that matches your search criteria
a shortcut for --no-filename, this will hide the first part of the normal output, so you can look for trends across files more easily

Put these two together, and you can then pipe the output over many files into sort and uniq -c to get an alphabetized, counted list of every instance of the pattern you want to find. You can also then pipe that all into a final sort -n which will sort by the count, such that the biggest fish fall to the bottom.

Use case: camelCase vs. underscores

Putting this all together, you can get a general command something like this:

grep -oh $PATTERN $(find . -name \*${EXT}) \
	| sort | uniq -c | less

To find underscore_separated_words, use PATTERN='\w\+_\w\+'; for camelCase, let PATTERN='[[:lower:]]\+[[:upper:]]\w\+'.

Finally, set EXT='.php' to look over just your PHP files, or change it to any extension of the types of files you want to inspect. You can also use grep’s -r flag with a target directory if you want to recurse through all files, rather than limiting yourself to files with a particular extension.