[ Content | Sidebar ]

Posts tagged code

How to add event listeners under the GMap2 API

Some Javascript stuff here concerning Google Maps and coding for them. This took me a little bit to figure out, cause I was a little slow, last night. Also, the Google Map API documentation doesn’t seem to cover this sort of eventuality. Say that, for whatever reason, you have an array of GMarker objects and [...]

PHP XML functions are sucky

I mean, they’re cool and have a certain level of power to them; however, using them necessitates writing essentially unreadable code. If you have to write multi-line comments documenting the return value or behavior of a language function, that function is poorlyl named or poorly implemented. By way of example, I direct you to xml_parse_into_struct

Ruby (rails) fun

This’ll only make sense to about three of my readers, but I just wanted to point out that it fills me with a certain glee to code something like: validates_something_of :foo, :if => Proc.new { breakpoint } When that breakpoint fires, it’s like you’re hanging off the edge of the universe.

Comment Hilarity

I took my friend Drew’s advice and decided to close comments on old posts. If you need to automate closing comments in WordPress and aren’t afraid to get your hands a little dirty with some editing, read on.

Site problems

So apparently the blacklist plugin I’ve been using to cut down on spam is a little wonky. I know I don’t get a lot of legitimate comments, but if you’ve posted one and it never showed up (or if you’ve replied and gotten weird errors on the screen), mail me and let me know. I [...]

Fun fact

Did you know that Days Inn has locations in India?

How to tell when your programming logic needs tweaking

I meant to post this when I found it awhile ago: If you’ve writen code that needs to sometimes generate the following SQL query “SELECT * FROM tbl WHERE (1 = 2) … ” you should probably think about refactoring.