Tannesch - Quo Vadis Eriskirch

Posted by Mike Haller on Monday, August 18. 2008 at 12:00 in Private

A few years ago in 2005, there was a citizens' initiative to get noise protection against a newly built federal highway. The initiative was called Bürgerinitiative Bürger für Lärmschutz and was successful, due to the energy and passion of the involved people working towards the goal. We got noise protection. It's not perfect, but much better than what has been initially planned by the town.

Now, three years later, our town once again plans something with which some people do not agree. Especially the people living next to the newly planned industrial area are concerned. And once again, there's a citizens' initiative, and this time it's called Interessengemeinschaft Quo Vadis Eriskirch. Lead by Ralf and Manfred, the group protests against the industrial zone and collected 232 signatures from supporting citizens.

We are against an industrial zone in our neighbourhood!





Sender Policy Framework (SPF)

Posted by Mike Haller on Sunday, August 17. 2008 at 15:51 in Hosting

A few weeks ago I wanted to make all my hosted domains SPF-enabled. Sender Policy Framework is a great way to prevent forged mails. With SPF, mail servers check whether a mail is allowed to be sent by a specific server.

I'm going to be restrictive here and only allow our mail server to send mails from our hosted domains. This will for example stop spam from sdfjnsd@mydomain.com to mike@mydomain.com. Of course, that's not the only thing which will be made a lot harder for spammers. The domain itself is protected much better and spammers seem to refuse misusing domains with SPF information.

Before activating it on all life domains, I took a private domain to test the configuration with. I changed the domain name server zone file for mhaller.de to contain the following TXT resource record:

Distinct list of embedded entities

Posted by Mike Haller on Saturday, August 9. 2008 at 06:39 in Java
With the Java Persistence API (JPA), you can create embeddable entities, which will be persisted within the table of the container object instead of a relation. Suppose you've got a Customer class and an embeddable Address class like this:

package example;
@Entity
public class Customer {
 private String name;
 @Embedded
 private Address address;
}

package example;
@Embeddable
public class Address {
 private String zip;
 private String city;
}


You will eventually end up with the following table:
CUSTOMER
NAME, ZIP, CITY


My first naive approach querying the embeddable entity to get a list of all cities did not work:
SELECT DISTINCT c.city FROM Customer c


The solution is not really straight forward and intuitive, but still rather easy.
You need to add a constructor with all the fields and use the NEW operator of JPQL:
SELECT DISTINCT NEW example.Address(c.zip,c.city) FROM Customer c


Open Flash Chart

Posted by Mike Haller on Friday, August 8. 2008 at 06:12 in Java

For a private project i'm working now and then, i came across a nice library called Open Flash Chart (OFC). It let's me create nice looking charts with low effort. After hacking Maven and hooking into the event dispatcher for goals, the tool is persisting the data collected from the local Maven builds of developers. A web application aggregates the data and uses OFC to display graphs. It's planned to provide more data graphs, such as count of tests, successes, failures and skipped tests, coverage data etc.



This is a graph showing the durations of the surefire:test goal on a sample project. Hovering over the dots will show a tooltip with additional information.

Version 1 of OFC is using a proprietary data format which looks like this:
&title=com.smartwerkz.commons&
&tool_tip=Build+#x_label#+took+&val;ms&
&x_label_style=10,0x80a033,2&
&y_legend=Goal+surefire:test,10,#736AFF&
&y_max=4207&
&line_hollow=2,Build+Time+[ms],10,4&
&values=3825,1222,948,928,926,1002&


Upcoming Version 2 of OFC is going to use JSON as the data format, which will hopefully be more clearer to use and easier to generate.


50% vacation done

Posted by Mike Haller on Sunday, August 3. 2008 at 16:24 in Private
So, it's Sunday, great weather and half of my holiday is done. There are some new pictures over at my flickr.com, like the ones from Abenteuerpark Immenstaad or from a hike in Weingarten.

What I've done last week, besides chilling and sunbathing: going to a funeral, climbing in the woods, Family hiking, shopping, visiting Kulturufer, doing an iPhone Firmware Upgrade to 2.0 (that sucked - i lost my contacts and had to go back to a one year old backup). So, there's plenty of stuff left to do next week :-)

Eiszapfen im Sommer

About

My name is Mike Haller and I'm a software developer and architect at Innovations Software Technology in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development.

Quicksearch