Mathieu Tozer's Dev Blog

Cocoa, the development of Words, and other software projects (including those dang assessment tasks).




If I had a dollar...

0 comments

If I had a dollar every time I've typed with auto completion 

[[blobArrayController arrangedObjects] objectAtIndex:0];

...


Some old thinkin' notes

0 comments

This means looking back at the description of what I want to achieve,
and deciding which checks and balances I need to be able to make when
words are inserted and stuff.

I have the basic database system working, now it's time to write the
wrapper to that database.

What I'm essentially doing is writing my very own API! The words API.

Triggers will be called when the user tries to do something idiotic.
What kinds of things are idiotic in the context of Words?

Procedures can be wrappers to adding words and languages to databases.
They can be used to see about sorting a way

They could be used to write API style things. Like "Give me the data
for the game:GameName".
Or for retrieving commonly used sets of data.

They could be written to fetch the interesting statistical information.
They will do the incrementing and calculating of the completeness and
validation levels. They can do the propagation to the rest of the
database of changes.
They will be the interface for the client app to say "Give me
definitions for these words" A procedure will iterate though each
word passed to it and fetch out the words, and perform the updates it
needs to with any new data it finds in the submission.
Basically it has to be able to sync up words together.

I might need to draw a big detailed flow chart of what will happen as
things flow through, and what interactions need to happen to make the
data all sync up.

So what I need to finalise is what exactly I need to do with the data
in the database.

I need some pseudo code about what I need to do.


A Review So Far

0 comments

What can be done with my software as it is.
Users can open a language which they are learning, and add words to
it, via a simple push button or though highlighting a word and
selecting a hot key.

Once in the system, users can organise the word as they please by
creating manual groups in which to contain the words, or by
organising them with smart groups. These are all ways in which the
list of words can be filtered.

Users can also search for the definitions of words by the search
menu, and if it isn't already found within your words database, it
will ask if you want to add it. Clicking add will add the word.

Users can set dictionaries which the words they enter will be looked
up in. These are set by checking them in the user preferences window.
More dictionaries can be downloaded from the Dictionary Downloader
view, via a simple drag and drop interface.

Once dictionaries are set up (a once of thing) users click 'define',
which will search all the dictionaries set up to use for definitions.
The definitions found are visible in a text view in the main window.
Which translation language is visible is selectable via the language
list on the left of the window. If there isn't a translation
available in the language they wish, they have the option of writing
one themselves in the main text view. Using the main text view, users
can choose their 'top four' translations / definitions, which will be
used for flash cards and quizzing.

While a word is selected, users can click on 'Find', and a simple tag
search will be performed on the flickr online image database, and a
number of images will be returned. The user can browse the images,
and check 'keep' to save the image against this word.

That is as of Wed 11th October 2006, here's what I have planned for
the future.

Instead of or in conjunction with, users will also be able to define
their words though the playing of games which use what data is
available, and get users to fill in the blanks.

This will happen in a number of ways, which keeps it interesting.

Connect a user with another user with the same language combination.
Let them play games together and record all input. Where the data
input matches, record it as valid. Where it doesn't record it as
needs validating.
This is a general model from which a number of word games
incorporating sound, images, and words can be invented.

Users will then be able to turn to these games firstly as a way of
learning. They will still be able to see their lists of words that
they have encountered though gaming or though reading email in the
regular views. They will be able to earn points towards their total
points kitty, and compete against other players in the game.

All the words will be kept on a central server, and word on the
client side will be kept asynchronously up to date with the servers
words.


Words.sql

0 comments

Haven't updated for a while... here's why:
As part of the DB assignment I am building the server side of Words.
I have made an ER diagram of the data I want to be in the database,
converted it to relational tables, then written the SQL code (for
ORACLE) for create the tables.
I have written code to export example data right from the Words
application which can be read by the Oracle database. I have written
'setter' API calls (embedded procedures) for the database which will
conveniently enter this data too, setting the default attributes for
each data item.
I am engineering the database so that it exists in a series of .sql
files, and the entire thing can be set up with a single @words.sql
call at the Oracle command line. You can also clean the whole thing
up by calling @delete.sql.

My next challenge is to develop a more robust API that any client can
call to.
This challenge is from a few angles which I can see:
Insertion of data
Updating the data
Synchronising data between client and server.
Performing complex queries on the data to retrieve meaningful
information which can be used by a client
Searching the data for specific information.

Kinda looks like an API table of contents doesn't it!

Anyway it's due friday so I had better get on it.


Older Notes

0 comments

Whittling away at the errors. Taking what I need from other's source code. Making it build, compile. Other people's thoughts and thinking coming though the code. Learning about new coding styles.

Well I'm mighty proud of myself now... it was a long road, but the architecture I've set up to make words extensible for different dictionary types works! I plug in anything, and as long as the new dictionary is compatible with the application's API (actually as long as the correct API is provided by the new plug in) then Words will go and get the blob of definitions in the right way. The next thing to do is to complete the StardictDict class to actually look up blobs from the dictionary it is assigned to.

Next step is to actually do some searching and to move the dictionary in and out of the Words sphere with import and export, so that they can be packaged up and put on a server for downloading via the dictionary downloader.

I need some kind of policy for dictionary naming conventions.
File extension: .wordsDict

Apparently, the unique naming convention I have inbuilt so far is by the "Name" attribute. So I have to make sure this is all unique and stuff, for all kinds. It would be probably best if there are no spaces allowed too. This name can be used for the file name, and also internally to determine uniqueness.

Pivot_Target_Location_Type.wordsDict 

Location is probably the hard bit. It would be something like dictDotOrg
It has to be the most.

Think about ordering in a list. Would it be more convenient to order the dictionaries by target? Or by protocol? In the case of non networked dictionaries, location would mean the name that it's generally given. Like en-ja or something. It doesn't really matter as long as it's a fairly unique name.
This means that other protocols can have a en-ja dictionary but still not clash. 

Ie

Type_Pivot_Target_Location.wordsDict

It all seems to work, still more testing to do, and more data entry to do to support more dictionaries.


+RSS | dev blog | Portfolio

About me

My status

Last posts

  • my del.icio.us
  • my flickr