Skip to main content

Blog Archive for staufferjames during July 2007

Would it be useful to be able to provide method return values for null objects? For the List interface, the null return values might include: get(int) : null<br/>size() : 0<br/>iterator() : An empty iterator That would allow the following code that has less null checks: <pre>List items = null;if(false) {  items = ...}for(int index = 0; index < items.size(); index++) {//...
Is there any downside or problem potential to changing the Java compiler to automatically cast? In the example below the result of list.get(0) would automatically be casted to the type of the variable hi (String). <pre>List list = new ArrayList();list.add("hi");String hi = list.get(0);for(Iterator i = list.iterator(); i.hasNext(); ) {  String item = i.next();//Automatic casts...
I use Source Insight as my primary IDE. I like it because: It starts quick (so that exiting, renaming code directories, and starting doesn't take long) It is extensible (so it can syntax highlight internal file formats and parse output of other programs) It is easy to learn: Just start it and you can start editing files. I started using it before I even heard of many of the current "big names...
Searching my code and other files outside my IDE is something that I need to do often but I haven't found a good solution. I have tried: Windows XP search: slow Google Desktop: indexing prevents renaming directories, hanging when using remote desktop, and IT prohibited because of security Copernic Desktop Search: same renaming problem, seems to not keep index up to date. Command line find and...
Some of my co-workers had their cvs login name changed so we had the problem where every directory checked out from cvs had a CVS subdirectory with a Root file in it that had the old username. The easy way was to delete all checkouts and checkout again but if that would cause the loss of data we needed a different solution. I handled my machine by doing a Windows search for all Root files, adding...