carlfoxmarten: (Default)
[personal profile] carlfoxmarten
Sometimes I surprise myself with how quickly I can put together a small program.

Case in point: Yesterday I was playing an online Scrabble-like game called Popotamo, and had been using an online word-search tool to find the highest-scoring options (the longest words, in this case), but kept running into problems when the board got pretty full.

So I decided to grab a copy of the SOWPODS dictionary (the dictionary used by the game I've been playing) and try to write a simple program to provide suggestions based on the tiles I had already, as well as providing an option for specifying constraints for the words.

As it turns out, it was actually a rather simple program to write, taking less than four hours to complete, most of which was spent trying to figure out how to design the User Interface.

Originally, I'd written it in Python, an easy-to-use scripting language, but realized that it's not a very fast language, nor is it terribly portable.
So I decided to rewrite it in Java, which took less than two hours, most of which was spent trying to remember how Java does GUIs...
However, the advantages Java has over Python were threefold: First, it was fast, which is great when processing long lists of words. Second, it is entirely platform-independent, which means that it can run on any type of computer that has a Java implementation. Third, the program can be packaged up into a single file, which means that you don't have to fiddle around with the dictionary file, because it's wrapped up in the single file.
(also, if I so chose, I could embed it in a web page, but I've decided against that for the moment)

Anyway, I was quite surprised at how fast it came together, and once I've found an appropriate place to host the file, I'll be posting a link here so others can use it too.

Date: 2012-11-10 09:02 pm (UTC)
From: [identity profile] makovette.livejournal.com
I hear HRF is a handy place to host things like this :)

Mako

Date: 2012-11-11 04:20 am (UTC)
From: [identity profile] makovette.livejournal.com
Get a domain name from ChangeIP or GoDaddy.

Add a bind zone file for your new domain.

Mod the apache config to point incoming requests for that domain to your /public_html directory.

Restart bind and apache.

Profit!

Mako

Date: 2012-11-11 04:21 am (UTC)
From: [identity profile] makovette.livejournal.com
PS:

Make rollback copies of all configs Before you hack on them.

TY :)

Mako

Date: 2012-11-11 12:09 pm (UTC)
From: [identity profile] thefoxaroo.livejournal.com
Fraid I don't know much about any of the languages you've mentioned here.

Lately I've been sinking back into depression because I seem to have lost some brain cells due to this gluten-intollerance thing. Being dyslexic my concentration was already shot to begin with, but ever since April when I began experiencing the foggy mind and disorientation I've found it much harder to write programs or even write creatively. I'd been working on a furry-themed game in Inform7 but it came to an abrupt end when I suddenly found I could no longer hold coherent thoughts in my brain. :(

Date: 2012-11-13 02:10 am (UTC)
From: [identity profile] thefoxaroo.livejournal.com
It may come to that. What I'd really like to do though is see a lawyer about the two medical idiots who inflicted this on me.

I've just been back to the clinic again, and I'm waiting for the train home now. I'll be posting about it when I get home.

Profile

carlfoxmarten: (Default)
Carl Foxmarten

August 2023

S M T W T F S
  12 345
6789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 15th, 2025 12:43 pm
Powered by Dreamwidth Studios