Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Sunday, 22 July 2007

Wow! Wow! Wow!




This is awesome!







I don't know whether it will appeal to everybody but I think that this is just a fantastic idea.
It adds a whole new emotional dimension for those of us who spend a lot of time on the Internet and have been accused by those that don't of needing to get back in touch with the real world.
Well, here it is and guaranteed to make you feel something!

Jonathon Harris is an artist who also happens to know how to program and he is using his programming skills to create art that is not only interesting in content but also great to look at. We feel fine tracks the world's blogs and searches for phrases starting with the words I feel........ and then captures the rest of the sentence. A picture of the way the world is feeling at that time is created - look it is hard to explain, click on the "We feel fine" graphic and check it out yourself!






His latest project is called "Universe" and provides a snapshot of our world from the point of view of any parameter that you put in. Again awesome!

Enjoy!

Sunday, 1 July 2007

ITtoolbox for IT professionals




I discovered this brilliant site sometime ago and have decided to blog it just in case you might be interested and don't know about it!




ITtoolbox is a community of 1.2 million IT professionals who share information and provide assistance to each other on all things related to being involved in the IT profession.

Main category areas include:
  • CRM
  • Data Management
  • Development and Integration
  • Enterprise Back Office
  • IT Management and Trends
  • Networking and Infrastructure
You can also:
  • View, contribute to or comment a vast array of Blogs on real IT issues and trends.
  • Use Groups to ask and answer questions among skilled peers.
  • View the excellent Wiki, create and edit definitions, FAQs, and HOWTOs.
There are also any number of white papers and research, webcasts and events and......... you can even score a new job!

I have joined various blogs and become, like many others a fan of bloggers with names like Security Monkey, Locutus and Puramu.

Thursday, 5 April 2007

Great Java programming book - Head First Java 2nd Edition



Whoopee Do!
It was my birthday yesterday and I received the copy of Head First Java 2nd edition I had been waiting for from Amazon which joins my two other Java programming books:

Java in a Nutshell (for the API in a book on my desk)

Java - An Introduction to Problem solving and Programming (A great book also and I have it because it is the chosen text for my degree and represents the traditional approach to teaching programming in Java).


I think the way in which the Head First authors go about teaching the basics of Java programming is excellent and works very well for a subject that can be a little dry and that requires the assimilation of a huge amount of information.
The image above will give you some clues as to the tone and visual nature of the book.
I have already found it useful and remarkably easy to just sit down with and read almost like a novel. (picture book?)
They have sold thousands and I can see why!
Anybody else found this innovative teaching text useful?
or
Just a pile of garbage and a waste of money?

Tuesday, 27 March 2007

Amazon! So good!





Amazon provides a simply fantastic service and goods at a great price!






Last week I ordered these two Java programming books from Amazon.
Both were second hand around $20 US and $9 US postage for each.
That worked out to about $70 in Australian dollars! Awesome - Because! If I had purchased these books here in Australia they would have cost me $170AUS!

Yep, I could have searched around for secondhand copies of these books in WA but that would have taken time etc.
Amazon does it all for you and I have already received 'Java in a Nutshell". (How good is it to have the whole API in a book on your desk as you program? Very good I can tell you!)
No more than a week to get here from the States and it is used but in good condition as indicated on Amazon's site.
Awesome!

Thursday, 22 March 2007

Nested for loops in Java!






For loops are such a fundamental part of programming in any language and I have been grappling with the intricacies of nested for loops in Java.






Let's say the problem is to report whether there are repeated letters in a string input by the user without using an array.

A nested for loop is perfect for solving this problem but it is not as easy as it first appears.

The loops should work as follows:

The inner loop cycles through the string and compares them to the letter in the outer loop continuing to do so until a repeat is found or no repeat is found and an appropriate message displayed. The crucial issue is getting the inner loop to start off at the 2nd letter in the string so as the two loops are not comparing the same letter!
Initially I tried something like;

char i;
for(i = userString.charAt(0); i <= userString.length(); i++) char j; for(j = userString.charAt(1); j <= userString.length(); j++) But the loops did not seem to work with userString.charAt() as a starting point? Unsure why! so I went back to the standard:

for (i = 0; i <= userString.length()-1; i++){


int j, count;
count = 0;
for(j = 0; j <=userString.length(); j++){ if( userString.charAt(i) == userStringcharAt(j))


hoping that i <= userString.length()-1 and j <= userString.length(); might do the trick. Nada! Anyway it transpires that the solution was very simple and I had just not thought to do it. j = i + 1!

for (i = 0; i <= userString.length()-1; i++) { int j, count; count = 0;

for(j = i+1; j <> {



I am still unsure:
  1. Why j <>
  2. Why there is still a need to use i <= userString.length()-1 rather than
    i <= userString.length().
I am sure someone can shed some light on this!

Sunday, 18 March 2007

Another Java 5 results per line solution




for (values = startvalue; values <= endvalue; values++) {
System.out.print(values + ", ");
count++;
if (count == 5)
{
System.out.print("\n");
count = 1;
}
}
Thanks Lloydy!

Friday, 16 March 2007

The Java code 5 results per line solution is...?


for (values = startvalue; values <= endvalue; values++) {
if (count == 5)
{
System.out.println( + values + ", ");
count = 1;
}
else
{
System.out.print( +values + ", ");
count = count + 1;
}
}


Many thanks to my tutor Prathmesh!

Wednesday, 14 March 2007

Output 5 results per line in Java?


Well, I have my fantastic new Java book but can I work out how to output 5 results per line? Nada!





I know! use count but how?

All I get so far is each result repeated 5 times?

1,1,1,1,1, 2,2,2,2,2, 3,3,3,3,3, etc etc?

I need it to do this:

1, 2, 3, 4, 5,
6, 7, 8, 9, 10,
11, 12, 13, 14, 15,
etc etc

The code I have tried is something like this:

for(i = startvalue, i <= endvalue, i++){

int count = 0;
while(count <= 5)
Screen.out.print(values + ", ");
count++;
}

Am I missing "\n" somewhere or something like that?

Sunday, 11 March 2007

My new Java programming book has arrived!




Finally, now that I have been paid for the first time in three months, I have been able to purchase the text book I need for the Java programming unit I am doing at Murdoch University this semester.

"Java - An introduction to Problem Solving and Programming by Walter Savitch"


I did a bit of research on the book at Amazon and it got rave reviews so I was happy to purchase it.
I had also considered using "Head First Java" which appears to use a very interesting way of teaching Java.

I completed a term of Java programming (and managed to pass) last year so I have a reasonable grasp of the basics but I am still not that confident.
Although I thoroughly enjoy and obtain a great deal of satisfaction from programming, much to my surprise initially, I still approach programming tasks with some level of concern particularly when a new Lab assignment becomes available!

I have managed to get through the first two labs this semester without the textbook but I am very glad to have it now as we move in to object orientated programming.

I am using Netbeans 5.5 as an IDE previously having done all my programming in a text editor and I am finding it eases the programming process greatly by:
  • adding curly brackets automatically which can be a source of great frustration if you loose track of them in a text editor
  • automatically spaces the code with tabs so as you end up with nice looking code - a perennial frustration for my tutor last semester as I never managed to layout code to his satisfaction
  • providing much better error resolution resources - even making the odd suggestion or two!
  • many more things I have probably not discovered yet!
Any other Java students out there using Netbeans for their coding?
I would love to hear of your experiences with it!