Click here to Skip to main content
15,896,912 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Another one Pin
Burnsys227-Sep-07 3:29
Burnsys227-Sep-07 3:29 
GeneralRe: Another one Pin
blackjack215024-Sep-07 22:36
blackjack215024-Sep-07 22:36 
GeneralRe: Another one Pin
Pete O'Hanlon24-Sep-07 23:12
mvePete O'Hanlon24-Sep-07 23:12 
GeneralRe: Another one Pin
Burnsys225-Sep-07 2:35
Burnsys225-Sep-07 2:35 
GeneralRe: Another one Pin
Steve Hansen26-Sep-07 23:17
Steve Hansen26-Sep-07 23:17 
GeneralRe: Another one Pin
Burnsys227-Sep-07 1:42
Burnsys227-Sep-07 1:42 
GeneralGive your boss a break, man Pin
Xiangyang Liu 刘向阳24-Sep-07 23:13
Xiangyang Liu 刘向阳24-Sep-07 23:13 
GeneralRe: Give your boss a break, man [modified] Pin
Burnsys225-Sep-07 2:26
Burnsys225-Sep-07 2:26 
That's exaclly the problem!!! hehe, he actualy force me to work like him!

I had lengthy discussions with him for that.

Just for example, He keeps using Datatables against collection of custom objects, His reasons:

1: Datatables are fastest and lighter
1: I did a small benchmark code that loaded 10000 Customers to a datatable and to a collection of objects, Collection of objects loaded 3 to 5 times faster and consumed half the memory that datatable

So he switch his argument to:
2:Collection of object are not easily bindable!
2:So i created a collection that inherits BindingList, and showed him!

So he switched:
3:Collection of object are more insecure, becouse you can make mistakes when you fill them!
3:Customer.Name is always more secure that doing DTCustomers("Name")

So in his last chance hi sayd:
4:But collection of objects keeps the memory fragmented, while datatable is loaded in a single continuous block of memory
4:At that point i just say, ok, do whatever you want, you are the boss!!

Well, it's always like that. The other day i discused like 1 hour for this:

We was working on a project and he has done something like this

Dim MIObject as object
Do
    If condition then MiObject = AnotherObject
Loop
MiObject.DoSomenthing


Of course the ide throws a warning becouse "MiObject" could be nothing. So tied of seen that warning, i replaced:

Dim MIObject as object by
Dim MIObject as object = Nothing

So, i spend 2 hour arguing with him, couse he was saying that "= Nothing" loaded the Class in memory and etc...


Or for example, i created a Class customer that we can use in every project, i pass the code to him, and when i get it back i see he made a Public Sub in a module like: "ChangeCustomerEmail(CusId as integer, Mail as String)", God Dammit!! for what the hell i did the customer class then?
So, this is how i work everyday, i am really tired.
GeneralRe: Give your boss a break, man Pin
leppie25-Sep-07 4:12
leppie25-Sep-07 4:12 
GeneralRe: Give your boss a break, man Pin
Xiangyang Liu 刘向阳25-Sep-07 4:52
Xiangyang Liu 刘向阳25-Sep-07 4:52 
GeneralRe: Give your boss a break, man Pin
Tristan Rhodes25-Sep-07 22:48
Tristan Rhodes25-Sep-07 22:48 
GeneralRe: Another from my boss! Pin
KarstenK25-Sep-07 1:20
mveKarstenK25-Sep-07 1:20 
JokeRe: Another from my boss! Pin
Pete O'Hanlon25-Sep-07 1:36
mvePete O'Hanlon25-Sep-07 1:36 
GeneralRe: Another from my boss! Pin
KarstenK25-Sep-07 2:04
mveKarstenK25-Sep-07 2:04 
GeneralTemporal coding. Pin
Burnsys227-Sep-07 1:38
Burnsys227-Sep-07 1:38 
GeneralRe: Temporal coding. Pin
lepipele28-Sep-07 8:22
lepipele28-Sep-07 8:22 
GeneralRe: Temporal coding. Pin
Michael Sync2-Oct-07 21:37
Michael Sync2-Oct-07 21:37 
GeneralRe: Temporal coding. Pin
hogan31-Oct-07 8:02
hogan31-Oct-07 8:02 
GeneralOLE Pin
Lutosław19-Sep-07 1:36
Lutosław19-Sep-07 1:36 
GeneralRe: OLE Pin
NormDroid19-Sep-07 3:33
professionalNormDroid19-Sep-07 3:33 
GeneralRe: OLE Pin
Lutosław19-Sep-07 3:58
Lutosław19-Sep-07 3:58 
GeneralRe: OLE Pin
Pete O'Hanlon19-Sep-07 3:35
mvePete O'Hanlon19-Sep-07 3:35 
GeneralRe: OLE Pin
Mike Dimmick19-Sep-07 4:35
Mike Dimmick19-Sep-07 4:35 
GeneralRe: OLE Pin
Patrick Etc.19-Sep-07 8:21
Patrick Etc.19-Sep-07 8:21 
GeneralRe: OLE Pin
Mike Dimmick19-Sep-07 9:37
Mike Dimmick19-Sep-07 9:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.