sábado, 1 de mayo de 2010

And so there was light!

After a lot of thinking about the problem of turning the project distributed and a long time of "rest" (if we could say that), we start working one week before the last delivery, praying for ideas came to our minds. When Martha achieved the connection between the client and server, which was a major step forward, even that was a big problem as we had to modify the table and each customer could be independent... : S
At last on Wednesday, after long time thinking and with an incentive (a good cup of coffee and a delicious slice of pay XD...) and so there was light! I got inspiration to my head. I was designing the protocols that would make it possible that the system would work as distributed... after long hours I could make an outline of what each protocol should do, indicating what would be done on the server and client sides. Then we would only follow the recipe and pray Alfonso and Martha could implement them and make the system work!
Only a few hours left for dawn and share this idea with my friends, and work in the implementation.

The (almost) last post

So after a long long long wait, we’re back to this blog, just to tell how fast and how easy it was to end this Project.

After like a month of doing nothing (actually working for other projects), we got back to work on Tuesday. My teammates commenced doing research on java sockets, and using the code provided by the Programming teacher Ariel Ortiz, which involved the use of a single java socket for both client and server for clojure, using an agent to control concurrency, Martha was able to implement a code that copied the database from the server to the client, so the client would always have the most up-to-date version. On Wednesday, Karen began to work with that code, and tried to implement the code that would make updating, creating and deleting possible in a distributed way, but she realized that it would be too complicated to start from scratch, and she designed the protocols for every transaction, which proved to be very useful later (for more information, see Karen’s post)

After the protocols were designed, Martha and I checked them, and began to implement them. Thank god it was pretty easy, and we just technically followed by the book the protocols and in a couple of hours we had already implemented the easiest ones. The next day, in a free hour and half before our class, we had already implemented all of them, and almost all of them were working, except for the update protocol. Today, we met in my house, and we’ve made everything work, in a local and distributed way. (for more information see Martha’s post).

It’s pretty interesting for me how much we have learned with this project: a whole new language, and so much more about java’s API and its internal logic. I’m happy to know that our big effort to make good code for the first delivery paid off, and we were able to finish the project in no more than 4 days.

It seems like we’re done now =), we’re happy like hell, and we’ll just ask for some help to make the jar work on Monday and we’ll be absolutely done. If you’re visiting this blog, please don’t forget to vote! See you in our next (and hopefully last) entry.

The pursuit of knowledge...

In the beginning there was an utter lack of knowledge, it was as if the team was smothered in the dark depths of ignorance. With the dawn of the project the noble team began to see the light at the end of the tunnel hoping to see the sun rise. As the blindness became unclouded the team began to take control of the clojure monster, commanding it to do what they wanted and not the other way around. But then the first revision came and master Ariel summoned them to his cubicle. Standing there, in the four-walled palace, the team was fearful of the master’s reaction and hoped not to leave him unsatisfied; but the brave teammates were able to overcome all obstacles and depart with the highest score. Unfortunately the noble knight and the two princesses weren’t able to carry on with their clojure quest for quite a while. One month later, the good master announced the final adventure was about to begin and the noble programmers where reunited. First, Princess Martha worked on the pioneer adaptation of the distributed version of their program, successfully making the server to send the whole database to the client. The labor then passed to Princess Karen who bravely designed the protocols through which the hosts would communicate. Finally noble Prince Fonz and Princess Martha worked through sunrise and sunsets without rest so the ultimate release could be done on time. During this two-day journey the valiant teammates dealt with errors, monstrous exceptions and dreadful uncertainties, but never gave up and eventually came up with a solution and countermeasure for each obstacle except for one: the abominable jar. Hopefully with some help from master Ariel’s magic and knowledge the audacious nobles will finish on time, so stick around for more of this tale and don’t forget to visit the gallery for some pictures of their adventures.

miércoles, 24 de marzo de 2010

Every Wednesday's code

Today we had our usual meeting at school and revised the progress of our project. So far we'd been having some problems validating the table's fields, specially when updating, but we managed to solve them. During this reunion (maybe the last one before our first delivery) we pimped our GUI adding some nice icons instead of word-buttons. We also gave some format to the table's fields so whenever an update is made, the new values are formatted and the whole table looks unified. Finally when everyone finished their work we uploaded our changes into our googlecode page, one by one we managed to merge the changes correctly and obtained a pretty good working copy. After assuring our files were fully working, we cleaned-up our project's page deleting useless files.
Now we're almost ready to make our first delivery, just a few tests needed to be done and we'll be good to go!
Although this first stage was tough, the team worked extremely well. Everyone participated, which allowed work to flow as planned. We still have a lot to work on for the final product but keeping the good work will help us finish it in no time!

As always you can find some pictures in our gallery. Good Luck and don't forget to rate our blog's info on the right side bar.

miércoles, 17 de marzo de 2010

Designing the Graphical Interfaces!

Today we meet in school and dedicated ourselves to programming and designing the graphical user interface (GUI). We achieved an outstanding result, and we'll soon be ready for the first delivery!

Today we had an exciting day. When we were joining the interface with the methods of dbmain.clj, we realized that some of them still had some details that required correction, but we managed to fix them relatively quickly; given that our clojure programming skills are improving considerably!.

We have come a long way through this day, and if everything goes o.k., we'll only need to unite all the windows that we've created with the main menu and give them an appropriate general format according to the Java Look and Feel Design Guidelines. But first, we must make sure it's working properly.

It is also important to work as a team, as today we had many small problems and together we managed to each and every one of them. It's fantastic to see how the project is taking shape, and we are beginning to see the results of our hard work. However, we should not live in the delusion of extra time, but keep the work pace. We believe that we can go on a little further of the first delivery while working constantly, in no hurries and maybe without having to meet weekends anymore ! :D.

After a long day, now it's time to go to bed and gain energy for tomorrow, as we'll continue working on the project. Let us not forget that we have other courses to attend too!

To check the code produced today, please visit our googlecode page

domingo, 14 de marzo de 2010

Coding on Sunday!

Today we met in Alfonso's house. On one hand, we discussed the problems that we had when writing the methods of the dbmain.clj implementation. This class is very important and must have no errors, as it controls the access to the database. Thank God, it seems like it's working O.K. now, and we can freely manipulate the contents of the database. We faced some problems when writing in the database file, but we think that they happened rather because of our inexperience with Clojure and with the Random Access File API instead of having bad programming practices. We spent a lot of time debugging and getting the code to work, but we think that it's part of the process implied in learning a new programming language.

On the other hand, we began discussing how the GUI is gonna be and look like. We made some sketches and a general idea of what the user options should be, and we've decided to split classes creation responsability, so everyone can work at home. We expect to get everything done by next weekend, so we can integrate and present it to the class on March 23rd.

To see the photos check out our Gallery

martes, 2 de marzo de 2010

Why a New BSD Licence?

As you can see in our googlecode page, we chose a New BSD License for our project. Generally, BSD licences are considered to favor IT developers, while GNU licences are considered to favor end users, so why did we choose the BSD license? The reason is simple. We don't to tie IT developers to use our code just for open-source projects, but we still want to make a contribution to the emerging Clojure community. More importantly, we don't know if we are going to need this code someday for a non-open project, e.g. when working for a Software Company. We might continue coding in Clojure, and we want to be able to incorporate this code in future profitable projects. We think that this a fair decision, since we are now taking advantage of many free Clojure examples and explanations available on the Web, and we think that we've got to contribute as well. Hopefully, we'll be helping others, but it's not part of our philosophy to continue this way forever, nor forcing others to do the same.

So please go on! you may check our code freely, and (re)use it as well for whatever a purpose you want, either open or close. Just read carefully the conditions of our license and respect them.