[vmchecker-dev] Status Commander
Alexandru Moşoi
brtzsnr at gmail.com
Fri Sep 12 16:18:36 EEST 2008
superb...
inca niste chestii de coding style:
- spatii inainte si dupa operatori ( a = b nu a=b, a + b nu a+b) -> ai
sarit-o data trecuta
- concatenate -> folosteste ostringstream in loc de concatenate,
oricum ai inteles gresit ideea... nu e frumos sa apara chestia aia
dubiosa acolo. majoritatea stringurilor pe care le construiesti au cam
aceeasi forma, deci opti sa le pui intr-o functie clara:
bla( RUN_OUTPUT_FILE) {
return concatenate (23,"scp", " ", jobs_path, "/",
KMESSAGE_OUTPUT_FILE, " ", username, \
457 "@", ip, ":", "\"",
vmchecker_root, "/", "checked", "/", job_id, \
458 "/", user_id, "/",
upload_s, "/", RUN_OUTPUT_FILE, "\"");
459 }
intreaba-te (ipotetic)... daca trebuie sa specifici calea catre
ssh-keys in cate locuri trebuie sa modifici? eu am incredere ca poti
sa faci a.i. sa modific intr-un singur loc.
- de ce functiile tale sunt atat de rasfirate? practic in unele exista
cate o linie goala intre fiecare oricare doua linii scrise
revin mai tarziu
--
Alexandru Moşoi
http://alexandru.mosoi.googlepages.com
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the vmchecker-dev
mailing list