Goodbye, b2evo
b2evolution didn’t go quite as well as I had hoped. A couple of days ago it started giving me HTTP 406 errors for some posts for no apparent reason, and filling my error log with fascinating things like…
[15-Oct-2008 04:52:15] b2evolution error: MySQL error! / Duplicate entry 'c-events-are-accessors' for key 2(Errno=1062) / Your query: DataObject::dbinsert()INSERT INTO evo_items__item (post_datestart, post_creator_user_ID, post_notifications_status, post_renderers, post_status, post_locale, post_priority, post_main_cat_ID, post_ptyp_ID, post_url, post_excerpt, post_urltitle, post_comment_status, post_title, post_content, post_wordcount, post_datecreated, post_datemodified, post_lastedit_user_ID) / VALUES ('2008-10-15 12:52:14', '1', 'noreq', 'b2evSmil.b2evALnk.evo_videoplug.b2WPAutP.evo_code', 'draft', 'en-US', '3', 16, 1, '', '', 'c-events-are-accessors', 'open', 'C# events are accessors', 'An interesting feature of C# I discovered recently is that events are actually accessors, [...] is', 60, '2008-10-15 12:52:14', '2008-10-15 12:52:14', 1) in /home/sonic12/public_html/sunstormlabs/inc/_core/model/db/_db.class.php at line 568 / REQUEST_URI: /admin.php / HTTP_REFERER: http://www.sunstormlabs.net/admin.php?ctrl=items&action=new&blog=1
[30-Oct-2008 04:51:01] XML error: Invalid document end at line 2, column 1
Being patient with software faggotry like the programmer I am, I promptly fixed the error by installing WordPress.
I was fed up with b2evolution anyway. It was doing a lot of stuff that I didn’t care for, and wasn’t doing a lot of stuff that I did want. It had support for multiple blogs for people with MPD, and statistics rendered useless by Analytics, but it also had some 3 good (ie: not fixed width) skins available, couldn’t do comments and their formatting right, had at least 3 URLs for everything, wasn’t very friendly about posting images, no decent syntax highlighting plugin, and I was feeling left out of all the WordPress feature wanking I keep seeing on other blogs.
The irony is that I picked b2evo in the first place because it wasn’t WordPress and I wanted to be different. No matter how much I try to convince myself that “alternative” doesn’t mean “worse” in every possible context, 10 out of 10.1 times I get a cockslap to the face. Why do I bother?
C# events are actually accessors
An interesting feature of C# I discovered recently is that events are actually accessors into Multicast Delegates, much like properties are accessors into other fields.
private string myData; public string MyData // A property { get { return myData; } // called when the property is read set { myData = value; } // called when the property is written to } private EventHandler myDataChanged; public event EventHandler MyDataChanged // An event { add { myDataChanged = (EventHandler)Delegate.Combine( myDataChanged, value ); } // called when a handler is attached remove { myDataChanged = (EventHandler)Delegate.Remove( myDataChanged, value ); } // called when a handler is detached }
How to dismantle a Logitech G15 keyboard
My Logitech G15 got wet again and none of the keys were working. The logical thing to do, then, is to take it apart and try to figure out what’s wrong with it.
Note: Don’t try this at home. It WILL irrevocably void your warranty, and you can easily cause permanent damage to the keyboard.
The joys of FLAC
Lets imagine that you have some music in MP3 format, and you’ve never heard the original source. This could be because you downloaded it from the internet, or bought it at an online music store like iTunes. You imagine that you’re getting the full musical experience with your 192kbps MP3, because you can listen to it perfectly well with no distortion or anything, and if the music really needs it, just bump it up to 320kbps to make it absolutely indistinguishable from CD quality.
For the most part, that’s true, to the point that standard MP3s cover most peoples’ listening needs. I’ve happily built up a 40+GB MP3 library for several years because of this. But only to a point. My opinion changed when I discovered FLAC.
I hate Javascript, but I love JQuery
When it comes to the web, I prefer to stay on the server, where it’s safe. I love the stability of the environment I get in server side code, and I detest the client side chaos that goes on in the faggotry of browser wars and their incompatibilities and differences.
If I can, I try to avoid scripting completely. In the current state of browser affairs, I don’t feel like I can rely on Javascript for anything more than decoration and minor UI enhancements. When I do have to work with Javascript (and by that I mean any client side scripting language), I do it in a very conservative, “1.0″ way.