Make it!

Preheat oven to 425℉

Make the bacon: Line a rimmed cooking sheet with foil. Put the bacon in a single layer on the sheet. Throw in the oven for 10 minutes, then rotate the pan and leave in there for 5–15 minutes more (depends on thickness) until the bacon is well-done and dark. Place the bacon on a paper-towel lined plate. Reserve some of the grease from the sheet for the casserole dish.

While that’s going on, in a large skillet on medium heat with some oil (or some of the bacon grease!), sauté the onions and a big pinch of salt until translucent (7-ish minutes).

Add the ground beef and another pinch of salt and cook until browned. If it’s a wet mess now, drain it.

Mix in ketchup, mustard, and pickle bits. Crumble the bacon strips and mix that in too. Season to taste with salt and pepper.

Grease a 9x9in casserole dish with some of the bacon grease. Or Pam. Whatever. Put the meat mixture in there, then top with the tater tots in a single layer.

Place in oven. Reduce temp to 400℉. Cook for 35 mins or until the tots are browned.

Sprinkle a little salt on the tots. Top with american cheese slices and put back in the oven for another 1–2 minutes until melted.

I am now undeniably in my late thirties. I have been joking that I’m “almost 40” since the moment I turned 31. That doesn’t seem like a joke now.

Your life is your habits, and before buying the Volvo I did not have a habit of driving one car for long. I wrecked a Mazda Protegé after barely two years. A Honda Civic was stolen from a parking lot while I watched Pirates of the Carribean. I replaced that with a Miata that I replaced with a Subaru that I replaced with another Miata.

I loved those cars. Or I think I did? Although I can’t say that they made me happier or fulfilled, exactly, they were fun. While I wouldn’t call the C30 fun, I still like it.

I swapped the Miata for a Volvo when I swapped the single life for a shared life, a life with my wife and a puppy. I was ready to let more in, to grow; my two-seat roadster could not.

I have never wanted to trade back.

The C30 is a little worn around the edges. The driver’s seat has a sizable coffee stain. The dog has shredded parts of the back seat. The driver’s side floor mat has a hole where my foot has been resting for 100,000 miles. One of the battery terminals is corroded, but that’s replaceable. It’s on its third set of tires, second set of brakes, second A/C compressor.

I, too, am a little worn around the edges. Fifteen years ago I was able to finish a marathon (not recommended) and since then I have gained 25 pounds (also not recommended) and can barely run a half mile now. My shoulders creak when I rotate them; I’m not sure they’re replaceable. I am on my second “10 year” hoodie, 10 years sounding like a lifetime when I bought it.

Although it doesn’t have an attention-grabbing design, it has a timelessness (aka boringness) to it. The best angle is from the back; this car has a rear end to die for. The less said about my rear end, the better.

The exterior is scratched up. When I was three years old a neighbor kid whacked me over the head with one of those wooden ducks on a stick—I am telling you this partly because that is a fun sentence to write—and I required three stitches. I finally can’t see the scar. More recent burns and scratches heal slower and slower while time in all other aspects seems to go by faster and faster.

I shave my head to avoid knowing precisely how thoroughly I have gone bald (yay, genetics); ignorance is bliss. Also I think I have a pretty nice-shaped head (yay, genetics). Having a nice-shaped head is the sort of thing that adults say to you when you’re younger and you roll your eyes and wonder what synapses fired in their minds that compelled them to say that and you definitely don’t thank them for saying that but now you look in the mirror and think “you know, it is a pretty nice shape” and you wonder how many other complements you’ve brushed off and you are filled with regret.

The seats are the bomb. I better understand the value of having a comfortable place to sit.

I’ve never used the CD player. The radio has been permanently welded to NPR for several years. This will probably be the last car I own that does not some sort of integrated touchscreen and voice control and bluetooth and autopilot. I plug my phone into a headphone jack like a farmer.

A year or so ago on a chilly night in Indiana I spent several minutes yelling variations of “sync iphone!” into the space-age, stubborn, voice-controlled console of a newer rental Mitsubishi. I could not “sync iPhone.” I yearned for a manual, like a farmer.

The doors are heavy and huge and nearly always nearly banging into things. I don’t think I’ll get a two-door car again. Live and learn.

I get a little smarter every day. Younger me was and will forever be a dumbass. I’m glad he’s gone now.

The other day I was shopping for presents at a toy store and, upon seeing a toy crossbow, I remarked to my wife that it looked as though it could “take someone’s eye out,” thus revealing to all within earshot that I was in fact over two thousand years old, taking advantage of Small Business Saturday while on a break from guarding the Holy Grail.

File photo

The fuel economy is fine, but could be better. The Volvo prefers premium high-octane unleaded, but I often cheat and put in regular. I eat more vegetables these days, but I sometimes cheat and put in Taco Bell. I’m trying to read more books, but I still read plenty of random internet trash (👋).

The Volvo C30 is not the fastest car, but it’s fast enough. I’m not the cleverest, but I’m quick enough. It doesn’t have an abundance of cargo space, but it holds enough. I don’t have all the answers, but I know enough to listen to others. At least, I try to.

I/it need/s more maintenance than I/it used to, but I feel like I know myself/it better.

I’m thankful it’s still running.

8 out of 10.

]]>https://www.leereamsnyder.com/blog/the-medium-place
https://www.leereamsnyder.com/blog/the-medium-placeTue, 23 Oct 2018 12:00:00 GMTSPOILERS FOR SEASON ONE OF THE GOOD PLACE AHEAD

For well over a year I’ve had an idea for an article bouncing around in my head. I planned on titling it “Facebook Is The Bad Place.”

First, we need to talk about The Good Place.

The first season of NBC’s The Good Place is all misdirection. Eleanor Shellstrop, played by Kristen Bell, dies and wakes up in “The Good Place”, an all-but-in-name Heaven reserved for only the people who have lived the most virtuous lives during their time on Earth. Everyone else ends up in “The Bad Place,” a torture chamber of endless bureaucracy and “butthole spiders”.

(It’s a weird show. Hang with me.)

The initial twist is that there’s been a mistake: Eleanor is a terrible person—she refers to herself, not without some pride, as an “Arizona trashbag.” She doesn’t belong, and she lies to nearly everyone while she tries to figure out how this could have happened.

As the first season progresses, other people get sucked into Eleanor’s deceptions, the lies spiral out of control, and everyone ends up stressed out and at each other’s throats. Eventually, Eleanor notices how much this all feels, well, not good, and realizes the truth: they’re all in The Bad Place, and they have been the whole time.

The Good Place, as they know it, was an experiment designed to feed their insecurities and have the protagonists end up torturing each other for an eternity.

The other day a cold snap was approaching, and we found out our furnace blower was busted. No heat. ☃️ I put out a post on Facebook to see if anyone nearby had some space heaters we could borrow.

A bunch of friends got back to me, and we had access to more space heaters than we needed within 20 minutes.

A few days later, my birthday was approaching and Facebook asked me to start a “birthday fundraiser.” Facebook even offered to chip in two whole dollars to start it off. I shrugged, decided to take Facebook’s money, and started a fundraiser for the Alzheimer’s Association with a goal to raise $200.

We blew past that within hours. I decided to match some of the donations, and as of right now we’re at $867!

Alzheimer’s really effing sucks. My Grandad had it. Although he was one of the smartest people I ever knew, towards the end he could barely follow an episode of Law & Order. It’s a shitty disease, you guys. And we’ve whipped together nearly $900 to fight it.

For the first time in a long time, it was actually fun to check Facebook.

Could I have texted some friends and asked for some space heaters? Sure, I guess. Could I have hit up people I know directly for donations? Sure, I guess. But it wouldn’t have been so easy.

This pops my “Facebook Is The Bad Place” bubble a little bit.

And yet.

I still kind of hate it.

Over the past several years I’ve worked to cut way, way, way back on Facebook. I was on it too much, and I didn’t feel like I was having a good time using it. If I was especially bored at work, sometimes I’d have Facebook open, and I’d find myself wondering “Hey! Maybe I should check Facebook…” and ⌘+T and open Facebook while I had literally just been looking at fucking Facebook. That didn’t feel great.

Pro tip: log out and move the app far away from your home screen. The additional friction of having to log back in turned out to be juuuust enough to help me stay off of it. Your mileage may vary.

I’m not out to cast judgement; if you enjoy using Facebook for whatever reason, more power to you. But I feel better when I’m on it less.

And yet.

I can’t bring myself to delete my account entirely.

There is good in there.

A few weeks ago the New York Timesran a profile of Michael Schur, the creator of The Good Place, and it discussed one of the major themes of the show:

As an over-the-top avatar of all our worst impulses, Eleanor is severely allergic to any notion of community. And yet her salvation will turn out to depend on the people around her, all of whom will in turn depend on her. What makes us good, Chidi tells her, is “our bonds to other people and our innate desire to treat them with dignity.”

If there’s good to be found in Facebook, it’s going to come from the decent people who use it, and the connections to them that it allows. And, make no mistake, they are there.

I’m thankful that they are. Truly.

…

…

…

I guess the current status of my relationship with Facebook is “It’s complicated.”

It took me a while, but this site is back online, and looking pretty OK again.

New look!

After more than five years with the old design, I was tired of the previous look and I was fighting too much with the current CMS, so it was time for a refresh.

For reference, here’s the old home page:

And the new:

The new color scheme came together for me when I found this promotional image from Chrono Trigger—probably my all-time favorite video game—floating around the web:

You can probably spot the source of the red, blue, and gold splashed around here now.

I’ve changed typefaces to Concourse and a splash of Triplicate, both by Matthew Butterick. Triplicate takes design cues from typewriters, a fitting tribute to the eight years I spent at IBM. Meanwhile, Concourse is a dang nice geometric sans: flexible, legible, with a full rangeof weights, true italics, some fetching small caps, and enough personality to be interesting but not overwhelming.

On pages with a lot of images like my work history and the home page, I struggled to find a cohesive way to present a bunch of disparate images. I’ve always liked how sites like Polygon or the departed Wildcard manage to use various color and graphic overlays to tie a bunch of random images together. I settled on a dithering effect that looked handsome, adjusts to different screen sizes naturally, and could be done on-the-fly in just a little bit of JavaScript. Bonus: because the dithering effect destroys fine details and subtle color gradients anyway, I can send down absurdly low-quality, fast-loading image files. Win win win.

Vastly improved performance

Since I was rebuilding everything from scratch anyway, I worked hard on improving my site’s loading times.

First up, there’s way less JavaScript. With advancements in the language and better cross-browser support for standards, there’s far less need for helper libraries. I didn’t need to load Typekit (I’m self-hosting my fonts) and I kicked out Google Analytics as I never got any great insights from it and I’d prefer to not let Google track you all over the internet. All told, I went from 46kb to less than 6kb in scripts if you’re using a modern browser, an 88% reduction. (It’s 15kb for older browsers, when I even bother to serve them JavaScript.)

Styles are also way down, from about 10kb gzipped to under 4kb, depending on the page; I inline all the styles any individual page will need, so there’s no blocking request holding up the works.

Fun fact: years ago I opened a bug against CodeKit because the 3000+ line single .less file for my old site was so ridiculously big that it was causing a crash. That was dumb. Break up your code.

I also jump through every possible hoop to load and swap in custom fonts in a sane and performant manner.

The same test with mobile CPU throttling and a 3G network still scored a 95.

The previous codebase scored 0. That isn’t a joke. 😢

I haven’t dug into service workers, and I’m doing nothing intelligent with images, so there’s still work to do. But for a first pass I’m very pleased.

Meet my new Content Management System

So I mentioned above that I’m now serving pre-built HTML files. I pulled all my data out of my ExpressionEngine database and I’m now generating my entire site with a static site generator of (oh god no) my own creation.

It’s wildly impractical and will probably only ever work just for me. I call it “Homer”.

I can’t recommend that others do this. I mostly wanted to not maintain a database, write content in Markdown, and spit out boring HTML files that I could dump on any stupid server anywhere. That’s table stakes for a static generator.

On the one hand, sometimes it’s nice to muck around with a bunch of tools. And Homer does do precisely what I want it to do. It’s also very fast: it generates the entire ~600 page site and all the supporting bits in about 10 seconds from a cold start, and while developing reloads are basically instantaneous.

On the other hand, existing and proven solutions like Jekyll or Metalsmith do like 95% of what I would want them to do, they already existed, and someone else maintains them, which is super nice.

Who knows if I’ll stick with this monstrosity, but if you’re looking for a static site generator that…

reads site structure, content, and metadata from a folder of Markdown files;

generates HTML files and RSS and JSON feeds;

adds metadata like “Previous post”/“Next post” to those files, but, err, only if they’re in the /blog content directory right now;

is barely configurable unless you happen to have written it, in which case, it’s very configurable;

runs locally on port 6847, which spells out the name of my dog OTIS on a telephone keypad;

outputs a shitload of emoji while developing locally;

and, uhh, usually mostly works…

…get in touch! Maybe I’ll open-source it.

]]>https://www.leereamsnyder.com/blog/new-skool-uniq-in-internet-explorer
https://www.leereamsnyder.com/blog/new-skool-uniq-in-internet-explorerThu, 11 Oct 2018 12:00:00 GMTI just found this bug in IE11 (and presumably other older browsers) at work, and I didn’t see any clear Google results with the fix, so here goes:

Let’s say you learned a sweet trick to make an array have only unique values using Set() and the spread operator (...):

In a nutshell: a Set can only have unique values, and the constructor new Set() accepts an array for the initial values. So: Make a Set with the array, spread that into a new array, and 🎊 you have an array with the duplicates removed. Neat.

Mostly.

If you’re trying to make this run in Internet Explorer, you’ll need to include a polyfill for Set before you try it. The core-js package has one:

What isn’t 100% clear is that you also need to include the polyfill for Symbol, because that includes the Symbol.iterator magic property that lets you use the spread operator on the new-fangled bits like Sets:

Lots more on Symbols and iterators at Pony Foo. Reading those articles years ago are the only reason I knew how to fix this as soon as I saw it.

]]>https://www.leereamsnyder.com/blog/the-rock-will-be-president
https://www.leereamsnyder.com/blog/the-rock-will-be-presidentWed, 10 Oct 2018 12:00:00 GMTI have thought more about this short story by Robin Sloan than anything else in the past few months.

It is:

a short story

in the form of an email

proposing a book

that will become a movie

that will star Dwayne “The Rock” Johnson

that will prepare him to be President of the United States

I don’t know what percentage of y’all I just lost with each bullet point there, but it’s a frothy mixture of cynicism and hope.

The vast majority of the population supports background checks for gun buyers – up to 90 percent in some polls.

A majority of Americans support some kind of universal health care, 58 percent to 37 percent.

64 percent of Americans are worried about global warming. Only 36 percent are not.

And – get this – Americans overwhelmingly agree that immigration helps the country more than it hurts, by a 59 percent to 33 percent margin.

Okay?

Your country didn’t go anywhere. It’s right here where you left it. America is nothing more than a big ol’ collection of people, and those people are more diverse and progressive than they have ever been. That train won’t be stopped. Donald Trump’s supporters are by and large an aging and shrinking demographic.

I am suspicious of anyone that offers the one true reason for the loss, be it latent racism or overt racism or half the country is actually Nazis or economic populism or choice of candidate or Russians or spineless mainstream Republicans or voter suppression or media failings or Facebook news bubbles. It’s probably all of those things.

I don’t have a model of the American people that accounts for electing someone like Trump. He’s done too many things, said too many things, tweeted too many things that would typically be disqualifying in American politics. Remember when Mitt Romney was mocked for his car elevator? Trump has a house covered in gold. Remember when John Kerry was assailed for supposedly insulting the military by the Swift Boat Veterans for Truth? Trump slandered war heroes and Gold Star parents despite getting repeated deferments from Vietnam. Remember when John McCain was dismissed for seeming ill-informed and out of touch amid the financial crisis? Trump doesn’t know how NATO works or what the nuclear triad is.

I don’t resent working class folks for wanting “change”—hell, many of them voted for Obama—or demanding that someone pay attention. Who doesn’t want to be heard? I get it.

It’s, err, interesting that the new hero of the rural working class is a New York “elite” who lives in a gold-plated penthouse.

It sucks that Donald Trump is a Klan-approved, misogynistic, congenital liar, and a lot of folks were willing to look past that.

Well, if you voted for Trump but abhor much of what he said: you own it now. I trust that you’ll turn against Donald Trump when he fails you.

That said, I think it’s ridiculous that there’s so much hand-wringing over a swing of, let’s say, 100,000 people in the Rust Belt when, as of this writing, Hillary Clinton received 800,000 more votes than Donald Trump.

A majority of this country rejected Donald Trump, but he’s still President-elect.

I accept that he won by the rules that are in place right now.

But! Twice in the last 16 years, the person who received the most votes is not president. As a friend put it, “I’ve voted in 5 elections for 4 people. Of those 4, 3 won the popular vote, but only 1 became president.”

I have only lived in “swing states” and I want the idea of swing states to die in a fire. Everyone’s vote—from coast to Kansas, from city to suburb, from Montana to Maine—should be actually equal when it comes to electing our president.

I reject this rumbling that we owe Donald Trump an open mind and should hope for his success.

But Donald Trump is not ordinary: he’s openly racist; he has suggested that he would order the military to commit war crimes; he advocates religious litmus tests; he believes global warming is a hoax; he has threatened the press and his political enemies.

Update 2018 October 06: Taking a look at this nearly two years later, I’m comfortable saying that, if anything, the worries about Trump were UNDERblown. He’s a bad dude.

Believe me, I want to believe it won’t be so bad. That with the eyes of history and the weight of running the country on him that’ll he’ll cool his authoritarian jets.

However, I do not have a lot of faith that Trump will do zero of the things he has promised.

Be ready: do not accept attempts to rationalize or explain away Trump’s rhetoric, or his promises. Stay outraged. Do not compromise.

“But this should be a time of national healing!”

Nah. 8 years ago the entire Republican party decided their platform, in its entirety, was “not Obama.” I will be extending President Trump the same courtesy.

He’s an entertainer and an attention whore, not a public servant. He wants to be on TV and in front of crowds, not actually working a difficult, grueling, stressful job he can’t opt out of. He’s going to have to sit through SO many meetings, be forced to read SO many briefings, get shoehorned into serious business all day every day, without crowds to perform for, and he’s going to hate Every. Single. Minute.

A deep and broad movement that surpasses the 90s “culture wars” and the (ultimately futile) liberal reaction to the War on Terror. It can be hard to put your finger on exactly what you fear most about the rise of Donald Trump: the racism? The sexism? The xenophobia? The profoundly dangerous lack of judgment? We fear all of these things. What this movement will ultimately unite against, though, is the rise of an American strongman. We Americans have always fancied ourselves to be superior to the banana republics and quasi-dictatorships that we often helped create; now, we are offered a chance to prove it. If we do not wish to be the sort of nation that allows itself to be run by a strongman, then the movement starts now.

Trump doesn’t seem to like protests, so get out there (peacefully!) when he starts doing stuff that you disapprove of. Media coverage of protesters is media coverage that is not on his moldy-orange-that-you-left-in-the–back-of-the-fridge-for–8-months face.

]]>https://leereamsnyder.exposure.co/lee-kristin-go-to-iceland
https://www.leereamsnyder.com/blog/my-trip-to-iceland1Sun, 25 Oct 2015 12:00:00 GMTOver on the nifty site Exposure, I posted a lengthy set of photos from my recent trip to Iceland. If you ever get the opportunity to go to Iceland: go. Go! The entire country is an otherworldly glacial volcanic wonder, and I don’t know if I’ll see a more beautifully strange place in my life.

No one has asked me what kind of cameras I was using, which is I believe the ultimate compliment to the quality of my photos. But hey, maybe I want to talk shop for a bit.

I took what I’m starting to call my “dream team”: a Sony A7ii (yes, I caved) with the Sony-Zeiss 55mm and the Ricoh GR. I need to write more about the GR, but my short review is that it’s the best camera in the world.

As for the A7ii… well, I will say this: it is astonishing in terms of technical hit rate.

First, the autofocus never misses. I took 413 pictures in Iceland with the A7ii and of those only 3 were instant-deletes due to missed focus. Put another way: it hit perfect focus more than 99% of the time. That is insane. That’s with the select-your-point focus with the smallest possible target size, by the way; I’m sure that helped. Still: insane.

Second, the in-body stabilization is another miracle-worker. With a series of pictures of a waterfall, I would drop the shutter speed to 1/10 of a second to blur the water in motion. Then, I’d fire off a burst of about 10 photos. When I do that with other cameras, I expect shaky hands to cost me 9 of those. However, with the A7ii, I ended up keeping 8. I was hoping when I bought the thing that it would help out in the 1/30 or 1/60 of a second area, so this is exceeding expectations.

Third, ain’t nothing wrong with that sensor. Big adjustments to any exposure slider in Lightroom are no problem. Under some circumstances, ISO 10,000 looks OK to me in terms of color, noise, and retained detail. I was hoping for a decent ISO 3,200, so, again, we’re exceeding my hopes. I already don’t really need 24 megapixels, so I can’t imagine needing more sensor.

Finally, the Zeiss 55mm f/1.8 is about as perfect a lens as I’m ever likely to use.

All told, if something goes wrong with a photo, I have only myself to blame.

What if I told you that you never had to write a for loop ever again? And in the process, your code would be clearer, shorter, and have fewer bugs?

Sound good? Functional programming might be for you.

Quick aside

People who are already down with functional programming probably won’t find a lot of interest here. Also, Functional Programming™ in the eye-crossing Wikipedia-approved definition sense is a huge, complicated topic. So when I’m saying “functional programming”, I mostly mean “using functions to do stuff in a clever way”. I am aware that this is just scratching the surface.

Here we go

Here’s a situation from the the other day at work.

We were hoping to show a chart with memory usage over time, like this:

To do so, we needed data. The data came to us as some JSON that looked like this:

OK! So we get an array of two-item arrays. The first entry in each array is the memory usage in megabytes; the second entry is the timestamp. At some points, the service would be busted and not using memory at all, so those are the null values.

To use that data in our chart library, we needed to (1) throw out any of the null values because who cares and (2) convert each array to an object, like this:

So we make a new cur variable for the current array item. Then we check that the first value in that array is null. If it isn’t, we add a new object onto our final array using dataArray.push().

Again, pretty standard stuff. But I had to examine every bit of that for loop to tell you that. The for loop, on its own, doesn’t announce that you intend to throw out some items and transform the rest. Plus now you have to deal with x and cur and keep those straight.
You’re bored now. I’m boring you. Let’s make this interesting.

What are we actually doing with for (var i = 0; i < inputArray.length; i++) { /* do something */ }?

You would probably say, “I can’t be certain, but we’re likely going to do something with every item in inputArray”. Yup!

Put that another way: “given an array of items, do something with every item”. You do that a lot, right? And when you do something a lot, it’s a good idea to write a function for it, right? How about this:

That’s about all you need: pass in an array and a function that says what to do for every item in the arary. Boom: with this one function you don’t need to write for loops almost ever again.

With forEach(inputArray, doSomething), we are saying more clearly: “do something for every item in inputArray”. Compare that with for (var i = 0; i < inputArray.length; i++) where we have to spell out “yes, of course, start at 0 like we almost always do, go the whole length of the array like always, add 1 each time like almost always.

This, my friends, is what we’re going for with functional programming: using some well-considered functions to describe what you’re doing, instead of writing tons of variables and loops to tell the stupid computer how to do it over and over again.

There’s two tricks here: the first is even thinking to create a function that does those messy for loops for you. You can totally do that! Make the machines do the work for you!

The second trick is thinking about “do something with every item” as another function: doSomething(item). Because JavaScript lets you pass around functions like you would pass around anything else, this sort of abstraction is possible. doSomething could be anything!

Let’s start with Array.filter. Like Array.forEach, you pass in a function that then gets called for each item in the array.

But now there’s a twist: our function shouldn’t do something with an item; it must test something about an item and return true or false. If the function returns true, the element stays in the array. If it returns false-like, we leave it out.

(This is assuming that our data won’t ever be something valid but false-y like 0.)

That’s Array.filter. Now you can stop making new arrays, looping through an existing array, adding items to your new array if they pass some test, and then going forward with the new array.

Man, I feel better just imagining all that code I’m not writing.

Now let’s look at transforming all the remaining items with Array.map.

Think of it like Array.map( transformTheItem ). Like Array.forEach and Array.filter, we supply a function to run with every item in an array. This time, the function must return a new value, and in the end we get an array of those new values.

If you were writing your own raw function to transform every item in an array, it might look like this:

Again, that’s just to illustrate what’s roughly going on behind the scenes. Just like Array.filter, Array.map is a method off an existing array, so you only need to pass in the function that will transform every item in the array. Here’s my chart data function rewritten to use Array.map:

Isn’t our new filter/mappy version prettier? And it says exactly what we’re doing: first we’re filtering out some items, then we’re transforming each item to objects. A few less lines of code than we had before, too. Win win win.

Bonus round #1: lodash

The above is all using built-in Array methods. You can start having even more fun if you look into libraries for common functional programming tools. Scan the docs for, say, lodash and you’ll probably recognize an astonishing number of common patterns.

For example, if you think about what we were doing with our map function, all we were doing is taking values in a array and labeling them to make a new object. This is such a common pattern that the lodash method _.zipObject does exactly that, pairing up an array of keys with an array of values to build an object:

… is passing each item into the same _.zipObject function each time. Wouldn’t it be nice if you could just do this?

// this will not work!!
.map( _.zipObject(['value', 'timestamp']) );

What you want there is called a partially applied function. The idea is you take a function that requires many arguments, pre-apply some, but not all, of those arguments, and create a new function that is just waiting for the remaining arguments.

First, transform every array into an object, then filter out some of them. Lovely.

(Note how in the lodash chain syntax, you don’t pass the initial array into the functions; they’re assumed from the previous function in the chain.)

I don’t love that you have to call .value() to end the chain and return the final array, but otherwise that code seems pretty easy to follow.

Bonus round #2: Ramda

Since we’re exploring partially applying functions, the Ramda library is similar to lodash, but with an important twist:

Ramda functions are automatically curried. This allows you to easily build up new functions from old ones simply by not supplying the final parameters.

“Curried” is a loaded term, but for our purposes, think of it as basically identical to our use of lodash’s _.partial() method above, where we provide some arguments ahead of time, and the function will then wait for the remaining arguments. But Ramda does it automatically for every function.

In Ramda, every function is A-OK with you not providing all the arguments, and the order of arguments is reversed from lodash: your data comes last instead of first.

The swapped order or arguments and automatic partial application makes it easy to compose new functions out of Ramda’s myriad other functions. As an example, here’s my data transformation and filtering function using R.compose() and other Ramda methods:

OK, sure, you’re probably not going to read documentation for fun but the docs for popular functional programming libraries like Underscore, lodash, or Ramda are worth a scan just to see how folks are tackling different abstractions of common programming tasks.

]]>https://www.leereamsnyder.com/blog/literally-random-appreciation-wednesday-randomized-new-tabs
https://www.leereamsnyder.com/blog/literally-random-appreciation-wednesday-randomized-new-tabsWed, 29 Apr 2015 12:00:00 GMTOver at The Awl (Update 22 Sep 2018: 404’d now 😢), John Herrman compiled an excellent list of links that will send you to various random places on the web—Wikipedia articles, full-screen GIFs, Google Earth locations, Metafilter questions, Wikipedia in Esperanto, and more—when you open a new browser tab. I’ve been doing this for a half hour and it’s oddly mesmerizing.

Even better is this little widget by Yoz Grahame that randomly chooses from one of John Herrman’s randomizers. That page includes solid instructions for getting this set up in your browser of choice.

]]>https://www.leereamsnyder.com/blog/random-appreciation-wednesday-tinted-windows
https://www.leereamsnyder.com/blog/random-appreciation-wednesday-tinted-windowsWed, 01 Apr 2015 12:00:00 GMTWhat would happen if you nabbed the singer from Hanson, the bassist from Fountains of Wayne, the guitarist from Smashing Pumpkins (no, the other one), and the drummer from Cheap Trick and put them in a blender?

Wait. Why are you putting musicians into a blender? You’re a monster.

How about, instead, you put them in a studio maybe? Well, they’d call themselves Tinted Windows and they’d be the perfect guitar-heavy throwback pop soundtrack for those glorious first warm days of spring.

Here’s album standout “Messing With My Head”:

My mental music video of this is me falling backwards into a ball pit over and over and over and over in slow motion. It’s my happy place. Enjoy.

Can I have it now?

At first glance: Gimme gimme gimme! This is almost exactly the digital camera I want!

It takes Leica “M”-mount lenses (I own a few)! It has a full-size sensor! Some of their videos show the prototype camera with a Zeiss 35mm f/2.0 Biogon, a lens that I would rank as one the finest lenses available. That’s a small thing, but my irrational tribal brain is saying, “these are my people.”

And it looks so—so!—simple!

Wait, how can it be so simple?

Should you want to design a simpler camera, using the Leica “M” lens mount (which is in the public domain) is a good start. The lenses are manual focus only, so you don’t need a few buttons and a couple dozen configuration settings for autofocus.

You also always set the aperture on the lens, so that eliminates another dial on the camera. Because the aperture is entirely manual, you can’t do automatic, program, and shutter-priority shooting modes. The only automatic exposure you can support is aperture-priority. The Zeiss Ikon does this in a particularly elegant way with a single dial that sets manual shutter speed, automatic shutter speed, exposure compensation, and ISO in a single dial:

Now, I don’t see any buttons on the prototype Konost to control other important settings like ISO or exposure compensation. Perhaps those are in menus? Or maybe that rear screen is a touch screen? They’re claiming to support JPEGs, so you’ll also have to set image size, white balance and color settings, right?

Wait, is there a power switch?

These things get more complicated fast, is what I’m saying. I’m interested to see how they tackle this.

“All-digital” rangefinder?

Leica already makes rangefinders with digital sensors, but Konost claims to be “all-digital” by using “a secondary image sensor and image processing algorithms” instead of prisms and mirrors to generate the focusing patch. (If you haven’t used a rangefinder camera before, the Konost page has a little video. Basically you get two overlapping images and one slides left and right while you turn the focus ring; the parts that line up are where you are focusing.)

I’m dying to know how well this works. Does my fat finger block that rangefinder sensor by the lens mount? Are they doing anything innovative like combining the rangefinder image with the live view off the primary sensor? Can it be more accurate than an analog rangefinder?

How about that main image sensor?

I’m not too worried about this. 20 megapixels is low by current standards, but 20 megapixels is beyond sufficient; I just finished up playing with a Canon 6D that has “only” 20 megapixels and I have zero complaints. Sensor tech moves fast, though. I hope the one Konost chose is decent.

How programmable is it?

It’s geeky, but this is an enormously empowering capability. As far as I know, no major camera company has opened up their software. There’s a pretty decent community dedicated to hacking existing cameras that have done astonishing work enabling new features for the low, low cost of possibly bricking your multi-thousand-dollar tool and leaving you without any warranty.

My hope is that even if (when?) Konost doesn’t get their software exactly right at first, some very particular, camera-loving software nerds can create something wonderful and have some real support from Konost to do it.

How cheap are we talking?

New Leicas with the same lens mount cost $8,000. Not cheap.

Konost wants to come in under that. Undoubtedly there’s some wiggle room there, but how much?

I doubt they can take advantage of many economies of scale. The market for rangefinders is a mere sliver of the overall camera market; the sub-market for non-Leica rangefinders from non-established camera manufacturers must be an even smaller slice of that.

Is this for real?

Update 2018 September 22

There hasn’t been any update on their site in like two years, so hopes are fading here.

The plot is perfectly silly

I was sold just on the synopsis: Keanu Reeves used to be an assassin, but he retired when his wife got unspecified-sad-hospital-bed-itis. Her dying gift to him is an adorable, floppy-eared puppy, which makes Keanu happy. Then someone in a crime syndicate breaks into Keanu’s house and kills the puppy, which makes Keanu mad. Everyone in the crime syndicate talks about how it was a pretty terrible idea to make Keanu mad, seeing as how he was the best assassin in the world and now he’s mad, which is the last thing they talk about before Keanu kills them.

That’s about it. Great story, or the greatest story?

The fight choreography is like nothing I’ve ever seen

Every step in Keanu’s measured, focused rampage goes down like this: Keanu and another dude do some kick-punching acrobatics and then Keanu shoots the other dude in the goddamn face.

This happens about three hundred times, but it somehow doesn’t get repetitive. Probably because sometimes there are also stabbings. But more probably because the creators of this movie have dedicated themselves to documenting every possible way to dive around and get shot in the head.

They do justice to their life’s work with truly excellent cinematography. This is no shaky-cam close-up vomit fest; the camera glides and emphasizes the movements between characters. Close-ups are for impact, not to mask inept choreography. It reminded me of old Jackie Chan movies, but with people getting shot in the head.

And notice in the clip above how the different floors of the club all have different lighting and sound; it’s so you don’t get lost! It’s easy to follow, even with fifty goons running around and getting murdered. Great stuff.

This happens in a surprisingly rich universe of terrible people

Need more? As Keanu rampages, we get exposed to a variety of assassins and crime lords played by every awesome character actor in a weirdly specific criminal underworld. There are lots of rules! There’s a hotel where assassins can hang out and not worry about murdering each other! You call someone to clean up bodies like you’re reserving a table at Olive Garden! Everyone pays for everything in gold coins!

Basically, combine the choreography of a classic Jackie Chan flick with the ridiculous plot of Commando with the world-building and gold obsession of Looper with all the guns of a Call of Duty game and you’ve got John Wick. It’s a blast.

Some people have made fun of me and said, “Oh, that looks like the most useless thing in the world.”

But, uh, they’re wrong.

]]>https://www.leereamsnyder.com/blog/great-things-from-2014
https://www.leereamsnyder.com/blog/great-things-from-2014Mon, 05 Jan 2015 12:00:00 GMTCollectively we as a society have decided that 2014 was a real shit sandwich of a year, and good riddance to it! Arguably we think that every year, but it sure feels right about 2014.

It wasn’t all bad, though. Here’s a bunch of random stuff that I thought was pretty wonderful during a pretty shitty year.

Speaking of music, I loved a few albums that came out this year: Morning Phase by Beck, Lazaretto by Jack White, They Want My Soul by Spoon, Sukierae by Tweedy, ART OFFICIAL AGE by Prince. I’m not sure there was anything better than Run The Jewels 2, though.

Those would be the Zeiss ZM 35mm f/2.0 Biogon and 50mm f/1.5 Sonnar. To my eye, they are the among the greatest lenses ever made, lenses that are excellent, small, lightweight, and fast. Bonus: they’re probably the best-handling lenses you can buy.

Don’t get me wrong. I like the look of film. But I also like shooting over ISO 250 sometimes. Or changing ISO on the fly. Or shooting in color without pulling my hair out. Or getting photos into Lightroom without having to scan them first, a time-consuming and tedious barrier.

But I really do love those lenses. I don’t get tired of looking at images made with them. So if I could use them on a digital camera somehow, that’d be super.

Leica makes digital rangefinders that can use these lenses, but they cost $8,000 dollars. Nope.

There are adapters to use these lenses on other mirrorless digital cameras, but those cameras typically have smaller image sensors than 35mm film. So, for example, on a Fujifilm X camera with an adapter, my 35mm and 50mm would behave like a 53mm and a 75mm, respectively. Not the end of the world, but not what they were designed for, either.

Enter Sony’s new-ish A7 with a film-sized image sensor and the ability to stick my lenses in front of it (with an adapter).

What, now? (A7 with FE 55/1.8)

For most of this year I’ve been lusting after the A7 (or its high-ISO specialist sibling, the A7S). It’s pretty nice: well-built, highly customizable. The sensor is excellent.

I had some handling concerns with the A7, but nearly all of them appear to have been addressed with the just-released A7II.

First up, while the A7 isn’t an ergonomic disaster, when I was holding one I found myself wanting a bigger hand grip and an easier reach to the shutter and front command dial.

The On/Off switch looks easier to use, too.

OK, then.

Second, in my experience setting these up for shooting with adapted lenses, I always ended up juuuuuust one custom button short. Like I could assign one button to set the peaking sensitivity, but I would end up without another button free to change the peaking halo color. That sort of thing.

Sony could do the right thing and clean up their menus and options to combine related commands like that. Or, let’s look at that top plate again…

Six more on the back, too

Oh, look, the A7II has one more custom button.

Third, the A7II adds image stabilization to the camera, a massively useful addition.

Because of the light weight and high pixel count, the original A7 punishes sloppy hand-holding technique. The ol’ 1/focal shutter speed rule doesn’t cut it for me. With a 50mm lens, I was much safer with 1/125 or 1/250 to keep the shakes under control.

But if you’re using auto ISO, Sony doesn’t let you do something useful like set a minimum shutter speed; the camera defaults to 1/60, which is too risky. So I have to watch the shutter speed obsessively and toggle between Aperture Priority and Shutter Priority depending on how much I need to control it. It’s not the worst thing, but it’s a hassle. It reminded me of the extra cognitive load of the hybrid viewfinder in the Fujifilm XPro1.

(This is why I was looking hard at the A7S: the lower pixel count and ability to boost the ISO with impunity made me look like a better technical photographer than I am. On the other hand, 12MP won’t even fill an iMac retina screen now.)

With the A7II, I’m hoping that the stabilization will claw back at least those 2-ish stops and make this problem mostly moot for non-moving subjects.

The one big thing holding me back is the name on the camera.

Historical perspective

It’s a Sony, which means when it comes to native lens selection, I’m in for a bumpy ride.

They now have a set of f/4 zooms from 16mm–200mm, but I don’t particularly like zooms. Nothing against them, but I find that I think more clearly and take better pictures with primes. Also: big.

So that leaves a whopping two lenses. 35mm f/2.8 and 55mm f/1.8. Since I have the best 35mm lens already, I’m not so interested in the 35/2.8.

So, a whopping one lens. About the 55/1.8 though: in my time with one, it is a jaw-dropping lens. Very nearly flawless.

Such potential (A7 with FE 55/1.8)

I could use a wider lens, but in reality I’m going to grab my Ricoh GR for that.

So the other lens I’d want would be a short telephoto. The announced 90mm/2.8 macro looks nice but also too big. I could get a ZM 85mm f/4 and use the same adapter as my other lenses. Maybe the Sony A-mount 85mm f/2.8 on a different adapter? I suppose I could put the 55/1.8 on an A6000 where it will behave like an ~83mm. Maybe Sony will announce a native 85mm f/2-ish someday?

Experience has shown that with Sony, this is a dangerous way to think.

Update 18 May 2018

Ummm… so I was way off about this. Sony has been going bananas with lens introductions over the past few years, at least for the FE mount. Want an 85mm? Between Sony and Zeiss now there are not one but four 85mm lenses, all of them reportedly excellent. I… did not expect that.

As always with Sony, watch it with the lenses…make sure the lenses you want exist, and that you can afford them. I invested in a Zeiss 24mm for my NEX–6, but it’s waaay overpriced. The lenses for this camera are an utter hodgepodge, as if Sony just completely gave up. You can build a good lens kit for it, but it can be far from a simple task. […] I think one of the reasons people liked the NEX–7 so much is that we assumed Sony was going to do the reasonable thing and provide a lens line for the NEX series; now we know better. It had no such plans. There wasn’t even a meeting.

Our standard advice for Sony is the same as for Kyocera’s old Contax (for which Zeiss also made lenses): make sure the lenses and accessories you want already exist and are offered for sale, and do not count on any particular lenses, even specifically promised ones, actually appearing at any time in the future. You have been warned! Sony is not a system camera company.

But if you can deal with that, oh boy are these things wonderful.

Wildflowers (A7S with ZM 50mm f/1.5)

This is the problem with Sony. They’ll probably never address usability issues with their cameras via firmware, they’ll announce new lenses in nonsensical, seemingly random order, the lenses they do release will probably be overpriced, and they’re very likely to drop all development and chase some newer shiny thing. They’re the anti-Fujifilm.

“If you love Fujifilm so much why not just buy their stuff?”

About that. First, none of their cameras or prime lenses are stabilized. I’d miss that. Second, Lightroom and Camera Raw are miserable with Fuji’s raw files, and I’m miffed about adding another Raw processor to my already lazy photo management habits. Those are keeping me from just buying an XT1 with the 14/2.8, 23/1.4, and 56/1.2 and not shopping for a few years. Also, this isn’t a complaint but I wish Fuji would come out with a line of smaller/lighter/cheaper/stabilized(?) f/2ish line of lenses instead of the f/1.2–1.4 exotics they keep pumping out, nice as they are. (Update March 2018: OK they did that.)

If I start thinking about building a complete system around Sony cameras, Sony will leave me hanging. I’ll spend too much time on rumor sites looking for hints about whatever lens I need that will probably never come. They’ve probably already decided to stop supporting the barely-year-old A7. Makes me sweat a little.

On the other hand, how much of a system do I need, anyway? If I start thinking I need a “complete” system, I could just assume Sony is never going to deliver and look literally anywhere else.

On the other other hand, it’s expensive and I hate to spend so much on something Sony is unlikely to support in a sensible way.

On the other other other hand, there’s nothing else cheaper that’d let me use my rangefinder lenses.

This is why it’s been in and out of my shopping cart ten times this month. I wish Sony made this easier.

]]>http://www.npr.org/blogs/health/2014/11/10/361219912/if-the-same-shade-looks-both-yellow-and-gray-whats-color
https://www.leereamsnyder.com/blog/color-is-a-perceptionSun, 21 Dec 2014 12:00:00 GMTI took a typography class in grad school. On the first day, the professor said, “typography is probably the hardest thing in design. Well, second hardest. After color.”

No joke. For instance, these Xs are exactly the same color:

(Look closely at the bottom middle where the Xs meet.)

This sort of thing is what you’re up against whenever you do anything with color.

So don’t try to tell Fairchild an apple is red. He’ll say, no it’s not, technically — red is just your perception.

“I could change the color of illumination on that apple and make it look green or blue or something completely different,” he says. “The redness isn’t a property of the apple. It’s a property of the apple in combination with a particular lighting that’s on it and a particular observer looking at it.”

I love cameras a whole lot, but I love photography even more. And in an effort to explore what the networked lens means for photography, I seemed to have largely, unknowingly, left cameras behind. Could a smartphone really be the best photographic tool for me? This question was both frightening and intriguing.

Great stuff on gear lust, what “good enough” means, getting comfortable with change, and why we take pictures.