Uncategorized

Meet the new boss (same as the old boss)

So, I just did something that you really shouldn’t do on the internet: I revised history.

That is to say, I originally created the problematic.io domain because I was tired of wrestling with an EC2-based WordPress install, and I was irritated that wordpress.com blogs don’t give you the kind of control I was looking for. So, I baked up a new blog with Jekyll… and promptly stopped using it. It wasn’t until I read Kenneth Reitz’s post “Why I Left Medium” that I realized why: my code-brain and my writing-brain don’t play well together. I was feeling productive because I was tweaking layouts, instead of producing content.

I followed Kenneth’s lead, fired up a WordPress install on PagodaBox (Heroku for PHP, essentially), and… had two WordPress blogs. So, I’m merging them: all posts have been migrated, and iamproblematic.com now redirects to problematic.io. The distinction between domains is enough for me to justify the break from code-only posts that I was looking for, without having to manage two separate codebases, and without losing two years of post history.

Hopefully the transition will be a smooth one; you can ping me in the comments or at djstobbe@gmail.com if you notice any problems.

Arghfiles

Angular Arghlist

When I’m learning a new language/framework/whatever, I keep an “arghfile” of gotchas (sticking points, not necessarily bugs) that caught me while developing so that I can document and/or fix them later. Here are a few from my time learning AngularJS:

  • using repeated variables on the repeated element with ng-repeat doesn’t work: <li ng-repeat="file in files" title="{{ file.title }}"></li> doesn’t work (I think this has been fixed in a subsequent release)
  • requiring a parent controller doesn’t work out-of-box if the parent directive loads a template file
  • ng-keydown only works with 1.1.5+ (documentation has been versioned since then)
  • attaching events to child elements from parent directive (may not be a good idea anyway)
  • directive element can’t be self-closing if you use more than one in a row
  • transcluded content is a sibling of its container
  • Promise then doesn’t resolve until $scope.$apply
  • ‘foo’ is the name of a provider’s injected service. ‘fooProvider’ is how you get the configuration object
  • t.value as t.name for t in account_types for select with an object as a model