Tuesday, July 17, 2012

Memory test in Html/Javascript/jQuery

In this post I want to share a little html-page/script to help view in particular the glance.

Below you can see the test, choose in the form the number of rows, columns and the time than press enter or click start. After that you have $time seconds to memorize the letters and numbers than they disappear.
Now you have the same table empty, enter in every cell the letters you remember and press enter or click check to view the results.

Features of this little html page/script:
  1. Automatic cursor positioning at the first cell;
  2. Automatic upper case for letters;
  3. Automatic go to next cell;
  4. Right answer report with percentage;
  5. Button enabling functions - easy user experience;
  6. Keyboard shortcuts: tab, shift-tab and enter;
  7. Ultra quick test without changing settings, just always press enter to execute a new test and check;
  8. Completely customizable: rows, columns and time;
  9. Error highlighted in red;
  10. Page remembers the settings using parameters in the URL (?row=X&col=Y&time=Z);
  11. Very little script;
  12. Multiple browser compatibility.
Technology stack:
  • Html
  • Javascript
  • jQuery

Row Number: Column Number:
Time (seconds):

Tuesday, July 3, 2012

Java: How can I start my first big project?

Some time ago, speaking with a friend of mine he asked me a question: "Virtue of your experience, what libraries/tools/technologies can I use to start a new Java project?". This question made me think to my story, in particular to my step by step learning.
Below, the answer I gave to my friend:



I think that, for a beginner developer, open source software is the best choice, specially for the big documentation you can find in the web.
In my humble opinion the first things to learn are:
  • Eclipse (I prefer downloading the classic version to install only the needed plugins);
  • Maven (and eclipse plugin: m2e);
  • Subversion (and eclipse plugin: subclipse, found on the eclipse marketplace).
By integrating these three tools in Eclipse you will have a simple environment for applications development. To learn subversion you can use google code which offers free subversion repository.
Using maven, you can simply import many libraries so I recommend to learn these ones:
If you want to build a big application maybe you can find useful these ones:

These are all technologies or libraries that you'll most likely encounter at work.

Finally I recommend the usage of a distributed revision control system, so first learn Mercurial and, only after that, Git, because I think that mercurial is simpler than git but the latter is more powerful. In order to learn how to use these tools you can try googlecode, Bitbucket or GitHub.
In Eclipse I prefer using this eclipse plugin for mercurial and for Git i prefer using SourceTree that can be used for mercurial repositories, too.


That's all what I recommended to my friend, comments and suggestions are welcome.