ClipSpeak 1.5 released!
I just finished uploading ClipSpeak 1.5 to various places. Check it out on CodePlex!
I just finished uploading ClipSpeak 1.5 to various places. Check it out on CodePlex!
A few days back, this crossed my thought: We interact with our computers through a keyboard that has quite a number of keys. We can do the same things, albeit not as comfortably, on our mobile phones, which traditionally only has about 1/10th the number of keys as a full computer keyboard. If we take this to the extreme; How many keys are needed to control a computer, the way they work today?
This is a nice case to apply the principle of reduction and emulation to. If we have a device which can emulate a computer keyboard, it can control the computer, since the regular computer keyboard can.
Step 1: Consider a device with only arrow keys and an enter key. To control a computer with this device we would only need to have an on-screen keyboard program, where we navigate to the key we want to press and hit enter.
Step 2: Now we don’t really need that many arrow keys. One is really enough: the “forward” key. Think of a keyboard represented linearly, and when we move to the end we get back to the beginning. Although neither convenient nor practical, we can now control the computer with two keys.
Step 3: Why have two keys when we only need one? After all, two keys to remember is even TWICE as many as having only one key. Let the software program switch selected key every second, and you press the enter key when the key you want is highlighted. Or alternatively, make a double-click equivalent function, but then this could be treated as having two keys.
Conclusion: We only need one key, which I think should referred to as “the any key”.
Did you know: There is a well kept secret in the history of computing: The first keyboards only had one key (bet you didn’t know that, eh?) After all, keep it simple is nice, isn’t it? Why design a complicated piece of hardware when you can have a big, easy-to-hit, RSI monster like the one-key keyboard. If you wanted to, you could even make it really small. You didn’t even have to learn touch typing or anything like that! But no, it wasn’t until someone invented the cracks between keys that things got more complicated.
Remark: This blog post is copyright(c) 1956-2009, written on a one-key keyboard.
Yesterday I started a small project to create a C# application that would let me play my MIDI keyboard from another computer over the internet. This application now works, and I call it MIDINet.
MIDINet has a client-server-architecture. The server listens for incoming UDP-packets, parses those and translates them into MIDI messages, which are sent directly to my Roland E-86. The client is set up to send packets to my server when the user presses certain keys on the computer keyboard.
Usefulness: questionable. Funness-factor: High!
Are you using MS Paint? In that case you might want to have a look at Paint.NET, which is like the new paint. It is free, runs on the .NET Framework, and has a lot of features that MS Paint lacks: layers and effects for instance. A very good thing about Paint.NET is that it is very easy to extend its functionality by plug-ins that are very easy to install and use (just put a .dll-file in a folder and you’re done). There are a lot of great plut-ins out there: effects, language packs and what not.
Check it out at www.getpaint.net.
The Large Hedron Collider, LHC, the giant particle accelerator in Switzerland, will apparently be operational some time in October this year. If I recall correctly we were waiting last year too, but the accelerator broke down, and the costs associated with bringing it up in the winter was decided to be too high.
Better luck this time!
ClipSpeak 1.5 will hopefully be out pretty soon. Some things to look forward to are:
* Save to MP3 — Put your texts on your MP3-player
* Lots of bug fixes — including a couple of bugs related to Adobe Reader and Firefox
* Change voice speed and volume — These settings can be changed in the voice selection dialog
* Toggle ClipSpeak on/off — via a keyboard command.
As can be seen on my main homepage (a.k.a. my links page), at danielshome.webs.com, I have now set up a FriendFeed (here) aggregating my twitter, blogs and YouTube profile. Nice!
As the title says, I am going to write about customising LaTeX to work with Swedish typographical rules and conventions. The articles will be in Swedish and will be on my Swedish blog, Fruitbox 2.
Today I am going to present one of the worst sorting algorithms, along with a C# implementation. The algorithm is called bogosort, also known by other names such as monkey sort, random sort or shotgun sort. This algorithm is very simple, and it works as follows:
1. Given a random array, check if it is sorted.
2. If it is not sorted, shuffle it randomly.
As you can imagine, this algorith is not very fast, but it CAN be very effective, and for an array just consisting of two elements, it is actually very nice. Despite this, don’t use it for practical purposes!
For a very detailed analysis of this algorithm, see the paper by H. Gruber, M. Holzer and O. Ruepp titled “Sorting the Slow Way: An Analysis of Perversely Awful Randomized Sorting Algorithms“.
Following is a C# implementation, which generates a random array, runs bogosort and then prints some nice statistics:
using System;
namespace Bogosort
{
class Program
{
private static System.Random rnd = new System.Random();
private static int compctr = 0;
static void Main(string[] args)
{
int[] array = GenRandomArray(6);
Console.WriteLine("Sorting a list of " + array.Length + " random numbers between 0 and " + 10 * array.Length + ".");
Console.Write("Original array: ");
PrintArray(array);
int i = 0;
System.DateTime startTime = System.DateTime.Now;
while (!Sorted(array))
{
array = Shuffle(array);
Console.Write("Shuffle " + i + ": ");
PrintArray(array);
i++;
}
System.DateTime stopTime = System.DateTime.Now;
Console.Write("The sorted array is: ");
PrintArray(array);
Console.WriteLine("This required " + i + " shufflings and took " + (stopTime-startTime).Milliseconds + " milliseconds.");
Console.WriteLine("The total number of comparisons made was " + compctr + ", which is " + (double)compctr / (double)i + " comparisons on average.");
Console.WriteLine("The total number of swaps made was " + array.Length * i + ".");
}
private static int Factorial(int x)
{
if (x < 2) return 1;
return x * Factorial(x - 1);
}
private static void PrintArray(int[] array)
{
string s = "";
for (int i =0; i
s += array[i] + ", ";
}
Console.WriteLine(s + array[array.Length - 1]);
}
private static int[] GenRandomArray(int length)
{
int[] array = new int[length];
for (int i = 0; i < length; i++)
{
array[i] = rnd.Next(10*length);
}
return array;
}
private static bool Sorted(int[] array)
{
for (int i = 1; i < array.Length; i++)
{
compctr++;
if (array[i] < array[i - 1]) return false;
}
return true;
}
private static int[] Shuffle(int[] array)
{
for (int i = 0; i < array.Length; i++)
{
int pos = rnd.Next(array.Length);
int temp = array[pos];
array[pos] = array[i];
array[i] = temp;
}
return array;
}
}
}
For a far better reading experience see the Algorithm wiki page on bogosort.
So the pirate bay trial, #spectrial, is now over. One year in prison and a fine of 30 million Swedish crowns, that’s the sentence. This outcome clearly shows the inadequacy of the justice system when laws are unable to keep pace with technological development. Sadly, I am not surprised. Now who will be the first to sue Google for aiding in copyright infringement?
The Earth Hour 2009 event has just started here in Sweden. I am sitting here watching tweets go by in #earthhour and trying to keep track of the event.
The next version of ClipSpeak, namely ClipSpeak 1.5, will feature two quite important improvements. One of them is SAPI4 support, which will allow you to select the voices you might not be able to right now with 1.0. The other feature is the Save to MP3 function, which I think will be a very neat feature to have.
As usual, if you have suggestions, head over to the CodePlex page!
It’s out, in a lot of places! Google it.
Voice selection is in, but ’save to mp3′ is still missing. Hopefully it’ll be there in the next release.
It’s out! Where? Head over to CodePlex!
http://www.codeplex.com/clipspeak
Get free blog up and running in minutes with Blogsome
Theme designed by Riosoft