Let me tell you some story thats happening now.
couple month ago i hired some folks to do a part of some project due to time limits that i have.
now, i know those guys personally and checking thier technical backgroung seemed to be irrelevant (mistake no' 1).
i thought, how hard can i be to make some GUI to an application that all the other layers are done (3 tier architecture).
So, instead of 1 month development it turned to more than 3 months already, (30% progress)
god knows how long it will take them to finish it .
and now, when i finally see some progress, i see code like this :
if (!Page.IsValid)
{
}
else
{
InsertNewCustomer();
lblClientMessage.Text = NewClientText();
ClearText();
}
ok, who are does guys ?
you think that a skilled programmer with 3 years of expirience would not write such crapy code like this (those things just get me mad.)
why they think that i allow such code to go on production ?
not speaking about the XSS holes that they made (just by the book....)
looks like they didn't read this guide
i mean look at this thing, how many mistakes you can do as a single code :
private string NewClientText()
{
string strNewClient = txtName.Text + " " + txtFamily.Text + " " + "הוזן בהצלחה";
return strNewClient;
}
private void btnAdd_Click(object sender, System.EventArgs e)
{
lblClientMessage.Text = "";
if (!Page.IsValid)
{
}
else
{
InsertNewCustomer();
lblClientMessage.Text = NewClientText();
ClearText();
}
}
private void InsertNewCustomer()
{
Customers newCustomer = new Customers();
newCustomer.Name = txtName.Text;
newCustomer.LastName = txtFamily.Text;
newCustomer.Notes = txtNotes.Text;
newCustomer.isStudent = chkStudent.Checked;
newCustomer.Phone = TxtPhone.Text;
newCustomer.Cellular = txtCellular.Text;
newCustomer.Email = txtEmail.Text;
newCustomer.Address = txtAddress.Text;
if (txtBirth.Text.Trim() != "")
{
newCustomer.BirthDate = Convert.ToDateTime(txtBirth.Text);
}
custDal.Add(newCustomer);
}
- writing data to the page without validating it first
- some logical twists - (if page not valid, dont do anything, else do something...), why on earth ? why ?
- inserting to the database without validating the input (for those who are femilier with my architecture, validating is a single line "entity.Validate();"
- no exception managment what so ever.
- no code comments
- Client side input validations
here is some more goodies from the same author :
lblAddress.Style.Add("text-align","right");
what happened to CSS files ?
thier are lots of lines like this defining the style for every object.
i dont wanna know what are they planned to do when they need to change the style one by one .
man, this is a little piece of code, i'm affraid to see whats going on , on the rest of the code.
this is some lessons that you learn on the hard way....
"i will never hire people without checking thier technical background"
"i will never hire people without checking thier technical background"
"i will never hire people without checking thier technical background"
"i will never hire people without checking thier technical background"
"i will never hire people without checking thier technical background"
"i will never hire people without checking thier technical background"
i should better get some things to my own hands before it gets to late .
anyone wants a job to create some gui ?