Archive of November 2009
jQuery, Tables, & Show / Hide
So maybe I'm just an idiot and this would be obvious to others, but it completely confused me for a large portion of the night, so I thought I'd share in hopes of helping some other unfortunate soul.
The Problem
I was using a jQuery function to show / hide elements, first on a table row, then when that didn't work, a table column. The problem is that jQuery's show method sets an element's display attribute to "block," completely ignoring that it should instead be "table-column." This causes some issues to say the least.
The Solution
Well this is where you've got some options... what I ended up doing was just creating a div element within the td and running the show / hide on that instead. You could as an alternative to this, create a custom show method that would simply set the display type correctly to table cell, column, or whatever.
Apple's Mistake
I'll be honest, I want to build iPhone apps, but the more and more I read about how horrible of an experiance developers are having, the more and more I put it off, and not only does it hurt as a developer, but it hurts as an Apple fanboy. I can't for the life of me figure out why the company I've so admired is letting this happen over and over again, isn't it at this point that someone steps up and makes things better?
Paul Graham wrote an article about this very topic, and while there are a few things I disagree with, he brings up a ton of great points and makes me genuinely question what Apple is doing.
[T]he other reason programmers are fussy, I think, is that evil begets stupidity. An organization that wins by exercising power starts to lose the ability to win by doing better work. And it's not fun for a smart person to work in a place where the best ideas aren't the ones that win. I think the reason Google embraced "Don't be evil" so eagerly was not so much to impress the outside world as to inoculate themselves against arrogance.
My .gitconfig
It's no secret, I love Git (more and more every time I use Subversion, but that's an entirely different story altogether), but one of the things I enjoy most about it is the fact that configuration options are made to be portable and because of that, easy to share. And while a configuration file may seem entirely boring, Git's configuration file is a bit different, allowing for such things as default editor and aliases. I know these are things you can set globally for your system and in fact, I'm aware that some people might prefer this, but... I like having these things contained within my Git install when they in fact are wholly related to my Git install. So now that I've gotten all that out of the way, here's my .gitconfig file (you can find yours in your home directory) in hopes that it might be useful to someone else.