Monday, 2016-04-25

Into Everywhere by Paul McAuley

The second novel set in McAuley’s Jackaroo universe (after Something Coming Through).

If you liked the first book (or like McAuley in general), you’ll like this one.

Thursday, 2016-03-31

March

Nobelparken

Chris & Hanny

Hedda & Anna

Mar 2015 | Mar 2014 | Mar 2013 | Mar 2012 | Mar 2011 | Mar 2010 | Mar 2009

Thursday, 2016-03-24

Thoughts on film

Posts extolling the joys and benefits of photography using film (or “analog” as it’s now inevitably known) have always been present since the digital photography revolution, but I’m noting an upswing now in the nooks and crannies of the internets that I frequent.

Sjöstaden

Now, it’s easy to see why. Film aficionados are dependent on a relatively large industrial base - manufacturing and distributing film stock, a perishable medium, is non-trivial - so growing the user base (or at least slowing its decline) is paramount for the survival of the medium.

I have shot film. I learned photography using film. And I’ll say that for nearly every conceivable use case digital is objectively better.

Now, this doesn’t invalidate people who love film, who use it regularly, or who really enjoy the paraphernalia of shooting film. These are valid choices if we remove the requirements of timely delivery of high-quality, high-resolution digital assets to clients, whether these clients are entities paying for the asset or more nebulous things like “social networks”.

Let’s tackle the talking points, shall we?

Shooting film teaches you about photography

Now I can actually see the point of this. Instead of dealing with auto-ISO, exposure modes, and scene buttons, you’re faced with a shutter dial, an aperture dial and a match needle. Shoot enough and you’ll get an instinctive feel for how the two hang together.

Angelica

That is, if you’re using a classic manual focus camera, like the Pentax K1000, the Nikon FM, or Olympus OM-1. If you’re using a newer film camera you’ll notice that they can be just as complicated as digital cameras, because it turned out all that automation actually helped people make pictures they wanted to keep.

Instead of getting a film camera, you can invest maybe 15 minutes watching a Youtube video and then half a day using your digital camera in manual mode, and learn the basics of exposure that way. It’s not that hard.

A bonus is you can directly check the effects on the back of the screen, instead of waiting for the film to be developed and correlating the shots with handheld notes about exposure.

Shooting film makes you slow down and appreciate every shot

Well obviously. But do you think the masters of photography scrimped and hoarded film? No they didn’t, they had the same hit rate the rest of us have but they had the dedication to keep shooting no matter what the cost. Independent wealth (Cartier-Bresson), grants (Frank) or plain scrimping and saving (Maier) enabled them to keep shooting and getting wheat from the chaff.

Giulio and Michael

As a digital shooter, every shot is basically free at the margin. But instead of using this opportunity to shoot more and getting better, people are complaining about full hard drives and slow editing.

The answer is not to shoot less, it’s to shoot more but better. This is true with film or digital.

Shooting film is a more tactile experience

I can’t really argue with this - at least not with the classic manual cameras noted above! Try shooting a plastic wundermachine from the 90s and you’ll be disabused of the notion, unless the buzz of an autowinder and the whine of screw-driven autofocus is part of your preferred tactile experience.

29740061

I can also understand that if you’re in front of a computer all day you might want to relax with making images “the old fashioned way”. But at least then you’re aware of the tradeoffs.

Pictures taken with film have a unique look

I’ll grant this for images taken with medium format or large format. The interplay between field of view and focal length give these formats a unique look that’s hard to replicate in software.

Sindy

For small-format images though? I bet there’s a filter or preset for every film worth shooting. Even if there isn’t, you carefully crafted, exquisitely presented “lo-fi” film images will be met with “Cool! what filter did you use?”. That is if you’re lucky.

So, you really hate film, don’t you?

Actually I don’t. It’s a free world (at least where I am, thanks for that) and you are welcome to shoot film and tell me it’s the best thing since sliced bread. But you’re not going to convince me, because I’ve heard it all before. And I’ll definitely not grade your work on a curve because you shoot film.

Hanna

Monday, 2016-02-29

February

Garnisonen

Djurgården

Madrid

Feb 2015 | Feb 2014 | Feb 2013 | Feb 2012 | Feb 2011

Sunday, 2016-01-31

January

Ester

Djurgårdsbrunnsviken

Stockholm / Östermalm

Jan 2015 | Jan 2014 | Jan 2013 | Jan 2012 | Jan 2011 | Jan 2010 | Jan 2009

Tuesday, 2016-01-19

Roadside Picnic, a novel by Arkady & Boris Strugatsky, and Сталкер, a film by Andrei Tarkovsky

I picked the book up thinking it would be a re-read from my teenage years, but I didn’t remember anything about it so I must have just thought I read it[1]. I do remember seeing the movie around that time though, as the totally awesome film club in my hometown showed a Tarkovsky retrospective.

The novel and film have little in common, apart from the Zone, the fact that the Stalker has a “defective” daughter, and that the Zone contains something that grants wishes. In the novel, the Stalker Red is depicted as a tough man, skilled in the arts of getting objects out of the Zone and selling them for profit. In the movie, he’s a mystical guide. However, Tarkovsky’s scenography is absolutely spot on, depicting the Zone as an overgrown wilderness containing hidden dangers.

Of course, the concept of “the Zone” has taken on a new meaning after Chernobyl, but it’s interesting to see that Tarkovsky could find settings in the FSU long before that.

The Wikipedia entry for the novel mentions that it was censored at publication. It would be interesting to know that the censors found objectionable. The protagonists are depicted as thieves and profiteers, but they’re also supposed to be Canadian. Maybe the problem was that the antagonists were among the authority figures?

[1] The SF shelf at the local library had quite a lot of Strugatsky and Lem, maybe because they felt that most SF was too “American”.

Thursday, 2015-12-31

December

Evguenia & Nathalie

Juldagen

Dec 2014 | Dec 2013 | Dec 2012 | Dec 2011 | Dec 2010

Wednesday, 2015-12-30

The Peripheral by William Gibson.

Reading Gibson is always a treat. Nice to see him still firing on all cylinders.

Tuesday, 2015-12-22

Luna: New Moon by Ian McDonald

Easily McDonald’s most bloody book, even if the themes of corporate warfare and melange of cultures can be traced all the way back to Desolation Road.

I love everything this dude writes so I highly recommend this.

Monday, 2015-12-14

Advent of Code 2015

Project website: Advent of Code.

I started on these puzzles on 7 Dec 2015. So far I’ve completed all of them, all but a few on the same day they were posted.

I use Perl for all the solutions.

Most assume the input data is in a file called input.txt in the same directory as the file. Some require extra modules from CPAN.

A note on scoring

I score my problems to mark where I’ve finished a solution myself or given up and looked for hints. A score of 2 means I solved both the daily problems myself, a score of 1 means I looked up a hint for one of the problems, and a zero score means I didn’t solve any of the problems myself.

Final score: 43 / 50.

All files in one zipped archive.

Days 1 to 4 - Day 5 - Day 6 - Day 7 - Day 8 - Day 9 - Day 10 - Day 11 - Day 12 - Day 13 - Day 14 - Day 15 - Day 16 - Day 17 - Day 18 - Day 19 - Day 20 - Day 21 - Day 22 - Day 23 - Day 24 - Day 25

Days 1 to 4

Day 5 — Doesn’t He Have Intern-Elves For This?

My solution: part 1 - part 2.

I had to get help with part 2 here, found a regexp in the daily solutions thread for this day.

Score: 1.

Day 6 — Probably a Fire Hazard

Part 1 - part 2.

These could definitely be faster, both run in around 30s.

Score: 2.

Day 7 — Some Assembly Required

Had to scrounge around for tips on how to solve this. I had the basic idea down but the problem was keeping track of the solutions as I iterated around.

Score: 0.

Day 7

Day 8 — Matchsticks

Easily the most boring of the problems so far.

Part 2 only.

Score: 2.

Day 9 — All in a Single Night

Essentially the travelling salesman problem but the number of destinations is small enough to brute-force easily. Uses the Algorithm::Combinatorics module. Output is a list of permutations with the total travelling distance prepended, so just use sort -n to find the answer from the output.

Score: 2.

Day 09.

Day 10 — Elves Look, Elves Say

Another computationally expensive problem but even part 2 runs in under 1 minute for me.

Submitted 3h25m after puzzle release.

Score: 2.

Day 10.

Day 11 — Corporate Policy.

So far my favorite problem!

Submitted 5h56m after puzzle release.

Score: 2.

Day 11.

Day 12 — JSAbacusFramework.io.

Another good puzzle. Uses the JSON module.

Both solutions in one file, just comment one line to get part 1.

Submitted 9h25m after puzzle release (I blame family commitments on weekends!).

Score: 2.

Day 12.

Day 13 — Knights of the Dinner Table.

This is a modified day 9 with bidirectionally. Even part 2 which adds another element to the permutation finishes very quickly using brute force.

Submitted 5h03m after puzzle release.

Score: 2.

Day 13.

Day 14 — Reindeer Olympics.

A troll! The immediate brute force approach is to simply advance time 1s at a time and check the “position” of each deer at that time. But this is “obviously” dumb so I used a quicker approach for part 1. Part 2 made me regret it…

Submitted for 2 stars 4h04m after puzzle release.

Part 1, part 2.

Score: 2.

Day 15 — Science for Hungry People.

A combination of outside factors and frustration at getting my indexes right made this a tedious slog.

Submitted for 2 stars 9h45m after puzzle release.

Score: 2.

Day 15.

Day 16 — Aunt Sue.

A fun one. Submitted for 2 stars after 2h37m.

Score: 2.

Day 16 part 2.

Day 17 — No Such Thing as Too Much

Tried a recursive approach first, but got stuck for the part 2 and looked in the daily thread for inspiration. Figured out how to use combinations by looking at other’s code.

Submitted for 2 stars after 6h18m.

Score: 1.

Day 17.

Day 18 — Like a GIF For Your Yard

Conway’s Game of Life! I’ve never coded this before so it was a fun exercise.

I tried using arrayrefs first but got tripped up by the deep copy (dclone i n the code) and decided to go for a hash of hashes instead. I think this contributes to the slow execution time of ~15s.

Submitted for 2 stars after 6h00m.

Score: 2.

Day 18.

Day 19 (Saturday) — Medicine for Rudolph

A tough one! I solved part 1 no problems but had to hunt around for hints for part 2.

Day 19 part 1.

Score: 1.

Day 20 (Sunday) — Infinite Elves and Infinite Houses

Lack of time and impatience led me to look for hints for this. I had the right initial idea but thought looking for divisors of an integer without the PARI package would be too slow, and I have yet to find a way to install that on the machine I’m using.

In the end it didn’t matter but I wanted this done.

Full credits in source.

Day 20.

Score: 0.

Day 21 — RPG Simulator 20XX

I went for a straightforward solution of generating all combos of items and then running a simulated battle with each.

Day 21.

Score: 2.

Day 22 — Wizard Simulator 20XX

Not a very good solution, relies on brute force to simulate all possible spell casts and then prints out a win or loss. Note that I had to run it for 5M iterations to get the answer to part 2. This is the only problem I didn’t finish in the same day as it was released (apart from the 7 first ones).

Day 22.

Score: 2.

Day 23 — Opening the Turing Lock

Straightforward apart from the slightly ambigious jio instruction — read carefully what it means.

Day 23.

Score: 2.

Day 24 (Christmas eve) — It Hangs in the Balance

I tried to finesse the answer by hand first but it didn’t simply work to manualy adjust the packages to get desired answer. Instead I checked valid combinations, but with the following assumptions/optimizations:

  1. I sorted the packages in descending order to check those combinations first.
  2. I assumed the answer wouldn’t contain more than 6 elements, so just checked combinations up to that value of k.
  3. I didn’t bother to confirm the remaining packages would sum correctly.

Runs in about 2s.

Day 24.

Score: 2.

Day 25 (Christmas day) — Let It Snow

Straightforward iterative solution. Runs in over half a minute, those with CS backgrounds used modular exponentiation and got much faster results.

Day 25.

Score: 2.

(un)License

The solution files are in the Public Domain.