|
Thats why I always be in work, people like that create work for everyone. Oh the inexperienced should be allowed to develop commercial code.
|
|
|
|
|
Did he use the wrong incantations?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
To get the count of items in your table, you would be using SQL's countof[^] (unless this is MySQL specific? )
|
|
|
|
|
Reminds me of one I saw.
To alphabetically sort the ASCII data in a table the moron read the relevant field into a fixed length string array and then he sorted the array.
And guess what the management did to him? He was promoted to team leader eventually! I kid you not.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
Ted Ferenc wrote: And guess what the management did to him? He was promoted to team leader eventually!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
The sad thing was the Software Manager, I was going to run a new branch the firm opened so they needed a team leader, my comment was make anybody team leader except him, even the cleaning lady would be a better choice. I did state that within 6 months he would have totally screwed up the work I had done in making the department function at least tolerably well.
In 6 months I was proved correct, what happened to him?
He left, as he was a team leader, he got a better team leaders job elsewhere!
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
I came across this code snippet in my previous project
[WebMethod]
public DataTable GetEmployeeData(DropDownList ddlEmployee)
{
string empID = ddlEmployee.SelectedValue.ToString();
//do database operation
}
|
|
|
|
|
Make another version that takes a string, redirect the current one to the new one, and mark the current one as Obsolete. See who complains.
|
|
|
|
|
Ok,
This is a coding horror, but this one belongs to Microsoft. As it turns out, if you are trying to connect to an Excel spreadsheet using the OLEDB driver, it tries to infer the datatypes of the columns in your spreadsheet based on the first few (8 by default) rows. All well and good, except when the first 8 rows have numeric values for a particular column, but some of the others have alphanumeric. Then, the driver just inserts nulls (because data integrity isn't important).
Now, you can somewhat fix this with a change to a couple of registry keys and a change to your connection string, but it seems really dumb to have to do that.
Check this craziness out.
http://www.sqldts.com/254.aspx
And no, I'm not submitting this to get help. I'm doing the registry stupidity instead and hoping that it doesn't randomly get broken by admins on the web server.
|
|
|
|
|
Oh, yeah, I've bumped up against that sort of thing before too, but I've forgotten how I dealt with it, certainly not the (evil) registry. It's been... so long.
|
|
|
|
|
I've dealt with this one. dang what was it. it was an easy fix. Here it is:
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;" & _
"data source=" & result & ";Extended Properties='Excel 8.0;IMEX=1';")
note the use of the extended properties and how they have single quotes.
[edit] the above treats everything as a string, but does solve the null issue. I found the code from when I had to do a similar program a while back.
|
|
|
|
|
Well, I can't write all the code here because I'd have to write it out 5 times.
Ok, we were supposed to use this company's architeture for a new project because we deal with that company for other unrelated technology. I guess the executive thought that since they do one thing ok, they must have a good architecture for this unrelated technology as well.
So...I check into it. Now I suppose they got an idea in their heads, and that was that "no layer of architecture will trust any other layer of architecture, and the data transfer object will not trust anything". Maniacal Coding. They had identical business code duplicated in at least 5 places because each layer dealt with, and massaged, the data on it's own. I say 5 because, not only was there the logical tiers of processing, but everything existed as a service, and each layer processed each service to see if the user, who existed in a company, in a region, had access to that service in that tier. After all that, then each service would also run its little happy fingers through the data. By the time the data reached the database, the bits were worn pretty thin (hobo data).
The user interface was the same: the business analyst just stopped and said 'no f****** way I'm teaching the client to use this thing', after taking over 30 min *just* to set up a user just with the ability to log in. Hahahah
I threw it all out, and said "Thanks for your suggestion.Thanks for your suggestion.Thanks for your suggestion.Thanks for your suggestion."
GaltSalt
maker of .Net thingys
|
|
|
|
|
GaltSalt wrote: I threw it all out, and said "Thanks for your suggestion.Thanks for your suggestion.Thanks for your suggestion.Thanks for your suggestion."
...
Greetings - Gajatko
|
|
|
|
|
Wow! talking about doing unnecessary extra work!
We have to build a software with an sql Database that will have to check for Orders in our ERP DB (Oracle) So, what was my boss idea?
He made us create a trigger that each time an order was created or modified a record with it's primary key was added in a table, Then we had an oracle process that run each 10' that looked at that table, recollected all the order information and saved it to another table in oracle, hen he made us install Oracle Gateway so we can access the sql server from oracle, So when there was New orders in the processed table oracle would connect to Sql Server and add a record to a Sql Tabla that said there was new data,Then we had another process in sql server that checked this table every 1' if the table said there was new data then another process was run that read the now processed tables with the order informations in oracle and extracted the data, once it extracted the data the process checked for modification o inserts against the Final Sql Server Orders Table! So after all that we Could access the sql server table from the Software and just list the content of the table..
When i told my boss why don't we just Access the orders table in Oracle from the software he told me: Noooo, if they change their TnsNames.ora file it would stop working!!!
|
|
|
|
|
Every once and a while I find a little gem in my own code. I encountered this one today:
if (new Project(pid).HasSubstatus)
useSubStatus = true;
else
useSubStatus = false;
if (useSubStatus)
...
|
|
|
|
|
Don't we all...
I've today found (my code) that was something like:
set
{
if(value!=null)
{
DoSomething();
Trace.Write(value.ToString());
}
else
{
Trace.Write(value.ToString());
}
}
Apart from ugly way to set boolean variable,
eggsovereasy wrote: new Project(pid).HasSubstatus
this just screams "static method"*.
*assuming the language supports it and there aren't any hidden side effects in Project constructor
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
|
dnh wrote: eggsovereasy wrote:
new Project(pid).HasSubstatus
this just screams "static method"
It is not a static method.
*jaans
|
|
|
|
|
But it should be, so I can do:
Project.HasSubStatus(projectId);
|
|
|
|
|
Maybe to determine whether "HasSubstatus" full loading of an object is required AND the object itself is not used anymore AND the useSubStatus is used later.
Anyway, nothing justifies writing
if (new Project(pid).HasSubstatus)
useSubStatus = true;
else
useSubStatus = false;
instead of
useSubStatus = new Project(pid).HasSubstatus;
Greetings - Gajatko
|
|
|
|
|
<br />
If Var1= True then<br />
M_1:<br />
Do some stuff<br />
Else<br />
DO other Stuff<br />
Goto M_1<br />
end if
-----------------
If Var1=True then Goto M2<br />
'Some Code.<br />
Goto M3<br />
M2:<br />
'Other Code<br />
Exit sub<br />
M3:<br />
'Code
------------------
Class Order<br />
'Some Definitions and code<br />
End Class<br />
<br />
<br />
Module1<br />
Public Sub SaveOrder (order as Order)<br />
Code to save the Order<br />
End sub<br />
End module
--------------------------
You have no idea what it's to work with someone like that!!! the worst thing..... He is my boss!!!!!!
-- modified at 23:36 Saturday 18th August, 2007
|
|
|
|
|
I share your feelings, gladdly our boss stopped programming
at least on the projects I work on.
But I can see the madness in the eyes of the guy who have the
benefit of his help.
Thats one of the reasons that dinosaurs shouldn't be allowed to
program in the first place.
codito ergo sum
|
|
|
|
|
The thing is, you can be a young crocodile today but you never know when you're becoming a dinosaur.
|
|
|
|
|
Think about your future or at least your career...
Greetings from Germany
|
|
|
|
|
I am your boss. YOU'RE FIRED! BE OUT OF THE BUILDING IN 5 MINUTES!
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|