Kladim se da je ovaj "senior architect" negdje iz Hrvatske, s obzirom da sam u nas sreo jako puno arhitekata i majstora koji su zapravo šampioni prvog reda.
Prenosim jedan primjer programiranja:
"Our Senior Architect likes the idea of keeping things simple," Stephen B, "no stored procedures, no parameterized queries... just simple, simple strings."
"So, in keeping up with the 'simplicity', following is one line of code from one of the business objects in one of the modules in one of the layers in our system. I think it speaks for itself."
return ((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((
str + "'" +
this.Acct.Replace("'", "''") + "', ") + "" +
this.AcctDist.ToString().Trim() + ", ") + "'" +
this.BatNbr.Replace("'", "''") + "', ") + "" +
this.CmmnPct.ToString().Trim() + ", ") + "" +
this.CnvFact.ToString().Trim() + ", ") + "'" +
this.ContractID.Replace("'", "''") + "', ") + "'" +
this.CostType.Replace("'", "''") + "', ") + "'" +
this.CpnyID.Replace("'", "''") + "', ") + "'" +
this.Crtd_DateTime.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.Crtd_Prog.Replace("'", "''") + "', ") + "'" +
this.Crtd_User.Replace("'", "''") + "', ") + "" +
this.CuryExtCost.ToString().Trim() + ", ") + "'" +
this.CuryId.Replace("'", "''") + "', ") + "'" +
this.CuryMultDiv.Replace("'", "''") + "', ") + "" +
this.CuryRate.ToString().Trim() + ", ") + "" +
this.CuryTaxAmt00.ToString().Trim() + ", ") + "" +
this.CuryTaxAmt01.ToString().Trim() + ", ") + "" +
this.CuryTaxAmt02.ToString().Trim() + ", ") + "" +
this.CuryTaxAmt03.ToString().Trim() + ", ") + "" +
this.CuryTranAmt.ToString().Trim() + ", ") + "" +
this.CuryTxblAmt00.ToString().Trim() + ", ") + "" +
this.CuryTxblAmt01.ToString().Trim() + ", ") + "" +
this.CuryTxblAmt02.ToString().Trim() + ", ") + "" +
this.CuryTxblAmt03.ToString().Trim() + ", ") + "" +
this.CuryUnitPrice.ToString().Trim() + ", ") + "'" +
this.CustId.Replace("'", "''") + "', ") + "'" +
this.DrCr.Replace("'", "''") + "', ") + "" +
this.Excpt.ToString().Trim() + ", ") + "" +
this.ExtCost.ToString().Trim() + ", ") + "'" +
this.ExtRefNbr.Replace("'", "''") + "', ") + "'" +
this.FiscYr.Replace("'", "''") + "', ") + "" +
this.FlatRateLineNbr.ToString().Trim() + ", ") + "" +
this.InstallNbr.ToString().Trim() + ", ") + "'" +
this.InvtId.Replace("'", "''") + "', ") + "" +
this.JobRate.ToString().Trim() + ", ") + "'" +
this.JrnlType.Replace("'", "''") + "', ") + "" +
this.LineId.ToString().Trim() + ", ") + "" +
this.LineNbr.ToString().Trim() + ", ") + "'" +
this.LineRef.Replace("'", "''") + "', ") + "'" +
this.LUpd_DateTime.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.LUpd_Prog.Replace("'", "''") + "', ") + "'" +
this.LUpd_User.Replace("'", "''") + "', ") + "'" +
this.MasterDocNbr.Replace("'", "''") + "', ") + "" +
this.NoteId.ToString().Trim() + ", ") + "'" +
this.OrdNbr.Replace("'", "''") + "', ") + "'" +
this.PC_Flag.Replace("'", "''") + "', ") + "'" +
this.PC_ID.Replace("'", "''") + "', ") + "'" +
this.PC_Status.Replace("'", "''") + "', ") + "'" +
this.PerEnt.Replace("'", "''") + "', ") + "'" +
this.PerPost.Replace("'", "''") + "', ") + "'" +
this.ProjectID.Replace("'", "''") + "', ") + "" +
this.Qty.ToString().Trim() + ", ") + "" +
this.RecordID.ToString().Trim() + ", ") + "'" +
this.RefNbr.Replace("'", "''") + "', ") + "" +
this.Rlsed.ToString().Trim() + ", ") + "'" +
this.S4Future01.Replace("'", "''") + "', ") + "'" +
this.S4Future02.Replace("'", "''") + "', ") + "" +
this.S4Future03.ToString().Trim() + ", ") + "" +
this.S4Future04.ToString().Trim() + ", ") + "" +
this.S4Future05.ToString().Trim() + ", ") + "" +
this.S4Future06.ToString().Trim() + ", ") + "'" +
this.S4Future07.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.S4Future08.ToString().Trim().Replace("'", "''") + "', ") + "" +
this.S4Future09.ToString().Trim() + ", ") + "" +
this.S4Future10.ToString().Trim() + ", ") + "'" +
this.S4Future11.Replace("'", "''") + "', ") + "'" +
this.S4Future12.Replace("'", "''") + "', ") + "'" +
this.ServiceCallID.Replace("'", "''") + "', ") + "" +
this.ServiceCallLineNbr.ToString().Trim() + ", ") + "'" +
this.ServiceDate.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.ShipperCpnyID.Replace("'", "''") + "', ") + "'" +
this.ShipperID.Replace("'", "''") + "', ") + "'" +
this.ShipperLineRef.Replace("'", "''") + "', ") + "'" +
this.SiteId.Replace("'", "''") + "', ") + "'" +
this.SlsperId.Replace("'", "''") + "', ") + "'" +
this.SpecificCostID.Replace("'", "''") + "', ") + "'" +
this.Sub.Replace("'", "''") + "', ") + "'" +
this.TaskID.Replace("'", "''") + "', ") + "" +
this.TaxAmt00.ToString().Trim() + ", ") + "" +
this.TaxAmt01.ToString().Trim() + ", ") + "" +
this.TaxAmt02.ToString().Trim() + ", ") + "" +
this.TaxAmt03.ToString().Trim() + ", ") + "'" +
this.TaxCalced.Replace("'", "''") + "', ") + "'" +
this.TaxCat.Replace("'", "''") + "', ") + "'" +
this.TaxId00.Replace("'", "''") + "', ") + "'" +
this.TaxId01.Replace("'", "''") + "', ") + "'" +
this.TaxId02.Replace("'", "''") + "', ") + "'" +
this.TaxId03.Replace("'", "''") + "', ") + "'" +
this.TaxIdDflt.Replace("'", "''") + "', ") + "" +
this.TranAmt.ToString().Trim() + ", ") + "'" +
this.TranClass.Replace("'", "''") + "', ") + "'" +
this.TranDate.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.TranDesc.Replace("'", "''") + "', ") + "'" +
this.TranType.Replace("'", "''") + "', ") + "" +
this.TxblAmt00.ToString().Trim() + ", ") + "" +
this.TxblAmt01.ToString().Trim() + ", ") + "" +
this.TxblAmt02.ToString().Trim() + ", ") + "" +
this.TxblAmt03.ToString().Trim() + ", ") + "'" +
this.UnitDesc.Replace("'", "''") + "', ") + "" +
this.UnitPrice.ToString().Trim() + ", ") + "'" +
this.User1.Replace("'", "''") + "', ") + "'" +
this.User2.Replace("'", "''") + "', ") + "" +
this.User3.ToString().Trim() + ", ") + "" +
this.User4.ToString().Trim() + ", ") + "'" +
this.User5.Replace("'", "''") + "', ") + "'" +
this.User6.Replace("'", "''") + "', ") + "'" +
this.User7.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.User8.ToString().Trim().Replace("'", "''") + "', ") + "'" +
this.WhseLoc.Replace("'", "''") + "' ");
Najbolji od svega je komentar na dnu:
// ED: line breaks added for clarity
Tko otkrije što je sve ovdje pogrešno i zašto, dobije popust na karton kad ga zasluži!