Because some posts just refuse to be placed into a bucket

Seattle Code Camp 2017

Illustration

If all went as expected, my fourth visit to Seattle Code Camp is currently in progress and my second talk is winding down just about now. If you decided to see me talk among more than 70 talks in 11 parallel tracks - thank you!

If not, here is what you missed:

My first talk was about my experience with Microsoft’s project Centennial, a way to Windows Store for classic desktop applications. It was based on my experience with getting Bimil to Windows Store.

Second talk is a bit of copout as it is rerun of my talk from last year. And no, it is not completely the same. I added a bit more ranting. :)

Slides are available for download but they won’t be substitute for attending conference.

Amazon's Meow

Illustration

One day I was going over HTML elements on Amazon’s page and noticed one interesting comment. It was ASCII picture of a duck saying MEOW. Putting aside whether duck has capacity to produce that sound, I got curious why is that there? Is there a reason?

A bit of googling found me that MEOW is nothing new - it has been in code for at least 7 years now. However, duck seems to be appearing only since 2016. Despite all my searching I couldn’t really find what MEOW refers too nor why is duck now saying it.

My personal guess is that somebody was troubleshooting page loading and placed MEOW so it could automate it using grep command. Whether that troubleshooting happened in production (remember that Amazon wasn’t huge in 2007) or somebody accidentally pushed it live, we ended with the same result. I could bet Amazon developers noticed extra code quite quickly but nobody had heart to remove it. It was simply too funny. It became internal joke, an Easter egg.

Years later somebody working on that code portion saw it and though an update was in order. And how else would engineer express his love for fun other than in ASCII drawing?

PS: And it isn’t the first Easter egg coming from Amazon - who could forget “Thank You, David Risher” pun from 2007.

Seattle Code Camp 2017

Illustration

Seattle Code Camp organizers have finalized selection of this year talks and I am proud to say I got two sessions.

My first topic will be Crash Course In Foreign Language Support For ÜS Developer. If title looks familiar, it is actually a rerun of last year talk under, surprise-surprise, the same title. :) Of course, it won’t be exactly the same talk as session will be 15 minutes longer, and hopefully more polished.

My hope is that after this talk an average developer will understand different regional environments, how complicated stuff can get, what C# has to offer in regards to regionalization, where C# fails, and what are the most common mistakes.

Second session will be Path Over the Desktop Bridge, a suspenseful tale of desktop application visiting the Windows Store for the first time. I will talk about my experience, lessons learned, and how to talk with testers in 1000 characters or less. It will be wild ride of back and forth culminating in a happy ending. If this innuendo doesn’t peek your interest, I don’t know what will.

Seattle Code Camp will be held on Saturday, September 9th at Seattle University. You will be able to register for attendance soon.

[2017-08-10: Registration is now open.]

Cheap Cybersecurity Books

Those into cybersecurity, rejoice.

Humble has a new book bundle and, unlike their lately book offerings, this one is actually good and extremely cheap considering the books included. Frankly, it would be a good deal if only Applied Cryptography was included.

Yes, lowest tier is useless and middle tier essentially lives on Cryptography Engineering with Mitnik’s The Art of Deception adding a bit of flair.

But the most expensive $15 tier more than makes it up with Applied Cryptography, aged book that still somehow manages to stay current in the approach to security if not in all examples. And there is Secret and Lies proving that Schneier is getting all philosophical as he ages.

Based on my picks you can already see that they might have called this Schneier’s bundle and I would be equally interested. The only two books I wish were here are Applied Cryptography and The Twofish Encryption Algorithm (yes, I know how old it is).

If you have any interest in security do think about this bundle. Probably the cheapest (legal) way to get some real classic and a good read.

Watching Sector Count

[2021-03-01: If you have disk larger than 8 TB, a slightly different rules apply.]

Ever since I first dealt with RAID, I was taught and was witness to ugly fact that two disks marked with the same size might not be exactly the same. Even the same disk from the same manufacturer could have slight difference in number of sectors. And some manufacturers were notorious for this (yes, Sun/Oracle, I am looking at you.

It was common wisdom to always make RAID a bit smaller than your full drive size to accommodate for potential “shrinkage” in the future. And I was myself known to warn others. However, things change…

Believe it or not, these days all disks have completely standardized sector count. For 512b sector size, formula is:

97,696,368 + (1,953,504 * (CapacityInGB - 50))

For 4K sectors, formula is:

12,212,046 + (244,188 * (CapacityInGB - 50))

This is courtesy of LBA Count for Disk Drives Standard (LBA1-03) that is seemingly followed by all manufacturers. I couldn’t find a single drive not following this standard and I’ve tried.

What does this mean? It means, if you have drive that is manufacturer in last five years, you can forget about under-sizing your RAID. Any replacement drive you order will have exactly the same sector count as long as sector size is same.

PS: Find below table for disks with 4K sectors:

SizeLBA sector count
1 TB244,190,646
2 TB488,378,646
3 TB732,566,646
4 TB976,754,646
6 TB1,465,130,646
8 TB1,953,506,646

PPS: While these rules are valid for SSDs too, depending on their configuration (e.g. over-provisioning) exact sector count available to end-user might vary.

[2017-07-16: Added calculator]

GB
 

FRS Channel Expansion

If you are in USA and fan of walkie-talkie (aka FRS) radios, you can look forward to the additional 8 channels and higher allowed output power.

It used to be that FRS (Family Radio Service) had 14 channels shared with GMRS (General Mobile Radio Service) and GMRS had additional 8 to boost. With the new rules FRS and GMRS share all the 22 channels and their only difference remains allowed output power and bandwidth (25 vs 12.5 kHz). You can check RadioReference’s handy chart.

Additional notable change is how licencing is handled - gone are double purpose FRS/GMRS radios where the only difference was honesty of user. With the new rules FRS cannot be combined with GPRS in the same radio. Thus you won’t be able to boost power in FRS radios by just a change in settings. That will also make enforcing 12.5 kHz bandwidth more easier and it will make interfacing between FRS and GPRS much more annoying for inexperienced user.

While I am really pleased by expansion of FRS channels to what every radio on market already supported, I am sad that 12.5 kHz restriction remained when equivalent GMRS channels are 25 kHz. Why the hell not allow the same bandwidth?

In any case, these changes are mostly good and improvements are just codifying what people have been doing anyhow. Only if they could drop GMRS licence altogether… :)

Shimming Lumix Battery

Illustration

Due to various first-world problems, my wife and I ended up with two different Panasonic cameras. I use quite interesting LX100 while she strongly prefers FZ300 and zoom it brings.

FZ300 uses lithium-ion DMW-BLC12 battery (7.2 V, 1200 mAh, 36.0 x 48.0 x 16.8 mm) and comes with DE-A79 battery charger. My LX100 is a bit smaller and uses DMW-BLG10 battery (7.2 V, 1025 mAh, 37.0 x 42.0 x 14.1 mm) coming with a smaller DE-A99 charger. As you can see from measurement, it is not the same battery. And no, neither charger is designed to be universal.

However, pinout and voltage is the same on both and you can sort of get smaller LX100 battery into FZ300 charger. Unfortunately, as battery is shorter, it doesn’t stay in nor it charges. Only if I could find common house-hold item that could bridge that 6 millimeter gap in length…

Well, it ends up that 4.5 mm of USB connector is just enough for flexible pins on charger to make contact with battery. And my old SanDisk USB drive fits just right.

CR2032 With Wire

Booting my NUC I noted the following message:

The following are warnings that were detected during this boot.
These can be viewed in setup on the Event Log Page.
WARNING : CMOS Time Not Set

Oldsters keeping their machine longer than a few years are probably already yelling CR2032. And guess what - I had those ready to go. After opening NUC (darn IR window is really annoying to get out) I got into trouble as battery wasn’t in the holder. Nope, it was on the wire.

While you can hack the solution by simply soldering wires to the battery, I would recommend thinking twice about it. I have done it multiple times and it is not only annoying to solder onto whatever alloy battery is made of (no, it is not pure aluminium) but heating the lithum batteries significantly decreases their life.

As I didn’t know the type of connector of the top of my head I went over to Intel’s support pages and of course they had an article ready. It went even so far to actually specify connector as Molex 51020-0200. I couldn’t actually find such Molex connector but I’ve found 51021-0200 looking exactly the same. I guess not even Intel is immune to typos.

Armed with knowledge of connector, I went on Amazon hunt and found a few of them. Of course, I went with cheapest which at $5 is not really cheap at all. I guess you pay premium for that sweet cable.

Moments before plugging it in I noticed something disturbing. Black and red wires were swapped on my replacement battery as compared to the one I pulled out. I am not sure which one is more standard but Intel and Dell like to play on opposite side of spectrum. Plugging Dell battery into NUC would almost surely damage it as CMOS battery circuits are rarely protected against reverse polarity. It was a time for surgery.

Using small blade (scalpel actually) I gently lifted plastic holding each terminal in the housing and pulled them out. Done gently enough this enables reinsertion of the terminals into the housing with the black wire at position #1 - the same as used in NUC.

This whole battery swap took way longer than it should have but at least my BIOS complains no more. :)

PS: Since computer was plugged in at all times, I find it really strange to have battery fail on me after only three years. I have way older machines with their original battery still working…

StarCraft 1.18 for Free

Zealot

Nineteen years after the StarCraft’s release, there is yet another patch. Alongside many bug-fixes, it also made StarCraft and Brood War expansion completely free.

While giving the old game for free could be considered a bit of a gimmick in the light of newly announced StarCraft: Remastered, an HD version of the original StarCraft, it is not only that.

Blizzard actually released new features within this patch and that is not the first time. They simply kept up the great customer care of the StarCraft saga. Frankly I wouldn’t be surprised if we see another patch or two for it in the future.

Without the further ado, download the new (free) version and have fun.

PS: And yes, StarCraft color issue has been resolved.

PPS: You can also check some other free games from Blizzard. My personal favorites being The Lost Vikings but also Warcraft II and Diablo are nothing to frown upon. :)

[2017-07-02: StarCraft Remastered will be available at August 14th and it will cost $15. You can preorder it now.]

AMD Excitement

I use laptop as my main computer for a while now. Generally I am happy with this setup and I rarely miss the desktop computer. Ok, that is a bit of a lie. I do occasionally miss tinkering. And I do miss excitement of the upgrades. Especially now that AMD Ryzen is out.

There is an excellent AnandTech article about AMD Ryzen where they go really deep into details of the architecture and I won’t reiterate much here. Suffice to say that AMD seems to have created something as significant as Athlon when it comes to innovation.

Nobody is sure if AMD is going to succeed with the whole Zen architecture despite good first impressions. Let’s not forget its main architect left and that definitely wasn’t painless. We also have no idea how Intel will react and whether it will simply strangle AMD in price war.

However it does seem that, at least in the short term, AMD has actually given Intel something to think about. And that will breed innovation on both sides. If we are lucky we might even see a repeat of the whole Pentium-Athlon fight. Regardless of AMD ultimately losing, that was a renaissance of computer architecture.

It is an exciting time to be a desktop owner - may it last.

PS: If you are interested in processor design and all the craziness that goes with it, check Computer Architecture course. While it really covers only older generation processor design, it has more than enough information to get your head spinning.