adsense

Since I was doing a bunch of other stuff on the blog anyway, I decided to go ahead and sign up to put AdSense on my blog.  I don’t expect to make any money off it, but I was curious about it, so I thought I’d give it a try.  There was some weirdness going on at first, but I’ve figured out what was causing it — Adblock Plus.  Duh.  The AdSense page at Google is pretty much nonfunctional if you’ve got ABP installed and enabled in Firefox.  And, of course, it blocks the ads that are being put on my page, so  I can’t see them.  Oops.  I disabled it, and now I can access the AdSense site, and I can see the little ads Google is putting on my page.  By default, the ads were appearing at the top of the page, above the blog posts, so that was kind of ugly.  I moved the code to the bottom of the page, so the ads will appear down there now.

Fragile Things, again

I posted a couple of days ago that Neil Gaiman’s Fragile Things had just been released as a $7.99 mass market paperback, but still cost $9.59 for the Kindle.  I just looked again, and now it’s $7.99 for the Kindle, so I guess somebody (or some automated process) does keep an eye on these things and adjust Kindle prices downward when a cheaper hard-copy version of a book is released.
Oh, and I just noticed that Interworld is only $3.99 for the Kindle.  I already have the hardcover on that one, but if you like Gaiman and haven’t read it, it’s a good book.  (Not great, but fun, and a quick read.)

still messing around with my tag cloud

OK, I’m still messing around with my tag cloud code. As previously mentioned, I took a bit of code from this page, and have been messing around with it. I just added a couple of minor things that I wanted.
First, I now have a [Home] link at the end of the tag cloud, if we’re not actually on the home page. Second, I now change the link into just text if we’re on the page for a given label. None of this was a big deal, but it did serve to remind me of a few JavaScript basics, such as how to do RegEx matching in JavaScript, and how to get the URL of the current page. Here’s the code:


<!– originally taken from http://phydeaux3.blogspot.com/2007/05/automatic-list-of-labels-for-classic.html –>
<div id="labelList" class="BlogBody"></div> <script type="text/javascript">
//<![CDATA[
function listLabels(root){
var baseURL = '/search/label/';
var baseHeading = "My Tags";
var isFTP = false;
var llDiv = document.getElementById('labelList');
var entry = root.entry;
var h1 = document.createElement('h1');
h1.className = 'sidebar-title';
var h1t = document.createTextNode(baseHeading);
h1.appendChild(h1t);
llDiv.appendChild(h1);
var ul = document.createElement('not-ul');
ul.id = 'label-list';
var category = entry.category;
labelSort = new Array();
for(p in category){
labelSort[labelSort.length] = [category[p].term];
}
labelSort.sort(function(x,y){
var a = String(x).toUpperCase();
var b = String(y).toUpperCase();
if (a > b)
return 1
if (a < b)
return -1
return 0;
}); // http://www.java2s.com/Code/JavaScript/Language-Basics/CaseInsensitiveComparisonfortheArraySortMethod.htm
// where are we?
var pageaddr = document.location.href;
for (var r=0; r < labelSort.length; r++){
var li = document.createElement('not-li');
var full_link = baseURL + encodeURIComponent(labelSort[r]);
var re = new RegExp(full_link + '$');
if (pageaddr.match(re))
{
// just show the text
abnk = document.createTextNode(labelSort[r] + ' / ');
ul.appendChild(abnk);
}
else
{
// show the link
var a = document.createElement('a');
if(isFTP){
a.href = full_link +'.html';
}
else {
a.href = full_link;
}
a.innerHTML = labelSort[r] + ' ';
li.appendChild(a);
ul.appendChild(li);
abnk = document.createTextNode(' / ');
ul.appendChild(abnk);
}
}
// add a home link.
if (pageaddr != "<$BlogURL$>")
{
var li = document.createElement('not-li');
var a = document.createElement('a');
a.href = "<$BlogURL$>";
a.innerHTML = '[Home]';
li.appendChild(a);
ul.appendChild(li);
}
llDiv.appendChild(ul);
}
//]]>
</script>
<script type="text/javascript" src="http://www.blogger.com/feeds/13487006926024246136/blogs/3059692?alt=json-in-script&callback=listLabels" ></script>

Snow on main st


Snow on main st
Originally uploaded by andyhuey

It’s a good day to be working from home… Here’s the view outside my window right now. When I took a walk outside to see if I could get something for lunch, nearly all the stores on Main St were closed.
Here a link to a photoset with a couple more pictures I took from my window.
Oh, and not to get all maudlin again, but a couple of times today I’ve thought about picking up the phone and calling my Dad, to see how much snow they’re getting down in Whiting. Then, I remember that there’s just an empty house down there now. (*And* that I’ll probably need to shovel out the driveway and walk when I go down there this weekend to pick up Mom’s will and some other papers.)

more custom domain stuff

OK, I’ve decided that I’m close enough to good that I can officially switch to the custom domain thing.  From now on, http://blog.andrewhuey.com/ will be my official blog and http://andrewhuey.org/ will just stick around in case there are links to old posts from other sites.  I’ve gone ahead and replaced the code in one of my SSI files with a pointer to the new location, so hopefully that will get people over here.

switching to a custom domain

So I went ahead and started switching my blog over to a custom domain last night. I can’t say that I’m 100% happy with how things are working, but I think I’m off to an OK start, and I’ll stick with this for awhile. Just to document a few things, for future reference, or for anyone else messing around with this, here are a few good links and notes:

First, here is a good post on how to move from FTP to a custom domain. I started off by reading this post and following some of his advice. (Right now, by the way, andrewhuey.org will still bring up the old blog. blog.andrewhuey.com will bring up the new blog. I’ll have to make some DNS changes at some point to get everything pointing to the new blog.)

I couldn’t quite figure out if I should switch to a new template, or try to stick with my old one. In the end, I decided to stick with the old template, but make some necessary changes to it.  I was using server-side includes in my old template.  I can’t use those anymore, as far as I can tell.  I’m not actually publishing .shtml files to the server anymore, so Apache can’t do the includes, and Google doesn’t seem to support anything similar within a Blogger template.  (I think they could easily create a command that you could use in your template to do this kind of thing, but I haven’t found any indication that there is one.)  When I think about it, though, the main reason I was using the SSIs was so that I wouldn’t have to republish my entire blog any time I made changes to certain aspects of my template.  By moving certain HTML out of the template into separate HTML files on the server, I would always be showing the current content on any page, regardless of whether or not it had been regenerated recently.  That’s no longer an issue, so now I can just pull that code back into the template, since the pages are (I guess) generated on the fly every time now.

I was using a PHP script to generate a tag cloud on my old blog.  This was actually looking at files in the labels/ folder, which won’t exist anymore, so I had to come up with a new way to do that.  If I switched to the new template style, I could just drop a tag cloud widget on the page, and be done with it.  Since I’m sticking with the old template style, I had to find another way.  This post shows a great way of generating a tag cloud using JavaScript and JSON.  It’s pretty cool.  I’m now using a modified version of that script.  I only changed a few things.  One minor thing is that I wanted a case-insensitive sort, so I added code I found here to do that.  And I changed the output from an unnumbered list to just a stream of text, separated by slashes, like my old tag cloud.

I think the whole thing looks pretty good at this point, though I’ve removed some stuff that I want to add back in at some point.

Fragile Things

I noticed today that Neil Gaiman’s Fragile Things is now available as a mass-market paperback.  I’ve never gotten around to picking this up previously, so I went over to Amazon and took a look.  The new paperback is $7.99.  There’s a Kindle edition for $9.59.  And, strangely, there are six Selections from Fragile Things Kindle e-books for 99 cents each.  I think that those contain the entire contents of the book, when you put them all together, but I’m not sure.  I wonder what the thinking on that was.  I probably think about these things too much.

Blogger FTP support going away

One very minor thing that’s come up recently: Support for FTP publishing in Blogger is going away. Apparently, less than 1% of Blogger users publish via FTP. That’s the method I’ve been using from the start, and I’ve just never changed. So now I’m going to have to. They’re supposed to be releasing a conversion tool that will make it easy to switch to a Google Custom Domain, so I can keep the blog at andrewhuey.org, but I might have to do some finagling to redirect andrewhuey.org to blog.andrewhuey.org or something like that.

On a practical basis, it shouldn’t be a big deal. On a philosophical basis, though, I’m wondering if I want to do this. Right now, all my content is stored at Google, of course, but published as HTML files under my 1&1 account. I can back them up easily, and if I ever decide to stop using Blogger, they don’t go away — I can keep my archives right where they are. If I switch to “custom domain” publishing, then my fqdn (say, blog.andrewhuey.org) will just point to Google’s servers, and I need to rely on them to serve up the content. They *do* have export tools that can supposedly give me a snapshot of my entire blog, so I could then import it elsewhere, so maybe there’s no practical problem with this. It just bothers me a bit that all my content will be in a database at Google and not fully under my control.

I may switch to WordPress. My host, 1&1, has the necessary support for WordPress (basically, PHP and MySQL), so I can install that, and have my blog completely under my control. All the data will be in a MySQL database that I can back up whenever I want, the logic will all be running on my own site, and I can pick it up and move it to another host whenever I want. And I guess another nice philosophical point is that WordPress is open source, so it won’t matter if WordPress as a company goes away; I’ll still have the code, running on my own site.

Of course, with everything that’s going on right now, I’ll probably just take the path of least resistance and go with the Google “custom domain” thing.

ramblings

I don’t usually get too personal on this blog. It’s usually just tech stuff and comic book stuff and random silliness. But I feel like I need to get some stuff out of my head and on to “paper” today. (I should warn you that you should skip reading this, if you’re not in the mood for maudlin.)

My dad died at the end of September, and my mom passed away on Monday of this week. After my dad passed, I was so busy taking care of my mom (or at least *trying* to take care of her) that I never really had enough time to process Dad’s death. And of course I spent most of this week handling the arrangements for my mom, so again, I haven’t had time to think about things much. Now though, the immediate details are all taken care of, and I find myself with a few spare moments here in my apartment, with nothing much that really needs doing right away. So now, I’m thinking.

I’ve realized that it’s Friday night. I used to call my dad almost every Friday night. For a while, I was calling at right around 7:30 every Friday. I tried to avoid calling during Jeopardy, since that would usually result in Mom yelling at Dad, because he was talking too loud and she couldn’t hear Jeopardy. So I’d wait until 7:30 to call. Sometimes, we’d just have a short call, going over anything that came up during the week, or talking about whatever holiday or birthday might be coming up and whether I was coming down, and what we’d do. At one point, we’d fallen into the habit of having pretty long phone conversations — about a half-hour usually. (My dad had a tendency to ramble.) I used to look forward to these calls. I know that some people don’t like calling their parents, but I genuinely liked talking to my dad, most of the time. Talking to Dad was a good way to unwind after a hectic week. I’d look forward to opening a bottle of beer and giving him a call. I’m just now realizing that I’m not going to have any more of those calls.

And I’m thinking about holidays too. Mom was always good about decorating the house (whether it was in Whiting or back in Roselle Park) for Easter and Christmas. Nothing elaborate or fancy; she just had a bunch of knick-knacks and stuff that she’d pull out of the closet and put around the house. I’d gone down to the house in Whiting for every Thanksgiving, Christmas, and Easter (and most other holidays) since they moved down there. We’d usually make a lasagna, maybe cook a small turkey, or something like that. The last couple of years, as Mom and Dad had both been having increasing trouble with their eyes, we’d scaled back a bit, and had actually gotten take-out a few times on holidays. But we still got together and hung out, even if it was just the three of us, having Thai food. There were a few years, when my brother Pat was still alive, where he and Heather would come down too, and maybe one or two people from Heather’s family might drop by, and one or two neighbors would come by, and we’d have a nice group of 5 or 6 or 7 people over. That was always fun.

I’m starting to wonder what I’m going to do on holidays from now on. Back when I thought Mom would hang in there for another 2 or 3 years, I anticipated that I’d probably go over to assisted living, and maybe take Mom out to dinner on holidays, or at least hang out with her for awhile if she wasn’t up to going out. Now, I’m thinking that maybe I’ll do some traveling around the holidays. Maybe I’ll go down to Atlanta and visit my brother Mike. Or maybe I’ll go into NYC on Thanksgiving, and see the parade. I guess I can do whatever I want now. I don’t have any family obligations at all. It feels pretty weird. Looking ahead, I think I’ll get through Easter easily enough. Maybe I’ll go to mass, then just come back home and relax. Thanksgiving and Christmas are going to be hard though. I was joking with somebody a while ago about doing a Jewish Christmas next year — hit a Jewish deli for lunch, then see a movie, then Chinese for dinner. I may actually do that. Or maybe I’ll go to mass at a big church in NYC and make a day of that. Or find a volunteer opportunity somewhere, maybe with the Salvation Army or something.

One other thing I’ve now realized that I’ve lost forever: Dad would often tell me, if I was complaining about work, or fretting about losing my job, that I could always move back in with him and Mom, if things got too bad. While I’ve always had a decent job, and more than enough money to pay my rent, it was a nice feeling to know that, if things got too bad, I could always move in to the spare room in Whiting for a while. It wasn’t just a monetary thing — if, maybe, I got really sick, or got seriously injured, or had a nervous breakdown or something, I knew there was a place I could go where they’d take me in, no question.

On a practical basis, I’ve been on my own for many years now. I’ve always had enough money to pay all my bills. I paid for my last car in cash. And I’ve got enough money stashed away to survive a couple of years of unemployment if I ever have to. I haven’t really *relied* on my parents for anything. But it was good to know that they were there if I needed them.

OK, so this post has really just been a bunch of clichéd self-pity. Everybody loses their parents. And it’s not uncommon to lose both of them in short succession. So, I’m not special in this. But it still hurts, and it’s still helpful to organize these thoughts and write them down. If you didn’t enjoy reading this, then feel free to forget all about it, and head over to The Onion and have a few laughs.