Coding, Cooking, and other stuff

The Modern Web by Peter Gasston is a series of quick, concise summaries of new and upcoming features that are part of the HTML5 standard, as well as several new browser features like CSS3 that are often lumped in wth HTML5 (a shortcut I will use for this review in the interests of brevity.) The book opens with a review of the basics of the HTML 5 spec; there’s nothing new here for an experienced HTML 5 developer, but it’s an excellent introduction for a new web developer or one who can (and still is) writing the 4.01 DTDs from memory.

From there, the book breaks the components of HTML 5 into several general topics, such as document structure, CSS3, and the new HTML 5 APis, and talks about the new features of each, as well as discussing the competing standards where they exist. While the author certainly doesn’t hold back from expressing his opinion, particularly when there are competing standards, he’s very diligent about separating technical information from his views.

The book’s mosts useful sections are probably the chapters that deal with the mobile web; chapters on device-responsive CSS design, accessing device apis like battery status, vibration, and camera functions, and a quick review of the different strategies behind developing applications for mobile devices will give any developer the basic knowledge necessary to start making decisions and writing code.

Structurally, each chapter of the book is self contained, with a quick introduction to the topic, details about the feature, a summary, and resources for further reading and links to related content. It’s formulaic, and the introduction and summary blocks get awfully repetitive (and so the summary feels like padding) but it also means you’re not flipping through the book when you need some quick information on a given topic. While a book like this is often out of date before it even reaches the printers, much less by the time it reaches readers, Gasston has done a good job of discussing the main paths that future development could take, which should increase its shelf life as a useful book. If you’re looking to get started in modern web development, The Modern Web is a great book to read.

The government argued the court should dismiss a lawsuit brought by the families of American citizens killed in Yemen in 2011 by targeted missile strikes. Justice Department lawyers argued the court was barred from hearing a case that would require an assessment of sensitive military and political issues far outside its purview and ability to review.
U.S. District Judge Rosemary Collyer repeatedly expressed concern that the government’s position would essentially strip U.S. citizens abroad of their constitutional rights. Deputy Assistant Attorney General Brian Hauck argued there was a difference between having a constitutional right—which he said could be protected by the executive and legislative branches—and being able to make constitutional claims in court.

I am appalled.

The government’s argument here is basically “you have whatever constitutional rights we decide you get to keep.” Given the administration’s history of dodgy answers to the “would you strike at US citizens on US soil” question, that statement can’t even be qualified with “when overseas.”

Lets be clear here: all the evidence points to Anwar Al-Aulaqi being a very bad man, and for all I know the two kids with him were to. But all I know is what the administration has agreed to talk about *after* they blew them all up.

The US “War on Terror” has become an exercise in terror, killing people we don’t like without warning, without due process, without an imminent threat.

We have to be better than our enemies. Otherwise, what’s the fucking point?

I love my country
By which I mean
I am indebted joyfully
To all the people throughout its history
Who have fought the government to make right
Where so many cunning sons and daughters
Our foremothers and forefathers
Came singing through slaughter
Came through hell and high water
So that we could stand here
And behold breathlessly the sight
How a raging river of tears
Cut a grand canyon of light

This video is just over an hour long, but well worth every second. He makes it understandable and funny enough that you don’t cry.

“Democracy is asset insurance for the Rich–don’t skimp on the payments! That’s what was going on in the 20s and that’s what’s going on today. Redistribution and debt is reinsurance for Democracy and austerity is anorexia for the economy. That was what was learned by 1940. Oh how we forget.”

Good Idea: coming up with a drug to help women with sexual dysfunction, even if it’s inevitably going to be branded as “Viagra for chicks.”

Bad Idea: doing it with a drug designed to make women horny and lower their inhibitions. Because that won’t ever end up spiking someone’s drink.

But that’s what some idiot is trying to do, according to this article. Better yet, said idiot decided to make drugs because he got dumped. “The breakup inspired a lifelong quest to comprehend female emotion through biochemistry and led to his career as a psychopharmacologist.”

There are so many things wrong with that sentence, I don’t even know where to start. But somewhere, there’s a woman torn between knowing she got out while the getting was good and thinking maybe she should have taken one for the team.

Even better is how they want to make sure that their drug to make women want sex and not care about the consequences only works so well. “Companies worried about the prospect that their study results would be too strong, that the F.D.A. would reject an application out of concern that a chemical would lead to female excesses, crazed binges of infidelity, societal splintering.”

Because it’s OK for women to want sex, but they can’t want it too much.

I know, Facebook isn’t alone in collecting and collating data on people.[1] But they’re the most obnoxious about it, and the only ones known to keep collecting data on people even after they’ve been told to piss off. Someone tagged me in a photo on Facebook once, so Facebook ‘helpfully’ emailed me about how I should log in to the account they created for me and see who else had tagged me, etc etc. My only option was to tell them to stop emailing me about it; there was no option to delete the account, or to stop them from collecting and using information about me.

Fuck Facebook.

[1] I’m actually in the process of breaking my Google Habit as much as possible: “customized” results for searches are just about useless–I actually had one customized result that hid the result I was looking for–and while Google+ does a lot of things better than Facebook, they also do some really annoying stuff like not let me turn chat off, and have taken the “minimalist interface” theory to absurd extremes.

Is it possible to “spoil” a technical book? Well, if so, here’s your spoiler warning.

The most important lesson from “Think Like A Programmer” is simply this: “when faced with a problem you are unable to solve, you reduce the scope of the problem, by either adding or removing constraints, to produce a problem that you do know how to solve.” It’s a simple concept that should be engraved on every surface a beginning programmer sees. Learning to do that is possibly the most important part of turning technical knowledge of a programming language into the ability to solve problems with that knowledge. Every problem can be broken down into smaller pieces, and eventually you’ll get to a point where the problems are simple enough that you can solve them yourself or quickly look up a solution, and then start bolting those solutions together until you have a passable solution to the original problem. (It may not be the most efficient or bug free code, but writing code is like all other types of writing in one fundamental respect: write something, even if it sucks. You can improve it later, but having a first approximation is the most important part of a project.)

The above quote comes from the first chapter of the book, which focuses on problem solving methodologies rather than actual code. This was the most useful part of the book for me, not just because it laid out several simple strategies for attacking programming problems, but because it was language agnostic. The rest of the book, unfortunately, isn’t.

The programming examples in the book are all done in C++, and while they’re usually simple enough that anyone with a basic understanding of modern object oriented programming can follow the examples in the book, being able to attack the problems in that language is a completely different matter. I was often able to approximate the exercises in languages I am more familiar with, but in doing so, I didn’t always end up solving the same problems that the exercise was supposed to cover.

As a programmer who works mostly with web projects, I would have liked to see more variety in the languages used; it would have only added a few pages to provide code examples in javascript or python or java, in addition to C++. Only a small portion of the book deals with issues that are specific to C++. But given Spraul’s apparent belief that “real programmers” only use C++ (he writes in the introduction that “C++ is the real deal—it’s programming without training wheels”) such a change seems unlikely.

Regardless, the book is still worth a read for programmers looking to break that barrier from having learned about programming to actually being able to program something (and probably hugely useful to programmers looking to make that jump in C++), and the first chapter should be required reading for every introductory programming course. You can buy the book from O’Reilly (and if you sign up for an account on their site first, you can get this book as part of their buy one ebook get one free offer.)

“Any member of the general assembly who proposes a piece of legislation that further restricts the right of an individual to bear arms, as set forth under the second amendment of the Constitution of the United States, shall be guilty of a class D felony,”

Coding, Cooking, and other stuff

Connect with:

Search for:

Quotations

What makes my jaw drop is that people today should base their lives on such an appalling role model as Yahweh–and even worse, that they should bossily try to force the same evil monster (whether fact or fiction) on the rest of us.