OpenSearch Plugin
I added OpenSearch to a customers intranet application a few weeks ago. It was so simple it’s almost embarrassing to blog a about it. Then, tonight, I found myself trying to remember what exactly I did to enable the OpenSearch plugins for IE7 and Firefox 2? It was so easy that it didn’t really sink into my memory very well. So I decided to add the OpenSearch plugin to my site and document it on my wiki. Maybe now it’ll stick. If not, I know were to find it! Keep in mind the OpenSearch is much deeper than a cool plugin in your browsers search box. OpenSearch is the beginning of standardized searching where the search server can describe how it’s to be searched to the client and then return the results to the client in an XML format.
Simple Tid Bit
If you’re using Access as a front-end for a Sql Server database and you decide to use the Sql Server bit data type for say, a yes no field. Do remember to give your field definitions a default value first or you will run into problems on the Access side. Access will notify you that …this record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes… every time you attempt to edit an existing record. In my case the option to save the record was disabled. I simply changed the default value for all my bit fields to 0 and everything worked fine. NULL strikes again!
Give me some FLAC
Idea #1: Hey I think I’ll convert my CD collection to MP3! That lasted until I discovered Ogg Vorbis. Idea #2: Hey I think I’ll convert my CD collection to Ogg Vorbis! That lasted until I discovered FLAC. So after a couple false starts, this is the plan (or Idea #3 if you like):
- Rip my CD collection to FLAC
- Upload FLAC to S3 account for archiving
- Convert FLAC to Ogg Vorbis on my local drive
- Delete FLAC files from my local drive
PODS
Plain Old Data Structures. A couple years ago, when I first tried my hand at C#, Every project I did used custom collection classes. It seems I was always implementing the ICollection Interface, dealing with enumeration as such. So much scaffolding just so that I could write foreach thing in things. My opinion is that I’ve been wasting my time. The System.Collections and System.Collections.Generic namespaces contain enough data structures to help you accomplish any task you will normally be confronted with. These data structures help you loosen the coupling between your assemblies and leverage a long history of tried and true algorithms. Combine that with generics for type safety and I’m not sure what more you could ask for. Maybe I’m being influenced by Python, Ruby, Lua et al. Their liberal use of a few (in Lua’s case One) data structure(s) make applications more readable and in my opinion more reliable. What ever the reason, I’m all for Plain Old Data Structures.
Embedding Lua in C#
About a year ago I played around with Lua. I had a good bit of fun but it never really took off for me. As is the case so many times, I pretty much forgot about Lua. I’ve got one of those attention spans that supports moving on quickly. Recently though, Lua came back into focus. This time as an embedded scripting component in a C#/AutoCAD.NET API application that I’m working on. Extending the extension sounds crazy but there was a need for it, and LuaInterface made the job uber simple. LuaInterface allows you expose your C# methods and classes to Lua. You can also use Lua tables within C#. For the methods I want Lua to have access to, I attribute them with a custom attribute class. I use a method (got the idea here) that performs some reflection tricks and handles the Lua registration automatically. As an old friend of mine used to say, it’s killer diller.
Microformats XFN
I’m getting into microformats in a big way. I guess you could say I drank the kool-aid. I’m going to start blogging a little bit about what I’ve learned. I will start with XFN. This idea was cooked up by Eric Meyer, Matt Mullenwegg and Tantek Celik. The premise was to describe the relationships that bloggers had in their blog rolls. To accomplish this they utilize the rel attribute. The rel attributes purpose is to describe the relationship the referenced document holds to the current document. Here is an example:
<link href="/css/bas.css" rel="stylesheet" type="text/css" />
Flickr badge vs XHTML 1.0
My website has been XHTML 1.0 Transitional for a while now. I decided to take the next step in XHTML and start serving the mime type application/xhtml+xml to user agents that accept it and serve text/html to those agents that are slipping behind the times (read IE-7). First thing I did was include this PHP code in my files.
<?php
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml");
}
else {
header("Content-type: text/html");
}
?>
Gmail and SMS
I recently picked up two Samsung SCH-u740’s (buy on get one free). One I use and one is for my daughter. I also added text messaging to my Verizon account. The text messaging was for my daughter, but it turned out to good for me as well. Now I can filter messages from my Gmail account and have them sent as a SMS message to my phone. Granted it’s a low tech mobile solution but I’m doing the typical life hacker thing and making the most of the tools I have at my disposal. First of all you have to have a Gmail account. Secondly you need a cell phone, preferably with unlimited text messaging, or you’ll risk paying through the nose for those extra text messages. Gmail has the option to filter messages. You can assign actions to those filtered messages like adding a label or forwarding the message to another email address. Yep, that’s our ticket right there. I filter messages based on client email domains. I then forward those emails to my Verizon account. Now here are a few things I had to dig up along the way.
Social Networking Map
Ok. If you’ve checked out my home page, you may have noticed the twitter stuff on the side. Yes I’m trying some more of this social networking. I’ve even strong armed some friends into joining me. What are friends for? So while doing some reading on social networking, I ran across this lovely tidbit.
I watched “an inconvenient truth” tonight
I watched an inconvenient truth tonight. I know, not exactly current events. Yet Al Gore’s message is not exactly current events. He’s been peddling his message for years now. So I watched the DVD and I learned a couple of things. I learned how voraciously past administrations have fought to down play global warming. I learned even more about how closely the oil companies are tied to the Bush dynasty. More so than I had even previously been aware of. I think that if Al Gore could have been presented himself in 2000 as he did in this movie, I might have considered him for president. I visited climatecrisis.net and saw a painful truth; people who are 100% on board with global warming don’t really have answers to the tough questions. I can change every light bulb in my house. I can set my thermostat +2 -2 and even buy an electronic thermostat. But each time I hit the highway for whatever reason I see the real problem. I make more greenhouse gases by driving than I do living in my house. Sure I can cut back on some trips, but I have to work to pay bills. The reality is that if I don’t make the greenhouse gases my family will be living in the street. Albeit making much less of a carbon footprint. I wish I knew the answers. I wish the rhetoric was easier to sift through. Gore thinks we are killing our planet. I wish I knew.