Journal of a Geek

Yahoo! Pipes

with one comment

I saw there was a lot of buzz going around about Yahoo Pipes, so I decided to check it out tonight. It looks like really cool idea so far. Basically it let’s you perform database type actions on sets of XML feeds. It also let’s you take user input to change parameters on the queries.

The first pipe I made was a good example. I took user input from the text input control and fed it into the Flickr control. Then sent that to the output control. What I got was a page that displayed Flickr search results for that search that I let users enter.

Flickr Search Pipe Layout (image)

As you can see from the layout view in the picture, the pipes are configured using a visual interface. Controls are dropped onto the main area then their output is connected to the input of another control. This is really similar to Apple’s Quartz Composer if you have seen it.

The pipes interface comes with several data sources that are easy to use, but for more advanced users there is a URL builder so that you can create URL’s for more customized RSS feeds. I made a more complex pipe which involves returning the top X articles from Digg and Reddit for a certain key term. The layout is kind of crazy, so I will just provide the link for this one. If you login using a Yahoo account you can view the layout for any of the pipes that have been created so far and you can also build your own pipes.

I would like to see what Yahoo does with Pipes as it gets further developed. So far I think it’s a great idea and can’t wait to see what people can do with it.

Advertisements

Written by Ryan Farnell

February 15, 2007 at 2:11 am

Posted in Web 2.0

Wii Web Browser

with 2 comments

When I got home this morning I fired up my Wii and downloaded the “Internet Channel” for the Wii. Internet Channel is of course a fancy way of saying Internet Browser. The browser was created by Opera who does browsers for almost any device on the planet. The current Internet Channel is labeled “trial”. In this case the trial is more of a beta with the final product coming at the end of March.

The web browser is fairly simple to use. At the bottom of the page you have a back, forward, stop/refresh, favorites and home button. Most of these are self explanatory, but the home button is different than on most browsers. This takes you to a special page on the browser that allows you to enter a URL, got to your favorites, get help, and read the license agreement.

Browsing the actual page consist of two actions. The first is holding down the B button and pointing around to scroll around the page. This works really well. It works similar to when you click the scroll wheel on most browsers. How close you get to the edge of the screen determines how fast it will scroll in that direction. The other action is zooming in and out. Since text on the web can be fairly hard to read on the TV, the Wii browser allows you to zoom in and out using the plus and minus buttons on the Wiimote.

I have two current complaints with the browser. The first is how long it takes before it reacts to a URL being clicked or entered. It was taking around 5 seconds. This may just be my Internet connection but it seems like something deeper than that. The other is it currently does not work with YouTube. I feel one of the big uses for this could be viewing streaming video on your TV. I understand this is a beta product though, so we shall see how it shapes up.

I think Opera has done a good job so far with the Internet Channel for the Wii, but there is still room for improvement. I think it would be interesting if websites begin having Wii optimized versions of their websites.

Written by Ryan Farnell

December 22, 2006 at 3:48 pm

Posted in Games, Wii

Programming Basics: Conditional Statements

leave a comment »

Now that we have gone over variables, we can get into more complex types of statements in programming. This article will cover conditional statements (if then, if then else, nested if then).

IF THEN

If thens basically work like common English. Let’s say you were planning on buying a Wii when they come out in November, but you didn’t pre-order. Now you are driving toWal-mart and you are thinking “If Wal-mart has Wiis for sale, then I will buy one.” The code for that would look something like this:

if (walmart is selling wiis = true)
then (buy a wii)

Basically we are telling the program that if some condition evaluates to true then do what comes after the then. Here the condition being evaluate is: is it true that walmart is selling wiis? If it is true, then the whole condition evaluates to true and we buy one, if it is false, we do nothing.

IF THEN ELSE

Okay but let’s say you want that Wii badly. So you decide that if Walmart is selling it then you will buy it, otherwise (else) you will go to target and see if they have them.

if (walmart is selling wiis = true)
then
(buy a wii)
else (go to target)

Now we had the evaluation of the condition the same way, but this time instead of doing nothing when it evaluates to false we move on to the else part and execute that.

NESTED IF THEN

So what happens if you want this Wii really badly, but target doesn’t have it either. Well logically you would think of another store to go. This is basically how nested if then statements work. For example:

if (walmart is selling wiis = true)
then (buy a wii)
else if (target is selling wiis = true)
then (buy a wii)
else (go to best buy)

This is basically saying that if Walmart doesnt have Wiis for sell we will go to Target, and if target doesn’t have Wiis we will go to best buy. Notice we will never execute the second if unless the condition in the first is false.

LOGICAL OPERATORS

I’d like to take a moment to talk about logical operators. In the previous if thens I was checking to see if something is equal to true. If you were looking at numbers instead then you could also use greater than, less than, greater than or equal to, and less than or equal to. For example I could be only want to do something if the price of a PS3 was less than 600 dollars. I could change my if then to look something like this:

if(ps3 price < $600)
then consider it a cheap blue ray player

Now let’s say you wanted to go buy the PS3 from walmart, but only if it is less than $600. The logic for this would require checking two conditions.

1) is walmart selling the PS3
2) is it less than $600

You would get something like this:

if (ps3 price < $600 AND walmart is selling ps3's = true)
then (buy a ps3)

The part of the statement will only execute if both of the conditions are true. The AND operator tells the statement that both sides of the AND must be true in order for the whole thing to evaluate to true. The other two operators are OR and NOT. The NOT operator simply tells the conditional statement that to be the opposite of whatever it is evaluating to. If something is false, it changes it to true and vise versa. The OR operator tells the conditional statement that the whole statement is true as long as one side of the OR is evaluated to true.

TIE IN TO VARIABLES

The real power the conditional statement and the variable comes into play here. Notice I was using PS3 price and the fact that Walmart was selling either as something I was checking. In another part of the program you would set the variable to have the PS3’s price or Walmarts status of selling something. By leaving these as variables we can check whatever is entered, instead of only checking thing that are precoded into the program.

Written by Ryan Farnell

October 11, 2006 at 5:35 pm

Posted in Programming

Programming Basics: Variables

with one comment

One of the most important concepts in programming is the variable. A variable in programming works pretty much the same way it does in algebra. A variable represents some unknown. This comes in very handy when you are writing algorithms whether in math or computer programming. For example:

x + 2

In this case, we are adding two to whatever x contains. The variable could be given a value from many different places, but in general the value is given to the variable through what is called an assignment operator. In most programming languages this operator is the equal sign.

x = 2

Here we have given the variable x the value of two. The assignment goes from right to left. So the value on the right is given to the value on the left.

Variables are very important when moving on to much more complex operations such as conditional statements and loops. The next post in this series will talk about conditional statements.

Written by Ryan Farnell

September 27, 2006 at 5:53 pm

Posted in Programming

Mission Complete?

leave a comment »

I have finally finished my content management system for the school newspaper…kinda. I was setting up the mongrel server for launch of the website, when my boss comes in to tell me we are giving control of all our server’s back to the school. This means no scripting languages of any kind.

At first I was a bit upset. I had spent a year learning ruby/rails and developing this CMS. My first idea was to simply take the style sheet and apply it to the current site we have. I was dreading this not only because I was going to have to do more CSS work which I hate, but the main reason I had made the CMS, ease of input, would be lost. Thanks to the Rails caching system and a friend (thanks Dane), I came up with a solution that saves the general purpose of the content management system, and gives the website the new look.

For those of you new to Rails, I’ll give a quick explanation of how the caching system works. When Rails creates a page from the view, it is actually generating a hmtl file. So what the caching system does is create a copy of the html file the first time the page is generated. The next time someone request the page the html page that was saved is served instead of the one that needs to be generated. This decreases the load on the server. (Note: Rails can be told to save only specific parts of the page, but that is a bit more detailed than what I used here.)

So if you add the following code to a controller it will cache the pages for you when the Rails application is put into production mode:

caches_page :show, :list

This code tells Rails to cache the show and list pages the first time they are visited. The other part of this is sweeper code which deletes cached pages for you, so that when you change them they get properly updated. I have yet to add that, but will post it once I have completed it.

So my solution was basically consisted of running the website on my local machine, entering the data, then uploading the cached files to the server. I am still kind of sad that I lost my comment, search, and tagging features, but at least I got some use out of it.

Written by Ryan Farnell

September 20, 2006 at 3:18 pm

Posted in Web Development

Buzz Words

leave a comment »

The other night at Chili’s, I was talking with my friends and the topic of buzz words came up. There are a lot of buzz words flying around on the Internet lately. I got the general feeling from my friends that they feel this words are only hype, and there is nothing really behind them. I have heard of the same thing going around on other websites I read and podcasts I listen to. So I thought I would take this chance to explain of few of the big buzz words.

Web 2.0: This word is being used a lot online. Almost every new website that pops up is claiming to be a Web 2.0 website. Web 2.0 is not actually something you have to upgrade on your own. It’s more of a name for the evolution the web is currently experiencing. Up until now the Internet has really been a sort of one way media, kind of like TV, magazines, books, movies, etc. Someone creates the content and they you look at it. The evolution of this is the way the web is becoming two way media. If you look at things like blogs, social networks, online office apps, and others, the users are creating content for the other users of the service to view.

AJAX: Asynchornous Javascript and XML. Next to Web 2.0 this has to be the biggest buzz word out there. Everyone brags about their new AJAX interface. Google, Yahoo, and Microsoft are all sporting new interfaces with AJAX. AJAX is actually a mix of technologies, and it’s not really new. AJAX allows web designers to make desktop interfaces inside a browser window. It also speeds up the loading of web pages by allowing the interface to never be reloaded, just the new data that goes in the interface.

Tags: Tags are becoming heavily used heavily by websites such as Flickr, Technorati, and YouTube. Tagging is basically a simple concept where you attach two or three keywords to a piece of media, and it allows for easier searching. Things like videos and pictures cannot be searched like a word document, because a computer is not yet able to recogonize what exactly is in a picture. (Note: Riya is a company working on this.)

Technorati Tags: , ,

Written by Ryan Farnell

August 2, 2006 at 10:22 am

Posted in Web 2.0

Macbook Review

with 5 comments

I finally got my Macbook in yesterday. I think it’s time for a review.

First Impressions

My first impressions were that it was very light and compact. I had a 12″ Powerbook before that, so for it to be lighter and thinner than that was amazing.

The Screen

My first impression of the screen was that it was smaller than I expected. I had not seen one in person so I wasn’t sure what it would look like. The lack of height is definitely made up for by the extra width. The gloss film on the screen looks great. It’s not super glary like on some PC’s. It really makes all the colors pop and the screen seem brighter overall.

Parallels

The first task I went about doing on my Macbook was setting up Parallels and Visual Studio just as I did with the iMac in my earlier post. I found it to be noticeable slower, but not unbearable. It’s still 100x better than Virtual PC, and if it really gets to be a problem I can use Boot Camp. I think the main difference has to do with hard drive speed instead of processor speed difference. The Macbook uses a slower spinning hard drive than the iMac’s do.

World of Warcraft

I didn’t buy my Macbook for gaming. I know it’s video card isn’t exactly a power house, but I figured I would give it a try. With all the graphical settings set to low and resolution set to 1280×800 (the Macbook’s native resolution), I got about 25 fps in cities and 15 fps out in fields. Overall I was pleased with the Macbook’s performance.

Video Compression

To test the processor performance on the Macbook, I decided to use HandBrake as a test. Handbrake is a program that let’s you pull titles and chapters off of DVD’s and compress them into either Quicktime formats or AVI formats. On my iMac I it compresses about 20 frames per second on average. On the Macbook I got 60 frames per second! That is really a huge difference.

iMac Specs: 2.1Ghz G5, Radeon x600 XT, 1GB of RAM

Macbook Specs: 1.83Ghz Core Duo, Intel integrated video, 1GB of RAM

Technorati Tags: , ,

Written by Ryan Farnell

August 1, 2006 at 4:29 pm

Posted in Apple