Mashing the marvelous wrapper until it responds, part 1: prereq/setup

I haven’t used a dynamic language for coding nearly as much as strongly-typed, compiled languages so approaching Python was a little nervous-making for me.  It’s not every day you look into the abyss of your own technical inadequacies and find a way to keep going.

Here’s how embarrassing it got for me: I knew enough to clone the code to my computer and to copy the example code into a .py file, but beyond that it felt like I was doing the same thing I always do when learning a new language: trying to guess at the basics of using the language that everyone who’s writing about it already knows and has long since forgotten, they’re so obvious.  Obvious to everyone but the neophyte.

Second, is that I don’t respond well to the canonical means of learning a language (at least according to all the “Learn [language_x] from scratch” books I’ve picked up over the years), which is

  • Chapter 1: History, Philosophy and Holy Wars of the Language
  • Chapter 2: Installing The Author’s Favourite IDE
  • Chapter 3: Everything You Don’t Have a Use For in Data Types
  • Chapter 4: Advanced Usage of Variables, Consts and Polymorphism
  • Chapter 5: Hello World
  • Chapter 6: Why Hello World Is a Terrible Lesson
  • Chapter 7: Author’s Favourite Language Tricks

… etc.

I tend to learn best by attacking a specific, relevant problem hands-on – having a real problem I felt motivated to attack is how these projects came to be (EFSCertUpdater, CacheMyWork).  So for now, despite a near-complete lack of context or mentors, I decided to dive into the code and start monkeying with it.

Riches of Embarrassment

I quickly found a number of “learning opportunities” – I didn’t know how to:

  1. Run the example script (hint: install the python package for your OS, make sure the python binary is in your current shell’s path, and don’t use the Windows Git Bash shell as there’s some weird bug currently at work)
  2. Install the dependencies (hint: run “pip install xxxx”, where “xxxx” is whatever shows up at the end of an error message like this:
    C:\Users\Mike\code\marvelous>python example.py 
    Traceback (most recent call last):     
        File "example.py", line 5, in <module>
            from config import public_key, private_key 
    ImportError: No module named config

    In this example, I ran “pip install config” to resolve this error.

  3. Set the public & private keys (hint: there was some mention of setting environment variables, but it turns out that for this example script I had to paste them into a file named “config” – no, for python the file needs to be named “config.py even though it’s text not a script you would run on its own – and make sure the config.py file is stored in the same folder as the script you’re running.  Its contents should look similar to these (no, these aren’t really my keys):
        public_key = 81c4290c6c8bcf234abd85970837c97 
        private_key = c11d3f61b57a60997234abdbaf65598e5b96

    Nope, don’t forget – when you declare a variable in most languages, and the variable is not a numeric value, you have to wrap the variable’s value in some type of quotation marks.  [Y’see, this is one of the things that bugs me about languages that don’t enforce strong typing – without it, it’s easy for casual users to forget how strings have to be handled]:

        public_key = '81c4290c6c8bcf234abd85970837c97' 
        private_key = 'c11d3f61b57a60997234abdbaf65598e5b96'
  4. Properly call into other Classes in your code – I started to notice in Robert’s Marvelous wrapper that his Python code would do things like this – the comic.py file defined
         class ComicSchema(Schema):

    …and the calling code would state

        import comic 
        … 
        schema = comic.ComicSchema()

    This was initially confusing to me, because I’m used to compiled languages like C# where you import the defined name of the Class, not the filename container in which the class is defined.  If this were C# code, the calling code would probably look more like this:

        using ComicSchema;
        … 
        _schema Schema = ComicSchema();

    (Yes, I’m sure I’ve borked the C# syntax somehow, but for sake of this sad explanation, I hope you get the idea where my brain started out.)

    I’m inferring that for a scripted/dynamic language like Python, the Python interpreter doesn’t have any preconceived notion of where to find the Classes – it has to be instructed to look at specific files first (import comic, which I’m guessing implies import comic.py), then further to inspect a specified file for the Class of interest (schema = comic.ComicSchema(), where comic. indicates the file to inspect for the ComicSchema() class).

Status: Learning

So far, I’m feeling (a) stupid that I have to admit these were not things with which I sprang from the womb, (b) grateful Python’s not *more* punishing, (c) smart-ish that fundamental debugging is something I’ve still retained and (d) good that I can pass along these lessons to other folks like me.

Advertisements

Coding Again? Experimenting with the Marvel API

I’ve been hanging around developers *entirely* too much lately.

These days I find myself telling myself the story that unless I get back into coding, I’m not going to be relevant in the tech industry any longer.

Hanging out (aka volunteering) at developer-focused conferences will do that to you:

Volunteering on open source projects will do that to you (jQuery Foundation‘s infrastructure team).

Interviewing for engineering-focused Product Owner and Technical Product Manager roles will do that to you. (Note: when did “technical” become equivalent to “I actively code in my day job/spare time”?)

One of the hang-ups I have that keeps me from investing the immense amount of grinding time it takes to make working code is that I haven’t found an itch to scratch that bugs me enough that I’m willing to commit myself to the effort. Plenty of ideas float their way past my brain, but very few (like CacheMyWork) get me emotionally engaged enough to surmount the activation energy necessary to fight alone past all the barriers: lonely nights, painful problem articulation, lack of buddy to work on it, and general frustration that I don’t know all the tricks and vocabulary that most good coders do.

Well, it finally happened. I found something that should keep me engaged: creating a stripped-down search interface into the Marvel comics catalogue.  Marvel.com provides a search on their site but I:

  1. keep forgetting where they buried it,
  2. find it cumbersome and slow to use, and
  3. never know if the missing references (e.g. appearances of Captain Marvel as a guest in others’ comics that aren’t returned in the search results) are because the search doesn’t work, or because the data is actually missing

Marvel launched an API a couple of years ago – I heard about it at the time and felt excited that my favourite comics publisher had embraced the Age of APIs.  But didn’t feel like doing anything with it.

Fast forward two years: I’m a diehard user of Marvel Unlimited, my comics reading is about half-Marvel these days, and I’m spending a lot of time trying to weave together a picture of how the characters relate, when they’ve bumped into each other, what issue certain happenings occurred in, etc

Possible questions I could answer if I write some code:

  • How socially-connected is Spidey compared with Wolverine?
  • When is the first appearance of any character?
  • What’s the chronological publication order of every comic crossover in any comics Event?

Possible language to use:

  • C# (know it)
  • F# (big hawtness at the .NET Fringe conf)
  • Python (feel like I should learn it)
  • Typescript (ES6 – like JavaScript with static types and other frustration-killers)
  • ScriptCS (a scriptable C#)

More important than choice of language though is availability of wrappers for the API – while I’m sure it would be very instructive to immediately start climbing the cliff of building “zero tech” code, I learn far faster when I have visible results, than when I’m still fiddling with getting the right types for my variables or trying to remember where and when to set the right kind of closing braces.

So for sake of argument I’m going to try out the second package I found – Robert Kuykendall’s “marvelous” python wrapper: https://github.com/rkuykendall/marvelous

See you when I’ve got something to report.

Non-Diversity Apologists still abound in Comics

I did a dumb thing today.

I read the comments below this post at the Marvel: The Untold Story page:

https://www.facebook.com/MarvelComicsUntoldStory/posts/634186903384002

And immediately lost another month off my life due to the immediate blood pressure spike.

I recovered some of those lost future days by reading the source article upon which the comments were theoretically made:
http://www.vanityfair.com/culture/2015/07/kelly-sue-deconnick-profile

Why do the moron patrol spout their ill-informed opinions when the confounding data is so easy to obtain?  If there was no systemic discrimination biasing the work-for-hire systems at the Big Two (DC and Marvel) towards white males, I’d expect to see a relative population among female creators somewhere better than the female engineering population we see in the tech industry (which according to the best of the paucity of data out there, is around 12%).

Here’s the latest figures for DC’s male-to-female stats:
http://www.bleedingcool.com/2015/07/08/gendercrunching-special-edition-dcyou/

And for reference, here’s a similar study of both DC and Marvel from 2012:
http://www.bleedingcool.com/2012/10/30/gendercrunching-august-2012/

Analysis/conjecture: the % of creators hired by the Big Two who are female has consistently peaked in the low teens, and even % of back-office employees is generally lower than the magic 30% threshold (where “gender diversity” is celebrated, and beyond which females start to experience a marked uptick in pushback, and “diversity initiatives” start to see institutionalized resistance).  And sadly, this is years after fans demand DC take action to change it (and they agreed).  Maybe DC thinks that <10% is their end goal?

Hell, when one of the paragons of progressive thinking and hiring, Apple, can’t even make it past 30%, where do smaller creative companies and the masses of ‘invisible’ tech corporations stand a chance?  Google’s 30% is even held up as an achievement, which is DEPRESSING.

Contrary to what I’ve heard in the comics press and hallways for years, comics fans are about half female these days.  Hasn’t always been that way, but it’s also fascinating that readership has achieved near-parity when many (men of course) predicted it would never, and that maybe it shouldn’t (to preserve the enclave of “what we white males have always enjoyed in the safe past”).  It’s not like there isn’t interest from females, and I’d predict this to bleed into the creative population who’s trying to get a gig there – it would blow my mind that only 10% of the people trying to create comics are women.  (This article mentions women outnumber men in an undergraduate cartooning setting, for example, and then quotes the instructor, “It’s also not uncommon that they’re the best students in class”.)

So assume for a moment the fantastic proposition that there’s a greater proportion of women clamouring for the gig than are getting the gig, what does that say about the selection filter: are those making the hire decisions going to explain this by saying that the greater proportion of women aren’t as talented as the men?  That they aren’t applying through the correct/operative/off-the-books channels?  Or that they are actually just more comfortable hiring people like them (white, male, cis)?

[Relevant anecdote: Bobbie Chase, a female editorial director for DC, was quoted in this article saying, “We’re pursuing people all the time who could be new voices for comic books, but it’s still going to be a predominantly male industry. I don’t think that has to change, but we can certainly make a much better balance.”]

[Another relevant anecdote: Ann Nocenti in this article said, “Its undeniable when you look at industry-wide statistics, women are hired low, their salaries are lower; I think statistically you can say women aren’t treated fairly in any industry.”]

Any answer raises troubling questions that I really hope are being examined and answered honestly, and which will drive systemic change in both the comics and the tech industry.

robliefeldcaptainamerica
Even freakish Cap thinks there’s a problem here

 

Discovered artist: Justin Ponseur

https://m.facebook.com/JPoColors
At the DevSigner conference this morning, Justin McDowell (@revolt_puppy) turned me on to the realistic, natural colour work of Justin Ponseur. 

After a few minutes flipping through his site, I am definitely a fan. His colour work adds another level of gorgeous to even the best artists (and probably covers a lot of sins from the lesser artists).

See me speak at Devsigner Con

My talk “Great Storytelling UX in Comics” has been accepted at the Devsigner conference here in Portland, last week of May.  I’m excited to see more wild-eyed designers discover the amazing variety of ways that comics show us how to engage the user and immerse them more fully in the reading experience.

Have you seen my talk?  If not, this is an affordable opportunity to come see me in my Superman Kilt finery.

Devsigner Con, Portland, May 23-25th.

Image

Let’s talk comics!

Ready? Set? Spidey-sense!

One week from now, I expect to see you smiling back at me from the audience of CHIFOO, hearing me regale you with great UX moments I’ve discovered in my favourite comic books.

Like this one:

20140226-185329.jpg

If that’s not quite enough to entice you out to the warrens of NW Portland, consider this: you will be one of a privileged few who get to see me sporting the masterpiece that is the Superman kilt handcrafted by my lovely partner Sara.

Hope to see you there!

Details here:
CHIFOO Storytelling Comics

Brain-wringing meetups and my upcoming CHIFOO talk on UX of Comics

I’m getting rather excited about my upcoming talk at CHIFOO on Great Storytelling UX in Modern Comic Books.  Over the next few weeks I’ll be finalizing the content and doing a few dry runs to smooth out the kinks and ensure I’m connecting with the audience at each page that I show during the presentation.  If you have the time and interest in seeing where this is headed, or helping out a guy make sure he’s making best use of the audience’s time, gimme a jangle.

Hawkblock

I’ve been out to a few meetups already this year (JavaScript Admirers, CHIFOO, STC) and helped out my poor dog who had a severe glaucoma attack and had to have an eye removed.  She’s bounced back amazingly and doesn’t seem to know that she’s not supposed to be missing an eye, which is a helluva lesson in staying present and adapting to change in this world. (Who knew my dog was a Buddhist?)

cyclops

Where will you find me in the next couple of weeks?

Further out I’m planning on BarCamp Portland 8 and ProductCamp Portland 2014.  Should be a brain-wringer.

Review: Iron Man: Extremis

Iron Man: Extremis
Iron Man: Extremis by Warren Ellis
My rating: 5 of 5 stars

This is a story that redefines Iron Man for me for the 21st century. I’ve re-read this story multiple times, and every time it gives me chills and makes me respect Tony Stark a little more.

Moreso, it makes me respect Ellis as a writer more each time. This is a very tight, compelling read that wastes no time on filler panels, just keeping us sprinting alongside the characters trying to keep up.

Granov brings a very different technique to the visuals – balanced precariously between hyper-realistic and fluidly just-out-of-focus. It was jarring to see such clean visuals the first time I read this, but I’ve since found it is a great way to keep me focused on the core action & storyline.

View all my reviews

I have trouble following long-lived storylines in multiple graphic novels

Saw this review (***Hope on Goodreads) of Chew vol 4, couldn’t agree more:

“The same thing happens every time I get past the 2nd or third book in a graphic novel series – I forget what has come before, and get confused about what is going on. Sometimes it is me, sometimes it is that the authors left things vague. That happened with this one. Since when does Tony have a daughter? Did we meet her before? And a sister at NASA? Eh.”

I thought I was the only person with this problem. I actually went so far as to borrow vol 1 from the library when I got vol 4, just so I could piece *some* of it back together. And then read all the spoiler-y reviews of vol 2&3. It definitely helped, though I was also confused about the sister & daughter. Someday I’m going to buy a selectively photographic memory.