| Title | Author | Published | Pages |
|---|---|---|---|
| The Linux Command Line: A Complete Introduction | William E. Shotts Jr. | 2012 | 480 |
| A Philosophy of Software Design | John Ousterhout | 2018 | 190 |
| The Soul of A New Machine | Tracy Kidder | 1981 | 320 |
| Thinking in Systems: A Primer | Donella H. Meadows | 2008 | 240 |
I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.
This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea
| mkdir ~/vim | |
| cd ~/vim | |
| # Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
| # Compiled on Jul 20 2017 | |
| curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
| export VIMRUNTIME="$HOME/vim/runtime" | |
| export PATH="$HOME/vim:$PATH" | |
| cd - |
| require 'open-uri' | |
| require 'nokogiri' | |
| doc = Nokogiri::HTML(open('http://www.iana.org/domains/root/db')) | |
| tlds = [] | |
| doc.css('table#tld-table tr').each do |tr| | |
| info = tr.css('td') | |
| next if info.empty? | |
| tlds << { |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.| require 'date' | |
| class ExpiredTodoError < StandardError; end | |
| # Implementation # | |
| def todo(what, by_date) | |
| if production? || (Date.parse(by_date) >= Date.today) | |
| yield | |
| else | |
| raise ExpiredTodoError, "TODO: #{what}" |
| package preloadagent; | |
| /** | |
| Copyright 2010 Sam Pullara | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
| #!/usr/bin/env ruby | |
| # | |
| # Use to filter strace output associated with ruby/EM processes running with EM.epoll | |
| # sudo strace -ttTp <ruby process pid> -o ruby.strace | |
| # cat ruby.strace | ./em-strace-filter.rb > filtered.strace | |
| # | |
| require 'time' | |
| begin_time = nil | |
| end_time = nil |