One of the dirty little secrets of software that nobody talks about is that very few programmers can actually read code. If you want to be a better programmer, cultivating that ability will serve you well.
Re:Dirty Little Secrets in Software
chaoticset on 2003-07-23T13:49:28
It's a very good suggestion, and I think I will try to do just that. My problem with looking at other people's code has always been that my attempted adherence to style as Outlined By Larry makes my eyes averse to trying to read anything that's not indented, that's improperly indented, that does this or that, etc. As in, most code.Now, I'm told that PerlTidy would go a long way towards fixing something like this. But, besides PerlTidy, are there any tools/techniques you'd recommend for that sort of thing? Is using tools to make source more readable and then trying to read it cheating in some form, or a perfectly natural thing to do? Or is it necessary half the time, anyway?
Re:Dirty Little Secrets in Software
chromatic on 2003-07-23T16:53:41
It's not cheating, so if it makes your life easier, do it. It's also worth learning how to read past bad indentation and style, though it takes up so much of my brainpower I can't do it near the end of the day. Start with perltidy, find a style you like, then apply it to the code. After that, don't touch the code. Just read it.
If you're not sure what something does, write a small program that does only that thing and see what it does. Try changing bits and pieces. It's very experimental and it worked well for me. If it doesn't work for you, there's probably something else that will.