Lojic Technologies

Archive for July 2007

Google Reader

leave a comment »

I hate to promote Google given their trajectory to take over the world, but I just switched over to Google Reader for reading RSS feeds. I had accumulated over 60 RSS feeds, and it was becoming difficult for me to determine which feeds I should keep and which I should delete.

I was hoping for an automated tool that would keep track of which feeds are beneficial and Google Reader has exactly what I was looking for!

The trends feature will keep track of which articles I read from each feed and report on the total number and the percent. So, over time, I’ll be able to easily delete the feeds that have a low number and/or low percentage of read articles. If you decide to use Google Reader, you should be aware of some idiosyncrasies. When viewing in “Expanded view”, the default is to mark articles as read when you scroll past them which totally defeats the trends feature. You can turn that off in the settings.

settings | preferences | scroll tracking

I like using the “list view” instead which allows me to quickly view the titles. After I’ve read the articles I want to from a feed, I click “mark all as read” and Google Reader is smart enough to not count those in the “read” statistics.

If you’re already using a different RSS reader, you can easily import all your feeds via an opml file. I was using Liferea and had folders of feeds, and I had also renamed the feeds – the import to Google Reader kept track of all of that – nice.

Google Reader has a lot of other nice features such as keyboard shortcuts, tags, folders, etc., but once I discovered the trends feature, that was all I needed to see ๐Ÿ™‚

I suppose the trends feature can be “unfair” though. Consider the following scenario:

  1. You have two feeds A and B
  2. Each day each feed publishes 10 articles
  3. The feeds overlap on 5 articles that are worth reading
  4. Feed A has 1 unique article that you read
  5. Feed B has 3 unique articles that you read

If the feeds are read in alphabetical order, then you’ll read the 5 overlapped articles from Feed A along with the 1 unique article -> total = 6, or 60%. Then you’ll read the 3 unique articles from Feed B -> total = 3, or 30%. The stats will show Feed A as being twice as valuable when clearly Feed B is more valuable. I suppose to get good stats, I should read the feeds in random order, but that seems difficult to manage.

UPDATE: ah, never mind. Simply view the folder that contains A & B and you’ll see the union of their articles in chronological order – whoever gets the overlapped story first wins ๐Ÿ™‚

Written by Brian Adkins

July 30, 2007 at 11:41 pm

Posted in internet

Tagged with , , ,

Truncated RSS Feeds

with 3 comments

I just read an article discussing whether truncated RSS feeds are good or bad. I’m currently using truncated feeds (of course this post may be short enough to not get truncated), but if any of you have an opinion on the matter, I’d love to hear it.

Written by Brian Adkins

July 28, 2007 at 9:46 pm

Posted in communication, internet

Tagged with

Using helpers inside controllers in Ruby on Rails

with 5 comments

Rails provides some nice helper functions (numbers, dates, etc.) that are available to views, but they’re not automatically available to controllers. I found a number of ways to accomplish this on the web, but I wasn’t satisfied with any of them.

The motivation for me to do this was to use the number_to_currency() helper function in a controller, so I’ll use that for the example. This helper is in the ActionView::Helpers::NumberHelper module, which on my Ubuntu 7.04 system is located here:


It may be located elsewhere on your system. If you’re running *nix (or OSX), then typing the following command should locate it:

locate number_helper.rb

If you edit number_helper.rb, you’ll notice that NumberHelper is a module and number_to_currency() is an instance method, so we’ll need an instance that has included NumberHelper to be able to call the number_to_currency() method.

One way to do this would be to create a new class that includes the module, and then create an instance of that class:

class MyNumberHelper
include ActionView::Helpers::NumberHelper
my_helper = MyNumberHelper.new
formatted_str = my_helper.number_to_currency(n)

If we had an existing object, called obj, another way to accomplish this would be via:


Since I didn’t have an appropriate object to extend the NumberHelper module, I simply created a new one:


If I only need to call the helper once, I could accomplish that via:


However, I preferred to create a Proc object and store it for future use:

format_currency = lambda { |n|
ActionView::Helpers::NumberHelper).number_to_currency(n) }


UPDATE: it’s not necessary to use the lambda (as cool as they are), simply storing the result of Object.new.extend(ActionView::Helpers::NumberHelper) is sufficient. For example:

x = Object.new.extend(ActionView::Helpers::NumberHelper)
# results in "$7.40"


I deliberately wanted to avoid simply including ActionView::Helpers::NumberHelper in the controller to avoid polluting the namespace and possibly expose additional public methods in the controller.

Written by Brian Adkins

July 27, 2007 at 7:20 pm

Posted in programming

Tagged with , ,

Adblock Plus

with one comment

Facebook.com just ran an ad that was quite offensive to me. I should’ve taken Scott Moonen’s advice from his blog earlier, but better late than never. He has simple instructions for installing Adblock on his blog. Check it out and get rid of ads!

Written by Brian Adkins

July 23, 2007 at 12:29 pm

Posted in business

Tagged with , , ,

Gizmo Project – Free Long Distance

leave a comment »

I’ve been using Gizmo Project to make free long distance calls for several months, and I’ve been extremely pleased with the service. To start with, it’s free, so that’s a good thing. Gizmo runs on Linux, Mac OSX and Windows. The sound quality is unbelievably good – much better than a land line or mobile phone (think stereo vs. cheap clock radio).

I bought a ~$30 Plantronics headset for handsfree talking. It’s small enough to throw in my laptop bag, so I can make VOIP calls wherever I have a wifi connection. I used the Debian package to install on my Ubuntu 7.04 system and it was a piece of cake to get running.

If any of you signup, send me an email with your account name and I’ll add you to my contact list.

However, Gizmo just did something that really ticked me off!

I discovered they had a version for Palm devices (Palm Treo 650 in my particular case), so naturally I got all excited about the prospect of making free calls from my mobile phone without using any minutes from my voice plan. Well, after spending time downloading 5 files and installing them on my Treo, I eventually realized that the Gizmo version for Palm devices is a complete waste of time – it’s only good for chat.

So how did I get this wrong? Well, let’s see, maybe it was the prominent statement on the Palm info page that stated:

Now you can instant message, call and view your Gizmo Project, AIM, MSN, Yahoo, iChat and Jabber buddies on your Treo for FREE. Download Now!

Call Gizmo buddies right from the application.

That sounds pretty clear. Well, I read the FAQ just to make sure. There was an obscure quote stating, “calls made using Gizmo for Treo use the data network connection or your phone’s data plan and not the Gizmo VoIP network”, but that was in a question about calling out to land lines, so I thought it was a peculiarity with calling out to a land line from the VOIP network, and the fact that they specifically stated “phone’s data plan” let me to believe it actually used the data plan as opposed to the voice plan. The former is unlimited; the latter is not.

Judging from comments on the forums, I’m not the only one that was duped into installing it on their phone. I tried to give them feedback on the forum, but after I spent a fair amount of time typing my message, when I submitted it, I received the following:

Error in posting


SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 1185051488, 16, 0, 0, 0)’ at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES (‘Chat only – what a waste!’, , 1185051488, 16, 0, 0, 0)
Line : 258
File : functions_post.php

So I had to vent on my blog instead. Ok, I feel better now ๐Ÿ™‚ The bottom line is that it’s an excellent service to use on your computer, but skip the mobile phone version.

Written by Brian Adkins

July 21, 2007 at 4:34 pm

Posted in internet

Tagged with

Best seats to survive a plane crash.

leave a comment »

Plane wreck

MYTH: It Doesn’t Matter Where You Sit

“It’s like a lottery to pick your seat.”
-Nora Marshall, passenger survival expert, National Transportation Safety Board

“One seat is as safe as the other.”
-Boeing Web site

“It’s an age-old question. There’s just no way to say.”
-Federal Aviation Administration spokesman

“There is no safest seat.”

REALITY: It’s Safer In the Back.

The funny thing about all those expert opinions: They’re not really based on hard data about actual airline accidents. A look at real-world crash stats, however, suggests that the farther back you sit, the better your odds of survival. Passengers near the tail of a plane are about 40 percent more likely to survive a crash than those in the first few rows up front.

Popular Mechanics article

Written by Brian Adkins

July 21, 2007 at 1:29 pm

Posted in science

Tagged with , ,

Head First HTML with CSS & XHTML

with one comment

I first noticed the covers of the “Head First” book series from O’Reilly a while ago, and I thought they looked unprofessional and simplistic, so I never really looked into them. Interestingly, I try to be careful about not being biased by nice book covers, but I think I’m more susceptible to dismissing books with “bad” covers.

I researched HTML books recently to help my aesthetically gifted wife get started designing web pages and the Head First HTML with CSS & XHTML title got great reviews on Amazon, so she picked up a copy.

I thought I’d flip through the book, and I ended up reading the entire thing ๐Ÿ™‚ I really wish this book was available years ago when I started coding HTML; it’s an incredibly well written tutorial. It has a very unique style which the authors spend quite a few pages explaining:

Based on the latest research in cognitive science, neurobiology, and educational psychology, learning takes a lot more than text on a page. We know what turns your brain on.

After reading the book, I tend to agree with their approach. It was a very fun and informative read. Most of the book was review for me since I’ve spent years learning this stuff the hard way, but there were a handful of excellent points I learned from the book, and I understand a lot of the foundational aspects of XHTML & CSS much better than I did before. Expecting a newbie to get through a typical HTML reference book is unrealistic IMO.

For anyone wanting to learn the basics of (X)HTML & CSS, or would like a good review, I highly recommend this book. I don’t know if the other books in the “Head First” series are as good, but I’ll certainly consider them in the future based on my experience with this one.

UPDATE: I have found one thing to criticize about the book. The index leaves a lot to be desired. This is a particularly grievous deficiency with this book since it is organized as a tutorial as opposed to a reference book.

Written by Brian Adkins

July 14, 2007 at 4:46 pm

Posted in books, web design

Tagged with , ,

Which doctypes are being used?

with 3 comments

In trying to decide which doctype to use for my new web apps, I thought I’d see what other sites are currently using. Here are the results in order from least to most leading edge:

No doctype at all

HTML 4.0 Transitional w/o URL

HTML 4.0 Transitional Loose

HTML 4.0 Strict w/o URL

HTML 4.01 Transitional w/o URL

HTML 4.01 Transitional Loose

HTML 4.01 Strict

XHTML 1.0 Transitional

XHTML 1.0 Strict



There are enough mainstream sites using XHTML now, that I feel it may be ready for prime time. Since I don’t have a lot of legacy pages to deal with, I’m going to use XHTML 1.0 Strict.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Written by Brian Adkins

July 12, 2007 at 10:01 pm

Posted in web design

Tagged with ,

Oregon Man Flies 193 Miles In Lawn Chair

leave a comment »

I learned about this lawn chair flight from Matt Promise’s blog.

Balloons suspend Kent Couch in a lawn chair as he floats in the skies near Bend, Ore., Saturday, July 7, 2007. Couch, on his way to Idaho, carried a global positioning system device, a two-way radio, a digital camcorder and a cell phone. He also had instruments to measure his altitude and speed and about four plastic bags holding five gallons of water each to act as a ballast, he could turn a spigot, release water and rise.

Couch is the latest American to emulate Larry Walters รขโ‚ฌโ€ who in 1982 rose three miles above Los Angeles in a lawn chair lifted by balloons. Walters had surprised an airline pilot, who radioed the control tower that he had just passed a guy in a lawn chair.

Here is an article on Fox News.

Written by Brian Adkins

July 11, 2007 at 10:33 am

Posted in amazing, science

Tagged with ,