Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: IYHO, what do you consider good code?

by allolex (Curate)
on Jun 13, 2003 at 06:02 UTC ( #265589=note: print w/replies, xml ) Need Help??


in reply to IYHO, what do you consider good code?

From a learner's point of view, good code has a lot to do with intuition. It is not true that all good code is understood intuitively. This is due to the necessity of knowing a bit about idomatic Perl and allowing your intuitions to develop before you can really understand someone else's code. Of course, it also helps to know how that person thinks ;)

Unfortunately, the average learner doesn't know enough to have developed good intuition, so comments have to play a role somewhere. Perl can appear to be cryptic because of the shortcuts (e.g. syntactic sugar) that have been built into the language. And then there's the tendency to solve all problems with regular expressions...

So for me, good code is code that is clear once you read it (two or three times) and that has explanations for the stuff that is not so clear.

--
Allolex

  • Comment on Re: IYHO, what do you consider good code?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://265589]
help
Chatterbox?
[TCLion]: Good Morning Monks, I am parsing logs and some date time formats are inconsistent. I am trying to make output all same format. What is the best way to convert a month(word) to month(number)?
[Corion]: TCLion: I'm not aware of a better way than manually building the hash, as all strptime incarnations I know have nasty edge cases

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-03-23 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (287 votes). Check out past polls.