Archive for the ‘java’ Category
Australian User Groups
http://www.builderau.com.au/usergroup/. Have been attending few Adobe UG meetings, maybe it’s time to have a look at the Java one.
Java Collection Framework
This is probably going to be the last time I code in Java for a little while.
Reference: Java Collection Framework Tutorials
Important distinctions:
- Set — a collection that cannot contain duplicate elements. This interface models the mathematical set abstraction and is used to represent sets, such as the cards comprising a poker hand, the courses making up a student’s schedule, or the processes running on a machine.
- List — an ordered collection (sometimes called a sequence). Lists can contain duplicate elements. The user of a List generally has precise control over where in the list each element is inserted and can access elements by their integer index (position). If you’ve used Vector, you’re familiar with the general flavor of List.
Iterator plays a very important role now.
What’s new (to me)
I haven’t really coded in depth with Java for awhile now, but now for COMP9318 project 1 I need to do some processing that requires different data structures.
From memory, back then there were only 2 basic data structures that I use over and over again, they are array and vector. But now Java got a comprehensive API for data structures under Collection. Very exciting.
I also found yesterday that I can convert string to integer by simply:
String number = 1;
int i = (Integer)number;
I remember in the old days, we need to do:
String number = 1;
int i = (new Integer(number)).toInt();
Choices
Hm, working with J2EE, we are spoilt with options.
IDEs:
- NetBeans (Sun’s?)
- Eclipse (IBM’s, they generously open sourced it, from what the lectures told us, it is THE ultimate J2EE IDE, especially it you’re into to application modelling).
J2EE servers:n- JBoss, most popular?n- Sun’s Application Server, not meant for real use but useful for testing and learning, from what I’ve read.n- IBM WebShperen- BEA WebLogicn- Apache Geronimo
Frameworks.. hm, from looking around there are Struts, Spring, Hibernate. So much to learn.
At the moment trying to gather up info from different sources, and to my dismay, they all use different servers/IDEs combinations.. doh! I’ve got NetBeans, Eclipse, JBoss and Java Application Server ru
ing on my PC”s Linux Fedora just in case. Tried ru
ing both Netbeans and Eclipse on my laptop (ru
ing Mandriva Linux), it’s way too slow.. is it my laptop’s fault? Or is somehow the configuration is not optimised under Mandriva?
JINI Resources
I give up, it’s either I’m stupid or Deitel’s way of explaining with codes, just doesn’t work for this particular chapter on Jini and P2P. I think if I read Deitel’s firs book on Java, I would’ve got better idea about Jini. Anyway, I can’t get ch28 example to work, I mean it compiles and run, but the peers don’t talk to each other.. I hate using people codes without really understand what it does.. So I am resolved to learn Jini from ground up.
Jini resources to print and read:nhttp://v2getsmart.jini.org/nhttp://pandonia.canberra.edu.au/java/jini/tutorial/Jini.xml
JINI
Ok, so for this assignment, I need to write a Peer to Peer (P2P) application using Java, the example from the book is using JINI and RMI, I have no clue whatsoever about this two technologies.
So JINI is for resource discovery over network and it can use different backend, with one of them being RMI. Still don’t get it, and I can’t run the program.. argh! @@
PS: First try of using Scott’s mtsend.py wasn’t sucessful. But I like the idea of blogging from commandline tho. will give it a try again later.
Update: OK, so LookupBroswer in JINI works now, apparently I have to specify a non existent directory for Reggie for log files.n Read the rest of this entry »
COMP9031 - a short review
As mentioned before, I am currently doing COMP9031: Internet Programming and am about to take its mid session test in 1.5 hours
What I like about this subject is, it’s pretty hands on, the lecture and the assignments are closely linked. The lectures are mainly discussing Java internet tech by actually looking at codes, so this course it’s quite “low level” compared to more on the conceptual level like COMP9316.
I am happy to learn stuffs from Deitel’s Advanced Java How To Program and then use them in the assignment. For instance: I’m currently wanting to change the session tracking algorithm that I use for my assigment (using hidden input in HTML form as I am accustomed to do) and play around using Java’s HttpSession. I am not a big fan of this Deitel book, mainly because the codes are: 1. using older version of Java 2. the style doesn’t follow Java Convention (hm i forgot the actual name, but there’s a standard on how you should write your code like where to put linebreak etc2) -> look a bit messy to me. 3. BUGS everywhere!!! Not to mention the performance issues associated.. Anyhow it’s good introductory book on the ever extending Java features, I just hope it doesn’t produce bad programmers.
The lectures aren’t not too much of a value to go to, as lecturer just “read” the lect notes and very often lost track of the codes and have to ask the students to find “which line that does something”. I don’t understand why the lecturer doesn’t push doing assigment in linux system and in fact encouraging development in Windows and then test the assigment in CSE linux lab, pretty stupid I say, why do double work? Encourage the students to use linux for the assignment and then easily port them to CSE. This particularly tedious process to do as assignment 2 requires installation of Tomcat and MySQL, the enviornment variables etc2 will look quite different on Windows and Linux, the inexperienced students will undoubtedly spend meaningless hours to get the assignment to work on “both” windows and linux, I only need to make sure that it works on linux at CSE and at my home.
Got a deeper understanding of servlet and JSP compared from COMP9316. A little touch on J2ME. Will learn JMS soon (well today if I dont skip the lecture to study and write this entry
).
SCJP
Aiming to be a certified Java Programmer before the end of the year, or even maybe Developer. Developer is REALLY difficult, I think, as you are required to design and implement software solution based on the spec given, but most likely to be interesting and challenging.
Hm anyhow just attempted a mock exam from Sun, got 50%
4 or more so years programming in Java doesn’t mean you know everything abt it.
Most programmers only know what’s neede/required for them







