So like any coder, why reinvent the wheel right? So looking for what other people have done, particularly with connecting to SSH and running commands. When finding an open source jobbie I find that someone has hard coded port 22. Worse than that they have not even put it in a constant and reused it, they have added it a hundred or so times!!
Now I decide Im gonna do some stuff for work as Im peed off with it now and I'll look at it later. So opens a project that is from a coder who used to work with me only to find the following:
- Connect to database
- Fill recordset
- Load into grid
- Set filters
- Record success in database
What on earth is wrong with "public function fillGrid(connStr,gridView) returns bool"?
What is wrong with constants?
As someone learning php and the likes at present I can understand someone not knowing what they are doing a little. However what I cant understand is why someone would not do something fundimental that stops them repeating the same things over and over and over again.
Rant over LOL