http://www.MikeMaloney.us 

Wednesday, June 26, 2019

Maloney's Laws

A few years ago I was lucky enough to lead a small team that got to develop a large new distributed system.  The project was/is quite successful, quickly replacing the previous, scaling up well, and being stable.   During early code reviews I often had a couple of pieces of feedback:
  1. Never hold a mutex while doing anything that may block.
  2. Don't set deadlines on RPCs.
These were informed by working on and debugging previous systems like Bigtable and other complex distributed systems.  I repeated them so much, that eventually they were transcribed as Maloney's Laws.  Over the next few years probably 30+ engineers contributed to the project, many went on to new projects and some even began to cite these laws to other engineering teams.

Now I know that these laws as stated here may be overly-simplistic. But given the way Google builds systems internally, they are good rules of thumb.   Of course like all rules, there are exceptions.

I will explore the logic behind these two rules in follow up posts.

Sunday, March 20, 2016

Peopleware

Peopleware is a classic of software engineering. For whatever reason it took me fifteen years of industry experience to arrive at it, but it really spoke to me.

The first point I got is to hire smart, motivated people who care about quality. Then get out of their way. The type of work software engineers (and other "knowledge workers") do is hard to quantify, so you have to take the longer view. If the output of these teams is good, don't concern yourself with minutiae like working hours, hair color, specific paper work procedures, and the like. This is the mantra of many technology companies, Google especially.

My second take-away from the book was about teams. In short, software engineering is not an individual sport. It is a team sport. The book actually goes further and explains that isn't even a sufficient metaphor. It is a team where everyone succeeds or fails together. An individual cannot pull a whole team (i.e. no Michael Jordan). It compares instead to choirs, where everyone needs to be in sync, if a single voice is out of tune, it doesn't matter how good any one person's voice is. Luckily in teams I've worked on, everyone has been skilled enough to succeed. I instead focus my time on helping the team jell. This again is very consistent with the Google experience (See recent news articles about building teams at Google.)

 There was one other message from the book that really spoke to me, but is completely inconsistent with Google: work environment. Deeply ingrained in Google culture is the open floor plan. No one[1] has an office to themselves, instead we have large offices with desks densely arrayed, sometimes divided by low walls. This is the one facet of Google that I hate. If I could change one thing it would be to have offices. Microsoft had offices, and I could close my work and code prodigiously. These days I only get in "the flow" late in the day after all meetings, when others have mostly gone home, early before others arrive, or at home.  Actually it is worse now that I spend so much of my time on people management.  I book conference rooms to work on performance reviews, hiring and such, so that I am not distracted, and I don't have to worry about anyone reading my screen.    Tom and Tim got this right in Peopleware:

In most of the office space we encounter today, there is enough noise and interruption to make any serious thinking virtually impossible.

Hear! hear!

Books

I have always read a lot of books. Even more when I am on a hiatus from Candy Crushing (a guilty pleasure I sometimes go overboard on). I think I always take some tidbits from books, they provide the granules of sand that I use to build my world view. But I have a horrible memory for specifics. So I will shortly begin to write entries for books I read. Not full on reviews, but the things I find interesting about books. The goal is to help me retain more from the books, and externalize some of these memories, so that I can look back on my learnings. If you find any of the info useful, that is great as well.

Wednesday, August 19, 2015

GoDaddy, SSL, Google app engine, and custom domains

I wanted to make my personal website only accessible via https, seems like this should be straight forward, right?  Just buy a certificate, install it via appengine, and voila!  It was almost that easy, but was a little intimidating, and only one non-obvious snag that was quickly remedied.

My set up is using google domains for my registry, google apps to host the custom domain via google app engine.  This all worked before I tried to install the SSL certificate, so I will elide it here.

I tried to shop around for SSL certificates, this was intimidating, because quite frankly, I know little about certificates, nor web security.  I've used godaddy in the past, and figured I would give them a try.

In order to generate an SSL certificate, I first had to generate a private key:
note I am using OS X


$ openssl genrsa -out mykey.pem 2048
Generating RSA private key, 2048 bit long modulus
...

Next up I had to create a CSR (Certificate Signing Request):


$ openssl req -new -key mykep.pem -out mysite.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
...

You just fill out the form.

Next you request upload the CSR [mysite.csr] to GoDaddy, and then wait for it to validate ownership (I had to set up a TXT record to do this).  Finally you download the certificate for "other" server.

Now you have a zip file with two certificates, called <some_hex_string>.crt and gd_bundle-g2-g1.crt

You must create pem files for each doing something like (this is black magic to me):
$ openssl x509 -outform der -in gd_bundle-g2-g1.crt -out gd_bundle-g2-g1.der
$ openssl x509 -inform der -in 2gd_bundle-g2-g1.der -out gd_bundle-g2-g1.pem

Then simply cat the two together (order matters):
$ cat <some_hex_string>.pem gd_bundle-g2-g1.pem > combined.pem

Now upload combined.pem and mykey.pem to Google Apps.

Wednesday, November 26, 2014

Blogger Formatting

I've created a look and feel for my website,  but my blog is hosted by blogger so I couldn't plug it into the same framework.  Hence the look and feel was different.  I don't want anything flashy, just a standard blog, so I've been attempting to wade into creating my own blogger template.  The online documentation on page elements and widget tags, are insufficient for actually creating your own template.  There is no documentation on the widget types, or the data items available in the templating language of your page.  I've searched the web and found a couple of blog postings of "how tos" on creating your own templates, they were all far from complete.

To attempt to solve this, I've started with a standard template and am making minimal transformations, and it has now ended up looking mostly like the rest of the blog.  But it was done via a lot of manual effort.  It would be nice if blogger had a standard templating language, that was I could share it between my blog and the rest of my website.  I will continue my research to see if I can find anything more.

Sunday, October 12, 2014

Where Do They Walk Upside Down?

I remember in some cartoons the other side of the Earth being presented as people walking upside down.  Typically a character would fall through a hole in the Earth.   For some reason this was often presented as China. As I grew up in New York, I presumed that if I ever fell through a bottomless pit, I would end up further south– maybe Australia or New Zealand.

Turns out I would have ended up in the Indian Ocean: in the same general vicinity of the missing Malaysian Airlines flight.   In fact most of the United State is opposite the Indian Ocean.  The only exception I can find is Hawai'i is opposite Botswana.  Who knew?

This is what I did when home sick on Sunday in October.  I used the Google Maps API, to do reverse Geocoding.  This worked pretty well, I could get the current latitude and longitude, invert and add 180ยบ, and see where I end up.  The maps API made it simple to select spots on the map, and look up addresses at different levels of granularity.  The only problem I found, is that I couldn't reverse-geocode, to oceans or geographic features.  There has to be a location for that data somewhere.  I will have to search.

Mobile Test

Sitting home ill on a Sunday, I am playing with my website.  I have it working mostly as I want it to.  A couple of shortcomings still.  The biggest shortcoming is the lack of content. That I will attempt to fix next.

I've got a busy couple months ahead of me: Some of it personal, travel, and hobbies.  Maybe some of that will show up here...