VaultNetwork.netVault Network Boards
Author Topic: It takes a certain type of personality to write code [Locked]
Seething199  2 stars
Posts: 358
Registered: 2003-9-23 22:37:41
AzureTyger posted:

Seething199 posted:

it's well in demand because that line of work is a soul killer.



I enjoy it .

Or do you mean the consulting side? If so, then yeah, I will pass on that lifestyle. I work for a major metro hospital system and they treat people very well, although I could live without 24hr pager duty.



we have over 1000 clients with an array of different EMRs that all interpret the HL7 "standard" a little differently. working with client IT departments, EMR vendors, interface middle-men, etc, is a bitch. luckily we have a team for that so i don't have to do it.

 

-----signature-----
You Are
Sofa King
We Todd Ed
Kjarhall  3 stars
Title: The Pungent One
Posts: 915
Registered: 2002-3-1 15:47:21
Sinlock posted:

ZigmundZag posted:

In PowerShell!

Fist_de_Yuma posted:

If (User.Name -ne 'Fisted Puma'
{
User.Politics = 'LIBERALZ'
write-wharbargl
}




The conditional '-ne' is "Not Equal", which means your code will execute when the user is not Fisted Puma. I believe it needs to be changed to '-eq' for 'Equal'.

I've been a software engineer for over 10 years and one of my best skills is debugging other people's code.



Can you write code that will rewrite Fist posts to make him coherent? Or is that beyond anyones mad skillz?

 

-----signature-----
You're a crazy moron*
*http://vnboards.ign.com/outpost/b22180/115147923/r115151508/
hah! true story tho i'm a woman an i even love boobs..how can you not??- HallowEve
Sinlock  2 stars
Title: Savior of the Camelot Outpost
Posts: 376
Registered: 2000-5-14 16:20:01
Taliesihne posted:

Not when you are good at it.



Not true. Dogged, persistent, unwavering patience is mandatory in quality debugging. You cannot be an impatient debugger, or you will fail.

 

-----signature-----
THOOOOKA...THOOOOOKA...THOOOOOKA...
Future Grand President For Life of the Universe (you'll see! you'll be sorry then!)
Outpost Terrorist #1! I don't care what any law says!
Sinlock  2 stars
Title: Savior of the Camelot Outpost
Posts: 376
Registered: 2000-5-14 16:20:01
I wrote this...


Sinlock posted:

if (( ((($clearquest_array[trim($row['cr_id_text'])]['function_assigned'] == $func) || ($func == "func_choose")
&&
(($clearquest_array[trim($row['cr_id_text'])]['discipline'] == $disc) || ($disc == "disc_choose") ))
||
( ((($clearquest_array[trim($row['cr_id_text'])]['function_assigned'] == '' && ($func == "func_blank")
&&
($clearquest_array[trim($row['cr_id_text'])]['discipline'] == $disc || ($disc == "disc_choose") )
||
( (($clearquest_array[trim($row['cr_id_text'])]['discipline'] == '' && ($disc == "disc_blank")
&&
($clearquest_array[trim($row['cr_id_text'])]['function_assigned'] == $func || ($func == "func_choose") ) )
||
(( ($clearquest_array[trim($row['cr_id_text'])]['function_assigned'] == ''&& ($func == "func_blank" )
&&
(($clearquest_array[trim($row['cr_id_text'])]['discipline'] == '' && ($disc == "disc_blank" ) )
)

{
do something
}



...and it still makes me laugh.

 

-----signature-----
THOOOOKA...THOOOOOKA...THOOOOOKA...
Future Grand President For Life of the Universe (you'll see! you'll be sorry then!)
Outpost Terrorist #1! I don't care what any law says!
Taliesihne  4 stars
Title: Wind on the Deep Waters
Posts: 1,117
Registered: 2004-2-19 04:47:59
Sinlock posted:

Taliesihne posted:

Not when you are good at it.



Not true. Dogged, persistent, unwavering patience is mandatory in quality debugging. You cannot be an impatient debugger, or you will fail.



I know, I'm just teasing.

 

-----signature-----
Jesus saves, Allah protects, and Cthulhu thinks you'd make a nice sandwich
First comes smiles, then lies. Last is gunfire. -Roland Deschain, of Gilead
AzureTyger  2 stars
Title: Awesome
Posts: 462
Registered: 2002-4-1 15:49:04
Seething199 posted:

AzureTyger posted:

Seething199 posted:

it's well in demand because that line of work is a soul killer.



I enjoy it .

Or do you mean the consulting side? If so, then yeah, I will pass on that lifestyle. I work for a major metro hospital system and they treat people very well, although I could live without 24hr pager duty.



we have over 1000 clients with an array of different EMRs that all interpret the HL7 "standard" a little differently. working with client IT departments, EMR vendors, interface middle-men, etc, is a bitch. luckily we have a team for that so i don't have to do it.



Yeah that would suck, especially with those awesome vendors who interpret the HL7 standard anyway they want and are big enough to back it up (Cerner, McKesson, Meditech etc). But I don't have to worry as much about that kind of thing because I work on the customer side. God help you if you're a small time vendor going between. It hospitals and big healthcare vendors.

 

-----signature-----
Using the mirror of ridicule to force conservatives to
confront their own stupidity.
Szerek  2 stars
Posts: 338
Registered: 2000-8-8 09:26:09
AzureTyger posted:

eodoll posted:


We are trying to filter orders coming from our EMR based on which ones need to be routed to Cardiology.

Basically if it is cardiology, in location A or B, and not a certain type of EKG or TT we send it.
If it is Cardiology and it is not in location A or B and not among another set of order types, we send it.
Otherwise we discard it.

The code someone wrote before I took over the interface used a series of nested IF statements, which always seem to be difficult to get right in eSQL. I am probably going to just change it to several independent functioms that each set a variable to true or false and then check all of those at the end.



does it look something like this?


Quote:

if cardiology = True then do
..if cardio_loc = 'A' or cardio loc = 'B' then do
....If EKG <> 'X' or EKG <> '' or TT <> 'I' or TT <> 'J' then do
......call SendWhatever
....end
..else do
....if something_else <> another_set_of_order_types then do
......call SendWhatever
....end
....else
......call discard
....end
..end
end

 

-----signature-----
"The reason they call it the American Dream is because you have to be asleep to believe it."
"The IQ and the life expectancy of the average American recently passed each other in opposite directions."
- George Carlin
Szerek  2 stars
Posts: 338
Registered: 2000-8-8 09:26:09
Sinlock posted:

I wrote this...


...and it still makes me laugh.



Have you ever written something, then years later had to go back and make a change and said, "How the hell did I do this?"

 

-----signature-----
"The reason they call it the American Dream is because you have to be asleep to believe it."
"The IQ and the life expectancy of the average American recently passed each other in opposite directions."
- George Carlin
AzureTyger  2 stars
Title: Awesome
Posts: 462
Registered: 2002-4-1 15:49:04
Yes, very similar. I am changing it to do two separate checks that contain each scenario and then setting a Boolean to true or false based on that, then ending it by checking to see if each Boolean passed. So there is only one IF clause withh some ANDs in each one.

 

-----signature-----
Using the mirror of ridicule to force conservatives to
confront their own stupidity.
Szerek  2 stars
Posts: 338
Registered: 2000-8-8 09:26:09
I worked on this doozy a few weeks ago. The programmer that wrote it should be shot because there are better ways to do this. FYI, this is one of 20 if statements like this in the program. Due to the commonalities in the IF clusters the whole program should have been written with a select structure. Of course, they won't give us the time to re-write it, but it is a nightmare to maintain and we spend hours every month patching this POS program up.

So, is it cheaper to re-write the program in 40 hours or spend 10 hours a month for the last 2 years tweaking an abomination?

IF VAR1 OF PASSED-DATA NOT = 'VAL1' AND
...((VAR2 OF PASSED-DATA = 'A' AND
....VAR2 OF PASSED-DATA = 'L' OR
....(VAR2 OF PASSED-DATA = 'S' AND
....VAR3 OF PASSED-DATA =
......VAR4 OF PASSED-DATA) OR
....(VAR5 OF PASSED-DATA > 0 AND
.....VAR5 OF PASSED-DATA <= 165)) AND
...VAR4 OF PASSED-DATA NOT = 'VALUE2' AND
...((VAR6 OF PASSED-DATA NOT = 'D' AND
.....VAR6 OF PASSED-DATA NOT = 'C' OR
....(VAR7 OF PASSED-DATA NOT = 'VALUE3') AND
...NOT ((VAR8 OF PASSED-DATA = 'N' AND
.........VAR9 OF PASSED-DATA = '*' AND
.........VAR10 - VAR11 <= .7) OR
........(VAR8 OF PASSED-DATA = 'N' AND
.........VAR11 OF PASSED-DATA = 'A' AND
.........VAR12 OF PASSED-DATA > 0)) AND
...VAR13 NOT = 0 AND
...VAR14 NOT = 0 AND
...VAR15 >= VAR13 AND
...VAR15 >= VAR14 THEN
...MOVE 'VALUE4' TO VAR16 OF PASSED-DATA

 

-----signature-----
"The reason they call it the American Dream is because you have to be asleep to believe it."
"The IQ and the life expectancy of the average American recently passed each other in opposite directions."
- George Carlin

VaultNetwork.net is an independently operated community forum and is not affiliated with, endorsed by, or technically based on IGN, GameSpy, FilePlanet, GameStats, or the former IGN/GameSpy Vault Network.
References to VaultNetwork.net mean this site/domain. VNBoards-style presentation is a visual homage only. By using this site, you agree to the forum rules.