 |
|
 |
I'm working with some really bad code at the moment. There is some code which joins a load of values (integers) with '~', and then it passes it to a function. So it would be something like 1~5~12~3 etc. In the function it then splits this values on the '~' to get each value. It would be so much more readable, efficient, and less frangile if they had used an array. It amazes me how these people do their job. The other code in the project isn't much better either, actually the other problems are more difficult to fix. I hate blaming other peoples code, but I think that's what I will need to do.
|
| Sign In·View Thread·PermaLink | 4.41/5 |
|
|
|
 |
|
 |
I suspect this kind of genius deservse some sort of coding award. Shall we call it the "Golden Hammer" ?
CCC solved so far: 2 (including a Hard One!) 37!?!! - Randall, Clerks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
I can think of a few you can have - do they have to be virgins?
(buyer collects, sold as seen and definately without warrantee)
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Maybe not in the states, but in europe software developers are next only to film and pop stars in the "shagabillity" stakes! Unless they are VB developers, obviously.
</lie mode>
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
It's a normal practice that the company does... they just find their own way to develop something interesting and land up into something weird...
Post it in some newspaper it is a sure shot horror....
syth.feana
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Member 4487083 wrote: I'm working with some really bad code at the moment. There is some code which joins a load of values (integers) with '~', and then it passes it to a function. So it would be something like 1~5~12~3 etc. In the function it then splits this values on the '~' to get each value. It would be so much more readable, efficient, and less frangile if they had used an array. It amazes me how these people do their job. The other code in the project isn't much better either, actually the other problems are more difficult to fix. I hate blaming other peoples code, but I think that's what I will need to do.
You're right; that is completely retarded.
Sincerely Yours, Brian Hart
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Oh trust me, this code (may be in JSON format would help?) is MUCH better for passing stuff across the process border and through shared memory then defining all the data in structures in IDL file and implement custom COM marshaller. Then any single access to this data structure causes almost 1000 disk read operations (it reads TLB from DLL) - I had to debug it, and it is not fun.
Once again, if they use this ~ for passing data across the process border - I would not blame them - yes, I would use SafeArray instead, but still I would not blame these guys.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I've been rewriting a system that was originally written in VBScript. Yes, that's 5000+ lines of VBScript with no white space, and no comments. That alone has had me crying for weeks/months, but this pushed me over the edge:
At one point in the application we generate documents, to do so we pass a piece of XML to a third party utility that does a Word Merge (or whatever kids are calling it these days). Rather than pass each piece of data as a separate element they are doing some of the formatting in the VBScript.
Instead of passing
John Smith 1/1/1970
They are passing: John Smith {they insert a vbtab} 1/1/1970
I can't change the document template, so for now I have to reproduce this horrible code in .Net. I'm going to spend a few hours in the shower tonight crying and trying to scrub off that dirty feeling...
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
 |
Ouch!
I Hate having a dependency system that takes data in a certain way. You have to continue using the "bad" code!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Cancel = True Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
0. Find the person who write this code. 1. Work out were they live. 2. Break into the home. 3. LEave a severed head in his head.
Panic, Chaos, Destruction. My work here is done.
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
 |
Yes, only this one was even a bigger horror especially since it only has one line of code that does anything & it's not even something that could raise an error. It's positively lovely.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I've seen this error rig code before. Sage Software has a utility in their MAS500 SDK that you can run to add error handle to all functions and subs that generates code very similar to this. There is no way anyone is hand writing that much error handling for "Cancel = True".
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Yeah, I think this was a plug in which added this mess to all new functions/subs. They've since stopped using it, but it's still as one fugly mug when you see it, especially in something like this. Were I given a free reign, I'd be all over the my delete button right now.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
This is a horror indeed, but one thing puzzles me:
Wes Jones wrote: On Error GoTo aLabel_AfterLabelEdit_VBRigErr
Does VB support "long jumps" or sth? I don't see a aLabel_AfterLabelEdit_VBRigErr anywhere...
Greetings - Jacek
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Here's one I know we've all seen, but it always give me a chuckle:
if ((from i in dc.PRODUCTIONs where i.ACTIVE == true select i.WOID).Contains(getSysId(woid)) == false)
If you think this is bad, you should see how the actual software runs! Ever since I started working for this company, I've had to completely strip and rebuild all the code most of it only half works. I'll post more horrors as I find them. Happy coding!
-- Steven
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |