I’m Ryan O’Shea. I build software for a living in Boston, MA. I haven’t used this blog in a while.
This past spring, I took a Digital Humanities course during my last semester at Princeton. The project I undertook in the second half of that semester was rudimentary analysis of the relationships between the popularity of photographs on photo-sharing website Flickr and ways in which they were created. Below are some of the results from that analysis, along with this disclaimer: these visualizations are not correlations, nor should the explanations accompanying them be considered claims of causality. I present simple visualizations to tease out simple relationships between the ways a photo was taken and how well it performed on the site.
In photography communities, a debate regarding the nature of the art rages. In one philosophy, the quality of a photograph (or a photographer) lies solely in their creativity, their artistic vision, and the subject matter that they capture. For those in this camp, photographic equipment (cameras, lenses, tripods, etc.) are simply a transparent tool by which photographers capture what they see. Those opposed to this philosophy pay more attention to the physical and technological limitations of the equipment when pursuing their craft. These limitations can in many ways shape and in some cases dictate the types of photos that can be taken, and for some photographers, the capabilities gained and lost through the use of different “gear” limit their creative freedom significantly enough that they prioritize the equipment to a much larger extent than the first camp would.

A landscape photograph taken with a DSLR camera at a relatively small aperture of f/8. Because of the narrow aperture and large distance between camera and subjects, everything in this photo is in focus.
Let us explore an example. In optical lenses, the aperture of the lens is an opening near its rear that controls how much light passes through the lens. The aperture can close down to a size as small as a pinhole (this is denoted in photographic metadata by a large “f-stop” number like f/16 or f/22). The aperture can also open up to allow a larger amount of light in (this is denoted with a small f-stop like f/2.8 or f/1.4). As the f-stop decreases, the size of the aperture and the amount of light passing through the lens both increase. Aperture has another effect besides controlling the amount of light entering the lens, and it is one of the most creative tools a photographer has to change the way his/her photos appear in the camera. Because of the geometry of light passing through a lens, a wide open aperture will result in everything closer or farther than the focal point of the lens (controlled by focusing) being out-of-focus. This is referred to as shallow depth-of-field, as the normal plane of space at some focusing distance away from the lens within which objects are sharply in focus is very thin. Moving just a small amount away from the focal plane either forwards or backwards will cause blurring. The effect of blurring the background behind a close object can be quite visually pleasing, and the appearance of blurred backgrounds is called “bokeh.” For this reason, portraits are typically shot with wide open apertures (an example is shown below). On the contrary, closing down the aperture to a small hole causes the focal plane to expand to be quite thick, resulting in objects at varying distances being in focus, whether they were focused on or not. Landscape photography is typically done using stopped-down apertures to maximize the portion of the frame that is in focus.
I’m a big fan of UWP apps on Windows 10 (formerly known as “Metro,” then “Modern” apps). These are the new type of Windows application that can run wherever Windows 10 can run. They’re installed and updated via the Windows Store. I like them for a few reasons, even though the selection is still fairly poor and many are sorry replacements for their desktop — or even web — counterparts:

Part of Microsoft’s all-in UWP push is games. PC gaming is a huge advantage of the Windows platform, and Microsoft wants those games to be developed on their UWP framework. They’re continually making improvements to enable that transition, like adding support for SLI and the ability to turn off VSync. For these reasons, Microsoft is starting to attract AAA titles like Rise of the Tomb Raider and Quantum Break.
Recently, I had a frustrating experience with one of these games as it pertains to mobile graphics in the PC gaming world. My primary (read: only) PC is a laptop. Because I like to play the occasional game, that laptop (a Dell XPS 15) has both integrated Intel and discrete Nvidia graphics. Through Nvidia’s Optimus technology, the dedicated GeForce graphics card only turns on when an game or other 3D application starts. By doing this, the laptop can run on very little power when not being used for gaming but tap into that powerful Nvidia card when it needs to. UWP games aren’t recognized by Nvidia’s drivers as games just yet, so when I went to open up Microsoft’s flagship UWP game, Minecraft Windows 10 Edition, it was running on the integrated graphics. So, I opened up Nvidia’s control panel and told it to use dedicated graphics for Minecraft.
The next day, I saw that the card was being used, despite not having any games open.

The culprit? Minecraft. Soon, I remembered something about UWP apps: they like to run in the background.

This was tough — I didn’t want my GPU turned on all the time, but Minecraft seemingly ran in the background without my control at random.
Eventually, I remembered a group of settings buried in the Windows 10 Settings app, the “Background apps” tab under the “Privacy” section. In hindsight, the menu for “Background apps” might logically control an app running in the background that I didn’t want. But since UWP apps are new, it’s not second nature to head to a section of the global settings app to control when a program runs. That’s a phone app paradigm adapted for desktop PCs, so I expect many people, no matter their technical literacy, to have trouble making this connection.
But here’s the thing: it doesn’t actually work.
While I’m sure turning off an app’s background privileges has some effect, even after a restart, Minecraft is still running in the background as shown above. Again, this wouldn’t normally matter, but because it causes my dedicated graphics card to turn on, it would have a massive impact on battery life if I hadn’t noticed.
Microsoft (or Nvidia) should find a way to handle this gracefully. Windows needs an elegant way to allow UWP games to run certain tasks in the background without activating dedicated graphics cards. In a normal Win32 application, a helper process would accomplish this, even if most users wouldn’t want MinecraftHelper.exe to run on startup. But I haven’t seen any UWP apps that use multiple processes that could be separately treated by graphics drivers.
I hope that an elegant solution to this issue emerges in the next few updates to Windows 10. For now, every mobile UWP gamer is stuck manually changing the graphics settings of each UWP application back and forth, every time they launch and quit.
Some of the gear and gadgets I’ve been most excited about this season.

A longtime favorite of MFA on Reddit, these boots have a look that I’ve always wanted to try. So glad I could get them at a serious discount on Amazon. They’re fairly comfortable, though not too soft, but they look great and feel very sturdy. I’m excited to see how they wear and mature.

A fantastic gift from my girlfriend, this entry-level i-TTL speedlite has been great to experiment with over the last few days. Bouncing flash off walls and playing with light has opened up a ton of doors for indoor shooting. I’m excited to try it in different lighting scenarios. All of the photos in this post (except this one, of course) were lit using this speedlite.

These earbuds are definitely the best I’ve ever used. After the wire on my Klipsch Image S4i IIs wore and created an intermittent connection (for the second time), I switched back to the provided Apple EarPods. It’s taken me a while to get used to the balanced sound of the Sennheisers after the overblown bass of the EarPods, but they really do sound phenomenal. The build quality is impressive, they’re very comfortable, and I love the black and red look and tangle-resistant flat cable. The in-wire microphone/controls work well as well.

This case has been absolutely trashed online as a supposed example of Apple’s failed design post-Jobs, but I don’t see what the reviewers are saying at all. The phone with this case on it feels great in the hand and is very easy to hold. The single Lightning charging port for both case and phone is far more convenient than the 1-port-for-phone and 1-different-port-for-case implementation of every other battery case for iPhone. The case’s integration with iOS, which displays both the charge of the phone and the charge of the case, is a feature you’ll only find in this case, and it’s great. Criticizing a product with a bump in the back as symptomatic of the decline of Apple’s design sounds good on the pages of The Verge, but in practice, this case feels great in the hand, charges more simply than any of its competitors, integrates beautifully with iOS, and brings the battery life of an iPhone 6 to far more than a full day of heavy usage, which is more than adequate. It’s a great product, despite what the tech press would have you believe. I ditched my Otterbox Symmetry for it, and I’ve been very happy with it so far.

Amazon was selling this great shoulder bag for a steal compared to MSRP. I’m using it to store my D3300 body, 3 lenses, a speedlite, and all of my peripherals, and there’s plenty of room left.

The Laphroaig 10 was next on my list of single malts to try. I have no idea how my brother was able to figure that out, but I’m glad he guessed right. I can’t wait to see how the peat pairs with a nice cigar.
The last required course for electrical engineering majors at Princeton is ELE 302: Building Real Systems, affectionately known as Car Lab. Students partner up, take a stripped-down electric hobby car, and build the circuitry to drive it.
The first stage involves tearing out the RC controller for the motor and steering and replacing it with a microcontroller-driven power MOSFET, driving the motor at a constant speed using PID control. The goal is the make the car travel at 3 ft/s on any terrain. It needs to be within 2% of that speed over flat ground and 10% of that speed on an upward or downward incline.
The next stage involves mounting a VGA camera to the front of the car, looking at the ground, programming the car to follow a black line on the floor at a fixed speed. The challenge here is parsing the video signal into a meaningful indicator of the car’s angle relative to the track. The version of the car with the camera mount is shown below.

The last half of the semester is dedicated to a self-guided project. We decided to add obstacle avoidance capabilities to the car. We used two sonar rangefinders and a continuous-rotation servo to image the car’s immediate surroundings. The gear system we mounted the sonars to was a custom design that we laser-cut in acrylic. By having two sonars facing opposite directions, we could completely map the surroundings every half a rotation of the servo, or 100 times per minute. We used that information, tracking up to two obstacles at a time, to steer the car out of the way of obstacles. We also transmitted the car’s local surroundings map via a wireless serial link to a laptop, where we plotted it in Matlab (below).

The result was a car that navigated the environment in a fairly unintelligent way, considering the minimal data it had to work with, but always managed to avoid obstacles as it drove. There’s video of it in action below.
This past semester, I took a class taught by Brian Kernighan where everyone in the class built a large-scale programming project as part of a small team. The team that I led built a small, single-purpose social network designed to be used by Princeton students to ask questions to the university community. We built PollPrinceton.

The idea behind PollPrinceton was to build an app like Yik Yak which students could use to ask quick questions quickly and easily. The site is authenticated using Princeton’s Central Authentication Service, so only current students and staff members can use the site. When they log in, they see a feed of polls asked by anyone with a Princeton ID.

If they want, they can anonymously ask a poll themselves.

Or, they can participate in existing polls.

Oh yeah, and it’s totally responsive and mobile-optimized too.
For polls that already have a few votes, you can view demographic breakdowns of the way people have already voted by degree program, class year, and residential college. We cross-reference data from the Princeton student facebook with the responses each poll receives to generate visualizations of the data.

I did a lot of the work planning and designing the architecture of the app, which we visualized below.

The frontend was an AngularJS app, drawing from my experience building an app for Comcast last summer. Bootstrap and jQuery helped build some of the interactive components. The backend was written using ExpressJS on top of Node.js, which we taught ourselves for this project. We stored everything in a MongoDB, using Mongoose.js to interface with it from the Node server.
There’s a much more in-depth write-up on the technology we used here.
Developing with this JavaScript/JSON-only stack was actually a joy. Spinning up the application was very simple, once I finished writing my own JavaScript integration for Princeton’s CAS service.
I expanded a bit on the frontend design process in a post over on Behance.
We open-sourced the entire project on GitHub from the start, which you can see here. We hosted it on an Ubuntu server provided by DigitalOcean.

If you want to see our spiffy splash page, or use the site if you’re a Princeton student, you can check it out at PollPrinceton.com.
Glenn Greenwald & Andrew Fishman for The Intercept
Here’s the rest:
First, they target a Muslim: not due to any evidence of intent or capability to engage in terrorism, but rather for the “radical” political views he expresses. In most cases, the Muslim targeted by the FBI is a very young (late teens, early 20s), adrift, unemployed loner who has shown no signs of mastering basic life functions, let alone carrying out a serious terror attack, and has no known involvement with actual terrorist groups.
They then find another Muslim who is highly motivated to help disrupt a “terror plot”: either because they’re being paid substantial sums of money by the FBI or because (as appears to be the case here) they are charged with some unrelated crime and are desperate to please the FBI in exchange for leniency (or both). The FBI then gives the informant a detailed attack plan, and sometimes even the money and other instruments to carry it out, and the informant then shares all of that with the target. Typically, the informant also induces, lures, cajoles, and persuades the target to agree to carry out the FBI-designed plot. In some instances where the target refuses to go along, they have their informant offer huge cash inducements to the impoverished target.
Once they finally get the target to agree, the FBI swoops in at the last minute, arrests the target, issues a press release praising themselves for disrupting a dangerous attack (which it conceived of, funded, and recruited the operatives for), and the DOJ and federal judges send their target to prison for years or even decades (where they are kept in special GITMO-like units). Subservient U.S. courts uphold the charges by applying such a broad and permissive interpretation of “entrapment” that it could almost never be successfully invoked. As AP noted last night, “defense arguments have repeatedly failed with judges, and the stings have led to many convictions.”
You really should read the article. The part about the FBI crafting the terror plot it supplied so that the plot itself justified federal jurisdiction and longer sentences is especially troubling.
This is real. It doesn’t just happen, but according to The Nation, it happens in nearly every terrorism arrest the FBI makes. It’s horrible. If the cases really did play out the way a number of journalists are claiming, they seem like the actions of an agency with wartime powers trying desperately to hold on to them in relative peacetime.
Here’s some more reading on the FBI’s practice:
A little trip over Princeton’s Intercession week. We saw You Can’t Take It With You on Broadway with James Earl Jones. It was fantastic.
Bigger album here.
Back in November, I upgraded to the iPhone 6 from my trusty old iPhone 4S. Because the most necessary thing I could do is provide yet another review of Apple’s new phone for the Internet’s collection, I decided to write down my thoughts on it. I’ve done so for much less significant device purchases before, and this phone has become the most important device in my life over the last few months.

I upgraded my 4S to iOS 8 when it was released. The 4S is the oldest phone supported by iOS 8, which generally means it’s a poor idea to update. I knew I was due for an upgrade, though, so I did it anyway. After about a month using my 3 year old device with a brand new iOS, upgrading to the iPhone 6 was like wearing glasses for the first time. It wasn’t just about speed, although the performance difference between the 6 and 4S is so hilariously large that using the 6 for just about anything felt great. The new features the appeared in those 3 years are an amazing upgrade as well:
Those are the ones that actually affect my day-to-day with the phone.

Here are some of the features I love from the iPhone:
An encyclopedia of how keys, scissors, pianos, telescopes, self-winding watches, and hundreds of other things work
The New Way Things Work
by David Macaulay
HMH Books
1998, 400 pages, 8.5 x 10.9 x 0.9 inches
$22 Buy a copy on AmazonThe New Way Things Work, published in 1998, was an updated version of the original 1988 The Way Things Work edition. Although technically not “new” anymore, this wonderfully illustrated encyclopedia of how things work is as captivating now as it was almost two decades ago. David Macaulay, the best-selling author of many books including Cathedral and Built to Last, explains how pulleys, levers, gears, springs, batteries, electricity, and nuclear power work. With fun graphics and diagrams he dissects and explains scissors, can openers, pianos, bar codes, self-winding watches, metal detectors, keys, screws, telescopes, airplanes, and hundreds of other things we use every day. Although intended for teens, this is a great reference book for any tech newbie who needs an introduction to the workings of our mechanical world. – Carla Sinclair
January 29, 2015These books are part of what made me, can’t recommend enough. I love me some e-books, but buy these on paper, then hold them close, and absorb them into you.
(via itsokaytobesmart)