Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Improve my coding

by demerphq (Chancellor)
on Jun 13, 2009 at 11:17 UTC ( #771217=note: print w/replies, xml ) Need Help??


in reply to Improve my coding

Well your style will make it difficult to work with others. Have a look at the common styles of coding. If your style isnt relatively close to them then you can a) expect other coders to whine about your code and b) constantly be working on code which doesn't match your style. Which means a combination of frustrating your co-workers and annoying yourself.

Coding style isnt like choosing a pair of shoes. Its about writing code that you and your colleagues can work on and understand easily.

---
$world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771217]
help
Chatterbox?
choroba's discovered two instances of a weird animal in the code at work: \@$var
[Eily]: hum, tied scalar, generates a new array when derefed ? :D
[Corion]: choroba: Ah, when doing a shallow copy, I prefer [ @$var ] - I think \@$var might return the same reference instead of a reference to a fresh copy
[Corion]: perl -wle "my $ar = [1,2,3]; my $br=\@$ar; print qq($ar / $br)" confirms this to me
[karlgoethebier]: "discovered" this to sum an array: perl -E 'say scalar map {1 .. $_} (1..3);'
[Corion]: karlgoethebier: Hahaha :)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2017-09-26 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?