What was your most difficult program in Java?
After being in programming for almost 4 years, I was wondering this thing?
What is the most difficult program in Java that you ever faced?
What would be the one thing that you would like to change about Java, that can benefit all?
What is the most difficult part in coding, and why? and what is the best? and why?
I ask this questions to so many people during interview, some are excellent and some are strange.
Can you share your experience with these questions?
This was a general discussion, so I posted this topic here, I hope no one has problem with it...
Newbies can learn a lot from questions like these. Actually this is like going back to basics.
[704 byte] By [
ruuddina] at [2007-10-3 3:24:23]

> After being in programming for almost 4 years, I was
> wondering this thing?
>
> What is the most difficult program in Java that you
> ever faced?
Reversing class files to source because the source had been lost. And the files had some rather large methods.
> What would be the one thing that you would like to
> change about Java, that can benefit all?
Being able to handle logical and binary constants like C++ does would be nice.
> What is the most difficult part in coding, and why?
> and what is the best? and why?
>
All coding? Dealing with someone else's code.
Yeah, seriously. After about 15 years programming professionally, I'd have to say that the difficulties are all about maintenance and ongoing code management. The hardest projects aren't the ones that have some conceptually difficult algorithm or technique; they're the ones where you have to maintain or augment code written by idiots (or those managed by idiots), or when the management selects the wrong tool for the job, and makes outrageous promises about what can be achieved with that tool in a short time.
Sometimes some codes may be modified by several people and they may become dirty or difficult to handle. If that codes are not good and you have the permission to write a new one, you can simplify it.
I have spent one month to rewrite several program. New lines are append from head to tail(original one is still running). After I have written all the codes, old codes are deleted from tail to head.
Refactoring is one of those things that in my experience is sadly observed most often in the breach.("We don't have time to refactor the existing imperfect system! Write a new one from scratch!")
Yes, I agree too, going through a code that someone else has written is the most painful process.
I wont say I never did that, it has happened to me many times that the code I wrote gives horrible time to others, and they found it very difficult to understand what it does...
Using improper procedures, where simple ones exist.
Unnecessarily writing 10-20 (may be in hundreds) lines of code to solve a simple logic.
Is there any tool which runs with the program and gives the programmer an idea of which statement is currently running and where the control is moving? I am talking about visually showing the flow of program.... Is there something like this already, or does anyone think it will be a good or bad idea to bring something for it?
It will certainly solve readability issue by other developers.
You mean a debugger?Yeah, a debugger can be useful for figuring out someone else's code, but then if you write code that requires a debugger to understand then I'd say you've already lost.
> Is there any tool which runs with the program and
> gives the programmer an idea of which statement is
> currently running and where the control is moving? I
> am talking about visually showing the flow of
> program.... Is there something like this already, or
> does anyone think it will be a good or bad idea to
> bring something for it?
You can research code coverage tools.
> You mean a debugger?
>
> Yeah, a debugger can be useful for figuring out
> someone else's code, but then if you write code that
> requires a debugger to understand then I'd say you've
> already lost.
Not necessarilly. Sometimes the simplest implementation can be beyond the easy grasp of a single person to comprehend without tools support, especially when working with distributed components across several servers all required to talk together in order to produce the desired result.
In such cases tracing the flow of code with a debugger is often easier and faster than relying on copious logging code (which needs to be removed afterwards to preserve performance more likely than not).
Of course relying on debuggers for the kind of assignments kids get in school is pure stupidity.
> Yes, I agree too, going through a code that someone> else has written is the most painful process.Not really! Documenting that is even more painful.
>
> (which needs to be removed
> afterwards to preserve performance more likely than
> not).
I have measured that assumption in C++ and java both in server components intended for high volume. For the C++ app the measurement was imprecise but given the constraints of that there was no measurable impact on the system. For java I could measure the impact but it was not close to being significant.