David Herron is a blogger, software engineer, electric vehicle enthusiast, and energy healer.

Into the Evil of the Daleks - S08E02 and OldWho #038

We just watched Into the Dalek, and we have to acknowledge something - the story line references way back into Old Who, to a set of Patrick Troughton (Doctor #2) episodes collectively titled The Evil of the Daleks. In both cases we had a humanizing of Daleks, and Doctor#12's certainty there can be no humanizing of Daleks may stem from the experiences shown in The Evil of the Daleks.

Take a deep breath, don't hold it, we're going into the Dalek (Dr Who S08 E01 E02 review)

Doctor Who is finally back on our screens, and I'm going to squeeze my episode reviews together. It's a bang-up opening for Peter Capaldi as Doctor #12 (or is it #14), so it sure looks like this new guy will do well with the role. As for the content - the main theme so far is "identity". Who am I? Why do I choose this face to show the world? That sort of thing. And then there's the question of "who the heck is Missy"? Heaven? Surely that's a setup for the end of the season, so we'll have to be patient about that.

You can joyfully parse and manipulate URL's in browser-based JavaScript

URL's are not strings, but are a data structure that's represented as a string. How do you easily and reliably manipulate a URL string programmatically? Do you use regular expressions or other kinds of string manipulations? Given all the ways to encode data in a URL, how do you ensure it remains syntactically correct while doing string manipulation? Manipulating URL's with regular expressions is rather difficult because of the format and nature of a URL.

Silicon Valley housing costs are insane, verified by real data

Housing costs in Silicon Valley are insane. Both rental and purchased housing has always have been outrageous, compared to the rest of the country, but the last two years has seen an absolutely insane rise in property values and rental rates. I haven't looked for data on this, but obviously those at the lower end of the pay scale are being priced out of the market.

Fixing broken images when Drupal adds _0 to uploaded file names; filename and filepath differs

druplicon.large_.pngOccasionally on Drupal sites (perhaps only Drupal 6), uploading a file to a file field, or the file uploads area on a node, results in the "filepath" indicating a different name than the "filename". That is, in the data model for a Node, you can attach files in the "uploads" or in a CCK field (in Drupal 7 this is slightly different) and each attached file is an object (or array) containing attributes named "filename" and "filepath".

Easily offload your CPU-intensive Node.js code with simple Express-based REST server

nodejs-dark.pngNode.js is horrible with CPU bound processing, supposedly. Why? Because CPU-intensive algorithms block the event loop from handling events, blocking the Node.js platform from doing its core competency. Actually, as I demonstrate in my book Node Web Development (see sidebar for link), it's possible to use "setImmediate" to dispatch work through the Node.js event loop, and perform intensive computation while not blocking the event loop.

Unit testing Express route handlers in isolation from everything, including Express

nodejs-dark.pngWhen we write unit tests it's good practice to "mock" out extraneous bits to the code being tested. It's almost like the scientific method in that testing, in the unit testing paradigm, means exercising each small portion of your code in isolation if only to eliminate unwanted variables. While there are other testing paradigms, unit testing has its value. A big question for Node.js web application programmers is - how do you mock out HTTP requests for unit testing?

Progress on jQuery-style templates for AkashaCMS (Mahabhuta)

Since last weekend I've been working on Mahabhuta, the new element-oriented template system using jQuery's API, in AkashaCMS. The goal was to verify that it's useful by attempting to implement some important things with it. I'm happy to say that Mahabhuta is living up to what I hoped. I've been able to reduce complexity in AkashaCMS and the path is clear to perhaps removing the Kernel template engine, because the functionality I sought with Kernel is now available via Mahabhuta.

Eliminating duplicates in Views 3 Drupal 6 when the "distinct" and "group by" features don't work

Yes, Drupal 6 is water under the stream except for those of us still maintaining Drupal 6 websites. On one of my sites I'm trying to bring the module status into 2014, because they'd last been updated in 2012 and Views hadn't even been upgraded to Views 3. It was pretty straightforward to generate a Drush Make file to generate updated code for the site. A couple of the Views didn't get properly upgraded to Views 3, and in most cases minor tweaks were all that was needed. But one View had a major flaw - it generated lots of duplicated content.

Major change in AkashaCMS - new model for rendering content, and jQuery as a template engine

I'm about to release an AkashaCMS v0.3.x update that represents a major rewrite of the rendering system, and the addition of support to use the jQuery API on the server side to manipulate rendered pages. Both of the changes are major, and take AkashaCMS to a new level of flexibility. First, Website authors will be able to use any combination of template engine on each page, giving better flexibility over page formatting.

Pages

Short URL

Subscribe to Front page feed