Showing posts from 2013

2014 Logging Frameworks You Would Like to Work With

In my previous post I have given an overview about Java's logging state as of January 2014 In this post I want to recommend which libraries to use for your java project. Main Logging Frameworks Most notable frameworks in this section include:  Java Util Logging ,  Log4j ,  Logback ,  Log4j2 I will go over them one by one: Java Util Logging  - This is Java's official logging framework it has been there since 2002 and is mostly copied from log4j which have released their library two years before (2000). no significant updates have been released to the Java logging component and it is mostly abandoned (although it still resides in the rt.jar core java files), the brave developers who had tried using it report a complicated logging framework which needs a good overhaul and the general advice is to stay away from it! Log4j  - No need to introduce Log4j which is the most used logging framework, and is with us for over 14 years!, log4j is a very robust framework,

2014 Overview of Logging in Java

Why do you even need a logging framework [In a nutshell] ? Logging severity (Debug / Info / Error etc) Different loggers for different tasks Logging configuration in a single XML instead of all over your application Lots of other reasons Sorry, it is so obvious to me that I can't elaborate here any further What sorts of logging components are there ? Main Logging frameworks (use these to do the actual logging [log4j, logback etc]) Logging APIs (Facade): Due to several different logging frameworks, a need for a unified API has risen, and of course now there are several different "unified" APIs. Logging Parsers : Components which enable us to read log streams (files, socket etc) conveniently as well as introduce advanced searching & filtering within the log files Main Logging Frameworks The main logging frameworks is what people usually refer to when talking about in app logging, and I suggest a rough division in this department: Robust

Best Lossless Image Size Reduction Freewares

Lossless image reduction means reducing a given image's size without losing quality at all! This should be done by default, the truth is that we shouldn't have external tools to reduce size without losing anything because the current software we use to create the original images should apply lossless image reduction techniques - it is lossless so no quality is lost what so ever! Anyway, we live in a non perfect world, so we need these tools. In my post i want to write about the best tools for this task. Requirements: 1. Lossless image size reduction. 2. Support for all file formats (at least png, gif & jpg). 3. Easy to use user interface . 4. Option to be recursive = option to submit to the tool a directory and it will convert all of the images it contains (and all of the images contained in any sub directory etc) 5. Option to overwrite original images. 6. Free After lots of googling around I found the following as the best tools to use,

The best way to join Strings in Java

Joining strings in java is quite simple, just take two strings and add them using the "+" sign as follows: String s = "One" + " Two"; Which results in: s == "One Two". The thing is that String objects in Java are immutable, so you can't actually change any string, which means that in the following example: String a = "One"; String x = a; in memory now: (a == x) a = a + " Two";  Will result in the following in-memory statement:  ( a != x ) which is a reason for many many bugs in many programs. Another side effect of immutable objects is that every "change" of the string will actually create a new one, resulting in lots of dead objects which will later on be ditched by the garabage collector, but in the meanwhile they consume memory, and will use CPU to collect them. StringBuilder / StringBuffer The simplest solution supplied by Java is using StringBuilder / StringBuffer (Strin

Launch the perfect set of hundreds of offline free games with a launcher in under 5 minutes

If you want to play good games, but don't want to play online games, and don't want to waste your time for searching games one after the other till you find a decent and free good game then just read this post and I will guide you to the perfect and effortless set of free games you can obtain in 5 minutes. These games will fit any person with the following requirements from his games: Only free games Don't care about graphics (So if a game has good playability you want to play it even if it is 20 years old) Hundreds of games to pick from Obtain them in 5 minutes Have a nice launcher where each game will have a picture and you only need to click the picture to play the game The answer is simple my friend, you are looking for a good console games emulator with a beautiful launcher. Emulators, emulate a specific gaming machine so, for example, you can download a Nintendo (NES) emulator and play all of the Nintendo original games. But still you will nee

Tools for Wickets Development with IntelliJ's Idea

One of Java's most popular web frameworks is Wicket. If you want to start developing Wickets let me guide you through the installation of 2 plugins which will make your development much more productive. I will write the steps to install these plugins, but I will write them in a short way, if you want a more detailed guide please refer to this page: Installing Wicket Source 1. IntelliJ --> Settings --> Plugins --> Browse Repositories --> Search for "Wicket" --> Install Wicket Forge & Wicket Source. 2. Restart IntelliJ 2.5. You have installed the 2 plugins and you are set to go (the next steps are highly recommended but optional) - WicketForge lets IntelliJ understand Wicket (you can now start a new Wicket file etc), WicketSource lets IntelliJ understand the html wicket ids, which means that you can click on a wicket:id and jump to it's definition in the code / html. The following steps are optional and will enable your browser to

Start Working with AutoIT

I have decided I needed a quick GUI creator which can create a small exe file displaying the GUI, with no system dependencies like a .NET framework or Java runtime. What options do I have for a Quick GUI Creator? Maybe there are many options I am not aware of, but after extensive searching I found these two: Auto Hot keys AutoIT (Saw some recommendations to try Delphi or Pascal for this task but I passed) Both tools began from the same code source, autohotkeys branched off and continued to be open source while AutoIT is more commercial. I have compared the two (well, not actually compared, just google'd out other's comparisons) and found out that the AutoHotKeys is slightly better and is more open sourced (which makes it the better solution) but lacks in one field which is crucial for me - the script syntax is awful!  That tipped the balance (as a programmer i couldn't stand AHK's syntax) so I chose AutoIT. How to get Started with AutoI

Quick GUI Creation

I am working on a project of recreating an old game of Sierra called King's Quest IV - The Perils of Rosella in 3d , I am not working alone, we are a whole team working together. We are using a gaming engine called AGS, which helps in creating games - especially quest games, anyway, this engine enables us to also play video files, but it supports natively only the compressed Theora format, which is an open source video codec which is the equivalent of DIVX just open source (Later on, Google bought the rights for this codec, and have [graded it and are actively using it, but they have left the previous version for the joy of the public). So our graphic designer has created several video files which then she wanted to convert to the Theora format, but apparently it is hard to find a decent codec converter which doesn't need a license in computer science in order to just use it, why? because it is an open source project so anybody who wants to use it needs to be an IT ge

Amazing PHP site generator

Let's say I have a Database with data. Now, lets assume I want to have a site around this database, which users and admins can access and have access to the data using nice GUI'd tables with the specific data I want each group to be exposed to. When I think of designing such a site, I think of the following requirements: The site must be lightweight , there is no need for any heavy "Engine" here. The site should be built using good coding practices, so I want it to have an MVC engine. I want not to worry about the sql queries, I want not to worry about sql injection, I want DB schema changes to be minor (coding wise) in short - I want an ORM . I want some CRUD functionality I want a nice GUI which means using a lightweight Templating system like Smarty which will preferably use great JS libraries , Twitter Bootstrap, font Awesome etc . One would think I am asking for too much - well, nothing is too much, it just will take a lot of time to develop th