
Scrabble is funny, and to play it with friends even more. Especially because you can spread the game throughout your day. But I am a coder, I like math more than words. So to keep up with this Wordfeud trend, I need help. So why not code a helper?
I only use the Dutch library which is a modified version of opentaal. I downloaded the ‘opentaal’ library from this url:
http://www.opentaal.org/bestanden/doc_download/18-woordenlijst-v-210g-bronbestanden-
and used the following 48 lines of C# code to make a small helper.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
namespace Opentaal
{
public partial class Form1 : Form
{
private static List<string> _lijst;
public Form1()
{
_lijst = File.ReadLines("OpenTaal.txt").ToList();
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length > 0)
{
string zt = textBox1.Text.Trim(); // search parameter
switch (comboBox1.SelectedItem.ToString())
{
case "Begint met":
ShowFound(_lijst.Where(p => p.StartsWith(zt)).ToList());
break;
case "Eindigt op":
ShowFound(_lijst.Where(p => p.EndsWith(zt)).ToList());
break;
case "Bevat":
ShowFound(_lijst.Where(p => p.Contains(zt)).ToList());
break;
}
}
}
private void ShowFound(List<string> l)
{
textBox2.Clear(); // for second search
foreach (string st in l.OrderBy(s => s)) // order by alfabet
textBox2.Text += st + Environment.NewLine;
int eind = textBox2.Text.LastIndexOf(Environment.NewLine);
textBox2.Text = textBox2.Text.Substring(0, eind); // remove last linebreak
}
}
}
You can take this code and make more search options. Please note that the opentaal library is released under a creative commons license.
How fast are we today? More and more web applications are using JavaScript to improve the UX (User eXperience) Almost all websites use frameworks like jQuery and mooTools, extJs etc. for this. So it is important that our browsers are fast with JavaScript!
Browsers are updated more often because they are more important every day. Since I have several extensions for Chrome and Firefox, it’s not fair to compare RAM usage. So I only looked at JavaScript performance. A way to compare it, is to run SunSpider http://www.webkit.org/perf/sunspider/sunspider.html
So I run all my installed browsers with my Centrino 2 cpu, win7sp1x64 and here are my results, run with my hardware.

| Internet Explorer 9.0.8112.16421 | 220ms |
| Internet Explorer 10 platform preview 2.10.1008.16421) | 234ms |
| Firefox 11 beta | 250ms |
| Opera 11.61 (build 1250) | 255ms |
| Safari 5.1 (7534.50) | 257ms |
| Chrome 17.0.963.46 beta-m | 277ms |
As you can see, the results are very similar these days. So if you have an up-to-date browser, your fine.
Also check out this blog from 2 years ago:
http://lifehacker.com/5457242/browser-speed-tests-firefox-36-chrome-4-opera-105-and-extensions
And if someone is still using IE6 or 7, please upgrade a.s.a.p. check out the kill bill’s browser website if you are not convinced.
Enjoy your browser!