Saturday, October 29, 2016

good ol' rsync

Among other backup strategies for my laptop (including, frankly, moving a lot of important stuff to Dropbox, despite the minor security concerns) I like doing some file syncing "the old fashioned way", manual copies to a plugged in USB drive.

I had to interrupt a copy of my main "~/data/" folder though, and didn't want to take the time to start another full copy, so I googled and was reminded of rsync:
rsync -av /source-path/source-dir/ /other-path/dest-dir/
as the stackechange page I cribbed that from reminds me, assuming you want "dest-dir" to have the same contents as "source-dir" make sure both the old and the new paths keep their trailing slashes, otherwise you might be off by a level.

Tuesday, October 25, 2016

low contrast ain't so easy on the eyes

How the Web Became Unreadable - the tl;dr is that too many sites are using gray text on somewhat lighter gray backgrounds - that in theory this makes thing "gentler" on the eyes but for many just makes things harder to read. My comment was:
I have sympathy for people who struggle with what is almost certainly a designer trend kind of thing, done just to make a page feel a bit more hip. I’m crossing my fingers that the trend doesn’t take a cue from AMOLED-tuned screens and start putting light text on black or very dark backgrounds; for many people with astigmatism, that’s a recipe for dancing afterimages everywhere. (To the extent that sometimes I “Select All” text on a dark site in the hopes that the selected text background is a more balanced color.)
So, here's hoping!

Tuesday, October 18, 2016

php. for reals.

From Taking PHP Seriously:
Most programmers who have only casually used PHP know two things about it: that it is a bad language, which they would never use if given the choice; and that some of the most extraordinarily successful projects in history use it. This is not quite a contradiction, but it should make us curious. Did Facebook, Wikipedia, Wordpress, Etsy, Baidu, Box, and more recently Slack all succeed in spite of using PHP? Would they all have been better off expressing their application in Ruby? Erlang? Haskell?
I think it's a great defense of the platform. I think so many developers underestimate things because they don't feel "engineer-y" enough. Bespoke complexity that grows up because the tools were too simplistic for the task at hand is not always that much worse than the complexity of opaque systems that are hard to debug. Transparency (in this case, the ease of following codepath execution), accesibility/ease of setup, tight code-run loops, having a ton of baked-in utility functions without pursuing versioning hell... these are great things.

Friday, October 14, 2016

if your nose runs and your feet smell you must be umopepisdn

Less-than-earthshaking update:

Playing with the look of this blog. For a long while I just had it mirror the oversized image of alienbill.com. Now I'm mirroring the starkness of kirk.is, but I'm not sure it's really working.

Anyway, keeping notes on day-to-day things is crucial for most developers. For a few weeks I've tried a new angle on it, a single note in Evernote (I generally prefer the minimalism of Simplenote, but I use that for my personal stuff and like keeping the work stuff separate) called the "UPSIDEDOWN LOG". I'm experimenting with reverse chronological order (even for intraday additions), I just like how the past recedes into the distance and I don't have to scroll to the bottom all the time to add new stuff.

Monday, October 10, 2016

itunes store search: "100 matches ought to be enough for anybody"

Back to being "Kirk's UI Gripe Blog"...

Man, iTunes store search is so pathetic. Supposedly a while back they had a power search mode, but now it's just keywords. You can't search for just a song title, for instance, you're going to get any artist or album who has the same name. Even better - their version of "All Results" cuts off at 100. So if there are over 100 non-title matches for a song you're trying to find a good cover of, and the song's title is later in the alphabet, there's no way the song you're looking for will show up on the list.

Even more insulting is the message after those 100 items:
"Less relevant items are not displayed. To narrow your results, use more specific search terms."

I would if you'd let me, jerky.

Friday, October 7, 2016

fixing wordpress plugins

Yesterday I had a venture in the extraordinarily un-glamorous world of Wordpress.

A friend accidentally "white screen of death"'d her company's site. Apparently, it can be a really bad idea to hit "Update All Plugins" (maybe especially if you are running an older version of PHP? Not quite sure.)

I admit, I'm a better developer than admin, which was that this called for.  Still, I decided to give it the old college try.

I was grateful that the shared GoDaddy site still offered normal ftp and better yet, ssh access.

I saw there was a boiler plate Wordpress index.php. Oddly I could run "php index.php" from the shell and a more or less normal looking site was generated. So after putting the regular index.php safely aside,  for a while I replaced it with the content of running php in the shell... not perfect (both in terms of missing theme and showing bare [plugin] slugs) but better than a blank screen or a "Under Construction" link.

What To Do When A WordPress Plugin Causes An Error was a helpful link. Things were so bad that the plugin admin page was also white screening, but I admire how hackable it is... each plugin was represented by a subdirectory in a general plugins folder - and to deactivate a plugin, you can just remove there. We did that, and the admin page returned (as did the main functionality, so I put the default index.php back) Then, you can put all the plugin folders back, but, oddly, but usefully, they're all deactivated. At that point we turn them on one by one (making sure we knew which directory entry they corresponded to - usually it's obvious but in a few cases we had to click on the link), found the one that was killing stuff, and left it out.

Anyway, I appreciate how Wordpress has a lot going on, but you can still follow the logic...