Friday, July 29, 2005

Signing off

Got my own domain, so goodbye Netninjas its been fun! I am now at http://blog.rubyyot.com

Mine, mine, mine, mine all mine.

I signed up with dreamhost last night and now for $8 a month a domain is mine, mine, mine. Ooooohh I am so excited!!!!

Thursday, July 28, 2005

Moving along

I just added retrieve and lookup capabilities for Jots in tRuTag I just want to say that Jots has a great API. I pretty deep into del.icio.us but if I wasn’t I would use Jots instead. A very nice site all around, and written in Ruby no less. :)

Now I’m going to look at Yahoo’s My Web 2.0 and see what I can do with it. It looks like YADC (Yet another del.icio.us clone). Hopefully I will be as pleasantly surprised by it as I was Jots.

RoR Hosting

I think I’m going to try Dreamhost. They have a good deal. Not sure yet though. Will also need a domain name.

Wednesday, July 27, 2005

Huh?

Well, it’s addictive, fun, and lots of people are doing it, so naturally there must something bad about it. Right?

Tuesday, July 26, 2005

Dinnerbuzz

Dinnerbuzz calls itself the guide to dinner and drinks, and it looks like it is a promising site. I will add support for it to . It is a tagged review site. Thumbs up!

Monday, July 25, 2005

tRuTag

I've made a first release of tRuTag on Rubyforge. I hope someone else enjoys it as much as I have.

Created one!

I’ve had fun with tRuTag and hope someone else will too. It’s really just a script written in ruby but it collects your tags from various sites and creates a webpage that lets you explore them on others. You can download here

IceWM

Switched from KDE to IceVM last night and am happy with the switch. Also have started using vi instead of emacs for some things, though I still use Kate for script editing. No, I am not ready to let go of XWindows and I don’t know if I will be, though I have been using the tty windows more and more.

8 - Ruby

The more I learn, the more I love it! It is by far the best language I have learned to date.

Moving along

/
I still need to work on the Rubyforge page but the program itself is coming along as you can see from the sample image. I use it for my homepage now and have a cron job refresh it every night with my new tags. It’s been fun. I think it is time to do some clean up and then release it.

7 - Two Jumbo Jacks

They are not the best hamburgers in the world, but they are big and 2 of them cost about $2.50. On days where you don’t have much money, forgot your lunch and need to eat they are very happy.

6 - Doodling

It’s faster, easier and more subjective than drawing; and you can do it during meetings. :)

Sunday, July 24, 2005

5 - The ocean

There is something about the ocean that is so peaceful and happy. I love the sound of the water crashing on the ground. I love the look of the waves rolling in. Even the salty sea air smells good.

Saturday, July 23, 2005

4 - Ghormeh sabzi

My grandma used to make ghormeh sabzi for me when I would visit her. It is a Persian dish of stewed lamb and greens which is served over basmati rice. It is delicious and one of my favorite recipies.

(The provided link is not my grandma’s recipe, but seems about right, though I have never made it myself.)

Flaming Mr. Goatee: Ninjas!

I had to blog this because "Brian has hit uopn an eternal truth, and that is: "I believe internet traffic to this MySpace account is going to increase considerably due to my use of the word Ninja. I mean lets face it, ninjas rule!". :)

3 - Good Coffee

Maybe it is a bit stereotypical since I’m in Seattle and all, but I don’t care. I have cut so many vices out of my life, smoking, drinking, etc. I really do enjoy this one and it is mostly harmless. Good Coffee, doesn’t have to be bought from a store for $5 a cup. When I’m at Starbucks I typically get the $2 Grande drip w/cream anyway. Good coffee can be brewed at home as well. It just needs to be the right strength and have a good bold coffee taste (unlike most restraunt coffee) without being tar or too acidic.

Pick-Axe v1

I’ve been reading/referencing the first version of the pick axe. It not exactly the same as my goal which I implied v2. But I suppose that a potion of it is the same.

Friday, July 22, 2005

2 - Reading technical/programming books

Ok, this probably sounds a bit strange but I really do enjoy reading technical books. There are quite a few out there that are very will written. Right now I’m reading Running Linux

Thursday, July 21, 2005

Blog In Space

Heard this on the radio this morning. Seems like a complete waste of perfectly good hardware. Still it got me to blog about it. LOL.

Wednesday, July 20, 2005

Not sure exactly what page I'm on...

But I am enjoying it. A pity I’ll have to wait so long for the next one once I finish. Right now Harry has just been given detention for the second time. I don’t think that gives away too much. I am curious to see how this ends. I assume it will come back to Malfoy and Snape. I am curious to find out what happens to this year’s Defense against the Dark Arts professor to prevent them from returning next year. And why anyone would take the job knowing it’s tendency to make bad things happen to the person who does.

Family

1. My wife and kids make me happy. My wife is my best friend and my kids are lots of fun. It’s not not always easy, but they are definately worth it.

Japanese words and romanji

I am slowly but surely continuing with this goal. Learned the words for what, where, how, who, when, how many and how much last night. trying word association and it is definately the only way I can remember things. I am however frustrated by romanji, I don’t want to use it, but seem forced into it since I haven’t found a way to input katakana, harigana or kanji (how is this done??) characters into my keyboard.

Rubyforge

I’ve created a project at Ruby forge for this. It seems like a bit of over kill, but I would like input on this and my blog just doesn’t seem like the place for it. This is both a personal project and a way to learn Ruby.

Monday, July 18, 2005

tRuTag v.1

Working on the next version, cleaned up the code a bit and added output capabilites for:

  • http://43.Allconsuming.net

  • http://flickr.com

  • http://technocrati.com

  • http://43places.com


also added import capabilites for

  • http://43places.com


It doesn’t appear that ALL consuming has an API in place right now. Trying to use a bit of Javascript magic on the output page to determine which site will divulge the tag information. This is because the output page has become rather long. I still want to be clicking on the tag itself rather than a button to perform the action. I do have a basic stylesheet in place. I am rather happy how quickly I was able to put this together and it has only made me more eager to continue lerning Ruby.

Sunday, July 17, 2005

tRuTag v.0

I just completed my first Ruby script. Well I'm sure I'll make plenty of modifications and some fixes, but I wanted to post it up here for feedback, and the feeling of accomplishment.

What it is:
I am tagging more and more things. The majority of these are on 43things.com and del.icio.us right now. I wanted to make a script that would pull in all of my tags for these sites and create an html tag cloud foreach of these sites with a list of all my tags. Basically allowing me to browse my superset of tags on all sites.

It consists of 2 files, and XML config file and a script. For the XML config file you supply your profile information.


  • username is your username for the site
  • key is different for delicious and 43things. For 43Things it is your API key which they can generate for you. For del.icious it is your password.


I'll go ahead and distribute it under the Ruby license.

Here are the files

XML config:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<user title="jh">
<profile type = "Things43">
<username>YOUR_USERNAME_HERE</username>
<key>YOUR_API_KEY_HERE</key>
</profile>
<profile type = "Delicious">
<username>YOUR_USERNAME_HERE</username>
<key>YOUR_PASSWORD_HERE</key>
</profile>
</user>

Script


#!/usr/bin/ruby

require 'net/http'
require 'rexml/document'
include Net
include REXML

# This is the name of your xml.doc
$docname = "jh.xml"


class User
def initialize()
@profiles = Array.new
readdoc
init_tags
end

def init_tags
@tbin = Array.new
@profiles.each {|profile| profile.add_tags(@tbin)}
end

def readdoc
doc=Document.new File.new($docname)
doc.elements.each("user/profile") do |element|
up = Hash.new
up["type"] = element.attributes["type"]
element.elements.each do |sub|
up[sub.name] = sub.text
end

@profiles.push Profile.new(up)
up = nil
end
end

def create_cloud
output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<head>\n<title>tRuTag Cloud</title>\n<link rel=\"Stylesheet\" href=\"tRuTag.css\" type=\"text/css\" media=\"screen\" />\n</head>\n<body>Created by <a href=\"http://netninjas.blogspot.com\">tRuTag v.0</a> by <a href = \"mailto:jamal.hansen[at]gmail.com\">Jamal Hansen</a>"

@profiles.each {|profile| output << (profile.build_cloud(@tbin))}
output << '</body></html>'

f = File.new("tRuTagcloud.html", "w")
f.print output
f.close


end

end

class Profile
def initialize(prohash)
# not sure how to do this, but want to take the string of the object name and refer that object.
case prohash ["type"]
when "Things43" then
@site = Things43.new( prohash ["username"], prohash ["key"])

when "Delicious" then
@site = Delicious.new( prohash ["username"], prohash ["key"])

end

end

def key
@site.key
end

def username
@site.username
end

def add_tags(tbin)
@site.add_tags(tbin)
end

def build_cloud(tbin)
@site.build_cloud(tbin)
end
end

class Site
def initialize(username, key)
@username = username
@key = key
end

def username
@username
end

def username
@username
end

def key
@key
end

def add_tags(tbin)
end

def build_cloud(tbin)
@return = ""
end

def find_level(count)
String(Integer(count)./(5))
end

end

class Things43 < Site
def add_tags(tbin)
url = "www.43things.com"
page = "/service/get_persons_tags?api_key=" + @key + "&id=" + @username
validcode = "200"
xmlelement = "feed/tags/tag"
h = HTTP.new(host=url, 80)
resp, data = h.get(page , nil)
if resp.code == validcode
doc=Document.new data
doc.elements.each(xmlelement) do |element|
tbin.push [element.text, element.attributes["count"], self.class]
end
else
puts "Error code from " + self.class + ": " + resp.code + " description:" + resp.message
end
end

def build_cloud(tbin)
h = "<h1><a href=\"http://43things.com\">43 Things</a></h1>"

tbin.each { |tag|
h << "\n<span class=\"level" << find_level(tag[1]) << "\"><a href=\"http://www.43things.com/tag/" << tag[0] << "\">" << tag[0] << "</a></span>"
}
h
end

end


class Delicious < Site
def add_tags(tbin)
agent = 'tRuTag v.0'
data = Net::HTTP.start('del.icio.us') { |http|
req = Net::HTTP::Get.new('/api/tags/get', {'User-Agent' => agent})
req.basic_auth(username, key)
http.request(req).body
}


doc=Document.new data
doc.elements.each("tags/tag") do |element|
tbin.push [element.attributes["tag"], element.attributes["count"], self.class]
end

end

def build_cloud(tbin)
h = "<h1><a href=\"http://del.icio.us\">Del.icio.us</a></h1>"

tbin.each { |tag|
h << "\n<span class=\"level" << find_level(tag[1]) << "\"><a href=\"http://del.icio.us/tag/" << tag[0] << "\">" << tag[0] << "</a></span>"
}
h
end
end


aUser = User.new()
aUser.create_cloud



Next I'll post sample output from my profiles. Oh and you can create a style sheet to make the tags change size based on how often they are used. Oh and use at your own risk, I'm not responsible, etc. Have fun, I'm going to keep working on this.

Saturday, July 16, 2005

Got it!

Got it today and am 80 pages in. My wife and I are reading it aloud, as we have with all the Harry Potter books. This one seems to be off to a faster start than the last two. I am so excited!!

HTTP - Auth

Nexp step is the del.icio.us API. I need to figure out how to do HTTP - Auth with Ruby. Time for a break. Try some more later.

Parsed the XML

Well, I’ve now successfully parsed the XML tag list into an array of tag objects. I think that I can say that I have figured out how to use the API or at least the API call I am interested in right not. Good job Robot Co-op, yet another way I am impressed by your site. I’ll continue any progress entries on my Learn Ruby goal since the 43Things API portion of this is done.

Success

Just made my first successful 43Things API call from Ruby. This is my first success with Ruby and it came in under 12 hours from my first attempt at using it. Well I’ve been using RoR for a few weeks now, but that is not exactly the same. In any case, yay!

Friday, July 15, 2005

This is awesome, I want one!

/
This has to be the best geek shirt ever. It has Ruby with the two dot umlau thingy. I love it!

Here it is

Users like myself use 43Things, 43Places and AllConsuming. I would like there to be a place where I can view a tag cloud of my tags from all 3 sites. For extra credit


  • Add in user tags from del.icio.us, flickr, etc.

  • Make it searchable by people with similar interests.




I think these are in the API, maybe I’ll try working on this. :)

Wednesday, July 13, 2005

Learning Japanese

Well I was undecided which language on my list I was going to pick up. It was between Japanese, Farsi and Spanish. I know a little Spanish already, but I think I’ve chosen Japanese over the rest since my wife has shown interest in learning it as well. Now I would like a Japanese speaking penpal that would be able decipher my attempts to communicate and tell me about Japanese culture, or whatever. I’m not having much luck with the language exchange sites.

The jackal says

I am enlightened

Tuesday, July 12, 2005

Become one with OOP

I don’t know what type of knowledge you have of OO and I’m no guru but here are my two cents.

# Understand the basics of OO, you must understand the concepts of Encapsulation, Polymorphism, etc to program objects. If you do not, you will be programming procedural code with an OO language which is like building a house with a sledgehammer. You can do it, but it’s not the best tool.
# Make sure you know a language that you can program object oriented code. I would recommend Ruby or Java, though there are of course other great languages that support it. Try to avoid languages that had OO or object based support added on after the fact. Here is a language comparison
# Read the book Design Patterns to learn the power of objects.
# Read Martin Fowler’s intro to UML. I don’t think that UML is the greatest, but this book is good way to think more OO and I think Martin Fowler is great.
# Have fun!

Everyone is doing it!

I was a vegetarian for a year and loved it. I got very familiar with out local organic food store and tried lots of foods that I would not have otherwise. You would think that you are very limited as a vegetarian, but really you aren’t.

If you do it, I would recommend:

  • Eating organic produce when you can – Not because it is good for you or better for the planet. Because it tastes so much better!

  • Explore new foods – I found that I really did like tofu and that I just had not had it prepared correctly.

  • Check out the Moosewood series of cookbooks from the library; They are awesome!

  • Splurge on items at the local organic food store occationally – A realt reat especially if you feel limited in your food options. I used to get the fresh kim chi, gourmet ginger beer and baked pressed tofu.

  • Visit local vegetarian restaurants – even if you don’t go vegetarian, they are tasty stuff!

  • Try Veat – If it is still around. I think it’s related to soylent green. No seriously it is just like meat in stir fry.




I still don’t eat as much meat as I used to, but do eat meat again. I acutally miss it sometimes. Why did I stop? I couldn’t resist the double double with cheese from In and Out Burger.

4 Days on Rails

I wish I would have read 4 Days on Rails after the Onlamp tutorial. It is a great intro and really lets you know what is going on with scaffolding anf RoR.

Ready set... ummmm

So I’m starting to learn Japanese and it seems a bit daunting. I’m not sure what would be the best way for me to learn. I don’t have any friends that speak Japanese, though my wife wants to learn it as well. I’ve found some web resources including a site that helps you learn Hiragana I have also checked out a book and a language course from the library. The language course (Living Language Series) seems pretty good and I have started reading the lessons and listening to the CDs. I’ve also picked up Japanese in 10 Minutes a Day which I figure is not a great tool, but may give me a jump start on the basics. The problem is that a lot of the material (other than the website) seems to be very much geared toward americans and uses the Romanji alphabet which seems like extra work. Why would I want to learn a non language to learn Japanaese? Is Hiragana any better? Katakana? Kanji? I want to learn to read and write it, but should I focus on speaking it first? Even though I don’t know anyone who does?

Things for me to ponder. I think for now I won’t worry about it too much and go with what seems fun and easy and go from there. Maybe I can make a better decision once I know more.

Thursday, July 07, 2005

Casshern

10 stars – It is rare that I see two great movies back to back like this. Casshern, directed by Kazuaki Kiriya, was a movie that I stumbled upon the trailer. It was in Japanese, but was so visually stunning that I wanted to get it anyway. I found it on eBay and purchased it for around $10. In anycase, it was an amazingly complex, artistic anti-war movie that was very timely addressing such issues as the war on terror and stem cells. It was highly stylized, but this did not detract from the movie in fact it added to the impact. In fact in the action scene I was amazed at how well the director blended real footage with a manga feel. This was truly and amazing find and an amazing movie.

Tuesday, July 05, 2005

Shi mian mai fu

10 stars – Shi mian mai fu or The House of Flying Daggers was a masterpiece of Asian Cinema.

I rented this particular movie because it was:

  1. A cool looking movie.

  2. Directed by Yimou Zhang.

  3. Named for flying daggers, which is cool.
    It came through on all three and was a beautiful movie with lots of all that you could want; color, martial arts, beauty and plot.




I have now seen two movies by Yimou Zhang (Flying Daggers, Hero) and have been blown away by the beauty and sadness of them both. I look forward to watching more from this director.

4th of July, etc.

With holidays and everything, my cookbook project is going better than my work project. Last night and this afternoon I completed the add recipe “wizard” which basically consists of 4 steps:


  1. Create recipe with basics such as name and basic description, category

  2. Create a list of ingredients, amounts etc. Ingredients are stored in their own table so the ingredients_recipes table is really the crux of the project. I want to be able to enter my recipes and then query the database and say show all recipies with ingredients X and Y. Or All recipes with this combonation of flavors. I hope that this will reveal something interesting and is really the driving force here. Otherwise why use RoR, MYSql and a web browser to write a cookbook on a single machine.

  3. Create a list of instructions to complete the recipe.

  4. Finalize the recipe with a header footer, etc.




Now I need to make all my edits and deletes work. I hope to make this easy to use so I don’t regret using this instead of OpenOffice.

Sunday, July 03, 2005

Manga girls are easier to draw

/
Maybe the experience of one drawing helped, of maybe girls are just easier to draw. In either case here is my second original manga drawing.

Saturday, July 02, 2005

Ok I tried drawing Manga

/
I looked thorough the How to books I bought my daughter and tried a couple of their samples. Then I wanted to try my own image. I discovered a few things when I tried to draw it:


  1. It is not that hard to draw manga.

  2. It is hard to draw cool manga.

  3. It’s hard to draw a guy in form fitting clothing and not make him look like a girl or a porn star.

  4. I need more practice.

Use GMail as a personal organizer

GMail offers an extremely powerful system of filtering e-mail messages. By using a combination of GMail tags and filters, you can create an extremely useful personal organizer system right in your inbox.

read more | digg story

CHEESE NINJA BUSTS FOX AFFILIATE

From newsbreakers.org (video available) - "A mysterious ninja crept into a live television broadcast, whizzing processed cheese toward a news team and quietly tiptoeing through their report." This must be a true netninja master.

Learning Farsi

Although I have spent my life in the United States, my mom’s side of the family is Persian. They have always wanted me to speak Persian with them but I have never spent the time to learn it. I would like to, but it seems like such an overwhelming task. If nothing else I would like to be able to speak (or write) farsi with my grandfather, while I still can.

Friday, July 01, 2005

I'm looking for.....

This is hilarious. A couple of guys, an airport and a few extra viewings of te Simpsons and what do you get? Stupid intercom tricks. Hilarious!