Welcome!
I'm Gediminas and you are in my sandbox, grab your favorite tool and come join me in the game!

Author Archive

Para-wallpaper

Saturday, December 10th, 2011

paraWallpaper_600
1366×768 (1.5 MB)
1680×1050 (2.8 MB)
1920×1080 (3.2 MB)
4288×2848 (16.7 MB)

Darth Vader in my City

Sunday, May 8th, 2011


Captured with: Nikon D7000
Footage edited with: AE, PremierPro.
Glass: Nikkor 24-70mm f/2.8G

We had a guest – Darth Vader in our city. A famous one. Well known to everybody who loves sci-fi ;)
May 14-15 is a day when the Lithuanicon’2011 will take place in Hotel “Holiday Inn”. Do not miss that! :)

This was a 2nd time when I used a tripod like a shoulder rig. I would side, it works like a charm!

More details about the Lithuanicon’2011 >> and >>

Few fotos from action:







Kaziukas from a new smile angle

Monday, March 7th, 2011

“<...>Kaziuko mugė (English: Kaziukas Fair, Polish: Kaziuk) is a large annual folk arts and crafts fair dating to the beginning of the 17th century. It was originally held at the two main markets in Vilnius, Lithuania, as well as in the city streets.” – (c) wikpedia

This year I took a different angle of view and photo-freezed all those little miracles:

Smile with us a little bit longer: http://goo.gl/XdMVz

GameJam2011

Sunday, February 6th, 2011

GameJam event comes in place and sprint of non-stop development begins. The theme for this year was “EXTINCTION”. Event location in Lithuania was POV office.
24 games were created. ~30 participants in Vilnius.

The list of games this year:
Colorful Greedy Populations – http://globalgamejam.org/2011/colorful-greedy-populations
Pigeons – http://globalgamejam.org/2011/pigeons
Supersize Exctinction – http://globalgamejam.org/2011/supersize-extinction
Dodopult – http://globalgamejam.org/2011/dodopult
Brain Extinction: Zombie… – http://globalgamejam.org/2011/brain-extinction-zombie-zombie-zombie
Detective – http://globalgamejam.org/2011/detective
Blooming Island – http://globalgamejam.org/2011/blooming-island
Extinct-O-Tanic – http://globalgamejam.org/2011/extinct-o-tanic
Multiply or Extinct – http://globalgamejam.org/2011/multiply-or-extinct
Slots of Death – http://globalgamejam.org/2011/slots-death
Snake Extinction – http://globalgamejam.org/2011/snake-extinction
Breedpong – http://globalgamejam.org/2011/breedpong

Photos from the event:

Also can be accessed at: http://goo.gl/rq3dR
Photos by M.P. at: http://goo.gl/VYWZO

Spring, lets Mock!

Tuesday, January 11th, 2011

How would you mock your services which are not mock-friendly?
Let’s introduce a real case (the bad one) with some preconditions:

1. You have a service where DAOs are wired at runtime based on the some conditions.

2. DAOs lookup API is private and not exposed to the caller.

In this case you will be blocked from mocking those DAOs because of such approach.
The solution I came up with was to tweak the Spring context by unregistering the target bean (service/dao or whatever), creating the mock and registering to the context back by aliasing, to make it retrievable as regular target bean. The concept code snippet from my routine by mocking DAO’s would be:

  1. protected <T extends IDao<?>> void mockDAO(Class<T> mockDaoClass) {
  2.         String mockedDaoClassName = mockDaoClass.getName();
  3.         GenericApplicationContext appContext = (GenericApplicationContext) applicationContext;
  4.         DefaultListableBeanFactory defaultBeanFactory = ((DefaultListableBeanFactory) appContext.getBeanFactory());
  5.  
  6.         T originalDAO = (T) appContext.getBean(mockedDaoClassName);
  7.         T mockedDao = EasyMock.createNiceMock(mockDaoClass);
  8.  
  9.         try {
  10.             appContext.removeBeanDefinition(mockedDaoClassName);
  11.             defaultBeanFactory.registerSingleton(mockedDaoClassName + DAO_ALIAS_ORIGINAL, originalDAO);
  12.             defaultBeanFactory.registerSingleton(mockedDaoClassName + DAO_ALIAS_MOCKED, mockedDao);
  13.         } catch (Exception e) {
  14.             fail(e.getMessage());
  15.         }
  16.  
  17.         defaultBeanFactory.registerAlias(mockedDaoClassName + DAO_ALIAS_MOCKED, mockedDaoClassName);
  18.         mockedDAOGroup.add(mockedDaoClassName);
  19.     }

And after you finish, restore the bean alias to the original one:

  1. @After
  2. public void revertMockedDAOInAppContext() {
  3.        for (String mockedDAOClassName : mockedDAOGroup) {
  4.           GenericApplicationContext appContext = (GenericApplicationContext) applicationContext;
  5.           DefaultListableBeanFactory defaultBeanFactory = ((DefaultListableBeanFactory) appContext
  6.                         .getBeanFactory());
  7.  
  8.           defaultBeanFactory.registerAlias(mockedDAOClassName + DAO_ALIAS_ORIGINAL, mockedDAOClassName);
  9.       }
  10.  
  11.           mockedDAOGroup.clear();
  12.     }

Yet another solution is to wrap the application context and override the #getBean operation. >> Check this out too <<.

Weekly Project: HudsonLifeSupport

Sunday, December 5th, 2010

In short

Arduino based box is connected through the USB with the software module which periodically checks the Hudson job status and triggers the appropriate LED on the box. Software module is based on Java and use RXTX module for communication with the Arduino board.

What is the Hudson CI server?

“<...>Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron.” More details about Hudson can be found on Hudson WIKI

Hardware Required

1. Arduino Board
2. 10-kilohm Potentiometer
3. 7 segments LED
4. Blue, Yellow, Red LED’s
5. Few meters of wire

Circuit

schema

Build story

This is a simple project to provide detailed build story steps. In short: potentiometer is connected to HudsonLifeSupport box to configure the timeout between the the status retrieval from Hudson server. While rotating the potentiometer 7 segment LED shows the number of time units to countdown. Moreover, during potentiometer rotation the HudsonBuildBox turns to the configuration mode. In case the potentiometer value stays the same for 5 seconds, countdown clock starts. When the countdown is close to zero HudsonBuildBox sends a signal to the software module to retrieve the build status for a configured target in Hudson CI server. Software module retrieves the build status thanks to Hudson XML API.

In case build is successful the BLUE light is triggered.
In case there’s failing unitests YELLOW light is triggered.
In case the build is failed due to compilation errors RED light is triggered.
In case Hudson server is not reachable for some reason (no connecion, server is down) all the LED’s turns to blinking mode until the Hudson server is up.

Code base & Arduino firmware will be posted to GoogleCode next week. Or if you can’t wait drop me an email with your question ;)

Photo story

Similar project: “Ultimate CI Visual feedback” from the “The Ultimate Wallboard” contest”.
Also a similar idea just more in style: