I temporarily misplaced the database driving this blog during an upgrade, but I’m back in business! *sigh*
I’m in the final stages of replacing my main web site (www.tallent.us), so that should be up soon. I’ve been hosting it with Zenfolio for a number of years, but since I don’t do commercial work anymore, it didn’t make sense to pay someone else for a fancier web site than I actually need.
Read more →
I manage a number of databases at work that have varchar/nvarchar columns with very restricted values — usually fewer than a dozen valid choices.
The problem is that storing and indexing these values in Microsoft SQL Server is highly inefficient.
Enterprise Edition users can work around this by partitioning their tables on such a column, but (a) that only works for one column and (b) partitioning a table isn’t necessarily good for performance overall unless the partition function aligns well with the queries you tend to run on the table.
Read more →
I was reading a post by Jon Skeet and he mentioned the evil of using “out” parameters.
Anyone with a functional programming background understands what he’s referring to here — pure functions should have no side effects, they should only return a value.
The problem is, the world isn’t pure, and it’s quite common to need to return multiple results.
Probably the most common example in C# is the “TryGetValue()” pattern:
Read more →
I was reading an excellent ACM article on the recent Apple security bug, and it struck me that the author skipped completely over one of the *true* root causes of this bug.
Here’s the buggy code:
if ((err = SSLFreeBuffer(&hashCtx)) != 0) goto fail; if ((err = ReadyHash(&SSLHashSHA1, &hashCtx)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &clientRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) goto fail; if ((err = SSLHashSHA1.
Read more →
I found this today, it’s pretty neat as a quick reference for genealogists or other people studying American history:
To see each frame broken down, go here:
http://gif-explode.com/?explode=http://i.imgur.com/yPov2.gif
Original source: https://en.wikipedia.org/wiki/Territorial_evolution_of_the_united_states
Read more →
I’m a fan of streaming music services. Pandora clued me in on a number of bands I would’ve never heard of otherwise. But services like these currently have unsustainable business models. They pay exorbitant license fees for the music, and they also have to pay for bandwidth. And with the end of network neutrality around the corner, their bandwidth will likely skyrocket, putting the last nail in the coffin.
I have a solution.
Read more →
The University of Richmond scanned a bunch of historical maps, georectified them, and posted them online here:
http://dsl.richmond.edu/historicalatlas/
This is a really great resource for genealogists or amateur historians, you can get a real sense at a glance about how politics, wars, population growth, etc. impacted different parts of the US.
Read more →
I was reading this blog, and had a few thoughts of my own about what should come next in C#.
1. Monadic null checking. This was #7 on the aforementioned blog. Used correctly, this could be a good time-saver.
2. VS support for columnar-aligned code. This is really a Visual Studio thing, but I really wish the IDE wouldn’t try to stop me from using tabs to align my code. I’ve been doing this ever since I learned COBOL, and probably before that.
Read more →
In a recent post, Philip Greenspun tries to make the case that the ACA is just one more situation where people will suck on the government teat rather than doing something productive, because they actually do better on assistance programs.
While such “cliff” maths are interesting for academic trivia, they are practically useless.
The vast majority of families making $50k a year or more (73%) have private health insurance (mostly employer-paid), and that goes up to 90% for families making around $100k/year.
Read more →
My Facebook feed blew up today with articles about Michigan’s new law regarding abortions, which basically says that health insurance in Michigan can’t cover elective abortion by default, you have to pay for it ahead of time as a separate rider if you want it.
One thing that pisses me off about the press is that they rarely if ever actually link articles directly to the text of the bills and judicial decisions they cover, which allows them to just lazily report the outrageous statements on both sides of the issue.
Read more →