Meaningless Drivel is fun!*
The moose likes Agile and Other Processes and the fly likes General thought about real world practices Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "General thought about real world practices" Watch "General thought about real world practices" New topic
Author

General thought about real world practices

Linda Thomas
Ranch Hand

Joined: Jun 21, 2004
Posts: 36
I'm a bit of a perfectionist as well as a student working at the college web department and I see a lot of areas I think could use improvement.

The turnover of students and the changing practices from the web master can make coding here difficult. Especially if he says "oh go to <insert project name> it did similar thing I want you to do now". Well there are no standards here for students and his changing policies can make adapting a project time-consuming.

Plus then he is always saying "well it shouldn't take that long to do this simple thing". Well it can be when each student codes a different way. Anyone here who's tried to modify or fix the code of another programmer can attest to this if there are no company standards and everyone coded the way they were most comfortable with or thought was the most effecient method. Now with students its even worse because they have no work experience so they code however they want and they whine about any demands for conformity from our teachers regarding assignments. It has come to the point that teachers now joined forces and created a basic program book outlining coding standards, which has only lead to more complaining.

Having had to modify or extract code from students come and gone I see the point these teachers are pushing.

So I've found allies in my fight to lay out procedures and coding for all students in our position (web master agrees this is a good idea but is not helping with input since he changes his mind which would be ok if he notified us so we could update our info).

Our goal is a book to introduce new students to how we code and what we expect them to follow. The site may convert over to another language and our database is corrupted with functions to handle special characters. I want to push the use of beans for complicated programs. I've even used a simple session variable to handle fields with special characters.

Problem is we have no direction. I think we are dumping way to much into our user folder. I think it should have standards, how to declare variables (strVariable or Variable or Variable_name) as well as other stuff that would make our code consistent so that if I pick up someone else's project I can easily understand and work on it.

If consistent standards are laid out then all our programs will match and taking components from different programs would be easy and make a new student get into coding faster, easier and with less messy code.

Plus one guy keeps throwing in code from different projects. The file is getting too huge and I want to tone it down.

My vision is a shelf with a ring binder for each project explaining its purpose and features and getting into some of the indepth stuff, especially stuff that might be unique to that project. A larger binder for projects that are larger scope. A binder defining standards such as naming conventions etc. Maybe a binder with introduction to their new job and how we work here.

I would like to know how this would be handled in an IT environment in the industry. What is really required? How should it be broken down? (Because if someone dropped a 3 inch binder infront of me my eyes would glaze over and I'd be on the hunt for a coffee and donut). Do we really need all the code from each project on hard copy? I think a binder explaining it, maybe listing all the pages and their purpose. What information should be at the top of the page of the actual file? Like Name of file, author, date, purpose, include folders, etc?

We know what we'd like but we've lost our focus and its all one big mess at this point and we will be training 2 new students come April and I would like to have a basic system set up that all students that follow can continue and the web master can easily add his input into.

Sorry for rambling but this I feel is important to the efficiency of our department. We may only be students but I'd like to run like a professional web department so the transition of leaving and going somewhere new will be an easy one.

Could someone in the IT community give a break down of how this is handled in their workplace or how they think would be a more effective way to set this up.

[ January 06, 2005: Message edited by: Aurelia ]
[ January 06, 2005: Message edited by: Aurelia ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi,

Welcome to JavaRanch!

I hope you won't think it's rude of me to point out the irony here: your post is about standards and adherence to same, but you've failed to adhere to the standards of our community! When you sign up, you're given the chance to read about our policy on display names, which requires you to use a real-sounding first and last name. You can change your display name here. Thanks for doing so at your earliest convenience.

Now, as to your question: I'm glad you have an interest in software process. Not everyone does, and that leads to messy and disorganized work. The process of software development has been studied as an academic discipline for years, and there's a substantial literature, both academic and applied. Perhaps the single best entry point into this literature is Steve McConnell's Code Complete I urge you strongly to get a copy and read it. It will be an epiphany.

Because your question isn't a beginning Java question -- indeed, doesn't seem to be a Java question at all -- I'm going to move it to our Software process forum for further discussion.

Good luck!


[Jess in Action][AskingGoodQuestions]
Linda Thomas
Ranch Hand

Joined: Jun 21, 2004
Posts: 36
Ok sorry about that! My login is Aurelia and I am not sure how but when I posted my name was listed as Aurelia Varga (somehow combined my login and username). So I just deleted the Varga part since my login was Aurelia. Thanks for pointing this out for me. I've changed this in my profile and did some testing here:
http://www.coderanch.com/t/2500/Ranch-Office/Testing
On another site if I make any change to my profile like avatar, sig or name it shows up in all old posts but this site handles it differently, which is neat since some ppl may change their handles over time or change names.

Feel free to delete that post, it was a test of mine to see where I went wrong but might be interesting to read. I will watch more carefully to see what name appears on my new posts.

I wasn't sure where to put this post. It's more of an industry practice post or how to be an organized programmer post. Thanks for moving it here. It has been a while since I registered and read the policy so I'm gonna give it another read tonight after work.

Also what generally would go into a Project folder? My co-worker wants to print off every single piece of code but I wonder if just burning a cd to slip into the folder might be a better idea.

Anyway thanks listening!
Linda
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Originally posted by Linda Varga:

Also what generally would go into a Project folder? My co-worker wants to print off every single piece of code but I wonder if just burning a cd to slip into the folder might be a better idea.


As I said, reading McConnell would be an epiphany. You'd change the question to "Should there be a project folder?" and understand that "no" is a perfectly good answer. A project folder that contains the code itself is not a good idea, although one that just contains guidelines and practices is certainly justifiable. Keeping printouts of code in a folder just creates a new and onerous responsibility for the project manager: that of keeping the code in the folder up to date. That's a lot of work, and there's really no point, as I'll explain next.

There are many professional practices that could benefit your teams. Perhaps the first one with the biggest "bang for the buck" would be to use version control. If your software were stored in a version control system, available on your network, then anyone with the authority could have access to any file in any project at any time; and furthermore, this would include not only the current version, but yesterday's and last week's and any version from any point in time back to the beginning of the project. Nothing would ever get lost, and it would always be easy to revert to an earlier version to backtrack an ill-advised change, or find out why some version used to work and the current one doesn't.

So all the project folder needs to explain is how to get your own working copies of the project files from the version control system (many people use CVS, by the way, which is free and available here, among other places) and how to use the version control system to update those files and commit changes back to the repository.

Note that McConnell has lots to say about those header comments in individual files, coding standards, and all of your other questions as well!
[ January 06, 2005: Message edited by: Ernest Friedman-Hill ]
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
You're correct: peoples' eyes glaze over when asked to wade through documentation binders.

Getting everyone on the same page isn't an easy problem. The more things there are that you want to standardize on, the less compliance you're going to get.

To speak to coding standards: McConnell's Code Complete is a good book to give you an idea of what standards are valuable and why. But you'll never get students to read it (and it's hard to get employees to do that as well). Even if they do read it, there are lots of variant directions in which they could go.

Something I've found very effective is to produce a one-page document that shows what the code should look like. The standards are implicit in the code. Give it to the students and say, "your code must look like this."

You might add another sheet that goes over a handful of simple, key rules. If you produce more than that, people don't remember all the rules. If instead, you keep the guidelines brief, and explain the reason behind them, people will be more likely to follow them. Some level of code divergence is OK past key concepts.

The other part is that you need to somehow enforce the rules. Don't accept code into your common repository unless it meets the standards.

-j-


Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
As our naming policy shows nicely, having a policy documented doesn't mean that it will be followed. Not everyone reads it, not everyone understands it the same way, and sometimes as humans we even just lack the discipline to follow them.

In my opinion, there are three things you can do to increase the probability that a policy is followed:

First, make the policy a policy of the team. That is, insist on the existing of, say, a coding standard, but let the whole team decide what it should look like. That might be harder in your environment because it sounds as if you actually don't really have a team, but it might be worth thinking about. People are much more likely to follow rules if they understand them, and even more if they contributed to their existence.

Second, make as much of the policy automated as possible. For example, to follow our code formatting policy, one has just too import the right configuration file into Eclipse and autoformat the code before committing to the repository. Our CVS server rejects commits with empty comments, so that you can't forget to enter one. Code needs to pass all the existing unit tests, so we have a Cruise Control server running which checks for that - etc. pp.

Third, and perhaps most importantly, build a strong community. For people to not work in isolation, to think about what's important for the community, they need to be aware of it and understand the forces inside it. Let people collaborate, let them do code reviews, perhaps even pair program. Meet regularly to discuss problems you face and find solutions together. (I assume daily stand up meetings wouldn't work in your environment. If you can do them, they can be quite effective.)

Hope this helps...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
I second the comment that you should use a source code repository. Think carefully about its organization, since that's not always easy to change.

I think that in your situation, syntactical coding standards like naming conventions are not nearly as important. Students exposed to only one style of coding often have difficulty adjusting when they get out into the real world, and need to use the style of their new employer. Better for them to be exposed to multiple styles as students, so that they can adjust appropriately when they get into the real world.

It's more important to get people to properly organize and modularize their code, for example extracting reusable classes and functions rather than just copying and pasting code. A source code repository with the proper categories for common and library code will help in this process.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General thought about real world practices
 
Similar Threads
Helpful back-to-school tips
vocabulary
Date javascript drop downs dynamically filled with jsp
Newbie help - forms and javabeans
Any suggestions for software to teach Java?