Guess what are three most useful tools without which no proper Ottawa household can exist ? Snow shovel, snow pusher and car window ice scratcher. If the number was 4, the next would be snowblower. Up to yesterday, our family was in safe position being equipped with several shovels, four or five scratchers and one pusher.
Then disaster stroke: my son broke the pusher while moving away few cube meters of snow we removed from the roof. In case you do not understand - removing snow from roof is another favorite winter leisure time activity in Ottawa: almost everybody is doing it. Not that it would be so much fun, but because of the dreadful consequences - avoid it and you may end up like this guy.
Lured by the iPhone platform, this is what I read in the evenings. Feels kind of funny: after 10+ years of Java/C# and almost as many years of C++ beforehand, I mostly lost my C instincts and C habits. Fortunately, I have also mostly lost my C++ bad habits as well.
The Apple site is definitive starting point - put the http://developer.apple.com/referencelibrary/index.html into your bookmarks. From non-Apple sources, very bookmarking-worthy is the Cocoa Literature and Cocoa Devcentral.
This is post is NOT about version control in the sense of source code control. It addresses the issue how to easily tell which version of the Web application is running as well make sure that the same version is reflected in the snapshots performed by Ant. We have used this approach on several applications and found it quite useful.
The version I talk about is not the automatically generated version from VCS system (such as SVN revision). The version number is set manually.
I better blog this before I forget what was the issue :-).
During daily run of unit tests, I started to receive this (very well explained) exception:
[sourcecode language='xml']
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17004];
--- The error occurred while applying a parameter map.
--- Check the APPROVAL_TASK.insert-InlineParameterMap.
--- Check the parameter mapping for the 'scheduledDate' property.
--- Cause: java.sql.SQLException: Invalid column type; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the APPROVAL_TASK.insert-InlineParameterMap.
--- Check the parameter mapping for the 'scheduledDate' property.
--- Cause: java.sql.SQLException: Invalid column type
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)
at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:397)
... [/sourcecode]
Now the problem was that scheduledDate was null. Here is partial SQL map used:
[sourcecode language='xml']
Testing applications that communicate using email is more challenging than e.g. testing database access. Thanks to GMail and Spring, it can be done pretty easily.
Here is the scoop: I need to generate email notifying users about business events and after sending the email, store the content in the database. In real environment you will use corporate SMTP server and real email addresses of real people.
For development we can avoid bothering and spamming our customers by few simple tricks.
Part of the configuration magic is (one of several) Spring post-processors, that allows load the property file or files and refer to the values in these files inside XML configuration files. The rationale behind these is that property files are much easier to edit that possibly huge XML config file and using property values prevents repeating same value over and over again. With this approach, the following configuration:
[sourcecode language='xml']
If you work with Oracle database, a very good tool you should not ignore is the Oracle SQL Developer. It gives you much more power when it comes to manipulating data or managing database. I use most of the time MyEclipseIDE plugins, but when I need e.g. export data, the SQLDeveloper is way to go.
Today I tried it for first time on the Mac. I started to configure and database connection and was completely confused by the error message "Port must contain numerical value". Here was the dialog box:
I have been sick for last two weeks, most of the time offline, listening to podcasts and audiobooks and doing more or less nothing. I have caught up with the backlog of episodes, saw lots of videos from Macworld.
Among the audiobooks I was listening two, some recommendations:
The Company is good parody of the corporate life. Starting with missing donut, it tells the story of a new hire in large corporation, governed by strange rules. It soon has an interesting twist - find for yourself. The book is available as MP3 CD, so you can save time ripping it to iPod.
Apple released today the 10.5.2 update. After over a year and half with Mac platform (and over 2 months on Mac only work environment) I become fearless and installed update without too much worries :-). Year ago, I guess I would be quite concerned whether the Service Pack will or will not render my work notebook useless with unreparable registry ... I still remember the fun after SP2 got installed ...
After long time, I stumbled upon something that is both educational and practical. Since Doug Lea's classic, this is very readworthy work on concurrency in Java world. It focuses on Java 5 features and addresses both Web applications as well as GUI apps - each group having their own share of concurrency related problems
Here is the Amazon page for the book - check the reviews. There is also a sample chapter available on the book's website. If you have Safari subscription, you can read it there as well.