A vote that isn’t for the Democratic nominee in November is a vote for Trump. Allow me to explain.

What I mean is this: It is the duty of every person who identifies with American values to stand up against him. And there is no other vote, other than the D one, that conveys this vital message. This message is what America is all about — from top to bottom, from creation myth to modern-day battlegrounds — and an opportunity to not voice affirmation in America is the kind of moral cowardice bullies like Trump prey upon.

There never before has been the embodiment of the opposite of American ideals as represented in the Constitution as we have in Trump. This stems from several observations. He does not believe in Freedom of the Press, nor Equal Protection. His leadership style is autocratic: He frames his candidacy in terms of dominance. He won’t participate in one-on-one debates. He advocates for an America in which the President has vastly expanded powers. He has made it known, again and again, that people who stand in his way risk getting “hit” or cast aside in some form or another. This is the kind of guy that, if ever he comes to power, would take revolutions to remove.

What about third parties? Allow me to first digress as to the unworthiness of the candidates. Take Gary Johnson, whose economic policy rests on his false assertion that the US is bankrupt. He points to the roughly 20 trillion dollars in debt as evidence of this, to which anyone can point to our GDP. Interest on debt payments is only about 5% of our GDP, which means we can easily pay back our debt. Which means we are not bankrupt. Other than that, the Libertarian Party’s convention, if you believe this write-up, sounds like a scene straight out of South Park. We can’t take him as a serious candidate with that party behind him. Jill Stein is an anti-vaxxer and praised the Brexit vote, with practically no party apparatus, either.

But the real reason a vote for third parties should be off the table: Imagine the day after election day, and Hillary barely wins, in great part because of third-party voting activity. That means that we have four more years of the same brand of anti-Americanism, in which the next guy (perhaps even Trump Jr.) tries to get that number closer to 51-49 in their favor. That’s why we have to make this a landslide. Even if you don’t like Hillary. Plus, heavy third-party voting activity is probably the only pathway that results with Donald J. actually in office.

Finally, I don’t for a second think Hillary is the corrupt, above-the-law liar that people make her out to be. She is a genuine professional and does her homework, which the debates proved. I observe that those who do think of her as some monster tend to display a “guilty until proven innocent” attitude towards her. But even if that is what you think — if you disagree with me on that — then do you really want Trumpism to be the one that nails her into the proverbial coffin? If the point is to find “justice,” coming at the hands of autocratic demagogue is completely self-defeating. Throwing the baby out with the bathwater.

Trump is the biggest danger to American values and everything we stand for. Voting against it isn’t a “lesser of two evils” scenario, it’s a zero-sum game where either evil or love will prevail. Vote your conscience.

What I mean by “easily” is how to do it quickly and efficiently with code, which is to say that I don’t mean doing it via point-n-click. I mean by coding stuff up. If this puts you off, then exit right now, because this stuff assumes familiarity with computer science and programming.

I am writing this post because I can’t find anywhere online that combines all the conceptual overhead needed to do a project that makes a bunch of dynamically-generated PDFs, like the one I just completed does. (Making school reports for the end-of-semester grades and comments.)

Wouldn’t you know it, but you can make pixel-perfect PDFs if you already know the web stack: HTML/CSS. There is a command line tool called wkhtmltopdf.org that will take that stuff and churn out your pdf file, which just uses webkit to render it all, and there are plenty of wrappers around that for your favorite programming environment. For me, that’s python, which means pdfkit.

Using wrappers at first can be really perplexing, because there usually isn’t too much in the way of documentation. But there’s a reason for that, because the docs to be consulted should be of the thing being wrapped, not the pretty wrapping itself.

I always use Linux for my programming environment, using git, vagrant and virtual box, and never my actual Mac hosting system. So installing pdfkit/wkhtmltopdf took a bit of research, since installing it with a package manager like apt-get only gets you a crippled version of the software.

Install that, but instead of using apt-get package manager, use dpkg as shown here.

Now you should have the full version of wkhtmltopdf, which gives you features like headers and footers, and you can install pdfkit for your programming environment as usual. (Python: “pip install pdfkit”).

Now, you just have to format things using HTML and CSS, but here’s a key tip to make the dev process much faster:

Use “media=screen” and “media=print” to define two different CSS source files. I like this because that way you get a browser-friendly and PDF-friendly version in one go.

Debug the print version in your browser by using the emulation mode and selecting the print media. For Chrome, instructions are here.

In your code, be sure to tell wkhtmltopdf that the print media should be used to render, with the ‘print-media-type’ option. In Python, that means having a key with the name ‘print-media-type’ (an empty string for the value is fine) in the options dictionary.

This is enough to get started, but if you are going to be making a whole bunch of them based on any set patterns, then you’ll need a way to get them generated quickly. That’s where a web app comes in handy. I like pyramid best.

The idea is that you define a GET request with your web app so that it spits out different HTML depending on whatever data. This is the basic process:

Have your database contain the data you need, either a fancy SQL one or maybe just a csv text file. Whatever.

Make the GET request contain some key or other information that looks up the unique data in the above database, and then

Send that data to your template system of choice.

The template contains all your HTML/CSS and provides the additional ability to produce certain tags depending on the content. I use Chameleon just because it makes the most sense to my brain.

Okay, so conceptually, we know we can build the data needed to make the PDF, but then how to actually tie in that stuff with wkhtmltopdf? I did it this way:

The GET request doesn’t just spit stuff back to the browser, it actually saves it to disk first, and returns that saved file as the response.

Write a simple program that loops through all the possible unique urls that will generate the necessary PDFs.

Collect your PDFs wherever you saved those files.

In the end, I ended up being able to format, and re-format to no end, information as complex as student data and their reports, complete with nice-looking tables that explained their grades, school information, per-page headers and footers, the works.

Right. So over the Christmas break, some Mac OS X geeks were obviously in a reflective mood because developer blogs exploded with the meme that Apple software just ain’t what it used to be. It all started here, and the best-of-breed collection o’ links is here.

Gist? Apple software may be suffering from a bit of a lack of build and quality assurance, but it depends (on who you ask).

What did everyone miss? The Finder. How can people just ignore that sucky Finder? If you are wondering what the Finder is, look at your dock, the smiling blue thing on the left, or at the top. That’s the super sucky ugly Finder. What it does is let you navigate and get at your files to open, copy, and other stuff. What it also does is suck:

Way too many click involved to do common operations. We have internet- and cloud-based files coming at us left right and center, but the feature of sorting by “Date Added” is hiding behind a preference setting! Imagine your Downloads folder sorted by date added. Think about it. It should do that by default, people.

The other thing is that user interface idioms, like the Trash Can, have been around for a very long time, proving that improvements just aren’t a part of the deal. Features like LaunchPad, Mission Control, and the Dashboard* are just grafts on top as an afterthought. I could go on, but for me, the death knell that not enough iterative development has been done on the Finder is that the Save dialog box still acts like the Finder’s bastard son. Says the dutiful user: “I would like to please reorganize my folder structure so I can save this in the right place.” Save dialog box replies: “No, thanks, but my horrible Dad can do that. Please forget what you were doing and go there instead!”

The gist is that we rightfully expect more from Apple software, and the fact of the matter is that it is Apple’s reason for existence: Take something that could obviously be way better and design the hell out of it. I’m kinda shocked that the whole FTFF thang has dropped out of the conversation.

Twirl… THWAP went the towel, inspired by boy locker rooms. But there weren’t any showers or sweat, just the wide-gapped jaws of gleeful teenagers getting the Grandma treatment. She was at it again, my strong Grandma, probably saying “No junk!” or somesuch epithet that she conjured up that very moment; and me, marvelling at the spectacle. She passed this week, nearly ten years after one of her good days, our wedding day. She was an inspiration at interactions, people just wanted to talk to her everywhere she went; that the universe contains irony demonstrated by her ten plus year battle with the horrific Alzheimer’s. Memories? Plenty. I was in high school and some guy whose name escapes me but whose words remain implanted as an oral souvenir I file under “This is a day that I grew up” remarked that “Grandma” was the most popular kid at school. Before that day, I knew her as just Grandma, and then I realized she had become everyone’s.

Okay, so since Friday afternoon I’ve been playing with the very very interesting Google Apps Scripting (GAS), just because it was sitting there and I didn’t understand any of it, and I definitely saw its potential.

Then I went to a GAFE summit conference (I’m an ESL teacher by day) and saw what cool stuff cool people were doing, and I figured it was worth a bit of digging around. So I made a script. It was a pretty simple one, it took info out from an API and added rows in a sheet.

It took me three days to write. I blamed the development environment. I asked the author of the insanely great and probably insanely-difficult-to-maintain Docopus, if there was any legitimate options out there that allowed unit tests and proper debugging.

So I set out to figure out A Better Way. I hated that I had to click on a play button and not see immediate logs from my running program. I’m used to writing python code and seeing results immediately, no waiting around. Maybe it was because I am an amateur JS coder. Whatever. I hated it.

First of all, GAS scripting at the moment, as it is now, from within the browser feels a tick more mature than GUI scripting with AppleScript. Have you ever tried GUI Scripting with AppleScript? Just don’t. It’s a horrible environment, filled with traps and pitfalls. There’s like three guys in the world that do it all the time, and they know everything, and they dominate the help-focused mailing lists, okay so I’m exaggerating, but not all that much.

Okay so there’s no “second of all.” Anyway, so I sought out to figure out a way where I could code up things in JavaScript on my local machine, not on the browser, and when I was done could copy and paste the script. I’ll leave the problem of git-like push/pull for a later date.

Here it is:

You can install node.js and use its require() function in which you define dummy objects that have the same name as those that you use in the GAS API, such as Logger, and define methods that do the terminal equivalent. So that Logger object’s log method would just call console.log. So a Spreadsheets object whose getActiveSpreadsheet method returns a Sheets object which is just a fancy container for an array. That Sheets object’s appendRow() function just pushes to the contained array structure. Simple as.

This will also allow unit testing and other nice things, because making dummy data that just tests integrity of the logic and the assumptions relatively painless. And since you are on the local machine, typing is fast 🙂 Also, since you’re using node.js, you have full access to a completely functional command-driven debugger.

Fascinating, is that in “pure” javascript there’s no way to include files, because that’s usually done through the html layer. And if javascript was ever going to grow up and be a Modern Programming Language it would have to solve that hiccup. Nice to see that node.js has.

Now. Not sure how this will scale for scripts that use all sorts of GAS API objects. I reckon it wouldn’t be too much fun to have to make new ones for each project, but this has to be better than waiting around for a Google Doc to open just so I can click on Script Editor just so I can choose the play button and wait 10 seconds to launch, and wait for it to finish before I see any log items.

Also. It’s not strictly copy-n-paste because you still need some variable assignment boilerplate, but the define function removes the vast majority of the magical “on-the-local-machine-only” code away from that blasted browser.

Think back to a multi-day conference or long PD day you had and remember that feeling by the end of the day – that need to just disconnect, break free, go for a run, chat with a friend, or surf the web and catch up on emails. That is how students often feel in our classes, not because we are boring per se but because they have been sitting and listening most of the day already. They have had enough.

Two years ago I went on a conference that was heavy on information overload and so instead on the last day I “had enough”, and instead spent the day in a coffee shop where I met other teachers who were using some online tools that I knew something about and we shared. I remember the comments, and even took some of those and developed stuff based on what I saw. They were English teachers using Moodle, and it was the best thing that happened to me during the whole conference, and it happened when I literally walked away from it.

Sitting around all day taking in information is hard. I often complain to my wife about it when it happens, so I always think that I’m probably a bit more sensitive than others are, but I think we can all relate to having a PD day where it didn’t actually felt like you did anything, and when it’s over you are so completely wiped out from it all anyway.

Hopefully my use of humor in the classroom breaks up things quite a bit. But still, this post has opened my eyes a bit. That’s it. I’m going to do a lot more drama in my lessons from now on. <grrr></grrr>

On any given day, at my workplace, I use google services probably billions upon billions of times. Non-existing numbers like that is nice to have, though … isn’t it? … because what is really meant is that I use Google for very nearly every click of the mouse, a hit of the return, and I quickly lose count, and that’s the utility of using silly numbers (c.f. “zillions“).

Anyway. So I use Google services quite a bit. Our internal DNS server just forwards to Google DNS, so then I’m probably using Google Services 20 times per web access at least. In case that stuff right there just went over your head, I’m just pointing out that every time I visit a website (=1 web access) there are 20 additional “websites” that are accessed after that, because any one website has dependences on other services.

Which brings me (finally) to the article I just read, “Peak Google“, which points out that Google may well be like IBM back in its heyday, being really profitable and really scary, but in fact with its business model it actually probably has peaked, and we all know what happens when things peak. It’s a more sophisticated argument than that, so be sure to take a close read yourself.

It’s fascinating to me because to my mind the only truly sustainable software model is that of Open Source. I mean, they recently found a bug that was 25 years old and everyone just sort of laughs it off. Yes I know that’s a pretty unsophisticated summary of what happened with the Shellshock bug, but that vulnerability really is an 11 out of ten, but the world goes on because generally it’s a sustainable model. Imagine if Apple software had a bug like that. Babam.

With Open Source, no one gets fired, no stocks to worry about, just fix it, and get everyone to patch it. Probably it’ll cause adjustments in the community so that such a thing can happen again (alas, but it will!). On the contrary there are a zillion lines of Google code locked behind a company wall and what happens to those if-slash-when Google is just an IBM-of-today rather than the IBM-of-the-eighties?

Early days, and all that, but one of the main threads that is coming out in the aftermath of the flight MH17 is that Putin provided these pro-Russian forces with some pretty advanced weaponry. Take a look at Josh Marshall, for example, whose key paragraph is:

The audio tapes posted by The New York Times might as well be from some future Russia-based version of Waiting for Guffman or Best in Show, a comical rendering of rustics and morons stumbling into an event of vast carnage and international consequence mainly because they’re hotheads and idiots – the kind of people no one in their right minds would give world class weaponry to. It’s like finding some white supremacist/militia types on their little compound in the inter-Mountain west and giving them world class missile launchers and heavy armaments.

Not sure what evidence there is that these guys are morons and/or hotheads, and that no one in their right minds would give weapons to, but America has been giving some pretty stupid people, like, say, Saddam Hussein, and any other pro-Whatever forces some weapons to do some stupid things with.

I’ll leave that train of thought, first because America didn’t directly give Hussein actual weapons, but instead arranged to make sure he had some, and secondly because the bigger train of thought is this:

All this weaponry that is laying around, eventually will be put into the hand of a “moron” or just plain troublemaker, who could do some pretty stupid things with it, including the initial act of a war that results in the death of our very planet.

So people are thinking that there will be an iWatch out from Apple come this October. I haven’t seen a picture of anything that I think:

I would wear, or

That someone else would wear, either (for more than a week)

If Apple is doing an iWatch, given their design process and philosophy, this is what it will be:

It will look more like clothes than a gadget.

Bracelet, or necklace-like. In other words, not a watch.

Water proof to x feet. Think swimming and showering with the thing.

No camera at all. Not in version 1.

Connects to your other devices, an extension of your other devices.

Minimal user interface, if any at all.

I don’t for a second think that Apple is going to release a product that will have an X or Y feature that everyone will want. Apple designs from the ground up, in other words, first and foremost it will be something smart that is worth wearing once or twice, and then after that there will be some killer functions that people will keep wearing it for.