Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Ninja style coding... is it bad?

by bluto (Curate)
on Sep 07, 2004 at 20:37 UTC ( #389206=note: print w/replies, xml ) Need Help??

in reply to Ninja style coding... is it bad?

I'm a ninja coder. I admit it. But in the process, I'm afraid that I've lost my true self. How do I really code?

My style rule: If you have to maintain the someone elses code style, your sanity level will approach the sanity level of the original developer.

I've worked on a large code base with many developers in the past. In general it is a good idea to keep the existing author's style especially if they are still maintaining the code, and it doesn't drive you crazy. I don't look at it as losing myself, but rather being able to adapt.

That said, I feel your pain. My sanity took a hit a while back when I had to maintain a fair amount of code that someone reformatted to their "taste" since they didn't want to maintain the original style. This taste included making lines go past 100-columns by using crazy indentation rules and lots of levels of indentation, introducing non-English comments and variable names to code written entirely in English, and using huge variable names (>60 characters long in some cases). This made it impossible to even diff the code against previous releases and determine what changes were actually made, even with a version control system. My choice was to keep with their "style", reformat the huge amount of code again, or find other work. The other work is working out just fine...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://389206]
[Eily]: choroba but does $name = $1 solve the issue ?
[Eily]: if so, most subs start with my (VARIABLES) = @_ anyway
[moritz]: for short subs, I sometimes let them work on $_[0] directly
[Eily]: moritz but that should be fine unless you modify them
[choroba]: if you modify them, Perl will crash with "Modification of a read-only value attempted" for $1

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2018-02-22 17:26 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (296 votes). Check out past polls.