My Experiences from ASCIIHack Wrocław

Last week I have attended event called “#asciihack Wroclaw” held by guys running HackKRK (http://www.hackkrk.com/) in Wrocław.
The idea of the event was to create an ASCII based game in a day, here’s how it look at similar event held in Kraków:
Most of the people attending were developing their games in Ruby, and only 2 teams decided to make them with Java. My team (me and Marcin Cichocki) decided to use very nice ASCII game library called AsciiPanel – https://github.com/trystan/AsciiPanel
Our game was called ASCII Invades and was a clone of “Space Invades” with few modifications to make development a little bit simpler. The source code of our game is available at github: https://github.com/wlk/ascii-invaders and this is the video of the gameplay:

Even though we didn’t won (the event wasn’t actually about winning) everyone had a good time. So thanks to the guys from Kraków for having an event like that in Wrocław.

Linux: remove files created before or after date

Very useful command if you want to remove files from current directory created  between certain dates, in this case files will be older than 3 days and newer than 35 days, we also filter out only files with “-type f parameter”

find . -mtime +3 -mtime -35 -type f | grep -v ‘/.’ | xargs rm

If you only want to list those files without removing them use this:

find . -mtime +3 -mtime -35 -type f | grep -v ‘/.’

Max Java String Length

I was wondering about what would be the maximum String length in Java, and the funny thing is that Java’s Strings are Arrays that are indexed by int.
So the maximum String length is

2^31 – 1

And this is true for any Java Array: