• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Passing objects to methods then changing the object's state

minestrone

More fingers than teeth
Joined
Apr 24, 2008
Messages
17,844
Likes received
990
Thanks received
182
Why o why are people still doing this and who is teaching these progammers that they are allowed to do this?

Easily the fastest route to a tulipe codebase.

Does my fuggin head in.

</rantOver>
 
Why o why are people still doing this and who is teaching these progammers that they are allowed to do this?

Easily the fastest route to a tulipe codebase.

Does my fuggin head in.

</rantOver>

Surely you mean just passing a reference to an object, and not the object itself?

Surely, Shirley?
 
Just make everything global; then you can do away with silly little things like parameters.
 
And don't forget to make them all static. That'll help out too.

Great suggestion....You should be a lecturer.

From my experience, education in programming teaches how to write code to solve a problem, it doesn't teach how to structure it, standards and best practices. When I was a perm, i hired a number of graduates, they all completed whatever programming tasks i set them, but the code was atrocious.

I think it should be mandatory for any programming degree to teach design patterns, the standards and naming conventions for the languages they are teaching and testing, programmers i deal with in all my contracts do not have a clue about testing even thought most claim they "in-depth" experience of TDD.

Rant over
 
People still want to create anemic domain models for some reason, domain logic gets littered all over the code base in random places. That goes had in hand with...

iAmGoingToTakeThisObjectsAndDoFiftyChangesToIt( aboutToBeAbusedUpTheArseObject ) ;

which is usually written as...

setState( user ) ;
 
This is why proper programming languages have const.
 
I find the Goto method a great lifesaver. Use it all over the place.
 

Advertisers

Back
Top