Skip to main content

Posts

Spark Cassandra Connector Tip

We're using Databricks as our provider for Spark execution, and we've been struggling to get the Spark Cassandra connector to work outside of the local development environment. The connector was attempting to connect to 127.0.0.1 even though we were passing the new host information into the getOrCreate(..) call. After working with Ganesh at Databricks support, we figured it out. The realization is that in Databricks, calls to getOrCreate() from a fat jar don't create a new SparkContext object. Thus, the configuration passed in gets ignored. If you want to update the Cassandra host information for the connector, you must update it after  the call to getOrCreate() instead. Add the configuration directly to the context and you'll be good to go!

Where's Greg?

It's been almost two years since I posted anything here. In late 2015, things got really busy for me at Recruitics and, to be totally candid, maybe I wasn't sure what this blog is for. What happened since late 2015? My department moved offices. Twice. We weathered a round of layoffs and rebuilt the teams that were affected. And we've made a ton of progress improving our applications and data processing. I joined Twitter . I became the solo developer of a new integrations platform that now handles over 30% of our data collection traffic and cost tracking. And in two months we launch a free analytics product that will change the competitive landscape in online job advertising. So ... there's been a lot going on for me. What's next for this blog? My original purpose for this blog was to contribute something that other software engineers might find useful. I posted a few technical commentaries on topics not well-covered elsewhere, and I wrote somewhat haphazar...

ReactJS, NPM and Maven

I'm just starting to get into working with ReactJS, Facebook's open source rendering framework. My project uses SpringBoot for annotation-driven dependency injection and MVC. I thought it would be great if I could use a bit of ReactJS to enhance the application. If you're looking for a basic conceptual intro, I recommend ReactJS for Stupid People and of course the official documentation  is quite good. In full disclosure, I still have no idea how to do "flux" yet. As an experienced Java backend developer, I'm pretty decent at hacking Maven builds - which is precisely what this blog post is going to be about. First, a word about how React likes to be built. Like many front-end tools, there is a toolkit for the node package manager (NPM). From the command prompt, one might run npm install -g react-tools  which installs the jsx command. The  jsx  command provides the ability to transform JSX syntax into ordinary JavaScript, which is precisely what I want...

Culture Matters

Yesterday morning, my software engineering team and I learned that we would be moving into subleased office space on the fourth floor. In the afternoon, with little fanfare and only one cardboard box among us, we moved all our stuff down two floors. In full disclosure, I did offer to buy some at Staples across the street, but nobody really felt it necessary. I think our move exemplifies the kind of culture I want to build as we grow the engineering team: unfussy, collaborative, empowered, pragmatic. The job market for software engineers in NYC is booming, so it is surprising to many candidates how much we care about team culture. We've declined to make an offer based on culture more here than anywhere else that I've conducted engineering interviews for. There's certainly a "no assholes" rule around here, but our considerations go deeper than that. Ultimately, we want to hire people aligned with our company's values: Entrepreneurial thinking and actio...

Three Legs of GSD

Recruitics has a culture that celebrates exceptional results.  The expression "get shit done" or more commonly "GSD" has become something of a mantra around our office.  We have GSD stickers and t-shirts. We even have a #gsd message channel where we call out peers who go above and beyond.  When I first heard the phrase, my reaction was not positive. To me it seemed to encourage indiscriminate action and low-quality work. But as I have learned since then, there is a lot of nuance behind the concept - and it goes to the core of what makes Recruitics a unique workplace. In this post, I want to use GSD as a lens to explain a little about our engineering culture. Of course, within Recruitics d ifferent disciplines and teams manifest GSD in different ways: A salesperson who calls a prospect on a Saturday afternoon with a carefully-crafted value proposition.  An account manager who obtains an industry certification that helps her better serve clients. An executiv...

Capture Everything

This week I've started planning for the next version of our data collection system. The key realization for me is that I do not know all the questions we will need to answer in the future. Our current focus is on specific sequences of click events, but in the future we might want to look at browser versions or behavioral patterns related to IP addresses. If we don't capture user-agent, for example, we won't be able to answer questions about browser versions. If we don't capture IP then we cannot look for patterns in IP addresses. We should store data in a way that maximizes the range of questions we can address in the future. In the past few years, the cost of storing data have continued to fall. We use AWS extensively.  Amazon S3 costs are very reasonable and guarantees a high level of availability. Also, lower compute costs and open source tools like Hadoop that process large data volumes have greatly increased our ability to extract valuable insights from data. So s...

Two Months

As a new technology executive, my biggest worry is whether I am focusing on the right issues. My prior roles primarily required technical work, but they mostly involved small problems and small teams. For my first executive position, I expected to focus on organizational issues more than technical ones. Two months in, I think my expectations and role reset strategy were about right. Here are some of the challenges I've been working on so far: Hiring. I'm shifting the organization from being mostly outsourced offshore to a more even onshore/offshore model. Sourcing and assessing engineers for senior roles has been challenging. I'm committed to building a great team. This is my top priority, and so far we've filled two of the four most senior roles. Our offshore people are solid, and I'm really excited about the new people we're hiring. Process.  We need a simple and unambiguous approach for software development. I've been pushing the team to use Jira a...

State Department Invalid SSL Certificate

There's been some buzz recently about Hillary Clinton using a personal email server for official state business. The Wired piece is an interesting read: http://www.wired.com/2015/03/clintons-email-server-vulnerable/ Probably the most surprising thing in the article for me is not about Hillary's email server at all. In discussing Hillary's invalid SSL certificate, the article casually mentions that the State Department uses a self-signed certificate, implying that their email could be compromised by a man-in-the-middle attack similar to what could target Hillary's email server. Here's a link that illustrates the invalid certificate: https://www.state.gov/ At time of writing, the certificate belongs to Akamei, and not not to the State Department. The certificate was issued by Cybertrust and will expire in June 2015. Does this imply that the State Department's email could be compromised? Probably not. It's unlikely they are using this certificate for ...

Role Reset

Two weeks ago I started a new job as VP Engineering at Recruitics . It's a great opportunity. The company is growing quickly and has a solid management team. This role is quite different from my last one as a software architect. Now I am designing people stuff, not software. I have read nearly twenty books to prepare for this role. One recurring theme from my reading is that people fail in new roles when they keep doing the things that made them successful in their previous role: the key to success is adapting to the new challenges. My background is in writing solid software systems, but the challenges I face now are different from the ones that brought me to this point. Resisting the urge to jump to coding is difficult. But code doesn't hire a great team, and code doesn't improve communication. I need to do it differently now, and I'm embracing the change.

Software Dissonance: Slow Migrations

This weekend one of my choral ensembles had a lesson in dissonance. The two bass parts hold a (dissonant) whole tone interval, which eventually resolves down to a (harmonious) minor third. We were having trouble getting the intonation right, so our choir director had us go very slowly and hold the dissonant interval so our ears would be accustomed to the sound. Just like music, over time software systems cycle between dissonance and harmony. One significant way dissonance occurs is during migration. In a migration, multiple valid domain models partly overlap. The dissonance is created because they embody slightly different assumptions, structure and capability - yet they share elements in common. When the old model falls away, dissonance resolves to harmony, and the cycle renews. Most software teams minimize the duration of their migrations, perhaps regarding them as unpleasant or untidy. In my current work setting, my team cannot risk an abrupt migration because there are too many m...

PhantomJS / POODLE

On Tuesday October 14th, 2014, Google announced the POODLE vulnerability for SSLv3. Engineering teams scrambled to remove support for SSLv3 on their websites, including our own system operations team. My team's data engineering system scrapes information from retail banking sites, which we have learned were heavily impacted by the SSL fix on Tuesday. It makes sense that banks would want to keep up-to-date with the latest security issues. When we scraped pages on Wednesday morning, a large portion of the sites we collect from came up blank in the PhantomJS browser, but without any obvious errors in our log files or in our log analysis dashboard ( Kibana ). We were puzzled at this behavior, and when we went to look at the URL's that failed to produce images, it was clear that they were all SSL-enabled and responding with a recent  TLS protocol. It turns out that PhantomJS by default only uses the SSLv3 protocol, and so it does not support any of the TLS protocols without ...

Solved: Unable to Locate Spring Namespace Handler

I attempted to run a Spring WebMVC application, and when starting up the application complained that it didn't know how to handle the MVC namespace in my XML configuration. The project runs JDK 7 and Spring 4.0.6 using Maven as the build system. The following is my XML configuration file: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:mvc="http://www.springframework.org/schema/mvc"        xsi:schemaLocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/mvc         http://www.springframework.org/schema/mvc/spring-mvc.xsd">          <mvc:annotation-driven/> ...

Picture Yourself Where You Want To Be

I recently received this marketing communication from LinkedIn, featuring a YouTube video . The video shows children talking about what they want to be when they grow up, and they are juxtaposed against images of successful professionals doing those things. The message is that you can follow your dreams and succeed. It's cute. LinkedIn marketing communication promoting http://imagine.linkedin.com The website accompanying the campaign goes on to explain how some of the professionals featured in the video use LinkedIn to do their current jobs. For example, a chief merchandising officer uses it to discover vendors for unique items. And that's it: end of communication. What I find interesting is that LinkedIn isn't set up very well for people trying to "follow their dreams". I've worked hard to grow my capabilities. I average two hours per day studying work-related topics to expand my reach. For my career, the signal-to-noise ratio on LinkedIn is mostly...

When Will Amazon Zocalo Get An API?

I was among the thousands of attendees of yesterday's Amazon AWS Summit in New York. One of the key services announced was Zocalo , a file storage and sharing service for the enterprise. One aspect of the Zocalo service that wasn't clear is whether it will have an API. Part of the system I am currently working on provides a workflow for analysts to work with small sets of files. An API for Zocalo would allow automated process and analysts to jointly curate the files. Other AWS services have great API's: I've especially enjoyed working with the Java libraries for AWS services. Amazon usually takes API development very seriously and produces solid interfaces. Interoperating Zocalo with other AWS services would be the killer feature for my current use case, and an API with good libraries would facilitate this. Here are some ideas for what could be done combining Zocalo and other AWS services: Analyze file access and update logs using EMR or Kinesis. This could rev...

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...