Min vän Emil har skrivit ett inlägg om WordCamp 2016 där han tar upp sin känsla av att konferensen inte går tillräckligt på djupet. Jag vet inte med på WordCamp i år men det var precis den känslan jag hade det året då jag var med, så jag misstänker att jag hade hållit med honom i år också.

Jason Snell of Six Colors made a YouTube video as a companion to his MacBook Pro with a touch bar review. In the video he demonstrates how the touch bar behaves in different situations.

Depending on third party adoption of the touch bar, and whether Apple will roll it out to its entire product line fast enough or not, it may either be a very interning new paradigm for computer interaction or it will be a footnote on the road to touch screens everywhere.

Dear internet, just because something isn’t spelled out in a movie doesn’t make it a plot hole. A plot hole is when it contradicts itself.

shadow_beast

I’m still playing Twilight Princess even though I haven’t blogged about it for almost a month. I’ve intended to but haven’t gotten around to it and rather then spend time blogging about playing, up until now I’ve chosen to play it instead.

Once more, this is a game that I think is better the less you know about it so if you haven’t played it and think that you sometime, maybe, possibly, will, stop reading.

So I’ve kept playing and I’ve finished the first two dungeons and I’m getting ready to head for the third one. As far as I can tell I’ve expelled all twilight from Hyrule, so I don’t think I’ll play as a wolf anymore. So far the game is really great. It’s one of my favorite Zelda game, maybe my absolute favorite. I like the darkness and despair about it. It’s gotten me a lot more emotionally invested in the game than I usually are in a Zelda game. The only other time that I’ve actually cared this much about the characters in the game has been Majora’s Mask, hence my idea for the perfect three days, inspired by Groundhog Day.

I like that I know so little, that everything that happens catches me by surprise and that I have very little idea of how far I’ve actually made it into the game. From what the game tells me, this third dungeon will be the last one but based on previous games I might just as well be less than half-way through at this point.

The combats are really intense, both as a wolf and as a human/hylian. Most of the combats feel very intense and the wiimote control scheme makes them feel a bit more real than in other games. You could argue, as some do, that modern Zelda game has lost some of the free world exploration that was such a big part of the first game and if you look at it that way, Twilight Princess is very low on free exploration. There are obstacles spread out all over that makes your path through both the overworld and various underworlds vary linear. However, this does not take away anything from my excitement of playing it. Sure it would be nice to be more free to explore, but I still feel like I’m making the decisions, so I’m happy.

The game also keeps me on the edge of my seat because I feel like I really, really don’t want to die in it and it feels very possible that I might in encounters every now and then. I don’t know if I missed something or if it’s by design, but so far I haven’t manage to find any fairy to keep in a bottle, so I don’t have the usual ”insurance” that I tend to have in Zelda games.

And one more thing, the Shadow Beasts are really creepy! Really, really creepy.

If there’s anything negative to say about the game it’s the fact that some puzzles are hard in a way that doesn’t feel fair. Today I needed to google something for the first time in it. I had no idea about how to taw the Zora’s. (Here’s what I found online. It felt like a failure but I had tried and tried and pondered the puzzle over and over again and when I read the solution I was glad that I did google it. There’s no way I could have figured that out on my own, unless I’ve replayed the game from start and kept playing at a more regular pace. As things are now I’m playing once a week, tops. That means I forget things like a burning lava rock next to a warp portal.

And I’m also very confused by where I’m allowed to start if I’m saving and quitting, so that means I tend to not play if I don’t know that I can put at least two hours into the game.

The situation in the US is seriously fucked-up right now. I feel so much despair. Is this the beginning of the end of the free world?

Yesterday I wrote about a problem that I’m having with a WordPress plugin that I’m working on, and I said that I think it’s a bug in WordPress. Here are some more information about it.

What the plugin is supposed to do

The plugin should cross-post/syndicate any new post to Twitter. There are a lot of plugins already that does this, but I wanted a few special features.

  • If a post has a title, post the title and a link back to the blog to Twitter. (If the title is too long for Twitter, truncate it.)
  • If a post doesn’t have a title and is 140 characters or less, post all of it to Twitter.
    • If it is more than 140 characters long, truncate it and post the truncated text plus a link back to the blog to Twitter.

So far so good. This all works as intended. There is however one more thing that it’s supposed to do:

  • If I’m posting a link post, a link to the thing I’m linking to, not a link back to my site, should be posted to Twitter along with the title of my post.
    This is accomplished by the use of Post Formats. I give every link post Post Format link.

The technical part

The plugin hooks into the publish_post action and early on in its code it checks if ( get_post_format( $ID ) == 'link' ). If it returns true an XPath query retrieves the href of the first <a> element and uses this instead of the permalink in the Twitter post.

The XPath part works just fine in all my tests.

The problem

As long as I post from the WordPress Admin interface, everything works as intended. The problem occurs when I post using the Press This bookmarklet. When I post this way, if ( get_post_format( $ID ) == 'link' ) never returns true, regardless of the post format.

If I create the post using Press This but instead of publishing I save it as a draft and then publish from the Admin panel, it works as intended.

Do you have a solution?

If so, please let me know.

The code is available on GitHub but I’ve kept the repository private since I’m a little bit embraced by the code, but let me know if you’d like to check it out and I’ll add you to the repo.

I’m working on a WordPress plugin to syndicate my posts to Twitter. I know, there are lots of plugins that does that already but none of the ones I’ve found does it the way I want, so I decided to roll my own. I’ve got the basics working and have been using it on my site for quite some time now. However, I’ve encountered a problem. Here’s how I want it to work:

When I publish a link post, instead of posting a link back to my site to Twitter, it should post the link to the site that I’m linking to. The plugin ”knows” whether it’s a link post or not based on

At first glance this works fine and it worked in development. However, ones I started using it on my site I realized that it only worked some of the times and other times it wouldn’t recognize a link post.

Tonight I’ve managed to narrow it down. It seems like the problem occurs when I post with the ”Press this” bookmarklet. If I do that, even a post that clearly has been givet the ”link” post format still returns false for if ( get_post_format( $ID ) == 'link' ). If I post the exact same content using the WordPress dashboard the post is recognized as a link post and everything else works as intended.

Is this a bug in WordPress? I should investigate this further but right now I need to go to bed, so I’m throwing the question out to you, smart people on the internet, instead.

Yesterday when Iris was asleep in her bed, Linn and I sat down on the couch to watch some TV. We’ve just finished the latest season on Modern Family that’s available on Netflix in Sweden1, so we needed to find something new. While browsing for a while, not managing to agree on something, Linns sleepiness got the best of her and she decided to fall asleep on the couch instead.

Even though I was really tired I decided to watch something. Initially I was going to start watching Luke Cage but while browsing a list Zodiac by David Fincher showed up. I tend to really like Fincher’s movies and since I hadn’t watched this one, and since it was still reasonably early in the evening, I went with it. At first I thought I might watch half of it or something and then continue another day but the movie drew me in.

It’s a mystery-thriller based on the actual case of a serial killer who called himself ”The Zodiac”. It features a great cast, including Jake Gyllenhaal, Mark Ruffalo, Robert Downey Jr. and Chloë Sevigny, and I loved it.

I knew very little about it when going into it. I wasn’t even sure if the text at the beginning that proclaimed it to be based on actual events were true or not2 but it totally got me hooked in just a few minutes.

The thing that I really like about David Fincher’s movies is that he thinks, or at least the movies gives the impression that he thinks, that I the viewer is an intelligent and observant person. He loves exposition but not in a bad way.

Also this movie, unlike Fight Club and Gone Girl – which are the two most Fincher movies that I saw most recently3 – is free of irony. It’s an honest thriller that has me invested in solving the crime and that, in a few instances, makes me genuinely scared.

Oh, and in case you don’t obsessive click all the links that I put in this post, you should absolutely check out this one, David Fincher – And the Other Way is Wrong, from Every Frame a Painting. It’s a great analysis of Fincher’s style and as far as I can tell it doesn’t really spoil any of his movies, so you can watch it even if you haven’t watched all his films yet.


  1. I think it’s season 7. 
  2. It is. 
  3. I saw Gone Girl for the first time, Fight Club was a rewatching. 

Regardless of the outcome today, at least it will be the last time in a few years that we need to hear about a US presidential election.