Alkahest my heroes have always died at the end

October 30, 2008

Computer maps

Filed under: Technical — cec @ 9:17 am

A few years ago, K was taking some GIS (geographic information systems) classes.  That was a lot of fun for me since GIS is something I’ve poked at on and off for quite some time.  Back when I was first playing with GIS, GRASS was probably the best (and may still be) open-source GIS system out there, but it wasn’t too user friendly.  So it was a lot of fun playing with ESRI’s ArcGIS.

But 99% of the time, the things that I would like to do with maps don’t require a full blown GIS system.  The Python toolkit Matplotlib includes a Basemap package and that’s getting closer.  Basemap can read GIS shapefiles, handle coordinate transformations, etc.  But even that’s sometimes too much.  What if I wanted a simple, dynamically computed heat map of the location of website visitors?  Or for the PWC database – the counties from which we receive animals?

Well, the Wikimedia Commons has a map of the U.S. where states are slightly separated to allow for easier coloring.  But that’s again difficult to deal with programatically.  So what I’ve done is to create an indexed PNG image where each state is a different index color.  To color the map, you just load it up and change each state’s color triplet to the appropriate value.

I’m not certain if that’s useful to anyone else, but at least I’ve got it documented here for when I need it.

The associated index of colors to states is here: state-colors

At some point in the future, I might do something similar with a NC county map and maybe a world country map.

October 22, 2008

Another successful repair

Filed under: Plumbing — cec @ 9:07 pm

As I mentioned earlier, we were having problems with the water softener and when your well water is as hard as ours is (“how hard is it?” “that’s a rather personal question sir” “no you git, how hard is the water?”) the water softener is pretty important.

So the venturi gasket looked okay, but I ordered a new one since it’s a bit sensitive.  I also ordered some new internal gaskets that go in the valve.  The parts arrived on Saturday.  Replacing the venturi gasket didn’t help, so I opened up the valve and found that I had the wrong sized internal gasket 🙁 .  Turns out that all of the brand name softeners (GE, Sears, Kenmore, Home Depot, etc.) all use the same valve, but in two differrent sizes, a common smaller size and then the rarer large size.  I’ll give you one guess as to which we own.  Of course, if I had paid attention, I would have noticed that the gasket had two sizes, but oh no…  Anyway, so I figure I’ve got to return the gasket, but then I google around a bit and find that in addition to the gaskets (which ironically allow the softener to suck), sometimes the symptoms we were seeing are caused by a blocked drain plug or blocked rotor.  I pull out the drain plug and sure enough – it’s blocked.  But even after I clear the blockage it still doesn’t suck – but in an entirely different failure mode.  I clean the rotor – now it works.  I still had some issues with leaks, but reseating the rotor and the whole valve has fixed those. I think we’re back in business.

On a related note, skvidal sent me a link to an old bicycle catalog which included a short piece on building items so that they can be worked on and repaired.  It’s fairly interesting and in a sense covers the problems I have with this softener.  Part of me wants to junk it and get something not broken.  This is actually fairly common.  I think that the average lifespan of a name brand water softener is 5-10 years.  Ours is seven.  Online, I’ve seen discussions from plumbers about customers that just replace instead of fix their softeners.  At this point, I have a fairly complete understanding of how ours works and a reasonable confidence that I can repair anything that goes wrong with it (assuming the parts are still available).  So why should I still want to replace it?  Because it’s a cheap piece of garbage.  The valve is designed to break after 3 years or so.  The rotor gets eaten away and can only be replaced.  On the plus side, it’s also designed to be easily repaired – not from any sense of reduced consumption, but because if a Sears/GE/etc. repair guy can come out, easily diagnose the problem and quickly replace an expensive part, it’s a big win for the service department.  They spend a short amount of time onsite, charge an X hour, minimum trip fee and then get to pass along a marked up price for the expensive part.  They win all the way around.

So, I figure that by giving it some love every few years, I could keep it going indefinitely (20+ years), on the other hand, a better designed softener could last 20+ years without all the attention and specialized parts.  I’ll probably keep repairing the water softener, but I wish that when the former owners had bought the thing, that they had spent a bit more and gotten something that was better built in the first place.

October 17, 2008

Pictures from Geek Beer

Filed under: Gallery,Personal — cec @ 2:20 pm

So Hunter is planning on being at GB tonight too. But as of last week, we thought this was his last GB and so of course, everyone brought cameras.

Sample pictures:


More in the gallery

Requests to remove pictures will be honored.

October 16, 2008

Wildlife rehab porn

Filed under: Photography,Wildlife Rehab — cec @ 8:50 am

It’s okay to look, I promise that there are no shots of me doing naked cage construction. *shudder*

A couple of months ago, K got a call about a squirrel.  When the folks brought it over, it turned out to be rather small, but pretty far along in its development.  Well, that’s because it was a flying squirrel.  They tend to be a lot smaller, a lot sweeter and just darn cute.  Because they live in colonies, K found someone with another flying squirrel and has been raising them together.  They just recently went outside, so hopefully they’ll be releasable before winter.  Here are some of the pictures from when they were still inside.



A few more pictures at the gallery site.

October 15, 2008

Too good to last

Filed under: Plumbing — cec @ 2:00 pm

It’s been a while since we’ve had plumbing issues.  Okay, sure, we replaced the RO faucet in the kitchen six months ago, but other than that…

So I guess I shouldn’t be surprised that yet another water oriented appliance has broken down.  This time it’s the water softener, again.  When we first moved into the house, five years ago, the water softener didn’t seem to work.  The first problem was a salt bridge that kept it from operating correctly.  Once we figured that one out, it was easy enough to fix.  Then a year or so later, the tank filled up and wouldn’t drain.  That one turned out to be the venturi gasket – part of a clever device that uses pressure differentials to move water around.  That one was a bit more annoying since you can’t just order the 1.5″ gasket, you have to replace both the nozzle and gasket which costs about $20 + shipping.

This time, the softener is again not draining.  I’m guessing it’s the venturi gasket – if not, then it’s another gasket in the system.  Part of my hopes it’s the venturi since that seems most likely, is the easiest to replace and will therefore be the first thing I try.  But another part of me is annoyed that the thing hasn’t lasted 4 years.  Am I going to have to replace the gasket every four years?  The softener isn’t that old – maybe seven years?  Of course, if it is that old then the first gasket only lasted 3, maybe 3.5, years.  So I guess get almost 4 years out of the new one wouldn’t be that surprising.

Hopefully the gasket will fix it.  I


October 14, 2008

Brief political interlude

Filed under: Social — cec @ 1:19 pm

Like a lot of other people, I’ve been pretty stressed out recently.  Nothing too terrible is going on for me personally, but I’m concerned about the U.S. financial situation, I’m concerned about how that will affect me and my company (if at all) and I’m concerned about the current political happenings in part since I think that they will have the biggest affect on the first two issues.  I’ve been obsessing over politics and polls for the past few months when I would probably be better off “drink[ing] herb tea and play[ing] with [my] screensavers.” At this point, I’m fairly confident that Obama will win (yay!), but watching the McCain campaign’s negative attacks is annoying – in particular since the negative ads are aimed at Obama personally and not his policies (as opposed to Obama’s negative ads which appear to be aimed at McCain’s policies).

The irritating thing is that the political attacks on Obama, from both McCain’s campaign and conservatives in general, are constantly shifting.  First you hear, “Obama’s a Muslim.”  That gets debunked.  Then it’s “Obama’s preacher is a radical Christian.”  Again, someone takes the time to put things into context and debunk the lies and the topic changes again.  “Obama’s is a celebrity.”  Er, never mind that this is based on the number of people that want to hear him speak on policy issues and not, say, on his television or movie career (try comparing the IMDB entries for McCain and Obama sometime).  Turn around and then it’s – “well, no one goes to an Obama speech for anything but the rock concerts.”?!  No, wait, we’re back to “celebrity.”  Then he’s “inexperienced” except when compared to Palin.  etc., etc.

It’s like the Obama attackers have the attention spans of squirrels on meth.  For gods’ sake, pick an attack and stick with it.

Of course, you see this in other contexts too.  Perhaps my (least?) favorite is climate change.  “No, global warming is not real.”  “Okay, maybe global warming is happening, but it’s not caused by people.”  “Okay, it is caused by people, but isn’t anything we can stop.”  Oh wait, then we turn back to, “98% of the green house effect is due to water vapor.”  No it isn’t.  “CO2 lags temperature in ice cores!”  True, but irrelevant.  It’s almost impossible for the lay person to debate the contrarians since they keep shifting their line of attack.  It’s all still wrong, but unless you’re carrying an encyclopedia of climate change, you just aren’t going to be able to counter the crazy.  It’s whack-a-mole with arguments.  The sad part is that the skeptics aren’t stupid.  Many are very intelligent people whose politics (for some reason) cause them to be intellectually lazy about this issue.  Arguments that they wouldn’t accept from a high school student are suddenly too obvious to dispute.

I’ve even heard from a few skeptics in scientific fields and they seem to assume that either a) climate science isn’t a real science, or b) climate scientists just aren’t as smart as the political talking heads you see on the television, or c) climate scientists are all in on a giant conspiracy to keep getting funded and so they are lying about the true state of the world.   Just bizarre.

Bringing it back to politics, you see the same things in McCain’s actual campaign.  He keeps changing his proposals.  Let’s see, during last week’s debate, we heard about a new $300b bailout to help home owners.  Then it turned out that the bulk of the money was yet another bad bank bailout plan (the govt would be buying the loans from the banks).  That got dropped.  Then this weekend, we heard that McCain was going to have a new policy proposal geared toward the middle class.  It was going to include tax cuts on dividends and capital gains.  Huh?!  Now, I consider myself and K to be upper middle class, but I guarantee you that cutting taxes on capital gains and dividends will not help us to any significant degree.  Then on Sunday night, the McCain campaign announced that it wasn’t going to announce any new policy proposals this week.  But now today we learn that McCain is proposing a new plan that features those exact same tax cuts that we part of the non-plan from this weekend.


McCain’s campaign is acting much in the same way I would in a boxing match.  They are doing the political equivalent of screaming like a child and running around the ring, hoping that the punches will land where they were and not where they’ve currently shifted.  It’s pathetic.

All of this makes me wonder what kind of brain rot has infected the republican party.  Did it start with the appeals to anti-intellectualism and rot it’s way up to the policies?  Did it start with crazy policies which attracted anti-intellectuals?  David Brooks seems to think that the republicans just drove away all of their intellectuals and this is what’s left.  I suppose I can buy that.

Anyway, I think it’s time to make some red zinger and see if I can get that 3d fractal screensaver working.

October 4, 2008

Annotate Flickr

Filed under: Technical — cec @ 9:59 pm

A while back, Luis Villa asked about a script to add creative commons licensing information to an image.  I just wrapped up a first cut at a GreaseMonkey script to do exactly that.  Hopefully someone will find it useful.

Annotate Flickr

Filed under: Uncategorized — cec @ 9:45 pm

A while back, Luis Villa asked about a script to add creative commons licensing information to an image.  My first thought was to just use ImageMagick.  That works pretty well, but assumes a command line, image magick, etc.  My next thought was a piece of javascript that you could include on a webpage.  The javascript would scan all <img> tags and for each that were of the class “cc-license”, it would grab the “license” and “attrib” attributes.  The img would be replaced with a canvas that had a transparent license image and the attribution in the corner. That worked pretty well, but again, didn’t really change the image, so if you were loading it into a presentation, etc., you were out of luck.

Okay, thought the third.  Why don’t we take the canvas idea (idea #2 for those keeping score at home) and wrap it in a GreaseMonkey script.  The script would run on Flickr pages and, when triggered, would grab CC license information, along with the picture name and creator from the Flickr API and shove it into a canvas.  That canvas could be downloaded as a png (don’t blame me, using png as opposed to something else is an HTML5 issue).  Okay, this might work.

Basic use:

  1. install and enable GreaseMonkey in firefox
  2. download the script – GreaseMonkey should pick up the fact that’s it’s a script
  3. go to Flickr
  4. follow the instructions for getting a Flickr API key
  5. install the key through the GreaseMonkey -> User Script Commands menu
  6. find an image you like – either the main page image or on the “All Sizes” screen
  7. click the “Click to Annotate with License Link”
  8. you should see the image with the embedded license info
  9. right click to save

I wrapped up the first version tonight (October 4, 2008).  New features should eventually include the ability to change colors, degree of transparency, location, etc., but for now it’ll work.

Version 1.0 – annotateflickr.user.js


Filed under: Uncategorized — cec @ 9:31 pm

Powered by WordPress