Wednesday, August 30, 2006

ACM, Safari and the Professional Development Center

I found a gem. This is the ACM, Association for Computing Machinery. This association has a yearly membership of less than $100 and with this you get access to over 1000 online books, including the O'Reilly series and over 500 online courses.

I've enrolled in about 5 different courses and any one of these would have cost hundreds of dollars each if I had enrolled in one of the online college degree services or other online computer courses.
With this yearly membership you get full access to the Safari collection of books as well.

I am currently enrolled on the full OOAD, Object Oriented Analysis & Design curriculum which contains 6 different courses, gradiently walking you through from basic OO concepts all the way through detailed UML diagrams. Every course contains "Pre" and "Post" examinations so you if you already are an expert at a subject, the course is customized to fit what you still need to work on based on your "Pre" test results. Then you must get over 80% passing rate for you to be considered "complete" with any course. You are directed back to the exact point you missed and you can clear up any misunderstood words and re-study.

Definitely an "A+" for ACM and the Professional Development Center.

Tuesday, August 29, 2006

I know I have a Coffee Addiction, but a Mental Disorder?

The American Psychiatric Association has been at it again. One of the latest entries in the DSM "The Handbook of Mental Disorders", is the Caffeine Disorder. If you are a coffee drinker and get a headache when you don't drink coffee, you can now get free Prozac, paid for by your insurance company. This is because the DSM is used as a shopping list and if it is in the DSM, you can prescribe it. This is total B.S. The disorders entered into the DSM are voted on by a group of psychs each year and they have admitted there is no scientific evidence to back up these disorders. Here is the latest caffeine related disorder.
Anyone who feels this is a bunch of B.S. should check out the CCHR website as they are doing an excellent job of exposing these frauds.

Sunday, August 27, 2006

Star UML - pretty good... What about Poseidon?

Ok, Star UML is pretty good. It felt a little too restricted to code-direct diagrams as opposed to a more abstract modeling environment which is how I like to start.

Poseidon has been downloaded by over a million people. But there is no free version bar a 30-day free trial.

I am going to dig a little more into this and see if it can't just satisfy my UML needs.

Star UML Design Tool

Ok, I downloaded the Star UML Design tool. Looks like an open source UML tool. Sounds promising. I'll give it a review in a bit.

UML Free Tools

Searching the web, trying to find a good simple UML tool. After studying some basics on the UML method I am finding numerous applications where a UML design tool with be great. Of course one could be simulated using Word or Open Office, but it would be much nicer for a series of templates to be laid out ahead of time for each of the different types of diagrams and have these easily available.

I've tried the Visual Paradigm Community Edition which is free and is very nice however you can't print anything off without these annoying watermarks.

Saturday, August 26, 2006

Scientology Stress Tests - Do They Really Work?

Anyone been to the Big Apple lately or walked down Hollywood Blvd and seen the guys in red Dianetics shirts, with the E-Meters and big signs saying "FREE STRESS TEST"?

Here is how this works:

What they do is sit you down and give you a pair of cans to hold. You are asked to think about people and situations in your life that may be causing you stress. The meter reacts to thought as thought is energy. A small electrical current is passed from one hand, through your body and out the other hand. When you think of something stressful, your thought contains more electrical resistance which is measured on the E-Meter with a right motion of the needle.

I have seen this done myself and I have given Stress Tests. The result is quite impressive. I was able to pinpoint exact areas of people's lives that are causing them stress. After receiving the stress test, most people want to find out how to get rid of that stress.

This is what Dianetics is all about. Getting rid of the negative emotion of past incidents which cause you stress in the present.

Here is an on-line version of the Stress Test that you can do.

Friday, August 25, 2006

Java Date Conversion !?!@@#@:(

Is anyone else perturbed about Java dates! 2 weeks of programming based on what was thought to be the "expected" date format of "yyyy-mm-dd" and it turns out to be "dd-mmm-yyyy" and nothing works. Ok, but my program should be able to handle all the various types of common date formats that could be sent in. So I figure, sure, others must have run into this, let's find a library on the net. After nearly an hour of searching, no luck. I guess I'll just build my own...

Wednesday, August 23, 2006

SmallTalk approach to OOP

1. Everything is an object. Think of an object as a fancy variable; it stores data, but you can “make requests” to that object, asking it to perform operations on itself. In theory, you can take
any conceptual component in the problem you’re trying to solve (dogs, buildings, services, etc.) and represent it as an object in your program.

Some language designers have decided that object-oriented programming by itself is not adequate to easily solve all programming problems, and advocate the combination of various approaches into multiparadigm programming languages.

2. A program is a bunch of objects telling each other what to do by sending messages. To make a request of an object, you “send a message” to that object. More concretely, you can think of a message as a request to call a method that belongs to a particular object.

3. Each object has its own memory made up of other objects. Put another way, you create a new kind of object by making a package containing existing objects. Thus, you can build
complexity into a program while hiding it behind the simplicity of objects.

4. Every object has a type. Using the parlance, each object is an instance of a class, in which “class” is synonymous with “type.” The most important distinguishing characteristic of a class is “What messages can you send to it?”

5. All objects of a particular type can receive the same messages. This is actually a loaded statement, as you will see later. Because an object of type “circle” is also an object of type
“shape,” a circle is guaranteed to accept shape messages. This means you can write code that talks to shapes and automatically handle anything that fits the description of a shape. This
substitutability is one of the powerful concepts in OOP.

An excerpt from Thinking in Java.

Quoted

Tuesday, August 22, 2006

The Open Source Paradigm Shift

O'Reilly describes the Open Source Paradigm shift that is ongoing...

Jigloo Eclipse Windows Builder?

Building GUIs for rich client apps in Eclipse is not the easiest thing in the world. I'm looking for windows builders comparable to the Net Beans GUI builder.

I am downloading the Jigloo GUI builder which sounds pretty good but that is coming from company who made it.

What about WindowsBuilderPro? This is a commercial product, not free like Jigloo. How is it better?

I'll try both and see for myself...

On the install, Jigloo is very simple and is just like any other Eclipse plugins. Just copy to the features and plugins directories and your done. WindowBuilder on the other hand has you walk through a install wizard which took only a couple minutes to run through. (Make sure you don't have Eclipse running during the install).

WindowsBuilder has several example apps you can try. In 5 minutes of testing this builder I found it very user friendly. I liked the "quick view" feature where without even compiling you can get a feel for how your app will look during runtime. Now on to Jigloo.

After the few minutes I found it easy to create a basic app. Nothing difficult. I liked the two screen (code/app) view that shows the two-way changes so if you edit the GUI the code changes or you edit the code and the GUI changes.

So far they are both comparable products and I'll spend a bit more time using each on an actual application to see which is the better product.

The Set Interface

Here is how this works. Set is an interface that extends the Collections object. HashSet is an instance of "Set". You can't just instantiate the interface. You do this with the concrete HashSet, TreeSet or LinkedHashSet implementations. Each of these handle the Collection differently.

The HashSet doesn't care what sequence the data is in, but will ensure no duplicates are allowed.

The TreeSet will sort the data and keep it in that order and the LinkedHashSet will retain the sortation that it originally was stored in.

Pretty simple eh.

Using the for loop with a colon?

I've gone through the famous Eckel book on "Thinking in Java" and could not find the examples I've seen in various code, using a for loop with : instead of commas.

Here is an example of one:
class EnhancedForDemo {
public static void main(String[] args){
int[] numbers = {1,2,3,4,5,6,7,8,9,10};
for (int item : numbers) {
System.out.println("Count is: " + item);
}
}
}
While writing this entry, I found a site which gives some direction on this, but still I am not totally tracking. Looking for a better description.

This format of the "for" loop is generally called the "enhanced for loop" and is used with arrays and collections.

Enhanced For
The Enhanced For Loop

Looks like this was only released with JDK 5.0. No wonder I couldn't find it in my outdated reference books...

Collection Examples

I am drilling on using collections, specifically the "Set" collection.

Here is an example using a simple Set collection:

import java.util.*;

public class FindDups2 {
public static void main(String[] args) {
Set uniques = new HashSet();
Set dups = new HashSet();

for (String a : args)
if (!uniques.add(a))
dups.add(a);

// Destructive set-difference
uniques.removeAll(dups);

System.out.println("Unique words: " + uniques);
System.out.println("Duplicate words: " + dups);
}
}
The program is called with "java findDups2 (here you would pass the arguments)" The above will return you a list of the Unique words and the duplicate words passed in its arguments.

Based on the above, objects could also be checked for duplicates, or specific members of objects such as id numbers, names, addresses, etc.

Taking mental note of this for future operations...