Welcome ! This is the personal site / blog of Graham King. Most people come for the credit card generator, but I think the Categories (top right) are more interesting.
October 3, 2012
Posted in Software at 06:29 by graham
Tools like top show processes using two kinds of memory:
- Resident memory, labelled RES: How much physical memory, how much RAM, your process is using. RES is the important number.
- Virtual memory, labelled VIRT: How much memory your process thinks it’s using. Usually much bigger than RES, thanks to the Linux kernel’s clever memory management.
Here’s a short C program to illustrate the difference:
Read the rest of this entry »
September 12, 2012
Posted in Software at 17:33 by graham
I blogged What is WebRTC over on Lincoln Loop’s blog:
WebRTC, short for Web Real Time Communications, is a specification and project adding JavaScript APIs in the browser to:
- Access a user’s webcam and microphone: getUserMedia.
- Connect directly to another browser: PeerConnection and DataChannel.
Being able to do video calling in the browser is exciting, but to me the most exciting part of WebRTC is the prospect of peer-to-peer apps in the browser, and server-less applications.
What is WebRTC – Read the full article
September 8, 2012
Posted in Ideas, Society at 23:43 by graham
John Cleese gives a great talk on creativity (embedded below). Here’s the summary:
Creativity is a practice, not an ability. It is not correlated to IQ, but is strongly correlated to playfulness.
We have two modes of operation:
- Closed mode: “get stuff done”.
- Open mode: curious, exploratory, playful, open-ended.
We switch between the two modes during the day, both are essential. Creativity however only happens in open mode.
Read the rest of this entry »
September 4, 2012
Posted in Society at 06:39 by graham
Lives of Promise
, by Karen Arnold, is a 14 year study of achievement and life choices. It is based on the finding of the Illinois Valedictorian Project, which follows 81 high-school valedictorians who graduated in 1981. A valedictorian is the person with the highest average grade in their high-school year.
The study answers some interesting questions.
High school success predicts life success very well. Valedictorians continue succeeding at most everything they do, as long as they know the rules of the game. High school success is at best orthogonal and at worst opposed to becoming someone who changes the rules.
Does high school success predict college success?
Yes.
95% of the project members graduated college, most of them doing extremely well. Of the four who didn’t, none of them left school for academic reasons.
A history of academic success, in sum, is an extrordinary powerful predictor of further educational attainment. What high school teachers measure by top grades apparently mirrors what college professors reward. High school valedictorians and salutatorians are as close as it gets to rock-solid bets for superb undergraduate grades and college graduation.
Does high school success predict life success?
Read the rest of this entry »
August 31, 2012
Posted in Society at 09:35 by graham
Most people reading this will be lucky enough to live in a democratic society. You may even consider democracy to be the only ethically legitimate form of government. It is a fair form of government. Nine out of the ten most powerful countries in the world (all except China) have some form of representative democracy, so we can assume it is a very effective way to run a country.
For all the good that we purport to think of democratic systems, most of us spend most of our lives not in a democratic system, but in a power hierarchy. Our businesses and organisations are run as social hierarchies, each person nearer the top of the pyramid having power over those lower down.
When your new manager was hired, did you and your fellow employees get a vote? If you are some way up the pyramid, were you elected there? Most likely, you were appointed by someone who remains above you in the hierarchy.
Most managerial roles combine an administrative function with a supervisory one. Administrative duties do need to be carried out. Motivated employees do not need to be supervised; they naturally supervise themselves.
Our organisations and businesses look like they are modeled on a form of meritocratic feudalism.
Why this difference between the structure of our societies and our organisations? At least one of the two is being run in a less than perfect manner. Should we re-create our national government as a feudal meritocracy? Or should we run our organisations as representative democracies?
July 12, 2012
Posted in Software at 21:00 by graham
I blogged an introduction to and explanation of SPDY, the next-gen HTTP. It should cover all the basics.
SPDY (pronounced speedy) is a replacement for HTTP, and feels like a wrapper for it. SPDY is a packet (frame) oriented binary protocol, usually wrapped in TLS (SSL), and as such a little harder to follow than HTTP. Our care free days in the jungle, surviving on the bare necessities and debugging connections with telnet, are coming to an end. In exchange, we get faster loading apps, which are secure by default.
The most important goal of SPDY is to transport web content using fewer TCP connections. It does this by multiplexing large numbers of transactions onto one TLS connection.
What is SPDY? – Read the rest
June 15, 2012
Posted in Behaviour at 17:15 by graham
Excited to have my first post on Lincoln Loop’s blog, about intrinsic motivation, flow, and why you don’t find cats in offices:
When your client is hundreds of miles away, but your bed only three feet, it helps to understand motivation.
The first thing to understand about motivation is that it’s not something you do to someone. That’s called coercion. With enough power you can make anyone do almost anything, but you can’t make them want to; and typically …
Read the rest at Lincoln Loop
June 14, 2012
Posted in Software at 01:08 by graham
Problem: You’re on a i386 machine, and you need to build for amd64, or vice-versa.
Solution:
Get the libc for the other architecture. Get both, one of which you’ll already have:
# Debian / Ubuntu family
sudo apt-get install libc6-dev-amd64 libc6-dev-i386
Build the Go compiler for the other architecture:
cd $GOROOT/src
GOARCH=amd64 ./make.bash # or GOARCH=386 for the other direction
Set the architecture before building your program:
GOARCH=amd64 go install <my_project> # or GOARCH=386
The first two steps you only need to do once.
Thank you zephyrtronium in freenode#go-nuts for the help.
For other architectures, see Dave Cheney’s An introduction to cross compilation with Go
May 31, 2012
Posted in Software at 23:25 by graham
Unicode maps 32-bit (4 byte) integers, also called code points or runes, to characters. UTF-8 is a way of storing those code points using less than 4 bytes per character.
61 is the Unicode code point for a, 229 is å and 5793 is ᚡ. Unicode is how most modern programming languages represent strings: Java, .Net (C#, VB.Net), Go, and Python3, for example. Code points are usually written as two hexadecimal bytes prefixed by the letter u, or four prefixed by U. In python 3 this will display ᚡ:
print('\u16a1')
Read the rest of this entry »
May 26, 2012
Posted in Software at 01:05 by graham
I attended Vancouver’s Polyglot Unconference, met some wonderful people, and got to present a session on Go (#golang). Here’s broadly what I said:
How do you decide what to learn?
You have an amount of cognitive resources to spend every day, what do you invest them in? You have a pile of books at home you’re going to get to, a growing list of “read later” bookmarks, and a list of tech you’ve been meaning to play with. Hopefully that list will be even longer by the end of today.
I’d like to propose a model for prioritising what you learn. And I’d like to share why I think Go is worth learning.
Picture a Venn diagram, three circles, with their intersection about where I’m standing:
Read the rest of this entry »
« Previous Page — « Previous entries « Previous Page · Next Page » Next entries » — Next Page »