March 31, 2005

Head First Java: Issues

Well I got very frustrated by the variables chapter in the book. I found their naming of the variables to just confused what I was supposed to be learning. When Jesse explained it to me it was like duh, yeah I knew that stuff!

So then polymorphism I read a bit on and kind of got it but I would say I didn't totally grasp it but that's okay because it's the first time I ever read about it. Inheritance was pretty easy to grasp.

Next it has a "sink a battleship" type games it wasn't you to create. I was just totally turned off by the tutorial (if you can call it that). I didn't like it at all. So I ordered a book from Amazon and I'll write about it when i get it. There are also those other two Java books I posted about but they aren’t published yet which is frustrating. I think once I get through some tutorials and get to some real world coding, I'm going to make my own tutorials. Most of the ones I found online were a mess or extremely outdated.

I'm skipping ahead to the GUI chapter and hoping I can learn some stuff from that part.

Posted by brandy at 04:09 PM | Comments (1)

March 24, 2005

Java & CF Books: Coming Soon

Ben Forta posted about his new book "Macromedia ColdFusion MX 7 Web Application Construction Kit" and after a conversation with Geoff and a co-worker I thought it might not be a bad idea to maybe read up on CF and learn about how it works and it's benefits and at least be educated about the technology the way I am with Perl/PHP/JSP/.NET etc.

So yeah, I was looking at Ben's book and saw it was on the "Amazon Early Adopter Product in Computers & Internet" list.

The top 25 books (accourding to purchase patterns) include 4 Java Books, 2 Cold Fusion, 2 PHP and one .NET book. It's an interesting representation of the popular technologies being learned and used by people today.

Two of the Java books look like a lot of fun. "Java After Hours : 10 Projects You'll Never Do at Work"

I love real world examples so I can't wait to see this book. Of course I'll want to see it before I buy it :)

"Code First : Java", this one has a great description;

I hope once they are to print that it offers the look inside feature.

Posted by brandy at 04:35 PM | Comments (0)

March 22, 2005

CSS: Oh my freakin gosh!

Have you ever been working with some serious CSS-P and found for some wacked out reason the text in your div actually duplicates itself twice on the page. You have no idea why this is happening and you try to clear it out by inserting a clear:both; and a few other tricks you have hidden up your sleeves.

I don't even remember how I have gotten around this problem in the past, but wow, I would have never thought to blame it on my comments! So sad to be punished for writting useful comments!!

CSS bugs in IE > 5.

Posted by brandy at 09:55 AM | Comments (0)

March 17, 2005

XHTML - Using tables wisely

A gem of an article about using tables correctly in XHTML and it also considers accessibility.

Posted by brandy at 02:53 PM | Comments (0)

March 16, 2005

CSS: Rounded corners without images

"Rounded Corners with CSS are a hot topic in web design: I think that there are hundreds of articles on them. This page is intended to present the solution I came up, that doesn't requires images, extra markup nor CSS. Let's start."

Posted by brandy at 10:26 AM | Comments (0)

March 15, 2005

Head First Java: Objectville

Page 41 ("Head First Java"), this one took me a bit longer then the others, I think 20 minutes or so.I also references page 37 to see how they had structured the code in an earlier example and used that as a guide.

All the "//" represents a snippet of code, the code was all jumbled up and I had to put it together.

Output:
bang bang ba-bang
ding ding da-ding

My first approach had nearly everything in the right "class" excluding that I had the if up in the first class. I peaked in the back to see my first mistake so I could atleast start to head in the right direction. I was excited to see it was the only thing that didn't belong in the first class. So I moved it below and ran it and wow I was suprised it complied, only it compiled backwards. So I just swapped the position of d.playSnare(); and d.playTopHat(); and boo-ya it worked! Lovely!

//class DrumKit { //

//boolean topHat = true;
boolean snare = true;
//

//
void playSnare()
{System.out.println("bang bang ba-bang");}
//

//
void playTopHat ()
{System.out.println("ding ding da-ding");}
//
}

//
class DrumKitTestDrive
{
//

//
public static void main(String[] args)
{
//

//
DrumKit d = new DrumKit();
//

//
d.snare = false;
//

//
d.playSnare();
//

//
d.playTopHat();
//

//
if (d.snare == true)
{d.playSnare();}
//
}}

Posted by brandy at 03:41 PM | Comments (0)

March 14, 2005

FLEX & Java - AJUG Atlanta Tuesday Night

Round Box Media is presenting (which includes Jesse!);

The World Wide Web has spurred the creation of many large and small scale applications. These applications all have one thing in common, they are accessible from a browser. The problem is the universal language of browsers is HTML. Although the simplicity of HTML has aided in the proliferation of web technologies users are now demanding more features than the creators of HTML ever thought possible. Macromedia has an excellent answer to this problem with Flash and FLEX. These technologies offer the ability to create rich, maintainable graphical user interfaces.

Server side technologies have been plagued for years with issues of scalability, maintainability, and most importantly, rapid development. Java's first generation answer to these issues is J2EE with Servlets, JSP Pages and Enterprise Java Beans have worked in many cases but time has shown that they have their downfalls. The combination of Spring and Hibernate offers a fresh solutions to these problems and are rapidly gaining industry acceptance.

Flash and Java can communicate very easily with direct object serialization. With a few easy steps and a couple of jar files a Flash interface can easily work with a Java server.

This is a presentation and discussion on how to use some of the latest, best of breed technologies for web development. If you are interested in writing rich, robust, easy to maintain and and pleasant to use software delivered over the web then this presentation is for you.

Holiday Inn Select Atlanta Perimeter Dunwoody
4386 Chamblee-Dunwoody Road
Atlanta, GA 30341
Phone: (770) 457-6363
Fax: (770) 458-5282

Traveling I-85 South
Take I-285 Westbound and proceed to Exit-30 (Chamblee-Dunwoody Road) When exiting, continue straight to the third traffic light. Turn left The Holiday Inn Select will be on your right.

Traveling I-85 North
Take 1-85 North to Interstates 75 & 85 (joint to come to downtown district) and then separate again. Stay on I-85 North until you find Georgia Highway 400 (signs). Exit onto Georgia 400 Northbound (.50 cents toll). Pass the tollbooth and exit onto I-285 Eastbound. Go to Exit 30, Chamblee-Dunwoody Road and turn right off the exit ramp; The Holiday Inn Select will be on your right.

Traveling I-75 South
Take I-285 Eastbound to exit 30 (Chamblee-Dunwoody Road). Turn Right off the exit ramp. The Holiday Inn Select will be on your right.

Traveling I-75 North
Travel I-75 North until you find 285 Eastbound. Take 285 East to exit 30 (Chamblee-Dunwoody Rd). Turn right off the exit ramp. The Holiday Inn Select will be on your immediate right.

Traveling I-20 East
Travel I-20 East, until you find I-285 North. Take 285 North to exit 30 (Chamblee-Dunwoody Rd) and turn right from the exit ramp The Holiday Inn Select will be on your right.

Traveling I-20 West
Take I-285 North to Exit 30 (Chamblee-Dunwoody Rd). Go to the third traffic light and turn left. The Holiday Inn Select will be on your right.

Posted by brandy at 01:01 PM | Comments (0)

March 10, 2005

Head First Java: Code magnets

My next assignment is on page 20 and I had to shuffle some peices of code around to make them work. Basically three of the if statments needed to be inside the while loop. Took about 10 minutes. It was easy to know where the first one went because I needed A to print out first.

Output needed to be:
a-b c-d

The trick is it's counting down and though the output looks like 2 things, it's really three things; "a" (x = 3) "b c" (x = 2) & d (x = 1). Kinda tricky the way they made it "look" even thought it's clear to see once you see the line that says to print "b c".

class shuffle1 {

public static void main(String[] args)

{
int x = 3;

if (x > 2)
{System.out.print("a");}

while (x > 0 )
{

x = x - 1;
System.out.print("-");

if (x == 1)
{
System.out.print("d");
x = x - 1;
}

if (x == 2)
{System.out.print("b c");}

}}}

The next thing I get to do is fill is like a matching game. I have to figure out which bits of code go with which output. Its one Java file, and then there is 1 line in it where i have to try swaping in about 5 different variations, then I have to sit there in my head and run them all. I could of course put them in the computer and let it run them but then I wouldn't actually learn anything!! It's meant to be done with a pencil, I havn't done algebra with a pencil in l ike 4 years lol.

Posted by brandy at 04:21 PM | Comments (3)

March 09, 2005

Head First Java: Bug Fix 101

I have gotten bored and decided to play with Java in my spare time. I have been amusing myself with the "Head First Java" book as it seems to have people like me in mind when it was written. It's a fun book with lots of visuals. It also reminds me of Jesse who is famous for naming his classes and variables funny names like mooCow and moreCheese.

Here is the sample code they give you:

public class HelloWorld
{
public static void main(String[] args)
{
int beerNum = 99;
String word="bottles";
while (beerNum > 0)
{
if (beerNum == 1)
{ word = "bottle"; //Singular }

System.out.println(beerNum + " " + word + " of beer on the wall");
System.out.println(beerNum + " " + word + " of beer.");
System.out.println("Take one down.");
System.out.println("Pass it around.");
beerNum = beerNum - 1;

if (beerNum > 0)
{ System.out.println(beerNum + " " + word + " of beer on the wall"); }
else
{ System.out.println("No more bottles of beer on the wall"); }
}}}

Output: (counting down from 99)
3 bottles of beer on the wall
3 bottles of beer on the wall
3 bottles of beer.
Take one down.
Pass it around.
2 bottles of beer on the wall
2 bottles of beer on the wall
2 bottles of beer.
Take one down.
Pass it around.
1 bottles of beer on the wall // Here is the flaw I need to fix!
1 bottle of beer on the wall
1 bottle of beer.
Take one down.
Pass it around.
No more bottles of beer on the wall

I of course immediatly had to add a line to improve the formatting, it took me about 5 or 10 minutes to trouble shoot it the actual problem which was an IF that needed to be moved.

public class HelloWorld
{
public static void main(String[] args)
{
int beerNum = 5;
String word="bottles";
while (beerNum > 0)
{
System.out.println(beerNum + " " + word + " of beer on the wall");
System.out.println(beerNum + " " + word + " of beer.");
System.out.println("Take one down.");
System.out.println("Pass it around.");
beerNum = beerNum - 1;
if (beerNum == 1)
{ word = "bottle"; }
if (beerNum > 0)
System.out.println(beerNum + " " + word + " of beer on the wall");
System.out.println(" ");
}
else
{ System.out.println("No more bottles of beer on the wall"); }
}}}

Output:
3 bottles of beer on the wall
3 bottles of beer.
Take one down.
Pass it around.
2 bottles of beer on the wall

2 bottles of beer on the wall
2 bottles of beer.
Take one down.
Pass it around.
1 bottle of beer on the wall

1 bottle of beer on the wall
1 bottle of beer.
Take one down.
Pass it around.
No more bottles of beer on the wall

The first things I tried where changing the 0's in some of the equations to 1, and in one situation it almost seemed to fix it but it still had problems. It's so scarey to bug fix in a new language. For several months at work all I did was bug fix XHTML and CSS for browser problems IE/Netscape/MAC/Firefox. I used to hate debugging, but after I got good at it I really started enjoying it.

This week at work I have been listening to tapes/video's of Customer Service Reps using some of our system and making notes about the success and failures they may have. It's interesting, but it's great to get a break and do some code. Flex's the brain.

Not to bad for my first time I guess.

Posted by brandy at 04:44 PM | Comments (0)