Joho the BlogJoho the Blog - Let's just see what happens

October 9, 2015

My morning D’oh slap

The Mac’s character palette has been driving me crazy. I poke around it vainly looking for the accented character or superscripted punctuation mark that I need at the moment, but it’s all symbols, no labels, which might strike Apple as appropriate but strikes me as maddening since as time goes on I understand fewer and fewer of the new symbols. Amirite, emoji1, Yellow Face Puking Up a Heart It Just Ate ?

Well, it turns out that there’s been a bug in my palette so that it has displayed itself like this:

It turns out that if I scroll all the way to the tippy-top, a magic icon comes into view:

icon appears

And if I click on that, I get this:

full display

I say this is a bug because I cannot now get the window to go back to the state in which it has been since an OS X upgrade or two ago. So perhaps I and the cause of this anomaly should be D’oh-slapping each other.

Amirite, emoji2, Needs a Butt Flap?

Be the first to comment »

October 7, 2015

[liveblog] The future of libraries

I’m at a Hubweek event called “Libraries: The Next Generation.” It’s a panel hosted by the Berkman Center with Dan Cohen, the executive director of the DPLA; Andromeda Yelton, a developer who has done work with libraries; and Jeffrey Schnapp of metaLab

NOTE: Live-blogging. Getting things wrong. Missing points. Omitting key information. Introducing artificial choppiness. Over-emphasizing small matters. Paraphrasing badly. Not running a spellpchecker. Mangling other people’s ideas and words. You are warned, people.

Sue Kriegsman of the Center introduces the session by explaining Berkman’s interest in libraries. “We have libraries lurking in every corner…which is fabulous.” Also, Berkman incubated the DPLA. And it has other projects underway.

Dan Cohen speaks first. He says if he were to give a State of the Union Address about libraries, he’d say: “They are as beloved as ever and stand at the center of communities” here and around the world. He cites a recent Pew survey about perspectives on libraries:“ …libraries have the highest approval rating of all American institutions. But, that’s fragile.” libraries have the highest approval rating of all American institutions. But, he warns, that’s fragile. There are many pressures, and libraries are chronically under-funded, which is hard to understand given how beloved they are.

First among the pressures on libraries: the move from print. E-book adoption hasn’t stalled, although the purchase of e-books from the Big Five publishers compared to print has slowed. But Overdrive is lending lots of ebooks. Amazon has 65% of the ebook market, “a scary number,” Dan says. In the Pew survey a couple of weeks ago, 35% said that libraries ought to spend more on ebooks even at the expense of physical books. But 20% thought the opposite. That makes it hard to be the director of a public library.

If you look at the ebook market, there’s more reading go on at places like the DPLA. (He mentions the StackLife browser they use, that came out of the Harvard Library Innovation Lab that I used to co-direct.) Many of the ebooks are being provided straight to a platform (mainly Amazon) by the authors.

There are lots of jobs public libraries do that are unrelated to books. E.g., the Boston Public Library is heavily used by the homeless population.

The way forward? Dan stresses working together, collaboration. “DPLA is as much a social, collaborative project as it is a technical project.” It is run by a community that has gotten together to run a common platform.

And digital is important. We don’t want to leave it to Jeff Bezos who “wants to drop anything on you that you want, by drone, in an hour.”

Andromeda: She says she’s going to talk about “libraries beyond Thunderdome,” echoing a phrase from Sue Kriegman’s opening comments. “My real concern is with the skills of the people surrounding our crashed Boeing.” Libraries need better skills to evaluate and build the software they need. She gives some exxamples of places where we see a tensions between library values and code.

1. The tension between access and privacy. Physical books leave no traces. With ebooks the reading is generally tracked. Overdrive did a deal so that library patrons who access ebooks get notices from Amazon when their loan period is almost up. Adobe does rights management, with reports coming page by page about what people are reading. “Unencrypted over the Internet,” she adds. “You need a fair bit of technical knowledge to see that this is happening,” she says. “It doesn’t have to be this way.” “It’s the DRM and the technology that have these privacy issues built in.”

She points to the NYPL Library Simplified program that makes it far easier for non-techie users. It includes access to Project Gutenberg. Libraries have an incentive to build open architectures that support privacy. But they need the funding and the technical resources.

She cites the Library Freedom Project that teaches librarians about anti-surveillance technologies. They let library users browse the Internet through TOR, preventing (or at least greatly inhibit) tracking. They set up the first library TOR node in New Hampshire. Homeland Security quickly suggested that they stop. But there was picketing against this, and the library turned it back on. “That makes me happy.”

2. Metadata. She has us do an image search for “beautiful woman” at Google. They’re basically all white. Metadata is sometimes political. She goes through the 200s of the Dewey Decimal system: 90% Christian. “This isn’t representative of human knowledge. It’s representative of what Melvil Dewey thought maps to human knowledge.” Libraries make certain viewpoints more computationally accessible than others.“ Our ability to write new apps is only as good as the metadata under them.” Our ability to write new apps is only as good as the metadata under them. “As we go on to a more computational library world — which is awesome — we’re going to fossilize all these old prejudices. That’s my fear.”

“My hope is that we’ll have the support, conviction and empathy to write software, and to demand software, that makes our libraries better, and more fair.”

Jeffrey: He says his peculiar interest is in how we use space to build libraries as architectures of knowledge. “Libraries are one of our most ancient institutions.” “Libraries have constantly undergone change,” from mausoleums, to cloisters, to warehouses, places of curatorial practice, and civic spaces. “The legacy of that history…has traces of all of those historical identities.” We’ve always faced the question “What is a library?” What are it’s services? How does it serve its customers? Architects and designers have responded to this, assuming a set of social needs, opportunities, fantasies, and the practices by which knowledge is created, refined, shared. “These are all abiding questions.”

Contemporary architects and designers are often excited by library projects because it crystallizes one of the most central questions of the day: “How do you weave together information and space?” We’re often not very good at that. The default for libraries has been: build a black box.

We have tended to associate libraries with collections. “If you ask what is a library?, the first answer you get is: a collection.” But libraries have also always been about the making of connections, i.e., how the collections are brought alive. E.g., the Alexandrian Librarywas a performance space. “What does this connection space look like today?” In his book with Matthew Battles, they argue that while we’ve thought of libraries as being a single institution, in fact today there are now many different types of libraries. E.g., the research library as an information space seems to be collapsing; the researchers don’t need reading rooms, etc. But civic libraries are expanding their physical practices.

We need to be talking about many different types of libraries, each with their own services and needs. The Library as an institution is on the wane. We need to proliferate and multiply the libraries to serve their communities and to take advantage of the new tools and services. “We need spaces for learning,” but the stack is just one model.


Dan: Mike O’Malley says that our image of reading is in a salon with a glass of port, but in grad school we’re taught to read a book the way a sous chef guts a fish. A study says that of academic ebooks, 75% of scholars read less than 50 pages of them. [I may have gotten that slightly wrong. Sorry.] Assuming a proliferation of forms, what can we do to address them?

Jeffrey: The presuppositions about how we package knowledge are all up for grabs now. “There’s a vast proliferation of channels. ‘And that’s a design opportunity.’”There’s a vast proliferation of channels. “And that’s a design opportunity.” How can we create audiences that would never have been part of the traditional distribution models? “I’m really excited about getting scholars and creative practitioners involved in short-form knowledge and the spectrum of ways you can intersect” the different ways we use these different forms. “That includes print.” There’s “an extraordinary explosion of innovation around print.”

Andromeda: “Reading is a shorthand. Library is really about transforming people and one another by providing access to information.” Reading is not the only way of doing this. E.g., in maker spaces people learn by using their hands. “How can you support reading as a mode of knowledge construction?” Ten years ago she toured Olin College library, which was just starting. The library had chairs and whiteboards on castors. “This is how engineers think”: they want to be able to configure a space on the fly, and have toys for fidgeting. E.g., her eight year old has to be standing and moving if she’s asked a hard question. “We need to think of reading as something broader than dealing with a text in front of you.”

Jeffrey: The DPLA has a location in the name — America &#8212. The French National Library wants to collect “the French Internet.” But what does that mean? The Net seems to be beyond locality. What role does place play?

Dan: From the beginning we’ve partnered with Europeana. We reused Europeana’s metadata standard, enabling us to share items. E.g., Europeana’s 100th anniversary of the Great War web site was able to seamlessly pull in content from the DPLA via our API, and from other countries. “The DPLA has materials in over 400 languages,” and actively partners with other international libraries.

Dan points to Amy Ryan (the DPLA chairperson, who is in the audience) and points to the construction of glass walls to see into the Boston Public Library. This increases “permeability.” When she was head of the BPL, she lowered the stacks on the second floor so now you can see across the entire floor. Permeability “is a very smart architecture” for both physical and digital spaces.

Jeff: Rendering visible a lot of the invisible stuff that libraries do is “super-rich,” assuming the privacy concerns are addressed.

Andromeda: Is there scope in the DPLA metadata for users to address the inevitable imbalances in the metadata?

Dan: We collect data from 1,600 different sources. We normalize the data, which is essential if you want to enable it for collaboration. Our Metdata Application Profile v. 4 adds a field for annotation. Because we’re only a dozen people, we haven’t created a crowd-sourcing tool, but all our data is CC0 (public domain) so anyone who wants to can create a tool for metadata enhancement. If people do enhance it, though, we’ll have to figure out if we import that data into the DPLA.

Jeffrey: The politics of metadata and taxonomy has a long history. The Enlightenment fantasy is for a universal metadata school. What does the future look like on this issue?

Andromeda: “You can have extremely crowdsourced metadata, but then you’re subject to astroturfing”You can have extremely crowdsourced metadata, but then you’re subject to astroturfing and popularity boosting results for bad reasons. There isn’t a great solution except insofar as you provide frameworks for data that enable many points of view and actively solicit people to express themselves. But I don’t have a solution.

Dan: E.g., at DPLA there are lots of ways entering dates. We don’t want to force a scheme down anyone’s throat. But the tension between crowdsourced and more professional curation is real. The Indianapolis Museum of Art allowed freeform tagging and compared the crowdsourced tags vs. professional. Crowdsourced: “sea” and “orange” were big, which curators generally don’t use.


Q: People structure knowledge differently. My son has ADHD. Or Nepal, where I visited recently.

A: Dan: It’s great that the digital can be reformatted for devices but also for other cultural views. “That’s one of the miraculous things about the digital.” E.g., digital book shelves like StackLife can reorder themselves depending on the query.

Jeff: Yes, these differences can be profound. “Designing for that is a challenge but really exciting.”

Andromeda: This is a why it’s so important to talk with lots of people and to enable them collaborate.

me: Linked data seems to resolve some of these problems with metadata.

Dan: Linked Data provides a common reference for entities. Allows harmonizing data. The DPLA has a slot for such IDs (which are URIs). We’re getting there, but it’s not our immediate priority. [Blogger’s perogative: By having many references for an item linked via “sameAs” relationships can help get past the prejudice that can manifest itself when there’s a single canonical reference link. But mainly I mean that because Linked Data doesn’t have a single record for each item, new relationships can be added relatively easily.]

Q; How do business and industry influence libraries? E.g., Google has images for every place in the world. They have scanned books. “I can see a triangulation happening. Virtual libraries? Virtual spaces?

Andromeda: (1) Virtual tech is written outside of libraries, almost entirely. So it depends on what libraries are able to demand and influence. (2) Commercial tech sets expectations for what users experiences should be like, which libraries may not be able to support. (3) “People say “Why do we need libraries? It’s all online and I can pay for it.” No, it’s not, and no, not everyone can.”People say “Why do we need libraries? It’s all online and I can pay for it.” No, it’s not, and no, not everyone can. Libraries should up their tech game, but there’s an existential threat.

Jeffrey: People use other spaces to connect to knowledge, e.g. coffee houses, which are now being incorporated into libraries. Some people are anxious about that loss of boundary. Being able to eat, drink, and talk is a strong “vision statement” but for some it breaks down the world of contemplative knowledge they want from a library.

Q: The National Science and Technology Library in China last week said they have the right to preserve all electronic resources. How can we do that?

Dan: Libraries have long been sites for preservation. In the 21st century we’re so focused on getting access now now now, we lose sight that we may be buying into commercial systems that may not be able to preserve this. This is the main problem with DRM. Libraries are in the forever business, but we don’t know where Amazon will be. We don’t know if we’ll be able to read today’s books on tomorrow devices. E.g., “I had a subscription to Oyster ebook service, but they just went out of business. There go all my books. ”I had a subscription to Oyster ebook service, but they just went out of business. There go all my books. Open Access advocacy is going to play a critical role. Sure, Google is a $300B business and they’ll stick around, but they drop services. They don’t have a commitment like libraries and nonprofits and universities do to being in the forever business.

Jeff: It’s a huge question. It’s really important to remember that the oldest digital documents we have are 50 yrs old which isn’t even a drop in the bucket. There’s far from universal agreement about the preservation formats. Old web sites, old projects, chunks of knowledge, of mine have disappeared. What does it mean to preserve a virtual world? We need open standards, and practices [missed the word] “Digital stuff is inherently fragile.”

Andromeda: There are some good things going on in this space. The Rapid Response Social Media project is archiving (e.g., #Ferguson). Preserving software is hard: you need the software system, the hardware, etc.

Q: Distintermediation has stripped out too much value. What are your thoughts on the future of curation?

Jeffrey: There’s a high level of anxiety in the librarian community about their future roles. But I think their role comes away as reinforced. It requires new skills, though.

Andromeda: In one pottery class the assignment was to make one pot. In another, it was to make 50 pots. The best pots came out of the latter. When lots of people can author lots of stuff, it’s great. That makes curation all the more critical.

Dan: the DPLA has a Curation Core: librarians helping us organize our ebook collection for kids, which we’re about to launch with President Obama. Also: Given the growth in authorship, yes, a lot of it is Sexy Vampires, but even with that aside, we’ll need librarians to sort through that.

Q: How will Digital Rights Management and copyright issues affect ebooks and libraries? How do you negotiate that or reform that?

Dan: It’s hard to accession a lot of things now. For many ebooks there’s no way to extract them from their DRM and they won’t move into the public domain for well over 100 years. To preserve things like that you have to break the law — some scholars have asked the Library of Congress for exemptions to the DMCA to archive films before they decay.

Q: Lightning round: How do you get people and the culture engaged with public libraries?

Andromeda: Ask yourself: Who’s not here?

Jeffrey: Politicians.

Dan: Evangelism

Be the first to comment »

October 6, 2015

Doc Searls’ "The Adblock War" series

Adblocking is, as Doc Searls claims, “the biggest boycott in human history.” Since August 12, Doc’s been posting what I can only call an in-depth, analytical, evidence-based rant. It is not to be missed.

  1. Separating advertising’s wheat and chaff (12 August 2015)
  2. Apple’s content blocking is chemo for the cancer of adtech (26 August 2015)
  3. Will content blocking push Apple into advertising’s wheat business? (29 August 2015)
  4. If marketing listened to markets, they’d hear what ad blocking is telling them (8 September 2015)
  5. Debugging adtext assumptions (18 September 2015)
  6. How adtech, not ad blocking, breaks the social contract (23 September 2015)
  7. A way to peace in the adblock war (21 September 2015, on the ProjectVRM blog)
  8. Beyond ad blocking — the biggest boycott in human history (28 Septemper 2015)
  9. Dealing with Boundary Issues (1 October 2015 in Linux Journal)

Doc says (in an email) he is “building the case for what ProjectVRMCustomer Commons and Mozilla (notably its Content Services group) are quietly doing to disable surveillance capitalism.”

Be the first to comment »

October 5, 2015

Enabling JavaScript to read files on your drive via Dropbox: A “Where I went wrong” puzzle.

Ermahgerd, this was so much harder than I thought it would be. In fact, what follows is best approached as a puzzler in which your task is to find the earliest place where I’ve gone horribly wrong. The winning comment will be of the form, “You’re such an idiot! All you had to do was____!” Second place, because less satisfying but no less humiliating, will be comments of the form, “OMFG, why are you writing this? How can you get the simplest thing wrong???”

I know. Forgive me.

So, let’s say you’re writing, oh, an outliner for your own personal use because the one you’ve been using for seven years or so no longer supports Dropbox: If you save an OmniOutliner file to a Dropbox folder, it only gets one of the sub-files. You poke around with alternatives but none of have exactly the set of minimal features you want. (Dave Winer’s Fargo gets damn close to my peculiarities, and it saves outlines in Dropbox…but in only one special folder. I’m picky. And I was looking for a programming project.) So, you decide to write your own. Sure, it’ll be under-featured, and it’ll break. But it’ll be yours.

It’s going to run in a browser because you can’t find any other way to write an app for your Mac except Objective C and Swift, both of which require three days of tutorials and a hundred pushups to get to “Hello, world.” So, you’re using JavaScript and jQuery, JavaScript’s smarter older brother. (Hi, Andy.) And PHP.

Now, you can try as hard as you want, but “The browser is going to insist on protecting you from accessing files on anyone’s hard drive, even your own”the browser is going to insist on protecting you from being able to access files on anyone’s hard drive, even your own, because otherwise Malefactors are going to install apps that will suck your brains out through your smallest aperture and take your credit card numbers with it. For real.

I tried many of the things the Internet recommends to circumvent this well-meaning rule. I wouldn’t have even tried, but I’m running my outliner on my local hard drive, using the Apache2 web server that comes with MAMP. So, I understand why there’s a wall around the files that are not part of what the web server considers to be its home, but those files are mind. So close, yet so far.

I tried figuring out how to set up a virtual directory, but the initial efforts failed and monkeying with apache files scares me. Likewise for changing the server’s document root.

I put a symbolic link to my Dropbox folder into the JavaScript project’s folder (actually in the “php” sub-folder), and was able to write a file into it via PHP. But I couldn’t figure out a way to read the Dropbox folder, which means that if I wanted to switch from loading an outline from




I’d have to type in the entire pathname. No directory browsing for you!

(To create a symbolic link, in your Mac terminal type: “ln -s /Users/YOUR_NAME/Dropbox”. )

So, I had a brainstorm. I use outlines in almost everything I do, but virtually everything I do is in Dropbox. “ has a perfect mirror of my files and folder structure. ” therefore has a perfect mirror of my files and folder structure. Perhaps Dropbox has an API that would let me browse its mirror of my local disk.

It does! With lots of documentation, almost none of which I understand! I’m sure it’s terrific for people who know what they’re doing, but won’t someone please think of the people who need a For Dummies book to read a For Dummies book?

What I’d like to do is to browse the file structure at so I can identify the file I want to open, and have tell me via its API what that file’s path is. Then I could use PHP or even JavaScript (I think) to directly open that file on my own disk via the Dropbox symbolic link in my PHP folder. Right?

Guess what the API doesn’t tell you. Which is too bad because I want to use the same info later to save a file to a pathname inside that symbolic link.

But Dropbox does make it easy for you to drop a magic button into your HTML that will launch a Dropbox mini-file-browser. The version called the “Chooser” downloads files. The version called “Saver” uploads them. Just what I need.

Sort of. What I’d really like to do is:

  • Browse my Dropbox folders using the Chooser.

  • Click to download my chosen file.

  • Read the content of that file into my app, so I can display the outline contained within.

“As a matter of principle, I want to be able to have a user choose it, and read the contents programmatically. Thus did I lose, oh, two days of my life.”As a matter of principle, I want to be able to have a user choose it, and read the contents programmatically. Thus did I lose, oh, two days of my life.

I will not bore you with the many ways I tried to do this basic thing. I am sure that someone is going to read this and give me the one line of code I need. Instead, here is the complex way I managed to accomplish this basic task.

Register your app

First, you have to register your app with Dropbox in order to get a key that will let you access their API. This is relatively simple to do. Go to their App Console, and click on the “Create App” button. When asked, say you want to use the Dropbox API, not the Dropox for Business API, unless you have a business account with Dropbox. It will ask if you want to access a particular folder or all of the user’s folders. It will ask you to give your app a name; it has to be unique among all apps registered there.

On the next page, the fourth line is your app key. Copy it. Click on the “app secret” and copy it too. For OAuth redirect, use “localhost” if you’re hosting your app locally. Or put in the URL of where you’re hosting if it’s going to be out on the Web. Likewise for “Chooser/Saver domains.”

Now, into your HTML file place the line:

<script type=”text/javascript” src=”” id=”dropboxjs” data-app-key=”YOUR_KEY”></script>

Obviously, insert your Dropbox key (see above) appropriately.

Ok, let’s create the app.

The app

Into your HTML document create an empty div where the Dropbox button will go:


<div id=”DBbutton”></div>

In the header of your HTML document make sure you’ve included jQuery:


<script src=””></script>

Of course, if you prefer to download your own copy of jQuery instead of using Google’s, go ahead. But at this point so much of what I do goes through Google that avoiding using it for jQuery seems foolish.

Also in your header, after the jQuery line, place the following:


<script type=”text/javascript” src=”./js/Your_File_Name.js”></script>

Create a subfolder in the directory where your HTML file is and name it “js”. Using your favorite text editor create a file called whatever you want to call it, with a “js” extension. Obviously make sure that the file’s name is exactly the one in the line above. That .js file is where you’ll put your JavaScript…although in this example I’m including it all in the HTML file itself because all I’m going to do is going to occur in the script that loads immediately after the file loads. So never mind.

Here’s the rest of what should go into the head section of your HTML file.


<script type=”text/javascript”>





var opts= {


success: function(files) {


var filename = files[0].link;


filename = filename.replace(“dl=0″,”dl=1”);






url: “./php/downloadDropboxContents.php”,


data: “src=” + filename,


success: function(cont){






error: function(e){










extensions: [“.txt”,”.opml”],


multiselect: false,


linkType: “download”




var button = Dropbox.createChooseButton(opts);







Line 2 is a very handy jQuery function that gets executed after the entire page has been downloaded into the browser. That means all the bits and pieces are there before the code in the function is executed.

In this case, the code is going to create a Dropbox button for the user to press. The options for that button are expressed in lines 2-22. Let’s start with the last lines.

Line 19 lists the extensions I want to let users (= me) select for download. There are only two: files that end with .txt and ones that end with .opml. OPML is the standard format for outlines. (Thank you, Dave Winer.)

Line 20 says that I don’t want users to be able to open more than one file at a time.

On line 21 we specify that we want Dropbox to give us back the downloaded file. The alternative is “preview,” which will provide a preview.

By the way, note that each option line ends with a comma, except for the last one. This whole option statement is actually a JSON set of key:value pairs, each delimited by a comma. In some cases, as in Dreaded Line 4, the values are multi-line and complex. Nevertheless, they’re still just values of the keyword to the left of the colon.

But I’m just putting off talking about the “success” option, lines 4-18, that set what happens if the download operation is successful.

Line 4 creates a function that will get passed an array of downloaded files, which unimaginatively I am capturing in the variable “files.”

Line 5 gets the link to the first file in the array. The array is files[]. The appended “.link” gets the URL to the Dropbox file, but it’s a funky link that, alas, doesn’t express the pathname, but some seemingly arbitrary set of characters. For example:

If you were instead to say “files[0].name”, you’d get the file’s name (“A History of the Philosophy of Time.txt”). And if you say “.path” you — damn their eyes — get an error. Aargh. This could have been so much easier! Anyway.

“Line 6 is something I discovered on my own, i.e., I didn’t read the documentation carefully enough.”Line 6 is something I discovered on my own, i.e., I didn’t read the documentation carefully enough. Notice the “dl=0” at the end of the file link above. I’m going to guess the “dl” stands for “download.” If you leave it at 0, you get the user interface. But — aha! — if you replace it with 1, it downloads the actual damn file into your normal download folder, which defaults on the Mac to the Download folder. So, line 6 does the search and replace. (If line 7 weren’t commented out, it’d pop up the file link.)

So now we have a link that will download the file. Excellent!

Lines 8-17 use that URL to actually download it and read it. This requires (i.e., it’s the only way I know how to do it) executing a PHP script. For that we use AJAX, which JavaScript makes hard but jQuery makes easy.

Line 9 points to the PHP file. It lives in a folder called “php.” The “./” is redundant — it says “that folder is in the current directory” but I’m superstitious. We’ll write the PHP file soon.

Line 10 is the dumb way of saying what data we’re going to pass into the PHP script. We’re using the variable “src” and we’re passing the path to the downloadable Dropbox file. The better way to express this data would be to use JSON, but I never remember whether you put the key in quotes or not, so I’d rather do it this way (which in essence simply writes out the appendage to the basic PHP’s script URL) than look it up. But, I just did look it up, and, no, you don’t quote the keys. So line 10 should really be:

data: {src : filename},

but I’m too lazy to do that.

Now in line 11 we get to what we do with the results of the PHP script’s processing of the content it’s going to receive. The commented-out line would post the content into a dialogue box so you can confirm you got it, but what I really want to do is turn the content of that file into a outline displayed by my app. So, my real line 12 will be something like “displayOutline(cont)”, a function that I’ll stick elsewhere in my JavaScript. But that’s not what we’re here to talk about.

Lines 14-6 get invoked if the PHP fails. It displays a human-readable version of the error code. You’ll also want to be looking at your console’s error log. If you’re using MAMP, look at php_error.log, which you’ll find in MAMP/logs.

At line 23, we’re outside of the options declaration. Line 23 uses Dropbox to create a Chooser button that when pressed will pop up the Chooser with the right options set. “With luck, when you load it, you’ll see a Dropbox button sitting there.”

The button exists but not on your page. For that to happen, you need line 24 to tell your page to find the div with the id of “DBbutton” and to insert the button into it as a new last element. (Since there are no elements in that div, the button becomes its only element.)

All this happens before your page becomes visible. With luck, when you load it, you’ll see a Dropbox button sitting there.

Now onto the PHP.


Create a folder named “php” in the same directory as your HTML file. In it create a file called “downloadDropboxContents.php”.

Here it is:





$src = $_REQUEST[‘src’]; // url


$filename = basename($src); // get the file’s name


error_log(“SRC; $src – FILENAME: $filename”);


$dir=”Downloads”; // set the folder to download into


// create the pathname for the downloaded file


$downloads = $dir . “/” . $filename; // md5($src);


// get the contents of the download — YAY!


$out = file_get_contents($src);




// put the downloaded file there


file_put_contents($downloads, $out);


// repeat the contents out loud


echo $out;




The comments should tell the story. But just in case:

Line 2 picks up the data we’ve passed into it. $src now should have the URL to the Dropbox file.

Line 3 gets the file name from the pathname. We’re going to need that when we save the file into our designated folder (which is “Downloads,” which you may recall, we created a symbolic link to in our php folder.)

Line 4 optionally writes the Dropbox URL and the filename into the console (see above), just to see where we’ve gone wrong this time.

Line 5 specifies what folder to put the downloaded file into. Remember that it has to be within the realm your web server counts as document root. Hence the symbolic link to Downloads in the php folder.

Line 7 creates the path name to that download folder by appending the file name to the path, with a “/” in between them.

Line 9 copies the actual damn contents of the downloaded file into a variable I’ve called “$out”. Line 10 checks the content. You probably want to comment that line out.“Line 14 reports the contents back to the “success” function…”

Line 12 writes the content into the download directory.

Line 14 reports those contents back to the “success” function in the JavaScript. It will there be captured by the variable “cont” in line 11.

That’s it. I know this is sub-optimal at best, and probably far more fragile than I think. But it works for now, at least with simple text files. And I couldn’t find anything at this level of beginnerness online.

I’m sorry.

1 Comment »

October 4, 2015

This blog has gone spamtacular

In August, the comment section of this blog was hit with 13,000 spam messages, which was at the low end of its normal 25k-35k range. At least this is what Akismet tells me. The number of actual comments is usually in 30-50/month range, I think.

In September, my comment sectionss got 186,998 spams. This has driven up my hosting costs rather spectacularly.

My host, — very reasonably priced, a little geeky to use, which is not a bad thing — pointed this out to me. I started checking my WordPress plugins and only then found out that my Akismet API key was no longer valid. I have no idea why it stopped being valid, or when that happened, but I’m hoping it was at the beginning of September. I have reenlisted in Akismet.

Being a dolt, I don’t know if using a comment spam filter like Akismet will reduce the hits on my site, or whether it will simply lower the number of bogus comments I have to manually wade through. I will check tomorrow.

I am also willing to accept ideas today.

(I have temporarily closed comments on posts older than 14 days. Sorry. But it’s not like I get a lot of those.)

UPDATE, that afternoon: The support person at MediaTemple suggested replacing Akismet with WP-Spamshield, and adding WordPress Spam Cleaner to get rid of existing spam. He also suggested this helpful article: Hardening WordPress. Thanks, Media Temple support person!

UPDATE, two days later: My comments traffic has dropped down to its usual trickle. Whew! I’m now going to turn back on the ability to comment on posts older than two weeks, and will see what happens.


October 2, 2015

Reason #2,645 to love the Web

Back in the early 1980s—yes, children, it’s time for an anecdote from the Dark Ages—WordPerfect was my writing tool. I was a power user and was quite attached to it. But there were some things I thought they could do better. So, I wrote a four page letter that was (as I recall) very appreciative of the program overall — not a set of gripes, but a fan’s notes. I sent it to the WordPerfect corporation.

I never heard anything back. Not even the form letter I expected.

That was back then.

On my Mac I frequently use Sync2Folders “its techie rawness is one of the reasons I like it”to, well, sync two folders. It does exactly what I want, and it’s free, although donations are suggested. (I’ve donated the suggested €6 more than once.)

In terms of the look and feel, Sync2Folders isn’t slick, and in its functionality it tends towards the techie. But it’s simple enough that I can do the basic things that I want to do. In fact, its techie rawness is one of the reasons I like it: It does a job that’s not trendy, and it does it without gussying itself up.

Also, and perhaps more important, it looks like something that a developer created and put out in the world for free. Which is exactly what it is.

A couple of days ago I got an automated email from the developer, Thomas Robisson when I donated for the third time. I’d like to pretend that I’m just that generous, but the truth is that I’m just that forgetful. So, I appreciated that the developer noted the duplication, told me how to avoid the app’s request for fiscal aid, and reminded me that a single license can be used on multiple computers.

I responded by email to thank Thomas, and also to point out a feature that I’d like and that I’d thought was in an earlier version. I was confident that this was going to turn out to be a DUM— a dumb user mistake — and at least I was right about that.“ The Net occasions the generosity of people like Thomas” Over the course of a couple of emails in which Thomas asked for some basic debugging info, it turned out that, yes, I had simply missed the button that did what I was asking for. D’oh.

I know that the Internet is the defiler of youth and the death of civilization. But it also occasions the generosity and creativity of people like Thomas.

Further, before the Net, there was only the slightest chance that a user and a product creator could engage. And if they did it was likely to be in the stilted, inhuman voice of the Marketing department.

So, thank you, Thomas. And thank you, Internet.

Be the first to comment »

September 30, 2015

The miracle of the one network

The Open University of Catalania just posted a very brief article of mine about the importance of the fact that Big Data is also Networked Big Data. Upon reading it in “print” I see that I buried the lede.

The amazing thing is that the same network that connects our machines also connects us. This enables a seamless conversation: “if you can get at the data, you can get at people talking about the data”if you can get at the data, you can get at people talking about the data.

Not only does the same network connect the data and the people making sense of the data, but layers of interoperability have grown on top of it. Increasingly the data is accessible in ways that make it easier and easier for humans to mash it up. And, of course, the sense that humans make of those mashups gets expressed in ways that are interoperable for humans: in language, with links.

That we take this awesomeness for granted makes that awesomeness awesome.

Be the first to comment »

September 29, 2015

BREAKING NEWS: The New Republic runs an article that does not bash the Internet!

Stop the presses!

The good news is that the New Republic seems to be making an effort to include articles about race that are not by white liberals — not that I have anything general against white liberals since I am one . The even better news is that that article credits the Internet with enabling a flowering of African American intellectual thought, rather than the magazine once again (and again and again and again) thinking it’s being oh-so-daring by criticizing the Net as the source of all that is dumb and crass.

In “Think Out Loud,” Michael Eric Dyson argues:

Along with [Ta-Nehisi] Coates, a cohort of what I would like to call the “black digital intelligentsia” has emerged. They wrestle with ideas, stake out political territory, and lead, very much in the same way that my generation did, only without needing, or necessarily wanting, a home in the Ivy League—and by making their name online.

He describes how “the Net enables these voices to be heard”the Net enables these voices to be heard, and how it helps them to form and pursue their ideas through community and social engagement. (It’s a great example of what some of us would describe as the networking of knowledge.)

And, in a generous way that embodies the best of the Net, Dyson in this article is using his position as a well-established voice to give a boost to the upcoming cohort—one that notably includes many women.

Nicely done all around.

Be the first to comment »

September 25, 2015

Facebook now 0.1% less Orwellian

We should be grateful that Facebook has renamed its Internet access service from to Free Basics by Facebook. The idea is that if you’re in the developing world, you’ll get access to the “Internet” which is really access to Facebook and all that it permits.

Calling that arrangement “” was as Orwellian as marketing gets, like advertising Snickers as a “lunch bar.” No no no. A Snickers bar may be delicious, and may even give you enough of a burst of energy that for the final fifteen seconds of your Powerpoint presentation at the weekly status meeting you have an overbearing confidence that alienates your boss’s boss who happens to have dropped by, dooming your long-term prospects at that company, but it is not lunch. It lacks all the essential properties of lunch, even if you may at some point eat one because you forgot your lunch and your wallet and have no friends who will share with you.

The Facebook service is to the Internet as Snickers is to lunch: a poor replacement that lacks all of the essential elements that make a lunch a lunch and the Internet the Internet.

The new name has the advantage of sounding like an hypoallergenic mascara that’s hired Christie Brinkley as its spokesmodel.

Be the first to comment »

September 24, 2015

Feedburning like it's 2004

Oddly, I’m trying out the Feedburner service that lets you subscribe to this blog and have new posts emailed to you once a day.

The real point of this post is to see whether I’ve set it up correctly.

Be the first to comment »

Next Page »

Creative Commons License
Joho the Blog by David Weinberger is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Creative Commons license: Share it freely, but attribute it to me, and don't use it commercially without my permission.

Joho the Blog gratefully uses WordPress blogging software.
Thank you, WordPress!