Growing Object-Oriented Software, Guided by Tests (Freeman/Pryce)

Nachdem “Growing Object-Oriented Software, Guided by Tests” von Steve Freeman und Nat Pryce bei den Ruby Rogues besprochen wurde (siehe 068 RR Book Club: Growing Object Oriented Software Guided by Tests), war mir klar, dass ich es auch lesen musste. Und ich muss sagen: es hat sich definitiv gelohnt. Es ist das beste Buch zum [...]

Externalize Java helper methods with access to the service pipeline of webMethods Integration Server

As I’ve mentioned earlier, I like to re-use my existing code whenever possible (and if not possible I’ll try to find a way ). When writing Java Services in webMethods’ Integration Server, I wanted to use an existing method that provides easy access and type safety when working with the service pipeline (i.e. interface IData). [...]

Re-use your own existing Java code in a Java Service in webMethods Integration Server

Modularization is an important concept of programming. So, when I wanted to create a Java Service in webMethods’ Integration Server today, I wanted to re-use my existing Java code that already provided the feature I wanted to publish as a Service. However, this is not as easy as it sounds Here are the steps you [...]

Oracle error ORA-01000 (maximum open cursors exceeded) occurs when querying via ODBC with C#

A colleague of mine had this interesting problem today: OdbcDataAdapter ORA-01000. When querying an Oracle database via ODBC from C# using the following code, an Oracle error ORA-01000: maximum open cursors exceeded occured after a certain number of iterations (300 in our case): static void Main(string[] args) {     var connectionString = "DSN=MYDB;UID=user;PWD=pass";   [...]

How to add a local calendar to the Android 2.2 Froyo emulator

After I had successfully added the calendar application to my Android emulator running Android 2.2 (Froyo), I soon realized that I wasn’t able to create events in it because I had no calendars. Android gave me this nice message: You have no calendars. Searching the web for this problem lead me to the need of [...]

How to add the calendar application to the Android emulator running Android 2.2 Froyo

I was pretty confused when I found out that the Android emulator does not provide a basic calendar application. Starting with version 4.0 “Ice Cream Sandwich” there seems to be a calendar API, but when developing an application for an older version like 2.2 “Froyo” you not only have no common API for accessing the [...]

Validating an XML file against a schema with Natural and Java

Although Natural provides (very basic) functionality to parse and load an XML file, I could not find a way to validate XML against a schema. So I wrote a small Java program that does the validation and can be called from Natural (on Linux) via a User Exit. Here is the Natural code for subprogram [...]

Display JavaDoc tooltips in Eclipse

Sometimes after installing the JDK and Eclipse, JavaDoc tooltips do not show the Java documentation: I have experienced this problem quite often, especially with programming students who installed the JDK additionally to an already present JRE. The simple solution is to switch the JRE Eclipse uses in the preferences (you may have to “Add” the [...]

LINQ rules!

Here’s an example of a small refactoring I did today using LINQ’s features in C#. I had this method that simply constructs a WHERE clause for a SQL statement using an IList of table prefixes: private string getWhereClauseForTablePrefixes(IList<String> tablePrefixes) {     var where = "";     if (tablePrefixes.Count > 0)     { [...]

DBDiff: a C# program to compare two databases

In one of my current projects I have to import an Oracle database dump into a development database every two weeks. But more than once there were tables missing, columns have been changed, or indices have been removed in the new dump. Of course, that led to problems with the programs that used the database. [...]