Marc
Well-known member
OK just had to get this out...... Decided on coding a backup solution for my databases on the server, for no other reason than its somethin to do. SO basic idea is I will connect to server via SSH mysqldump the database with gzip and a date stamp, download via sftp and will be run on a daily basis automatically as a service on windows.
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:
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
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