File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes I'm feeling a little...... frustrated..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "I Watch "I New topic
Author

I'm feeling a little...... frustrated.....

Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1613
    
  10

I'm in college. I just worked my butt off for 6 credits in Java programming...

I understand syntax, loops, OO concepts, basic JDBC concepts, design patterns... I can use the API... I can find answers when I'm not sure there are any.

But they don't teach you how to write code... this way... in school. You learn how to make it work. Sometimes, the more lines the better.
I learned that if there's more than a couple lines in a row not commented, you must not know what you're doing and no one else will either.

I just wish college taught real life things like making readable code. Or at least suggested it as a concept.

Looking at what my latest submission turned into from what it was made me realize how frustrating this is to have to learn "again" instead of learn "the first time".

/vent

Thanks for listening.... any feelings are welcome and appreciated.


When you do things right, people won't be sure you've done anything at all.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
I can so totally empathize.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Well you can take a peek at this http://www.javaranch.com/style.jsp
These are more of guidelines. Every company will have their own guidelines, but the core will be similar to defined in the above link.

Sometimes, the more lines the better.
Well this will always work if you are getting paid by number of lines of code
While writing code, I always try and follow the KISS principle. Always keep the code simple and easy to understand.

Take a peek at the java source code. That is one of the examples how good code should be written.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

I am definitely with you on this one. Sometimes students do not have plenty of time to program so they make it want to JUST work and then move on to the next one. Maybe you can suggest to the class that there should a guideline (like the one we use here) for writing code. Wait...thinking about it. That might actually be covered on another class.

my ten cents


star chaser..
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1613
    
  10

Thanks for everyone's input....

I'm just holding onto "what does not kill me will make me stronger"

.... and hoping that other entry level graduates just won't be able to compete for a job with all my new fancy tricks
W. Joe Smith
Ranch Hand

Joined: Feb 10, 2009
Posts: 710
I wasn't a computer science major, I was a management information systems major, but we still had some coding experience. I had the same type of experience as you. We could write the most convoluted, hard to read, terrible code and as long as it worked we got most of the points. There were some points taken off for lack of documentation, which was really just comments in code saying "Calculate interest" and things like that. Otherwise the majority of my professors would just run test data through our programs and if they worked properly then we were good. Of course, I'm slightly obsessive about code styling, and not having proper naming conventions/indendation/useful variable names and the like drives me crazy....


SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
Katrina Owen
Sheriff

Joined: Nov 03, 2006
Posts: 1344
    
  12
I spent TONS of time on my programming assignments in college, but there was no guidance as to how to do something better. We didn't learn anything about how to break problems down, how to debug, or any sort of best practices whatsoever.

Then I found the Cattle Drive and learned more in 20 lines of code than I had in months of classes and assignments.

In three words: Readability, readability, readability...
There is so much more to readability than formatting!
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1613
    
  10

I'm totally learning a lot.... and it really helps to have a real person to ask questions because all my classes were online so I am all but self taught. I mean, except all the discussion I got here in the Saloon.... It made me pretty good at figuring things out, but I never felt like any real person looked at my code (even though they did).

Everything I've submitted works... except the time I thought I was being slick and edited something with a billion parenthesis in my email. And if I were smarter about testing (working on it...), I could even have made these things *functionally* flawless out of the gate. But they're not GOOD. As the matter of fact, making them GOOD is harder than the original coding. Figuring out why something isn't good is pretty hard, too.

The worst part is, it's like things are so obvious when they're pointed out.... and I say to myself, "wow... that was dumb... I didn't even notice." And I sit there on the next submission.... for a while.... and I stew about it. And I REALLY feel like it's the best... perfect even.

And then, I have a little bird who emails back and politely tells me, down to the letter, how it sucks.
... and she's right.

I'm just wondering when I'm going to not feel like it's so HARD to make things EASY.
Katrina Owen
Sheriff

Joined: Nov 03, 2006
Posts: 1344
    
  12
Janeice DelVecchio wrote:
I'm just wondering when I'm going to not feel like it's so HARD to make things EASY.


I still think its hard to make things easy... but not quite as hard as it used to be. Certain things become habit. I don't find good names on the first try yet (maybe I never will), but I'm a bit better at it than I was, and I generally keep thinking about things to find better names.

Right now a friend of mine gave me the bowling kata from approvalstest.com and it p0wning me! It's great fun, and I got the test passing (a.k.a. "to green")... but holy schmoly my code is ugly. And I'm sitting here thinking there HAS to be a better way. And then I move something down, make a new method, get rid of a redundant line, rename a variable... and... zomg - UGLY. So, yeah
Ian Lubelsky
Ranch Hand

Joined: Feb 10, 2010
Posts: 49
Janeice, remember nothing worth doing or having is ever easy. If everything was easy to do, everyone would be doing it. Also, what you think is hard today, will be simple tomorrow or at least easier.

My teachers and professors at times seemed more concerned with covering every single subject matter for the exams, than ensuring we were truly understanding what they were trying to teach us. That we weren't just memorizing something and spewing it back at them come exam time. In some of my classes I either spewed back their info to them as they "taught" us or I was not going to pass.

I remember when I was taking my I.T. courses, we'd move from one topic to the next without so much as a breath in between. What I was learning in school was the knowledge, but not exactly how this knowledge should best be applied. I quickly learned once I started working that what I learned in school was the ideal way of doing things, but was not necessarily the way things worked in the real world. You take what you learn in school and through experience, learn how to apply that knowledge to make your job easier and better.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20271
    ∞

Janeice DelVecchio wrote:
I'm just holding onto "what does not kill me will make me stronger"


Hmmmm .... a few cookies wouldn't will me ....

(later) .... now I feel strong enough to finish the whole box!


permaculture Wood Burning Stoves 2.0 - 4-DVD set
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20271
    ∞

Different folks have different ways of trying to convey what is in their head into your head. And a lot of times, it really has little to do with your education as it does with your wallet: how to get 400,000 students to believe that the $120,000 they've parted with has left them more knowledgeable.

Nitpicking takes a lot of time.
 
Don't get me started about those stupid light bulbs.
 
subject: I'm feeling a little...... frustrated.....
 
Similar Threads
Help me justify the use of Java!
About Getters & Setters
Help with sorting numbers
who uses algorithms they learned in cs classes?
Benefits of SCJP?