My son programmed his first stack overflow

My son programmed his first stack overflow today using polyup.

NAND gate toy

A small interactive toy NAND gate:

A mantra for both the high times and the low

At any moment, this could be over

Converting a protocol buffer enumeration to a Python enumeration

If you have a reference to a protobuf enumeration MyEnum you can convert it into a Python enumeration with:

MyPyEnum = enum.Enum(MyEnum.DESCRIPTOR.full_name, MyEnum.items())

(source, pypi)

Toy game about parity

Resources for San Francisco Bay Area parents

Events and Activities

Crime

  • Citizen app has real-time alerts of police and fire department activity: http://www.citizen.com
  • Megan's Law map: https://www.meganslaw.ca.gov

Mailing lists

Living in San Francisco without a car

First, some assumptions from early 2018:

  • Two adults and one child (when paying for transit)
  • Car ownership cost of $540/month ($300/month parking +$120/month depreciation +$100/month maintenance +$20/month registration and fees)
  • $3.60/gallon gas price
  • 24 miles/gallon

Example round trip of 11 miles to San Bruno for 5.5 hours (early 2018)

Running awscli inside of Docker

If you have docker, you can run Amazon's awscli inside a docker container using wtanaka/alpine-37-uid-awscli (source). To use it:

  1. Download it, e.g. with:

    curl https://raw.githubusercontent.com/wtanaka/docker-alpine-37-uid-awscli/master/aws > aws

    or alternatively:

Using docker to replace all command line programs

Sometimes you want to run the same version of a command line program across many operating systems. Maybe your development environment is in Mac OSX and your CI system or production environment is Ubuntu. In these cases you can use Docker to package the command line program into a container which will then be consistent everywhere.

Wesley's Software Philosophy v1

  • Immutability and referential transparency enable simplicity.  Achieve them when possible.
  • Shared state increases complexity and reduces parallelism.  Avoid it.
  • Fail as fast as possible.  The earlier you detect buggy code or invalid data, the less complicated the fix.
    • Use as much static analysis as you can, including linting and static type checking.
    • Prevent bad data from propagating forward through your software, instead of writing unboundedly complex software to handle it. 

Pages

Subscribe to Wesley Tanaka RSS