(updated)I've had something come up at work that has never happened before, and it's very upsetting to me because I've never had to admit defeat until now.
I work for a large tech company, and I write software for the Federal Government. I've been doing this for 6 years now (in the trade for 15), and the system is very large. In fact, it's one of the largest in the world, because it's not just a specific application that does one task, it's hundreds of applications sitting on top of it's own platform.
Traditionally, the software engineers specialized in specific applications, and you generally stuck with that app for a long time. I had been working in the Surgery application - and to draw a parallel, this would analogous to a software engineer at Microsoft who specializes in the development of MS Word.
About a year and a half ago, the government agency I'm working with got a new IT head who decided to change the way everything was structured. This caused a huge disruption in the traditional ways things were done.. and I was moved to another application, and then another.
The change is like going from working on MS Word, to working on MS Exchange. It's a completely different function, with completely different terminology and infrastructure.
I've done a few coding projects in the new application, and I've been able to get them done because the people who wrote the application originally are available for help, and the code is well written and understandable. I still don't understand the larger concepts very well, but I've been able to make stuff work without really knowing what the point of it is.
A couple weeks ago I was given a task in yet another application.. but it's not really an application. It's a very specific part of the underlying technology that the applications run on. It's like going from working on MS Exchange, to working on Windows Vista itself... without understanding anything about Vista, except knowing the language it is written in.
What they want me to do.. is change the way a checksum is computed on files based on criteria that is added into another file that controls the parameters of how the checksums are computed. They want to be able to filter out certain records from the checksum, and instead of always going in an ascending record order, they want to use a variable definition of ordering the records.
And I am, for the first time since I started writing software a long time ago, stumped.
Here's a fragment of code in the neighborhood of what needs to be changed;
INIT ;The code in this part of the platform is extremely cryptic. It's done in a different style than the applications are written. I have no idea what the variables, such as X0, X1, X2 etc., represent.. or where they get their values.. or what the possible values could be. I don't know their characteristics, if they're strings, or numeric, etc.. or even where they are initialized. To top it off, in this language, variables don't have to be a certain type. The type of variable they are is dependent on how you use them.
K ^TMP("PROOT",$J) ;ROOT of file in the case of pointer...
K ^TMP("UNIQUE",$J) ; Global of unique Values
N X1,X11,X2,X20,X22,X3,X10,X21
;TMP5(sequence #)= 1 if unique value
S DIC=4.005,X=$S(X0:"`",1:"")_X0,DIC(0)="Z",U="^" D ^DIC
I Y=-1 S ERROR="1^Unknown entry of 4.005 File: "_X0 Q
S X0=+Y,X0NAME=$P(Y(0),U) S:'$G(MODE) MODE=+$P(Y(0),U,2) K TMP M TMP=@($$ROOT^DILFD(4.005,,0)_"""AC"",X0)")
; Set TMP5 if pointer type of field
S X1=0,(X10,X20)=0 F S X1=$O(TMP(X1)) Q:'X1 S X2=$O(TMP(X1,X0,0)) D
.S X3=$O(TMP(X1,X0,X2,0))
.S X11=$O(TMP(X1)),X21=$O(TMP(+X11,X0,0))
.I X20'=X2,X2'=X21,'$D(^DIC(X2)),$G(^DD(X2,0))'["EFFECTIVE DATE/TIME" S TMP6(X2,X3)=1
.S X20=X2
.S POINTER=$$POINTER(X2,X3)
.S:POINTER TMP7(X2,X3)=POINTER
D GETS^DIQ(4.005,X0_",","**","","TMP1")
S A="" F S A=$O(TMP1(4.00511,A)) Q:'$L(A) D
For example, if A="5A".. and you write A to the screen, it treats it as a string and displays "5A". If you use it in an equation, such as B=A+1, then B becomes "6", so in that case, A is an integer. If A="A5", and you set B=A+1, then B=2, because it looks at the first character of the "string" in a calculation, and in this language, any non-numeric character is defined as "1". That's just the basics of how a variable works, and it just gets more complex from there.
So.. you can see how incredibly complicated all this shit is.. and they want it done by the end of the month.
I keep staring at it as if I'm going to find the key.. like that movie, A Beautiful Mind.. where Russel Crowe stares at the cryptograms on the chalk board, and then a completely different image formulates in his mind - making sense of it all.
In software engineering, you have to be very literal in everything. You have to find the point where you can start, trace the logic, understand everything it represents, then figure out the logic to tweak to accomplish the goal, while simultaneously accounting for any contingency that could occur because of the change. In this case, I can't find the starting point where I know the state of the system, and what it's variable tables contain. I can't find the starting point to start tracing the logic.
And I had to go to my manager and say, "I can't do this"... and that's never happened before.
She's going to ask another engineer, who might have some insight into this part of the system, to see what they think. I can't imagine that anyone, except the person who wrote the code in the first place, could do this without spending a vast number of hours studying this entire part of this system.
/update
I changed the title of the post to something a little more clever, arrogant, and "elitist".
There was a day when I wanted to code the most uber thing ever.. or solve the un-solvable riddle. Now, I just want to write simple code that does easy stuff, and get paid a lot for it.
I think that comes with age.. and is another reason why most people do their best work while in their 20's. At a certain point, you think.. umm. hell with that crap. I'd just rather start thinking about more philosophical ideas.. and doing things that are just more fun then baking your noodle for hours on end.
It's not that I'm uninterested in anything anymore... but just the nature of what those things are have evolved. I understand my limitations better than I used to, and I'm more comfortable with my level of contribution to the world.
I imagine that my most creative days lay ahead.. as I shift into more artistic interests, rather than pure logic. That's not to say there is no art in logic, but I just don't have it in me. There certainly is art to science and logic. You just have to be a science geek to see it. I've seen code that is simply awe inspiring in it's elegance. It's as if the developer sees things differently than most people.. and where I see things as one step at a time, in a very linear fashion. The truly artful geek may make something work in 10 lines, that I write in 50. In the end, it all works the same, and computers are so fast it doesn't matter.. but you can clearly see the way somebody thinks by looking at their code.
Simply looking at the code I pasted above, I can tell the guy who wrote it is extremely bright.. with pretty much a guarantee an I.Q. over 140, and a very clever imagination. However, he's probably not a very friendly person - because his code is not friendly at all.
I wonder how much of that "art of science" is effort and training, or if it's just a biological difference in some people's brain, where their mind offers them a visual of the elegant approach, instead of just beating it with the well planned steps of brute logic?
2 comments:
lol, mumps sucks.
I can kind of follow it though but it's really really messy.
The task at hand seems to be pretty interesting, I bet you could have just rewritten all this crap to get their output, but that may have taken a long time.
Steve.
It's not that it's messy.. it's just cryptic. The code is super tight.. to the point bordering on writing in machine language. It's just really difficult to read, and then there's a bunch of embedded variable functions where you have to go look up what exactly each of the functions doing.
To top it off.. the whole event is triggered by an HL7 message from a different system.. and I cannot simulate that, and drop a break in the code to look at the variable table - which would make things a lot easier. So, I can't see the state of the system at the critical point I need to evaluate.
And that's all before even modifying anything.. because there's looping done in an explicit way when the checksum is calculated on a record, and they want the looping to be variable based on the contents of of a field in another file... plus screen records based on yet another field in the definition file.
I couldn't write it from scratch, because it doesn't look like it's segmented off into it's own function with a place you can say "this is line 1". It would take ages to rewrite it anyway. Somebody just needs to find where it pulls in the variable file definitions, and re-write the structure of the loop.
DO NOT WANT
Post a Comment