Draft Publishing In Jekyll

This is a short one. I found a great article about how achieve draft publishing in Jekyll. Normally, you would generate a new post, and whether it’s done or not, jekyll will publish it. However, with this you can create a bunch of stuff in the drafts folder, then move it to the publish directory, and the plugin will take it from the publish directory, append the proper date to it, and move it to posts.

Read On Here

Read more »

Creating Custom UITableViewCells with NIB files

Well this sucks. Apparently these days you can only use the Interface Builder to design your cell in XCode if you’re using Storyboards. But no worries. I have found a workaround which plays very nicely in iOS5+. Let’s get to it!

I’m assuming you already know so iOS and objective C, so I’ll save the prep for another blog post. Let’s get down to business.

Read more »

The Zen Of Code

Sometimes you just need to get it out the door. Write fast, make it work, roll it out, accrue technical debt, deal with it later.

But is it worth it? Lately I’ve been pondering a lot about the zen that comes with good code: how it makes one feel as a developer, and what does it buy?

Take a module that you’ve hammered out over the past three weeks. It’s a quick fix for something that needs to happen on a deadline, and you just didn’t have time to write comments, conform to coding standards, and look for functions to reuse.

The days are getting shorter and the problems are getting smaller, until you’re finally done! Great! You’ve made it work with a messy patchwork of if statements, for loops and undocumented functions. The deadline hits. But wait. The requirements have changed just a bit. The change is small, but because you haven’t taken the time to think about how you structured your objects, it’ll require a massive rewrite. Bummer.

You get back to drawing board and try to figure out what get_mapped_tree_nodes($id, $level, $active, &$tree) does. Think about it for a while and can’t remember. Man should’ve documented this. Let’s debug. A few repeats of this later, angry and confused you finally finish and complete the requirements. Great! You’re done!

Submit your pull request, get your peers to review. Approve Approve! Let’s get this in! After the merge, you guys realize that you just crashed your production environment because bad coding standards made your reviewers miss a major bug. Try to see what caused it. Which commit was this? Was it Add pf3 to ln42 or Add pf2 to gs43? Nuff said.

Read more »

The Blog

Oh man. So I started a blog. Now I guess I should write stuff in it huh? Fine. Here goes the first post.

A few thoughts. I’ve been playing a lot with Octopress recently. We just launched the new AllPlayers Dev Blog built using just that. The main idea was just to output an RSS feed for our podcasts, but we decided to write dev stuff there as well.

I do see the appeal. I most definitely prefer the fully version controlled, markdown preview automatic Octopress. And with a single command your site is pushed to github and live. The templating is much better (sorry Drupal render arrays), and the built in SASS is also a win. However, when I tried to add in a new feature, it turned out to be such a pain. I had to dig through so many different template files, mess with Mustache templating (I think that’s what they use), just to get it working.

I also can’t push APIs out of Octopress, consume feeds, or just mess around just for fun. It’s limiting.

On the other hand, as I’m writing this post (in the Drupal editing interface by the way), I am truly appreciating the fact that to add the wonderful trash can image only took me a few clicks. But I don’t appreciate that I can’t preview my markdown before I save it (or hit the preview button which I never use).

Read more »