?

Log in

No account? Create an account
Java and other stuff - Redhead Rantings [entries|archive|friends|userinfo]
Lanette

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Java and other stuff [Jun. 2nd, 2009|10:44 am]
Lanette
I wrote my first 2 java programs last night. It was "Hello World" and "This is line 2 of Hello World."

Yes, pretty exciting. One thing I hate about all programming tutorials so far is they don't explain WHY and the syntax is the hard part, but since they have you type out things and never explain WHY you need a freaking ; at the end or it is wrong, I never will remember to add ;

Syntax makes no sense to me when explained as "because you need that to end a statement." I also never can tell what comes from a library and what I'm making up when I need to name something. That's very confusing. When you make .bat files everything is an existing DOS command and/or a filename and you can look it up, but when you are scripting you are making some bizarre mix of stuff that is a name with stuff that already has a name and it's confusing the newbies. Also, there is all of this documentation that supposedly you can look up, yet it all looks confusing because it's so hard to tell what is already there, and what you need to build yourself. I can only do tutorials for about 45 minutes before I have a headache.

In Non-Work news, the drive to work totally sucked today. I'm in pain and construction from **** and other lameness. Trying to get over that.

In happy stuff, I saw Angie last night and she was doing pretty well considering the seriousness of her surgery. It was good to see her. Also, tonight is Man vs Wild with Will Farrell as the guest star and they have my book on CD waiting at the library! I'm happy about both of those. Also, I'll be phosting. I guess that's fun.
LinkReply

Comments:
[User Picture]From: courtly
2009-06-02 08:06 pm (UTC)
But you know lots of programmers! :) :)

Just ask one! I'm not a GREAT programmer, but I can tell you the basics.

For instance... why does it need a semicolon? Because computers are hellishly stupid For example If I leave out punctuation you can still probably figure out where my sentences end Some cues that might guide you would be capital letters and the grammatical flow of a sentence When a thought it complete you (the reader) know it's complete It just works It just makes sense

But a computer doesn't assess when a sentence (a single instruction) is complete. You NEED to tell it. It's like dealing with something less intelligent than a 2-year-old. VERY VERY fast, but with no common sense at all. Each instruction has to be run individually. And it needs to be told when each instruction is over. That's what the semicolons are for.

They could just have used "one line = one instruction" but then they run into the problem of what to do when your instruction is really complicated and runs over several lines. So instead the creators decided the signal that your instruction is finished would be a semicolon. If they'd been english majors, they'd maybe have decided on a period, except they were math types and the period was already in use by the number system and by IP addressing. :)

As for the libraries and commands... actually to someone who had never used shell scripting (BAT), the problem is still kinda the same. What's a command vs a variable? Your advantage is that you already know most of the BAT commands from having typed DOS commands manually (I assume), so you know the so-called vocabulary, and you can read a BAT file fairly easily. Once you have that same level of familiarity with Java (and there is a TON of extra 'vocabulary' with Java, that's true) it'll be fine. But yes, there is a LARGE amount of learning before you can read code easily. It's like... a whole other language. ;)
(Reply) (Thread)
[User Picture]From: starrynytes4me
2009-06-02 08:13 pm (UTC)
I am working on http://www.javapassion.com/javaintro/#Introduction_to_Java_programming and I'm lucky enough to have a co-worker who is correcting my homework and answering my questions as part of a group of 3 people (our self-study group). I'm on lesson 3 right now.

My goal is not to become an expert java programmer, but instead to know enough about Java that I can read and understand the code that the other group is writing. The other group is writing a test automation program in Java that will run a bunch of java scripts and report back pass or fail.

My long term goal is to work on some java based automation where I'm going to be the product owner for a scrum! I'm very excited to put my agile training to use, but I need to know more about Java so I'm a better contributor to the team even though my basic function will be to get good test automation as the product owner by writing good requirements, I also want to understand what my automation is doing and how it's being implemented so that we have a great end result. I'm very picky about validation in test automation, so I want to understand the details of how they are validating.
(Reply) (Parent) (Thread)
[User Picture]From: courtly
2009-06-02 08:18 pm (UTC)
cool - good for you!

It's not the easiest language to learn to read, without first learning to write. (Specifically because of what you've noticed... function names are used as command instructions, and the only reason you'd know what they are is by loading up all of the "include" files and searching through them).

Best of luck! :) :) I've had to do something similar, but my goals were to be able to make updates to someone else's code after they walked away, which honestly I think was EASIER than learning to make sense of another person's entire program.
(Reply) (Parent) (Thread)
[User Picture]From: starrynytes4me
2009-06-02 08:53 pm (UTC)
Thanks! I hope to be writing about more "ah ha!" moments and more tutorials completed as I go along.
(Reply) (Parent) (Thread)
[User Picture]From: courtly
2009-06-02 08:08 pm (UTC)
Can I ask what book or site you're doing tutorials from?

Some are more clear than others.

I've been a fan of the "Head-First" series of books - taught myself the basics of Java and Javascript with them. They explain the concepts of complicated library inclusion in sidebars for those who care. :)
(Reply) (Thread)
[User Picture]From: starrynytes4me
2009-06-02 08:14 pm (UTC)
I'm terrible with books. I have a bunch of unread books. I do better with projects and online tutorials, especially video.
(Reply) (Parent) (Thread)
[User Picture]From: dkstwin
2009-06-03 04:25 am (UTC)
Lanette quit cursing at me in Martian! I only understood about the drive to work and the update on Angie...lol.
(Reply) (Thread)