2012 Feb 13, 4:00
Most existing DRM attempts to only allow the user to access the DRM'ed content with particular applications or with particular credentials so that if the file is shared it won't be useful to
others. A better solution is to encode any of the user's horrible secrets into unique versions of the DRM'ed content so that the user won't want to share it. Entangle the users and the
content provider's secrets together in one document and accordingly their interests. I call this Blackmail DRM. For an implementation it is important to point out that the user's horrible secret
doesn't need to be verified as accurate, but merely verified as believable.
Apparently I need to get these blog posts written faster because only recently I read about Social DRM which is a light weight version of my idea
but with a misleading name. Instead of horrible secrets, they say they'll use personal information like the user's name in the DRM'ed content. More of my thoughts stolen and before I even had a
chance to think of it first!
drm blackmail blackmail-drm technical humor social-drm 2011 Dec 3, 6:46
Cool and (relatively) new methods on the JavaScript Array object are here in the most recent versions of your
favorite browser! More about them on ECMAScript5, MSDN, the IE blog, or Mozilla's documentation. Here's the list that's got me excited:
-
some & every
-
Does your callback function return true for any (some) or all (every) of the array's elements?
-
filter
-
Filters out elements for which your callback function returns false (in a new copy of the Array).
-
map
-
Each element is replaced with the result of it run through your callback function (in a new copy of the Array).
-
reduce & reduceRight
-
Your callback is called on each element in the array in sequence (from start to finish in reduce and from finish to start in reduceRight) with the result of the previous callback call passed to
the next. Reduce your array to a single value aggregated in any manner you like via your callback function.
-
forEach
-
Simply calls your callback passing in each element of your array in turn. I have vague performance concerns as compared to using a normal for loop.
-
indexOf & lastIndexOf
-
Finds the first or last (respectively) element in the array that matches the provided value via strict equality operator and returns the index of that element or -1 if there is no such element.
Surprisingly, no custom comparison callback method mechanism is provided.
-
javascript array technical programming 2011 Dec 1, 4:59
The following code compiled just fine but did not at all act in the manner I expected:
BOOL CheckForThing(__in CObj *pObj, __in IFigMgr* pFigMgr, __in_opt LPCWSTR url)
{
BOOL fCheck = FALSE;
if (SubCheck(pObj))
{
...
I’m
calling SubCheck which looks like:
bool SubCheck(const CObj& obj);
Did you spot the bug? As you can see I should be passing in *pObj not pObj since the method takes a const CObj& not a CObj*. But then why does it compile?
It works because CObj has a constructor with all but one param with default values and CObj is derived from IUnknown:
CObj(__in_opt IUnknown * pUnkOuter, __in_opt LPCWSTR pszUrl = NULL);
Accordingly C++ uses this constructor as an implicit conversion operator. So instead of passing in my
CObj, I end up creating a new CObj on the stack passing in the CObj I wanted as the outer object which has a number of issues.
The lesson is unless you really want this behavior, don't make constructors with all but 1 or 0 default parameters. If you need to do that consider using the 'explicit' keyword on the
constructor.
More info about forcing single argument constructors to be explicit is available
on stack overflow.
c++ technical bug programming 2011 Jul 1, 10:15"This specification defines the canonical link relation -- an element which designates the preferred version of content/URI from a set of duplicate or near duplicate pages."
link uri url html rel technical standard rfc canonical 2011 Jul 1, 10:09"I periodically get email from folks who, having read "Accelerando", assume I am some kind of fire-breathing extropian zealot who believes in the imminence of the singularity, the uploading of the
libertarians, and the rapture of the nerds. I find this mildly distressing, and so I think it's time to set the record straight and say what I really think. Short version: Santa Claus doesn't exist."
scifi singularity charles-stross future fiction 2011 May 28, 11:00
I wanted to ensure that my switch statement in my implementation of IInternetSecurityManager::ProcessURLAction had a case for every possible documented URLACTION. I wrote the following short
command line sequence to see the list of all URLACTIONs in the SDK header file not found in my source file:
grep URLACTION urlmon.idl | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > allURLACTIONs.txt
grep URLACTION MySecurityManager.cpp | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > myURLACTIONs.txt
comm -23 allURLACTIONs.txt myURLACTIONs.txt
I'm
not a sed expert so I had to read the
sed documentation, and I heard about
comm from Kris Kowal's blog which happilly was in the
Win32 GNU tools pack I
already run.
But in my effort to learn and use PowerShell I found the following similar command line:
diff
(more urlmon.idl | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
(more MySecurityManager.cpp | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
In
the PowerShell version I can skip the temporary files which is nice. 'diff' is mapped to 'compare-object' which seems similar to comm but with no parameters to filter out the different streams
(although this could be done more verbosely with the ?{ } filter syntax). In PowerShell uniq functionality is built into sort. The builtin -cmatch operator (c is for case sensitive) to do regexp is
nice plus the side effect of generating the $matches variable with the regexp results.
powershell tool cli technical command line 2011 Apr 30, 4:33"The HTTP-based Memento framework bridges the present and past Web by interlinking current resources with resources that encapsulate their past. It facilitates obtaining representations of prior
states of a resource, available from archival resources in Web archives or version resources in content management systems, by leveraging the resource's URI and a preferred datetime. To this end, the
framework introduces datetime negotiation (a variation on content negotiation), and new Relation Types for the HTTP Link header aimed at interlinking resources with their archival/version resources.
It also introduces various discovery mechanisms that further support briding the present and past Web."
technical rfc reference http header time memento archive 2011 Mar 28, 4:06"ILSpy is the open-source .NET assembly browser and decompiler. Development started after Red Gate announced that the free version of .NET Reflector would cease to exist by end of February 2011."
.net tools reflector c# development csharp dotnet technical tool 2010 Dec 16, 3:33Fight favicons pokemon style.
humor game web favicon pokemon technical via:waxy 2010 Sep 4, 7:40"In the past, Lions Gate, which owns the rights to the “Mad Men” clip, might have requested that TomR35’s version be taken down. But it has decided to leave clips like this up, and in return, YouTube
runs ads with the video and splits the revenue with Lions Gate."
ad advertising copyright economics google internet tv video youtube article 2010 Jul 20, 6:45Hack based on DNS rebinding plus home router's web front end.
security technical web router dns dns-rebinding hack 2010 May 14, 9:37New York Times article from May 15th 1910 titled "MEMBERS OF THE SUPREME COURT AS HUMAN BEINGS: When Not on the Bench They Are Pretty Much Like Other People — Characteristic Stores About Them". This
is the NYT 1910's version of US Weekly's current "Celebrities Are Just Like Us!" feature.
humor history article supreme-court 2010 Apr 11, 3:53Has graphs of browser usage by version over time to show upgrade speed for Chrome, IE, and Firefox. Chrome has a lovely graph.
graph statistics infographics web browser chrome ie firefox version upgrade technical. 2010 Apr 6, 5:06"Palimpsest by Charles Stross, 2009. This version made available for 2010 Hugo Award voters by kind permission of the publishers."
charles-stross palimpset fiction scifi todo time-travel hugo-award 2010 Apr 1, 2:42Its like a better version of what I was doing with my Web Frotz Interpreter. Its all client side javascript, HTML, & CSS to play Z-machine based interactive fiction games. They even do the saved
game in a URL piece.
if interactive-fiction game web browser webapp 2010 Mar 11, 3:39How to do audio & video in the latest version of Opera
html5 html video audio opera web browser technical development reference 2010 Feb 26, 8:40
I'm making a switch from the IE team to the Windows team where I'll be working on the next version of Windows. As a going away surprise Jen and Nick added me to my gallery of Bill Gates (discussed previously). Here's a close up of the photoshopped cover.
Before:
After:
microsoft bill gates photoshop windows 2010 Feb 22, 4:25Wired's concept for a digital version of their magazine to run on tablets. Looks pretty but of course its running on Flash or somesuch Adobe product.
video wired web adobe magazine 2010 Feb 21, 2:54Internet folk sing about their love of various nerdy things ala xkcd comic of similar name
cory-doctorow wil-wheaton video xkcd humor music song internet meme