Something I learned
Server-side validations
This week, I learned the hard way that I have to do this. I was so happy about how solid our input fields are at enforcing constraints on inputs. Whether it be length, existence, or format, I spent a good amount of time to make sure the experience of inputting things into the site was as easy and clear as possible.
As part of this, we have a few whole number fields, one of which is the estimated delivery. I was shocked to find out that a non-trivial number of users managed to input decimals into this field. I did my usual testing of trying all major browsers and all of them respected the fact that I didn't allow the user to type the decimal period. That's when it crossed my mind that I never tested copy-pasting inputs into fields. The site has been running for two years and has 60K+ users and this never crossed my mind.
Yeah, it turns out that copy-pasting decimal numbers into the estimated delivery field circumvents the dot character typing constraint. There are two ways to solve this, and I opted for the server-side way because it will deal with the data already in the database today. It was as simple as enforcing this constraint on the deserialization of the database data into Python objects.
I guess I was wrongfully confident about how well I enforced the constraints on my inputs. I was also in Shipping Mode™ and definitely did not worry about the edge case like that. Someone hitting our API with invalid data was also the least of my worries at the time.
I learned my lesson the hard way. Later, I also added the validation on input change so the user gets feedback much sooner than making the API call.
Pig Kidneys in Humans
I'm not going to rephrase this Nature article about how they transplanted a pig's kidney into a functioning human for the first time.
This is awesome. The future is going to be great, especially once immunosuppressants are made unnecessary. It'll make organ transplantation accessible and with much lower downsides.
Another great thing is that it sounded like the pig they used lived a good, healthy life, which is great for everyone. I guess they need to be healthy to be picked for this, so the incentives are aligned. Now imagine eating bacon from a pig whose organ will process it inside of you later.
Gratefulness
Really, not much positive happened last week. I met a lot of people at GDC, and the results of that are pending. My personal life is also stable for the most part, besides the fact that my sister found out she has a valve disjunction. So, I'm going to leave this section without substance, as there is no point in forcing it. Well, I know there is a point, but I will not reap the benefit if I'm aware I'm forcing it.