«
  • People Who Insist on Overly-Precise HTTP Success Response Codes

    Per specification HTTP responses include a numeric code to indicate status. There are a few broad categories: informational, which you'll never see in practice, success, redirection, failure because you, the client, didn't do the right thing when issuing the request, and failure due to server error. Some codes are much more commonly employed than others: 200 for success, 404 meaning that the resource you requested doesn't exist, 500 as a generic bucket for any sort of server-side failure. As you stroll through a life of building glue code and ad-hoc API clients, it occasionally becomes important that there are in fact numerous different response status codes implying success. While 99% of the world's API and web application engineers seem happy to conform to the practice […]

    Read more »

  • A Fun Little Issue with ICU4J MessageFormat

    The International Components for Unicode (ICU) project provides localization tools for C (ICU4C) and Java (ICU4J). It was while working with IC4UJ 55.1 in a Scala project that I ran into an interesting - and briefly very aggravating - issue, outlined herein. Among the many items in the ICU4J toolkit is an improved replacement for the standard MessageFormat class. MessageFormat allows the creation of patterns and the substitution of variables. Among these patterns are those used to handle strings containing numeric variables in which plurality must be accounted for. This is a common situation when localizing content. A simple example is as follows, suitable for languages following English-like rules for singular versus plural numbers: {count, plural, one {{count} thing} other {{count} things} } The formatted […]

    Read more »

  • Listing Large S3 Buckets with the AWS SDK for Node.js

    A number of posts here exist because I don't like redoing the same small piece of functionality over and again. When you're out there consulting you don't take the inevitable swathes of glue code with you when you leave, and you don't tend to have access to it down the line. There is always some commonplace implementation detail for an API or a third party package that you will forget to take notes on or fail to recreate for your own toolkit at the time - and you only realize a year later when you find yourself having to spend a few hours reworking from scratch the same small annoying functions and rediscovering the same small annoying pitfalls. Wait, didn't I do this last year? […]

    Read more »

  • The Cosmological Noocene

    Here is a sketch of the future, without any specific dates assigned to its milestones. The human mind is reverse engineered. It is run in software. A million variants and improvements are constructed. Molecular nanotechnology is established and becomes a mature industry, available to everyone. Anything and everything can be built efficiently given the raw materials and a spec. From an economic perspective those who thrive are those who make the most efficient use of the matter that they own, and those who gain control over the most matter: quality versus quantity shift back and forth in the degree of advantage as the ability to accurately and rapidly manipulate large masses of matter at the atomic level and lower grows. Matter is most economically efficient […]

    Read more »

  • Freedom versus Security in Devops

    I've worked with organizations in which operations support took the form of a human black box that responded to any request with "no", and in which experienced development teams were forbidden from launching a server or opening a cloud account to try something out. It could take months to request anything new. I've also worked with organizations in which every individual engineering team was responsible for managing its own devops support, all the way down to arranging technical vendors and managing cloud accounts. In the former case, there is a huge invisible ball and chain attached to progress. In the latter case there is duplication, competition, and the need for people to spend time on integrating disparate internal efforts that were performed in complete isolation […]

    Read more »

  • A Provisioning Bash Script for a WordPress 4.* Ubuntu 14.04 LAMP Server

    The bash script provided here is suitable for the initial provisioning of an Ubuntu 14.04 server, installing the bare minimum needed for a WordPress installation, including WordPress itself. It was originally intended for use with Vagrant, but will work for provisioning of real servers as well. Once the script completes, you'll find that WordPress is up and running and you can log in to begin customization. The script installs: The Apache webserver with mod_php to run PHP. The MySQL database. Monit as a process monitor to keep things running. WordPress. WP-CLI, a command line interface for WordPress Before running the script, edit the variable declarations in the first section to set the necessary usernames, passwords, and other values. The script offers the option of (a) […]

    Read more »

  • Locking Down a WordPress 4.* Blog Installation

    As is the case for Drupal, WordPress at version 4.* arrives out of the box with a great many default functions, bells, and whistles turned on. If you are a causal user then it is very possible that your blog is even now serving pages and exposing access points that you have no idea even exist. It is rarely the case that you in fact want all of this functionality to be accessible, especially given that WordPress is a prime target for automated attacks. One part of hardening any web application is to shut down or block access to every unneeded component and subsystem, thereby reducing the attack surface. A Starting Point There is a useful semi-official guide on hardening WordPress that provides a good […]

    Read more »

  • Notes on Exporting Large Movable Type Databases

    It is old news now that Movable Type fell off the map in the competition between blogging platforms. Versions 4 and 5 were the last openly available distributions, and can no longer be updated or patched easily. Version 6 is closed, an enterprise product. If forced to pick one root cause for the failure of Movable Type to compete with the likes of WordPress, it would be that Movable Type is written in Perl. The number of people capable of - and also interested in - working in Perl to produce quality plugins and the other tools of an open ecosystem for a web application is small in comparison to those who use PHP, and Perl is so different from PHP that there won't be […]

    Read more »

  • An Example Dropwizard Application with Guice for Dependency Injection

    Dependency injection is a tremendously useful design pattern. From my experience the direct benefits of this pattern are almost entirely realized as a reduction in the cost of building and maintaining good unit test coverage. Being able to swap out mocks and real instances or values very easily makes the creation of test suites a breeze in comparison to some of the alternatives. All the other benefits derived over the long time largely arise from having a far more comprehensive and maintainable set of tests, since the development team were able to do more in the time allotted. There are countless dependency injection frameworks in the Java ecosystem, but here I'll look at Guice. It is lightweight enough to drop into most application frameworks with […]

    Read more »

  • PhantomJS Has Many Uses, But Functional Testing Isn't One of Them

    PhantomJS is a comparatively lightweight headless web browser built on WebKit. When it comes to rendering and interacting with web pages it does everything that any other full-featured browser does with the exception of providing a graphical user interface. You can install it via NPM, meaning that for Node.js ecosystem developers is easy to put PhantomJS in place on build, test, and deployment servers even in more restricted environments. You control PhantomJS either directly via a Javascript API or through a WebDriver interface such as that used by Selenium. So what can you do with a web browser that has no graphical user interface? Take Screenshots PhantomJS is fully rendering pages under the hood, so the results can be exported as images. This is very […]

    Read more »

»