Rob Weir
robweir.com · Personal blog · on HN since 2007
Rob Weir, a former IBM engineer, writes about document formats like ODF, algorithms, and humor.
What HN saysHN commenters cite his Microsoft browser ballot shuffle analysis as a bad, non-uniform shuffle, and quote his "Songs of the IBM" post.
30HN people shared it
16linked it in comments
20stories submitted
169story points
1 year agolast shared
2007people per year2026
Most-shared posts
- 1Doing the Microsoft Shuffle: Algorithm Fail in Browser Ballot10 people · 63 points · first shared 2010 · 25 comments on HN
- 2How to hire guillaume portes4 people · first shared 2019
- 3Songs of the IBM3 people · 72 points · first shared 2012 · 18 comments on HN
- 4Twitter Powers of Ten (2011)3 people · 7 points · first shared 2014 · discussion on HN
- 5ODF conformance, but not interoperability, in MS Office 2007SP22 people · 3 points · first shared 2009 · discussion on HN
- 6ODF enters the Semantic Web1 people · 4 points · first shared 2007 · discussion on HN
- 7The Versions of OpenDocument Format1 people · 3 points · first shared 2011 · discussion on HN
- 8Mapping the Apache Software Foundation1 people · 2 points · first shared 2013 · discussion on HN
- 9ODF 1.2 Begins Final 60-day Public Review1 people · 2 points · first shared 2010 · discussion on HN
- 10The Final OOXML Update: Part I1 people · 2 points · first shared 2009 · discussion on HN
- 11Jingle Bells, Batman Smells (2006)1 people · 2 points · first shared 2016 · discussion on HN
- 12ISO/IEC JTC1 Approves ODF 1.2 PAS Ballot1 people · 2 points · first shared 2014 · discussion on HN
- 13Beautiful Word Clouds1 people · 2 points · first shared 2008 · 1 comments on HN
- 14ODF 1.2: Approved as an OASIS Standard1 people · 1 points · first shared 2011 · discussion on HN
- 15How to Crush Dissent: The dangerous line we cross1 people · 1 points · first shared 2010 · discussion on HN
What HN people wrote when they linked it
ChrisArchitect · 2024-02-14
Fully respect the history, but often these days as the corp has waned/is nothing more than a bygone great, I can't help but think of Songs of the I.B.M. (https://www.robweir.com/blog/2011/06/songs-of-the-ibm.html)
i.e
Ever onward! ever onward! that's the spirit that has brought us fame. we're big but bigger we will be, we can't fail for all can see, that to serve humanity has been our aim. our products now are known in every zone. our reputation sparkles like a gem. we've fought our way through and new fields we're sure to conquer, too, for the ever onward IBM!
spdustin · 2016-09-23
The random return used in the comparison passed into an Array.sort() function would depend on the sort algorithm used by the JavaScript engine, since the comparisons being returned aren't "honest". Is it a merge sort, for example? Plus, it's kinda broken because if X > Y for one permutation, it should follow that Y < X if those same values are passed back in, and in this case, they' really not.
MS took advantage of this when selecting a random browser for the browser ballot years ago.
http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht…
cben · 2019-04-25
Exhibit A: MS Word "fast save" format: https://web.archive.org/web/20160308183811/http://1017.songtrellisopml…
https://www.joelonsoftware.com/2008/02/19/why-are-the-microsoft-office…
From CS perspective, it's an impressive feat of engineering. They used persistent data structures to optimize in-memory operations, and essentially a write-ahead log of these same structures to optimize commits to disk.
They also created "OLE" technology in the OS+libraries to support embedding live documents one in another - remarkably not unlike Phantom's goals.
The trouble is, they did these in document interchange formats! Office succeeded, and the insane complexity of reverse-engineering its formats actually became a great business "moat".
But decades later, after switching the surface structure from binary insanity to XML, it still contains attributes like `autoSpaceLikeWord95` and `footnoteLayoutLikeWW8` :-(
http://www.robweir.com/blog/2007/01/how-to-hire-guillaume-portes.html
A lot has been written assuming malice in OOXML, but you can also argue it'd require unbelievable competence to evolve their codebase to anything other than this!
If you never needed pervasive dump/load abstractions, your formats map to 1:1 to your semantics, and the only way to evolve is keeping old semantics around, forever...
EDIT: I can't help copy pasting more from the last link:
- lineWrapLikeWord6 (Emulate Word 6.0…
rhdunn · 2025-09-08
There are places where it says the equivalent of "Works the same as Word 95" [3], but does not specify in the specification what that means.
It's essentially a serialization of the binary format to XML.
ODF 1.4 is around 1,100 pages across all 4 parts whereas OOXML is over 6,000.
[1] https://stephesblog.blogs.com/my_weblog/2007/08/microsofts-fail.html
[2] https://ooxmlisdefectivebydesign.blogspot.com/2007/08/microsoft-office…
[3] https://www.robweir.com/blog/2007/01/how-to-hire-guillaume-portes.html
vitus · 2025-02-17
It is shuffled badly, and not at all uniformly. And heavily implementation-dependent.
https://stackoverflow.com/questions/962802/is-it-correct-to-use-javasc…
An example of this out in the wild: https://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.h…
0xcde4c3db · 2024-02-14
See also: "How to hire Guillaume Portes" [1]
(also "autoSpaceLikeWord95" in case anyone shares that specific brainworm with me and is Ctrl+Fing for it)
[1] https://www.robweir.com/blog/2007/01/how-to-hire-guillaume-portes.html
moyix · 2024-02-05
It's a bit debatable whether this is a security bug vs a "you're holding it wrong" kind of bug, but fixing the bounds check is a good defensive practice and I'm glad they implemented it.
Somewhat tangentially, Microsoft at one point got in a bit of trouble for trying to use a randomized comparison function to implement shuffling on their "Browser choice" page:
https://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.h…
xvilka · 2022-08-27
DOCX is not an open standard, there are many articles[1][2] why it isn't - even in Wikipedia article [3]. ISO standards committee were just a rubber stamp Microsoft puppets to ensure vendor lock for decades.
[1] https://osswatch.jiscinvolve.org/wp/2007/01/05/criticism-of-ecma-376-m…
[2] http://www.robweir.com/blog/2007/01/how-to-hire-guillaume-portes.html
[3] https://en.m.wikipedia.org/wiki/Standardization_of_Office_Open_XML
anderskaseorg · 2021-05-02
That is exactly the algorithm that Microsoft used to bias its purportedly random “browser choice” screen. Don’t use it.
https://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.h…
The Fisher–Yates shuffle is the right way to shuffle an array in an unbiased way.
https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
re · 2015-12-18
It can be extremely biased, and the results can depend on the sort algorithm, because what you're randomizing is the comparison results, not the order. Consider insertion sort: https://en.wikipedia.org/wiki/Insertion_sort
As the list is sorted, elements are inserted from the back by finding the first element that the new element is smaller than. The last element to be inserted is the one at the end of the unsorted array, and, with a random comparator, it has a 50% chance of being "larger" than the biggest of the rest of the elements, and thus remaining at the end of the list.
Microsoft used this technique to "randomize" a list of browsers back in 2010, but, when viewing the page in IE, it ended up putting IE in the last position (out of a set of five browsers) 50% of the time: http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht…
lejohnq · 2014-10-22
The url should probably be corrected to this blog post: http://www.robweir.com/blog/2011/03/twitter-powers-of-ten.html
domdip · 2014-06-26
Funny thing about that random comparator shuffle - Microsoft used it for their browser selection screen (part of the EU antitrust settlement). Oops!
http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht…
chokma · 2011-08-15
Rob Weir has pointed out a lot of OOXML-problems over the years:
http://www.robweir.com/blog/2007/07/formula-for-failure.html
http://www.robweir.com/blog/2008/05/fractured-yearfrac-and-discounted-…
gmurphy · 2011-07-06
The European Browser Choice screen was a good example of where this style of sorting can come and bite you - the browser choice screen was designed to display a selection of browsers in random order, but the above sorting code unintentionally biased it towards particular browsers.
Here's a good writeup with a bunch of test runs and graphs:
http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht…
pixelbeat · 2011-05-20
Why do people program this stuff themselves?
shuf -n22000 < list.all | sort > list.lucky
See also http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht…
berntb · 2009-05-05
Like running a criminal monopoly.
The problem with monopolies in the technical area is that they have a business reason to be incompatible (otherwise, they'll be cloned). That means they build over complex systems which have finicky compatibility problems.
For a typical example, see this:
http://www.robweir.com/blog/2009/05/update-on-odf-spreadsheet.html
The monopolist's need for obscurity and complexity doesn't just cost the developing company money, it hurts people trying to use their systems or interact with their systems.
Also, it hurts the speed of technological change. When an area is owned by a monopolist, the development investments are moved to an area that isn't owned yet -- paid for by milking the safe income. That means the owned areas (like web browsers) languish.
In short, unethical monopolies hurts my life quality in multiple ways, since I get to work with worse systems (well, not that I work with Windows any longer).
Edit: Grammar, clarity.