Archive

Archive for the ‘Programming’ Category

Arduino, a good way of teaching kids to program

August 9th, 2010 Jacken 2 comments

My twelve year old son want’s to learn how to program. My first idea was to teach him Ruby or Python, but I decided to go with Arduino. It’s C-based so that’s a good start I think. Were currently planning a couple of projects but so far he’s managed to get some LED’s blinking. A good start.

Rating with stars and why it sucks

May 2nd, 2009 Jacken No comments

I’m been working on an application lately where we need to have some sort of rating. Almost instinctively one thinks of using stars to let the user choose how much they like something. But I soon realized that stars with 1-5 rating does not work. Well, let me elaborate, it does not work like a scale. Most fill them in like a boolean value. If they like it, they put four or five stars, and 1 if they don’t like it. If the product does not create an emotional response, they don’t put any stars at all, because most people only rate something they really like or hate. It would be fun to have a star rating system that actually put you up against the wall when you fill something in. You’ve just watched one of Hollywoods latest money making machine movie, and you liked it well enough. A good time waster. So you put four stars. The system then asks you, “Are you sure that you think this is as good as Deer Hunter?” Most sane persons would realize that they made an error in judgement and lower the score. And then stop using the rating system, because who want’s to be corrected by a computer?

Categories: Programming Tags:

Download all files in RSS feed using Ruby

April 24th, 2009 Jacken 3 comments

I’m working on learning Ruby on Rails and one great resource that I find myself going to is RailsCast. But as I really need to learn Ruby I wanted to write a quick program to download all the episodes to my harddisk and watch them using Plex Media Center. There’s probably a million different utilities (or podcast managers) that can do that, but using them I won’t learn to program Ruby that way. There’s probably a better way of doing this, but hey, do it and post a comment.

require 'rubygems'
require 'hpricot'
require 'open-uri'

doc = Hpricot.XML(open("http://feeds.feedburner.com/railscasts"))

(doc/"enclosure").each do |para|
  filename = File.basename(para[:url])
  puts "== Found a file #{filename}"
  open(filename,"w").write(open(para[:url]).read)
end
Categories: Programming Tags: ,

Yes, please apple, kill AppleScript

June 4th, 2008 Jacken No comments

Everytime (well, last night actually) when I need to do something with Applescript I shudder with horror. The syntax is actually something you forget all the time. There must be better alternatives for Apple to use as a scripting language. I agree with this article, but Python or Ruby would be a better alternative I think.

Categories: Programming Tags: , , , ,

Ruby on Rails Beginners

September 12th, 2006 Jacken No comments

After reading Agile Web development with Rails, I still didn’t feel I had a grasp on how Ruby on Rails worked. It didn’t go into detail on how everything worked made it harder to learn. I don’t feel I was ripped off when buying this book, but I looked for a better one. And I found it. Ruby on Rails: Up and Running is a much better beginners book. Following the examples really helps you get to grips with all the ins and outs of Rails programming. Highly recommended.

JackenIAX with multiple lines support

June 6th, 2006 Jacken 6 comments

I finally completed a new version of JackenIAX. It now has up to four lines support. I also added a searchable call log. Lot’s of other small improvements as well.

JackenIAX and multiple lines

March 19th, 2006 Jacken 3 comments

I finally have a version of JackenIAX that supports multiple lines. I have added so you can choose to output background music for the calls on hold. There’s a lot of testing, and I also have to rethink the user interface to be able to handle multiple calls. But i think it’s going to be cool.

Adding new features

March 9th, 2006 Jacken No comments

Every time I answer the phone (yes, I’m using JackenIAX), I have to pause iTunes before answering. So today I added an option so when you answer or dial, iTunes pauses automatically. It will be in the next release (within a couple of days) I had to rewrite a large section of code for some other features that I have planned. I’m getting a bit more comfortable with Cocoa programming, and discovers old code full of brain farts. And the code is getting smaller with more features. A step in the right direction…