Shared posts
Avast Antivirus shuts down data-collection arm after exposé
AR Pianist
CodeSOD: Microsoft's English Pluralization Service
Despite founding The Daily WTF more than fifteen years ago, I still find myself astonished and perplexed by the curious perversions in information technology that you all send in. These days, I spend most of my time doing "CEO of Inedo stuff", which means I don't get to code that much. And when I do, it's usually working with the beautiful, completely WTF- and bug-free code that our that our world-class engineers create.
I mention this, because when I come across TDWTF-worthy code on my own, in the wild, it's a very special occasion. And today, I'm excited to share with you one of the worst pieces of code I've seen in a very long time: EnglishPluralizationServices.cs
Anyone even remotely familiar with the English language knows that pluralization is hard, and not exactly something that should be generalized in library... let alone Microsoft's most strategic programming asset of the past two decades. And yet, despite that:
internal class EnglishPluralizationService : PluralizationService, ICustomPluralizationMapping
{
private BidirectionalDictionary _userDictionary;
private StringBidirectionalDictionary _irregularPluralsPluralizationService;
private StringBidirectionalDictionary _assimilatedClassicalInflectionPluralizationService;
private StringBidirectionalDictionary _oSuffixPluralizationService;
private StringBidirectionalDictionary _classicalInflectionPluralizationService;
private StringBidirectionalDictionary _irregularVerbPluralizationService;
private StringBidirectionalDictionary _wordsEndingWithSePluralizationService;
private StringBidirectionalDictionary _wordsEndingWithSisPluralizationService;
private StringBidirectionalDictionary _wordsEndingWithSusPluralizationService;
private StringBidirectionalDictionary _wordsEndingWithInxAnxYnxPluralizationService;
private List _knownSingluarWords;
private List _knownPluralWords;
private string[] _uninflectiveSuffixList =
new string[] { "fish", "ois", "sheep", "deer", "pos", "itis", "ism" };
private string[] _uninflectiveWordList = new string[] {
"jackanapes", "species", "corps", "mackerel", "swine", "debris", "measles",
"trout", "diabetes", "mews", "tuna", "djinn", "mumps", "whiting", "eland",
"news", "wildebeest", "elk", "pincers", "police", "hair", "ice", "chaos",
"milk", "cotton", "pneumonoultramicroscopicsilicovolcanoconiosis",
"information", "aircraft", "scabies", "traffic", "corn", "millet", "rice",
"hay", "----", "tobacco", "cabbage", "okra", "broccoli", "asparagus",
"lettuce", "beef", "pork", "venison", "mutton", "cattle", "offspring",
"molasses", "shambles", "shingles" };
I'm not sure what's more baffling. Is it the fact that someone knew enough about language constructs to use words like uninflective or assimilatedClassicalInflection, yet didn't know enough to realize that automatic pluralization is impossible? Or perhaps, the fact that the same engineer thought that an Entity Framework user might not only have a database table named jackanapes or wildebeest, but would care about proper, automatic pluralization?
This code should never have been written, clearly. But as bad of an idea this all is, its implementation is just plain wrong. It's been a while since I've studied my sixth-grade vocabulary words, but I'm pretty sure that most of these are not irregular plurals at all:
private Dictionary _irregularPluralsDictionary =
new Dictionary()
{
{"brother", "brothers"}, {"child", "children"},
{"cow", "cows"}, {"ephemeris", "ephemerides"}, {"genie", "genies"},
{"money", "moneys"}, {"mongoose", "mongooses"}, {"mythos", "mythoi"},
{"octopus", "octopuses"}, {"ox", "oxen"}, {"soliloquy", "soliloquies"},
{"trilby", "trilbys"}, {"crisis", "crises"}, {"synopsis","synopses"},
{"rose", "roses"}, {"gas","gases"}, {"bus", "buses"},
{"axis", "axes"},{"memo", "memos"}, {"casino","casinos"},
{"silo", "silos"},{"stereo", "stereos"}, {"studio","studios"},
{"lens", "lenses"}, {"alias","aliases"},
{"pie","pies"}, {"corpus","corpora"},
{"viscus", "viscera"},{"hippopotamus", "hippopotami"}, {"trace", "traces"},
{"person", "people"}, {"chili", "chilies"}, {"analysis", "analyses"},
{"basis", "bases"}, {"neurosis", "neuroses"}, {"oasis", "oases"},
{"synthesis", "syntheses"}, {"thesis", "theses"}, {"change", "changes"},
{"lie", "lies"}, {"calorie", "calories"}, {"freebie", "freebies"}, {"case", "cases"},
{"house", "houses"}, {"valve", "valves"}, {"cloth", "clothes"}, {"tie", "ties"},
{"movie", "movies"}, {"bonus", "bonuses"}, {"specimen", "specimens"}
};
In fact, the "just add an s to make it plural" rule is perhaps the ultimate starting point for pluralization. Words like "pie" and "cow" are not irregular at all, because you just add an "s" to make them "pies" and "cows". And this brings us to our next questions.
Where exactly did this list of not-actually-irregular plurals come from? It was obviously copy/pasted from somewhere, right? An English textbook? Like, perhaps the the teachers' edition? You know, where there's like a handout with pictures of a cow, then a bunch of cows, and a line below it where you write the word? Did the engineer… just use that page?
Up next on our tour is actual the actual pluralization logic, which is handled by InternalPluralize method. It's not nearly as simple as using those dictionaries. Consider this snippet from within that method:
// handle the word that do not inflect in the plural form
if (IsUninflective(suffixWord))
{
return prefixWord + suffixWord;
}
Quick aside: please take a moment to appreciate the irony of improperly capitalization in the comment. "the word that do not inflect". Does this mean the author is not a native English speaker? Was this thing outsourced to Kerbleckistan? Does that even make sense to do for… English? Or was this just a typo?
I digress. Let's keep digging into IsUninflective.
// handle irregular inflections for common suffixes, e.g. "mouse" -> "mice"
if (PluralizationServiceUtil.TryInflectOnSuffixInWord(suffixWord,
new List() { "louse", "mouse" },
(s) => s.Remove(s.Length - 4, 4) + "ice", this.Culture, out newSuffixWord))
{
return prefixWord + newSuffixWord;
}
if (PluralizationServiceUtil.TryInflectOnSuffixInWord(suffixWord,
new List() { "tooth" },
(s) => s.Remove(s.Length - 4, 4) + "eeth", this.Culture, out newSuffixWord))
{
return prefixWord + newSuffixWord;
}
if (PluralizationServiceUtil.TryInflectOnSuffixInWord(suffixWord,
new List() { "goose" },
(s) => s.Remove(s.Length - 4, 4) + "eese", this.Culture, out newSuffixWord))
{
return prefixWord + newSuffixWord;
}
if (PluralizationServiceUtil.TryInflectOnSuffixInWord(suffixWord,
new List() { "foot" },
(s) => s.Remove(s.Length - 3, 3) + "eet", this.Culture, out newSuffixWord))
{
return prefixWord + newSuffixWord;
}
It seems that in addition to not knowing English, the author of this class that's used within the .NET framework doesn't really know C# very well? And certainly not how string comparison works in .NET. On the bright side, is that a test for "ese"? Did... our engineer figure out that there are some basic pluralization patterns you can apply? Maybe there's hope after all!
private bool IsUninflective(string word)
{
EDesignUtil.CheckArgumentNull(word, "word");
if (PluralizationServiceUtil.DoesWordContainSuffix(word, _uninflectiveSuffixList, this.Culture)
|| (!word.ToLower(this.Culture).Equals(word) && word.EndsWith("ese", false, this.Culture))
|| this._uninflectiveWordList.Contains(word.ToLowerInvariant()))
{
return true;
}
else
{
return false;
}
}
On the plus side, this "common" suffixes logic ensures that both titmouse and snaggletooth are properly pluralized.
Google ads now look just like search results
Representative Line: A Short Year
Are we sick of of year rollover bugs yet? Well, let’s just agree that people aren’t sick of making these kinds of bugs.
A long time ago, someone at Oleksandr’s company needed to write a Python script that shipped a 4-digit year to a system that only accepted 2-digit years. So 2010 needed to turn into 10.
They could have used date formatting to format the date into a two digit year, but that involves understanding how to format dates. That just seems like too much overhead, when there’s already a perfectly good way to mangle a string.
year = str(timezone.now().year)
year = year.replace('20', '')
This particular method worked just fine for the vast majority of the 21st century, to date, but mysteriously stopped working on January 1st, 2020. Or, as this script might write the date, “January 1st, .”
Biofortified Cassava Is Set to Transform the Health of Millions
Client: Just open up Photoshop on your phone an...
Client: Just open up Photoshop on your phone and whip up these posters! I need them done yesterday!
It was 2012, I owned a flip phone, and the client was my mother.
She grounded me for two weeks for “insubordination” when I explained that I couldn’t.
She was my first “Client from hell.”
Love you mom.
The post appeared first on Clients From Hell.
#MyDecadeOnXbox – check out your Xbox stats for the whole of the 2010s
Mojo Vision’s augmented-reality contact lenses
There's finally a vaccine for Ebola and it Really Works
For The Toughest IT Departments: Ctrl-Alt-Delete Brass Knuckles
These are the Ctrl-Alt-Delete rings made and sold by Etsy shop JoyComplex. Available in vintage steel ($80), bronze steel ($80), and gold steel ($90), they make the perfect accessory for the IT professional who feels like people don't take them seriously when they ask if they've tried turning their computer off and back on again. "Of course I tried that, you think I'd call you over here if I hadn't, ding-a-ling?" Well what do you say *casually flashes jaw resetter* I watch you do it again, for my own sake? "But I'm your uncle!" PUSH THE BUTTONS.
Keep going for a few more shots.
Untitled Goose Game Is Now Available For Xbox One (And Included With Xbox Game Pass)
Team Sonic Racing & Super Monkey Ball: Banana Blitz HD Is Now Available For Xbox One
Cuisine Royale Is Now Available For Xbox One
Coming To Xbox Game Pass For Console: The Witcher 3: Wild Hunt, Untitled Goose Game, Pillars Of Eternity, And More
Dual Axis Rotation Illusion
The Relative Rotations of the Planets
Planetary scientist James O’Donoghue made this cool little visualization of the rotation speeds of the planets of the solar system. You can see Jupiter making one full rotation every ~10 hours, Earth & Mars about every 24 hours, and Venus rotating once every 243 days. He also did a version where all the planets rotate the same way (Venus & Uranus actually rotate the other way).
See also O’Donoghue’s visualizations of the speed of light that I posted back in January.
Tags: astronomy James O’Donoghue science videoBbbreaking News: Discovering Amateur News Videos by Monitoring Journalists on Twitter
If you’ve ever looked at the replies on any newsworthy amateur video posted to Twitter, you’ll see an inevitable chorus of news organizations and broadcast journalists in the replies, usually asking two questions:
- Did you shoot this video?
- Can we use it on all our platforms, affiliates, etc with credit?
That gave me an idea, which I posted to Twitter.
I bet you could make a great breaking news site that just monitors this Twitter search of media properties asking for permission to broadcast user videos, and scoops them by automatically posting the most active videos. https://t.co/xP3160ezHQ
— Andy Baio (@waxpancake) August 1, 2019
Within two days, a talented developer named Corey Johnson made it real by launching Bbbreaking News.

I’ve returned regularly since Corey launched it and, as expected, it’s a powerful way of tracking a particular type of breaking news: visual stories with footage captured by normal people at the right place and right time.
Much of it is of interest only to local news channels: traffic accidents, subway mishaps, a wild animal on the loose, the occasional building fire.
But frequently, Bbbreaking News shows the impact of gun violence and climate change: a near-constant stream of active shooter scenarios, interspersed with massive brush fires, catastrophic flooding, and extreme weather events.
It’s a fascinating way to see the stories that broadcast media is currently tracking and viewing their sources before they can even report on it, captured by the people stuck in the middle.
I recommend checking it out. Thanks to Corey for running with the idea and saving me the effort of building it myself!
Wonder Woman 1984
This, my friends, is the trailer for Wonder Woman 1984. Ok, let’s see what we have here. Gal Gadot as Wonder Woman, the only DC Comics movie superhero worth a damn since Nolan’s Batmans. 1984, one of the best years ever for movies and pop culture. A remix of Blue Monday by New Order, still the best-selling 12” single of all time. Patty Jenkins is directing and came up with the story this time (instead of having to deal with Zack Snyder’s nonsense). YES PLEASE.
Tags: Gal Gadot movies music Patty Jenkins trailers video Wonder WomanA Website That Allows You To Scroll To The Bottom Of The Ocean With Facts, Figures And Animal Life Along The Way
This is The Deep Sea, a website 'made with ♥ by Neal Agarwal.' What is that, a cheap diamond? "It's a heart, GW -- like love." Now don't you get all mushy on me. I know how this goes: one minute you're getting all mushy on me and the next we're raising three kids in my parents' basement. "Say what now?" This is Deep Sea, a website made with cubic zirconiums by Neal Agrwal that allows a visitor to scroll to the bottom of the ocean learning facts and figures about various depths and the animals that live there along the way. "What did you learn, GW?" I learned I saw a f***ing polar bear at 24 meters and decided to not risk scrolling any further. "Why am I not surprised?" Tell me if you spot Atlantis.
Thanks to Jessica C, who agrees there's no way there isn't already a plastic CVS bag at the very bottom of the ocean.
How Artists on Twitter Tricked Spammy T-Shirt Stores Into Admitting Their Automated Art Theft
Yesterday, an artist on Twitter named Nana ran an experiment to test a theory.
hey can y'all do me a favor and quote tweet/reply to this with something along the lines of 'I want this on a shirt', thank you pic.twitter.com/UhuGRQgU6b
— Nana (@Hannahdouken) December 3, 2019
Their suspicion was that bots were actively looking on Twitter for phrases like “I want this on a shirt” or “This needs to be a t-shirt,” automatically scraping the quoted images, and instantly selling them without permission as print-on-demand t-shirts.
Dozens of Nana’s followers replied, and a few hours later, a Twitter bot replied with a link to the newly-created t-shirt listing on Moteefe, a print-on-demand t-shirt service.


Several other t-shirt listings followed shortly after, with listings on questionable sites like Toucan Style, CopThis, and many more.
Spinning up a print-on-demand stores is dead simple with platforms like GearBubble, Printly, Printful, GearLaunch (who power Toucan Style), and many more — creating a storefront with thousands of theoretical product listings, but with merchandise only manufactured on demand through third-party printers who handles shipping and fulfillment with no inventory.
Many of them integrate with other providers, allowing these non-existent products to immediately appear on eBay, Amazon, Etsy, and other stores, but only manufactured when someone actually buys them.
The ease of listing products without manufacturing them is how we end up with bizarre algorithmic t-shirts and entire stock photo libraries on phone cases. Even if they only generate one sale daily per 1,000 listings, that can still be a profitable business if you’re listing hundreds of thousands of items.
This Amazon bot is generating thousands of phone cases from random photos, and it's amazing. (via @rjurney) https://t.co/n63W4eo9Q5 pic.twitter.com/VX2Ch7xn9v
— Andy Baio (@waxpancake) July 9, 2017
But whoever’s running these art theft bots found a much more profitable way of generating leads: by scanning Twitter for people specifically telling artists they’d buy a shirt with an illustration on it. The t-shirt scammers don’t have the rights to sell other people’s artwork, but they clearly don’t care.
PLEASE RT: Never, ever, EVER respond to someone’s art on Twitter saying you want a shirt with that art. Bot accounts will cue into that and then pirate the artwork. This then becomes a nightmare for the artist to get the bootleg merchandise taken down. PLEASE SHARE.
— Rob Schamberger (@robschamberger) December 1, 2019
Once Nana proved that this was the methodology these t-shirt sellers were using, others jumped in to subvert them.
I LOVE this artwork. Nice drawing, omg!
— Nirbion (@Nirbion) December 4, 2019
I need this on a shirt!!!pic.twitter.com/0tfJY0t3xQ
Of course, it worked. Bots will be bots.
We did it. We achieved something special. Tell your grandchildren that you were THERE when this happened.
— Nirbion (@Nirbion) December 4, 2019
Gonna mute this tweet because I'm getting WAY too many notifications, but thank youpic.twitter.com/bkStdwOmve
For me, this all raises two questions:
- Who’s responsible for this infringement?
- What responsibility do print-on-demand providers have to prevent infringement on their platforms?
The first question is the hardest: we don’t know. These scammers are happy to continue printing shirts because their identities are well-protected, shielded by the platforms they’re working with.
I reached out to Moteefe, who seems to be the worst offender for this particular strain of art theft. Countless Twitter bots are continually spamming users with newly-created Moteefe listings, as you can see in this search.
Unlike most print-on-demand platforms like RedBubble, Moteefe doesn’t reveal any information about the user who created the shirt listings. They’re a well-funded startup in London, and have an obligation not to allow their platform to be exploited in this way. I’ll update if I hear back from them.
Until then, be careful telling artists that you want to see their work on a shirt, unless you want dozens of scammers to use it without permission.
Or feel free to use this image, courtesy of Nakanoart.
So since these art-stealing bots are tracking your text and not reply images, I made this for you guys!
— nakanoart (@nakanodrawing) December 4, 2019
If you want something from ANY creative made into a shirt, you can use this image to tell the artist you want to buy it. So you don’t need to type it outpic.twitter.com/E9Mn2GILcb
Update
Nearly every reply to the official @Disney account on Twitter right now is someone asking for a shirt. I wonder if their social media team has figured out what’s going on yet.

I know I shouldn’t buy them, but some of these copyright troll bait shirts are just amazing.
Lost Code
Incredible Display of Ice Crystal Halos Around the Sun in the Swiss Alps

This is a photo of several ice crystal halos around the Sun taken by Michael Schneider in the Swiss Alps with an iPhone 11 Pro. It. Is. Absolutely. Stunning. I can barely write more than a few words here without stealing another peek at it. According to Schneider’s post (translated from German by Google), this display developed gradually as he waited for a friend as some icy fog and/or clouds were dissipating at the top of a Swiss ski resort and he was happy to capture it on his new phone.
Using this site on atmospheric optics, Mark McCaughrean helpfully annotated Schneider’s photo to identify all of the various halos on display:

Displays like this are pretty rare, but Joshua Thomas captured a similar scene in New Mexico a few years ago and Gizmodo’s Mika McKinnon explained what was going on.
Ice halos happen when tiny crystals of ice are suspended in the sky. The crystals can be high up in cirrus clouds, or closer to the ground as diamond dust or ice fog. Like raindrops scatter light into rainbows, the crystals of ice can reflect and refract light, acting as mirrors or prisms depending on the shape of the crystal and the incident angle of the light. While the lower down ice only happens in cold climates, circus clouds are so high they’re freezing cold any time, anywhere in the world, so even people in the tropics mid-summer have a chance of seeing some of these phenomena.
Explaining the optics of these phenomena involves a lot of discussing angular distances.
So so so so cool.
Tags: Joshua Thomas Mark McCaughrean Michael Schneider Mika McKinnon photography physics science SunUntitled Goose Game Achievement List Revealed, Coming to Xbox One in December
The Deep Sea
This Algorithm “Removes the Water from Underwater Images”
As detailed in this Scientific American article by Erik Olsen, engineer and oceanographer Derya Akkaynak has devised an algorithm that “removes the water from underwater images” so that photos taken underwater have the color and clarity of photos taken in air. She calls the algorithm “Sea-thru”.
Sea-thru’s image analysis factors in the physics of light absorption and scattering in the atmosphere, compared with that in the ocean, where the particles that light interacts with are much larger. Then the program effectively reverses image distortion from water pixel by pixel, restoring lost colors.
One caveat is that the process requires distance information to work. Akkaynak takes numerous photographs of the same scene from various angles, which Sea-thru uses to estimate the distance between the camera and objects in the scene — and, in turn, the water’s light-attenuating impact. Luckily, many scientists already capture distance information in image data sets by using a process called photogrammetry, and Akkaynak says the program will readily work on those photographs.
The paper says the process “recovers color” and in the video above, Akkaynak notes that “it’s a physically accurate correction rather that a visually pleasing modification” that would be done manually in a program like Photoshop.
Tags: Derya Akkaynak Erik Olsen photography science videoLeaked Chinese operation manuals reveal new details of mass internment and AI-driven “predictive policing”
Half-Life Virtual Reality Game Gets Announcement Trailer
Almost two hundred years since the release of Half-Life 2: Episode 2, this is the announcement trailer for the March 2020 debut of Half-Life: Alyx, an around 20-hour virtual reality-only gaming experience that's sure to piss gamers off when there isn't a follow up released for another millennia.
Set between the events of Half-Life and Half-Life 2, Alyx Vance and her father Eli mount an early resistance to the Combine's brutal occupation of Earth. The loss of the Seven-Hour War is still fresh. In the shadow of a rising Combine fortress known as the Citadel, residents of City 17 learn to live under the rule of their invaders. But among this scattered population are two of Earth's most resourceful scientists: Dr. Eli Vance and his daughter Alyx, the founders of a fledgling resistance.Based on the trailer, it looks promising. Of course based on my dating profile I also look promising until we finally meet in real life and you mistake literally every other person walking into the cafe for me because I'm actually a chair and you're sitting on me ouch please I think my rear legs are gonna break. Keep going for the trailer.
Neutron Stars and Nuclear Pasta. Yummy!
The latest video from Kurzgesagt is a short primer on neutron stars, the densest large objects in the universe.
The mind-boggling density of neutron stars is their most well-known attribute: the mass of all living humans would fit into a volume the size of a sugar cube at the same density. But I learned about a couple of new things that I’d like to highlight. The first is nuclear pasta, which might be the strongest material in the universe.
Astrophysicists have theorized that as a neutron star settles into its new configuration, densely packed neutrons are pushed and pulled in different ways, resulting in formation of various shapes below the surface. Many of the theorized shapes take on the names of pasta, because of the similarities. Some have been named gnocchi, for example, others spaghetti or lasagna.
Simulations have demonstrated that nuclear pasta might be some 10 billion times stronger than steel.
The second thing deals with neutron star mergers. When two neutron stars merge, they explode in a shower of matter that’s flung across space. Recent research suggests that many of the heavy elements present in the universe could be formed in these mergers.
But how elements heavier than iron, such as gold and uranium, were created has long been uncertain. Previous research suggested a key clue: For atoms to grow to massive sizes, they needed to quickly absorb neutrons. Such rapid neutron capture, known as the “r-process” for short, only happens in nature in extreme environments where atoms are bombarded by large numbers of neutrons.
If this pans out, it means that the Earth’s platinum, uranium, lead, and tin may have originated in exploding neutron stars. Neat!
Tags: astronomy food Kurzgesagt physics science space“OK Boomer” isn’t really about age
New research shows how sleep cleans toxins from the brain
Sleep is one of those things we still don’t completely understand and new discoveries are still being made. This research is quite interesting, as it brings some insights into how sleep cleans toxins from the brain.
“First you would see this electrical wave where all the neurons would go quiet,” says Lewis. Because the neurons had all momentarily stopped firing, they didn’t need as much oxygen. That meant less blood would flow to the brain. But Lewis’s team also observed that cerebrospinal fluid would then rush in, filling in the space left behind.
The brain’s electrical activity is moving fluid in the brain, clearing out byproducts like beta amyloid, which can contribute to Alzheimer’s disease.
So brain blood levels don’t drop enough to allow substantial waves of cerebrospinal fluid to circulate around the brain and clear out all the metabolic byproducts that accumulate, like beta amyloid.
Independent of the science, you have to wonder how people manage to sleep in an MRI machine!
Tags: brain


