|
It might actually end up being better than it is..
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I've actually seen a Caeser Cipher[^] used to encode passwords, so that's not too bad by comparison.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
One can only wonder what was going on here....
Public Enum HierarchycalEquitySeachType As Integer
SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
End Enum
|
|
|
|
|
Don't you just love underscores?
I once saw a sproc written by someone who had never heard of DATETIME as a datatype. There were about 3 million lines of "code" and, needless to say, it made vintage cat puke look pretty. The single most lamentable aspect of it, though, was that he padded his names with underscores to make everything the same length (especially ironic given that he didn't see any reason to format his code in any way whatsoever). It all went something like:
select some bilge from badlynamedappointmenttable where is_monday______morning = 0 and is_monday____afternoon = 0 and is_tuesday_____morning = 0 and is_tuesday___afternoon = 0 and is_wednesday___morning = 0 ...
Reams and reams and reams of it.
How long did it take to type? How many hours did he sit there wondering why no-one had ever bothered to put some kind of date handling mechanism into an otherwise sophisticated RDBMS engine? How many times did he resist the temptation to rename his idiot columns because he couldn't figure out how many underscores to type?
These, and many other questions, will probably remain unanswered for as long as the one of what on earth someone meant by ...
'Generates search string using the hierarchy:
'1. SEDOL and ISIN and CUSIP 2. SEDOL and ISIN 3. SEDOL 4. ISIN 5. CUSIP
Public Enum HierarchycalEquitySeachType As Integer
SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
End Enum
?
98.4% of statistics are made up on the spot.
|
|
|
|
|
I know enumerations, but I don't know why underscores would be special in them.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
They aren't in any way - it seems you know enumerations better than the person who wrote that code.
|
|
|
|
|
They are if you get the enum element name using ToString, and then Split it:
Dim h As HierarchycalEquitySeachType = HierarchycalEquitySeachType.SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
Dim HierarchycalEquitySeachType____Value As String = h.ToString()
Dim searchHierarchy As String() = HierarchycalEquitySeachType____Value.Split(New Char() {"_"C}, StringSplitOptions.RemoveEmptyEntries) yOu then have the hierarchy you need.
Probably.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Likely only partially correct. Looking at the comment above the enum definition and at its single member, I conclude that the first split to be done uses 3 underscores, afterwards each item gets split with a single underscore.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
No, the extra underscores are there for emphasis!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Good lord - it's worse that I thought!
(I should have fixed it back then....)
|
|
|
|
|
Picture this. VB.NET code written by a newb that needs to be updated with some support for a new file format.
I'm looking at a single method that's 17 pages(!) long and doesn't return anything.
It contains NINETY EIGHT If statements. Some are chained together with ElseIf , some are nested down to five levels deep.
There is lots of this:
If condition-expression Then
ElseIf condition-expression Then
If condition-expression Then
Else
EndIf
ElseIf condition-expression Then
ElseIf condition-expression Then
Else
End If
Shoot me. Please. I beg of you.
|
|
|
|
|
So do you guys really have no process for vetting noobcode?
|
|
|
|
|
This isn't a production app. It's a tool that's used by a couple of teams, and no, there was no cuh thing a vetting.
|
|
|
|
|
Wait!
I think I know that guy who wrote that method.
I mean, there couldn't be two people in the world that would do that could there?
I thought he was drummed out of development years ago though.
EDIT
Oh, wait, our guy didn't use methods.
He wrote all of his code copy/past style and it was something like 20 pages long too.
It was the same for loop copy pasted over and over.
And, it was in prod and it finally failed in the for loop.
So Instead of fixing it in one place...
Yes, I'm serious.
EDIT 2
And I should mention -- and I'm not kidding -- he was a MCSD. Fantastic test taker, I'm sure.
|
|
|
|
|
Quote: he was a MCSD. Fantastic test taker, I'm sure.
I is all book smarts and stuff now.
|
|
|
|
|
I've been a professional programmer for over 30 years, and can assure you that there are many, many folk who produce that kind of cruft.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
You owe it to yourself and those that follow to refactor that thing. Otherwise, the next If Then you add might cause the compiler to wave the white flag with a "Nesting too deep" error.
Seen it, done it. At least the doesn't have goto's does it? Mine had that too.
|
|
|
|
|
MarkTJohnson wrote: goto You mean something like:
If condition-expression Then
ElseIf condition-expression Then
If condition-expression Then
Else
...
Goto Step123
EndIf
ElseIf condition-expression Then
...
:Step123
...
Goto Step234
ElseIf condition-expression Then
Else
End If
...
:Step234
...
Goto Step123 Oh yeah, that's much more interesting!
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
I know the feeling.
And in SQL too.
|
|
|
|
|
I could swap your VB with some MATLAB I've got hanging around here.
veni bibi saltavi
|
|
|
|
|
I'm having the same issue here, just the code is in JS.
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas.
Carl von Clausewitz
Source
|
|
|
|
|
Paid by the line?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
What verb describes the act of using the phonetic alphabet? (ie: Alpha, Romeo, Foxtrot etc)
Thanks
[EDIT: Ooops seems like I misposted, should've been the Lounge ]
... such stuff as dreams are made on
modified 12-Oct-17 9:47am.
|
|
|
|