Random tidbits, thoughts, ideas, reviews, etc.Aaron Goes Yakkity Yak
Photo: Sego Lily on KolobIPv4You are not logged in. Click here to log in.
Use Google to search aarongifford.com:
Page 5 of 18
Asynchronous (Non-Blocking) Communication in Ruby
Wednesday, 29 April 2009 2:49 PM MDT
In doing work in Ruby for back-end infrastructure that needs to contact multiple RouterOS devices quickly and efficiently (using the RouterOS API), I've been exploring some non-blocking Ruby libraries. Looking at eventmachine and Rev, I'm leaning towards Rev due to Ruby 1.9 having integrated a lot of nonblocking stuff now.
So for asynchronous DNS resolution, I whipped up a little test script:
This lets me test it from the command line:
Ah, looks like Rev::DNSResolver.new() doesn't like to look up PTR records... I need to find better documentation to learn how to tell it to do PTR resolution instead of just IP resolution. Currently actual useful documentation is scarce, which seems quite common for most things in Ruby. *sigh*
Still, I quite like the single-threaded non-blocking event-style this (and similar libraries) allow. Now if only the Ruby MySQL module were fully asynchronous/non-blocking and event-ified (and I am ignoring NeverBlock's work in this area, as I've not tried it out yet, and also I'm hoping for something to become "mainstream").
With all this non-blocking stuff, monitoring tons of RouterOS devices using a single process (except for the MySQL database updates) should go smoothly. I like it!
Saturday, 16 August 2008 6:46 PM MDT
Back in May, regarding my goals to get out of debt and save, I wrote:
"What's embarrassing to me is that if I add up all my credit card debt (unsecured consumer debt) and add to it my RAV 4 auto loan balance, I owe about 65% as much as I owe on my mortgage (a 15-year mortgage)."It's been nearly four months since writing that. And there's been a lot of progress. Whereas before I owed in total credit card and auto loan debt about 65% of what I owed on my house, I've been paying that down as much as possible, and now I've got it down to 55% of what I owe on my house. In fact, within a few more months, I'll have my RAV4 paid off in full, which will free up nearly $600.00 in cash flow each month (no more car payment!) to apply towards other debt, and eventually to savings. (And it will feel incredibly wonderful to own my vehicle free-and-clear!)
Yay! I love, love, love the progress thus far. Now I just need to renew my commitment, since I've noticed that I've slacked off in trying to live more frugally in the past few weeks.
With all the price increases in food and energy recently, having my vehicle paid off and the benefit that comes from that, namely the added montly cash flow not tied down to a specific payment, has reduced my stress levels considerably.
But I know I'm not out of debt yet. My next target is a credit card with about 14% of my unsecured debt riding on it. It's a higher interest rate than the rest of my debt, and it's also the smallest balance.
In an ideal world where I (or someone else paying off debt) have (or has) perfect discipline, it's best to apply as much prepayment to the debt with the highest interest rate first, as that results in the quickest payoff. However, psychologically, it may pay instead to apply the bulk of prepayment to the smallest debt first instead. Even though doing so may slow getting completely out of debt, the person so doing gets the immense satisfaction (a psychological reward) much sooner, which acts as positive reinforcement to help one remain on task working towards the goal.
So I guess I'm fortunate that both of these options point to the same card. I get the benefit of both worlds! *grin*
I'm not paying off my debt quite as fast as I could optimally. I've set up some automatic transfers out of my main account into a savings account because I don't really have an emergency cash fund like I'd like to have.
And I did splurge last month a bit, delaying the payoff of my vehicular debt by a few extra months (I'd otherwise have it paid off fully next month). I raided my prepay money and some of my savings to buy some ZION and WFC stock (I'm a buy-and-hold guy, not a trader) shortly after both hit extremely low (in my inexperienced opinion) prices last month, to the point that both financial stocks looked like bargain basement buys to me, so much so that I couldn't resist and I bought shares of each.
Now I completely understand that the credit crunch and housing crisis is far from over, and these stocks, though up considerably since I bought them (as of the closing price yesterday) may tumble well below where I bought 'em. If that happens, I'll most likely hope I have more cash on hand to buy more at bargain prices, so long as I believe that the fundamentals of each company shows some strength. And I'm willing to wait 5, 10, 15, or 20 years before I sell.
It's wonderful to make progress!
And now for a complete change of topic: Lightning! Last night, a thunderstorm built up and rolled through the St. George, Utah area, with lots of lightning and thunder, but very little rain. It was fun to watch the light show in the sky and listen to the thunder rolling across the desert.
In the darkness of night, lit frequently by cloud-to-cloud lightning strikes punctuated now and again with a powerful ground strike, I could hear oohs, aahs, and wows from my neighborhood. The storm drew many of us outside to our front porches (and these stucco homes don't have much of a porch—a feature I like and want in whatever next house I live in) to watch the fireworks show.
I grabbed my camera and set it for long exposure times, and taking many shots, managed to capture a few bolts of lightning. Unfortunately, I don't really know how to control or use it very well. I should have closed the aperture quite a bit on the long exposures so that close strikes didn't totally wash out all detail due to overexposure (the photo ends up mostly blank white). Then I could have cranked up exposure time to the max, camera on tripod pointed at the sky, and probably come up with some really spectacular shots.
Included in this post are the three that managed to catch some of the action going on in the sky.
Music With Enthusiasm With a Few Laws of the Universe Appended
Thursday, 26 June 2008 7:21 PM MDT
I just watched this very entertaining and moving TED talk, Benjamin Zander on Music and Passion. It's about twenty minutes long.
Now I'm a sucker for good music and have loved classical since I was a child. But this guy knows how to infect even those who don't care so much with his enthusiasm.
As I watched, I noticed my own reactions to the music as he played it. As often happens when I hear beautiful music, my thought processes calmed, my heart opened up, and emotion of a more refined kind flowed freely.
And Benjamin Zander ends his presentation with some expressions of things that I think hint at foundational principles of the universe, principles of truth about where true power comes from.
Hint: It doesn't come from wealth, money, political, or military power. It comes as one lifts and encourages others—then without exercising any force or compulsion over another human being, your discover that your own power has grown.
Truly great leaders of all nations, kindreds, races, and cultures have discovered this secret. (I can't help but think that Gandhi must have known something of it.)
Joseph Smith, during a period of severe distress in his life and in the lives of those he knew and loved, received as part of an answer to his prayers revelation from on high that expressed these same principals of truth about where true power comes from. That answer included these words: "The Holy Ghost shall be thy constant companion, and thy scepter an unchanging scepter of righteousness and truth; and thy dominion shall be an everlasting dominion, and without compulsory means it shall flow unto thee forever and ever."
(Read this for a little more detail on Joseph's prayer and answer.)
Late-Night Musings While Waiting for a Server Reboot
Thursday, 08 May 2008 11:51 PM MDT
Wow, it's late, I'm tired, and the 5:30 AM alarm goes off so very, very soon! (I doubt I'll be able to resist turning it off and sleeping in... *sigh*)
Nevertheless, I thought I'd write a tad here. (Besides, I'm waiting for a remote server whose OS kernel was upgraded to reboot as I write this, so I've gotta be up a little longer anyway.)
My natural inclination towards avoiding manual labor like cooking must be on the fritz. I rather enjoyed cooking for my brother Kendall and my friend Jason this evening. It was easy and quick, slicing up some yellow summer squash, zucchini, and a small yellow onion into a frying pan with some olive oil, while freshly husked ears of corn steamed in another pan, and some cheap cuts of beef sizzled in the George Foreman grill. It only took 30 minutes total, most of that prep. time.
The clean-up, however, I'm putting off until morning. There, the slothful side of me is now sated. *grin*
It all makes me look forward to harvesting from my own small garden. If it produces. I am new to this gardening thing, after all, even though my parents made me pull weeds in tomato patches, pick green beans, and other such things as a youth.
Learning to Save
Thursday, 01 May 2008 9:52 AM MDT
The adage that it's wise to save at least 10% of one's income has buzzed around in my head for years. A recent radio talk show host expanded upon it, suggesting saving 10% and investing 10%. As a member of The Church of Jesus Christ of Latter-day Saints, I also subscribe to the concept of tithing. That means I believe in making regular charitable contributions of 10% of my income to my church as well as making charitable offerings to other worthy causes (like contributing to humanitarian aid, to local food banks, or supporting the local troop of the Boy Scouts of America, for example).
That's at least 30% of my income. Wow! What a goal! I'm not there yet, but I'm making progress.
Some progress I've made thus far: I opened a ING Direct Orange Savings Account back in 2005 and used their automated savings plain to auto-deduct $100 each month from my bank checking account. Over the course of time, I accumulated enough savings to permit me to open a Vanguard S & P 500 mutual fund (VFINX). At the time I believe Vanguard's minimum requirement was $2,000 or $2,500 or so for this fund --it's now at $3,000 I believe.
(Aside: If you ever want to open an account with ING Direct, either an Orange Savings, or their Electric Orange checking account, and you open it with at least $250.00, you can get a $25.00 one-time bonus from ING for doing so if you contact me and give me your email address so I can refer you as a friend. I also get a $10.00 one-time bonus. You win. I win.)
What's nice about opening the Vanguard fund is that since I've opted for electronic delivery of all notices and documents, they waive the annual fee that they otherwise charge for accounts like mine that have less than $10,000 in value. Another benefit, is I've now set up automatic investments that monthly automatically deduct at lest $50 from my checking account and invest in the fund. And there's no brokerage fee for this small-scale dollar-cost-averaging method of investments.
Were I a big investor regularly investing in index funds like this using large chunks of money (Don't I wish I were!!!), I'd seriously consider one of the Exchange Traded Fund (ETF) equivalents, but since I invest small amounts regularly, the brokerage fees even with someplace like Scottrade would eat a significant chunk of my capital each purchase.
If I take into account what I have automatically deducted from my paychecks before taxes and contributed to my SIMPLE IRA investment plan offered by my employer, and my automatic savings plans and Vanguard investment automatic investments, I've actually finally reached the 10% savings goal. I've got another 10% to go before I can say I save 10% and invest 10%, however.
(As for tithing, I've been a tithe payer all my life and can strongly attest to the blessings that flow from paying a tithe. It really works! As promised in Malachi 3:8-12, God truly does pour out blessings! And I'm not telling you this to boast or claim to be spiritually superior or anything. I just an ordinary guy. But I sincerely believe in the concept of tithing. My life and the lives of my family members have repeatedly been blessed, especially in times of need. I believe God honors His promises if we keep his commandments.)
My next financial goal is to eliminate all the debt I've accumulated over the years. I've debated whether or not to stop my 10% savings/investing plan and instead apply that money to paying down debt, then resume in a few years once I'm debt free. I hesitate, however, because I haven't yet proved to myself that I can be financially disciplined enough to live more frugally and avoid any new debt. I've got work to do on this.
In the first week of last month (April 2008), I made a commitment and promise to myself: I will not buy anything with my credit cards unless I pay off the balance in full within the 20-25-day grace period (and thus pay no interest). Additionally, I've stopped my 10-year-old habit of collecting DVDs, CDs, books, HD-DVDs, and Blu-Ray discs—put it on hold—until I'm out of debt (out of consumer debt and auto debt that is, excluding my mortgage). I've felt an urgent need to follow the counsel of LDS church leaders and get out of debt and stay out of debt. I've ignored it far too long (having acquired my first credit card in 1995 or 1996 which I promptly used to buy a computer system—and I've had consumer debt ever since).
What's embarrassing to me is that if I add up all my credit card debt (unsecured consumer debt) and add to it my RAV 4 auto loan balance, I owe about 65% as much as I owe on my mortgage (a 15-year mortgage).
Cash-flow wise it's painful. If I was consumer-and-auto debt free, I could easily meet my 10% savings, 10% investment, and 10% tithing (plus other charitable offerings) goal! I could even then make prepayments on my mortgage and have my house paid off in only a few more years, freeing up even more cash flow for savings, investment, and charitable contributions. And I could resume my movie/music/book collecting without worry.
Ug! That's INSANE! What was I thinking?!?!? Well, I'm-a-gonna change!
These are my goals. I hope to update my web site periodically to record how I'm doing. I'm cutting back wherever I can, especially as gas prices climb higher and food prices follow.
So how are you doing savings-wise? Are you able to save anything? I sure hope you are. If not, I encourage you to, even if it's only $5 or $10 each month.
P.S. I've gotta tout the local America First Credit Union here in Utah. They have a sweet set-up called a Dedicated Savings Account that earns similar interest rates as CDs, has terms a bit like a CD, but lets one auto-contribute each month as little as $10.00, with no minimum opening balance. Not many banks can match that! And their Dedicated Savings and CD rates are comparable to many larger institutions' Money Market or CD rates. Way to go, AFCU!
A Patchy Day
Wednesday, 30 April 2008 3:23 PM MDT
This is a work-related post, so consider this fair warning, all non-geek visitors!
A customer has been using InfoWest's web email interface to read email for quite some time, but today discovered that logging in presented only a blank page.
So I logged on to the FreeBSD server in question and started perusing web server access and error logs, but nothing unusual was showing. In fact, the access attempts by the user weren't being logged at all by the Apache web server. Fortunately there was something useful in the system logs:
A quick googling of that error message pointed me to PHP Bug #42862 where another user (sborrill) provided a patch. I copied the patch over to the appropriate place in the server's FreeBSD ports directory at
Now I just need to submit this patch to the FreeBSD port maintainer, at least until the PHP maintainers integrate a fix into the next release.
This is why I love open source software! Were we using some proprietary system and we encountered a bug like this, we'd have to wait days, weeks, or months for the vendor to issue a fix. With the source code available, one can dive into the code, find the flaw, and fix it. Then share the fix with others.
Flickervision: Astoundingly cool
Thursday, 13 March 2008 11:44 AM MDT
Now this is astoundingly cool!
[UPDATE: As of 25 Sept. 2010, the original link no longer worked. It originally linked to a 3-D animated globe popping up recent Flickr-posted images, instead of the Google map the main site uses now—at least I think it was. The original link, http://flickrvision.com/maps/show_3d/ no longer works.]
This is Funny! (Political Free Speech, or Domain Speculation?)
Wednesday, 12 March 2008 3:05 PM MDT
A gentleman I know named Jeff, of Cedar City, Utah owns the Internet domain name utahdemocrats.org. Jeff has his web site set up currently so that any and all visitors are immediately redirected to John McCain's web site, www.johnmccain.com. Before Mitt Romney bowed out, Jeff's site redirected to www.mittromney.com.
I know Jeff. I've worked with him. He's an honest, hard-working, likable guy, with a touch of the entrepreneurial spirit. He collects and invests a little bit in Internet domain names among other things, and has had some success doing this over the years. I've sought his advice on various domain investment topics before and will in the future when dabbling in domains. (I currently own a two-letter domain, eq.net, and used to own, in the 90s, with some friends, the domain southwest.com but sold it to Southwest Airlines for a meager sum and some airline tickets.)
He's also a conservative Republican. (I don't know if he's a registered party member, but from what I've heard of Jeff's views, he seems quite conservative, and I suspect he is registered as a Republican.)
So today I hear from Jeff that the Salt Lake Tribune has mentioned his utahdemocrats.org web site in an article at http://www.sltrib.com/news/ci_8542223 (At least as of now that link works—I expect that article will eventually migrate to the Trib's archives and the link may stop working.)
Down near the bottom of the Tribune article, it says:
Those little devils: When trying to access the Web site of the Utah Democratic Party, a reader typed in www.utahdemocrats.org," and was immediately redirected to John McCain's campaign Web site, www.johnmccain.com.Jeff's little bit of political speech via his web site apparently got someone in a tizzy, so much so that later in the day, this article turned up on the web site of KSL (a local Utah television station) at http://www.ksl.com/?nid=148&sid=2839356 where the short article's author, Mary Richards, reports in the first paragraph:
The actual Web site for the Utah Democratic party is www.utahdemocrats.com.
Utah Democrats are wondering if a Web site blunder is a funny joke or dirty trick. A similar Web site to their own redirects people to John McCain's site.I find it interesting that none of the reporters tackled the free speech angle. Political free speech one of our most preciously held constitutional rights, and the press is usually quick to back it up. Just because Jeff owns the domain utahdemocrats.org and he might not actually be a Democrat isn't a problem. So what if the Democrat Party of Utah chose to use as their web site utdemocrats.org? That's not Jeff's problem, unless he were deliberately trying to confuse visitors and make them think his web site was the official web site. He's not, though.
He's not committing a crime. In fact, far from it. Now were he representing his own web site as something other than it is, he would possibly be within the realms of fraud. But he's not. He's clearly making a political statement by redirecting web visitors to Senator John McCain's campaign web site.
I think the best analogy would be something like this: Let's say the Democrat Party of Utah leased space for party headquarters in a building, and someone of a more Republican bent chose to lease space right next door in the adjoining suite. On the door or in the window of the adjoining suite, the non-Democrat hangs a prominent sign that says merely "Utah Democrats Welcome". Immediately inside of his office, he bedecks the place with conservative and Republican paraphernalia, campaign posters, signs, etc.
Now anyone going into the building might see the two doors and initially wonder where he was going (if he didn't carefully check the address). But upon opening the door, he would immediately know he was in the wrong place if he mistakely opened the wrong one. He could and would likely quickly step back out, double-check the address, and then enter his original destination.
Is this sneaky? Perhaps. Is it valid political free speech? Very much so! The next-door neighbor isn't purporting to be the headquarters of the Democrat Party, and upon opening the door, makes it very, VERY clear that it is not.
(I hope Jeff doesn't mind me mentioning this, his only regret expressed to me today was that his mother called him about this after hearing it on radio KSL 1160 AM. Apparently the radio report cast his domain ownership in a somewhat negative light, and his mother, in her 70s, didn't appreciate hearing her son's name in that context.)
So is this domain speculation (or worse, typo squatting), or is it political free speech? I'm going to vote free speech on this one. (But then perhaps my own conservative leanings make be biased.)
No matter what you think about the issue, if you think it's interesting, join me and Digg the KSL news story here: http://digg.com/politics/Democrats_Having_a_Fit_Over_Free_Speech_in_Utah
I hope things go well for Jeff, if there's any more hoopla about his domain. I find it all terribly funny! All I can say is: Go, Jeff! Go!
UPDATE: 12 March 2008
Jeff spoke up for himself on KSL's web site in the story's comments section (see comments by user Dc84720) where he said:
The story is about me I guess, I am the owner of that domain nameAnd a bit later, another user asked and commented:
Let me set the story straight. This is not a JOKE per se. I buy and sell domain names along with 2 or 3 other 'hobbies' that make me money. I own several hundred domain names, most of which are related to Utah in some way.
Back in July of 2006, I found Utahdemocrats.org in a 'dropped names' list. Daily, thousands of domains are not renewed by their owners. This name was not renewed. It NEVER belonged to the Utah Democratic Party. So to summarize at the time I bought it, their website was UTdemocrats.org. Obviously, I offered it to them for sale. They declined to buy it on 3 or more occasions if I recall.
The way in which they handled themselves and their excuses simply irked me.
The domain has been at various times, Parked (for income from ads), redirected to MittRomney.com first, then GOP.org now to JohnMccain.com. This has been all as the election has progressed.
Anyway, this is within my rights. The story doesn't really represent me in a positive light. I don't really care but I wanted to set the story straight since the reporter made very little effort to communicate with me.
The name is for sale, if the Utah Democratic party wants the name, its for sale. They know how to reach me.
Their excuses?To which Jeff responded:
Their excuses simpled "irked" you? You just assume people should buy from you, and when they choose not to, they're making "excuses"? WOW, quite a pedestal you put yourself on.
You know, you may be right.And finally, when someone commented about KSL not contacting Jeff before running the story, Jeff replied:
To a point.
Maybe part of it was the wording I used in my description above. Basically they wanted to introduce me to the "ways of the democratic party" and tried to convince me to donate the name to them.
I politely declined their offer as I *had* no political intentions with the name. I approached it in a business-like manner hoping that they could see the value of the name and purchase it from me. Nothing more. Their handling of the 'negotiations' was unprofessional in my opinion and ultimately led to my being 'irked'.
they called.....So it looks like my interpretation of Jeff's actions as being mostly political free speech is not entirely accurate. From Jeff's own words, it looks like he was simply doing business, and in the interim, doing a little bit of political speech on the side (i.e. redirecting the web site to sites that match his own political views so long as the domain remains unsold).
KSL called and wanted to confirm I really owned it. I called and only got a voicemail saying, yes, I owned it. That was the extent of it.
Thanks, Jeff, for the clarification. Your responses definitely paint a better picture of the situation than KSL's original story did.
St. George or Saint George? (Wherein I Face-Off with Facebook and Other Sites)
Sunday, 09 March 2008 10:39 PM MDT
Ah, the little annoyances of computer applications...
I just discovered while editing my Amazingly Astounding profile that Facebook won't let me put "St. George, UT" in my current contact information. It keeps insisting on expanding it to "Saint George, UT".
While the "St." in "St. George" is an abbreviation for the word saint, the City of St. George, Utah is officially incorporated using the abbreviated spelling "St. George" and not the expanded "Saint George" -- so the perfectionist in me prefers to use "St. George" and not "Saint George" for any/all web sites, or anything else asking for the city of my residence.
I blame the U.S. Postal Service. Their database is most likely responsible, as it uses the "unofficial" non-abbreviated spelling.
Just for that I'm going to boycott using U.S. Postal Service stamps when mailing my bills each month. That will show 'em! (Oops! I use online bill pay for all those, so that won't work... *chuckle*)
You know, it's important issues like this one that should decide the 2008 presidential election. Really.
Finding humor difficult to detect, parse, or comprehend? Try Salty the Sailor's Gargantuan Grains o' Salt for the Humorless. The recommended dose is one grain applied to tongue while reading or observing any material you suspect may be contaminated with humor or sarcasm, or any byproducts thereof. A double-dose may be required while perusing various portions of this web site. (Or you can send me gold. I'll accept any 99.999% pure 1 oz. gold coins you want to give me, or at least I'll try!)
Wow, did I just admit I'm on Facebook now? *sigh* It appears I have, though such fact is difficult to face.
UPDATE: Wed. 12 March 2008
I just tried registring to comment on ksl.com, a local Utah television/radio station web site. It rejected me, because "St. George" was not a valid city. *sigh* The U.S.P.S. database strikes again!
I Still Love Those Klipsch ProMedia 2.1 Speakers
Saturday, 08 March 2008 9:00 AM MST
The very first computer speakers I ever bought that sounded good, really good, were the Klipsch ProMedia 2.1 stereo speakers plus subwoofer. I don't recall when this was, but it had to be five or more years ago (before 2003).
Today while watching the latest episode of Tekzilla wherein they were reviewing computer speakers in the $90-$150 range, they agreed with my own personal experience that the Klipsh speakers sound great. The hosts of the show several times shared their amazement about how inexpensive these high-quality speakers were. They just sound like they should be much more expensive.
Since buying the Klipsch speakers, I bought a new Apple Mac workstation in 2003 and with the new Mac I bought a Creative 5.1 THX certified speaker set. I gave my Klipsch 2.1s to my parents for their computer use. Years later, I now regret giving up the Klipsch ProMedia 2.1 speakers. While the Creative speakers are also THX rated, I just don't quite care for the sound. I love, love, LOVE the sound of the Klipsch 2.1s and I miss that sound! And since I never really did do much that needed the additional 2 surround channels that the Creative set added, I would happily go back to the Klipsch ProMedia 2.1s.
I have noticed that Klipsh offers a newer 2.1 speaker set, called the ProMedia GMX A-2.1, but these are not THX certified. While they look funky, I wonder if they would sound as good as the older ProMedia 2.1 THX certified speakers. I have grave doubts. I've also seen other Klipsch speaker offerings, even another ProMedia set, but they too were not THX certified.
My original Klipsch speakers (now at my parents' house) are still going strong and sounding great on my folks' PC. And my brother also has Klipsch ProMedia 2.1 speakers attached to his PC at his apartment. I know he loves 'em too.
The newer Creative speakers I replaced the Klipsch speakers with is now on the fritz, sporadically refusing to power up, randomly cutting out. Once they're truly dead, I'm going to replace 'em with the Klipsch ProMedia 2.1 speakers. When I do, I'll be in computer speaker heaven once again!
The Klipsh speakers have a suggested retail price of $149.99, but I hear they can be found on the street for anywhere between $100 and $150. They're worth it. More than worth it! Once you hear 'em, you'll be a believer too. You to will think $150 is a steal for these.
Page 5 of 18