Fun time!This is my attempt at being fun.
I hope it is at least mildly entertaining to you.
The following four snippets were found in production:
int qty = int.Parse(User.Principal.Sales.Count.ToString());
Note that Count is already an int. There's no need to turn it into a string to parse it back to int...
'If the list is empty, I don't raise any specific error. I left the caller to notice the problem...
If rsADO.EOF And rsADO.BOF Then GoTo Clean_Exit
It doesn't seem "Clean Exit" to me...
Function LocalDateTime(Optional dtDateTime As Date = 0) As Date
'STUB: It needs to check if there's a better way of doing it!!
'Description: Provides local date/time when in an American server.
'Last change: May/14/2002
If dtDateTime = 0 Then dtDateTime = Now
LocalDateTime = DateAdd("h", 2, dtDateTime)
Thank God there's no such a thing as daylight saving time. Oh, wait...
Old ABAP programmers use null. Modern ones have better alternatives:
When people leave the company, sometimes they send an email thanking everyone who helped them there.
I received one from Renard (not his real name) with 71 other persons in CC.
A few minutes later there was this e-mail in my inbox:
(I slightly changed the text to protect the guilty.)
It was a pressure for me to work with you.
You are for sure a team player that any manager would want to have as part of their team.
All the best to you!
I thought it was weird to say something like that to someone leaving the company, but, oh well.
Then a couple of minutes later there was another incoming e-mail:
I meant to say "pleasure" to work with you... Please, sorry, my bad!
Finally, my very first strip comic!
(Why, yes, I did it using MSPaint, thank you very much!)
Next week we'll straighten some things to resume working on our transpiler.