One Div Zero: A Brief, Incomplete, and Mostly Wrong History of Programming Languages
Posts tagged code
Been awhile, some fun Drupal code-related stuff
Been busy with the play and work. We switched to a 4 day, 9 hour work week. So that leaves me with about 2 hours each day for non-theater, non-work related stuff. Not counting the day off, I guess. Anyway, check this out. I have been tasked with writing a SQL Server database module for [...]
Coding: Rails Issues with :include
This is a sort of code analysis and something I discovered with :include usage in Rails. (This is in rails 1.1.6, so YMMV. I believe the latest Rails opts to use inner SELECTs rather than JOIN statements. Also, this is kind of long.)
Code: Dynamically Insert HTML Into Any Rendered PHP Page
So, this pleases me enough to post it. dynamic buffer insertion with PHP Needed to quickly add a notice to every page on a client’s site where there was a single include, but not single-included layout pages (teachers, *sigh*). I’ve never messed with output buffer stuff before, so this was just sort of surprising to [...]
Operator Precedence (ruby et al.)
Thought this was a little silly, but it generated a lot of discussion about precedence, short-circuiting of conditionals, and the value of syntactic sugar. http://pastie.caboo.se/146194
Seriously Word Press, WTH?
While trying to figure out how to remove formatting from ‘wp_list_cats’ in Word Press, I discovered this awesome bit. Click the thumbnail for the full glory of the code. You will notice that in my screenshot, the final function call to ‘list_cats’ at the end is truncated. This is because there are eighteen parameters. Again [...]
Vim tip: keyboard shortcuts
Finally got around to learning how to define keyboard shortucts in vim. It’s easy! map <desiredkey> <targetaction> So, for example, I split windows vertically and want to navigate via ctrl+pagedown or pageup. Here’s what I did (include < and > when defining) map <c-pageup> <c-w>h map <c-pagedown> <c-w>l Found via a vim wiki search [ad#Google [...]