Jeremy Zawodny’s blog Jeremy Zawodny’s blog

Random thoughts on technology, aviation, and life in general…
  • November 17, 2008   Published ~ 16 years ago.

    TV Watching and Happiness

    In one of those “well, duh!” moments the other day, I came across a headline on Slashdot that said Unhappy People Watch More TV. Given that I mostly stopped watching TV quite some time ago and consider it to be one of the more rude devices in our culture, I clicked thru to read about how others have discovered what I’d already guessed was true…

    A new study by sociologists at the University of Maryland concludes that unhappy people watch more TV, while people who describe themselves as ‘very happy’ spend more time reading and socializing. ‘TV doesn’t really seem to satisfy people over the long haul the way that social involvement or reading a newspaper does,’ says researcher John P. Robinson. ‘It’s more passive and may provide escape–especially when the news is as depressing as the economy itself.

    Imagine that… Stagnation and exposure to negative information leads to sadness. It goes on…

    The data suggest to us that the TV habit may offer short-run pleasure at the expense of long-term malaise.’ Unhappy people also liked their TV more: ‘What viewers seem to be saying is that while TV in general is a waste of time and not particularly enjoyable, “the shows I saw tonight were pretty good.

    Another shock. TV provides only a short-term reward (kind of like a drug hit).

    If this resonates with you a bit, or you suspect deep down that there’s more going on with the influence of TV in our culture, I highly recommend reading Amusing Ourselves To Death by Neil Postman if you have not already.

    It’s too bad this stuff doesn’t get taught in school–where, I’m told, teachers are using PowerPoint more and more.

    *sigh*

    (comments)


  • November 17, 2008   Published ~ 16 years ago.

    TV Watching and Happiness

    In one of those “well, duh!” moments the other day, I came across a headline on Slashdot that said Unhappy People Watch More TV. Given that I mostly stopped watching TV quite some time ago and consider it to be one of the more rude devices in our culture, I clicked thru to read about how others have discovered what I’d already guessed was true…

    A new study by sociologists at the University of Maryland concludes that unhappy people watch more TV, while people who describe themselves as ‘very happy’ spend more time reading and socializing. ‘TV doesn’t really seem to satisfy people over the long haul the way that social involvement or reading a newspaper does,’ says researcher John P. Robinson. ‘It’s more passive and may provide escape–especially when the news is as depressing as the economy itself.

    Imagine that… Stagnation and exposure to negative information leads to sadness. It goes on…

    The data suggest to us that the TV habit may offer short-run pleasure at the expense of long-term malaise.’ Unhappy people also liked their TV more: ‘What viewers seem to be saying is that while TV in general is a waste of time and not particularly enjoyable, “the shows I saw tonight were pretty good.

    Another shock. TV provides only a short-term reward (kind of like a drug hit).

    If this resonates with you a bit, or you suspect deep down that there’s more going on with the influence of TV in our culture, I highly recommend reading Amusing Ourselves To Death by Neil Postman if you have not already.

    It’s too bad this stuff doesn’t get taught in school–where, I’m told, teachers are using PowerPoint more and more.

    *sigh*

    (comments)


  • November 14, 2008   Published ~ 16 years ago.

    Asynchronous MySQL Client in Perl

    I recently found myself wishing for an async library for MySQL. My goal is to be able to fire off queries to a group of federated servers in parallel and aggregate the results in my code.

    With the standard client (DBD::mysql), I’d have to query the servers one at a time. If there are 10 servers and each query takes 0.5 seconds, my code would stall for 5 seconds. But by using an async library, I could fire off all the queries and fetch the results as they become available. The overall wait time should not be much more than 0.5 seconds.

    While I found little evidence of anyone doing this in practice, my search led me to the perl-mysql-async project on Google Code. It’s a pure-Perl implementation of the MySQL 4.1 protocol and an asyncronous client that uses Event::Lib (and libevent) under the hood.

    The code contains little in the way of documentation or examples, aside from the simple bundled test script. After a bit of mucking around with it, I managed to cobble together a working example. It looks like this:

    Sure enough, that code runs in just a bit more time than the longest query it executes, rather than the sum of all the query times.

    What still surprises me is that this code doesn’t appear to get a lot of use (or at least discussion) in the real world. In the PHP world, the mysqlnd driver offers async queries.

    So count this as my contribution to demonstrating that Perl can do async MySQL queries too.

    (comments)


  • November 14, 2008   Published ~ 16 years ago.

    Asynchronous MySQL Client in Perl

    I recently found myself wishing for an async library for MySQL. My goal is to be able to fire off queries to a group of federated servers in parallel and aggregate the results in my code.

    With the standard client (DBD::mysql), I’d have to query the servers one at a time. If there are 10 servers and each query takes 0.5 seconds, my code would stall for 5 seconds. But by using an async library, I could fire off all the queries and fetch the results as they become available. The overall wait time should not be much more than 0.5 seconds.

    While I found little evidence of anyone doing this in practice, my search led me to the perl-mysql-async project on Google Code. It’s a pure-Perl implementation of the MySQL 4.1 protocol and an asyncronous client that uses Event::Lib (and libevent) under the hood.

    The code contains little in the way of documentation or examples, aside from the simple bundled test script. After a bit of mucking around with it, I managed to cobble together a working example. It looks like this:

    Sure enough, that code runs in just a bit more time than the longest query it executes, rather than the sum of all the query times.

    What still surprises me is that this code doesn’t appear to get a lot of use (or at least discussion) in the real world. In the PHP world, the mysqlnd driver offers async queries.

    So count this as my contribution to demonstrating that Perl can do async MySQL queries too.

    (comments)


  • November 13, 2008   Published ~ 16 years ago.

    Post-Election Thoughts: Equal but Not

    I’m happy that Barack Obama won the election. I think it’s time to stir things up a bit.

    What really bothers me is that fact that we still don’t have equal voting in this country. We certainly have the technology to share vote counts quickly and efficiently, so who not just do that? Why screw around with an electoral college anymore?

    It seems disingenuous at best and an outright lie at worst to call Obama’s victory a “landslide” when the actual percentages of the popular vote (the only vote that should count) were so close. Yet the large difference in electoral vote counts is supposed to make us believe that something very different happened. And the media was more than happy to play along with that deception (what a surprise, huh?).

    It should not be possible to lose by having more votes than your opponent, but it is. Why does nobody seem to care? (See: electoral college, specifically this.)

    Of all the countries that have tried to copy our model of democracy in the last 200 years or so, can you name a single one that adopted the electoral college as a piece of their political infrastructure?

    I’d love to have my vote count as much as everyone in all the other states.

    Why is that so hard?

    (comments)


  • November 13, 2008   Published ~ 16 years ago.

    Post-Election Thoughts: Equal but Not

    I’m happy that Barack Obama won the election. I think it’s time to stir things up a bit.

    What really bothers me is that fact that we still don’t have equal voting in this country. We certainly have the technology to share vote counts quickly and efficiently, so who not just do that? Why screw around with an electoral college anymore?

    It seems disingenuous at best and an outright lie at worst to call Obama’s victory a “landslide” when the actual percentages of the popular vote (the only vote that should count) were so close. Yet the large difference in electoral vote counts is supposed to make us believe that something very different happened. And the media was more than happy to play along with that deception (what a surprise, huh?).

    It should not be possible to lose by having more votes than your opponent, but it is. Why does nobody seem to care? (See: electoral college, specifically this.)

    Of all the countries that have tried to copy our model of democracy in the last 200 years or so, can you name a single one that adopted the electoral college as a piece of their political infrastructure?

    I’d love to have my vote count as much as everyone in all the other states.

    Why is that so hard?

    (comments)


  • October 22, 2008   Published ~ 16 years ago.

    Kick Ass Fonts in Ubuntu: 3 Easy Steps

    A few days ago I made yet another tweak to my Ubuntu laptop to make the fonts look a little better. The result is that I’m now quite happy–impressed even. Here are the three things I’ve done to make my day-to-day work easy on the eye.

    First, enable subpixel smoothing in the System > Appearance control panel.

    Ubutnu Font Rendering Settings

    For a long time that’s all I had done was was reasonably happy. Things looked okay but not great. But I used GNU Emacs for most of my coding and wanted fonts there that looked at good as those in gnome terminal.

    That led me to the second tip: install emacs-snapshot and use the GTK version. Then you can add this to your ~/.Xresources file:

    Emacs.font: Monospace-10
    

    And bingo! The same font that’s in your terminal is in Emacs.

    That made me happy in Emacs, but my Firefox fonts were still a bit sucky. So when I read Tweak Your Font Rendering for Better Appearance in Tombuntu, I had to give it a try.

    I created a ~/.fonts.conf file and added this to it:

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
      <match target="font">
        <edit name="autohint" mode="assign">
          <bool>true</bool>
        </edit>
      </match>
    </fontconfig>
    

    I logged out and back in and suddnely found myself staring at fonts in Firefox that looked as good as I’ve seen in Safari on a Mac.

    That’s all there was to it for me: subpixel rendering, emacs-snapshot, and enabling hinting via a .fonts.conf file.

    It’s worth noting that you can go even farther with the advanced font settings, but I really haven’t needed to go that far yet.

    (comments)


  • October 22, 2008   Published ~ 16 years ago.

    Kick Ass Fonts in Ubuntu: 3 Easy Steps

    A few days ago I made yet another tweak to my Ubuntu laptop to make the fonts look a little better. The result is that I’m now quite happy–impressed even. Here are the three things I’ve done to make my day-to-day work easy on the eye.

    First, enable subpixel smoothing in the System > Appearance control panel.

    Ubutnu Font Rendering Settings

    For a long time that’s all I had done was was reasonably happy. Things looked okay but not great. But I used GNU Emacs for most of my coding and wanted fonts there that looked at good as those in gnome terminal.

    That led me to the second tip: install emacs-snapshot and use the GTK version. Then you can add this to your ~/.Xresources file:

    Emacs.font: Monospace-10
    

    And bingo! The same font that’s in your terminal is in Emacs.

    That made me happy in Emacs, but my Firefox fonts were still a bit sucky. So when I read Tweak Your Font Rendering for Better Appearance in Tombuntu, I had to give it a try.

    I created a ~/.fonts.conf file and added this to it:

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
      <match target="font">
        <edit name="autohint" mode="assign">
          <bool>true</bool>
        </edit>
      </match>
    </fontconfig>
    

    I logged out and back in and suddnely found myself staring at fonts in Firefox that looked as good as I’ve seen in Safari on a Mac.

    That’s all there was to it for me: subpixel rendering, emacs-snapshot, and enabling hinting via a .fonts.conf file.

    It’s worth noting that you can go even farther with the advanced font settings, but I really haven’t needed to go that far yet.

    (comments)


  • October 21, 2008   Published ~ 16 years ago.

    Random Updates

    I’ve got several random things to say to the interwebs but none of them merit a blog post individually…

    First off, I love data. But I hate the fact that the spreadsheet in OpenOffice 2.x and Gnumeric both have row limits of 65,536. I don’t know who missed the boat on 32 and 64 bit CPUs, but it’s rather annoying! And, yes, twitter people, I know that 65,536 is a 16 bit limit–not 8. I was trying to make a point.

    Secondly, Yahoo can haz layoffs (again). Having lived through 3 rounds of layoffs in my 8.5 years at Yahoo, I know what that feels like. :-( If you’re a kick-ass Perl hacker or an excellent systems and network administrator who’d like to work at a great company in San Francisco, let me know.

    Thirdly, the dumbest bugs are often the ones that have been in your code a long time and are incredibly easy to keep glossing over as you read and re-read it.

    Fourthly, Tie::Syslog is pretty handy but seems to not like being used multiple times in the same app. Each instance seems to think that it has the same “identity.” Anyone seen that before? I haven’t dug into that yet but probably will soon.

    Finally, we’re out of town for a few days while the house is being fumigated for termites. And we brought all four cats with us. That what I call an adventure.

    Now back to your regularly scheduled… uh, stuff.

    (comments)


  • October 21, 2008   Published ~ 16 years ago.

    Random Updates

    I’ve got several random things to say to the interwebs but none of them merit a blog post individually…

    First off, I love data. But I hate the fact that the spreadsheet in OpenOffice 2.x and Gnumeric both have row limits of 65,536. I don’t know who missed the boat on 32 and 64 bit CPUs, but it’s rather annoying! And, yes, twitter people, I know that 65,536 is a 16 bit limit–not 8. I was trying to make a point.

    Secondly, Yahoo can haz layoffs (again). Having lived through 3 rounds of layoffs in my 8.5 years at Yahoo, I know what that feels like. :-( If you’re a kick-ass Perl hacker or an excellent systems and network administrator who’d like to work at a great company in San Francisco, let me know.

    Thirdly, the dumbest bugs are often the ones that have been in your code a long time and are incredibly easy to keep glossing over as you read and re-read it.

    Fourthly, Tie::Syslog is pretty handy but seems to not like being used multiple times in the same app. Each instance seems to think that it has the same “identity.” Anyone seen that before? I haven’t dug into that yet but probably will soon.

    Finally, we’re out of town for a few days while the house is being fumigated for termites. And we brought all four cats with us. That what I call an adventure.

    Now back to your regularly scheduled… uh, stuff.

    (comments)


Feed Information for Jeremy Zawodny’s blog

Find or add a new feed:

Enter website or RSS feed URL:
Upload/import OPML file:

Bookmarklet

Drag this link to your browser bookmarks bar, then click it whenever you want to add the site you're viewing to RSS2.com.

Add to RSS2.com