Monday, May 25, 2015

VIM resource file

I have been using the VIM editor for something north of twenty years now. Even when my "primary" editor has been Visual Studio or SlickEdit, I still use VIM for quick tasks and for diffing (along with the indispensable GNU diff utility). And really, I'm far from a master with it. It occurs to me that reading back over my VIM resource file is almost like a mini personal archaeology of my programming experience. I have the simple stuff from my early days in college, a lot of the GUI movement things came from later when I started into CS more seriously, and then bits and pieces added that reflected what I was doing in my jobs. The editor wars will never really end, though the old text editors are increasingly taking a back seat to IDEs that are better at navigating through large projects or reflect the more complex work flows of modern applications. In the end a useful tool never really stops being useful.

My .vimrc:

"Basic editing behaviors
set showmode      "mode info at the bottom of the screen
set backspace=indent,eol,start "allow full backspace movement
"set autoindent    "regular auto-indent
set smartindent   "a more advanced indenting option
"set cindent       "strict rules based indenting
set columns=95    "preferred window width
set lines=40      "preferred window height
set expandtab     "use spaces instead of tabs
set ruler         "show line and column numbers
set showbreak=<=  "what to print at front of wrapped lines
set showmatch     "blip to matching brackets
set shiftwidth=2  "code indention size

"search behaviors
set nohlsearch "highlights all matches to a search
set incsearch  "search incrementally
"set smartcase  "only be case sensitive if a capital is in the search string
set ignorecase "case insensitive searching

"file behaviors
set directory=c:\windows\temp "set the swap file directory
set wildignore=*.o,*.class "ignore these files when doing filename completion

"status line stuff
"always show the status line
set laststatus=2           "always show the status line
"set statusline=%t\ %h%m%r%=%-12(0x%02.2B\ %b%)\ %c,%l/%L "broken out below
set statusline=%t          "filename (not fully qualified)
set statusline+=\ %h       "help file indicator
set statusline+=%m         "file modified indicator
set statusline+=%r         "file read-only indicator
set statusline+=%=         "shove the rest to the right (left/right separator)
set statusline+=%-12(0x%02.2B\ %b%)
                           "hex value of the character under the cursor padded
                           "  with zeros to min and max of 2 characters long [0x%02.2B]
                           "  followed by decimal value of the character [%b]. All
                           "  of this left justified and padded to min 15 characters
                           "  [%-12( ... %)].
set statusline+=\ %c,%l/%L "column cursor is in

"GUI commands
highlight Normal guibg=Black guifg=White
"set guifont=Consolas:h10:cANSI  "Set the font (***PLATFORM SPECIFIC***)
set guifont=DejaVu_Sans_Mono:h9:cANSI  "Set the font (***PLATFORM SPECIFIC***)

"Color and syntax highlighting stuff
set background=dark "MUST be before other highlighting settings
syntax on           "turns on syntax highlighting
highlight Comment   guifg=#DDA0DD "HTML Plum
highlight Constant  guifg=#FF6347 "HTML Tomato
highlight Statement guifg=#5588FF "A mid-intensity blue
highlight Type      guifg=#5588FF "A mid-intensity blue
highlight PreProc   guifg=#7CFC00 "HTML Lawn Green

"Session stuff
set sessionoptions-=options "Don't save options with the session

"Make the HOME key go to the first non-whitespace character the
" first time it is hit, and then to the first column.
fun! s:SmartHome()
  if col('.') != match(getline('.'), '\S')+1
    norm ^
    :call cursor(line('.'),2)
    norm h
inoremap  :call SmartHome()
nnoremap  :call SmartHome()
vnoremap  :call SmartHome()

"Add shortcut keys to move between buffers (not to be confused with
" moving between windows, which is shortcutted below).
" Alias Alt-Up to move to the previous buffer
nmap  :bp!
" Alias Alt-Down to move to the next buffer
nmap  :bn!

"Alter split switching behavior to make me happier
set winminheight=0  "This allows open windows to display as status line only
" Alias Ctrl-Down to move down a window
map  j_
" Alias Ctrl-Up to move up one window
map  k_
" Alias Ctrl-Right to move right one window
map  l
" Alias Ctrl-Left to move left one window
map  h
" Alias Ctrl-h to 'maximize' the window
map  _

" Use specific file type highlighting for files with a given extension.
"au BufRead,BufNewFile *.bob setfiletype cpp

Watching the Watchers: Tracking Makes the Web Worse

Internet privacy is a fairly recent addition to the list of oxymorons like military intelligence and classified advertisement. Privacy issues on the internet interact constantly with monitization attempts, because, the old cliche tells us, if you aren't paying for the product then you are the product. Increasingly, "big data" analytics drive more and more advertising. And for that to be effective, there must be a way of establishing patterns, tying all the movements on the internet together. And of course, there are. Mostly in the form of tracking cookies or javascript snippets that can tell a server where you are. Recent work by Monica Chew and Georgios Kontaxis using the currently-in-development tracking protection feature of the Mozilla Firefox browser to look at the top 200 news sites resulted not only two thirds less cookies than usual on a system but also a better than 40% reduction in average page load times and nearly 40% reduction in data use. Learning the performance of web pages is harmed by tracking and analytics is hardly a surprise, but learning how big that number is surprised me. With the ascendance of mobile and the attendant data caps, the data usage is hardly something to overlook either. And so as commercial interests struggle to make themselves relevant to our personal interests, they add drag into the system. On the other hand, something has to pay the bills for those news sites, because it seems the users sure aren't interested in doing so anymore.

Watching the Watchers: Science, Politics, and Pragmatism on the NC Coast

Coastal regions will see the most direct and immediate impacts of climate change. Here in NC, the extensive, popular coastal region anchors several powerful political forces. Those forces, along with energy producing corporations and development interests, have shifted the actions of the state away from looking at the long-term predictions of scientists. Aljazeera America gives a very nice overview of the situation and how some of the coastal communities and their governments are reacting.

Friday, May 22, 2015

Bookworming: Art Before Breakfast

Art Before Breakfast, Danny Gregory, *
A few years ago I read The Creative License and I heartily recommend that book over Art Before Breakfast. If you have any exposure to Gregory's writing before, there is very little new in this book, and far less than the claimed zillions of ideas on hand. If you haven't, this one isn't substantial enough to give you a real taste of his inspirational style. The central message (you can find ten minutes a day to draw something) is a good one, but in my eyes it isn't instructional enough for beginners or deep enough for more serious hobbyists.

Bookworming: Mistborn: The Final Empire

Mistborn: The Final Empire, Brandon Sanderson, ****
The Final Empire is a swords and sorcery novel with a unique take on the sorcery part which uses the framework of a long-form heist. Half of the fun of a heist story is seeing how things are dealt with when everything doesn't go as planned. And this one certainly delivers on that. The primary characters are interesting and well handled. The secondary characters are fleshed out just enough for the story and not much beyond. The world building is solid without taking over, which would have been possible with a world where ash falls from the sky, mists rule the nights, and colorful plants are unknown. Even the enemies are suitably threatening. And perhaps most importantly for the first book in a trilogy, Sanderson created a fully self-contained story. There are plenty of threads left for moving forward, but they are all outside the core of this story. A solid tale well told.

Thursday, May 21, 2015

A Boy's First Space Opera

"We're off to outer space."

By the mid 1980s, my geek/nerd tendencies were already well formed. My interest in the apocalyptic first manifested as a fascination with volcanoes, with the catastrophic 1980 eruption of Mt. St. Helens focusing that interest. At the same time Space Shuttle launches were still a new thing that school classes stopped to watch. NASA was taking people into space and bringing them back again, and my young mind was inspired. It was in those years my obsession with space opera began. It was the time of finding Star Trek reruns, Battlestar Galactica after lunch on Sunday, and British sci-fi like Doctor Who and The Tripods on PBS. But those were the effect, not the cause. My beginning started a little earlier.

"We're leaving Mother Earth."

The action cartoons of the early 80s were often built around toy lines, things like GI-Joe, He Man,  and The Transformers.* There were colorful characters fighting crazy exaggerated villains, but the chief factor that all observed (and this even carried over to live action shows like The A-Team) was that nobody ever died. The good guys always won in the end, and the bad guys always managed to get away. GI Joe was especially egregious in this regard, with its tech directly inspired by the real world of cold-war military machines and then pushed into the realm of sci-fi lasers and James Bond-esque plots. All the lasers, missiles, tanks, and so forth never managed to actually kill anyone. Exploding planes were always accompanied by parachuting pilots. A tank taking a direct hit always left enough time for the driver and gunner to bail out before the vehicle exploded. No matter how many times Optimus and Megatron faced off, neither ever really defeated the other. I loved the cartoons anyway, and badgered my parents into getting me the toys too. So maybe that intrinsic lack of consequences would never have bothered my young mind if something entirely new hadn't come along. That something was the first wave of Japanese imports.

"To save the human race."

As I remember it, there was a particular time slot on weekday afternoons on one of the local UHF channels that showed three different shows from Japan. The first one had been on for a while before the other two were added. That was Speed Racer, the cartoon that forever ruined NASCAR for me. The crazy, poorly animated, utterly distinctive madness of jumping, wrecking racing was completely different from the toy tie in shows (though it did sell some Hot Wheels if I am honest). The second was Ultraman, the rubber-suited hero fighting rubber-suited monsters great-great-grandaddy of the Power Rangers, which I will admit I did not like all that much.** Both were unusual enough to hold my eyes, but they ultimately still followed their own formulas. The third show was something else entirely: Star Blazers.

"Our Star Blazers"

By some miracle, I managed to see Star Blazers from the beginning in a time before TV recordings were available. And that was critically important because Star Blazers was a true serial. It is hard to overstate how different that was at the time. The first episode sets the tone, opening on an over-the-shoulder view of a man gazing at a Mars-like red planet with a few wisps of white cloud. The voice-over begins, "I can not bear to see what has become of Earth." Yes, the Earth has been devastated by an implacable enemy firing radioactive asteroids from the vicinity of Pluto. The remnants of Humanity have constructed underground cities to escape the radiation, but every day that radiation creeps deeper, and within a year the planet will be uninhabitable. We quickly learn that the man is Avatar, the Captain of the last remaining space battleship in Earth's fleets, and his tiny fleet is about to go into battle near Pluto against the vastly superior Gamalon forces. If I now refer back to the formula mentioned above where the good guys win and the bad guys loose, then you might get a glimpse of the surprise a child might feel when the Earth fleet gets summarily crushed. The battleship's weapons can not penetrate the armor of the enemy's battleships. While they get in a few missile kills, the battleship hull is holed and its escort ships destroyed. Avatar orders the retreat, but the Captain of the final remaining escort ship disobeys and takes it into battle to buy the flagship time to get away. And that's just the first ten minutes.

The rest of the episode introduces some of the other characters, including Derek Wildstar, the younger brother of the escort ship captain, now angry with Avatar for leaving his brother behind to die, his friend Mark Venture, nurse Nova, IQ-9 the genius robot, and Doctor Sane. Wildstar and Venture retrieve a message capsule from the wreckage of an alien ship on Mars. That capsule contains a message from Starsha, ruler of a distant planet, offering technology that can remove the radiation from Earth and designs for a faster-than-light engine that will give the humans the capability to retrieve it. It closes with Wildstar and Venture unsuccessfully intercepting a Gamelon patrol that seems to be interested in the wreckage of the World War II battleship Yamato, which the evaporation of the oceans has exposed. It will take another episode before the secret of the Yamato is revealed. The Earth forces have built a new space battleship, the Argo, out of and disguised by the hulk of the old ship and fitted it with Starsha's wave motion engine. It takes another episode still before the ship actually launches. And so begins the first serial space opera I ever saw.

While the pattern of the hero's journey is there in many ways, Star Blazers had themes much deeper than any of the adjacent cartoons. In place of the colorful toy characters you see the grief of a young man who lost his parents and the older brother he idolized to war. You see the grief of an old man who survived longer than his daughter and son-in-law. You see the conflict between hatred of an enemy unknown and the openness to learn about that enemy. There is an entire episode in which the crew has one last chance to speak to family on Earth before they go out of range, giving the characters connections and depth unheard of in a child's cartoon.  It introduces a very Japanese tone of honor, including the idea of the honorable enemy. It is a gateway into World War II history, via the ship itself which was in real life the largest battleship ever created, and via the cultural legacy of the only country to ever experience the horror of nuclear bombing. Already not a very covert metaphor, I would learn much later that the original show did not change the name of the battleship, nor give its crew an independent name. The ship and crew were referred to as one, Yamato, a name that can also mean Japan and/or Japanese in general. The entire thing can be read as a post-WWII cultural allegory.*** Is it any wonder that my tastes were changed? Even today, I find that the story, or at least the depth behind the story, holds up for me. Though the cartoon itself has aged, it has aged about as well as any late-70s era space opera for children is likely to. But of course, I am biased. You don't forget your first geek obsession.

Star Blazers is available on youtube (though it seems many of the videos are buggy) through Manga Entertainment, and via Manga Entertainment's Roku channel the last time I checked. My impressions are based on the first two seasons; I never saw the third.

For another's experience read, io9's Charlie Jane Anders's "Star Blazers Got Me Through the Shittiest Year Of My Childhood".

Images used in this article are from Yamato 2199, a recent remake of the original's first season from studios Xebec and AIC. Which is both fairly faithful to the original story (and ship designs) and very beautiful. As far as I can tell they are copyright Voyager Entertainment and used without permission, since I could not find any promotional art. Yamato 2199 is available on (very, very expensive) DVD and Blu-Ray.

*  Notable exceptions to the toy-tie-in rule, including Thundarr the Barbarian and Space Ghost, often came from Hanna-Barbera.
** I'm still not overly fond of the 'kaiju' genre, though like Ultraman I can watch and get some enjoyment from good ones.
*** I believe there are definite parallels to be drawn between the WWII influence on Space Battleship Yamato and the 9-11 influence on the more recent Battlestar Galactica series.

Saturday, May 16, 2015

Mad Max: Fury Road

Even after thirty years, the future still belongs to the Mad.

I saw Mad Max: Fury Road this afternoon, and it was superb. Not just the best Mad Max movie ever, but one of the best action movies I have ever seen, period. Max was properly laconic, and properly mad. The bleak landscape was gloriously not monochrome. The aesthetic of metal and chrome was turned to 11. The stunts were super athletic. The heavy use of practical effects really gives it weight. The sets, cars, and other props are proper pieces of artwork. The directing lets you see them all while still making sure you know what's going on during all the action. It was an amazing ride, with astonishing pacing that allowed a surprising amount of character touches, from actors who were totally on point, without ever actually seeming to slow down.

Theron's Furiosa very nearly steals the entire show, and stands confidently as every bit the badass that Max is. For my money, Furiosa has the potential to be for this generation of sci-fi/fantasy kids what Weaver's Ellen Ripley was for mine.

Mad Max and Mad Max 2: The Road Warrior were the defining archetype of the post-apocalyptic action movie. Westerns with cars instead of horses, insanity instead of Indians, and gasoline instead of gold, backed by a reversal of the frontier's promise of endless potential to one of endless collapse. Max himself was envisioned as a legendary figure, the movies as stories told about him. Fury Road brings the legend back for a new generation, and this legend has grown in the telling.

Honestly, I don't really even have the skill to properly analyze or describe how magnificent an action movie this was. Instead, I will leave you with a few quotes from better writers than I that capture why I haven't stopped smiling since leaving the theater.

"A myth of the time of steel and petrol, that’s about collapsing back into dark history. ... FURY ROAD doesn’t feel like a modern film. It’s a throwback to classical filmmaking. A scream from the nightmares of the last century." —Warren Ellis

"The peculiar glory of huge physical objects in hard kinetic service to the fantastic." —William Gibson via Twitter.

"You don’t realize just how crappy most action movies are, until you see something like Mad Max: Fury Road... After three previous Mad Max films, Miller understands that the post-apocalyptic story isn’t so much about the collapse of society’s institutions, but about what replaces them — and he’s fascinated by the twisted attempts to create a functioning society in the ruins of our own." —Charlie Jane Anders, review

Saturday, May 2, 2015

TLDR: Avengers 2 is Great

Star Wars showed the world that movies were able to depict epic fantasy in ways never before imagined. Spider Man (2002) proved that technology had advanced enough that making a good super-hero movie was possible, given good enough writing. The concurrent Lord of the Rings trilogy (ending in 2003) showed that big-budget spectacle genre franchises actually could happen as movies. Also around that time the Harry Potter series kicked off (2001-2011) kicked off, showing that if the writing, acting, special effects, and the magic bit of luck are all there, the audiences will follow a huge multi-year franchise.

Yes, historically, the table was all set for the grand Marvel cinematic universe. But even then, it really should not have worked. A series of movies about B-level characters from power fantasies for kids set in a bunch of disparate genres, from the existential sci-fi horror of The Hulk, to the WWII era war stories of Cpt. America, to the Bourne-esque spy-vs-spy of Shield agents, sounds like a terrible idea. And yet, somehow, The Avengers connected in a big way with people. Personally, I think it was on the strength of the character stories, not on the action (though good) and certainly not relying on nerd nostalgia (though the is plenty of payoff for that).

So after such a great first time out, I went into Avengers 2 with hopes that maybe it would be as good as the first one, but some doubts too. I am happy to report that for my money Avengers 2 was better than Avengers. Perhaps better even than Guardians of the Galaxy, if only because it was more grounded, more serious, and more connected to the universe being built by Marvel. At to have an even larger ensemble than the first, it still managed to get in a bunch of character moments between the action beats. And that, of course, is why it still works so well.

I guess this means I'm in for Ant Man. As nutty as that sounds. And I still ponder one of my favorite speculations: as we now hear the tales of Heracles, Gilgamesh, Shahrazad, Moses, and indeed Thor, in another thousand years, who will the legendary gods and heros of myth be?