I was thinking last night when I was trying to get to sleep -- it's definitely taking me longer to get to sleep than it has been before I delayed the Chlorpromazine ’till bedtime — about topics I could write on for this book on How the Internet Works. There's DNS, of course, which I can wax lyrical about, and is an important part of how the browser determines which server to talk to in the first place. I was trying to think of other protocols to use. What protocols do people typically use these days that aren't HTTP? Lots of people still use mail clients, so I could talk about IMAP and SMTP, explain a little about how they work, having already dived through the stack while talking about HTTP. Last night I was struggling to think of another protocol that's familiar to end users. Virtually everything is tunnelled through an HTTP interface these days! Heck, even IMAP and SMTP is a bit of a stretch when everyone uses Gmail in their web browser! I could stretch a bit and talk about instant messa
Sampling process 61502 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling Atom Helper (pid 61502) every 1 millisecond | |
Process: Atom Helper [61502] | |
Path: /Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper | |
Load Address: 0x10a572000 | |
Identifier: com.github.atom.helper | |
Version: 0.182.0 (0.182.0) | |
Code Type: X86-64 | |
Parent Process: Atom [61234] |
Sampling process 80294 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling Atom Helper (pid 80294) every 1 millisecond | |
Process: Atom Helper [80294] | |
Path: /Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper | |
Load Address: 0x10826f000 | |
Identifier: com.github.atom.helper | |
Version: 0.182.0 (0.182.0) | |
Code Type: X86-64 | |
Parent Process: Atom [80254] |
footer: © 2015 Graeme Mathieson. CC BY-SA 4.0. slidenumbers: true
^ I haven’t done any interviewing for a while but I went through a period of growth in one of the companies I worked for where we were feverishly expanding the development team, so we had to be a little more systematic in our approach to interviewing. Instead of just having an open conversation with candidates to see where it led (which is what I’d previously done in such situations), I wound up preparing a ‘standard’ set of questions. It took a few goes, but eventually I settled on a favourite question for the technical portion of the interview:
^ When I pull up my favourite Internet browser, type “google.com” into the address bar, and press return, what happens?
Essentially, in a software development project, there are three variables we can play with: quality, scope, and timescale (which is directly linked to cost, both in terms of development cost, and opportunity cost).
Quality is the easiest one to cover. Most of the time you don’t want to muck around with quality, though, by not acknowledging it explicitly, it’s often the one that’s sacrificed. Dropping quality is essentially an exercise in deferring cost. If we cut corners, then we’ll build up technical debt, which will have to be paid off later. So dropping quality increases the long term total cost of ownership, because it’s harder to fix bad code that customers are already dependent upon than it is to write good quality code in the first case. One way to trade off quality vs opportunity cost (speed to market) is to explicitly accept that we’re building a prototype in order to test the market, and that the prototype is likely to be thrown away when we build the ‘proper’ system.
So I guess the first question
I'm having an argument about whether it's correct to say "fewer than 1 in 10 people" or "less than 1 in 10 people". Intuitively, I feel that it's definitely 'fewer' so now I'm trying to defend that.
If the subject of the sentence is the people, then it's a no-brainer: people are discrete values (it's not possible to have a fraction of a person -- well, not legally, anyway) so it's definitely 'fewer'.
I'm content to accept that the subject of the sentence is the fraction (a percentage) though. But even still, because the fraction describes a percentage of a discrete quantity, I still think it is itself a discrete value.
"Fewer than 1 in 10 people" describes the range of values from the empty set up to (but not including) the set containing 1 in 10 people. Since a person is a discrete quantity, and cannot be subdivided, the range is a set of discrete sets:
- The empty set
- The set containing 1 person
SELECT buildings.name building, floors.name floor, rooms.name room | |
FROM computers, locations buildings, locations floors, locations rooms | |
WHERE computers.name = ‘Arabica’ | |
AND computers.room_id = rooms.id | |
AND rooms.location_id = floors.id | |
AND floors.location_id = buildings.id |
class CreateNodes < ActiveRecord::Migration | |
def change | |
create_table :nodes do |t| | |
t.string :name, null: false | |
t.integer :path, null: false, array: true, default: [] | |
t.timestamps null: false | |
end | |
add_index :nodes, :path, using: 'gin' |
class Node < ActiveRecord::Base | |
def self.roots | |
where(path: []) | |
end | |
end |
class Node < ActiveRecord::Base | |
def root | |
if root_id = path.first | |
self.class.find(root_id) | |
else | |
self | |
end | |
end | |
end |