Studio711.com – Ben Martens

Geek

Look Ma, No Server!

Serverless computing is all the rage in cloud computing. When cloud computing first began, people thought about how to move their local servers to servers in the cloud. They would end up with a Windows or Linux machine hosted by Azure, etc. That was much better than operating your own data center, but technology is progressing and even managing your own machine in the cloud isn’t really necessary now. There are so many services available that simply take your code and run it for you. Don’t worry about where it’s running or what machine it’s running on. This lets you focus almost 100% of your time on the core business logic in your application and let someone else handle Windows Updates, disaster recovery, backups, etc.

I like to play around with all this stuff and this website is one way for me to do it. Quite a few years ago, I moved this web application to Azure Websites, but I still had a virtual machine running MySQL on it. Now that Azure offers MySQL, I don’t have to run my own VM anymore.

The only other thing I had running on that VM was a little timer job that records the number of customers of my power company who don’t have power. I like to run that from Azure so that I can track power outages even when they affect me. Running a scheduled task on a dedicated VM is extreme overkill so I migrated the code to an Azure Function. I literally pasted C# code into the Azure portal, told it to run the code every 5 minutes and voila! It costs fractions of a penny every time it runs and I don’t have to even think about what machine it’s actually running on.

There’s so much of this great cloud computing geek stuff to get excited about these days.

Recover Deleted Files

I’m super careful with files on my computer. Careful almost to the point of obsession. After having a hard drive crash and losing a bunch of data 15+ years ago, I made sure it would never happen again. But recently I broke one of my own rules and ended up in a bit of a mess. The rule is: get your files off of SD cards as soon as possible.

There are bunch of good reasons for this but a few are:

  • SD cards are easy to lose
  • SD cards are easy to damage
  • SD cards are easily corrupted

None of those bit me. The problem that bit me was user error. I left files on the SD card for a couple weeks because I was too lazy to put the card in the computer and copy them over. The exact sequence of mistakes is probably boring to read, but the bottom line is that I thought all of the old photos on the card had already been transferred off but only about 80% of them had. There were a bunch of “first day of school” photos that I hadn’t transferred off right away and I didn’t notice that fact before deleting them.

As soon as it happened, I realized what I had done and my stomach twisted into a knot. I just lost files not because of a software/hardware problem but because I was an idiot.

I immediately ejected the SD card from my computer and slid the lock lever over to prevent any further stupidity. Next it was time to find something to recover the files. When a computer deletes a file, it doesn’t actually overwrite the file, it just removes the entry from the “card catalog” that points to the actual file locations. So if you can carefully scan the disk and you know what the binary header of your file looked like, you can still read the old data.

If you search around for “recover lost files” there are tons of programs available and I believe two things are generally true:

  1. They’re going to cost quite a bit of money because they know you’re panicked.
  2. It’s a great way for hackers to get you to install spyware/viruses. You’re in a hurry and you click away without really checking the validity of the site.

I ended up using PhotoRec which is free, open source, and hopefully safe. It’s not very user friendly, but that was fine with me.

The tool worked ok, but it didn’t find any files on my first scan. I had only saved .CR2 (Cannon Raw) files and the tool didn’t have a scanner for those files included out of the box. Thankfully they allow you to add your own file signatures, so I whipped open a hex editor, figured out what the header of a CR2 file looks like and added a new signature.

After that it quickly plowed through my SD card and found the “deleted” files. It didn’t get 100% of them, but because I took about 100 pictures of Elijah in ~4 different poses, I still had plenty of good photos to choose from. The day was saved.

But this is one of those lessons that I’ll never forget. When you walk in the door with new pictures on your SD card, immediately copy them to your computer and get them backed up to cloud storage. And whenever I buy my next camera body, I’ll probably be buying one that has built-in WiFi syncing available. I might even check out those WiFi SD cards to see if they’re worth it.

Storage Closet Cleanup

We have a fairly big closet at the top of our stairs that holds a bunch of stuff that doesn’t otherwise have a home: sleeping bags, board games, wrapping paper, vacuum cleaner, folding chairs, etc. It’s a mess. That’s not terrible except that we have to leave the door open because it is also the closet where I had the electrician run all my network jacks. That closet has a whole bunch of networking gear and two computers that are on 24/7. It gets way too hot if the door is closed. Some day I might build a ventilation system in there, but regardless of whether I do that, I knew I needed to build some storage that was better than our old wire frame shelves.To kick things off, I cleaned out the closet, took down the wire shelves and then patched all the old screw holes from those shelves. I even sprayed on some new wall texture to hide the patches. I had a leftover half gallon of the same brown color that is used in many other places in our house and it was the perfect amount to paint the closet.

The real improvement will come from some new storage cabinets, but first I needed a solution for the mess of computer wires. It had to just sit on the floor while I was painting and I needed it out of the way for the cabinet project. So the first build in this project was a very simple set of shelves to hold the computers, routers, battery backups and other miscellaneous gear. The shelves were a quick one day build (with Elijah helping) out of a sheet of 3/4″ plywood, some poplar to hide the exposed plywood edges on the front, and a bunch of pocket screws.
It’s not fancy, but the bulk of this will be hidden by the new closets along the same side wall anyway. And for me, this is glorious. It’s going to be so much easier to diagnose problems and I finally have all of the network jacks in our entire house connected at the same time. Nerdvana.

Now it’s time to build some big cabinets…

ISS Transiting The Eclipse

Destin Sandlin has one of the best YouTube channels in existence: Smarter Every Day. I don’t know how he keeps upping his game, but he has managed to do it again. He found his way onto the perfect tiny little patch of earth where he could watch the eclipse AND see the International Space Station transit across the sun during the eclipse. The math is bonkers. He got a bit lucky because they periodically adjust the height of the space station (it slowly falls to earth) and the last adjustment put the viewing location on some reservation land that is very difficult to get to. It all worked out and he has a great video about it. He wins the eclipse.

CrashPlan Service Changes

I’ve been an enthusiastic CrashPlan cloud backup user for well over 6 years. The small fee that I paid for their service saved me a ton of time trying to hack together my own solution. Unfortunately, yesterday I got an email saying that they are going to stop offering CrashPlan Home and focus on the business market. The transition plan sounds very smooth and they’ll continue honoring all of the time that I’ve prepaid for, but of course it means that I need to start thinking about what to do when my service runs out in a little over a year.

There are a few options to consider:

  1. CrashPlan is officially recommending Carbonite (who was a competitor until CrashPlan exited the home market). Their service is $60/year which is very similar to CrashPlan. The only downside is that I have to re-upload my ~4TB of data. That’s not horrible except that Comcast silently added a 1TB/month cap to my plan.
  2. Stick with CrashPlan and use their Small Business offering. While they are offering existing users a nice discount for the first 12 months, eventually it will cost me $120/year. It’s roughly double what I was paying, but maybe it’s still worth it since I don’t have to change anything.
  3. Go back to rolling my own solution. It’s not too hard to encrypt the data myself and then upload it to Azure blob storage. This would be kind of fun to piece together but it’s not going to be cheaper than Carbonite or Crash Plan Small Business. They set their prices for the amount of data a normal human uses and clearly I’m not that.

Thankfully I don’t have to make this decision any time soon. My contract runs through Oct 2018. However, if you’re thinking about starting to use cloud backup (and I recommend it!), you should be looking at providers like Carbonite or Mozy.

Revenue Per Employee

Microsoft recently announced quarterly results and they were very good. I started thinking about how much the revenue has increased over the years and how many more employees there are. How has the revenue per employee changed?

Some quick searching revealed that this is a pretty common metric to track when investing, but I couldn’t find good, free data going back far enough to satisfy me. So I pulled the data together myself. This is NOT very reliable or accurate! Specifically, many of the employee count numbers were estimated from a chart image. Don’t make any investment decisions from this chart. That being said… it’s interesting to see that when you factor in inflation, Microsoft gets roughly the same amount of revenue per employee every year. Toss in a bunch of new employees and print more money. It’s a pretty good setup!


How does this stack up against other companies? Credit to zerohedge.com for the chart below:

This Visual Capitalist infographic shows revenue per employee for various sectors and companies you probably recognize.

I wonder what would happen if you walked into HR with these numbers in hand to talk about your salary? Good luck with that.

25 Free Throws A Day

This summer I challenged myself to shoot 25 free throws a day. It’s a good excuse to get outside, enjoy the longer days, chat with neighbors, and I also wanted to see how good I could get if I did it every day. Well of course I haven’t actually done it every day, but I’ve come pretty close. And of course I tracked all the data in a spreadsheet…

I’ve tracked 700 shots this summer and the biggest change I’ve noticed is that I’m more consistent than I was in the beginning. For example, my first four scores were 16, 9, 17 and 8. Now I hover much closer to 17 with a couple really good rounds mixed in. My record is 22 and I feel like it will be a long time before I beat that, but I’ll keep going and see what happens. The trend is going up, but if you take out those first four rounds, the slope of the line is still positive but much shallower.I don’t have data for this, but it feels like I usually get better as the round of 25 goes on. So would my average go up if I did more in each round? I might mess with the experiment a little bit too and change to either “how many shots does it take to make 25” or just “how many did I make out of 50”.

Mentally I’ve been comparing this to trap shooting. Both use rounds of 25 and both have a big mental factor once you learn the basic physical skills. At this point, I’d say that free throw shooting is harder than trap shooting which seems crazy to me thinking about the physics of it. But the number of free throws shot over my life is dramatically higher than the number of clay birds I’ve broken and yet, my trap shooting scores are generally better than my free throw scores. I also believe that if you look at professional trap shooters, they have higher success percentages than professional basketball players shooting free throws.

Maybe I think too much about going outside to enjoy the sunshine…

Average Beer Ratings

I was talking to Luke recently and was surprised to find out that in his over 500 beers, he has never rated one 5 stars. That got me thinking about how we all use the rating scale. Here are some stats…

Row Labels Average Standard Deviation Max Min
Ben 2.91 1.03 5 0
Dad 3.54 0.70 5 0
Logan 3.22 0.80 5 1
Luke 3.18 0.78 4.5 0
Grand Total 3.24 0.87 5 0

The standard deviation column gives a bit of a feel for how much each user uses the full spread of ratings available to them, but it’s still a bit hard to visualize. So I took all of the ratings and rounded them down so that there were only 6 buckets (0-5). Then I calculated what percentage of each user’s ratings were in each bucket. So effectively, the histogram below is normalized across all users so we can compare apples to apples (e.g. I rate 39% of my beers a 3 and Luke rates 61% of his beers a 3.)

 

Obviously everybody has their own system for how they use the available ratings, but it does look like they are all close to a normal distribution centered around 3 which makes sense. I think I’ve written this before, but here’s how I personally use the ratings:

  1. 0 – Yuck. I’d pour it out if you handed it to me. (e.g. Bud Light Lime)
  2. 1 – I’d politely decline or hand it back if you offered me this.
  3. 2 – Sure, I’ll drink this but I wouldn’t pay for it.
  4. 3 – An average beer. I don’t have a problem paying for this but I don’t seek it out.
  5. 4 – This is a really good beer. If I see it in the grocery store, I’ll probably buy it.
  6. 5 – Epic beer. Buy it whenever you see it!

And since that’s how I do it, it’s obviously the right way to do it.

Does Bacon Make You Rich?

A lunch question ended up posing the question in the title. We were talking about which countries ate bacon and which ones didn’t. Then we had a hunch that the US and European countries near the top of the list so you could probably make a clickbait news story about how countries that eat more bacon make more money.

When we got back to our desks, Durmus had actually run the numbers. Unfortunately there’s only a 0.43 coefficient of correlation between per capita bacon consumption and per capita GDP. It was worth a shot though. And I had no idea that the Chinese ate more bacon than Americans! Step up your game people!

Country Weight per Capita (lbs) GDP per Capita
China 90.1 $15,400
Montenegro 88.6 $17,000
Taiwan 87.5 $47,800
Korea, South 81.4 $37,900
Serbia 81.4 $14,200
Belarus 73.8 $17,500
United States 64.3 $57,300
Vietnam 56.3 $6,400
Norway 55.4 $69,300
Canada 55 $46,200
Australia 54.4 $48,800
Singapore 50.5 $87,100
Chile 49.5 $24,000
New Zealand 49.2 $37,100
Russia 46.7 $26,100
Japan 44.6 $38,900
Bahamas, The 40.7 $24,600
Uruguay 40.2 $21,600
Mexico 39.4 $18,900
Ukraine 34.7 $8,200
Philippines 33.7 $7,700
Panama 32.5 $22,800
Ecuador 31.5 $11,000
Brazil 31.2 $15,200
Cuba 26.6 $11,600
Macedonia 26.3 $14,500
Argentina 24.9 $20,200
Dominican Republic 21 $15,900
Angola 18.3 $6,800
Colombia 17.2 $14,200
Croatia 16.8 $22,400
Bosnia and Herzegovina 13.7 $11,000
Kazakhstan 12 $25,700
Guatemala 11.5 $7,900
South Africa 10.8 $13,200
Armenia 10.8 $8,900
Honduras 10.1 $5,300
Venezuela 9.8 $15,100
Haiti 9.2 $1,800

Safeway Monopoly Recap

A year ago, I wrote a post detailing the terrible odds of the Safeway Monopoly game. And yet I still played it this year.

I had a pretty good setup for processing the tickets. Now that I have an Android phone, I loaded the app that lets you scan the second chance tickets automatically instead of typing them all in. I also created an Excel spreadsheet to help me keep track of which game pieces I had received and figure out if I had any winners.

Here’s what I won:

  • About 6 free donut coupons
  • ~$30 worth of free or discount coupons for products that I actually use
  • $5 cash
  • $5 Safeway gift card
  • ~9 free movie rentals from Fandango Now

The last one was the most common one. Many of the second chance game pieces went towards free rentals on the Fandango Now service. It’s not a service that I use otherwise, but hey, free is good. We’ve used three of those free rentals while my parents were visiting and I don’t have any complaints about the service.

So was it worth my time? Definitely not. But I still had fun and won a little more than last year so I guess that’s probably enough to keep me going next year.

The only difference is that I saved a few of the game pieces and I want to write an app that will automatically detect which board game pieces I have. Those could all go into a database along with the pieces from any friends who want to play with me. It will save us all the time of typing them in and we can pool our resources.