Kungle.de: One Month Later
August 28th, 200927. Juli – 28. August:
![]() |
![]() |
I hope you like the new design. I have spent some time with sketching, splicing and converting.
Kungle is now generating about 720.000 datasets every day. That’s enough information to provide you with interesting facts about “News”. You will see first results sometime in the coming weeks.
Kungle.de: New Subsystem
August 20th, 2009In trying to build an autonomous IA I added a new subsystem to Kungle.de.
The Housekeeper undertakes the task of system clean-up. It takes over a dozen process steps to do this job. It is carried out hourly.
Further updates
I have removed unnecessary js libraries which reduces the pagesize to 180kb. The average startup time should benefit from this optimization.
Next system updates will cover additional data aggregation methods and should be imperceptible for you.
Kungle.de: Render Bugfix
August 15th, 2009Due to a render bugfix for PS3 and IE6 first image code was also published.
The Results should improve over the time.
UPDATE: I have disabled the image code until completion.
Kungle.de News
August 14th, 2009This and next week I’m heavily loaded with business & finance. Therefore the Kungle.de development is halted. This is really distressing for me because I have planned to add the feature “related images” to my front page.
Another short term goal is the improvement of Kungle’s ability to read additional news sources. For example Mongolia, parts of Africa and South America aren’t accessible at the moment.
Long term goals (Next 30 Days)
- I will start to present additional data. Every News Entry receives an ID card with additional information. Don’t panic! The direct link to the article remains.
- The next phase of topic identification will be released. With enough collected indicators it is possible to use advanced algorithms.
Of course you can send me your comments and critics at any time to support@kungle.de or leave a comment here.
Kungle.de Sitemap update
August 13th, 2009I have updated the kungle.de sitemap without announcement.
I apologize for the trouble caused. Please update your bookmarks.
Scala’s simple strategy to reduce debugging costs: “Some” and “None”
August 9th, 2009Null Pointer Exceptions (NPEs) are most common runtime errors in Java (more than 500.000 results in Google). Most Java libraries are interspersed with methods returning null if the computation could not be finished. Invoking method calls on null raises Null Pointer Exceptions.
The best practice in Java to avoid such errors is a test against null.
if(aObject == null) {...
or pass the null test to another function.
For example, Instead of writing:
if(aResultString.equals(“literal”)) {
...
you write:
if(“literal”.equals(aResultString)) {
...
More than eleven years ago (beginning with the java era) a data type existed, avoiding the NPE problem:
data Maybe a = Nothing | Just a deriving (Eq, Ord, Read, Show)
A Haskell one-liner ported to Java could have prevented thousands of errors.
Why?
You cannot forget to test against None (unlike the null check) because this would raise a compile time error. Based on Haskells Maybe-Type, Scala defines the Some and None Type with:
final case class Some[+A](x: A) extends Option[A] ...
and
case object None extends Option[Nothing] ...
To test an Option Type against None you write:
val result = a getOrElse b..
If a is Some(_) than result is _. If result is None, than result is b. The value of result is therefore always defined!
Runtime Errors on my News Page Kungle.de so far
To Keep it short:
None
Running a Website With Scala and Lift
July 1st, 2009Scala is a modern, statically typed language. Its bytecode is Java-VM compatible and the design is influenced by languages like Haskell or Erlang.
Lift is a Web Framework written in Scala. Lift applications follow the View First pattern. The View First pattern defines a complete separation of presentation and logic.
Although with long experience in business, writing my first web application in Scala/Lift wasn’t an easy task. The combination of functional and object-oriented programming paradigms enables a wide range of new possibilities to compose your source code. It may take a while to understand wiki examples or library documentation, but writing your application in Scala has crucial advantages.
- Less code:
The elegant Type System and the modern Control Flow Structures reduce your code size dramatically. - A manageable toolchain:
Every new tool in your development environment means a new dependency in your application. Every update can cause trouble. To configure these tools you often implant new plugins in your ide which in turn complicates the build process. Typically you stop updating your development environment at a certain project stage.
In contrary, you can build your Lift applications with vi. In less than 100 lines of code you can create a complete web application!
The result is a fast and flexible development cycle.
You can visit my site at kungle.de. It is an application to identify relevant news. The news rating is statistically calculated by an adaptive network and updated every 30 minutes.
References:
Scala homepage: http://www.scala-lang.org/
Lift homepage: http://liftweb.net/
Introduction “View First Pattern”: http://wiki.liftweb.net/index.php/Lift_View_First
Configure the Apache Derby DB Network/Client Mode in 5 Minutes
May 24th, 2009It is very easy to use Apache Derby with the embedded JDBC driver. The disadvantage of this solution is that you can only open one connection at a time. If you are developing an application with data persistence, it is often helpful to monitor the database from a different application (e.g. the Data Source Explorer from Eclipse). If you are not interested in reading the administration guide (http://db.apache.org/derby/docs/dev/adminguide/) you can follow these simple steps to configure Derby for Network/Client Mode:
Step 1: Download Apache Derby
Download the bin distribution from: http://db.apache.org/derby/derby_downloads.html
Step 2: Install
Unpack the archive in an appropriate application directory.
Step 3: Create a database directory
For example: mkdir db_storage
Step 4: Set environment variables:
Set DERBY_HOME and add its bin directory to your system path. Also amend your CLATHPATH with the Derby jars.
For example on your mac:
export DERBY_HOME=/Users/.../Programme/db-derby-10.5.1.1-bin export PATH=$PATH:$DERBY_HOME/bin export CLASSPATH="$DERBY_HOME/lib/derbynet.jar:$DERBY_HOME/lib/derbytools.jar:\ $DERBY_HOME/lib/derbyclient.jar:$DERBY_HOME/lib/derby.jar:$CLASSPATH"
On Windows systems:
SET CLASSPATH="%DERBY_HOME%/lib/derbynet.jar;%DERBY_HOME%/lib/derbytools.jar;%DERBY_HOME%/lib/derbyclient.jar;%DERBY_HOME%/lib/derby.jar;%DERBY_HOME%;%CLASSPATH%"
(You probably want to put it in a script or batch.)
Step 5: Create the database
Open a terminal/shell/command prompt, change into the database directory (Step3) and start ij.
Type:
connect ‘jdbc:derby:simple;create=true’;
exit;
Step 6: Database Configuration
In your database directory create the file derby.properties.
Add the following lines:
derby.connection.requireAuthentication=TRUE derby.authentication.provider=BUILTIN derby.user.alice=mypass
Step 7: Start Derby
Type:
startNetworkServer
on your mac or
startNetworkServer.bat
on your Windows system.
Step 8: Create a user schema and add a table
Open a new terminal/shell/command prompt, change into the database directory and start ij.
Type:
CONNECT ‘jdbc:derby://localhost:1527/simple’ user ‘alice’ password ‘mypass’;
Create schema alice;
create table dummy (id int primary key, text varchar(20));
insert into dummy values (1, ‘eins’);
insert into dummy values (10, ‘zehn’);
insert into dummy values (100, ‘einhundert’);
exit;
Step 9: Connect from your IDE:
you can now use the derby jdbc network client driver to connect to your database.
Wecker(engl. alarm-clock) on ubuntu
April 20th, 2009You can use my small java application “wecker” on Ubuntu.

You can find it here: http://yousry.de/AppWecker.html.




