the end is nigh
It seems that the world as we know it is about to end, but most of us haven’t noticed. I guess it’s not the kind of thing you usually want to go noticing.
The “world” I’m talking about isn’t the actual world (I’m pretty sure Earth will be around for a while yet, and I’m quite confident people will be scumming up the surface while simultaneously inhabiting the little worlds inside their heads for at least a bit longer too); I’m not prophesying some pseudo-Mayan-apocalypse scenario, or fireballs, or gods and angels stepping down from on high to mess with us. But a lot of the little details of our daily lives seem to be teetering on some sort of edge, and they’re being inexorably pushed over.
And the internet has done it.
Scott Kurtz, who does PVPonline, has a lot to say about what it means to be a webcomic guy, and how the “old boys” of traditional print comics and syndication view him and his peers, and how they just Don’t Get It™. The internet is a thing that they refuse to acknowledge, and therefore they have no idea that they should be dealing with it, let alone how. For quite a while I wondered at his passion (and, dare I say it, vitriol) on the topic – I understand it’s his medium and his livelihood, but it did seem like he was taking things overly seriously. Now I feel myself definitely coming on board.
According to a TechDirt editorial, MPAA’s number two admits that that industry is “not comfortable” with the Internet. We all remember the SOPA/PIPA thing right? After all, it only happened a week ago. Independent online filmmakers – let me point at, say, Felicia Day as an arbitrary example – are finding out that there are ways to build success on the internet, but Hollywood just Doesn’t Get It™.
By the way, you should read that linked article. It’s not very long, and it sums up quite nicely some of what I’m trying to evoke here. It’s all right, this page will be here when you get back.
And now I’m hearing where my friend Katharine Kerr the author is gloomy because it’s hard to sell books in today’s socio-economo-whatevery climate. It would appear that the traditional publishing monolith isn’t quite cutting it; and yet I know, or know of, a good many folks who are quite successful at independently publishing materials and distributing them using the magical powers of the internet. These vary from hobbyists to RPG creators to professional novel-writing authors; using tools like kickstarter to raise capital, distributing their materials through amazon and the iBooks store and whatever other channels they can find, garnering community support, crowd-funding and crowd-sourcing their success.
Kit’s cool, she gets it; but there’s not a great deal she can do about it. The whole concept of breaking away would be a huge gamble for her, since her books are her entire livelihood, and if it all were to go pear shaped the consequences for her could be quite devastating.
And she can’t change the system; she is just an author. The edifice that is Publishing doesn’t care for or about authors, the same way the music industry doesn’t care for or about its artists. Sure, there are cool “gets it” people like Trent Reznor who make music but aren’t a part of The Music Industry; but to be frank Trent’s a crazy artist who would make his music even if he couldn’t afford to eat. That kind of person will never be brought down by the Machine.
What I was trying to say, before I got all rambly, was that the internet seems to be providing a reach and a voice for people as individuals that hasn’t been possible before. And as a result it’s breaking down all the great conglomerates, which are quite big and far-reaching at the moment, and allowing people to work by and for themselves and to succeed at it.
I know it will have an effect on our day-to-day lives, I can only wonder what that effect will be.
And I hope Kit gets a chance to publish a book by herself, and that it’s a huge success.
The Dice Hate Me
Just for fun, I decided to roll some ability scores using the classic “4d6 discard the lowest” method. I felt like sharing the results, because they include two of my best ever sets of rolls, and two that don’t even meet the old criteria of “…too low if your total modifiers are 0 or less, or if your highest score is 13 or lower.”
- 15 [+2]
- 13 [+1]
- 12 [+1]
- 12 [+1]
- 12 [+1]
- 11 [0]
- 8 [-1]
Total modifiers: +4, Max: 15 – my best ever generalist.
- 16 [+3]
- 14 [+2]
- 11 [0]
- 11 [0]
- 10 [0]
- 8 [-1]
Total modifiers: +4, Max: 16 – my best ever specialist
- 16 [+3]
- 11 [0]
- 11 [0]
- 11 [0]
- 8 [-1]
- 7 [-2]
Total modifiers: 0, Max: 16
- 13 [+1]
- 13 [+1]
- 12 [+1]
- 12 [+1]
- 11 [0]
- 9 [-1]
Total modifiers: +3, Max: 13
Wait, I tell a lie, once (way back, before 3E was published) a rolled someone with two 18s, and nothing below 11 or 12; I don’t remember if that was proper 4d6 though. Ever since then, the dice have hated me.
Ruby Gotchas 1 – Return in Ensure
The difference between Ruby’s implicit “value of a block” and its explicit “return from a method with a value” is best illustrated by example.
def foo
puts 'a'
0
ensure
puts 'b'
1
end
def bar
puts 'a'
return 0
ensure
puts 'b'
return 1
end
irb(main):001:0> foo
a
b
=> 0
irb(main):002:0> bar
a
b
=> 1
The explicit return statement literally means “stop the method right now, and use this return value”, whereas the ensure sub-block’s final value is superseded by the method’s.
The gotcha happens thus:
def baz
puts 'a'
raise 'fail'
ensure
puts 'b'
1
end
def freb
puts 'a'
raise 'fail'
ensure
puts 'b'
return 1
end
irb(main):003:0> baz
a
b
RuntimeError: fail
from (irb):19:in `baz'
from (irb):34
from /usr/bin/irb1.9.1:12:in `<main>'
irb(main):004:0> freb
a
b
=> 1
The same thing happened in Ruby 1.8 – it’s a language feature. This is partly why I don’t use return statements, except when I really want to be explicit about breaking the flow.
beds
When I was a boy my bed had a well-defined and understood head and foot; it had orientation, and a proper way to sleep.
My eldest treats her bed as a great big squishy thing on which sleep is to be achieved, through any and all means necessary.
My youngest begins the night in the usual north-south orientation, but for some reason always rotates 90° in her sleep, and ends up spending most of the night laying across the bed. (At least, until she stumbles into our room, throws her pillow over my head, and spends the rest of the night laying across us.)
My wife sleep on her tummy, and there’s no forgiving that.
3d6 Revisited
After a few sessions (has it been two months already?) using 3d6 instead of d20, I’ve come up with a few revisions and clarifications of the original rules. These are designed to increase the fun; the balance has to be accounted for elsewhere.
| 1,1,1: |
automatic miss.
- If the power has the keyword “weapon” or “implement” you drop the appropriate item;
- If not (or if not possible) you fall prone.
|
| 1,1,2 / 1,1,3 / 1,2,2: |
automatic miss. |
| 2,2,2: | roll 1d2 and add that to the attack |
| 3,3,3: | roll 1d3 and add that to the attack |
| 4,4,4: | roll 1d4 and add that to the attack |
| 5,5,5: | roll 1d5 and add that to the attack |
| 4,6,6 / 5,5,6: |
automatic hit.
- If the attack would have hit anyway, replace [W] rolls with their maximum (crit).
|
| 5,6,6: |
automatic hit.
- If the attack would have hit anyway, add maximum [W] damage (high crit).
- If high crit weapon, add it again.
|
| 6,6,6: |
automatic hit.
- If the power deals damage, add maximum [W] damage (high crit).
- If the attack would have hit anyway, add it again.
- If high crit weapon, add it again.
- If not: use the effect progression *
|
* The “effect progression” is designed so you don’t feel let down when you that glorious
⚅⚅⚅
but don’t have anything to maximise. It came up when our first triple-six was the wizard casting his (non-damaging) “sleep” spell (the houserule there is: the targets automatically fail the first save, and if I’m feeling generous they don’t get the one round of slowedness first.) Since then I’ve come up with a basic guide to letting everyone enjoy the potency of that 1-in-216 chance.
For “negative” effects my progression is:
| pushed/pulled/slid | ⇒ |
prone | ⇘ |
dazed | → |
stunned | → |
unconscious | ⇒ |
¿ 1d4 damage ? |
| slowed | → |
immobilised | ⇗ |
Of course, if it’s obvious that a particular immobilising action should progress to restrained, for example, that’s perfectly alright too. Not to mention blinded, deafened, dominated, weakened, etc.
The “positive” progression is a bit trickier, because there are basically the three parallel progressions:
| cover | → |
superior cover | → |
insubstantial |
| lightly obscured | → |
heavily obscured | → |
totally obscured |
| concealment | → |
total concealment | → |
invisible |
… But at any point it could be totally reasonable for one branch to lead into another, or somewhere else. Those ones I just play by ear.
The overall goal with these progressions is that I want to make my players feel like they succeeded so well (or their spell was so potent) that the effect is the same, but turned up to 11.
d20 or 3d6
I don’t know how to say this, so I’ll just come out and say it:
I’m going to replace my players’ d20 attack rolls with 3d6.
Since it’s my first time DMing 4e, and we’ve decided to start at level 5, I reckon there are enough differences already that making one other change won’t cost too much in terms of organisation. Sure, I’ll have to balance some of my encounters a bit differently, but I did anyway (I’ve never made up a l5 encounter before).
I’ve decided arbitrarily that critical hits and misses will work thus:
- 18 - guaranteed hit, 2 x max total damage
- 17 - guaranteed hit, 1 x max total damage, plus regular damage roll (including all modifiers and bonuses)
- 16 - guaranteed hit, 1 x max total damage (i.e. regular 4e crit)
- 15-6 - regular attack (compare to defense, etc.)
- 5-4 - miss
- 3 - critical miss; if the attack had the “weapon” or “implement” keyword, you drop the weapon/implement in question; otherwise you fall prone.
I guess there are loop-holes and questions, most of which can be sorted out at the table, like: high crit weapons (which will probably add a [second] damage roll on 16+); or what happens when you roll 3 and fall prone while flying; etc. If/when we find good resolutions for these and other issues, I may share them.
I’ll keep the d20s for the regular ability checks, since.. well, who cares, really. And I might let Elite and Solo monsters roll 3d6 for attacks too, depending on the situation, since that will add spice (and hopefully fun) to the fights. Apart from that, regular 4e all the way, I guess, and we’ll see how it goes.
First game tomorrow night.
p.s. Cthulhu is not invited
Software Design
Lemma: the primary function of any computer program is to produce outputs derived from some inputs.
The correctness of a program is defined by its ability to consistently produce the correct/appropriate outputs for any set of inputs. To this end, every program could, given an infinite storage and appropriate retrieval mechanism, be represented by a finite state machine. All computer programs are bounded by limits (the size of an integer, the amount of addressable memory, etc.), so they theoretically have a finite number of possible inputs. Given time to generate the full set of inputs, and the appropriate outputs, every program could be represented by a single lookup operation. Put another way: every program essentially represents a transformation of a set of inputs to a set of outputs, and that transformation is entirely deterministic.
The most important piece of information to take away from this is: how a program transforms its inputs to outputs is irrelevant.
That statement requires some qualification.
The transformation of inputs to outputs is primarily measured by the correctness of the outputs, however other metrics can be applied, depending on the nature of the program. I assert that the most important metric (after correctness) is the time taken to derive outputs from inputs. Since our usual tolerance for erroneous output is “none”, it can be assumed that all programs produce the “right” outputs for a given set of inputs — any program that doesn’t is buggy. Since all programs produce the same outputs, a good differentiator between programs is: how quickly they do it. In all cases, the faster the results are made available, the better. As such, how a program transforms its inputs to outputs is relevant, since a “better” algorithm may produce results more quickly than a “worse” one.
A third metric, easily overlooked in the modern age (especially with “infinite storage” and “infinite processing” options provided by things like cloud computing), is data usage. To whit: using less space is better. This has been accepted as fact since the dawn of computing, possibly born of the historical need to work within the limits of a computer’s hardware. Trade-offs can and will always be made between space and time, trying to find the appropriate balance, so that correct outputs are produced in reasonable time without a chance of over-allocating the computer’s available resources.
That is the key to the third metric: resource allocation and utilisation. If your transformation’s “how” makes optimal use of the computer’s resources, to produce the correct outputs in minimal time, that transformation is as good as it can be.
It’s late and I should be in bed, so I’ll stop rambling and summarise the steps of software design as I see them:
- define the outputs that are considered “correct” for any set of inputs — use boundaries, induction, arithmetic, really really big truth tables, whatever is required
- define how quickly the outputs should be derived (Hint: the answer is usually “as fast as possible”)
- enumerate the resources available on the target computer/platform; processors, storage (registers, cache, memory, hard discs), I/O devices, everything
- sketch out an algorithm that will produce the correct outputs for all inputs, and in tandem devise a resource allocation scheme that supports it
- write it
Fortunately that fifth step is pretty well understood, and is actually (probably) the easiest of all. Really it all comes down to step four — when you find a good solution to that one, the world is your mollusc.
[Reposted from my homepage: http://matthew.kerwin.net.au/20100309_software_design.php]
The Moat
Ever since The Google’s impenetrable fortress of impenetrability was penetrated by The China, our boss/CEO has been terrified of The China breaking into our company and stealing all our IPs.
Despite the fact that we don’t use password authentication, ldap, Windows, or IE8, apparently we’re still at risk. The only real solution (it would seem) is to isolate all our IP infrastructure from the rest of the world. “Air between.” A moat. A void. Isolated. So this may be the last time I can access the internet while at work.
Yes: no twitter, no MSN, no gmail, no ruby-doc.org, no google searches, no company email (that’s on the “outside” side), no printers (ditto). Someone apparently didn’t think it through too much before drawing the line.
Anyway, just letting you know, I might vanish. If anyone should notice.
Wide Screen Web
Every screen these days is wide. As if the traditional 3:4 landscape ratio wasn’t hard enough for presenting text, now we have lap-tops with 800 pixels crammed into a six-inch vertical frame, and 1.6 times that many horizontally; yet we’re somehow expected to present information — textual information — in this environment. I don’t know about you, but I have trouble scanning text when the lines are too long. I’m no design or typesetting guru, but I’m pretty sure it’s a Bad Thing™ to make your text too wide (why else would newspapers use columns?) The two solutions I’ve seen employed most on the web that attempt to deal with the issue are:
- make the text huge — which, yes, makes it easier to read, but the fact that you can only fit a couple of lines on the page makes it feel uncomfortable, and I have a feeling it limits our ability to scan the text; or
- create a portait-oriented panel, with acres of blank margin-space to either side — which is much neater, sure, and it looks more like printed paper and all that, but think of all those pixels going to waste! Something makes my inner programmer feel really uncomfortable seeing all that real estate laying fallow, or worse — filled with horrible wallpaper backgrounds. I actually dislike the narrow-column-with-wide-margins layout more than the hard-to-read, kludgy feeling huge text.
I have an idea — one which (surprise surprise) I’m pretty sure I’ll never implement, but I’ll put it out there anyway: imagine a web browser that defines its viewport as half the width of the screen (say 640px) but twice as high (1600px). Now imagine that insane 2.5:1 portait viewport split laterally and rendered side-by-side on the screen. Each of those columns would be around 1.25:1, not far off the √2:1 ratio we’re used to with A4 paper. Because there would be, effectively, two (let’s say) A6 pages side-by-side, we could quite easily present text to the user in a familiar format (i.e. like a book) without having to unnecessarily supersize anything, and without wasting half the screen’s real estate on empty margins. We could put the scrollbar on the right, as per normal, and marvel at the awesome effect we get when the stuff at the top of the right page scrolls onto the bottom of the left page. I think that would be cool. Page Down could either flip a half-page (the right page onto the left, and the next page onto the right) or a whole page (like a real book). The finer details of the design are pretty free, but I reckon there’s a bit of potential there to make something really intuitive, fun, and useful.
I’ve never actually seen an e-book reader, but apparently they do a similar thing when presenting high volumes of text. Why don’t we have that for the WWW on our regular old general-purpose computers? I think it would be great. Now someone implement it for me, so I can see if I’m right.
PS yes I have a little 11-or-so-inch 1280×800px lap-top, which would roughly equate to two A6 pages (with some space left over for important things like skyscraper ads and sidebars), and at work (where the germ of the idea was originally planted) I have two 1680×1050px monitors: yes, that’s a total of 3360 pixels wide! I could fit almost five A4 pages there, and yet most websites present me with a single (a single) column of text! What a waste!
[Reposted from my homepage: http://matthew.kerwin.net.au/20100211_wide_screen_web.php]
Paternity Part 2
So, a little research has revealed to me the Y-Chromosomal Adam and the Mitochondrial Eve. So apparently chicks have an unbroken matrilineal line too, which is pretty cool. It’s good to know that the things I think of have been thought of before by people who actually know about these things.