32 Bit Counters: Fail

This post is large­ly a reac­tion to this piece of news: that YouTube/Google nev­er expect­ed the num­ber of views of a YouTube video to exceed the capac­i­ty of a 32 bit coun­ter or 2147483648 views.  This is very Bill Gates 2.0.  I sup­pose the news item is most sur­pris­ing for the who, not the what, but I still find the use of a 32 bit inte­ger by any­one sur­pris­ing.

32 bit coun­ters rep­re­sent rough­ly four bil­lion val­ues.  In the YouTube case, the 32 bit inte­ger was obvi­ous­ly signed — one bit rep­re­sents the neg­a­tive or pos­i­tive sign and the oth­er 31 bits rep­re­sent the val­ue.  It’s sil­ly to think a video could have neg­a­tive views, but there are cas­es where unsigned 32 bit inte­gers can cause prob­lems (most­ly … when some­where in the mix there’s a signed inte­ger).  But two or four bil­lion isn’t that large.  Cer­tain­ly there are more peo­ple on the inter­net.  Cer­tain­ly one per­son can watch a video more than once.  While it took Gang­nam Style to exceed this num­ber of views, it was inevitable that some­thing would.

In my own pro­gram­ming, I shy away from 32 bit inte­gers unless the class of items is well-defined to be small.  The cost of 8-byte inte­gers (64 bits) vs. 4-byte inte­gers (32 bits) is rea­son­ably triv­ial and the cost of fix­ing some­thing lat­er is com­pa­ra­bly large.

You might ask the ques­tion: Is 64 bits enough?  64 bits rep­re­sent 18446744073709551616 val­ues or up to 9223372036854775808 with one bit for the sign.  It’s hard to wrap your mind around the­se num­bers.  Wikipedia’s page on the Order of Mag­ni­tude of Num­bers has this val­ue some­where between the total num­ber of insects on earth and the num­ber of grains of sand on all the beach­es in the world.  So if we’re count­ing things that numer­ous, we need big­ger num­bers.

Con­verse­ly, the num­ber of peo­ple in the world has grown from 32 bites to 33 bits (4 to 7 bil­lion) from about 1970 to the present.  There are still many things that fit in 64 bits.  At this point, almost any coun­ter you cre­ate in a soft­ware pro­gram should be 64 bits wide.

 

Posted in fail | Tagged , , , , , , , , , , , | Leave a comment

Ice Storm Christmas Chez Nous

We were lucky.  We were with­out pow­er for rough­ly 6 hours (and asleep for most of it).  Many peo­ple here in Ontar­io (and the North East­ern por­tion of North Amer­i­ca) had a Christ­mas with­out pow­er and were with­out pow­er for sev­er­al days.  Some are still, appar­ent­ly, with­out pow­er.

Ice Tree

Ice Tree in my Yard

Ice storms are beau­ti­ful as long as you are warm and cozy.  The pic­ture here is of the town man­dat­ed, builder plant­ed tree in my yard.  Every house has “a tree” and all the trees on my street look like this.  Many old­er trees have been drop­ping limbs.  A friend had their porch crushed and my busi­ness part­ner had many branch­es fall on their car caus­ing minor dam­age.

But the ice-coat­ed tree is beau­ti­ful.  We’re lucky here to have fair­ly new­ly plant­ed trees that can take the ice load fair­ly well.  Some of the trees in our neigh­bor­hood date back to when it was built (about ten years).  My tree, in this pic­ture, is a replace­ment that is a few years younger (the orig­i­nal tree didn’t do so well).

My busi­ness part­ner was with­out pow­er for 3 days and he and his fam­i­ly went to live with his in-laws for the dura­tion.  Dur­ing this out­age, news of a recent study by Lloyds of Lon­don caught my atten­tion.  It detailed Lloyds assess­ment that a space weath­er event sim­i­lar to the 1859 “Car­ring­ton Event” hap­pen­ing now would leave parts of North Amer­i­ca with­out pow­er for more than a year.  While not an ice storm, this analy­sis high­lights the fragili­ty of our elec­tri­cal grid and the neg­li­gence of its main­te­nance.

Ice Storm Street View

My Street after the Ice Storm

My thoughts were drawn to this con­clu­sion by the reports that the worst hit areas in this ice storm were urban.  Many homes and apart­ment build­ings in Toron­to, Rich­mond Hill and Kingston were with­out pow­er for sev­er­al days.

I fun­da­men­tal­ly under­stand the prob­lem of rural pow­er dis­tri­b­u­tion.  Long dis­tances cov­ered with over­head wires that can be snapped by fal­l­en trees or even the wire’s own weight.  Each break tak­ing time to fix and each such break only affect­ing a few homes.  Fix­ing the after­math of the Que­bec Ice Storm of 1998 took time because the sheer num­ber of indi­vid­u­al fix­es were legion.

Accord­ing to news reports, this is not the case now.  Many of the dis­rup­tions were blown or arc­ing trans­form­ers.  Items in the pow­er net­work sim­ply unable to han­dle the stress them­selves, not of nature falling down upon them.  There is a real risk of anoth­er “Car­ring­ton Event” and that risk leads to some apoc­a­lyp­tic fore­casts by an orga­ni­za­tion whose very exis­tence is to exam­ine risk.

Posted in fail, Life, Politics | Tagged , , , , , , , , , | 1 Comment

Captcha, Gotcha?

captcha symbols

captcha sym­bols

Blank + five = eleven.  Six, right?  Are any of you real peo­ple get­ting flum­moxed by this?  Appar­ent­ly the SPAMers are.  This site has gone from 5 to 10 SPAM com­ments per day to less than 2 SPAM com­ments per week.  More than that, my stress lev­el over the SPAM that gets through the oth­er SPAM mea­sures (like Bad Behav­ior) has low­ered con­sid­er­ably.

I was some­what sur­prised that answer­ing the Captcha was required even for my own login — that seemed exces­sive, but then the ques­tions are delib­er­ate­ly easy.  I haven’t required the win­doze cal­cu­la­tor (yet).  Even the form of the ques­tions amus­es me: the grade-school for­mu­la with some num­bers writ­ten and some num­bers spelled out.  It’s all very olde skule.

I had assumed that the place­ment of SPAM com­ments on my blog was a some­what more man­u­al process than per­haps it is.  I expect that if soft­ware were solv­ing the Captcha that all the SPAM­Mers would have it, but that seems not to be the case, either.  I’ve always been of two minds on this.  On the one hand, the SPAM always seems to be at least par­tial­ly cus­tomized and vague­ly top­i­cal (although that, too, could be an illu­sion) — I attrib­ute this to the the­o­ry that “peo­ple” paid astro­nom­i­cal­ly low wages are involved.  On the oth­er hand, being sub­tly dif­fer­ent near­ly stop­ping the flow leads this to be a soft­ware and a soft­ware con­fig­u­ra­tion prob­lem.

I sup­pose my blog doesn’t need to be the smartest blog out there — just one bit smarter than the aver­age.

Posted in fail, metablog | Tagged , , , | 1 Comment

Reboot Groklaw.net: an Open Letter to PJ.

Groklaw: Call to Action

Groklaw: Call to Action

The NSA is scary.  I get it.  I have slight­ly less sym­pa­thy for you (a U.S. cit­i­zen) as I am not a U.S. cit­i­zen — which makes my sit­u­a­tion all-the-more pre­car­i­ous, BUT:

GrokLaw is need­ed now, more than ever.  The war again­st the com­mon human is open on many fronts — pri­va­cy, intel­lec­tu­al “prop­er­ty”, police pow­ers with­out over­sight, the “war” on drugs — everyone’s list is a lit­tle dif­fer­ent, but the war on the com­mon human is real.

It’s only real as long as we fight.  And Groklaw is a key tool in the fight again­st one of the major fronts of this war.  Can I (we, any­one) guar­an­tee your safe­ty, your hon­or,… your san­i­ty?  Nope.  You’re already The Hero.  You had already accept­ed The Call.

I’m writ­ing this on the news that Microsoft, Ora­cle and oth­er of their ilk are appeal­ing the Ora­cle vs. Google deci­sion from ear­lier this year.  This is not the only intel­lec­tu­al “prop­er­ty” legal news, but it’s a big sto­ry.  Groklaw is need­ed.  PJ is need­ed.

Heck, I’d run it myself if I were able.  I care deeply about my pri­va­cy and about the over­reach of both law enforce­ment and spy­ing, but they are just one front in this con­flict over which I have lit­tle con­trol.  I get that you find it creepy to be watched.  I get that post­ing on Groklaw prob­a­bly has you watched more often than not.  What you achieve is so much larg­er than the sum of its parts.

Reboot Groklaw, please.

Posted in Intellectual Property, Media, Politics, Rant | Tagged , , , , , , | Leave a comment

Captcha: blank + 15 = 21

captcha symbols

captcha sym­bols

I’ve start­ed using a Captcha for the com­ments.  Over and above the spam pro­tec­tion I’ve been using, I’ve been delet­ing more than 10 spam posts per day.  This is just a nui­sance, but it has become a nui­sance that is grat­ing.

I’m pret­ty sure this captcha is emi­nent­ly defeat­able.  You just need to exam­ine the page for the details and do sim­ple arith­metic.  I sup­pose this plug­in is going on the the­o­ry that you don’t (usu­al­ly) need to be the most secure; you just need to be more secure than the oth­er guy.

If you can’t per­form the req­ui­site arith­metic, you’re not fit to com­ment (hint: that com­put­er thing you’re using almost cer­tain­ly has a cal­cu­la­tor avail­able).

Posted in fail, Rant | Tagged , , , | 2 Comments

I call HorseHockey!

In the pre­vi­ous arti­cle, I called out Stephen Harper, Canada’s Prime Min­is­ter for being Dick­ish.  To some, that would be inap­pro­pri­ate, but to a world where most peo­ple trust The Com­e­dy Net­work as their pri­ma­ry source of news, it is sim­ply true.  I have no trou­ble respect­ing the office while simul­ta­ne­ous­ly  dis­re­spect­ing the man who cur­rent­ly fills it.  (And for the record, I want­ed an image for “dick­ish” … but the inter­net failed me… but click on the Stephen Harper link for a good MacLeans

But I have a relat­ed prob­lem I want to talk about today; there are a large num­ber of untruths being passed by the media.  To be frank, lies.  It’s not that media wants to lie to us, it’s that the scoundrels who use the media need to use the media to lie to us.  When Don Cher­ry is about to drop a whop­per, you can see it in Ron MacLean’s face, but when peo­ple lie on the news the jour­nal­ists take it with a straight face and as seri­ous­ly as they take any oth­er news.  Part of the prob­lem is that jour­nal­ists believe that they should be unbi­ased — but this “wish­ful think­ing” world of unbi­ased news does not and has nev­er exist­ed.  As soon as a per­son hears and then relays some­thing as sim­ple as a sin­gle fact, it has become biased.

The “news” is already biased when we choose what to report.  It is biased when we choose the reporters and the angle and the guests to grill and the talk­ing heads pon­tif­i­cate.  Peo­ple are fun­da­men­tal­ly inca­pable of unbi­ased work.  It is there­fore ridicu­lous that jour­nal­ists are required to report what news­mak­ers say with­out com­ment.

One pri­ma­ry rea­son that this is ridicu­lous is that in most cas­es, the jour­nal­ists are in a much bet­ter posi­tion to spot a lie than the vast major­i­ty of their audi­ence.  An aside to this is the case where the news­mak­er or inter­vie­wee answers the ques­tion with a com­plete non-sequitur so as to stay on their own sep­a­rate mes­sage.

HorseHockey

Horse­Hock­ey

We need a word for this.  I call Horse­Hock­ey.  I have felt com­fort­able with this word for some time.   I have often shout­ed it at the radio while lis­ten­ing to a news­cast where I felt some­one was out­right lying or using the media to lie.  Accord­ing to the inter­net, the word dates back to at least the TV show M*A*S*H, but pos­si­bly fur­ther.  I real­ize its use there is like­ly to make an exple­tive slight­ly more palat­able for mixed con­ver­sa­tion, but I am advo­cat­ing here it’s appro­pri­a­tion for specif­i­cal­ly call­ing out the act of lying to a jour­nal­ist and/or of reply­ing to a journalist’s ques­tion with a non-sequitur to avoid lying.  Or indeed any oth­er act who’s pur­pose is to use the media to prop­a­gate an untruth.

The world real­ly needs this word.  For a short amount of time, I am con­fid­ed it can be used often.  It’s job would be to clean the crap off the air­waves and leave a lit­tle more san­i­ty for peo­ple lis­ten­ing.  To dif­fer­en­ti­ate com­plete­ly, and in the spir­it of new found words on the Inter­net, I pro­pose we use this as a sin­gle word both in pro­nun­ci­a­tion and in prose.  And while its ety­mol­o­gy seems to at least pass through M*A*S*H, I find it appro­pri­ate that we remind the world that Cana­di­ans, in par­tic­u­lar, are more inter­est­ed in the truth.

Posted in fail, Life, Politics, Rant | Tagged , , , , , , , , , , | 1 Comment

Mike Duffy: Not the Story I Originally Expected

Consumers and the Media

Con­sumers and the Media

For most of the Sen­ate scan­dal sto­ry, I have to admit that I was laugh­ing at Mike Duffy and Pame­la Wallin.  I shouldn’t have been.  I’m savvy enough to know that Harper is a Dick (cap­i­tal-D Dick), but the spin deliv­ered on the sto­ry was juicy and suf­fi­cient­ly well-formed that I too was duped.  I am ashamed.  As a con­sumer of media, I failed to shield myself with appro­pri­ate lev­els of skep­ti­cism and I failed.

If there’s one thing that mod­ern media is espe­cial­ly good at, it’s tear­ing peo­ple apart.  An Evil per­son picks a tar­get (in this case Sen­a­tors Mike Duffy and Pame­la Wallin).  Then they pick a hot but­ton issue (in this case their expens­es) and then we all whip our out­rage into a fren­zy.  This works spec­tac­u­lar­ly well with the boomer gen­er­a­tion and mod­er­ate­ly well with younger peo­ple.  In the Senator’s cas­es, the out­rage belongs almost entire­ly to that old­er gen­er­a­tion and it was quite deaf­en­ing until some new infor­ma­tion came to light.

That new infor­ma­tion imme­di­ate­ly intrigued me; not least in part because it reformed the whole sto­ry for me.  What had been a sto­ry about a retired news man sub­mit­ting inap­pro­pri­ate expens­es became a sto­ry about a Prime Min­is­ter attempt­ing to white wash an incon­ve­nient truth with­out regard to who was thrown under the bus. I strong­ly sus­pect that we will con­tin­ue to have new infor­ma­tion deliv­ered to us — Harper may well have picked adver­saries that have equal or greater access to the pub­lic ear.

The more impor­tant take-away from this sto­ry, how­ev­er, is that the con­ve­nient news feeds from entire­ly par­ti­san orga­ni­za­tions (includ­ing the gov­ern­ment) are not worth the elec­trons used to form them.  In an era where news orga­ni­za­tions spend ever less on pri­ma­ry report­ing, the con­sumer of news must be ever more wary of the sources used.

Posted in Politics | Tagged , , , , , , , | Leave a comment

Technical Plot Holes in NBC’s Revolution

Revolution Poster

Rev­o­lu­tion Poster

I’ve been amused over the last sev­er­al days by NBC’s Rev­o­lu­tion.  The set­ting is a near future in which elec­tri­cal pow­er has been shut off for about fif­teen years.  More pre­cise­ly, elec­tron­ic gad­gets of any kind don’t work.  The show has been OK … but I have some prob­lems with this premise and how they’ve devel­oped it.  Truth be told, I’ve been hold­ing at episode 10 until my sus­pen­sion of dis­be­lief returns.  Here’s how it escaped…

The show’s premise has all elec­tric­i­ty not flow­ing.  Even the sim­plest of cir­cuits (say bat­tery plus light bulb equals flash light) don’t work in “Rev­o­lu­tion.”  Elec­tric­i­ty seem­ing­ly doesn’t flow.  This is dif­fer­ent than the field the­o­ry of Falling Skies (sim­ple things work) or the destroyed tech­nol­o­gy art style of much post apoc­olyp­ti­ca (most tech­nol­o­gy destroyed, but some found tech­nol­o­gy works).

The first and most obvi­ous of sci­ence holes is the fact that humans — indeed all com­plex life with brains and ner­vous sys­tems work on elec­tri­cal impuls­es.  Real­ly sim­ple life is large­ly chem­i­cal — but even basic chem­i­cal reac­tions involve the exchange of elec­trons — which is the very basis of how elec­tric­i­ty works. Even if you could (say) stop var­i­ous met­als from con­duct­ing elec­tric­i­ty, sim­ple elec­tric devices would work if mate­ri­als akin to the body’s meth­ods of con­duct­ing elec­tric­i­ty would work.  But the con­verse case is more inter­est­ing.  Let us con­tin­ue to digress…

Revolution Steam Train

Rev­o­lu­tion Steam Train

Sev­er­al episodes into the series, they fea­ture a steam train run­ning from some­where in Illi­nois to Philadel­phia.  While the amount of phys­i­cal labour to pre­pare a track is plau­si­ble and the num­ber of semi-restored steam loco­mo­tives still active in the US makes this some­what plau­si­ble, the biggest prob­lem I have with this idea was the utter lack of men­tion of the effort to provide water tow­ers every 20 to 50 miles or so — which is one of the items that steam trains required. Con­tin­ue read­ing

Posted in Media | Tagged , , , , , , | Leave a comment

Open the Floodgates…

Open the flood­gates.  Open the blog.  Open the soft­ware.  Open the gov­ern­ment.

open

OPEN

Open

Your

Mind

Dra­mat­ic words, no?  Mean­ing­less words?  Some would have you believe. Con­sid­er “open” for a moment.

Open the Floodgates

At it’s most sim­ple, “open” rep­re­sents the flow of ideas that is sud­den­ly upon me.  Tru­ly it only rains when it pours here!  While both you and I have endured a long dry spell of Ran­dom Scrib­blings, the pauci­ty here is now of excess.  I have more meta post ideas than time to write them and the shame in that is the lack of con­tent.

I am excit­ed by blog­ging again.  I wrote this to express that, but “open” is more impor­tant than my blog, my issues or my feel­ings.
Con­tin­ue read­ing

Posted in fail, Life, metablog, Politics, Rant | Tagged , , , , , , , , , , , , , , , | Leave a comment

Back in the (Somewhat Random) Saddle

I have been slack­ing.  I even have sev­er­al posts pret­ty much ready and I’ve been slack­ing.  To be com­plete­ly hon­est with myself, I think my father’s death last year affect­ed my desire to express myself more than I thought.  He and I often had pro­tract­ed dis­cus­sions on top­ics very sim­i­lar to those I pub­lish on this site.

But I have come to real­ize that there is worth in this writ­ing.  It’s not just the com­ments … of which a very few have slow­ly appeared above the gen­er­al noise of SPAM.  It’s also not just the read­just­ing of rela­tion­ships with my fam­i­ly … who are equal­ly sound­ing boards for my notions.  It’s worth­while because I have some­thing to say.

With that, I sup­pose I intro­duce the new “sea­son” of Ran­dom Scrib­blings.  I’ve got some thoughts on Tele­vi­sion fic­tion com­ing up as well as some refined thoughts on Video Games.   My favorite store for Ran­dom stuff (Lab Safe­ty) has been bought out — and the new own­er (Granger) is bor­ing beyond belief — but may­be I’ll write more about that, too.

Con­sult­ing Gilbert’s Law of Oppo­sites, things must have stayed the same since they also seem so com­plete­ly and utter­ly dif­fer­ent.

Posted in Life, metablog | Tagged , , , , , | 1 Comment