Spartan as my own designs tend to be, I do sometimes want some UI fluff like an interactive date picker. I put together a simple but functional, zero dependency, nonintrusive date picker control in plain Javascript that I've been using recently.
In my last post I put together a simple web server infrastructure that could issue scans to a remote Redis server and display the results, available for paging back and forth, to a web interface. It's useful for seeing which keys are available. For starters, it's not displaying the value associated with the key.
Redis seems to grow more popular and more important every year. The redis-cli tool does a good job of routine admin tasks, but searching for keys is a big hassle on the command-line. It's come up often enough that I finally broke down and put together a simple web-based Redis browser.
I recently came across a problem that took longer to resolve than I would have liked. I had a box that was responsible for running a Java process and nothing else. When the Java process mysteriously died one day, I went to restart it and it failed immediately due to lack of memory. I saw that over 10,000 procmail processes were taking over the entire system. So... where did these come from and…
One of the things that makes front-end web development so complicated is that the web was really, really not designed for the sort of "desktop app" emulation that we demand of it these days. One such problem is the drag and drop interface that desktop GUI users have come to expect as standard, but which HTML struggles with. Supporting this functionality with "vanilla" Javascript is low footprint…
Covariant and contravariant generic types seem counterintuitive at first and, since they're not as common as generics in general, are easy to overlook.
Computers can only represent a finite number of values for rational numbers, so there are necessarily "gaps" in between the representable ranges. Just how wide are these gaps?
Last time, I put together the beginning of a database diagram () tool that allowed for creation of tables and property/name definitions. This time, I'll expand on that a bit: first, I'll add support for deletion, and then I'll add support to move the diagrams around.
One graphical tool I find myself missing on a pretty regular basis is Visio. I've long since made the switch over to OS/X, and there's really (still!) no decent equivalent in the Mac ecosystem. It occurred to me to wonder... how hard would something like this be to put together, really?
Gaussian elimination is a technique for solving systems of equations that lends itself well to automation. Here, I'll walk through an implementation similar to numpy's linalg.solve.
The most fundamental, and among the oldest, method of statistical inference is linear regression. The basic idea is to fit a set of observations to a slope and intercept and then use the implicit line to make predictions about unobserved data. Although it's considered statistically basic, it's still a useful tool for a lot of real-world cases, and at least an interesting stopping point on the way…
So, Spark is becoming, if not has become, the de facto standard for large batch processes. Its big selling point is easy integration with the Hadoop file system and Hadoop's data types - however, I find it to be a bit opaque at times, especially when something goes wrong. Recently I was troubleshooting a parquet file and I wanted to rule out Spark itself as a culprit. It turns out to be…
I'm a big fan of UML as a standardized notation. I haven't been a big fan, though, of UML generation software. After having spent many years experimenting with GUI tools like Rational Rose, Visio, Gliffy and ArgoUML, I finally found a good command-line UML editor: MetaUML.
I'm working through the book "Mining of Massive Datasets" to catch up with some of the latest advances in data mining, and when I hit chapter 7 on clustering algorithms, I couldn't help notice how naturally these algorithms can be implemented in Python. Of course, you're supposed to do this sort of thing using scikit or at least numpy but if you're familiar with this blog, you probably know I'm…
A while back, I wrote up a walkthrough of a real TLS 1.2 handshake, detailing what each byte contributed to the SSL connection establishment process. Since the latest revision of TLS, 1.3, is now almost a year old, and since it's a radical change from the TLS versions that came before it, this is probably a good time to go through the same exercise for it.
For better or for worse, modern "enterprise" Java applications are full of deeply-nested hierarchies of objects where one instance might contain a list of other objects which may themselves contain other objects, ad nauseam... debugging an unfamiliar application written in this (not very object oriented) style means familiarizing yourself with the details of this hierarchy. I finally decided to…
Last time, I walked through the development of a simple HTTP server in Java. Two major missing features in that server were the lack of support for HTTP POST as well as support for HTTPS. I'll rectify both in this post.
I often find myself needing a very simple HTTP server for things like mocking out external services for testing purposes. In these cases, Tomcat or even Jetty feel like overkill; I just want something that will start and stop really fast and that will allow me to manipulate any arbitrary byte of the response. I usually re-write the same little dedicated app from scratch each time, but I finally…
Google's Angular is a fairly popular web application development framework As of today, the preferred solution to bootstrapping an Angular application is a command-line application generator called the Angular CLI. This is fine in the sense that it works, but it does quite a bit behind the scenes and expends a lot of effort hiding the details of what it did from you, the developer. This can be a…
I recently finished reading the first three volumes of Donald Knuth's Art of Computer Programming series. I picked up the fourth one, and found that he had revamped the assembler language that he used to put together all of the examples. One interesting inclusion in the new MMIX assembler language is the MOR instruction, which I spent quite a bit of time working through.
I can't remember how exactly it came up, but my son asked me while we were in the car something along the lines of, "if (some number) was something else minus 20 percent, how much was the original number?" I'm sure somebody tried to teach me this at one point, but I ended up recreating a simple way to reverse percentage changes without a calculator.
Volume 4A of Donald Knuth's "The Art of Computer Programming" opens with an interesting numerical puzzle surrounding the generation of "Langford Pairs". As I was reading it, it occurred to me that generating these pairs makes for a succinct Scala exercise.
I finished volume 3 of Donald Knuth's "The Art of Computer Programming" this month; I've spent the last three years working through the entire set. I found this volume to contain both the most, along with the least, relevant material for a modern developer.
So, this one had me beating my head against a brick wall for a few hours; maybe I can spare somebody else some pain by documenting what I discovered here.
The 90th academy awards came and went this month. My wife is a bit of an Oscar's fanatic, and she's managed to sweep me up in her mania. We host an Oscars-watching party every year - I tend bar and she makes snacks that are matched up to themes of nominated movies. We also print out ballots for all of the guests and let them nominate their favorites. Whoever gets the most right gets a prize; my…
Git is quite a bit different than the previous source code control systems like Subversion and CVS that it acts as a replacement for. I go through the basics of Git from the perspective of a recent Subversion convert.
When I first came across AngularJS, I found it fairly confusing - not in a, "how do I use this thing" or even a "how do I accomplish X in Angular" sort of way, but more of a "what is this thing even for? How is Angular better than... not Angular?" I wasn't trying to figure out why Angular is better than, say, React, or Boost, or jQuery, but - why is Angular better than nothing at all? What does it…
I found myself reviewing some of my long-forgotten calculus and I was struck immediately by how well numerical integration techniques like Simpson's rule work in a functional programming language like Python.
Gradle is the new(er) kid on the Java build automation block. You probably know that Gradle was originally developed as part of the Groovy language, for automating builds of Groovy projects. However, it's becoming more and more popular for Java projects while most of the documentation remains aimed at Groovy developers, creating a bit of a mismatch and something of a learning barrier.
Almost a year ago, I posted a semi-review, semi-rumination on the first volume of Donald Knuth's classic computer science set, "The Art of Computer Programming". I enjoyed reading it thoroughly enough that there was no question in my mind at the time that I would go on to read volume 2.
This post rounds out my longer-than-anticipated five-part series walking through an entire modern TLS handshake. The only part of the handshake I didn't examine in my previous posts is the OCSP response, which I'll cover in this post.
Last month, I reviewed an SSL handshake up to the key exchange portion. In this post, I'll pick up where I left off and cover the actual key exchange itself.
I recently got a note from a reader of my book who asked if I wouldn't mind putting together a high-level description of the TLS handshake for a non-implementation audience.
A JWT-token is a Base64 encoded, digitally signed JSON structure. As it turns out, they're pretty easy to make sense of once you peel away the different parts. I'll do that in this post
For a long time, I've seen other programmers write in awed, hushed tones about the multi-volume series of books written by Donald Knuth titled "The Art of Computer Programming" (TAOCP). As somebody who genuinely enjoys reading computer books, I've been meaning to settle down and read this series for a long time. I finally finished volume 1 and I must say, although it took some effort to get…
If you do much work with SSL or SSH, you spend a lot of time wrangling certificates and public keys. As keys age and things get shuffled around, though, you may often find yourself (as do I) trying to figure out which private keys go with which public keys. I've put together a quick reference here for anybody (including myself) who's faced with the same problem.
My very first post on this blog, 5 years ago, was a walk-through of the source code for a sample gunzip implementation. I've gotten quite a bit of feedback on it, mostly positive; it's still the most detailed post I've been able to put up here. Part of that write-up included bits and pieces of a gunzip session of an attached gzipped file, bit-for-bit. It occurred to me that a good companion piece…
Last month, I presented the code for a blank guitar tablature page generator. This becomes much more interesting if it can also render tablature based on user input. I won't present a full ASCII-art tablature parser here, but sort of a middle-of-the-road utility that takes as input triplets indicating the guitar string (E,A,D,G,B or e), the fret that that string should be played on and the…
A project I've been kicking around for a while is working out how to translate ASCII-art tablature into proper tab, along with the corresponding music notes. As it turns out, it's mostly a math exercise, but sort of an interesting one.
Last month, I talked about parsing a decrypted OpenSSL-formatted RSA key into a JKS-formatted Java Keystore. The utility that I presented in last month's post, though, has one slightly annoying limitation - you must manually decrypt the private key file before you can import it this way. As it turns out, the encryption that OpenSSL uses is well documented and well standardized, and it's possible…
OpenSSL is the de-facto standard for SSL operations, including creation and management of assymetric encryption keys. However, Java has its own format. Most of the time, you can easily convert between the two, but I've run into problems related to private keys in the past - so much so that I finally broke down and wrote a little command-line utility to deal with the conversion.
I have an old (early 2011) MacBook Pro that's been getting slower and slower as OS/X keeps upgrading, so I finally decided, yet again, to repurpose the hardware as a Debian host.