technica page 14 - Dave's Blog

Search
My timeline on Mastodon

FireFox doesn't have innerText

2011 Nov 14, 12:34

I wrote my HTML against IE9 and continually validated with Chrome as I went. Afterward I tried it in FireFox and found out that FireFox has textContent whereas IE9 & Chrome have innerText

PermalinkCommentstechnical web web-browser firefox ie9 chrome ie innertext textcontent js html

My favourite comment ever posted on Reddit

2011 Oct 26, 8:04
"Knowledge is Power; France is bacon"
PermalinkCommentstechnical

iPod Godfather Tony Fadell Finally Reveals His New Product: A Thermostat. No, Really. | TechCrunch

2011 Oct 25, 5:37
An original iPod guy has a new company that makes... wait for it... thermostats. Weird. Well they look cool anyway.
PermalinkCommentstechnical

Chris Harrison | A New Angle on Cheap LCDs

2011 Oct 25, 5:33
Its not a bug -- its a feature! Very cool unread mail demo.
PermalinkCommentstechnical

Dare to Fight, A Hilarious Ninja Ambush Prank

2011 Oct 24, 2:14
Ninjas fight dirty.
PermalinkCommentstechnical

NYTimes Sues US For Refusing To Reveal Secret Interpretation Of Patriot Act (techdirt.com)

2011 Oct 20, 6:52
Wow, FTA: "Given all of this, reporter Charlie Savage of the NY Times filed a Freedom of Information Act request to find out the federal government's interpretation of its own law... and had it refused. According to the federal government, its own interpretation of the law is classified."
PermalinkCommentstechnical

MemeCats: #OccupyPopTarts

2011 Oct 20, 12:00PermalinkCommentslolcats memecats memes nyan cat occupy wall street politics protests signs technical

Bug Spotting: Smart pointers and parameter evaluation order

2011 Oct 19, 5:58
The following code works fine. I have a ccomptr named resolvedUri and I want to update its hostname so I do the following:
        CreateIUriBuilder(resolvedUri, 0, 0, &builder);
builder->SetHost(host);
builder->CreateUri(0xFFFFFFFF, 0, 0, &resolvedUri);


But the following similar looking code has a bug:
    ResolveHost(resolvedUri, &resolvedUri);


The issue is that doing &resolvedUri gets the address of the pointer but also clears out the pointer due to the definition of my smart pointer class:
    operator T**()  
{
T *ptrValue = mPtrValue;
mPtrValue->Release();
mPtrValue = NULL;
return &ptrValue;
}


In C++ there’s no guarantee about the order in which parameters for a function or method are evaluated. In the case above, &resolvedUri clears out the ccomptr before evaluating resolvedUri.Get() and so ResolveHostAlias gets a nullptr.

An interesting and related thread on stack overflow on undefined behavior in C++.
PermalinkCommentsc++ technical bug programming smart-pointer cpp

"Deprecating Use of the "X-" Prefix in Application Protocols" - Peter Saint-Andre, D. Crocker, Mark Nottingham

2011 Oct 19, 2:07
Don't prefix your proprietary URI schemes with "x-". Your company name or label reversed domain name is acceptable though.
PermalinkCommentstechnical

"Additional HTTP Status Codes" - Mark Nottingham, Roy Fielding

2011 Oct 19, 1:01
Describes additional HTTP status codes including 511 for captive portals asking for auth.
PermalinkCommentstechnical

Man Unfortunately Sleeps Like Baby

2011 Oct 18, 7:16
Just discussing this recently. Maybe sleeps like a baby is meant to indicate the depth of the sleep and not the duration?
PermalinkCommentstechnical

"The Canonical Link Relation" - Maile Ohye, Joachim Kupke

2011 Oct 17, 6:03PermalinkCommentstechnical

"The 'about' URI Scheme" - Lachlan Hunt, Mykyta Yevstifeyev

2011 Oct 17, 5:58
Essentially anybody can resolve it however they like except for tokens from the about URI special token registry which currently only contains 'blank'.
PermalinkCommentstechnical

Portal 2's Turret Lullaby comic sheds light and lasers on the singing turrets

2011 Oct 2, 4:30
PermalinkCommentscomics mac microsoft pc playstation portal-2 ps3 singing-turrets valve xbox technical

The three terrifying minutes that created The Gunstringer

2011 Sep 29, 8:35This story is funny and also reminds me to go eat at Matador... "Twisted Pixel chief creative officer Josh Bear had responded with abounding confidence, if only to mask the truth. Because the fact of the matter, the fact that he and CEO Mike Wilford were all too aware of, as they sat in Redmond, WA Tex-Mex restaurant The Matador, was this: The idea wasn't "awesome." It was nonexistent."
PermalinkCommentsfood microsoft game gunstringer humor technical

John Hodgman's presentation at Maker Faire New York (Video)

2011 Sep 23, 10:13PermalinkCommentsPost technical

Man-in-the-Middle Attack Against SSL 3.0/TLS 1.0

2011 Sep 23, 4:37PermalinkCommentstechnical

The average font

2011 Sep 22, 3:50PermalinkCommentstechnical

[html5] Web Workers: Race-Condition setting onmessage handler?

2011 Sep 20, 7:17There's no race between posting to a web worker and the web worker setting up its message handler as long as the web worker sets its message handler in the first sync. block of code that runs in the web worker: "Basically, once the initial worker script returns, the worker's port is enabled and the normal message port event delivery mechanism kicks in (including dropping unhandled messages on the floor)."PermalinkCommentstechnical web-worker webbrowser programming postMessage

A history of map monsters. (IMAGES)

2011 Sep 20, 9:19PermalinkCommentsScience technical
Older EntriesNewer Entries Creative Commons License Some rights reserved.