Archive for the ‘coding’ Category

h1

Synchronizing Databases

January 5, 2006

I’ve not done much personal coding for a few days. Just work stuff. Our company works with another company (for clarity, I’ll call them “Company C”). Business needs require both companies have a copy of the data. We have the data in a MySQL databases and “Company C” has the data in an Oracle database. The structures of the databases are very different. In addition, we both have processes that modify the data in different ways. The challenge was to come up with a way to keep the data synchronized.

Initially as users modified data using “Company C”‘s interface their process would call a web service I wrote (using Axis, Hibernate, and Tomcat) and our data would get updated. As users modified the data on our end, our processes would perform a similar call to their web service.

Read the rest of this entry ?

Advertisements
h1

Vocabulary App

January 2, 2006

So I’m going to write some code to help me increase my vocabulary. I don’t want to spend a bunch of time on it so for now, it will be command line. Initially, the app will test me using English words but I’m designing it to use other languages as well.

The first draft is in Ruby (to help keep me from getting too rusty) but I plan on translating it to a Carbon/Cocoa (Mac OS X) application. I’ll throw it out onto the Interweb. Maybe someone else will find it usefull when I’m all done.

I find that it’s much easier to learn new languages (computer) or stay familiar with languages I’ve already used when I have a project that I can work on. I’ll mix a variety of technologies so that I get practice in using the language(s) with these other technologies. For instance, this one is using XML to store the data files (the vocabulary words and definitions and anything else). So I’ll get practice using XML with Ruby and then later with Cocoa. In the long run, it may turn out that XML is not the best way to go so it may change but for now, I’m getting practice.

Does anyone realize how difficult it is to find a free, easily parsable English dictionary on the web? I’ve just spent the past several hours searching on Google and trying different things out. I looked for web services, data in XML, some sort of API and everything else I could think of. I’ve worked with WordNet before but don’t feel like dealing with C right now. I am subscribed to A Word A Day (AWAD) and spent a while attempting to parse these files and a file like this using Perl but I gave up. Too much time for now.

I thought about using the Google API but it does not (yet) include the define feature. You can search for words. You can check the spelling of a word. But you cannot get the definition. Sending a web request to Google using something like

http://www.google.com/search?q=define%3A+word

will get me HTML which, in general, isn’t that easy to parse – although, Google’s pages are pretty clean. Maybe I’ll have another look into that.

I found that AWAD does publish an RSS feed for the week and that’s what I’m going to work with for now. I’d like to have data that includes more detail (e.g., part of speech, pronunciation, example showing the word in use) but for now, this should do it.