It happened again

Fell asleep during takeoff enroute home from Honolulu. Fussy child also mysteriously falls Al sleep for the entire trip. I wonder if there are any side effects to this “sleep machine” they like to use on airplanes ?

Japanese wave painting

Visiting Honolulu for vacation, I chanced upon a view of the sun shinning on Pacific ocean waves. I see a certain pattern of light that shines only upon top part of waves. I think i finally understand what these japanese artists are trying to depict. Japanese painting of waves have a portion of white on top of the waves. Previously I had imagined that they were trying to draw foam produced by crashing waves. But now I see, the white parts are actually golden or silver colored reflection of the bright sun. They’re so bright that white probably is the closest color we can use to draw them in contrast to parts of the waves that do not receive the same amount of sun.

Amazon accepts only negative reviews

I have, around thanksgiving of 2021, posted a slew of very positive reviews on Amazon products. These products were all non-American brand products, obviously made in China or India. My review pointed out their many many faults, but also included positive aspects and 3 or 4 stars.

In one particular instance, I purchased a flugelhorn (that’s just German for the trumpet). It was clearly made in India based on seller name and many many comments complaining about its country of origin. This item’s name starts with “New…”, but it’s price is $160ish which is about half the price of the next flugelhorn more expensive than it. The next horn with higher price is plastic.

I happily ordered one, and then 3 more, after discovering the first “New..” horn stinks of saliva. The next 3 were also not new and all stinks. I can see white residue that could be mold or rust or mildew in the bell of the horn. But the horn makes a nice sound. So I kept the best looking one.

Needless to say, I had to do a lot of work to get it playable. First a warm soapy bath. Oil and grease everything. Buy a new mouthpiece since the one it came with is way too small. Then I appoint played on it for an hour or two before discovering that I couldn’t empty spit out of it. These horns make a crackling sound when there’s liquid inside. The water key spit outlets all look right, except after careful inspection I finally understand why these horns were all returned with saliva inside: their foremost water key closest to the bell have the external anatomies of a water key spit drain, but under the cap there is no hole.

That one is easy to fix, an eighth inch metal drill from the Home Depot did the trick. And honestly, I never realized drilling metal, even into the thin wall of a brass pipe, is much harder than drilling wood. It took a solid minute to make it through the wall of the tubing. I almost wonder if this horn is made of steel instead of brass. Because I’ve seen some light bumps dent brass instruments, I can’t imagine them being this hard. Anyways, it drains now. Another two baths, vinegar followed by baking soda, to remove white chunky mildew and de-acidify the inside of the horn. and the horn now plays and smells great.

After another week of play, I discover that the leadpipe leaks air. This is an unexpected bug for me as the trumpet I played in my pubescent years did not have a tuning leadpipe. This is a piece of popping that plugs into the horn before the mouthpiece. It is adjustable and you can pull it out for a longer horn. Anyways, this is a hard problem because the water keys also leaked air. I had to re-cork them by gluing two 4mm cork pads together to increase the spring tension. But after plugging those three hole, it still took too much air to play. Finally, I took my saliva soaked fingers and placed it next to the leadpipe and felt a leak. This particular problem was fixed by gingerly wrapping. The unthreaded sliding tuning pipe with plumbers thread seal tape, again from Home Depot. (This is the 2” white tape you put around a pipe before screwing on the bolt-end. The process can be aided by inserting a toothpick between the screw holders to temporarily widen the outer tubing) Alas, the horn plays again, and I can actually hold a high-C for more than a few seconds. But sadly the pipe seal tape has a slightly dampening effects that makes sounding out notes slightly harder for me.) anyways, it works now…

I write my experience on Amazon with a 4 star, because I feel the horn actually does play fine. I don’t care if it was Indian made or not. (There are, btw, Chinese made horns costing north of >$600. These obviously benefit from western productization and QA management thinking. Everything is beautifully packaged, completely clean, correctly sized mouthpiece, well made and easy to play in every sense. The improvement in experience from <$200 to >$600 makes me want to try all those European horns at >$3k price, but, alas, I cannot afford that experimentation.) Amazon flatly rejected the review and the 4-star review including some short instructions on how to make the cheaper horn work completely.

Later I repost a all negative review with 1 star and it is quickly accepted.

A few other flugelhorn horn replaced purchases like the mouthpiece all suffered similar fate. Positive reviews from me are invariably rejected due to non-compliance with posting guidelines. Completely negative reviews are accepted quickly with gratitude.

I know Amazon have been banishing many Chinese companies from their market place. But this kind of editorial intervention is very manipulative. I should be permitted to be encouraging to the seller if I want to be. By providing information I give value to the company by improving other customers shopping experience. I mean I review my posts very carefully, they probably have better spelling and grammar than this blog.

I guess this is partially to say that I feel I owe Amazon’s services a statement of gratitude. All this free next day shipping and free returns. I am pampered beyond my wildest dreams before Amazon. I mean, I believe a lot of human culture around frugality and acceptance of the present (you get what you get and you don’t complain) exists because we didn’t have Amazon all those millennia. We couldn’t try pants and socks and return without causing grotesque disruption to the sellers, makers and marketers of products. We had to build curbs to our enthusiastic desires in order for our society to be viable. No, Amazon is not evil and it is not making people evil by offending some common traditional personal ethical prescriptions. For these I am very grateful.

But, we must now contend with modern ethical dilemmas of fairness with liberty. It would be unethical for Amazon to deny positive reviews based on country of product origin. It would also be unfair to me if it restricts my reviews in a specific way to reduce the influence of opinions of people based on my protected attributes. It is also kind of disappointing for amazon to claim that it made the decision “after very careful review” without being able to expend just slightly more effort (either human or AI based) to justify the decisions to me. We can choose to prioritize this over flying to Moon and Mars, imho.

Get floored!

This another episode of friends don’t let friends commit bugs into main. I was reading a previous post here on the FAM blog. It gave me a flash back of the one time when I discovered hash tables.

…to bucket a String, s, say in the jvm, you might like writing “s.hashCode() % bucketCount”

Except that expression will produce, as you will quickly discover if you had the whole hash table, negative numbers half of the time for strings with just a few characters.

The ‘%’ operator returns a remainder that has the same sign as the dividend of the division in question, and in this case the dividend is the hash code which is negative sometime due to overflow of 32-but integer range. One replacement operator you probably can use is “math.floorMod(s.hashCode(), bucketCount)”. The floor modulo operator produces remainders that always has same sign as the divisor, in this case the bucket count. This behavior is well documented since C and backwards, so hopefully you will find this information corroborated by many webpages.

Python, (and other scripting languages like Perl and Ruby) on the other hand, has the opposite convention. ‘%’ operator is C/Java’s floorMod. In the python ecosystem, ‘numpy.mod’, ‘tf.math.mod’ and ‘torch.remainder’ all correspond to floor division and return remainder having same sign as the devisor. Confusingly, to get C/Java ‘%’ method in python, you have to call something these all call ‘fmod’.

Some websites suggest masking the number to take the lower bits then %, which may be slightly different from computing the hash in long integers followed by %. Another (stack) overflow post adds the module calculation inside the String.hashCode implementation so that only remainders accumulate, thus avoiding the negativity entirely.

In any case, if you had to write this, mostly likely the slight imbalance between positive and negative numbers would not bother you and floorMod is easiest method to call on any generic “hashCode()” implementation.

Friends don’t let friends drink and drive.

Friends don’t let friends err and merge.