tag:blogger.com,1999:blog-58728758655657249032024-02-18T22:04:02.014-08:00Greg Smith's Note MagnetGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-5872875865565724903.post-21258249734285275072012-07-16T10:41:00.003-07:002013-04-16T21:30:13.608-07:00The old fastball special!One of the fun things about reading older comics is noticing early versions of things that became popular later. The DC compilation "The Greatest Team-Up Stories Every Told" is filled with firsts. I picked it up for the reprint of the 1961 Flash #123, "Flash of Two Worlds". That's where the DC multiverse was introduced, a concept that would later be expanded into "Crisis On Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-15611044365037807912011-12-16T01:43:00.000-08:002011-12-16T02:32:42.914-08:00The FDA and our government
<!-- @page { margin: 0.79in } P { margin-bottom: 0.08in } A:link { so-language: zxx } -->
What's right, what's wrong, and what that says about the US Government
It's easy for anti-government comments from Libertarian sources to inflame a debate focusing on good work done by our current government. Watching the reaction to a profane, vulgar, and hilarious rant from Penn and Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-36235318799089384462011-01-08T15:03:00.000-08:002011-01-08T15:32:07.162-08:00Rhythmbox playlist editing with the magic of command-line diffAs a near full-time Linux desktop user, I haven't found anything I like better for music than GNOME's Rhythmbox. The UI is a little funky sometimes, but all I really want from a music player is the ability to find all the songs in my library and make playlists.One of the problems I run into sometimes relates to my fanatical music ripping. I extract all the audio from my CDs in both FLAC, for Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-25326510427087883882010-09-13T16:25:00.001-07:002010-09-13T16:56:18.844-07:00Toner ripoffs on the Brother HL-4040CDNI bought a Brother HL-4040CDN color laser printer about two months ago. Knowing I had a whole book worth of proofreading to do, I knew a lot of printing was coming. And the way my publisher marks things up, I need to see some color on each sheet to confirm formatting is right; some words are highlighted in red or blue. We're talking a few words on each page, typically.After exactly 2310 color Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com10tag:blogger.com,1999:blog-5872875865565724903.post-36100766958285307822010-09-03T13:13:00.000-07:002010-09-03T14:16:49.973-07:00A tale of three power supplies: Antec, Seasonic, CorsairI've bought a lot of Antec cases and power supplies over the years. The original Antec Sonata was the last one I was really satisfied with though. So long as you added your own internal fan to the hard drive area, it was really great. The Sonata II is where things started to go wrong for me and Antec. They jumped onto the stupid "put a duct in it" train, and the power supply didn't look so Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com1tag:blogger.com,1999:blog-5872875865565724903.post-81119399077463821312009-12-28T08:21:00.000-08:002009-12-28T08:58:27.591-08:00Testing PostgreSQL 8.5-alpha3 with pegPostgreSQL 8.5-alpha3 was announced last week. The biggest single feature introduced in it is Hot Standby, which allows you to run queries against a server that's being used as a Warm Standby replica. Since you can make any number of such replicas from a single master database, this introduces a whole new way to scale up PostgreSQL server farms in situations where you can live with queries thatGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com7tag:blogger.com,1999:blog-5872875865565724903.post-61337597870700460112009-11-05T20:13:00.000-08:002009-11-05T20:14:35.362-08:00Ergonomic keyboards: Kinesis vs. MicrosoftI used to be pretty hardcore as my keyboard choices go. I have a stack of vintage IBM and Lexmark Model M keyboards, and can grade them like a wine connoisseur ("these '96 models just doesn't have the bounce I expect from even a good vintage '93 or '94", even though they're all far superior to the brand new Unicomp models still on the market). But like many computer users, I sometimes suffer Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com4tag:blogger.com,1999:blog-5872875865565724903.post-10020463365787657872009-11-05T19:15:00.000-08:002009-11-05T19:48:36.776-08:00Running cron on UbuntuAutomating regular admin tasks with cron is a great way to handle all sorts of chores. Every day systems around the globe e-mail me cron reports showing their backups were successful and a report of how many bad guys tried to break in (by the obvious front door of ssh at least). I run an Ubuntu desktop at home, and I'd like to automate tasks on it with cron as well. Here's a quick guide to theGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-31130871374885097282009-11-03T14:59:00.001-08:002009-11-03T15:20:43.506-08:00PostgreSQL at the LISA conference in BaltimoreThis week the Usenix LISA Conference is running in downtown Baltimore. There will be a PostgreSQL booth in the exhibition area from noon-7pm on Wednesday and from 10am-2pm on Thursday. Robert Treat is the lead elephant for this show, and is too busy with booth setup to have time to write fluff pieces like this one. I'm co-hosting, and we have some other volunteers you might see too. We're Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-19179829598129486962009-10-13T22:11:00.000-07:002009-10-13T22:36:43.763-07:00Triple partitioning and Dual Booting with Mac OSA few months ago I bought a used Intel MacBook I'm now switching over to using as my primary personal laptop. I'm still using Linux as my preferred OS elsewhere though, so I need to deal with dual-boot both on its hard drive (and no, a virtualized Linux install will not be fast enough). I also got a new backup hard drive, and wanted to partition that to support three OSes. This is the saga of Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-65101036071882258182009-10-13T15:08:00.001-07:002009-10-13T21:13:12.900-07:00Getting started with rsync, for the paranoidWhen a computer tool has the potential to be dangerous, my paranoia manifests itself by making sure I understand what the tool is doing in detail before I use it. rsync is a very powerful tool you can use to clone directory trees with. It's also possible to wipe out your local files with it, and understanding what it does is quite complicated to figure out. It doesn't help that the rsync Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com1tag:blogger.com,1999:blog-5872875865565724903.post-58136133197271356552009-10-13T13:41:00.000-07:002009-10-14T08:57:26.464-07:00Using doxypy for Python code documentationLast time I wrote a long discussion about Python module documentation that led me toward using doxypy feeding into doxygen to produce my docs. Since I don't expect Python programmers in particular to be familiar with doxygen, a simple tutorial for how to get started doing that seemed appropriate. I had to document this all for myself anyway.Running on Ubuntu, here's what I did to get the basicsGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-35035252608433281132009-10-12T13:09:00.000-07:002009-10-13T21:32:04.425-07:00Watching a hard drive dieOne thing I get asked all the time is how to distinguish between a hard drive that is physically going bad and one that is just not working right from a software perspective. This week I had a drive fail mysteriously and saved the session where I figured out what went wrong to show what I do. It's easy enough to find people suggesting "monitor 'x'" for your drive, where 'x' varies a bit Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com2tag:blogger.com,1999:blog-5872875865565724903.post-26091833195710183172009-10-07T12:51:00.000-07:002009-10-13T21:38:18.553-07:00Writing monitoring threads in PythonA common idiom in programs I write is the monitoring thread. If you have a program doing something interesting, I often want to watch consumption of some resource in the background (memory, CPU, or app internals) while it runs. Rather than worrying the main event loop with those details, instead I like to fire off a process/thread to handle that job. When the main program is done with its mainGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com1tag:blogger.com,1999:blog-5872875865565724903.post-14397043789019596922009-10-06T18:14:00.001-07:002009-10-13T21:28:01.899-07:00Formatting source code and other text for bloggerThe biggest nemesis of this blog is that I regularly include everything from source code to log files in here, which really do not fit well into Blogger without some help. Today I got fed up with this enough to look for better ways than what I had been doing.My HTML skills are still mired in cutting-edge 1995 design, I lost touch somewhere around CSS, so my earlier blog entries used this bit of Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com2tag:blogger.com,1999:blog-5872875865565724903.post-36739075682296927852009-09-29T18:41:00.001-07:002009-10-14T09:02:16.504-07:00Module API documentation in PythonSometimes I fondly reminisce about the days when all of the code I worked on was in one programming language. Nowadays, it's a mix of C (mainly related to the PostgreSQL code base), Java (my employer's middleware and lot of my personal code), and Python (systems programming, general utilities, and QA test code). Python is the most recent of those to be added to the mix, and it's proven to have Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-28156221495781726812009-09-16T16:17:00.000-07:002009-09-16T16:36:58.826-07:00Following symlinks in PythonToday's Python trivia question: you have the path of a symbolic link. How do you get the full destination that link points to? If your answer is "use os.readlink", well it's not quite that easy. I'm not alone in finding the docs here confusing when they say: "the result may be either an absolute or relative pathname" and then only tell you how to interpret the result if it's relative. This Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com2tag:blogger.com,1999:blog-5872875865565724903.post-85575192800347251432009-07-22T17:24:00.001-07:002009-07-22T17:58:12.408-07:00Upgrading Flex from source RPM to compile PostgreSQL from CVSThis week I'm working on reviewing a patch that's part of the current PostgreSQL CommitFest, the periodic points where all outstanding patches are looked at and committed if ready. The patch I'm looking at requires some performance testing, and all my servers I'd do that on are running CentOS 5, the popular RedHat Enterprise clone. There's a fun surprise waiting for anyone else who tries this:Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com8tag:blogger.com,1999:blog-5872875865565724903.post-47947105629255360042009-07-06T08:26:00.000-07:002009-07-06T09:39:22.325-07:00Python logging TypeError messagesI've been writing small Python programs for about two years now. There are a few things that slipped my notice until really recently though, and having good application logging instead of using "print" is on that list. Lost some time today figuring out that "global" goes inside functions where that global is used, rather than as a modifier when creating the variable; Understanding 'global' in Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com3tag:blogger.com,1999:blog-5872875865565724903.post-80883820720102690672009-05-27T12:44:00.001-07:002009-05-27T15:31:23.656-07:00Bottom-up PostgreSQL benchmarking and PGCon2009Last week I got a lot of positive feedback from my PGCon presentation in Ottawa about how to benchmark systems at a low-level when the intended application is to run a database. There were three main topics I was trying to cover in that:Why you should always run your own hardware benchmarks on every piece of hardware you canExamples of the simplest benchmarks I've found to be accurateHow do Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com1tag:blogger.com,1999:blog-5872875865565724903.post-34856919166237197762008-12-08T12:52:00.000-08:002008-12-08T23:43:30.883-08:00Copying Virtual Box snapshotsI've really become comfortable nesting all of my Windows installs inside of Virtual Box lately (my main systems run both RedHat and Ubuntu Linux). Just being able to shuttle that image around to wherever I happen to be working is one big help. And the value of working with VMs was just reinforced this week when I learned that my recently installed XP Service Pack 3 introduced an incompatibilityGreg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com0tag:blogger.com,1999:blog-5872875865565724903.post-23322793172953169352008-11-30T18:23:00.000-08:002008-12-01T09:32:57.769-08:00Automating initial postgresql.conf tuningAbout two years ago I returned to full-time work on PostgreSQL performance tuning for a contract job, after having done some earlier work in that area for a personal project. One of the things that struck me as odd was that no progress had been made in the intervening years toward providing an automatic tool to help with that goal. Since many of the existing guides only covered older versions Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com8tag:blogger.com,1999:blog-5872875865565724903.post-82976552655606236392008-08-26T20:56:00.000-07:002009-10-13T21:50:11.560-07:00Linux disk failures: Areca is not so SMARTOne of the most frequently asked questions on the PostgreSQL Performance list is "what disk controller works best with PostgreSQL?" It's a tough question; every product has different things it's good and bad at, and it can be hard to through all that to figure out what makes sense for your application. You need to focus equally on performance and reliability, as disk drives are very prone to Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com8tag:blogger.com,1999:blog-5872875865565724903.post-89108012516444896562008-08-15T21:01:00.001-07:002008-08-15T21:21:58.818-07:00"The essential postgresql.conf" at the BWPUGOne of the common complaints about how you setup and tune a PostgreSQL server is that the postgresql.conf file is way too big, and there's no good guidance to where you should start. I've been talking and corresponding with many PostgreSQL administrators over the last few months, and getting writing help from Christopher Browne and then Robert Treat, to work on that problem. I'm proud to Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com2tag:blogger.com,1999:blog-5872875865565724903.post-31382346767034287952008-08-04T22:42:00.001-07:002008-08-04T23:12:08.019-07:00Virtualbox and custom kernelsI've been using Virtualbox successfully for a few months now. On my laptop, with Linux as the host operating system, the virtual Windows XP install runs faster than the real XP install on another partition, even though I've only given it 512MB of RAM to work with. Very interesting program.But on my main desktop system I run a custom kernel, and the same Virtualbox install didn't work there. Greg Smithhttp://www.blogger.com/profile/16149991742662655368noreply@blogger.com1