Skip to main content

Posts

Showing posts from 2006

Open and closed Source voting

In several countries voices are raised against the use of voting computers. The latest objection was raised by the CCC in germany. According to security analysis, voting machines are insecure, and allow for untracable manipulation of voting results and voter privacy. The software can be exchanged and votes could be manipulated without any traces. The systems used for voting in Germany are very similar to those in the Nederlands. Similar objects were raised before in this country. Andy Müller Maguhn wrote: Die Bauartzulassung der Nedap-Wahlcomputer ist nach den nunmehr vorliegenden Forschungsresultaten hinfällig. Das Bundesinnenministerium muss daher die Zulassung entsprechend § 3 Absatz 3 der Bundeswahlgeräteverordnung widerrufen It does not surprise that similar story are percepted in the USA, where some rumour around the company "Diebold Election Systems" raised, after a group of college students found some memos about the poor security of the system from developers of this

Java Locking

Here are some nice Articles about Double checked locking, the singleton pattern and the friendly comepetition between people doing VM level locking (aka Synchronized) and Java locking (1.5 Reentrant locks) Double Checked Locking 1 Double Checked Locking 2 Why is ReentrantLock faster than synchronized ?

AntiPattern: AbstractionInversion

After trying to understand the AbstractionInversion antipattern, I wonder if this pattern is really a unique pattern and not actually more like a combination of other, more abstract AntiPatterns. Is AbstractionInversion a special case of code duplication, where a dependend class not only duplicates effort, but also escapes its level in a stack of abstracness layers inside an application? It seems to be common to most examples I have read so far, that AbstractionInversion occurs in conjunction with code/concept duplication in two dependent modules with diffrent levels of abstraction. To explain my thought I will rely on the ADA RendezVous example mentioned here. If i.e. a mutex is implemented by using the RendezVous concept, a mutex concept is actually implemented by using something at least as complex as a mutex, and code is likely duplicated. Furthermore the one-class-one responsibility rule seems violated in the above example, as the abstraction to the gory details of the model re

The purpose of the MOCK

In response to a much nicer blog entry, that can be found here . There are actually several distinct "tests" that make up usual unit tests, among them two that really do stand out: one kind of testing to test method flows, one to test some sort of computation. Mock objects are for the purpose of testing method flows. A method flow is a series of message transmissions to dependent objects. The control flow logic inside the method(the ifs and whiles) will alter the flow in repsonse to the parameters of the method call parameters passed by calling the method under test, depending on the state of the object that contains the method under test and the return values of the external method calls(aka responses to the messages sent). There should be one test method for every branch of an if statement, and usuale some sort of mock control objects in the mock framework will handle loop checking. BTW: I partly use message transmission instead of method invocation to include other kind

Free Programming Books

I stumbled over some not so common class of free programming books: Although these books are not the most recent spiffy Ajax/Java books, the are worth reading: A nice book about Mozilla programming Some Free Smalltalk books(yes smalltalk ain't dead yet)

Maven Changelog plugin

I tried to use the maven changelog plugin, as described here but maven complained that it could not find the plugin! That was due to the fact this plugin is not yet stable, this wasnt mentioned anywhere I looked. To enable the plugin you must first add the apache maven snapshot repository, read this site to find out how.

AntiPatterns

I just realized some nice Articles in the English and German wikipedia about anti patterns . I was well aware of the existence of software engineering related anti patterns, but I read about two other categories of anti patterns, well explained in the afore mentioned articles: organizational&project management anti-patterns and Meta-(anti)-Patterns I found it both enlightening and shocking to learn about these patterns. Nevertheless the most funniest were IMHO: Programmer Experience Clumping Fear of success Management by numbers Single head of knowledge Sources: Programmer Experience Clumping source German Wiki Article: AntiPattern English Article: AntiPattern

Maven Source-Formatting/-Metrics

I needed to add source code formatting and some code metrics to my maven based project. These are the places on the web where I found help. I wanted to get the Jalopy plugin to format my source code, and promptly failed to get the snaptshots from the mojo projects without the help of this resource, this resources helped me to get the codehaus mojo snapshot plugins: What to put in settings.xml after that I could simply run: mvn -Pcodehaus jalopy:format As I was bothered by the command line cluttering by -Pcodehaus, I actived the profile by adding <activeByDefault/> into the activation tag in the profile definiton for the "codehaus" profile. Now .... mvn jalopy:format ... and voila! Jalopy formatted my sources. See also: maven Jalopy plugin Very helpful for the "other" reports was an interesting java world article... I also wanted JDepend to check my project, to I added Jdepend .

my first migration of a legacy project to maven 2

I had to do migrate a legacy webstart swing application to the maven build process. The app was build into several(signed) jars from a single source directory(containing a mix of java files, property files and html help files). The app was deployed with webstart. Sometimes the pom file reference and settings file reference were helpful... Important is the introduction to maven lifecycles . Interresting is the fact, that maven uses plexus container for IoC, reading the comparison, I figured I should try using plexus in another project... These are the steps that needed to be done to migrate the project: 1. Install 3rd party jars into the local repository - I checked in this repository 2. use the maven2 jar plugin to create a manifest wich points out the main class: Maven2 Jar plugin 3. use the jar plugin to sign the jar - use the maven keytool plugin to create the keystore automatically after reading this page . - add the jar plugin sign goal 4. use the assembly plugin to creat a a

Maven 2 3rd Party Jars

Maven: Installing 3rd Party JARs This page states that one should install a file into the local repository; But another option I found more useful in a team development environment is to deploy 3rd party jars to a maven repository in the companies network via ssh/scp. If multiple developers work on the project it is advisable to have a linux box somewhere with an ssh server installed and apache running. Just configure this server in your settings.xml and define the deployment to use that server. All 3rd party jars, the project website/reports and the project itself can then be deployd to that server with this: mvn deploy:deploy-file -DgroupId= -DartifactId= -Dversion= -Dpackaging= -Dfile= -DrepositoryId= -Durl= Taken from here. I truely love maven ;-)