Luck Has Nothing To Do With It

•November 14, 2015 • Leave a Comment

Originally posted on The Honest Courtesan:

Sex worker rights are human rights, and there can never be too many voices speaking up for them, nor too many occasions on which to speak.  –  “Never Too Many

many red umbrellasIt’s that day again:  Friday the 13th, the day on which I ask non-sex workers to speak up for us.  As I’ve explained many times before, there is no possible way we can ever hope to win our rights without the help of allies; since only about 0.3% of the female population are whores at any given time (about 1% over their lifetimes), we simply don’t constitute a large enough voting bloc for politicians to give a damn about us, especially at a time when the popular fad is to pretend that we’re passive victims in need of “rescue” from our own choices.  As I explained two years ago,

…the gay rights movement didn’t really…

View original 496 more words

New Excuse

•October 17, 2015 • Leave a Comment

Originally posted on The Honest Courtesan:

The most dangerous prohibitionists…are those who oppose no particular behavior or thing, but rather the very freedom of choice itself.  –  “Thou Shalt Not

As I have pointed out many times in the past, all prohibitionism is the same:

…some object, substance or activity is depicted as intrinsically harmful regardless of context or actual outcome, a connection to children is invented if one does not exist, and the prohibitionists then argue that any abrogation of personal liberty (no matter how invasive) and any expansion of the police state (no matter how destructive, evil and counterproductive) is justified to stop the threat to Our Treasured Way of Life…

The primary tool used by prohibitionists to drum up support for their crusades is the Big Lie, a gigantic state-sponsored myth totally unsupported by facts which plays upon people’s primitive fears and tribalism to justify the criminalization of consensual…

View original 799 more words

The stillness and solitude of a New York rooftop

•June 1, 2015 • Leave a Comment

Originally posted on Ephemeral New York:

Few artists convey the disquieting solitude of city life like Edward Hopper, as he does here in “Untitled (Rooftops)” from 1926.


Hopper, who worked out of his studio on Washington Square until his death in 1967, was fascinated by urban scenes: “our native architecture with its hideous beauty, its fantastic roofs, pseudo-gothic, French Mansard, Colonial, mongrel or what not, with eye-searing color or delicate harmonies of faded paint, shouldering one another along interminable streets that taper off into swamps or dump heaps.”

View original

Using SAL in the SQLite API

•May 10, 2015 • Leave a Comment

I’ve just finished adding annotations to a huge portion of the SQLite API, and I see a LOT of potential. This is going to be awesome.

See the changes that I’ve made so far on GitHub:

I’m not a core SQLite dev, so I just hacked on the amalgamation 😊

Preventing bugs, and improving code quality with Microsoft SAL (Part 2, custom preconditions for structs & objects)

•April 2, 2015 • Leave a Comment

Note: At the end of part 1, I’d suggested that part 2 would be about invalid handles. This post however isn’t about invalid handles. That’ll be the next part in this series.

I very frequently come across code like this:

void dosomething( _In_ somestruct* in ) {
    //Not detected at compile time

The function, dosomething, expects/requires a specific condition. So, the author asserts it, and resolves to test every possible code path, thus verifying code correctness. When all their tests pass, they build in release mode, and the assert disappears.

Some time later, someone calls dosomething under different conditions, all of their tests pass, and they release the modified code.  Users start seeing their data mysteriously corrupt itself, and their once-reliable program is crashing in ways that nobody can reproduce. After several days worth of investigation, developers thoroughly audit the code, and spot the new (and incorrect) code path. They refactor the faulty code path, add a VERY LOUD comment to dosomething, and forget about the whole thing.


Some number of months later, the same thing happens. This time, a developer has a bright idea: Let’s return an error code! Whoever wrote the code without a proper check for invalid arguments is an idiot!

The function now looks like this:


HRESULT dosomething( _In_ somestruct* in ) {
    //Not detected at compile time
    if ( !in->some_precondition ) {
        return E_INVALIDARG;

We’re better off now, or at least we think so.

Now of course, everybody has to check the return code, which means more complexity, more ways to go wrong, and more code paths to test. Since there are far too many code paths to test every single one, some end user might still get to one of the untested, and also invalid, path.

Yet a third developer comes along, and thinks: What a silly C programmer. Someone will inevitably ignore the return value and the error will go unnoticed. Even worse, because I have to check the return value every single time, I can’t compose this function, and thus it’s less practical. This is an exceptional case, so we should treat it as one.

The function now looks like this:

void dosomething( _In_ somestruct* in ) {
    //Not detected at compile time
    if ( !in->some_precondition ) {
        throw std::invalid_argument( "Function preconditions not met!" );


We’re a little bit better off now, at least we’re pretty sure that we are.

Now, exception safety becomes an issue. We still have to test every possible code path to make sure that none of them incorrectly call dosomething. We still can’t be confident about it.

Perhaps somebody else comes along, and writes a wrapper object, thus only “allowing” correct uses of dosomething. Now everybody has to rewrite their code use that wrapper.

Complexity has increased, this function has been refactored thrice, and we still haven’t even found a way to be code-correctness-confident, at compile-time, for all the uses of dosomething.

The cycle repeats, no end in sight.

Nearly every program stops there – they choose error codes or C++ exceptions, to carefully handle bad logic WHEN it happens. Preventing them from happening, well that becomes an issue of “professionalism” and “discipline”.


Neither “professionalism” nor “discipline”, actually prevent the mistakes of logic, but blaming the mistake on a given individual’s moral or personal failings works nicely to…well I’m not actually sure; I have noticed it is a fairly pervasive and pathological mindset in case studies of engineering disasters (Therac-25, Toyota electronic throttle malfunctions, others). But, I digress.

 A few examples from Microsoft’s headers

One of Microsoft’s motivating factors in developing SAL, was the infamous blue screen. Drivers. particularly kernel-mode drivers, are extremely sensitive to misuse.  A failure in the kernel can mean system instability, serious security vulnerabilities, or massive data corruption. Furthermore, the kernel APIs that drivers rely on are often very complex, interacting with many components of hardware and software – and thus very hard to get right.

Continue reading ‘Preventing bugs, and improving code quality with Microsoft SAL (Part 2, custom preconditions for structs & objects)’

A hydrogen bomb detonated against your eyeball

•March 24, 2015 • Leave a Comment

Originally posted on 10 Minute Astronomy:

…would deliver less energy to your retina than a supernova observed from a distance of one astronomical unit (AU; the distance from the Earth to the sun). How much less? From this XKCD What If:

Which of the following would be brighter, in terms of the amount of energy delivered to your retina:

A supernova, seen from as far away as the Sun is from the Earth, or

The detonation of a hydrogen bomb pressed against your eyeball?

Applying the physicist rule of thumb suggests that the supernova is brighter. And indeed, it is … by nine orders of magnitude.

That rocked me back on my heels. And it got me thinking: how far away would one have to be for a supernova to be only as bright as an h-bomb pressed against one’s eyeball?


Radiated energy is subject to the inverse-square law, by which intensity of radiation…

View original 327 more words

Trace Your Book or Kindle with the FingerReader

•March 19, 2015 • Leave a Comment

Alexander Riccio:

The MIT media lab does some pretty damned cool things.

Although, I can imagine a few improvements ;)

Originally posted on Hackaday:

[Roy Shilkrot] and his fellow researchers at the MIT Media Lab have developed the FingerReader, a wearable device that aids in reading text. Worn on the index finger, it receives input from print or digital text and outputs spoken words – and it does this on-the-go. The FingerReader consists of a camera and sensors that detect the text. A series of algorithms the researchers created are used along with character recognition software to create the resulting audio feedback.

There is a lot of haptic feedback built into the FingerReader.  It was designed with the visually impaired as the primary user for times when Braille is not practical or simply unavailable. The FingerReader requires the wearer to make physical contact with the tip of their index finger on the print or digital screen, tracing the line.  As the user does so, the FingerReader is busy calculating where lines of text…

View original 221 more words

I will be out of normal contact until Wednesday March 25th

•March 17, 2015 • Leave a Comment

I’ll be away from my computer, but not my phone. This means ( sadly ) no compilation, and thus, no development. is BACK UP!

•February 21, 2015 • Leave a Comment

The issue with my email has been resolved. You may now email me at

ATTENTION: is not reachable!

•February 14, 2015 • Leave a Comment

Due to some sort of mixup with Hover, who manages my email address, is at the moment, a non-functional email address, and has been so since early morning February 12. They have not responded to my emails asking for help. Will update soon.

Warner Stellian Appliance

Home & Kitchen Appliance Blog

Bad Science Debunked

Debunking dangerous junk science found on the Internet. Non-scientist friendly!

4 gravitons

The trials and tribulations of four gravitons and a postdoc

Strange Quark In London

A blog about physics, citylive and much procastination

The Lumber Room

"Consign them to dust and damp by way of preserving them"

In the Dark

A blog about the Universe, and all that surrounds it

andrea elizabeth

passionate - vibrant - ambitious

Probably Dance

I can program and like games

a totally unnecessary blog

paolo severini's waste of bandwidth

Musing Mortoray

Programming and Language Design

PJ Naughter's space

Musings on Native mode development on Windows using C++


full-process web designer, front-end developer and all-around creative person ♥

  Bartosz Milewski's Programming Cafe

Concurrency, C++, Haskell, Category Theory

Brandon's Thoughts

Thoughts on programming



David Crocker's Verification Blog

Formal verification of C/C++ code for critical systems


Championing a young, diverse, and inclusive America with a unique mix of smart and irreverent original reporting, lifestyle, and comedic content.

10 Minute Astronomy

Stargazing for people who think they don't have time for stargazing.

One Dev Job

notes of an interactive developer

IoT, Cloud, Mobile Apps, Technology Evangelist, Pre-Sales, Speaker, CEO

Coder/Architect for IoT, Cloud Technologies and Mobile Apps, Azure Cloud, Amazon Cloud, Windows Phone 10 Apps, iPhone Apps, Scrum Master, Business Evangelist, Mobile apps developer in iOS and Windows 10 UWP, Azure IoT Hub, Machine Learning, Stream Analytics, Azure Mobile Service, APM Tools


Modern C++ for the Windows Runtime

The Angry Technician

No, the Internet is not broken.

Kenny Kerr

MSDN Magazine contributing editor • Pluralsight author • Microsoft MVP • Creator of • Romans 1:16

IT affinity!

The Ultimate Question of Life, the Universe, and Everything is answered somwhere else. This is just about IT.


The ramblings of a crazed mind

Molecular Musings

Development blog of the Molecule Engine

The New C++

The latest version of C++ on steroids

Wikimedia blog

News from the Wikimedia Foundation and the Wikimedia movement

Ephemeral New York

Chronicling an ever-changing city through faded and forgotten artifacts

The Honest Courtesan

Frank commentary from an unretired call girl

Random ASCII

Forecast for randomascii: programming, tech topics, with a chance of unicycling


I.C.F::Israel Cyber Forces


(Greek: κρυπτεία / krupteía, from κρυπτός / kruptós, “hidden, secret things”)

Andrzej's C++ blog

Guidelines and thoughts about C++

Bromium Labs

Call of the Wild Blog

the art of unexpected input engineering

Video Encoding & Streaming Technologies

Fabio Sonnati on video delivery and encoding

Freedom Embedded

Balau's technical blog on open hardware, free software and security

Paolo Bernardi

Paolo Bernardi, ramblings and notes (and Crypto-Gram for ebook readers)

The Embedded Code

Designing From Scratch

Bughira's Weblog

There is no such thing as closed source software...the processor sees every instruction, and so does the reverse engineer...

mov ah, 9<br>mov dx, hello_world_msg<br>int 21h

Just another weblog

Running the Gauntlet

Tank and Siko's Security Blog


Get every new post delivered to your Inbox.

Join 1,035 other followers