January 26th, 2009
There’s a lot I like about Obama and have since watching his speech at the 2004 Convention (below) and soon after reading Dreams of My Father. What amazed me most about that book was its openness. Here’s a guy who has chosen a public path where every aspect of his life will be scrutinized talking about race, drugs, poverty. And not just talking about them in generalities, but about his personal feelings and past behaviours: smoking pot, trying cocaine, black power groups, being of mixed race, … I was impressed, somewhat by what he had to say, but even more so by the fact that he was saying it, open, honest. I wanted to see more of this guy.
In the four years since my introduction there have been many more opportunities for me to learn more about Obama and what he wants of and for the world we live in. I can’t say that I’m worried about the details. Details are things that I don’t have the time, energy, or desire to concern myself with. I feel like we are responsible for trying to get to know our elected officials before voting for them and then trust that they do what’s best from there.
This trust depends on, in part, an openness of the official and government in general. So that if a citizen is motivated to check up and see what the official (or government as a whole) has been doing they can easily and quickly get access to the full details. There are situations where this is not possible when the security of our nation is at stake, but that is the only acceptable reason preventing access to information.
To that end Obama has authored a Presidential Memorandum on the Freedom of Information Act and completely overhauled Whitehouse.gov providing a blog with feeds for a plethora of subjects (which can be subscribed to en-mass here.) This coupled with plans like the one to create a site for tracking federal government tax expenditures shows that openness is the default, that the only thing required to find information should be to want it and look. That’s change America, and the world, needs. I can only hope that I’m not wrong and that we have it.
2004 Convention
2009 Inauguration
Posted in Opinion | No Comments »
January 19th, 2009
I searched around quit a bit when trying to solve this one and didn’t ever come across a solution. I ended up coding one up and thought I might as well post it in case someone else comes across the same need. I needed Vim’s cindent to do the following:
namespace foo {
typedef struct _Bo {
int a;
int b;
} Bo;
class Bar {
public:
Bar();
virtual ~Bar();
...
}
void baz() {
}
}
The thing of note here is the namespace block doesn’t doesn’t cause an indent shift. Everything inside is backed up against column 0. There’s no quick and easy cinoption for it so far as I could tell or find and I was able to get all of the other formatting options to match our needs. I did find indentexpr and was able to code up something that gets the desired behavior, it is as follows:
function FixCppNamespaceIndent(lnum)
" cursor set to lnum
call cursor(a:lnum, 1)
" search backwards for opening {
let p = searchpair('{', '', '}', 'bW')
if p > 0
" we're in a { }
let pl = getline(p)
" get the line with the opening of our block
if pl =~ 'namespace'
" it contains the word namespace so we're shifted 0
return 0
else
" doesn't contain the word namespace so we're normal
return cindent(a:lnum)
end
endif
endfunction
set indentexpr=FixCppNamespaceIndent(v:ln
Won’t guarantee there aren’t a few bugs in cases I haven’t yet run across, but I haven’t seen any problems out of it. One thing I’m not sure about is what will happen with nested namespace, I guess it will depend on what the desired behavior is. Anyway, I’ll solve that if and when I come across it.
Posted in programming | No Comments »
January 3rd, 2009
Posted in wtf | No Comments »
January 1st, 2009
I upload my photos to my own site and have for years. I have no desire to start using flickr, or smugmug or any other photo site for that matter. I would if i were starting fresh, but I’ve just put too much time in to it to switch. A few weeks ago I found the Facebook feature that allows you to import you blog as notes. Pretty nice, but since it will only allow you to add 1 rss feed somewhat limited if you want to say, import your blog and a feed of the new albums you put in to your gallery. I coded up a trivial script the other day that proxies the KEXP Song of the Day podcast and fixes some really annoying posting date problems they seemed to have introduced as of late. (for some incomprehsible reason they don’t use a standard format in the date string and don’t even use something that is easily human readable.)
Anyway after playing around with that code (3 lines of it) I hit upon the idea of creating something similar to merge two rss feeds. There are plenty of services out there that will do this for you, but all of them I could find required me to sign up and go through a lot of process. Granted that would of been easier than writing a script to do the merge myself, but a lot less fun. So I sat down tonight to watch a couple episodes of The Wire and wrote a simple script to do what I wanted. It can be found at http://neces.com/merge_feeds.php and so long as people don’t go crazy with it anyone is welcome to use it. All that’s require is passing in a list of feeds in the url query string, something like http://…/merge_feeds.php?feeds[]=http://the-first-one&feeds[]=http://the-second-one/… Anyway seems to work reasonable well. I’ve only tested it with the two feeds I wanted to get in to facebook, but it seems to be working. It grabs the data for both feeds and then merges them in chronological order keeping things as intact as possible. The feed titles, links, etc. are kind of funky, but there’s not much that can be done (in an automated fashion) to merge all of the feeds’ individual metadata. Anyway, enjoy…this post also serves as a test of the system and it’s being slurped in to fb.
Posted in General | No Comments »