Sunday, October 04, 2015

file exchange pick of the week

After five years up on MatlabCentral, my little script to plot histograms has been selected as a "pick of the week" by Mathworks. Pretty cool - I'm even getting a free T-Shirt. The best part is that I finally have something to show Eli that Matlab appreciates me as much as Mathematica appreciates him. Next time I hope they take a look at my beautiful line colors submission to matlabcentral so they can choose something besides this random green color :P

Thanks Matlab!!

Thursday, October 01, 2015

Thursday, September 24, 2015

Another pedantic letter to the editor

Last week this article was published in the Teaneck Suburbanite, with the following lines (emphasis added):
Trains carrying Bakken crude oil from North Dakota travel through Teaneck and other Bergen County towns regularly before arriving at a refinery in Philadelphia. Their numbers have increased exponentially in the past few years, and several derailments have occurred in Canada and across the United States.
Well, I felt the need to respond, and this week they printed my letter to the editor:
To the editor,
A recent article about the freight trains carrying Bakken crude oil running through Teaneck ("Resolution for trains to stop idling passes", Sept. 17, 2015) claimed that "[t]heir numbers have increased exponentially in the past few years..." This is not correct. "Exponentially" is not a more dramatic way of saying "rapidly" -- it means "at a rate proportional to the current value".
According to data from the U.S. Energy Information Administration (, crude oil traveling by rail from the midwest (i.e. North Dakota) to the northeast (i.e. Teaneck) has increased roughly linearly since 2012, at a rate around 4.3 million barrels per year (see:, which corresponds to approximately 6,000 extra tanker cars per year.
While the (linear) rate of increasing oil traffic may still be very concerning to residents, like myself, who live within the "danger zone" of the tracks, we should, at the very least, be accurate in our descriptions of the situation.
Eli Lansey, Ph.D.
Here's the plot I link to:

Sunday, September 06, 2015

handle fell off of vistaexplorer tripod fix

TL;DR; find the square nut; look on the back side of the tripod and pop the bolt back in.

I've been using the VistaExplorer tripod from Amazon for a while now. It essentially does the trick. Basically it has all the features you might come to expect from a real tripod - but built in a kind of cheap and slightly rickety way. I personally would much prefer a cheap sturdy tripod with fewer bells and whistles, but as far as I know this is the best cheap tripod out there.

There is a somewhat common problem of this handle popping off, and the little square nut popping out of its slot. This post from 2013 explains the issue well with this little knolling image.

Here is my little cell phone image where you can see the correct location of the nut after I popped it back in. Happy fixing!

Saturday, August 29, 2015

The guide to napping at work

Ever since you read my definitive guide to curing stress you have been wondering about the best way to nap. Your questions have been answered with my official non-scientific guide to napping at work.

Nap gear:

Your fleece/sweatshirt is your friend here. Roll it up and use it as a pillow. Bubble wrap envelopes work really well for supporting your butt, or yoga mats if you have some on hand. Don't get too comfortable though or you might not wake up on time.

Nap location:

If you have your own office, its easy, just close the door and lay on the floor. I work with an open floor plan nowadays though - but if your company is cool enough to have an open floor plan then they probably also have little phone-booths with chairs you can kick back in. The key to napping upright in a chair is the lean your head back on something (your sweatshirt). Your neck won't support your head once you fall asleep so if it isn't supported you'll wake as soon as you nod off.
Don't nap on your desk. It is best to separate your exact nap location from your exact work location or you might think about napping too much.

Nap length/time:

I usually set my alarm for 20 minutes, but find myself waking regularly after about 15 minutes. I wouldn't recommend napping for longer than 20 minutes, but if that works for you then okay!
For me the best time to nap is sometime after lunch, anytime between 1 and 5. I know its naptime when I feel like I can't keep my eyes open and can't stand on my feet. This is easier to feel if you have a standing desk; and if you don't have a standing desk then go and make a standing desk.

Falling asleep / waking up:

Don't think about napping or about trying to fall asleep, I usually think about something technical like trying to find a solution for something at work. The key is to keep muscles relaxed, don't move. The truth is it doesn't matter if you actually fall asleep - having a uber relaxing moment is still great!
When you have that moment that you realize you were just asleep - that is when you get up. Don't wait for your alarm, don't lament that it was "only five minutes." Congrats you napped!

Feel free to comment if you have questions!

Sunday, August 23, 2015

Turn your phone into a T-Pass

This is kind of an old project - but I don't think it has been blogged yet. The "T" passes for the subway in Boston are great - but they are an extra card that you need to carry around. They work with RFID so the essential parts are an antenna and a small chip.

If you soak the card in some turpentine you can with-care separate the plastic bits from the antenna and chip. I slapped mine on to the back of my phone. The first time I gave it an extra loop so it could fit underneath a round Loud Bicycle sticker. The next time I just put it underneath some clear packing tape which made it function a little better.

If you are trying this for the first time - please make sure to use a Charlie Card which doesn't have much cash on it just in case you toast it.

Thursday, August 20, 2015

LoudBicycle Horn on CitiBike

I use CitiBike as part of my commute, and I wanted to use it with a Loud Bicycle horn. I needed a quick and easy method to attach and release the horn, so I bought an inexpensive spring clamp. An arm of the clamp fit perfectly in the channel for a bike tube:

All that was left was to mount it on the bike. It simply clips to the front of the basket. I found it helpful to stabilize it by running the elastic band as seen in the picture below. First attach the band to the top two posts (as if you were restraining a bag or something), then clamp the horn (clamp between band and basket), and then just detach the band from the posts and hook it around the front of the clamp.

All that was left was to strap the button next to the bell

 And ride on!

Sunday, July 19, 2015

Fun craigslists posts

As usual - having fun posting some things on craigslist.

My old microwave
Where I linked some great microwave recipes from my old online cookbook.

But the foosball post is golden:

Also let me know if you live in Boston and want a rusty grill+propane tank or a most-inefficient air conditioner  which sucks hot air in from outside while it cools.