Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

LockeNess Monster posted:

Isn't the only thing you need to do to prevent SQL injection is to just use compiled statements?
Yes. Unfortunately nearly every SQL intro tutorial starts with directly executing strings.

Adbot
ADBOT LOVES YOU

Insurrectum
Nov 1, 2005

Mustach posted:

Exxxxxtreeeeeeme MUMPS!



Does Epic have a thing for physics grads? They tried to recruit me last year as I was graduating. Thankfully, grad school went through.

Zhentar
Sep 28, 2003

Brilliant Master Genius

Insurrectum posted:

Does Epic have a thing for physics grads? They tried to recruit me last year as I was graduating. Thankfully, grad school went through.

Physics is one of several majors (math too, and maybe music) that they target to hire into technical services to support customers. The position involves a lot of troubleshooting and debugging, plus potentially developing fixes or custom programming. They're looking for people with logic/reasoning skills that can be taught to program adequately well, while saving the serious programmers for R&D.

PhonyMcRingRing
Jun 6, 2002

dwazegek posted:

This made me smile :v:

haha, whoops, that was supposed to be "Replaces " with & quot"

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I don't know if this is a horror or a moby hack:
http://blogs.msdn.com/developingfordynamicsgp/archive/2008/10/15/what-is-column-dessprkmhbbcreh.aspx

I was going through a great plains DEXSQL.log file and kept seeing what looked like a 'legit' error message, 'Invalid column name 'desSPRkmhBBCreh'. It turns out that it's faster to determine the presence of a table by asking for a non-existent column within it instead of waiting for a system meta table to build a list of all the tables. So these guys built their 'doestableexist' calls into GreatPlains by trying to select from a column composed of their initials; if the table exists they'll get 'invalid column' error message, if it doesn't they'll get another one.

deedee megadoodoo
Sep 28, 2000
Two roads diverged in a wood, and I, I took the one to Flavortown, and that has made all the difference.


Scaramouche posted:

I don't know if this is a horror or a moby hack:
http://blogs.msdn.com/developingfordynamicsgp/archive/2008/10/15/what-is-column-dessprkmhbbcreh.aspx

I was going through a great plains DEXSQL.log file and kept seeing what looked like a 'legit' error message, 'Invalid column name 'desSPRkmhBBCreh'. It turns out that it's faster to determine the presence of a table by asking for a non-existent column within it instead of waiting for a system meta table to build a list of all the tables. So these guys built their 'doestableexist' calls into GreatPlains by trying to select from a column composed of their initials; if the table exists they'll get 'invalid column' error message, if it doesn't they'll get another one.

It's a horror for the person who comes in after you and has to figure out what the hell you were trying to accomplish. Because if you're writing that you're probably not commenting it.

lamentable dustman
Apr 13, 2007

🏆🏆🏆

Mustach posted:

Exxxxxtreeeeeeme MUMPS!



Epic tried to recruit me last week :)

decided not to respond

GROVER CURES HOUSE
Aug 26, 2007

Go on...
So why is this Epic thing treated like the bubonic plague?

Jethro
Jun 1, 2000

I was raised on the dairy, Bitch!

Broken Knees Club posted:

So why is this Epic thing treated like the bubonic plague?

http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Also http://en.wikipedia.org/wiki/MUMPS#Sample_programs

(Also also the employees are idiots and the CEO is a fruit loop.)

csammis
Aug 26, 2003

Mental Institution

Broken Knees Club posted:

So why is this Epic thing treated like the bubonic plague?

Because every player I can think of in the field of healthcare IT is terribly crippled beyond hope of redemption. It could be like printing money but for some reason every company that tries bungles it. I haven't met a doctor, nurse, lab tech, or hospital janitor happy with the software that they have to use.


I used to work for one of these places :v: We didn't have MUMPS, but the VB6 flowed like antifreeze-laced wine

Zhentar
Sep 28, 2003

Brilliant Master Genius

Avenging Dentist posted:

the CEO is a fruit loop.

The CEO is also a workaholic, and has built a company culture that expects everyone else to be too (my boss got a call once from someone who heard me mention I only average 42 hours a week).

I like my job well enough, and they pay very well, but I don't think most CoCers could handle the VB6+MUMPS thing.



Not to defend MUMPS, but that article is terribly inaccurate. It also misses a lot of good reasons to hate MUMPS.

csammis
Aug 26, 2003

Mental Institution

Zhentar posted:

The CEO is also a workaholic, and has built a company culture that expects everyone else to be too (my boss got a call once from someone who heard me mention I only average 42 hours a week).

This is also something that seems to be common in healthcare IT...my former CEO is written about in textbooks regarding an angry letter he sent saying that the parking lot wasn't nearly full enough at 7PM :smith:

jonjonaug
Mar 26, 2010

by Lowtax
Wasn't there a MUMPS program listed in this thread once that was a terrible, indecipherable wall of text that made eyes bleed?

mr_jim
Oct 30, 2006

OUT OF THE DARK

jonjonaug posted:

Wasn't there a MUMPS program listed in this thread once that was a terrible, indecipherable wall of text that made eyes bleed?

That pretty much sums up all of the MUMPS code posted in this thread.

Vanadium
Jan 8, 2005

mr_jim posted:

That pretty much sums up all of the MUMPS code posted in this thread.

or anywhere else

Seth Turtle
May 6, 2007

by Tiny Fistpump

mr_jim posted:

That pretty much sums up all of the MUMPS code posted in this thread.

I don't know, this doesn't look that terrible. You can tell what it's doing with a cursory glance. It's self-documenting! :pseudo:

Zhentar
Sep 28, 2003

Brilliant Master Genius
It's pretty easy to write obfuscated MUMPS, but with some decent coding standards (and not trying to be clever) it's easy to understand. The abbreviated commands can be confusing if you aren't familiar with it, but it's actually quite nice.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Nicer than what? Not trying to be snarky; I just don't get it.

tef
May 30, 2004

-> some l-system crap ->

rt4 posted:

Nicer than what? Not trying to be snarky; I just don't get it.

http://en.wikipedia.org/wiki/Stockholm_syndrome

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

rt4 posted:

Nicer than what? Not trying to be snarky; I just don't get it.

It has an admittedly cool DB layer (or at least, it was cool back in the day where no one had heard of associative arrays). Nowadays, especially with things like MongoDB, literally everything MUMPS did is done better elsewhere.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

csammis posted:

Because every player I can think of in the field of healthcare IT is terribly crippled beyond hope of redemption. It could be like printing money but for some reason every company that tries bungles it. I haven't met a doctor, nurse, lab tech, or hospital janitor happy with the software that they have to use.


I used to work for one of these places :v: We didn't have MUMPS, but the VB6 flowed like antifreeze-laced wine

Funny story about this:

My dad is a dentist. He's also a bit of a techie, and has a dream of running the world's first paper-free dental office. As part of this, I wrote a big complicated web-based system for tracking stuff like lab cases, supplies, business statistics, and employee time records. It is awesome, works great to this day (over a year since I moved out to the bay area), and is probably a big part of why his is one of the few/only practices in his town to survive the recession mostly unscathed.

However, his attempts to market this to other dentists has been an abject failure. Nobody is interested in minor things like knowing how much they spend on supplies, or when a patient's lab case is due to arrive. In fact, many dentists are completely uninterested in computers. One of his good friends has only one computer in his office, using DOS 6.2 and some ancient proprietary management system. Another doesn't have any computers, and runs his whole office with a giant corkboard.

Now, recently, another techie-dentist had the same idea of "why the gently caress is everything so broken", except he's a big Microsoft / C# guy. So he wrote a desktop-based practice management system, which is about a million times better than the old proprietary applications dentists had to use. We migrated to it on desktops, integrated it with our web-based system, and life got even better. Besides being faster and easier to use, it doesn't cost thousands per year in support fees.

But how many dentists use it? Not many. The idea of sitting down, clicking a mouse 4-5 times, and then using this free awesome software is so abjectly terrifying to the average dentist that they avoid it like it's dick cancer.

The only way healthcare technology improves is by old doctors retiring and letting the young whippersnapper 60-year olds take their place.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Zhentar posted:

It's pretty easy to write obfuscated MUMPS, but with some decent coding standards (and not trying to be clever) it's easy to understand. The abbreviated commands can be confusing if you aren't familiar with it, but it's actually quite nice.
Can you post an example of some MUMPS code that you would consider easy to understand? I've never seen any that did anything not completely trivial that wasn't hideous.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Janin posted:

But how many dentists use it? Not many. The idea of sitting down, clicking a mouse 4-5 times, and then using this free awesome software is so abjectly terrifying to the average dentist that they avoid it like it's dick cancer.

You've got to know how to motivate dentists. As a dentist, the number one thing I'm concerned with in my practice is the degree to which I can cause another human being suffering. If you market the software as being able to help dentists inflict more pain on their patients, they will eat that poo poo right up.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
https://www.youtube.com/watch?v=bOtMizMQ6oM

Zhentar
Sep 28, 2003

Brilliant Master Genius

rt4 posted:

Nicer than what? Not trying to be snarky; I just don't get it.

The abbreviated syntax is nicer than the not-abrreviated syntax.

Plorkyeran posted:

Can you post an example of some MUMPS code that you would consider easy to understand? I've never seen any that did anything not completely trivial that wasn't hideous.

I don't have anything handy that would be understandable without a whole lot of context. I'll check out the programming competition thread and put together a solution for something quick, unless you have any specific ideas.

spiritual bypass
Feb 19, 2008

Grimey Drawer

Zhentar posted:

unless you have any specific ideas.

Write fizzbuzz

Zhentar
Sep 28, 2003

Brilliant Master Genius

rt4 posted:

Write fizzbuzz

code:
FizzBuzz() n num
	f num=1:1:100 d  
	. w !,num," "
	. w:num#3=0 "Fizz"
	. w:num#5=0 "Buzz"
	q

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
If that's actually a correct FizzBuzz solution then MUMPS has some really loving weird control flow structures.

Zhentar
Sep 28, 2003

Brilliant Master Genius
^^^ Yeah, it does. And I've got more for you too!

I decided to do Project Euler problem #10

http://projecteuler.net/index.php?section=problems&id=10 posted:

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

Find the sum of all the primes below two million.

code:
EulerProblem10(limit) n num,check,sum
	;
	f num=2:1:limit s ^CoC(num)=""
	;
	s num=""
	f  s num=$o(^CoC(num)) q:num=""  d  
	. s check=num*num-1
	. f  s check=$o(^CoC(check)) q:check=""  d  
	. . k:check#num=0 ^CoC(check)
	;
	f  s num=$o(^CoC(num)) q:num=""  s sum=sum+num
	q sum

csammis
Aug 26, 2003

Mental Institution

Avenging Dentist posted:

You've got to know how to motivate dentists. As a dentist, the number one thing I'm concerned with in my practice is the degree to which I can cause another human being suffering. If you market the software as being able to help dentists inflict more pain on their patients, they will eat that poo poo right up.

That explains a whole hell of a lot about Cerner's business and development models

pseudorandom name
May 6, 2007

Does that print Fizz/Buzz/FizzBuzz instead of or in addition to the number?

edit: I was right

pre:
1 
2 
3 Fizz
4 
5 Buzz
6 Fizz
7 
8 
9 Fizz
10 Buzz
11 
12 Fizz
13 
14 
15 FizzBuzz
That isn't FizzBuzz.

Also, you made me install a MUMPS compiler to figure this out and have earned my eternal mild enmity.

pseudorandom name fucked around with this message at 05:26 on Apr 23, 2010

Bozart
Oct 28, 2006

Give me the finger.

ih8ualot posted:

Case in point.
code:
function setFrustumCorners(TL, TR, BR, BL){
	// I'm...I'm so sorry.
	topLeft = BL;
	topRight = BR;
	botRight = TR;
	botLeft = TL;
	
	
}
It's been fixed, but I always keep a copy to remind myself how loving retarded my code is sometimes.

Sometimes I grep our work codebase (which is borken up into different areas for different groups of people that people rarely leave) for ridiculous stuff. "I'm sorry" came up with results from only our best (by far) coder.

I usually look for ridiculous stuff though. In matlab both variables and functions share the same namespace, and there are local variables and functions, so you can override things like core library functions with variables which just happen to have the same name. Very very rarely this results in some brilliant trickery, but usually it is asinine poo poo like masking the function "sum" with a variable named "sum". Whenever I think of something like that I search to see if someone has done it - and invariably someone has. God damned math and physics graduates don't think about their tools.

Shavnir
Apr 5, 2005

A MAN'S DREAM CAN NEVER DIE

csammis posted:

That explains a whole hell of a lot about Cerner's business and development models

It also explains a lot about AD's posting :v:

Also from that MUMPS sample program wiki link before

quote:

This program sets a value of "x x" to a variable named x, and then launches an infinite recursive execution of x, resulting in stack overflow. At 13 characters, including spaces and an end-of-line mark, the first variant demonstrates that it can be as compact and obscure as such languages as Perl.

This is a good thing?

evensevenone
May 12, 2001
Glass is a solid.

Shavnir posted:

This is a good thing?

I think that's wikipedia humor.

Zhentar
Sep 28, 2003

Brilliant Master Genius

pseudorandom name posted:

Does that print Fizz/Buzz/FizzBuzz instead of or in addition to the number?

...

That isn't FizzBuzz.

Oops. Should've read the description more carefully.

pseudorandom name
May 6, 2007

code:
FizzBuzz()
	New num
	For num=1:1:100 Do
		. Write:((num#3'=0)&(num#5'=0)) num
		. Write:num#3=0 "Fizz"
		. Write:num#5=0 "Buzz"
		. Write !
Weird syntax, but not all that different from Perl's unless keyword.

Now I know even more MUMPS, and my enmity has increased from mild to moderate.

(I've edited this post 3 or 4 times now to make the code easier to read and fix some compiler warnings. I really need to stop reading about MUMPS...)

pseudorandom name fucked around with this message at 06:15 on Apr 23, 2010

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

pseudorandom name posted:

code:
FizzBuzz()
	New num
	For num=1:1:100 Do
	. Write:((num#3'=0)&(num#5'=0)) num
	. Write:num#3=0 "Fizz"
	. Write:num#5=0 "Buzz"
	. Write !
	. Quit
it's Perl and VB and COBOL and Fortran :cry:


Content: I'm in the process of rebuilding an ASP/Access website with a modern one built on ASP.NET MVC and SQL Server. This function more or less sums up the original programmer. Really great guy, I mean no offense to him by posting this here, but this is definitely babby's first CMS:
code:
function getdate(iDate)
	set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
	xmlHttp.open "GET",URL & iDate,"False"
	xmlHttp.send()
	if xmlHttp.Status <> "200" then ' 200 = Good result
	  'ok We Got a Problem here no response from cafepress
	else
	  xmlText = xmlHttp.responseText
	  StartContent = instr(xmlText,"<body")
	  EndContent = instr(xmlText,"</table")
	  xmlText = Mid(xmlText,StartContent,(EndContent-StartContent))
	end if
	'Process Text for
	xmlText = right(xmlText, len(xmlText)-7)
	xmlText = xmlText & "</table><br>"
	xmlText = replace(xmlText,"<td>Title</td><td>Length</td>","<td>Title</td><td></td>")
	Response.Write xmlText
end function
No, that function does not actually contact CafePress.

Also almost the entire website is shoehorned into one single database type. Not one table with hundreds of columns, but the "article" table was repurposed to do almost everything. Article summaries can be image URLs, article subtitles can be category names, article text can be a link destination. There's nothing really horrifying about this code, just some perplexing design decisions :psyduck:

Shumagorath
Jun 6, 2001

niteice posted:

it's Perl and VB and COBOL and Fortran :cry:
Am I alone in liking that for loop structure (start:increment:end)? Maybe it's because I got my start in OOT and Pascal.

Adbot
ADBOT LOVES YOU

Zhentar
Sep 28, 2003

Brilliant Master Genius

Shumagorath posted:

Am I alone in liking that for loop structure (start:increment:end)? Maybe it's because I got my start in OOT and Pascal.

I'm cool with the for loop structure.

It's the foreach structure that gets a bit awkward, although it makes up for it by being very flexible.

code:
	f  s num=$o(^CoC(num)) q:num=""  d  

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply