Archive for category it industry

Of Mikes and Davids

Mike is a professor at a reputable university. He teaches advanced machine learning and robotics, he’s finishing up his PhD in computer science, and he always has a new gadget he’s playing with.

David is a software entrepreneur. He has sold a software company or two for modest profit and he always has a business angle he’s working.

I had talked shop with Mike and David separately over the span of several months but one day the three of us managed to get together. Since Mike and David are both in the general information technology field I naturally assumed that we could find a common ground on that topic. I couldn’t have been more wrong. Mike and David clashed on almost every level and in the aftermath I learned a very important lesson about two distinctly different groups of technologists that I now classify as Mikes and Davids.

Mike is meticulous in his work. He needs to understand everything about the problem he is attempting to solve and all of the intricate mathematics behind any possible solution. As a result, it takes Mike a long time to ship a high quality product.

David, on the other hand, is focused on delivering something of value as quickly as possible. As a result, David can quickly churn out a working product which will likely need several iterations in order to work out all of the bugs.

These are fundamentally different approaches which I believe serve as a rosetta stone of sorts to help us decode the motivations and likely future actions of these two different schools of thought.

Let’s say, for example, you need X. David will bang out a version of X for you after pulling a week of all-nighters wherein his kids briefly forget they had a father. What you get will work according to your specifications. But don’t expect it to be pretty. But you’ll put it into production anyway. Because why not? Several months down the road you’ll wonder why your app is so sloooow and you’ll have to go back to David to have him fix a growing list of bugs. Thats not a knock on David. That’s just the nature of his work. Its fast and it’s to specifications.

By contrast Mike will take a very long time to complete a task. But when they do, you will have a rock-solid solution that has been thoroughly vetted. You will also have pages of proofs and data to go along with that solution.

In short, call David when you have an idea you want to have built quickly. And after David builds it, call Mike to build out the next version that will scale.

Both approaches have their place.

Having worked with startups for a long time I can appreciate each one in their own unique way. I am a Mike or a David depending on who I’m working with. I take great pains to build up my Mike and David skillsets equally. I can use Yeoman to quickly generate a skeleton of an application. And I can use SciKit Learn to discover patterns in data to make my processes more efficient.

I’ve decided the best engineers are honest with themselves on whether they are naturally more of a Mike or a David and are actively working to move towards the other end of the spectrum.

Share/Save

Manhandling windows with applescript

I’ve been setting up a Cuckoo cluster and the most tedious part of that involves configuring the guest VMs. To make a long story short, I needed to manually set the IP address of all my guest VMs. At first I started doing this the visual way by clicking through all of the windows settings menus. This quickly got tedious so I developed an applescript which opens the command prompt in administrative mode, bypassing the stupid user warning, enters the command to change the ip address of the box, and then closes the command prompt. If you have a task which involves monkeying with a windows system using Screen Sharing on a mac, I hope you find this little script useful.

tell application "Screen Sharing"
	activate
	
	delay 1
	
	tell application "System Events"
		-- Open an administrative command prompt
		key code 53 using control down
		delay 2
		keystroke "cmd"
		delay 1
		key code 125
		key code 126
		key code 76 using {shift down, control down}
		delay 2
		key code 123
		key code 76
		delay 2
		
		keystroke "netsh interface ip set"
		delay 1.2
		keystroke " address name"
		key code 24
		keystroke "\"Local"
		delay 1.2
		keystroke " Area Connection\""
		delay 1.2
		keystroke " static"
		delay 1.2
		keystroke space

		-- Numbers have to be entered by key code. Otherwise they are interpreted as control characters
		key code 18
		key code 25
		key code 19
		key code 47
		key code 18
		key code 22
		key code 28
		key code 47
		key code 23
		key code 22
		key code 47
		key code 18
		key code 29
		-- This is the part that needs to change
		-- key code 29 -- 0
		-- key code 18 -- 1
		-- key code 19 -- 2
		-- key code 20 -- 3
		-- key code 21 -- 4
		-- key code 23 -- 5
		-- key code 22 -- 6
		-- key code 26 -- 7
		key code 28 -- 8
		-- key code 25 -- 9
		
		keystroke space
		delay 1.2
		
		key code 19
		key code 23
		key code 23
		key code 47
		key code 19
		key code 23
		key code 23
		key code 47
		key code 19
		key code 23
		key code 23
		key code 47
		key code 29
		
		keystroke space
		delay 1.2
		
		key code 18
		key code 25
		key code 19
		key code 47
		key code 18
		key code 22
		key code 28
		key code 47
		key code 23
		key code 22
		key code 47
		key code 18
		
		delay 1.2
		
		-- Send the command
		keystroke return
		
		delay 2
		
		-- Exit the command prompt
		keystroke "exit"
		keystroke return
	end tell
end tell

Simple PhantomJS web scraping script

Here is a simple web scraping script I wrote for PhantomJS, the immensely useful headless browser, to load a page, inject jQuery into it, and then scrape the page using a user-supplied jQuery selector.

page = require('webpage').create()
system = require 'system'

phantom.injectJs "static/js/underscore-min.js"

page.onConsoleMessage = (msg) ->
    if not msg.match /^Unsafe/
        console.log msg

scrapeEl = (elselector) ->
    rows = $ elselector
    for el in rows
        if el.innerHTML
            str = el.innerHTML.trim()
            if str.length > 0
                console.log str

page.open system.args[1], (status) ->
    if status isnt 'success'
        phantom.exit 1
    else
        page.injectJs "static/js/underscore-min.js"
        page.injectJs "static/js/utils.js"
        page.injectJs "static/js/jquery-1.8.2.min.js"
        page.evaluate scrapeEl, system.args[2]
        phantom.exit()

Run it with:

phantomjs scrape_element.coffee "http://www.moviefone.com/coming-soon" ".movieTitle span"

Tags:

Tracking the trackers

Tags:

MongoDB Security Considerations presentation at MongoSF 2012

Here is a presentation I gave at MongoSF 2012 on unique security considerations for MongoDB.

And here are my slides.

Tags: , , , ,

node.js at Facebook

Slides

Tags: , , ,

Hollywood vs the internet

[HT Forbes]

PROTECT IP Act Breaks The Internet from Fight for the Future on Vimeo.

Tags: , ,

How Intellectual Property Hampers the Free Market

[HT Mises Blog]

Tags: , , , , ,

Open-source blueprint for civilization

[HT Mises Blog]

Tags: , , , ,

Ted Talk: Visualizing Humanity with Aaron Koblin

[HT Infosthetics]

Tags: , ,