<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>guge</title>
	<atom:link href="http://www.guge.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.guge.net</link>
	<description>Geir Gundersen's blog</description>
	<lastBuildDate>Tue, 06 Apr 2010 13:30:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Resistance is futile</title>
		<link>http://www.guge.net/?p=18</link>
		<comments>http://www.guge.net/?p=18#comments</comments>
		<pubDate>Tue, 06 Apr 2010 11:27:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[NeoNode]]></category>
		<category><![CDATA[netcom]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[Telekiosken]]></category>
		<category><![CDATA[ventelo]]></category>

		<guid isPermaLink="false">http://www.guge.net/?p=18</guid>
		<description><![CDATA[How I ended up as just another IPhone user, after trying the Nokia N97 Mini.]]></description>
			<content:encoded><![CDATA[<p>Yes, it has happened. I have been assimilated into the phenomenon that is the IPhone.</p>
<p>For the last three years I have had the Nokia 6110 Navigator, but it turned out that it was waterproof. It was drenched one night, and the water would simply not come out from behind the display cover. I though that it was within hours of dying, so I went out shopping for a new phone. I had been thinking about this for some time, because the GPS has gotten ridiculously slow in acquiring position the last year. Therefore I was not completely unprepared.</p>
<p>As I have a family with plenty of Nokias, plenty of Nokia chargers and so on I had a bias towards Nokia. I also had a bias against the IPhone because I think Apple is one the most monopolistic companies I know. Microsoft has often been accused of the same, but Apple has always had a policy of &#8220;buy everthing from us, and it&#8217;ll be ok&#8221;. I have an IPod Touch, and it is quite good, but I don&#8217;t like the ITunes tie in, and everything else that Apple wants me to install. I would be happier if I could just transfer files to and from it and not have to convert every movie from DivX to MP4.</p>
<p>So I went to Telekiosken at Vinterbro and explained what I wanted. I warned them that it would take some time for me to make my mind up, but that I would be going home with one of their phones. I said I wanted a phone with GPS, that I hate texting through a numeric keypad, I like phones that can run programs and so on. I also told them I didn&#8217;r really want an IPhone. So they came up with the HTC HD2, the Nokia N900, a smaller HTC smartphone, and the Nokia N97 Mini.</p>
<p>The HTC HD2 was just too big and heavy. Great if you like watching movies while commuting I guess. The smaller HTC had Smartphone 7 from Microsoft, which lacks a lot of the good features of previous versions. I quite like to be able to develop apps for it using the same tools I usually use, but even so, it seemed a poor choice. The Nokia N900 has a lot of RAM, a lot of CPU and a lot of Screen. And it runs Linux, which is sort of cool. But it sounds a bit like overkill. But the Nokia N97 Mini was very cute. When the keyboard slides out, it looks like a little computer (which it is) with the display at a cute angle. It is small enough to go comfortably into the pocket. So I bought it!</p>
<p><span id="more-18"></span>It was the better choice between the four candidates. I was glad that I had found something else than the IPhone. I could feel special, and a bit different from all my IPhone using friends. Individualism is great!</p>
<p>The Nokia has a resistive touchscreen that you have to press down. It feels odd, when you&#8217;re used to the capasitive IPod Touch. So I didn&#8217;t like that. My GSM connection is very expensive with data traffic, so I didn&#8217;t want the Nokia to use any of the internet applications while outside the WLAN. This should have been no problem, but everytime I got outside the WLAN&#8217;s reach the phone would beep and ask, and ask new questions faster than I could answer. Hopeless. The last nail in the Nokia&#8217;s coffin was the GPS software. My old 6110 Navigator had Route 66, which was fine. The new one had something really stupid. We would be driving on the highway, and all of a sudden, the Nokia thought I was on a smaller road paralell to the highway. It would then reroute to get me back on the highway. And then put me back on the highway again. It would chatter and change it&#8217;s mind all the time. Completely useless!</p>
<p>I had bought it on a saturday. Monday I was back in the kiosk after a quick phonecall. I said, do you have any IPhones? Get me out of this Nokia! They had the 16GB IPhone 3GS, and let me return the Nokia at a full refund. Nice people at Telekiosken. Young Emil had the patience of an angel, and he had even heard of the NeoNode. He passed the litmus test of phone salespeople!</p>
<p>And the IPhone is every bit as nice and user friendly as I knew it would be. I also knew that I could get marine maps for it, which I have, and that I could buy music from it, which I have, and games, and other applications, which I have. The only thing I don&#8217;t know how to do is to reply to a SMS text message&#8230;.</p>
<p>The worst thing is that I&#8217;m perfectly happy with it. It is an excellent piece of kit. I know I&#8217;m not special. Almost everybody has one. But it&#8217;s just so well thought out. So nicely made. Everything else seems so futile compared with it. I&#8217;d like to be unique, like when I had the NeoNode N1, which was cute and inventive, but with crappy touch hardware. But there isn&#8217;t any reason I can think of not to have an IPhone.</p>
<p>As a software developer, I am amazed at how user friendly it is. It has animations and effects, that makes using it a smooth experience. The animations aren&#8217;t there to impress, they are there to aid. And it works! It probably is the new milestone in user friendliness. All other computer programs will be measured against it. Users will ask themselves why other programs aren&#8217;t as easy to use as the IPhone. A big challenge for the rest of us. And that is probably why the IPad is selling so well.</p>
<div id="attachment_19" class="wp-caption alignnone" style="width: 310px"><a href="http://www.guge.net/wp-content/uploads/2010/04/002.jpg"><img class="size-medium wp-image-19" title="My IPhone" src="http://www.guge.net/wp-content/uploads/2010/04/002-300x225.jpg" alt="IPhone on my desk" width="300" height="225" /></a><p class="wp-caption-text">No better than the next man, I have an IPhone too.</p></div>
<p>Only one more week before my transfer to NetCom&#8217;s eat-all-the-bandwith-you-can-at-a-fixed-monthly-rate from Ventelo&#8217;s 9.5kr/MB pricing happens. I can&#8217;t wait! And Ventelo will have to rethink their price structure, if they want to stay in the GSM business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guge.net/?feed=rss2&amp;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t buy this: VCR 2 PC</title>
		<link>http://www.guge.net/?p=12</link>
		<comments>http://www.guge.net/?p=12#comments</comments>
		<pubDate>Fri, 02 Jan 2009 21:42:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[avoid]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[distortion]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[vcr2pc]]></category>
		<category><![CDATA[vhs]]></category>

		<guid isPermaLink="false">http://www.guge.net/?p=12</guid>
		<description><![CDATA[My review of ION Audio's VCR 2 PC. Summary: avoid.]]></description>
			<content:encoded><![CDATA[<p>I have a couple of hundred VHS tapes in the attic, like so many other people do. During a lightning storm last summer, my VCR died, and I have been putting off getting a new one.</p>
<p>Then I came across the VCR 2 PC product from ION Audio. It looks like a cute VCR player to attach to your PC to get those old tapes onto a hard drive in a user friendly and smart way.</p>
<p>It isn&#8217;t.<br />
<span id="more-12"></span><br />
I unpacked the player and hooked it up to the PC. The companion CD went into the PC and the software was installed. The instructions and the user interface of the included software was clearly meant for someone who likes to watch TV, if you know what I mean. Droolproofed instructions, and big friendly buttons. A minimum of settings. I was suprised to find that the program didn&#8217;t control the player through the USB interface. I inserted a tape, pressed PLAY on the front of the machine and RECORD in the software window. I left the max time setting at the default 4 hours, thinking that the thing would stop by itself. Wrong! When I got back to the machine, I had 1 hour 51 minutes of video at almost the beginning and 2 hours 9 minutes of empty video at the and. No big deal to cut out the unwanted parts. Except that it takes a bit of time to rewrite the multigigabyte file.</p>
<p>Then I found the real problem. The audio is awful. It has been automagically adjusted so that silence is amplified to the point where a roaring pink noise is captured, the when the next actor speaks, there is a mechanical burp while the sound volume is lowered to the point of <strong>almost</strong> no distortion. If anyone get&#8217;s shot &#8211; God forbid &#8211; in a movie, you&#8217;ll hear a click, and the everybody whispers afterwards.</p>
<p>I used to have this function on a VCR during the late 1980s. I tried it exactly once. ION Audio must have added this to protect fools from themselves, thinking that noone wants to rerecord a VHS with an adjusted volume.</p>
<p>So, can you turn it off? No.</p>
<p>But this is not the worst part. This automatic volume adjustment system is not in the hardware it&#8217;s a piece of software. That&#8217;s actually good, because it should make it easier to improve the product. The very real problem is that it installs itself somewhere deep in the bowels of the multimedia system in Windows, adjusting volume for <strong>everything you play through the soundcard.</strong></p>
<p>I though my soundcard, or my speakers, or my MP3&#8242;s were broken. Then I started thinking and did a system restore back to the day before I installed VCR 2 PC. Now I can listen to music again without it being distorted.</p>
<p>So the included software is seriously broken, is it possible to use the device without the software. Yes and no. You can use it as a pure VCR and hook it up to a frame grabbing device from Hauppage or Pinnacle. You can not use it with the USB cable, because the audio part of the built-in frame grabber does not install as an audio device that other softwares can recognise.</p>
<p>At a price of 249US$, it is not a really cheap VCR. It does only one standard, I have the PAL version, so it will not help me with my NTSC or SECAM tapes. It does not work with long play recordings. (8 hours on a 4 hour tape.) It does not have a remote control. It does not have automatic tracking.</p>
<p>You could probably get a better VCR and a better TV-card for less than the price of VCR 2 PC from most dealers. You would get smarter capture from Microsofts freebie Movie Maker, and your PC sound wouldn&#8217;t be ruined.</p>
<p>Don&#8217;t buy this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guge.net/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From Infix to Postfix &#8211; an alternative to shunting yard</title>
		<link>http://www.guge.net/?p=3</link>
		<comments>http://www.guge.net/?p=3#comments</comments>
		<pubDate>Fri, 05 Dec 2008 21:22:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[codesample]]></category>
		<category><![CDATA[dijkstra]]></category>
		<category><![CDATA[infix]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.guge.net/?p=3</guid>
		<description><![CDATA[Infix to postfix algorithm of my own design. It only uses an array, no stack as in Dijkstra's shunt yard. Complete C# sample code.]]></description>
			<content:encoded><![CDATA[<p>When I was 19 years old I wanted to create a command line interface in gwbasic! I though long and hard about how I would parse a command line and then interprete it. A friend told me I should convert the command to postfix. &#8220;2 + 3&#8243; is called infix. Postfix for that would be &#8220;2 3 +&#8221;. The good thing about it is that postfix is very easy to interprete. Every time you find an argument, such as 2 and 3 in the example, you push it to a stack. When you get to an operator, such as +, you pop the two required arguments from the stack, perform the addition and push the 5 back to the stack.</p>
<p>Dealing with precedence is also very easy. I found a way of doing this, that I think may be original. I would just push every operator to the right following a simple rule. After tokenizing the input string I start with the leftmost token. I walk that token to the right as long as it has lower precedence and as long as it passes the same number of (&#8216;s and )&#8217;s. After I walk the first token, I walk the second. That&#8217;s all there is to it!</p>
<p>This is not the same way Dijkstra does it with the shunting yard algorithm which uses a stack. All I need is an array! I have tried it with lot&#8217;s of different scenarios. I treat operands the same as operators.<br />
<span id="more-3"></span><br />
This is actually the first time I have ever thought of publishing it. I started thinking someone might take an interest in it. So here it is.</p>
<p>The code example here is a complete example with a rudimentary tokenizer. To try it, compile it with C# 3.5 or port it to your preferred procedural language. After compilation run it with spaces between all tokens. Like PostFix.exe 2 * ( 2 + 3 )</p>
<pre>using System;
using System.Collections.Generic;

namespace PostFix
{
    class Program
    {
        static void Main(string[] args)
        {
            Token[] tokens;

            if (args.Length == 0)
            {
                Console.WriteLine("You called this program without arguments,\nplease enter something for me to calculate.\nPlease remember to use spaces between numbers and operators\nas I am just a sample program without complicated parsing code.");
                string input=Console.ReadLine();
                tokens = Tokenize(input.Split(new char[] { ' ' }));
            }
            else
                tokens = Tokenize(args);

            PostFix(tokens);

            float result = Execute(tokens);

            Console.WriteLine("Result is: {0}\nPress enter to exit.",result);

            Console.ReadLine();
        }

        private static void PostFix(Token[] tokens)
        {
            for (int i = 0; i &lt; tokens.Length - 1; i++)             {                 if (tokens[i].Precedence &gt; tokens[i + 1].Precedence)
                {
                    int j = i;
                    int scopes = 0;
                    while (j &lt; tokens.Length - 1 &amp;&amp; (scopes &gt; 0 ||
                        tokens[j].Precedence &gt; tokens[j + 1].Precedence))
                    {
                        Token tmp = tokens[j];
                        tokens[j] = tokens[j + 1];
                        tokens[j + 1] = tmp;
                        scopes += ((tokens[j].Operator == '(') ? 1 : 0)
                            - ((tokens[j].Operator == ')') ? 1 : 0);
                        j++;
                    }
                    i--;
                }
            }
        }

        private static float Execute(Token[] tokens)
        {
            Stack stack = new Stack();
            foreach (Token token in tokens)
            {
                switch (token.Operator)
                {
                    case '+':
                        stack.Push(stack.Pop() + stack.Pop());
                        break;
                    case '-':
                        {
                            float f1 = stack.Pop();
                            float f2 = stack.Pop();
                            stack.Push(f2 - f1);
                        }
                        break;
                    case '*':
                        stack.Push(stack.Pop() * stack.Pop());
                        break;
                    case '/':
                        {
                            float f1 = stack.Pop();
                            float f2 = stack.Pop();
                            stack.Push(f2 / f1);
                        }
                        break;
                    case '(':
                    case ')':
                        break;
                    default:
                        stack.Push(token.Operand);
                        break;
                }
            }
            float result = stack.Pop();
            return result;
        }

        private static Token[] Tokenize(string[] args)
        {
            Token[] tokens = new Token[args.Length];
            int i = 0;
            foreach (string arg in args)
            {
                Token token = new Token();
                switch (arg)
                {
                    case "+":
                    case "-":
                        token.Operator = arg[0];
                        token.Precedence = 2;
                        break;
                    case "*":
                    case "/":
                        token.Operator = arg[0];
                        token.Precedence = 1;
                        break;
                    case "(":
                        token.Operator = arg[0];
                        token.Precedence = -1;
                        break;
                    case ")":
                        token.Operator = arg[0];
                        token.Precedence = 3;
                        break;
                    default:
                        if (!float.TryParse(arg, out token.Operand))
                            throw new ArgumentException("Unknown token: " + arg);
                        token.Precedence = 0;
                        break;
                }
                tokens[i++] = token;
            }
            return tokens;
        }
    }

    public struct Token
    {
        public char Operator;
        public float Operand;
        public int Precedence;

        public override string ToString()
        {
            if (Operator != 0)
                return Operator.ToString();
            else
                return Operand.ToString();
        }
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.guge.net/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
