This is a guest post by my friend and colleague Adam Lelkes. Adam’s interests are in algebra and theoretical computer science. This gem came up because Adam gave a talk on probabilistic computation in which he discussed this technique. Problem: simulate a biased coin using a fair coin. Solution: (in Python) def biasedCoin(binaryDigitStream, fairCoin): for d in binaryDigitStream: if fairCoin()…
12 Feb 2014
Dozens of VC firms reached out to us in 2013, so we sent our pitch deck around the world quite frequently. After a while we started sharing our deck with job applicants as well: We’re such a small startup, and many applicants had doubts about joining us. Access to our deck and our key metrics […]
11 Feb 2014
Do you sometimes feel the internet is holding you hostage? Don’t you wish the internet would look like it’s holding you hostage? Worry no more! Dear-sir-or-madam is a bookmarklet that makes web pages look like they’re ransom notes. For example, like this: How to use Bookmark this by dragging it to your bookmark bar: ransomify!. Then go to a non-https…
10 Feb 2014
This post explains how to add support for Instagram to the PHPoAuthUserData library by writing a dedicated extractor class. It illustrates the concepts of loaders, normalizers and mapping to extract user profile data from the Instagram API.
Introduction Suppose we have a square thin plate of metal and we hold each of edges at a temperature which may vary along the edge but is fixed for all time. After some period depending on the conductivity of the metal, the temperature at every point on the plate will have stabilised. What is the … Continue reading Laplace’s Equation…
The PHPoAuthUserData library provides a simple interface to extract common user data like name, username, ID from various OAuth providers. It builds on top of PHPoAuthLib.
Finding solutions to systems of polynomial equations is one of the oldest and deepest problems in all of mathematics. This is broadly the domain of algebraic geometry, and mathematicians wield some of the most sophisticated and abstract tools available to attack these problems. The elliptic curve straddles the elementary and advanced mathematical worlds in an interesting way. On one hand,…
9 Feb 2014
How can you unit test private methods? If you google this question, you find several different suggestions: test them indirectly, extract them into their own class and make them public there, or use reflection to test them. All these solutions … Continue reading →
8 Feb 2014
This is a guest post by my friend and colleague Adam Lelkes. Adam’s interests are in algebra and theoretical computer science. This gem came up because Adam gave a talk on probabilistic computation in which he discussed this technique. Problem: Simulate a fair coin given only access to a biased coin. Solution: (in Python) def fairCoin(biasedCoin): coin1, coin2 = 0,0…
With all the recent revelations of government spying and backdoors into cryptographic standards, I am starting to disagree with the argument that you should never roll your own cryptography. Of course there are massive pitfalls and very few people actually need home-brewed cryptography, but history has made it clear that blindly accepting the word of the experts is not an…
In the fall of 2000, I took my first engineering class: ECE 352, an entry-level digital design class for first-year computer engineers. It was standing room only, filled with waitlisted students who would find seats later in the semester as people dropped out. We had been warned in orientation that half of us wouldn't survive the year. In class, We…
6 Feb 2014
How to build streaming real-time, live updating data visualizations using WebGL
Here is my confession, internet: I am writing a cat DNS. That is, a DNS server that resolves everything to cats. You want your email? Cat! You want to check the weather? Cat! It’s always cat. Wait why? We were talking at work about DNSes, and it turns out I only hand wavingly know how they work. I also like…
5 Feb 2014
Introduction to PubNub Data Storage and Playback. Store real-time data message streams for future retrieval and playback.
30 Jan 2014
I was recently directed to an article on "tiny types" – an approach to static typing which introduces distinct types for the sake of code clarity, rather than to add particular behaviour to each type. As I understand it, they’re like type aliases with no conversions between the various types. (Unlike plain aliases, an object … Continue reading How many…
The Static Showdown is a virtual worldwide hackathon for frontend-engineers. Hacking is more fun together – thus we provide our Berlin office as a central hub during the competition. The competition starts on Saturday, 8th of February, 1am Berlin time. You then have precisely 48 hours to develop your app. Anything that you can run on a static web […]
This is a post about the performance of my avr11 simulator. Specifically about the performance improvements I’ve made since my first post, and the surprises I’ve encountered during the process. Old school profiling Because avr11 runs directly on the Atmega 2560 microcontroller, there is no simple way to measure the performance of various pieces of […]
Because that would be crazy. Crazy is in the next blog post. I’ve had to write a sizeable chunk of (fairly mediocre) Objective-C code recently, and I’ve formed the following opinions: It’s easier if you just get over the thing with the brackets Event listeners are sooper cool Standard Cocoa controls are great if you want them to look exactly…
28 Jan 2014
27 Jan 2014
Here is the story of a bug that I caused, found, and fixed recently. It is not particularly hard or tricky, and it didn’t take long to find and fix. Nevertheless, it did teach me some good lessons. The Bug … Continue reading →
Our SaaS application is built with Java, managed with Gradle and runs on Google App Engine. That makes a surprisingly lean and agile combination. Since we do like to work with the best tools available the folks responsible for the back-end love IntelliJ IDE. So of course we utilize the IntelliJ plugin for Gradle. It’s amazingly simple to […]
26 Jan 2014
Have you ever tried to develop an Java 6 EE application on different application servers? In production we are forced to use WebSphere AS. I like the configuration interface but that’s all. WAS is not usable during development because the deployment cycles are way too long. Because of this we […] The post Why JPAs persistence.xml sucks appeared first on…
25 Jan 2014
This week a group of more than fifty prominent security and cryptography researchers signed a letter protesting the mass surveillance efforts of the NSA, and attempts by NSA to weaken cryptography and privacy protections on the Internet. The full letter can be found here. Most of you have already formed your own opinions on the issue over … Continue reading…
In my previous post I had figured out that I could capture memory accesses in my simulator and send them elsewhere. In version 1 of the design I (ab)used the onboard mini SD card to simulate the entire address space. This was a very 1950’s solution and came with matching performance. Still, it did give […]
24 Jan 2014
18 bits of core memory In Schmidt’s original javascript simulator, and my port to Go, the 128 kilowords (256 kilobytes) of memory connected to the PDP-11 is modeled using an array. This is a very common technique as most simulators execute on machines that have many more resources than the machines they impersonate. However, when I […]
23 Jan 2014
A few awesome readers have posted comments in Computing Homology to the effect of, “Your code is not quite correct!” And they’re right! Despite the almost year since that post’s publication, I haven’t bothered to test it for more complicated simplicial complexes, or even the basic edge cases! When I posted it the mathematics just felt so solid to me…
Introduction It all started with Javascript. In April of 2011 Julius Schmidt wrote a PDP-11 emulator that ran in a browser. I thought that this was one of the most amazing thing I had ever seen. Late last year I ran across the link again in my Pocket backlog and spent a little time poking […]
This post is a rant about a word. A rant about a word that had a clear meaning but has been appropriated for something wholly less meaningful. The word is of course Devops. Over the last few years, as the practice itself has grown in prominence, its description has become diluted beyond the point of recovery. […]
21 Jan 2014
This post is intended to be a tutorial on how to access the RealityMining dataset using Python (because who likes Matlab?), and a rant on how annoying the process was to figure out. RealityMining is a dataset of smart-phone data logs from a group of about one hundred MIT students over the course of a year. The data includes communication…
To trouble-shoot software, logging of some kind is essential. But for most systems, it is simply not possible to log everything that happens. Many systems and logging frameworks let you limit the amount of data by giving a logging level (e.g. … Continue reading →
With one exception, the go command takes arguments in the form of packages. You can pass the package name(s) explicitly, eg. go test github.com/hoisie/mustache or implicitly cd $GOPATH/src/github.com/hoisie/mustache go test . By default, if no arguments are provided go test treats the current directory as a package, so in the second example, go test . […]
20 Jan 2014
Okay, I’m calling it: if you’re using guest blogging as a way to gain links in 2014, you should probably stop. Why? Because over time it’s become a more and more spammy practice, and if you’re doing a lot of guest blogging then you’re hanging out with really bad company. Back in the day, guest […]
I see a lot of problems which look somewhat different at first glance, but all have the same cause: Text is losing “special characters” when I transfer it from one computer to another Decryption ends up with garbage Compressed data can’t be decompressed I can transfer text but not binary data These are all cases … Continue reading Diagnosing issues…
Disclaimer: these aren’t new protipz. I didn’t make them up. They’re actually straight out of the Chromium code style, they’re pretty trivial, and you might already use them. But just in case you’re not a Chromium committer (the outrage), or are fairly new at C++ and want to make your code less suck, here they are. I think they’re neat.…
17 Jan 2014
A professor at Stanford once said, If you really want to impress your friends and confound your enemies, you can invoke tensor products… People run in terror from the $ \otimes$ symbol. He was explaining some aspects of multidimensional Fourier transforms, but this comment is only half in jest; people get confused by tensor products. It’s often for good reason.…
This post explains how to install Dropbox command line client on a Linux server, create a dedicated user and setup it as a service to have automated backups on Dropbox cloud.
Klokan Technologies is pleased to announce the launch of a new version of MapTiler with georeferencing functionality that allows to turn an image without any geographical information into a real map.
16 Jan 2014
A web developer fascinated by the web since childhood discusses the motivation behind starting a blog - to share thoughts on web development trends and experiments in a personal space.
14 Jan 2014
As I begin to write this, I’m in a small cubicle in Philadelphia airport, on my way back from CodeMash – a wonderful conference (yet again) which I feel privileged to have attended. Personal top highlights definitely include Dustin Campbell’s talk on C# 6 (I’m practically dribbling with anticipation – bits please!) and playing Settlers … Continue reading A tale…
13 Jan 2014
Meet the newest member of the PubNub team. No, she's not a programmer, and actually, she isn't even in high school yet. In fact, she's an 8 year old competi
11 Jan 2014
Background It is becoming increasingly difficult to trust the privacy properties of software and services we rely on to use the Internet. Governments, companies, groups and individuals may be surveilling us without our knowledge. This is particularly troubling when such surveillance is done by governments under statutes that provide limited court oversight and almost no … Continue reading "Trust but…
10 Jan 2014
I have recently started providing consultancy to a hedge fund and as far as I can see, R looks like it has a good set of libraries for this domain. In my previous job I used an embedded domain specific language in Haskell (Frankau et al. 2009). I’d like to be able to use Haskell … Continue reading Getting Financial…
9 Jan 2014
Yesterday our frontend engineering team gave a talk at the AngularJS Meetup Berlin. The talk focused on performance measurement and tuning for huge angular screens and gave some insights into our workflow and toolchain. You can find the slides here: Slides Slides (PDF) Example Code
Dear David, I'm afraid my off the cuff response the other day wasn't too well thought out; when you talked about taking calc III and linear algebra, and getting resistance from one of your friends because "wolfram alpha can do all of that now," my first reaction was horror-- which is why I replied that while I've often regretted not…
8 Jan 2014
Several of my colleagues love IntelliJ for coding in Scala. I was pretty happy with Sublime Text 2 (and still use it for Ruby/Python/Shell/whatever) but the lack of code completion was really starting to affect my productivity. I spent way too much time looping through the edit/compile/fix typo cycle. Before I could switch though, I really wanted my fancy arrows…
7 Jan 2014
This d3js tutorial walks you through how to use d3js and PubNub to build real-time, live updating data visualization graphs.
Recently I struggled upon the same problem, this guy described. Our Oracle database instance contains multiple schematics with almost the same structure. Every developer has it’s own schema for unit and integration tests. On application startup the Hibernate schema validator calls the DatabaseMetaData.getTables() for every linked entity. The method returns the first […] The post Hibernate uses wrong schema during…
5 Jan 2014
This post talks about how I connected my Raspberry Pi to a WYSE 60 terminal. Voltages The terminal speaks RS232 level, +/- 12v, but the Pi speaks 3.3v TTL levels so some sort of converter is needed to adapt the signalling levels. A logic level converter won’t work as RS232 signalling needs negative voltages as […]
4 Jan 2014
Everything you render in a browser, whether it’s a blog post or a tweet or a video, has a performance cost. At the very least, you will be asking the browser to render a handful of tags and text elements that make up your user interface. That structure, a subtree in the browser’s DOM, can be quite complicated and memory…
2 Jan 2014
In tackling machine learning (and computer science in general) we face some deep philosophical questions. Questions like, “What does it mean to learn?” and, “Can a computer learn?” and, “How do you define simplicity?” and, “Why does Occam’s Razor work? (Why do simple hypotheses do well at modelling reality?)” In a very deep sense, learning theorists take these philosophical questions…
While on holiday, I started reading a couple of on-line texts on algebraic topology on my Kindle (Hatcher 2002), (May 1999). Kindle’s aren’t great for reading maths but they save having to carry around heavy books of which one might only read a fraction. Along with the usual holiday activities (ok not that usual as … Continue reading Fundamental Group…
At MediaMath we’re big users of Elastic MapReduce. EMR’s incredible flexibility makes it a great fit for our analytics jobs. An extremely important best practice for any analytics project is to ensure your local dev and test environments match your production environment as much as possible. This eliminates the nasty surprise of launching a job that takes hours only to…
Here's the graph of a toy benchmark1 of page-aligned vs. mis-aligned accesses; it shows a ratio of performance between the two at different working set sizes. If this benchmark seems contrived, it actually comes from a real world example of the disastrous performance implications of using nice power of 2 alignment, or page alignment in an actual system2. Except for…
1 Jan 2014
One common reaction to my post on writing debuggable code was: you don’t need logging, just use a debugger. While there are cases where a debugger is the best option, there are many reasons why having proper logging in place … Continue reading →
31 Dec 2013
Sorry, I missed the chance to post a timely follow-up to Cisco’s H.264 Good News: as mentioned on the RTCWeb IETF mailing list, Cisco on the 9th of December released the OpenH264 codec on Github. Warning: code cleanup in progress (e.g., following RTP correctly in Gecko glue code), do not expect interoperable results in the … Continue reading "OpenH264 on…
I like to read and I have a great community on Twitter so I asked them what they think others and myself should read in 2014. Here is the compiled list of the recommended books. The good news is that most of these books are under $10, so why not picking a couple for the new year? A big thanks…
30 Dec 2013
We’ve studied the Fourier transform quite a bit on this blog: with four primers and the Fast Fourier Transform algorithm under our belt, it’s about time we opened up our eyes to higher dimensions. Indeed, in the decades since Cooley & Tukey’s landmark paper, the most interesting applications of the discrete Fourier transform have occurred in dimensions greater than 1.…
I don’t do a ton of Linux kernel development these days, but I’ve done a fair bit in the past, and picked up a number of useful techniques for doing kernel development in a relatively painless fashion. This blog post is a writeup of the tools and techniques I use when developing for the Linux kernel. Nothing I write here…
29 Dec 2013
I enjoyed Caro’s last book, Master of the Senate, but his latest book is something really special. Over the last couple of chapters Caro has gently raised the tension by laying out the Bobby Baker scandal and the imminent deposition of Don Reynolds who’s testimony will likely fatally bind LBJ to his protégé. Meanwhile, the […]
This will be short, but it seems there's some difficulty doing this, so I thought I'd share. The gist is, any time you reference a class or method in your own library, in the Python standard library, or in another third-party extension, you can provide a link directly to that project's documentation. This is pretty […]
28 Dec 2013
I have updated my unofficial ARM tarball distributions page with prebuilt Go 1.2 tarballs. You can find them by following the link in the main header of this page. If you are interested in the potential performance improvements in Go 1.2, I wrote a post about it on the Gopher Academy blog as part of this year’s Go Advent […]
Last Friday, Joseph Menn from Reuters published an article claiming that RSA, the pioneering security firm and division of EMC, accepted $10 million dollars to include the Dual EC random number generator as the default in their flagship BSAFE library. I’ve written a bit about Dual EC on this blog, so readers will know that I don’t think highly ……
Short answer: probably not. Slightly longer answer: it depends on whether they have access to the encryption key, or to a machine that contains the encryption key. In case you have no idea what I’m talking about: there was recently a massive credit card breach at Target. If you’re like many people you probably heard about … Continue reading Can…
Today I made a Bluetooth garage door opener. Now I can open my garage from my Android phone. There’s a short how-to YouTube video from Lou Prado. Lou also made a website btmate.com that has more information, and you can watch an earlier howto video as well. The project itself was pretty simple: – Acquire […]
26 Dec 2013
I think that turbolinks is great: it makes it easy to add AJAX PushState to your Rails Applications. The only problem with that is that we can’t use it any WEB application, because it’s a Ruby Gem. So I did some ugly-but-easy hacks and add it to this very site. I will describe the steps below.
24 Dec 2013
20 Dec 2013
Several people have been asking for an update on our public audit of the Truecrypt disk encryption software. I’m happy to say that the project is on track and proceeding apace. Here I wanted to give a few quick updates: Thanks to the amazingly generous donations of 1,434 individual donors from over 90 countries, as … Continue reading An update…
19 Dec 2013
18 Dec 2013
[UPDATE: see Jim’s fair comment below. /be] I’m pleased to report that OTOY today has announced good news about ORBX.js and the Amazon Web Services ORBX and OctaneCloud AMIs (Amazon Machine Instances, pronounced “AHmees” — who knew?), based on terrific adoption and developer interest: Free ORBX and OctaneCloud AMIs forever, not just for a trial … Continue reading "ORBX.js and…
We just released our AngularJS SDK, and this tutorial walks you through building an angularJS chat application.
16 Dec 2013
I’ll keep it short: this week when you donate for cancer research, I’ll match your donation (up to a limit of $5000 total for all donations). We’ve already raised almost $8,000 dollars to help stop cancer, but I’d love to get to $10,000 or even higher. If anyone has ever wanted to take money out […]
13 Dec 2013
Earlier this year, I interviewed with a well-known tech startup, one of the hundreds of companies that claims to have harder interviews, more challenging work, and smarter employees than Google1. My first interviewer, John, gave me the standard tour: micro-kitchen stocked with a combination of healthy snacks and candy; white male 20-somethings gathered around a foosball table; bright spaces with…
12 Dec 2013
Uncover the hidden growth patterns of Go slices.
10 Dec 2013
This tutorial shows you how to build a bitcoin infrastructure for an exchange for trading and real-time price streaming
9 Dec 2013
So far in this series we’ve seen two nontrivial algorithms for bandit learning in two different settings. The first was the UCB1 algorithm, which operated under the assumption that the rewards for the trials were independent and stochastic. That is, each slot machine was essentially a biased coin flip, and the algorithm was trying to find the machine with the…
8 Dec 2013
Many programmers have a hard time writing good unit-tests for code that involves time. For example, how do you test time-outs, or periodic clean-up jobs? I have seen many tests that create elaborate set-ups with lots of dependencies, or introduce … Continue reading →
7 Dec 2013
"Geek chic: A witty tour of one programmer's hardware setup."
A keyboard love story: still typing after all these years.
Introduction About a year ago there was a reddit post on the Ising Model in Haskell. The discussion seems to have fizzled out but Ising models looked like a perfect fit for Haskell using repa. In the end it turns out that they are not a good fit for repa, at least not using the … Continue reading Haskell, Ising,…
4 Dec 2013
There is an apocryphal story1 during World War Two, of a squadron of bombers leaving on a sortie. Time passes and finally a few bombers struggle back to their base, the crew shaken, but alive, their aircraft riddled with bullet holes. Shocked by their losses, the reaction by Air Force was to order the areas of the […]
3 Dec 2013
A few weeks ago I wrote a long post about the NSA’s ‘BULLRUN’ project to subvert modern encryption standards. I had intended to come back to this at some point, since I didn’t have time to discuss the issues in detail. But then things got in the way. A lot of things, actually. Some of which … Continue reading How…
2 Dec 2013
If you’re interested in the performance improvements delivered in Go 1.2, I’ve written about it as part of this years Go Advent project. You can find the post on the Gopher Academy blog, blog.gopheracademy.com/day-02-go-1.2-performance-improvements.
I like to set myself different challenges every 30 days. In October 2013, I tried to eat better and exercise more. I did alright on that, but without a specific daily goal, I had a hard time deciding how well I did. I mostly got back into the habit of exercising daily, so that was […]
30 Nov 2013
For a while I’ve been meaning to do some more advanced posts on optimization problems of all flavors. One technique that comes up over and over again is Lagrange multipliers, so this post is going to be a leisurely reminder of that technique. I often forget how to do these basic calculus-type things, so it’s good practice. We will assume…
I wanted to share sessions between my Rails and Go applications. I wanted to let an authenticated Rails user make JavaScript API calls to an endpoint written in Go. How hard could it be? Since I own both apps, I thought it would be as simple as sharing the secret session key and re-implementing Rails crypto process in Go. It…
28 Nov 2013
When you build complex angular.js apps, your user interface might start to feel sluggish: You experience an uncomfortable delay whenever you click a button, the screen flickers when you scroll and some actions freeze your browser completely. This guide will help you to identify and speedup the slowest parts of your app. Hint: This post […]
Today, once again, my environment started throwing that SSL cert error.
27 Nov 2013
25 Nov 2013
24 Nov 2013
One thing I’m really proud of is that when we launched Discourse, we had first class Internationalization (i18n) support ready to be used. Our first release only English, but thanks to our community we have 18 localizations of our software in progress! Here’s what Discourse looks like in Simplified Chinese: On the server side, Discourse uses Rails’ built in i18n…
21 Nov 2013
At last week's WebRTC Summit in Santa Clara, PubNub's Dan Ristic spoke in front of a full house on "The WebRTC Data Channel."
A few years ago, I asked on my blog what people would like from Google’s free webmaster tools. It’s pretty cool to re-read that post now, because we’ve delivered on a lot of peoples’ requests. At this point, our webmaster console will alert you to manual webspam actions that will directly affect your site. We’ve […]
20 Nov 2013
Over the last few weeks I had the opportunity of working with the Joyent folks on the port of Go to Solaris1. As part of this work I noted that the Joyeurs were using their rather spiffy Manta service for sharing code snippets and build logs. This made the rest of us using Pastebin services […]
For the folks that don’t know, I’ve been out for a couple weeks and I’ll be on vacation the rest of November. If you’ve tried to contact me recently and haven’t heard back, that’s probably the reason. Added: if you enjoy watching our webmaster videos, you can follow @googlewmc to hear as soon as we […]
How to build a WebRTC video calling application that works entirely in the browser.
Momentum following our Series B round of funding we received in September, see our new appointment
19 Nov 2013
I’ve been doing a lot of work with gccgo recently and with the upcoming release of Go 1.2 I’ve also been collecting benchmark results for that release. Presented below, using a very unscientific method, are the results of comparing the go1 benchmark results for the two compilers. Buried among that see of red are a few […]