Monday, April 23, 2007

Java difficulty

I think I know why I have been having a hard time learning Java. Every other time I've tried learning a new language I've had a ton of ideas come flying into my head of neat programs to write using the new language. I learn most of the things that I need to know figuring out how to implement my little pet projects. Java however has been a different beast. I use it because that's what I need to use at work, but for my own personal use, I haven't found a single project to try writing in Java.

I think my next big leap in Java knowledge will happen when I finally come up with a project to write for fun.

Thursday, April 19, 2007

Java plus

I have been busy the past few weeks working on a new project at work. It's kept me away from posting very much because the stress of this project has carried over into my home life.

However, I have been using some new technologies for me, and I will try to post some of the things that I've learned in the near future.

Things that I've used in the past week are:
1. OJB
2. Java Web Services
3. Websphere Portlet
4. Some kind of mock object to help test the classes.
5. A tag library in the portlet.

Most of these I don't even understand what it is that I'm doing yet, I'm still just copying the same kind of things that I see being done in other places, but I'm getting closer to understanding when it is that I need to do one of those things, which is a big step in understanding how to use them. I still have a ton to learn, but there is more coming.

Thursday, April 05, 2007

A c# coding annoyance

One thing that's been annoying me a lot recently is the block comment for c#. Sure it's nice and easy to highlight everything and use the shortcut ctrl+k, ctrl+c, but then the whack whack is put all the way on the left. If a curly brace changes after that then the autoformatting tabs it over to put the whacks in the position within the block of code.

For example

public void DoSometing()
{
if( test() )
{
if(true)
{
...Code goes here.
}
}
}


When commented out it looks like this.
public void DoSometing()
{
if( test() )
{
// if(true)
// {
// ...Code goes here.
// }
}
}


After adding some code it looks like this.
public void DoSometing()
{
if( test() )
{
// if(true)
// {
// ...Code goes here.
// }
}
else
{
... addidional code goes here.
}
}


This becomes annoying because the code that is commented gets pushed further to the right. I would much rather that the autoformatter leave left justified comments left justified. It doesn't have to be smart about where the spacing falls into line. If the block is uncommented, then the code can be repositioned to fit correctly. Any comment that is not completely left justified could be formatted, but it doesn't have to format the left justified comments.