This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Udayan Patel

Ranch Hand
+ Follow
since Oct 14, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Udayan Patel

Why worry about lines of code and such? Simple answer goes back to early 90's. CC (McCabe's cyclomatic complexity). The more ifs and buts you have in your code the more CC you have. Break down your code as soon as you encounter major control statement (be it class or method). The more CC you have testing and maintenance becomes more difficult.

Originally posted by Don Morgan:
Can some of the arguments be grouped together into objects themselves, and then use a composition relationship?



Exactly, Thats what I was thinking.

Originally posted by Kishore Dandu:


In the same vein, it is not good data design to have about 50 columns in a database table. More than likely the data model is not normalized properly.



well actually no, it is a "highly" (well read overly here) normalized database. However data related to "one transaction" IS huge as it has multiple subsets of data. but instead of these subtype object of their own they are being stored as primitives in master transaction. I still don't buy into constructor with too many parameters.
I can't believe my eyes that I am seeing a constructor with around 50 parameters. My take is, this is ridiculous. your thoughts?
From my experience those kind of people woudn't want to leave the team that they are working with. Most of the times they all are friends in a team and where ever they go, go in group.
Template method : servlet
Singleton : calendar
Find more .....

Originally posted by Steven Witkop:
OMG Certified UML Professional exams are as important as the Sun Certified Java exams.

Good luck on your exams...

-Steven Witkop
SCJP, SCJD, SCEA and OCUP

[ April 04, 2005: Message edited by: Steven Witkop ]



Sun Certified java exams are joke as well.

Originally posted by Stan James:
I thought C++ was an April fools joke.



you can't be serious, are you?

Originally posted by Hu Chong:
I am currently working in a multi-million dollar project with the project team size of around 150+. There are many problems as with other IT projects
of a smaller size.

Care to share your experiences in projects of such size?



My experience with projects like this is
1. project is broken down in modules.
2. each module is distributed to individual team. team size depends on module. but i believe that there will be no more than 10 developers on a team.
3. if you have 10 developers on a team, makes life way to easier. as far as communication goes, I have seen scrum 10 minute morning meeting most efective as it inculdes road blocks and issues. and let tech lead of each team hashout those issues and road blocks.
well this is just my experience.
3.

Originally posted by Vladas Razas:
From C++ I remember Meyers rule "Avoid gratuitious constructors". I forgot why? What terrible things may happen?

Vladas



http://home.earthlink.net/~huston2/dp/init.html
Seriously, what is the point of discussing this? isn't it true that OO technologies are dominating market? Why VB went away? Why PB went away? even though they were considered "OO languages".

Originally posted by Ilja Preuss:


Refactoring is something that is better done every couple of seconds, not at the end of the project.



point well taken. But I also believe that, code changed with fresh set of eyes will be more effective refactoring than done frequently. It is always nice to revisit your code at the end of the day and see if there is any place where you can extract a method or convert your magic strings or numbers to constants.
oops, i missed bool and string part. ah! even method names starts with uppercase. Well but then patterns are suppose to be language independent.
[ January 26, 2005: Message edited by: Udayan Patel ]

Originally posted by Jeroen Wenting:
I doubt that's Java... It reads like C++



No it could be java, when Regular Expressions weren't available.

Originally posted by Jeanne Boyarsky:
Udayan,
While my goal is to have smaller methods, I find 15-20 lines to be a reasonable maximum. Having said that, it isn't worth it for me to add the final keyword. It would only yield a small performance improvement, if any, compared to database accesses and the like. Further, it would make it harder for me to use Eclipse's "extract method refactoring" because I would have to remember to add the final by hand.


point well taken. But don't you think if you are executing a method in a loop it would be a quite a bit performance gain? Not sure I should describe this but here is the excerpt on how JVM operates on final methods:
"If you make a method final, you are allowing the compiler to turn any calls to that method into inline calls. When the compiler sees a final method call it can (at its discretion) skip the normal approach of inserting code to perform the method call mechanism (push arguments on the stack, hop over to the method code and execute it, hop back and clean off the stack arguments, and deal with the return value) and instead replace the method call with a copy of the actual code in the method body. This eliminates the overhead of the method call."


"particularly where your method doesn't change parameters try making them final explicitly." - Methods should never change parameters. This is a poor practice that makes code brittle and harder to understand.



probably not!, I am not sure how many times you change parameters while you have small mathods. we all break down our code to small methods because each method is suppose to check the parameters and do something, most of the time, we don't change value of it. Well I should be speaking for myself. Pretty much most of the time my code is that way.
[ January 26, 2005: Message edited by: Udayan Patel ]