|
yea mate ... after long debug spelling doesn't matter much.. and English ( Engrish ) is not my first language.. I still swear in my mother tongue when I am frustrated...
Zen and the art of software maintenance : rm -rf *
Math is like love : a simple idea but it can get complicated.
|
|
|
|
|
This post made me laugh.
It's not his native language neither mine for that matter.
No shame there, the guy is frustrated.
|
|
|
|
|
virang_21 wrote: Some are at least 500 lines long and loop within loop within loop and so on but this is insane why in the world you have one strod proc that do every CURD operation ? Why .
For fun, I do not see any other 'advantages'.
Nice prefixes - must have been written by a VB6-programmer
Bastard Programmer from Hell
|
|
|
|
|
Eddy Vluggen wrote: must have been written by a VB6-programmer
This joke is less and less funny when you know, work with, and refactor code by vb6 programmers
If it moves, compile it
|
|
|
|
|
loctrice wrote: This joke is less and less funny when you know, work with, and refactor code by vb6 programmers
It's not a joke, it's sarcasm. Those prefixes are heavily in use by both Access (VBA) and VB6 developers. You won't see these kind of examples in a book on Sql. Most "experienced" programmers that I worked with are multi-lingual and rarely label themselves using a certain language.
..and yes, I too, worked a lot with VB6. The Professional edition!
Bastard Programmer from Hell
|
|
|
|
|
|
Pascal Ganaye wrote: Type prefixing is far more common in C++ than VB.
Granted; and Apps Hungarian is still in use, with a good reason. Systems Hungarian has been abandoned, also with a good reason. It's not a problem to have used it, but it IS a problem if you still see a modern-day use. Especially since the argument is over ten years old.
..and ffs, why in Sql? Is it really that complex code? No, it simply someone religiously following his "coding standard".
Bastard Programmer from Hell
|
|
|
|
|
Sometimes because "Our Dear Leader" dictated that all stored procs shall be prefixed with
sp_ at least I could convince him that we should use
usp_ , with difficulty... Sys Hungarian is also common throughout the system, such that
Dim iVariable As String also happens to be a common sight
|
|
|
|
|
Whehe, aight
The last example shows how it does more damage than good. I've seen these quite often, and it costs more time than that it actually helps.
Was I right in my guess? And if I also guess he's Dutch?
Bastard Programmer from Hell
|
|
|
|
|
Again I am playing devil's advocate here.
I am not suggesting that you should write this code.
However
Sometime the DBA through SQL user access rights settings won't let program access the database through SELECT/INSERT/UPDATE statements but allow execution of stored procedures.
In those scenario you must use STORED procedures to do anything.
|
|
|
|
|
I don't mind use of stored proc.. It is terrible when INSERT/UPDATE/DELETE done in the same stored proc and code is calling the same stored proc with only way to find what operation it is doing is via flag is a big fat FAIL !!!
Zen and the art of software maintenance : rm -rf *
Math is like love : a simple idea but it can get complicated.
|
|
|
|
|
Just came across this code from an ex-coworker (names changed to protect the innocent):
Select Case DoStuff(SomeVariable)
Case 0
Case 1, 2
Case Else
result = "omgnub"
End Select
When I saw that, I . Well played, n00b, well played.
|
|
|
|
|
Nice, that's epic!
""Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
That reminded me of a custom exception one of my friends made: NoobDetectedException . He said he would take it out when he turned in the project, but he didn't. The professor hit the exception, and was not very pleased.
The professor showed the class the exception, which had the message: "You are a noob. You will be assimilated. There will be no escape. (This also applies to <professor name omitted>")
public class SysAdmin : Employee
{
public override void DoWork(IWorkItem workItem)
{
if (workItem.User.Type == UserType.NoLearn){
throw new NoIWillNotFixYourComputerException(new Luser(workItem.User));
}else{
base.DoWork(workItem);
}
}
}
|
|
|
|
|
good practices to use a memcached client to make your site faster!
public IEnumerable<Product> GetProductList()
{
List<Product> data = null;
var key = string.Format("{0}", "Some_Beautiful_Key");
if (_cache != null)
if (_cache.Contains(key))
data = _cache.Get< List <Product> >(key);
data = TheDao.GetProductTable();
if (_cache != null)
_cache.SaveOrUpdate(key, data);
return data;
}
Rudy Alvarez // rdebug.com
|
|
|
|
|
Cache smash. Who needs it anyway?
"You get that on the big jobs."
|
|
|
|
|
When you already omit the {curly brackets}, you should not hesitate and do the next step: omit indentation, or better use random indentation.
public IEnumerable<Product> GetProductList()
{
List<Product> data = null;
var key = string.Format("{0}", "Some_Beautiful_Key");
if (_cache != null)
if (_cache.Contains(key)) data = _cache.Get<List<Product>>(key);
data = TheDao.GetProductTable();
if (_cache != null) _cache.SaveOrUpdate(key, data);
return data;
}
And such features will be even harder to spot for the guys who have to fix your code.
|
|
|
|
|
|
I'm the guy that fix code :'( jajajaja
|
|
|
|
|
Just saw this legacy gem
if(myArrayList.Contains(something)==true || myArrayList.Count>0)
{
if(myArrayList.Contains(something)==false)
{
default=something;
}
else
{
default=myArrayList[0];
}
}
this is for C#.net.
|
|
|
|
|
If you look at MSDN[^] you will see it returns a virtual bool , so obviously you can't trust it!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
"virtual bool" so anyone can override to make it float.
|
|
|
|
|
Well, you wouldn't want it to sink, would you?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I love how the first Contains is redundant and the default does not get set if myArrayList is empty.
|
|
|
|
|
Still worse: when the array list does not contain "something", the default is set to something. When the array list contains something, the default is set to the first element of the array list, which may or may not be "something"...
|
|
|
|