Programmers Like to Solve Problems – Elegantly.
Programmers don’t like to code?
I totally agree with ‘Wolf’ Rentzsch. Programmers are in their field not because they’re coding-lovers, but because we like to solve problems. I, in particular, like to help people have accessible websites; in the sense that they can edit their files on their own and make it say what they want to say. I also like to make computers talk to each other. It doesn’t really matter what language I use… it’s just a matter of what I know best. Sometimes it’s easiest to use Perl, sometimes PHP and sometimes Bash.
Honestly, you can do loops and branching in Bash (shell). However, I understand Perl loops and PHP conditionals better, so I can solve the problem quicker in those languages.
However, I also value something I refer to as “code elegance” which basically means that if I can solve a problem three different ways in three different languages, I’ll use the one that’s most simple and clean. For instance, I’d rather use a bash construct (for i in $(ls) ) than use a php’s “opendir / readdir / closedir” to get a list of files. If whatever needs to be done with the files can be done easily in bash, I’d just as soon write the whole script in bash. (However, I might have to weigh the simplicity of php’s str_replace() against a pipe through sed in the bash script ).
