JavaForFun
12 years agoJavaPOS keyboard driver. Some improvements.
gumartinm [Wed, 11 Apr 2012 05:50:08 +0000 (07:50 +0200)]
JavaPOS keyboard driver. Some improvements.

1. claim
2. release
3. If I want to reach the second level of Exception Safety, it must be done
in the upper layer of my JavaPOS driver using try/finally not in the hardware layer.
4. Spanish comments that must be removed when the driver is finished (I am still working on it)

12 years agoWorking on my JavaPOS keyboard driver.
gumartinm [Tue, 10 Apr 2012 07:22:54 +0000 (09:22 +0200)]
Working on my JavaPOS keyboard driver.

Trying to reach second leven of exception safety.
Doubts about where I should reach that level. In the driver layer or in upper layers?

12 years agoJavaPOS claim method. Nice implementation.
gumartinm [Sat, 7 Apr 2012 22:34:53 +0000 (00:34 +0200)]
JavaPOS claim method. Nice implementation.

Locking system files in order to implement the detection of claimed devices
from different processes. Hopeffully it will work as expected...

12 years agoMessing around with JavaNIO Channels and Locks.
gumartinm [Wed, 4 Apr 2012 07:42:26 +0000 (09:42 +0200)]
Messing around with JavaNIO Channels and Locks.

Trying to use JavaNIO in the JavaPOS keyboard driver.

12 years agoJavaPOS HW driver class. Remove Executor.
gumartinm [Sun, 1 Apr 2012 22:53:36 +0000 (00:53 +0200)]
JavaPOS HW driver class. Remove Executor.

Changing thread implementation in JavaPOS HW driver class. I am going to use
a simple Thread class instead of the Executor interface.

12 years agoWorking on my JavaPOS keyboard driver.
gumartinm [Sun, 1 Apr 2012 21:13:39 +0000 (23:13 +0200)]
Working on my JavaPOS keyboard driver.

Next step: using java.nio (selector) because I do not want to block on the
file descriptor's read operation.

12 years agoMobiAds android application working smoothly.
gumartinm [Fri, 30 Mar 2012 05:28:22 +0000 (07:28 +0200)]
MobiAds android application working smoothly.

Just left to improve my code.

12 years agoMany modifications in my JavaPOS key board driver.
gumartinm [Thu, 29 Mar 2012 15:12:07 +0000 (17:12 +0200)]
Many modifications in my JavaPOS key board driver.

12 years agoAndroid MobiAds appliction working.
gumartinm [Wed, 21 Mar 2012 07:10:35 +0000 (08:10 +0100)]
Android MobiAds appliction working.

Just is left to fix some issues about closing the sqlite database.

12 years agoFirst steps implementing my MobiAds Android app.
gumartinm [Mon, 19 Mar 2012 23:06:35 +0000 (00:06 +0100)]
First steps implementing my MobiAds Android app.

12 years agoLatest changes in Android Test3 application.
gumartinm [Mon, 19 Mar 2012 23:05:06 +0000 (00:05 +0100)]
Latest changes in Android Test3 application.

Next step: implement my MobiAds Android application.

12 years agoTrying to launch my service from Test3Activity.
gumartinm [Wed, 7 Mar 2012 07:13:18 +0000 (08:13 +0100)]
Trying to launch my service from Test3Activity.
I need a notification which will launch the NextActivity.
It does not work at the moment.

12 years agoI keep working on my Android service.
gumartinm [Tue, 6 Mar 2012 06:57:11 +0000 (07:57 +0100)]
I keep working on my Android service.
Implementing started and bound.

12 years agoI am not able to bind with my service :(
gumartinm [Fri, 2 Mar 2012 07:09:57 +0000 (08:09 +0100)]
I am not able to bind with my service :(
Dunno what is going on. No more time to keep trying.
I will keep working this weekend. :(

12 years agoFirst steps with android services.
gumartinm [Thu, 1 Mar 2012 07:11:17 +0000 (08:11 +0100)]
First steps with android services.
Trying to create an android service running in a different process and
using IPC. I have no time but this looks like fun.

12 years agoNext step: create a background service.
gumartinm [Wed, 29 Feb 2012 07:00:22 +0000 (08:00 +0100)]
Next step: create a background service.

12 years agoIn case of any error remove from database indexer the id
gumartinm [Tue, 28 Feb 2012 06:50:06 +0000 (07:50 +0100)]
In case of any error remove from database indexer the id
and the file or the chunk stored before the error.

12 years agoNo time, no comments...
gumartinm [Tue, 28 Feb 2012 05:19:47 +0000 (06:19 +0100)]
No time, no comments...

12 years agoNew Android API (version 15) and firs steps downloading
gumartinm [Wed, 22 Feb 2012 06:46:02 +0000 (07:46 +0100)]
New Android API (version 15) and firs steps downloading
Ads from the server using HttpClient

12 years agoQuery and Insert in Sqlite database as a atomic operation.
gumartinm [Tue, 21 Feb 2012 06:39:02 +0000 (07:39 +0100)]
Query and Insert in Sqlite database as a atomic operation.
Storing files (the ads) using the internal storage.
Just is left: improve httpclient code for downloading files and
using a service instead of an Activity

12 years agoFinishing my provider. Query and insert working smoothly.
gumartinm [Mon, 20 Feb 2012 06:58:15 +0000 (07:58 +0100)]
Finishing my provider. Query and insert working smoothly.
Next step, store the downloaded ads as files on the file system.

12 years agoLast steps with my provider.
gumartinm [Fri, 17 Feb 2012 07:07:54 +0000 (08:07 +0100)]
Last steps with my provider.
It works smoothly.

12 years agoThe first insert in my database.
gumartinm [Mon, 13 Feb 2012 07:19:21 +0000 (08:19 +0100)]
The first insert in my database.

12 years agoHaving fun with my provider. It does not work yet...
gumartinm [Fri, 10 Feb 2012 07:00:10 +0000 (08:00 +0100)]
Having fun with my provider. It does not work yet...
Working with Intents is difficult...

12 years agoFinish my SQLite Provider.
gumartinm [Wed, 8 Feb 2012 06:33:40 +0000 (07:33 +0100)]
Finish my SQLite Provider.
Next step: to test it. I did not have time to run my code
probably it is not working right now.

12 years agoImplementing an Android Provider.
gumartinm [Tue, 7 Feb 2012 07:07:09 +0000 (08:07 +0100)]
Implementing an Android Provider.
I would like to have more time to spend working
on this...

12 years agoTesting a SQLite provider.
gumartinm [Thu, 2 Feb 2012 21:31:07 +0000 (22:31 +0100)]
Testing a SQLite provider.

12 years agoNo more playing with AndroidHttpClient
gumartinm [Tue, 31 Jan 2012 06:33:23 +0000 (07:33 +0100)]
No more playing with AndroidHttpClient
Next step: sqlite Android database.

12 years agoMoving JavaFork to: https://github.com/gumartinm/JavaTCPFork
gumartinm [Sun, 29 Jan 2012 16:05:20 +0000 (17:05 +0100)]
Moving JavaFork to: https://github.com/gumartinm/JavaTCPFork
Because it is getting bigger every day. :/

12 years agoRemoving tabs, I know this should have been done before but
gumartinm [Sun, 29 Jan 2012 06:42:50 +0000 (07:42 +0100)]
Removing tabs, I know this should have been done before but
I have just found out that must be done always.

12 years agoNo time for comments.
gumartinm [Sun, 29 Jan 2012 05:22:52 +0000 (06:22 +0100)]
No time for comments.
There are not many steps left to finish this project (I hope)

12 years agoNew modifications in Java TCP fork
gumartinm [Sun, 29 Jan 2012 05:04:56 +0000 (06:04 +0100)]
New modifications in Java TCP fork

12 years agoWorking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:29:01 +0000 (02:29 +0100)]
Working on Java TCP fork.

12 years agoI keep working on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:28:11 +0000 (02:28 +0100)]
I keep working on Java TCP fork.

12 years agoI keep woking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:26:47 +0000 (02:26 +0100)]
I keep woking on Java TCP fork.
It is being harder than I thought.

12 years agoWorking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:24:17 +0000 (02:24 +0100)]
Working on Java TCP fork.
It is being harder than I thought...

12 years agoSorry, committing forgotten changes...
gumartinm [Thu, 26 Jan 2012 23:54:04 +0000 (00:54 +0100)]
Sorry, committing forgotten changes...
Just deleting files, there is nothing important about this commit.

12 years agoMany improvements in my remote TCP fork for Java
gumartinm [Thu, 26 Jan 2012 23:49:59 +0000 (00:49 +0100)]
Many improvements in my remote TCP fork for Java
I keep working on it
Next steps cleaning up the code and maybe using execve instead of system.

12 years agoMore tests using AndroidHttpClient
gumartinm [Thu, 26 Jan 2012 06:28:08 +0000 (07:28 +0100)]
More tests using AndroidHttpClient
2 requests at the same moment by default

12 years agoSIGTERM handler for Java fork process.
gumartinm [Wed, 18 Jan 2012 06:58:29 +0000 (07:58 +0100)]
SIGTERM handler for Java fork process.

12 years agoLaunch commands without using fork from the JVM.
gumartinm [Wed, 18 Jan 2012 01:19:01 +0000 (02:19 +0100)]
Launch commands without using fork from the JVM.
Sometimes you may receive a nice OutofMemory exception because of the overcommitting memory allocation,
although you could have still enough memory.
Issues related to fork and virtual memory.
See: http://developers.sun.com/solaris/articles/subprocess/subprocess.html

12 years agoLast change using HttpClient, I keep reading the API :(
gumartinm [Wed, 18 Jan 2012 00:46:40 +0000 (01:46 +0100)]
Last change using HttpClient, I keep reading the API :(

12 years agoNew class PrinterLogicalHelper replacing PrinterHelper
gumartinm [Sat, 14 Jan 2012 13:52:05 +0000 (14:52 +0100)]
New class PrinterLogicalHelper replacing PrinterHelper

12 years agoImproving a bit the HttpClient code. I keep reading about the API.
gumartinm [Thu, 5 Jan 2012 07:11:29 +0000 (08:11 +0100)]
Improving a bit the HttpClient code. I keep reading about the API.
I hope to finish this in this weekend.
I am committing white spaces, sorry for that. I am in a hurry...

12 years agoImproving the Log in main Activity. Now make more sense.
gumartinm [Wed, 4 Jan 2012 06:02:14 +0000 (07:02 +0100)]
Improving the Log in main Activity. Now make more sense.
Trying to find out how to use a response handler for HttpClient
Work in progress.
By the way, I am committing white spaces. Sorry for that but I am in a hurry.

12 years agoWorking with HttpClient and multiple threads.
gumartinm [Tue, 3 Jan 2012 06:22:37 +0000 (07:22 +0100)]
Working with HttpClient and multiple threads.
Work in progress. It is not working right now.

12 years agoExamples with Executors (Java Concurrent library)
gumartinm [Sun, 1 Jan 2012 09:45:12 +0000 (10:45 +0100)]
Examples with Executors (Java Concurrent library)

12 years agoAnother nice example using Advices. You can define an Advice without a PointCut method.
gumartinm [Sun, 1 Jan 2012 07:17:31 +0000 (08:17 +0100)]
Another nice example using Advices. You can define an Advice without a PointCut method.
The Advice itself may define the PointCut.

12 years agoSome nice examples using threads without executors.
gumartinm [Fri, 30 Dec 2011 05:58:14 +0000 (06:58 +0100)]
Some nice examples using threads without executors.

12 years agoExecutor Thread Poll with a tasks max number.
gumartinm [Wed, 28 Dec 2011 06:22:53 +0000 (07:22 +0100)]
Executor Thread Poll with a tasks max number.
Next step: using SQLITE

12 years ago1. Parsing JSON data from a RESTful Web Service. DONE.
gumartinm [Tue, 27 Dec 2011 06:21:36 +0000 (07:21 +0100)]
1. Parsing JSON data from a RESTful Web Service. DONE.
2. Download file. DONE

Next steps: we need to use the SQLITE database. There, we are going to store
the index for every downloaded file. With the advertisement id retrieved from
the JSON RESTful response, we have a unique identifier for the downloaded ad.
We are going to use that id to find out if we have to download a file because
we do not have it on the mobile or we can skip the download because it was already
downloaded.

12 years agoNew Test, same as Test 2 but using Java executors instead of Android AsyncTask.
gumartinm [Thu, 22 Dec 2011 05:46:42 +0000 (06:46 +0100)]
New Test, same as Test 2 but using Java executors instead of Android AsyncTask.

1. The onPostExecute method from AsyncTask is executed in the UI thread and I do not want that behaviour,
so it seems the best option to lauch a new Thread using without using the AsyncTask

2. First steps retrieving the JSON data from sent by the RESTful Web Service

12 years agoFirst steps obtaining user location
gumartinm [Tue, 20 Dec 2011 23:11:11 +0000 (00:11 +0100)]
First steps obtaining user location
The next one will be to use a Service

12 years agoFinal steps in Log in Activity.
gumartinm [Thu, 15 Dec 2011 21:23:45 +0000 (22:23 +0100)]
Final steps in Log in Activity.
Using DialogFragment classes

12 years agoRemoving Log in activity from Stack once started the main activity
gumartinm [Wed, 14 Dec 2011 03:35:17 +0000 (04:35 +0100)]
Removing Log in activity from Stack once started the main activity

12 years agoFirst steps launching the main activity.
gumartinm [Wed, 14 Dec 2011 03:25:23 +0000 (04:25 +0100)]
First steps launching the main activity.
CookieManager working smoothly

12 years agoFinally I will not use AsyncTask for the log in Activity
gumartinm [Wed, 14 Dec 2011 03:11:49 +0000 (04:11 +0100)]
Finally I will not use AsyncTask for the log in Activity
because must not be an asynchronous activity.

12 years agoAsyncTask working: launching a new Task and storing the cookie
gumartinm [Wed, 14 Dec 2011 00:01:48 +0000 (01:01 +0100)]
AsyncTask working: launching a new Task and storing the cookie
Test2: DefaultHttpClient, for the new Android version it is a must to chage
the default policy about threads using sockets (the UI must be as fast as possible)

12 years agoConnection to RESTful Web Service authentication
gumartinm [Mon, 12 Dec 2011 06:59:14 +0000 (07:59 +0100)]
Connection to RESTful Web Service authentication

13 years agoFirst HTTP async client connecting to my RESTful Web Service
gumartinm [Fri, 25 Nov 2011 01:11:18 +0000 (02:11 +0100)]
First HTTP async client connecting to my RESTful Web Service

13 years agoNo time for comments.
gumartinm [Thu, 24 Nov 2011 01:57:22 +0000 (02:57 +0100)]
No time for comments.
Trying to establish a http connection and getting weird exception  :(

13 years agoFirst program with more than 1 activity.
gumartinm [Thu, 24 Nov 2011 00:53:07 +0000 (01:53 +0100)]
First program with more than 1 activity.
First steps with a http connection. Trying to use my WebService

13 years agoFirst steps with Android.
gumartinm [Wed, 23 Nov 2011 02:22:56 +0000 (03:22 +0100)]
First steps with Android.
Playing with activities and tasks.

13 years agoCreating new Android directory and
gumartinm [Tue, 22 Nov 2011 03:49:34 +0000 (04:49 +0100)]
Creating new Android directory and
moving old AndroidTetris directory into this new one.

13 years agoCode refactoring (adding some nice final following the PMD
gumartinm [Sun, 20 Nov 2011 23:28:48 +0000 (00:28 +0100)]
Code refactoring (adding some nice final following the PMD
recomendations)
Using java.concurrent for the thread implementation. I am using right
now Executors.

13 years agoCleaning up the code and calculating the screen center
gumartinm [Sun, 20 Nov 2011 17:31:56 +0000 (18:31 +0100)]
Cleaning up the code and calculating the screen center

13 years agoJust rest to finish the score and levels.
gumartinm [Fri, 18 Nov 2011 02:39:37 +0000 (03:39 +0100)]
Just rest to finish the score and levels.
Besides I want to improve the code and use java.concurrent

13 years agoCleaning useless code and adding some new collisions.
gumartinm [Wed, 16 Nov 2011 02:10:16 +0000 (03:10 +0100)]
Cleaning useless code and adding some new collisions.

13 years agoRetrieving the the key event and moving the blocks without trouble.
gumartinm [Wed, 16 Nov 2011 00:56:09 +0000 (01:56 +0100)]
Retrieving the the key event and moving the blocks without trouble.
TODO: To use java.concurrent instead of the "classic" Thread class.

13 years agoFinally onKeyDown method in DrawView class is working :)
gumartinm [Tue, 15 Nov 2011 02:26:13 +0000 (03:26 +0100)]
Finally onKeyDown method in DrawView class is working  :)
Don't forget again to use the setFocusable methods. Apparently they
are very useful  :]

13 years agoFixing packages.
gumartinm [Thu, 10 Nov 2011 22:52:14 +0000 (23:52 +0100)]
Fixing packages.
This code came from a personal project, and some paths did not
match with the current configuration. Now they match and this
example should run smoothly.

13 years agoWeaving with ASPECTJ libraries.
gumartinm [Thu, 10 Nov 2011 22:45:44 +0000 (23:45 +0100)]
Weaving with ASPECTJ libraries.
With this configuration we are not relying on the SPRING AOP
libraries. So, I guess, this is the SPRING ASPECTJ configuration,
the rest of them are SPRING AOP 2.0/1.2 with Aspects.

13 years agoSPRING AOP is a complete mess.
gumartinm [Thu, 10 Nov 2011 04:33:19 +0000 (05:33 +0100)]
SPRING AOP is a complete mess.

13 years agoAdding code to execute other custom annotations.
gumartinm [Wed, 9 Nov 2011 18:44:00 +0000 (19:44 +0100)]
Adding code to execute other custom annotations.
You can see here this powerful feature called Java Annotations.

13 years agoA very nice example about custom annotation in Spring.
gumartinm [Wed, 9 Nov 2011 17:37:45 +0000 (18:37 +0100)]
A very nice example about custom annotation in Spring.
Bonus: really nice maven pom files configuration.

13 years agoFirst steps with my own Spring annotations handler.
gumartinm [Wed, 9 Nov 2011 15:49:02 +0000 (16:49 +0100)]
First steps with my own Spring annotations handler.

13 years agoFixing wrong comment
gumartinm [Wed, 9 Nov 2011 15:24:21 +0000 (16:24 +0100)]
Fixing wrong comment

13 years agoMessing around with Spring.
gumartinm [Wed, 9 Nov 2011 15:07:18 +0000 (16:07 +0100)]
Messing around with Spring.
Annotations handler and programming with Aspects.
Could be useful or not, but at least it seems interesting.

13 years agoSome changes left :S
gumartinm [Sun, 6 Nov 2011 23:32:21 +0000 (00:32 +0100)]
Some changes left :S
This is a personal project so, I do whatever I want XD.
In the real world I would save this commit for another moment.

13 years agoCleaning up the code. Many, many things are left.
gumartinm [Sun, 6 Nov 2011 23:24:20 +0000 (00:24 +0100)]
Cleaning up the code. Many, many things are left.
Step by step I will get the goal, my first Tetris in Android  :)

13 years agoSome nice comments in Piece and Tile classes
gumartinm [Sun, 6 Nov 2011 23:13:39 +0000 (00:13 +0100)]
Some nice comments in Piece and Tile classes

13 years agoFix bottom boundary
gumartinm [Sun, 6 Nov 2011 21:37:56 +0000 (22:37 +0100)]
Fix bottom boundary

13 years agoFirst steps checking the collisions :/
gumartinm [Sun, 6 Nov 2011 21:26:23 +0000 (22:26 +0100)]
First steps checking the collisions :/

13 years agoCurrent and next piece first steps.
gumartinm [Sun, 6 Nov 2011 20:10:01 +0000 (21:10 +0100)]
Current and next piece first steps.

13 years agoFirst steps drawing pieces and using enum classes.
gumartinm [Sun, 6 Nov 2011 02:58:17 +0000 (03:58 +0100)]
First steps drawing pieces and using enum classes.
It works!!

13 years agoEnum classes for Tiles and Pieces.
gumartinm [Sun, 6 Nov 2011 01:11:10 +0000 (02:11 +0100)]
Enum classes for Tiles and Pieces.
They could be useful.

13 years agoTiles, first steps. Without effects, raw colors.
gumartinm [Sat, 5 Nov 2011 20:21:22 +0000 (21:21 +0100)]
Tiles, first steps. Without effects, raw colors.

13 years agoFirst thread working. TODO: java.util.concurrent
gumartinm [Fri, 4 Nov 2011 01:38:04 +0000 (02:38 +0100)]
First thread working. TODO: java.util.concurrent

13 years agoTrying some nasty things with the thread implementation.
gumartinm [Thu, 3 Nov 2011 01:50:40 +0000 (02:50 +0100)]
Trying some nasty things with the thread implementation.
The Google sample seems wrong... Why don't use java.util.concurrent?

13 years agoTrying game loop with thread implementation
gumartinm [Thu, 3 Nov 2011 00:29:33 +0000 (01:29 +0100)]
Trying game loop with thread implementation

13 years agoFirst steps with Android
gumartinm [Wed, 2 Nov 2011 01:43:13 +0000 (02:43 +0100)]
First steps with Android

13 years agoSome nice methods to read and write text files
gumartinm [Thu, 20 Oct 2011 00:41:55 +0000 (02:41 +0200)]
Some nice methods to read and write text files

Change-Id: I6b4ae34d766c7fbf57f0bdc71fdd1b75b8115a8f

13 years agoNew .gitignore file
gumartinm [Sun, 16 Oct 2011 17:03:40 +0000 (19:03 +0200)]
New .gitignore file

13 years agoJavaPOS KeyBoardDriver
gumartinm [Sun, 16 Oct 2011 16:53:41 +0000 (18:53 +0200)]
JavaPOS KeyBoardDriver

13 years agoMerge branch 'master' of https://gumartinm@github.com/gumartinm/JavaForFun.git
gumartinm [Wed, 12 Oct 2011 18:25:03 +0000 (20:25 +0200)]
Merge branch 'master' of https://gumartinm@github.com/gumartinm/JavaForFun.git

13 years agoEffective Java 2nd Edition:
gumartinm [Wed, 12 Oct 2011 18:22:15 +0000 (20:22 +0200)]
Effective Java 2nd Edition:
Item 27

Change-Id: Idc2ff6e5e807e32961a9da4e7531b8133c7917c0
Signed-off-by: gumartinm <gu.martinm@gmail.com>
13 years agoEffective Java 2nd Edition:
gumartinm [Wed, 12 Oct 2011 17:50:05 +0000 (19:50 +0200)]
Effective Java 2nd Edition:
Item 27

Change-Id: Idc2ff6e5e807e32961a9da4e7531b8133c7917c0
Signed-off-by: gumartinm <gu.martinm@gmail.com>
13 years agofirst commit
Gustavo Martin Morcuende [Wed, 12 Oct 2011 13:10:27 +0000 (15:10 +0200)]
first commit