Skip to main content

Posts

My Comment on FCC Proceeding 14-28

Today I submitted my comment to the FCC regarding proceeding 14-28, which would allow cable companies to give priority to internet traffic from select web sites. This will have repercussions for many companies online, especially Google, Hulu and Netflix. By allowing providers to slow down or speed up access for specific sites, cable companies will be allowed to extort streaming content providers to pay for bandwidth. Here is my comment (confirmation number 201464576817): Please reconsider your decision to allow ISP's like Comcast and Time Warner to slow down traffic to some sites. This rule change will give ISP's a new source of revenue but will not benefit the general public. Lobbying dollars seem to have motivated regulators at the FCC to create policies that will ultimately degrade services enjoyed by the general public and hand windfalls to cable companies.  Access to the internet should be regulated as a utility, like electric power, natural gas or water. The FCC...

Cargo Cults: Agile Development As Social Subversion

This morning my newsfeed came up with an interesting read from Gizmodo, an article interpreting cybersecurity as a war against haunted objects. The idea of securing the "internet of things" as an exorcism is rich, nuanced and perhaps even poetic. I'd encourage you to read it, as it is unusual to consider technology through a spiritual lens. While reading the article, I was reminded of another lens through which I view software development, the cargo cult . These spiritual movements originate during and shortly after World War II, in Melanesia. In their initial contact with western technology, the first people of that region saw spiritual significance and, through imitation, sought to gain the material wealth and social place possessed by occupiers. Their rituals sometimes involved building (non-functioning) radios, airports and vehicles from wood. They believed such tokens would enable their ancestors to send cargo (material goods) to them from the afterlife. I think on...

PhantomJS and JavascriptExecutor

My main project at TheStreet is a web scraper, and it relies on PhantomJS browser to run user interactions, make DOM adjustments and take screenshots. Taking screenshots is an area where PhantomJS excels over the other Selenium WebDriver implementations. The thing that works so well for PhantomJS is that the viewport is not constrained to a screen, so it takes screen captures that are as long as the page content is. I just set the viewport to 1366x1 and let the content extend the height of the screen. One thing that doesn't work well is rendering fonts. Running on AWS the rendering of fonts is extremely unstable. The same site can render as a serif or sans-serif font, and it's not clear why. The problem with this is that it makes the screenshots very different even if the site isn't changed. I'm using pixel-level analysis of the screenshot to detect changes, so this sets off lots of false positives. PhantomJS uses the JavascriptExecutor interface to allow arbitrar...

Backbone.js / Marionette.js Complex Defaults

I just worked through an interesting bug in a front-end single page application. The system has the ability to create new items, and one of the attributes of the item is an array of ids. When I created a new item after working with an existing one, ids from the older item were showing up in the new one. Similar issues were happening in several places in the codebase for that interface. What I eventually realized is that the default attributes are passed into instantiated objects directly -- they are not deep copies. So my code was simply modifying the existing array rather than overwriting it, and as a result my old and new instances were both using the same attribute array of ids. The takeaway lesson is that complex defaults, such as arrays or objects, should be set in the instantiation method so they are distinct in distinct instances.

IntelliJ Annotations and Maven

IntelliJ has a code inspection feature that is designed to prevent null pointer exceptions based on static code analysis - actually a kind of interesting idea, and the folks over at IntelliJ have recommended that the annotations be included in the Java SDK in the future. I noticed this feature when I was cleaning up some code today and found a cryptic error message in the IntelliJ code inspection tool: Not annotated method overrides method annotated with @NotNull The community documentation for IntelliJ has a nice explanation of this feature , and there is a Maven repository available. The dependency for version 12 of IntelliJ is the following: <!-- STATIC CODE INSPECTIONS -->  <dependency> <groupId>com.intellij</groupId> <artifactId>annotations</artifactId> <version>12.0</version> </dependency> Adding the @NotNull annotation to my overridden method and to a parameter seems to have cleared up the issue. I'm ...

Proxy Voting Systems

As a senior-level software engineer, I work with political systems every day. When I design a software system, relationships between people drive system requirements - the needs of the stakeholders need to be balanced so that the company can create value. The right system can improve how people work together and reduce infighting. This may include by coordinating user activities or surfacing new analytical information. Usually the kinds of systems I work with and am most interested in involve business activities like extracting data from websites, publishing news articles, selling products or tracking resource allocations. I don't normally blog about government politics. The occasion for this post is the reopening of the federal government after over two weeks of shutdown and the last-minute aversion of a default on US sovereign debt. On the one hand the crisis was created by a populist movement with some important ideas - but on the other hand the current political system wasn...

Generating a Self-Signed SSL Certificate

I recently switched some web services to use SSL, and I was surprised that I couldn't find a good non-interactive script to generate the files needed for Jetty and other Java containers. After working my way through writing the script, I have decided to share my approach. This script generates a SSL subdirectory of whatever folder it lives in, and to that directory it adds a password file, certificate and a Java-friendly PKCS12 version of the certificate. And then I have my Maven build process copy the generated files into the base of my classes directory. The embedded Jetty instance needed an input stream of the PKCS12 file and the contents of the password file to create a SSL connector. Reading from the classpath can be a bit tricky - I should post about that later. From past experience, I think Nginx also requires the certificate file when configuring SSL.