Skip to content

Instantly share code, notes, and snippets.

View jashkenas's full-sized avatar

Jeremy Ashkenas jashkenas

View GitHub Profile
@jashkenas
jashkenas / semantic-pedantic.md
Last active November 29, 2023 14:49
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@jashkenas
jashkenas / npm-publish-semver.coffee
Last active August 18, 2016 21:10
A little script to publish a "semantic" version of any npm package that uses real version numbers.
#!/usr/bin/env coffee
fs = require 'fs'
sh = require 'execSync'
config = JSON.parse fs.readFileSync 'package.json'
fs.renameSync 'package.json', 'package.json.real'
name = config.name = "#{config.name}-semver"

FIRST THINGS FIRST Resist the temptation to buy the first bike you see. Look at a few of them to get a better idea of the used bike market/options before you buy one. Bring a friend to help you stick to your guns, or to help you load your new bikes onto a truck, or as ballast in case the bike has a centerstand and you wish to inspect the front wheel. Bike-savvy friends may also notice things that you forgot to check. Make sure they also read this guide ahead of time. Bring a flashlight to aid inspection. Even in daylight. Request that the owner not have the bike warmed up when you get there, but tell him/her to make sure that the bike will start. If the owner asks why, tell them that you want to test the bike's ability to start when cold. (It's a lot easier for engines to start when pre-warmed.) You needn't follow these instructions in any particular order, or even follow them at all, but if you are going to read them, you should probably do so before you get to the seller's house. If you're new to motorcycli

Here are some pointers on what to look for on a used bike purchase. Take a clipboard with you when viewing the bike, and look for the following items:

ENGINE Check the oil prior to starting, is it clean? Or at least filled to the correct level? Check the coolant (if applicable) is it filled properly? Check the air filter as well if possible. After all the checks, start the motor...does it start and run smooth? Any visible smoke coming out of the pipe(s)? Does the throttle rev smoothly? Any odd noises coming from the engine, like valve ticking or coughs, spits, sputters, or rattles? Does the clutch engage easily and does the shifter click naturally as you go into gear? (many bikes have a side stand safety feature that prevents the motor from going into gear while parked, raise the side stand before doing this...and then put it down while it's in gear/clutch in to see if the feature works). Check for oil leaks around the motor, any trails of dust/dirt build-up at any of the engine seams?

TIRES Are they new?

At the editorial offices they could tell that I was hanging around the corridors without purpose or goal. In principle it is accepted that when a correspondent returns from a bureau in the field he has no assignment or work for a certain time and becomes a fifth wheel to our long-suffering, dedicated team. But my alienated behavior and prolonged idleness had exceeded all the limits of tolerance, and Hofman decided to do something with me. Thus there was an attempt — one of a series in my life — to establish me behind a desk. My boss led me to a room containing a desk and a typist and said, "You're going to work here," I looked it over: the typist — yes, she was nice; the desk — abominable. It was one of those small desks, a mousetrap, which sit by the thousands in our cluttered and overcrowded offices. Behind such a desk, a man resembles an invalid in an orthopaedic brace. He cannot stand up normally to shake hands, but must first disengage himself delicately from his chair and cautiously rise, attending more

Keybase proof

I hereby claim:

  • I am jashkenas on github.
  • I am jashkenas (https://keybase.io/jashkenas) on keybase.
  • I have a public key whose fingerprint is 691E E60E 85BF 0C7F 9CA8 2051 C8D8 109B 7A3F 658B

To claim this, I am signing this object:

From Imperium by Ryszard Kapuściński, first published in Poland in 1993:

Page 277

It is not surprising that the Ukrainian Language Society was among those groups attacked and oppressed. The revolution in the Ukraine, like everywhere else, was waged at least partly over language. Half of the fifty-two million inhabitants of the Ukraine either do not speak Ukrainian, or they speak it poorly. Three hundred and fifty years of Russification have inevitably produced such a result. The ban against printing book in Ukrainian was in force for decades. As early as 1876, Alexander II ordered that instruction in Ukrainian schools take place only in Russian. Several months ago I visited the third-largest city in the Ukraine — Donetsk. The battle to open at least one elementary school teaching Ukrainian was by then already in its second year. Teachers assembled children in the park and there instructed them in Ukrainian. Teaching Ukrainian? Why, that was counterrevolution, an imperialist conspiracy!

Also in Donets

var removeOldReports = true;
var removeSocialMedia = true;
var request = require('request');
var _ = require('underscore');
var xml2js = require('xml2js').parseString;
var fs = require('fs');
var moment = require('moment');
function ScrapeKML(cb) {
var request = require('request');
var _ = require('underscore');
var url = "http://forecast.weather.gov/product.php?site=NWS&issuedby=OKX&product=PNS&format=txt&version=1&glossary=0";
var header = "********************STORM TOTAL SNOWFALL********************";
var footer = "**********************24 HOUR SNOWFALL**********************";
request(url, function(err, resp, body) {
if (err) throw err;
@jashkenas
jashkenas / index.html
Last active December 21, 2015 22:58
The Grand (Road) Tour. 2013.
<!DOCTYPE html>
<html>
<head>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<meta charset="utf-8" />
<style>
#map-canvas {
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}