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
BERGfu
Aug 24, 2010


Pavlov posted:

Obviously the answer is to allow your users to also provide the executables to view the files they upload.

Hey man you got time jump into mumble or steam. We miss you!

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pavlov posted:

Obviously the answer is to allow your users to also provide the executables to view the files they upload.

My MRI info came with its own viewer on the DVD from the hospital, and I ran it in a VM because I'm paranoid.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
dae big data???????

https://www.youtube.com/watch?v=QbxfJ7yNkPA

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

Subjunctive posted:

My MRI info came with its own viewer on the DVD from the hospital, and I ran it in a VM because I'm paranoid.

I don't think I'd feel like doing this if I were you, but any chance you'd mind posting a redacted picture of the disc?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Lysidas posted:

I don't think I'd feel like doing this if I were you, but any chance you'd mind posting a redacted picture of the disc?

I'm not sure I have the disc any more, do you mean the file listing or the media (it was generic)?

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
The media. There aren't many companies that make the disc recording appliances, and there's a decent chance that I worked on the software that produced the disc. Thanks anyway.

shodanjr_gr
Nov 20, 2007

Lysidas posted:

I don't think I'd feel like doing this if I were you, but any chance you'd mind posting a redacted picture of the disc?

Most places just burn the data on a CD or DVD. The software contained will be some sort of free version of a standard DICOM viewer. I had Osirix on my ultrasound image dump disk.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
Imaging centers that burn a lot of discs often buy standalone machines that listen over the DICOM protocol and are configured as study destinations ("application entities"? it's been far too long) for the actual imaging modalities. An MRI machine, for example, might directly send the study to a disc publisher where it'll be automatically burned to disc along with whatever DICOM viewer(s) the facility has chosen. There are places that burn discs manually, but after a certain number of discs they usually figure out that it's cheaper to buy a dedicated machine for this instead of having an employee do it by hand.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Lysidas posted:

The media. There aren't many companies that make the disc recording appliances, and there's a decent chance that I worked on the software that produced the disc. Thanks anyway.

I'll take a look around for it!

ErIog
Jul 11, 2001

:nsacloud:

Drythe posted:

Like, I've had dumb requests before but not ones where I would have to explain at a very basic level of why it's a dumb idea.

You should feel grateful you are insulated enough that this isn't actually your main job. I feel like anybody in a position that bridges between business/creatives and devs spends most of their time explaining to the business/creatives why what they are asking for is unreasonable or is better solved with a non-technical solution.

shodanjr_gr
Nov 20, 2007

Lysidas posted:

Imaging centers that burn a lot of discs often buy standalone machines that listen over the DICOM protocol and are configured as study destinations ("application entities"? it's been far too long) for the actual imaging modalities. An MRI machine, for example, might directly send the study to a disc publisher where it'll be automatically burned to disc along with whatever DICOM viewer(s) the facility has chosen. There are places that burn discs manually, but after a certain number of discs they usually figure out that it's cheaper to buy a dedicated machine for this instead of having an employee do it by hand.

Oh I didn't know this was the case...I got mine from the archive guy at the hospital that did my scan. From what i recall it was just a regular dvd-r.

Linear Zoetrope
Nov 28, 2011

A hero must cook

ErIog posted:

You should feel grateful you are insulated enough that this isn't actually your main job. I feel like anybody in a position that bridges between business/creatives and devs spends most of their time explaining to the business/creatives why what they are asking for is unreasonable or is better solved with a non-technical solution.

https://www.youtube.com/watch?v=BKorP55Aqvg

TheresaJayne
Jul 1, 2011

Zaphod42 posted:

One of the first programs I wrote in High School just printed a bunch of bell characters and then read them right back, in an infinite loop.

I fired it off while my teacher was mid-lecture and it was pretty good :cheeky:

Teacher: That BEL is for me not for you!

TheresaJayne fucked around with this message at 06:05 on Apr 24, 2015

Drythe
Aug 26, 2012


 
It's funny someone mentioned ransomware yesterday, as this morning has been a fun time for our security team.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Is it strange that when they mentioned the perpendicular thing, my first response was, "I guess they need a non-euclidean surface" ?

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Pavlov posted:

Is it strange that when they mentioned the perpendicular thing, my first response was, "I guess they need a non-euclidean surface" ?

lmao if your whiteboard can be embedded in three-dimensional space!

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Pavlov posted:

Is it strange that when they mentioned the perpendicular thing, my first response was, "I guess they need a non-euclidean surface" ?

Me too - it broke me out of the comedy for a second :ohdear:

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Pavlov posted:

Is it strange that when they mentioned the perpendicular thing, my first response was, "I guess they need a non-euclidean surface" ?

https://www.youtube.com/watch?v=B7MIJP90biM

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
https://ef.gy/fastcgi-is-pointless
FastCGI vs. HTTP

"We already have a vendor-neutral protocol for accessing potentially generated resources from a web server that is supported by all major web servers and doesn't require spawning a new process for each requested resource: it's called HTTP! All decent web servers can proxy incoming requests to other web servers via HTTP. This has been a feature of virtually all web servers since long before FastCGI came around. In fact, the best web server currently alive and kicking - nginx - is famous for this capability. You'll stumble over a lot of guides and howtos describing how to use nginx as a load balancer for "heavy duty" web servers like Apache, by intercepting HTTP requests and proxying them to one of several backend servers. So why would you use FastCGI for your next web application's backend?
...
It'll be a lot easier to just use or implement your own HTTP server and run that on a Unix socket instead of implementing FastCGI for the same purpose. You'll probably be prone to fewer bugs in other people's code and you'll get the exact request you're trying to respond to, and considering HTTP is a lot easier to read, you'll also be making fewer bugs parsing it yourself. It's quite easy, really, I came up with a 400-ish line C++ header that implements an HTTP server with Boost::ASIO."


Oh those "other people" and their buggy code. :iamafag: I don't want to deny anyone the fun of writing their own HTTP implementation, but before they run to production with it and tell the world how easy it is, perhaps they could

- implement chunked transfers
- accept abnormally cased header names
- enforce some mandatory request validations
... and those other little things that httpd takes more than 400 lines to do.

Gazpacho fucked around with this message at 04:32 on Apr 24, 2015

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that
Nah man, I'm pretty sure if I start from scratch, I can reinvent the wheel to be like, 20% rounder.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Gazpacho posted:

https://ef.gy/fastcgi-is-pointless
FastCGI vs. HTTP

"We already have a vendor-neutral protocol for accessing potentially generated resources from a web server that is supported by all major web servers and doesn't require spawning a new process for each requested resource: it's called HTTP! All decent web servers can proxy incoming requests to other web servers via HTTP. This has been a feature of virtually all web servers since long before FastCGI came around. In fact, the best web server currently alive and kicking - nginx - is famous for this capability. You'll stumble over a lot of guides and howtos describing how to use nginx as a load balancer for "heavy duty" web servers like Apache, by intercepting HTTP requests and proxying them to one of several backend servers. So why would you use FastCGI for your next web application's backend?
...
It'll be a lot easier to just use or implement your own HTTP server and run that on a Unix socket instead of implementing FastCGI for the same purpose. You'll probably be prone to fewer bugs in other people's code and you'll get the exact request you're trying to respond to, and considering HTTP is a lot easier to read, you'll also be making fewer bugs parsing it yourself. It's quite easy, really, I came up with a 400-ish line C++ header that implements an HTTP server with Boost::ASIO."


Oh those "other people" and their buggy code. :iamafag: I don't want to deny anyone the fun of writing their own HTTP implementation, but before they run to production with it and tell the world how easy it is, perhaps they could

- implement chunked transfers
- accept abnormally cased header names
- enforce some mandatory request validations
... and those other little things that httpd takes more than 400 lines to do.

or not parse http header syntax with an incomplete regex that fails on the most basic poo poo? and lmao, it uses posix regex of course.

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

It gets better.

Plorkyeran
Mar 22, 2007

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

Gazpacho posted:

Oh those "other people" and their buggy code. :iamafag: I don't want to deny anyone the fun of writing their own HTTP implementation, but before they run to production with it and tell the world how easy it is, perhaps they could

- implement chunked transfers
- accept abnormally cased header names
- enforce some mandatory request validations
... and those other little things that httpd takes more than 400 lines to do.
Reverse-proxying with nginx does spare you from most of the hard parts of writing an http server (although he's still rather underestimating even the easy parts).

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
Can we just vent about dump coding-related horrors in here? Examples (PHP):

  • A co-worker refuses to stop putting spaces between function names parenthesis, despite being the only developer who does so. When asked why, his response is "that's how they do it in C".
  • A co-worker regularly pollutes class files with random functions when adding functionality. When asked why he didn't at least add them to the class in the file, he says "I didn't really know where to put them".
  • A co-worker refuses to stop using extract() everywhere. drat near everything that hits the DB has something like
    php:
    <?
    while ($row = pg_fetch_assoc($res)) {
        extract($row);
        ...
    }
    ?>
    After explaining that this makes it impossible for the developers to know which variables are safe or where they come from, his response is "Yeah but it's easier this way. I don't have to write '$row' everywhere."
  • Several co-workers refuse to stop using globals inside function calls. Despite lengthy discussions, and being shown several articles and google tech talks about how globals are an issue, there is no change. "It's easier this way, I don't have to pass so many parameters".
  • A co-worker keeps rolling giant, unusable frameworks every three to six months. Initially, they featured a central 3000-line file that contained a single array that described every field in the database, organized alphabetically by field name. Now, after we recently began using KendoUI for our front-end, he rolled a front-end framework on top of it.
  • Several co-workers describe OOP as "just a question of style." They refuse to organize related functionality into classes because "it takes too much time, and then I have to always instantiate these classes everywhere."

Am I crazy? Is this crazy?

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

IT BEGINS posted:

[*] Several co-workers refuse to stop using globals inside function calls. Despite lengthy discussions, and being shown several articles and google tech talks about how globals are an issue, there is no change. "It's easier this way, I don't have to pass so many parameters".

Am I crazy? Is this crazy?

That's textbook stupid.

You should probably shop around for new employment :cheeky:

IT BEGINS posted:

[*] A co-worker keeps rolling giant, unusable frameworks every three to six months. Initially, they featured a central 3000-line file that contained a single array that described every field in the database, organized alphabetically by field name. Now, after we recently began using KendoUI for our front-end, he rolled a front-end framework on top of it.
[*] Several co-workers describe OOP as "just a question of style." They refuse to organize related functionality into classes because "it takes too much time, and then I have to always instantiate these classes everywhere."

:stonk:

Space Kablooey
May 6, 2009


Yeah, at this point just don't give a gently caress and :yotj:

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

talk about loving owned

Mogomra
Nov 5, 2005

simply having a wonderful time
This is how I define functions in various languages:

PHP code:
<?php
function fart ($poo poo, $shittyShit) {
 // ...
}


// -------------

namespace Mogomra\Bathroom;

use Mogomra\Bathroom\FartEmitter as Farter;

class Butte extends Farter {

  public static function fart ($poo poo, $shittyShit) {
    \fart($poo poo, $shittyShit);
  }

}
JavaScript code:
var fart = function (poo poo, shittyShit) {
  // ...
};

function doWork (foo, bar) {
 // ...
}


// ----------------


Butte.prototype.fart = function (poo poo, shittyShit) {
  fart(poo poo, shittyShit);
};
I don't call functions with a space between the name and the parameters, but define them that way. Am I just perpetuating the horror? What's so terrible about an extra space there?

I also do things like:
code:
if (foo && bar) { ... }

for (i = 0; i < len; i++) { ... }

while (poopJokesAreHilarious) {
  shitPost();
}

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

IT BEGINS posted:

list]
[*] A co-worker refuses to stop putting spaces between function names parenthesis, despite being the only developer who does so. When asked why, his response is "that's how they do it in C".
[/list]

Am I crazy? Is this crazy?

No; yes. Only idiots put spaces between a function name and parenthesis in C/C++, and only idiots put no space between a keyword (if/for/while/switch/...) and a parenthesis.
But the real morons are those who put blanks behind an open paren, or before an closing one.

When I see something like this, I know it's not going to be a good day:
code:
  if( obviousBoolean == true )
    {
      ...
    }

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

Mogomra posted:

I don't call functions with a space between the name and the parameters, but define them that way. Am I just perpetuating the horror? What's so terrible about an extra space there?

No, this is fine. It's the space between the function call and the parameters that fucks with me. The following:

php:
<?
function poo ($a) { ... } // great

foreach ($butts as $butt) {
    poo ($butt); // not great
}
?>

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
I probably should quit, but the pay is really good for my experience and the perks are awesome. Then again, the stupidity is overwhelming. My friend in QA recently overhead one of the guys arguing with the boss about some code - apparently he used the phrase it's not a bug, it's a feature completely unironically. Also, more dumb stuff like this:

php:
<?
    foreach($checknum_storage as $carriercode => $custcode_array){
        foreach($custcode_array as $custcode => $currency_array){
            foreach($currency_array as $currency => $checks_array){
                foreach($checks_array as $checknum_span_value => $contents){
                extract($contents);
                ...
                }
            }
        }
    }
?>
They'll regularly add a global variable call instead of adding it as a parameter because "Then I'd have to change it every place where that function is called." I still regularly come across bits of code that use boolean switches to execute stuff:

php:
<?
$x = ($somevalue == true);
$x && executeSomething ();
?>
After five years of using Mercurial, several devs still don't know how to resolve merge conflicts or how to use branches/bookmarks. The rabbit hole goes pretty deep.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

IT BEGINS posted:

  • A co-worker refuses to stop putting spaces between function names parenthesis, despite being the only developer who does so. When asked why, his response is "that's how they do it in C".

The only problem here is the bolded part. Religious wars over which style is more "correct" are pointless, but if the company has a standard you should stick to it.

Spatial
Nov 15, 2007

"That's how they do it in C" as a justification is a pretty big red flag coming from a PHP developer. Also the flag is radioactive

VikingofRock
Aug 24, 2008




HappyHippo posted:

The only problem here is the bolded part. Religious wars over which style is more "correct" are pointless, but if the company has a standard you should stick to it.

This is the correct opinion here, especially with something as inconsequential as whitespace around delimiters. If you are working with other people stick to the common style, if you are working by yourself who cares how your whitespace is formatted.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



It sounds like there's no management where IT BEGINS works, so coding style is obviously a free for all.

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

Snapchat A Titty posted:

It sounds like there's no management where IT BEGINS works, so coding style is obviously a free for all.

Everything here is a free-for-all. There's no care for code quality and project management is a crap-shoot. We've got seven developers and what is essentially seven teams. I'm currently working on three different major projects for which I am the sole developer, with extremely occasional input from my boss. I don't know how, but miraculously this ship is still afloat (and growing, somehow).

After repeated attempts to explain why OOP is useful for us, why refactoring code that we have to regularly maintain is good, why separation of concerns is critical, I've mostly given up. Hell, I just barely convinced my higher ups to move our reports and templates into the same repository as the rest of our software. I was told 'they are unrelated' (they use a huge amount of shared code and are part of the same overall piece of software). Never mind that I contribute more than 50% of the code to this reporting engine and I'm regularly forced to take part in some sort of 'branch disco' because my changes can't be kept in sync.

Edit: Also sorry if this isn't the thread to vent, but I figured you guys could enjoy some Schadenfreude that wasn't strictly code.

substitute
Aug 30, 2003

you for my mum
That's some good stuff.

Athas
Aug 6, 2007

fuck that joker

IT BEGINS posted:

I probably should quit, but the pay is really good for my experience and the perks are awesome. Then again, the stupidity is overwhelming. My friend in QA recently overhead one of the guys arguing with the boss about some code - apparently he used the phrase it's not a bug, it's a feature completely unironically. Also, more dumb stuff like this:

php:
<?
    foreach($checknum_storage as $carriercode => $custcode_array){
        foreach($custcode_array as $custcode => $currency_array){
            foreach($currency_array as $currency => $checks_array){
                foreach($checks_array as $checknum_span_value => $contents){
                extract($contents);
                ...
                }
            }
        }
    }
?>

Apart from the extract in the inner body and dubious whitespace, what else is wrong? I am not a PHP programmer.

Also, I second the suggestion to ditch a place where people are directly opposed to improving their development practice. I work as a PhD student developing a GPU-targeting optimising compiler in Haskell, and my advisor has previously spent his life writing Fortran compilers in C++. I have frequently been tempted to put examples of his Haskell work in this thread, but to be honest, he's really trying to improve (and succeeding), because he is responsive to arguments.

Also, I added a style checking script to the continuous integration system that will send him an angry email whenever he violates it. You could try the same. Programmers tend to respond to machines yelling at them.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Athas posted:

Apart from the extract in the inner body and dubious whitespace, what else is wrong? I am not a PHP programmer.

Depending on the sizes of those arrays, that thing could take a very long time to run. It might be a good idea to break out if it's some kind of search, or cache the results & only redo them when the arrays change.

Like with all the arrays being a tiny size 10, that's already 10,000 iterations of the innermost block.

Adbot
ADBOT LOVES YOU

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

Athas posted:

Apart from the extract in the inner body and dubious whitespace, what else is wrong? I am not a PHP programmer.

Mainly the extract, but also having a four-layer array is probably not a good thing. It's not strictly bad but it comes from other code like

php:
<?
$checknum_storage[$carriercode][$mastercustcode_custcode][$currency][$checknum_span_value]['controlnum']= $controlnum;
$checknum_storage[$carriercode][$mastercustcode_custcode][$currency][$checknum_span_value]['invoicenum']= $invoicenum;
$checknum_storage[$carriercode][$mastercustcode_custcode][$currency][$checknum_span_value]['checknum_span']= $checknum_span;
?>
so at the least it's quite confusing.

Edit: from the same file:

php:
<?
function maintain_checknums($row){
    global $database, $checknum_storage,$current_date_time,$current_date;
    extract($row);
    if(!isset($mastercustcode_custcode)) $mastercustcode_custcode = $custcode;
    if(!isset($current_date_time)) $current_date_time = date('H:i:s',strtotime(date('Y/m/d H:i:s')));
    if(!isset($current_date)) $current_date = date('m/d/Y',strtotime(date('Y/m/d H:i:s')));
?>

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