Misc home improvement progress.

August 8, 2018 Home renos No comments , , ,

I’ve now got all but a very light skim coat left in my office (plus some sanding and priming), and then I’ll be ready to paint.  This spot had 6 really really bad patches from the old home owner:

He patched with some sort of gummy crap, and it left a visible mess.  I had to scrape all his patches off completely (in other places around the house too), and patch from scratch.  This left a mess, as the gummy patch compound he used ripped off the surface of the drywall in a few places, but it’s now almost done.

The office walls are now officially more patches than anything else:

Here you can see the patch from taking out the ancient intercom system, as well as an ancient unused electrical box that once had security system wiring in it.  Here’s a view of the home office

The big giant patch at the back was where the old home owner made his (very badly insulated) cutout into the garage for a CRT TV.  It’s now skim coated, sanded and primed.  The office is really dusty from that sanding, so I need to vacuum thoroughly.

I also got the outlet in the master bedroom sanded and primed today:

That’s where the ancient ceiling fan controller (and something else) used to be.  I consolidated that down to one box, and rerouted some of the electrical.  I had to put something there, and we now have a somewhat strange outlet up on the wall, but that actually worked well for a TV plug when we had a TV in the bedroom (we gave it away, but will eventually get a new one).

And finally, the bathroom is ready for the tile guys, with the casing on the window frame now installed.  Tile is going to run up the wall under it (and one the sides a little bit up the wall around the frame) :

It was nice to have an excuse to use my compressor.  It wasn’t a virgin, but was pretty close.

Moving an electrical outlet 4″ up in the bathroom.

August 5, 2018 Home renos 1 comment

We are putting in a freestanding bathtub in our bathroom, and are having the tile run up the wall up to 42″.  Unfortunately the bottom of the countertop electrical outlet was sitting there at about 40″.  When I pointed this out to the tile guy, he suggested that I try to move it, either up or down (but preferably up).

Unfortunately, I’d already done all my drywall repairs on the sink side of the shower (as I’d removed the ugly medicine cabinet), so I really wasn’t looking forward to this task.  It would have been so easy when I had the wall all open!

I vaguely remembered that there was slack in the electrical lines, and that I’d tidied up that wire with an electrical staple when I rebuilt the shower stall, so I thought I’d be able to move it up.  I opened things up, being very careful in my removal of the box to not nick any wires, and found out that there was enough slack available that I could move the box up:

A bit of strapping and I had rough drywall back in place, and a first coat of mud on:

The almost finished (I need a final skim coat to smooth out some rough bits before sanding and priming) product looks pretty good:

Some progress prepping the bathroom reno.

June 18, 2018 Incoherent ramblings No comments , , ,

We are finally renovating our master bathroom.  We’ve hired the guys from Markham Tile to do the plumbing and tile work (especially in the shower, which I was afraid to do).  They don’t do the drywall part of the job, and left me some floor repairs as well.  Here’s where the plumbing was done for the new tub:

In this picture, I’ve started installing some 2×4 “strapping” to support the replacement floor boards.  I also ended expanding the holes a bit so that I could fit in pieces that used the joists to hold things up.  Here’s things with all the puzzle pieces installed:

Over where the sink will be, I also had a mess to deal with:

I ended up expanding that hole a bit too, mostly to make a rectangular hole that would be easier to patch.  I also installed some 2×4 “strapping” in this hole for extra support:

The final installed floor patch looks like:

With flooring in place, after a lot of tidy up, and installation of a small bump-out around some pipe that couldn’t be moved, I was ready to start throwing around some mud.  Here’s the pre-mud view:

and by the sink:

This view shows where the medicine cabinet used to be.  We removed it so that the shower head could be in a less awkward spot (it’s now centered in the shower).  Unfortunately, moving the shower head and control left me some shower board repair to do.  Here’s a pre-mud view of the shower where I’m doing the repair:

We opted not to install the “toe tester” in this shower rebuild since we were adjusting the plumbing anyways.

Here’s the bathtub area after an initial rough layup of mud:

and the shower board repair:

and a really badly lit shot of the sink area:

Tomorrow I lay up a bit more mud.

What fun or important formulas would you put on a shirt?

June 2, 2018 Just for fun 2 comments ,

Lance got a custom made glow in the dark “math, physics, and chemistry” shirt for his birthday a year or two ago (It was Sofia’s idea, she bought the materials, and I got to play.)

He is clearly unimpressed with the photo op, but I wanted to share this shirt, which includes some of the what I thought were a number of the most interesting or important relationships

  • Gamma function, which generalizes factorial to non-integer values.
    \Gamma(z + 1) = \int_0^\infty t^z e^{-t} dt.
    This formula satisfies \( n! = \Gamma(n + 1) \).

  • Euler’s:
    e^{n i \theta} = \lr{ \cos\theta + i \sin\theta }^n.

  • Schr\”{o}dinger’s equation
    i \, \hbar \PD{t}{} \ket{\psi} = H \ket{\psi}.

  • Taylor series
    f(x) = \sum_{k = 0}^\infty \frac{f^{(k)}(0)}{k!} x^k.

  • Euler-Lagrange equations:
    \PD{x_i}{\LL} = \frac{d}{dt} \PD{\dot{x}_i}{\LL}.
    These formulas can be used to express most dynamics relations. You can think of them as basically being the consequence that physical laws are either inherently greedy or lazy.

  • Stokes’ theorem, in its geoemetric algebra form
    \oint_{\partial V} d^n \Bx \cdot T = \int_V d^n \Bx \cdot \lr{ \spacegrad \cdot T }.

  • Quantum commutator relationships between position and momentum
    \antisymmetric{X}{P} = i \, \hbar.

  • Fourier transform
    \tilde{f}(\omega) = \int_{-\infty}^\infty f(t) e^{-i \omega t} dt.

  • Vector product
    \Ba \Bb = \Ba \cdot \Bb + \Ba \wedge \Bb.
    In geometric algebra the vector product has a dot and wedge product split. In \R{3} you can write this as
    \( \Ba \Bb = \Ba \cdot \Bb + I (\Ba \cross \Bb) \), where \( I = \Be_1 \Be_2 \Be_3 \).

  • Relativisitic energy (Einstein’s)
    E = \frac{m c^2}{\sqrt{1 – (\Bv/c)^2}}.

  • Cauchy contour integral relationships for the nth derivative
    f^{(n)}(s) = \frac{n!}{2 \pi i} \int_C dz \frac{f(z)}{(z-s)^{n+1}}

  • Maxwell’s equations
    \partial_\mu F^{\mu\nu} &= J^\nu \\
    \epsilon^{\mu \nu \rho \sigma} \partial_\nu F_{\rho \sigma} &= 0.
    I’m partial to the geometric algebra form of Maxwell’s equations \( \grad F = J \), but that wouldn’t have looked as good on the shirt.

  • Dirac equation
    0 = \lr{ i \gamma^\mu \partial_\mu – m } \psi.

If you had to pick a set of important formulas on a tee-shirt, which ones would you pick?

UPS twitter bot’s response to my blog post: complete nonsense.

May 25, 2018 Boycott UPS No comments , , ,

I received the following response to my post about the latest customs brokerage extortion by UPS (charging us to destroy the first shipment of a package).  Clearly, the UPS Customer Support twitter feed is a bot.  Once provided with a non-standard answer it shut up for good.




UPS: charging you to break your stuff.

May 25, 2018 Boycott UPS No comments , , ,


I have to admit that I hate UPS with a passion.  As a Canadian, if you ever want to purchase something from the United States, you have to pray that UPS isn’t the shipper, because if they are you are going to get screwed.  Now, let’s be perfectly clear.  By screwed, I don’t mean something that leads to a shuddering climactic orgasm, and a great afternoon nap.  Screwed by UPS means you are raped in the ass.  Think of yourself as a prisoner serving the first day of twenty years in maximum security, and UPS is the gang of Nazi skinheads oogling you as you are naked in the shower picking up the soap from the floor.

UPS runs a double payment scam where they leverage Canadian customs to charge you for the “service” of collecting any customs charges.  Their charges for this service are often more than the original shipping amount, and can be a large percentage of the total declared value of the item.  You may have thought that you (or the person sending the package) paid for shipping, but UPS collects on both ends, from both the shipper and the reciever.  It’s a really nice scam and I am sure it is immensely profitable.

Here’s the latest example:

UPS determined that $7.62+$14.20 was due to the Canadian government (which was too high), and then charged $36.85+$4.79 for the service of collecting this payment.  The total customs charge from UPS, including the duty is a whopping $63.46, which was 62% of the total value of the item in this case.

This extortion can be handled by collecting the shipping slip from the UPS delivery guy, telling him that you’ll be self clearing, and then calling UPS and telling them that you’ll be self clearing the item.  They then email you the forms that you need to take to the CBSA (Canadian Border Security Agency), which look like:

You have two business days to complete the self clearing process, and for that time UPS will hold your package ransom.

The self clearing process is a real pain in the ass to do, at least if you live in Markham, since the only CBSA office that handles this paperwork is all the way down near the airport, on 2720 Brittania Rd E.  It’s a windy road that you are not inclined to believe you are allowed to be on.  You also have to pass through a huge gate that has razor wire all over it, and looks like the armed guards just stepped away for a moment, but will be back to shoot you shortly for trespassing.

Assuming you avoid getting shot or arrested for tresspassing, and find the office, you can then collect the following form:

This is the B15 form that UPS requires to release the package to you.  You email then this form, and they arrange to re-deliver the package to you after they receive the paperwork.

We went through the pain of doing the self clearing for the package above (a glass sink), but after UPS left it at the door (without even ringing the doorbell), we discovered that they had destroyed the sink, which looked like this:

This is not in a good state to install.  We called UPS to collect the item that they destroyed and the manufacturer to ship a replacement item.  This is unfortunately where things get really irritating.  UPS now charged us for the service of having originally destroyed the first sink, by imposing a second brokerage handling fee for the replacement item.  Since we’d paid the duties all ready, this final charge of $34.86 was for the difficult service of collecting $0.00 duty and GST for the Canadian government:

My wife spend a half hour arguing with the poor UPS delivery guy (who is a pawn) that they had no right to charge us a second time for brokerage fees, when we’d already handled those the first time.  She was ready to keep the item without paying this additional extortion, and deal with UPS management/customer-service after the fact, but the delivery guy said that the police would be called if that was done.

They’ve basically got you by the balls.  This time, we ended up paying their extortion, as we didn’t trust UPS not to destroy the item a second time, and have plumbers coming for install work starting next week.  I don’t hold much hope that calling UPS management will result in any refund, since they are perfectly happy with customers perceiving them as a money grubbing company that behaves unethically, and is ready to shaft you at every possible opportunity.

UPS’s new motto: “If we can’t screw you with brokerage fees the first time, we will destroy your stuff and charge you a second time to replace it.”  We just paid $34.86 towards their new marketing campaign.

Mainframe development: a story, chapter 1.

April 19, 2018 Mainframe No comments , , , , , , , , , , , , ,

Once upon a time, in a land far from any modern developers, were languages named COBOL and PL/I, which generated programs that were consumed by a beast known as Mainframe. Developers for those languages compiled and linked their applications huddled around strange luminous green screens and piles of hole filled papers while chanting vaguely latin sounding incantations like “Om-padre-JCL-beget-loadmodule-pee-dee-ess.”

In these ancient times, version control tools like git were not available. There was no notion of makefiles, so compilation and link was a batch process, with no dependency tracking, and no parallelism. Developers used printf-style debugging, logging trace information to files.  In order to keep the uninitiated from talking to the Mainframe, files were called datasets.  In order to use graphical editors, developers had to repeatedly feed their source to the Mainframe using a slave named ftp, while praying that the evil demon EBCDIC-conversion didn’t mangle their work. The next day, they could go back and see if Mainframe accepted their offering.


Incidentally, as of a couple days ago, I’ve now been working for LzLabs for 2 years.  My work is not yet released, nor announced, so I can’t discuss it here yet, but it can be summarized as really awesome.  I’m still having lots of fun with my development work, even if I have to talk in languages that the beast understands.

Applied vanity press

April 9, 2018 math and physics play No comments , , , ,

Amazon’s createspace turns out to be a very cost effective way to get a personal color copy of large pdf (>250 pages) to markup for review. The only hassle was having to use their app to create cover art (although that took less time than commuting downtown to one of the cheap copy shops near the university.)

As a side effect, after I edit it, I’d have something I could actually list for sale.  Worldwide, I’d guess at least three people would buy it, that is, if they weren’t happy with the pdf version already available.

I wrote a book: Geometric Algebra for Electrical Engineers

April 5, 2018 math and physics play 6 comments , ,

The book.

A draft of my book: Geometric Algebra for Electrical Engineers, is now available. I’ve supplied limited distribution copies of some of the early drafts and have had some good review comments of the chapter I (introduction to geometric algebra), and chapter II (multivector calculus) material, but none on the electromagnetism content. In defense of the reviewers, the initial version of the electromagnetism chapter, while it had a lot of raw content, was pretty exploratory and very rough. It’s been cleaned up significantly and is hopefully now more reader friendly.

Why I wrote this book.

I have been working on a part time M.Eng degree for a number of years. I wasn’t happy with the UofT ECE electromagnetics offerings in recent years, which have been inconsistently offered or unsatisfactory.  For example: the microwave circuits course which sounded interesting, and had an interesting text book, was mind numbing, almost entirely about Smith charts.  I had to go elsewhere to obtain the M.Eng degree requirements. That elsewhere was a project course.

I proposed a project to an electromagnetism project with the following goals

  1. Perform a literature review of applications of geometric algebra to the study of electromagnetism.
  2. Identify the subset of the literature that had direct relevance to electrical engineering.
  3. Create a complete, and as compact as possible, introduction to the prerequisites required for a graduate or advanced undergraduate electrical engineering student to be able to apply geometric algebra to problems in electromagnetism. With those prerequisites in place, work through the fundamentals of electromagnetism in a geometric algebra context.

In retrospect, doing this project was a mistake. I could have done this work outside of an academic context without paying so much (in both time and money). Somewhere along the way I lost track of the fact that I enrolled on the M.Eng to learn (it provided a way to take grad physics courses on a part time schedule), and got side tracked by degree requirements. Basically I fell victim to a “I may as well graduate” sentiment that would have been better to ignore. All that coupled with the fact that I did not actually get any feedback from my “supervisor”, who did not even read my work (at least so far after one year), made this project-course very frustrating. On the bright side, I really like what I produced, even if I had to do so in isolation.

Why geometric algebra?

Geometric algebra generalizes vectors, providing algebraic representations of not just directed line segments, but also points, plane segments, volumes, and higher degree geometric objects (hypervolumes.). The geometric algebra representation of planes, volumes and hypervolumes requires a vector dot product, a vector multiplication operation, and a generalized addition operation. The dot product provides the length of a vector and a test for whether or not any two vectors are perpendicular. The vector multiplication operation is used to construct directed plane segments (bivectors), and directed volumes (trivectors), which are built from the respective products of two or three mutually perpendicular vectors. The addition operation allows for sums of scalars, vectors, or any products of vectors. Such a sum is called a multivector.

The power to add scalars, vectors, and products of vectors can be exploited to simplify much of electromagnetism. In particular, Maxwell’s equations for isotropic media can be merged into a single multivector equation
\lr{ \spacegrad + \inv{c} \PD{t}{}} \lr{ \BE + I c \BB } = \eta\lr{ c \rho – \BJ },
where \( \spacegrad \) is the gradient, \( I = \Be_1 \Be_2 \Be_3 \) is the ordered product of the three R^3 basis vectors, \( c = 1/\sqrt{\mu\epsilon}\) is the group velocity of the medium, \( \eta = \sqrt{\mu/\epsilon} \), \( \BE, \BB \) are the electric and magnetic fields, and \( \rho \) and \( \BJ \) are the charge and current densities. This can be written as a single equation
\lr{ \spacegrad + \inv{c} \PD{t}{}} F = J,
where \( F = \BE + I c \BB \) is the combined (multivector) electromagnetic field, and \( J = \eta\lr{ c \rho – \BJ } \) is the multivector current.

Encountering Maxwell’s equation in its geometric algebra form leaves the student with more questions than answers. Yes, it is a compact representation, but so are the tensor and differential forms (or even the quaternionic) representations of Maxwell’s equations. The student needs to know how to work with the representation if it is to be useful. It should also be clear how to use the existing conventional mathematical tools of applied electromagnetism, or how to generalize those appropriately. Individually, there are answers available to many of the questions that are generated attempting to apply the theory, but they are scattered and in many cases not easily accessible.

Much of the geometric algebra literature for electrodynamics is presented with a relativistic bias, or assumes high levels of mathematical or physics sophistication. The aim of this work was an attempt to make the study of electromagnetism using geometric algebra more accessible, especially to other dumb engineering undergraduates like myself. In particular, this project explored non-relativistic applications of geometric algebra to electromagnetism. The end product of this project was a fairly small self contained book, titled “Geometric Algebra for Electrical Engineers”. This book includes an introduction to Euclidean geometric algebra focused on R^2 and R^3 (64 pages), an introduction to geometric calculus and multivector Green’s functions (64 pages), applications to electromagnetism (82 pages), and some appendices. Many of the fundamental results of electromagnetism are derived directly from the multivector Maxwell’s equation, in a streamlined and compact fashion. This includes some new results, and many of the existing non-relativistic results from the geometric algebra literature. As a conceptual bridge, the book includes many examples of how to extract familiar conventional results from simpler multivector representations. Also included in the book are some sample calculations exploiting unique capabilities that geometric algebra provides. In particular, vectors in a plane may be manipulated much like complex numbers, which has a number of advantages over working with coordinates explicitly.


In many ways this work only scratches the surface. Many more worked examples, problems, figures and computer algebra listings should be added. In depth applications of derived geometric algebra relationships to problems customarily tackled with separate electric and magnetic field equations should also be incorporated. There are also theoretical holes, topics covered in any conventional introductory electromagnetism text, that are missing. Examples include the Fresnel relationships for transmission and reflection at an interface, in depth treatment of waveguides, dipole radiation and motion of charged particles, bound charges, and meta materials to name a few. Many of these topics can probably be handled in a coordinate free fashion using geometric algebra. Despite all the work that is required to help bridge the gap between formalism and application, making applied electromagnetism using geometric algebra truly accessible, it is my belief this book makes some good first steps down this path.

The choice that I made to completely avoid the geometric algebra space-time-algebra (STA) is somewhat unfortunate. It is exceedingly elegant, especially in a relativisitic context. Despite that, I think that this was still a good choice from a pedagogical point of view, as most of the prerequisites for an STA based study will have been taken care of as a side effect, making that study much more accessible.

Propublica’s IBM age discrimination investigation

March 22, 2018 Incoherent ramblings No comments , , , , ,

Not too long after I quit IBM for LzLabs in 2016, I was sent a copy of Pro-publica’s survey about age discrimination based firing and forced retirement at IBM. It appears that this survey was just the start of a very long investigation, and they’ve now published their story.

I wasn’t forced out of IBM, and am only ~45 years old, but at the time I had close to 20 years at IBM (including my student internship), and could see the writing on the wall. Technically skilled people with experience were expendable, and being fired or retired with gusto. To me it looked like 25 years at IBM was the firing threshold, unless you took the management path or did a lot of high visibility customer facing work.

IBM’s treatment of employees in the years leading up to when I quit was a major part of my decision to leave. I considered my position at IBM vulnerable for a number of reasons. One was my part time status (80% pay and hours), as I’d been slowly studying physics at UofT with a plan of a future science based job change. Another was that I was a work in the trenches kind of person that did not have the high visibility that looked like it was required for job security in the new IBM where the quarterly firing had gotten so pervasive that you could trip on the shrapnel.

Even after two years I still use “we” talking about my time as an IBMer working on DB2 LUW, as I worked with people that were awesome (some of which I still work with at LzLabs.) Despite now competing with IBM, I hope they stop shooting themselves in the gut by disposing of their skilled employees, and by treating people as rows in resource spreadsheets. It is hard to imagine that this will end well, and it’s too easy to visualize an IBM headstone sharing a plot with HP and Sun.

When I was recruited for LzLabs, my options seemed like continue working for IBM for <= 5 more years before I too got the ax, or to ride into the wild west working as a contractor for a company that was technically still a “startup”. Many startups don’t make it 5 years before folding, so even in the worst case it looked like no bigger risk than IBM, but I thought I was going to have a lot of fun on the ride. LzLabs was just coming out of stealth mode when I was interviewed, but had an astounding ~100 people working at that point! Salaries add up, so it was clear to me that LzLabs was not really a startup in the conventional sense of the word.

It is amusing to read the Pro-publica article now, as most of LzLabs employees are probably over 65. At 45 I’ve been singled out in staff meetings as the “young guy”. Many of the LzLabs employees are technically scary, and know the mainframe cold. I once wrote a simple PowerPC disassembler, but that’s a different game than “disassembling” 390 hex listings by chunking it into various fixed size blocks hex sequences in an editor so it can be “read” by eye!

In less than one month I’ll have been working for LzLabs for 2 years, about six months of which was a contractor before LzLabs Canada was incorporated. Two years ago, if you had mentioned JCL, LE, PL/I, COBOL, QSAM or VSAM (to name a few) to me, I’d have known that seeing COBOL is a good reason to get to an eye wash station pronto (it still is), but would not have even recognized the rest. It’s been fun learning along the way, and I continually impress myself with the parts that I’ve been adding to the LzLabs puzzle. Our technology is amazing and I think that we are going to really kick some butt in the marketplace.