Archives for: February 2006

Feb 25, 2006 :

finally created a account

: Gmail chat thoughts

I haven't heard much buzz about gmail's web interface to chat. Only a few people complaining about a extra icons on the sidebar.

First, IM on the web means no software to install. Very nice. But in the big picture, I see this as only one small step towards making all networked applications be web-based. The internet is pervasive and browsers are everywhere, but software apps are not. For maximum accessibility, nearly everything will go to the web. SMTP and POP3/IMAP have been accessible by webmail for a long time; IM is moving there (applets have been around, but plugins don't count); FTP is fading in favor of web CMSs; telnet for hardware device configuration has been replaced with web interfaces; SSH will become AJAX consoles on secured sites; networked PIMs will be web based; CVS has been pushed aside by Subversion; SMB/CIFS (windows file shares) will move to HTTP DAV filestores; . The only networked apps that will not move to HTTPS are specialized client/server configurations like rsync, gaming and probably VNC.

And Gmail is removing the diffences between IM and Email:

  1. Email address are used for screennames
  2. Same website for both
  3. History is saved for both
  4. When replying in either, previous messages are available directly above your composition
  5. One-click to reply to an email; zero for chat
  6. By default, email replies show an input field only for new body content. No subject, recipients, or previous body content
  7. You can email a reply to a chat log

Feb 20, 2006 : "planet" sites are bad

First, they're not all bad. I love using as a way to read a wide variety of (growing) blogs on interesting topics. And I get to use it to widen my blog exposure too.

But planet sites are closed. There's no way to join the community or post a single message to the group. The best you get is a contact link to the maintainer, sometimes nothing at all.

For and like-planets, that's probably okay. It's one face of an existing community. After you join the community through published methods, you can communicate on the planet site's forum. However, many planets to a large degree are communities unto themselves, like They have their own unique nature and in that blogosphere only a select few may participate.

Feb 18, 2006 : RE & FW icons

In MUAs in locales that read right-to-left, do the icons (and overlays on each message's icon) that represent replies and forwards face the other way?
Forward Reply

Googling for localization of icons indicates this isn't a popular concept in general.

Feb 07, 2006 : Timezones in Tomcat

Update Feb 8, 2005: Java system property user.timezone works. Java 1.5 before update 7 has a bug so default timezone is per-thread instead of per VM, which complicated things. And worse, I was using another webapp that set user.timezone to GMT all the time.

As far as I can tell, there is no guaranteed way to change the timezone of Java at runtime (except by code that executes TimeZone.setDefault()). Property -Duser.timezone=?? and env var TZ=?? may or may not work. And for me, at least, a standard Tomcat 5.5 installation in Windows has a default timezone of GMT, despite any OS settings.

So I wrote a servlet to help. Changes seem to persist through Tomcat restarts. Make sure you put some security on it.

package com.splike.timezoneservlet;

import java.util.Date;
import java.util.TimeZone;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class TimeZoneServlet extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		ServletOutputStream out = response.getOutputStream();
		out.println("<a href=\"?\">refresh view w/o changing settings</a><br/>");
		String tzParam = request.getParameter("tz");
		if (tzParam != null) {
			if (tzParam.equals("")) {
				out.println("Action taken: Reset default TZ");
			} else {
				out.println("Action taken: Set default TZ to " + tzParam);
		out.println("Current Date: " + new Date());
		out.println("Default TZ: " + TimeZone.getDefault().getID() + " (" + TimeZone.getDefault().getDisplayName() + ")");
		out.println("Set the default TZ:");
		out.println("<a href=\"?tz=\">reset</a>");
		int last_offset = -1;
		for (String tzId : TimeZone.getAvailableIDs()) {
			TimeZone tz = TimeZone.getTimeZone(tzId);
			if (last_offset != tz.getRawOffset()) {
				out.println("<b>Offset " + (float)tz.getRawOffset()/(1000*60*60) + ":</b>");
			out.println("<a href=\"?tz=" + tzId + "\">" + tzId + "</a> (" + tz.getDisplayName() + ")");
			last_offset = tz.getRawOffset();



<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns=""
	<display-name>Time Zone Servlet</display-name>
	<description>Time Zone Servlet</description>



Copyright 2006 Dave Brondsema, Cornerstone University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Feb 03, 2006 : a good idea : use Java/.NET code to define your ORM query

Native Queries would have you implement a match(Object o) method in Java that is then used to create a SQL select statement. Byte-code analysis of your method is used to convert the method's logic into a query usable your favorite ORM library. What's great about this is that you don't have to learn a new query language, and that it's all checked at compile-time and you can even do IDE refactoring.

As an example, HQL (the hibernate query language) is parsed, etc at runtime so syntax or variables are not checked until runtime. Hibernate has "criteria queries" that avoid the issue of syntax by having classes/methods that represent all the different possible operators. But you still have to pass in properties as strings (e.g."firstName", nameQuery)).

Implementing native queries could be difficult, but even a simple implementation that permits only very basic operations could cover a vast majority of cases. For example, permit basic operators and the use of methods and variables in the model class, but don't permit execution of any other code. If your query logic was complex you wouldn't want to use this approach anyway but would directly use the ORM query language or SQL.

It looks like the POJQ library has an implementation for JDO and could be extended for other ORM libraries. There is also a db4o project which has a much broader scope and seems somewhat "closed" although under an open license. The API requires a login to find, so if you're curious you can find it here.

Via Dr. Dobb's Journal. Covered on TSS a while ago too.

<< Previous PageNext Page >>

<< Previous PageNext Page >>

<  February 2006  >
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28          




Syndicate this blog XML

powered by