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
csammis
Aug 26, 2003

Mental Institution

dwazegek posted:

code:
public bool HasValidItems(SomeClass[] items)
{
  bool retVal = false;
  foreach(SomeClass item in items)
  {
    retVal = retVal || item.IsValid;
  }
  return retVal;
}

public SomeClass FindSomeItem(SomeClass[] items)
{
  SomeClass retVal = null;
  foreach(SomeClass item in items)
  {
     if(item.MatchesWhateverWeAreLookingFor)
     {
       retVal = item;
     }
  }
  return retVal 
}

This would be perfectly fine if he had ever heard of the "break" keyword :sigh:

Adbot
ADBOT LOVES YOU

csammis
Aug 26, 2003

Mental Institution

tef posted:

*this for new cobol title

csammis
Aug 26, 2003

Mental Institution

king_kilr posted:

's' - 'a' != 1

holy loving poo poo

csammis
Aug 26, 2003

Mental Institution

Flobbster posted:

Didn't they teach us this in grade school?

perl -i -pe 's/(?<=c)ie/ei/g' `find .` :eng101:

Except when like "A" as in "neighbor" and "weigh" :colbert:

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

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:

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

csammis
Aug 26, 2003

Mental Institution
Goddamn shrughes :golfclap:

csammis
Aug 26, 2003

Mental Institution

Dijkstracula posted:

The real real horror is that Entheogen Hexadecimal Russian Maniac whatever is still posting

csammis
Aug 26, 2003

Mental Institution
DegaussMonitor

My first thought was to check the URL as this must have been an extremely well-designed MSDN parody site :psyduck:

csammis
Aug 26, 2003

Mental Institution

JediGandalf posted:

You'd be surprised how many people still use CRTs.

Or is it more of the fact that you can't believe there is a DegaussMonitor function.

It's sort of both...I know that a lot of people still use CRTs, but at the same time I'm surprised that at the time of introduction of Windows Vista there was enough customer pressure on Microsoft to introduce APIs for software control of degaussing the monitor, and I'm surprised it's controllable via software at all.

csammis
Aug 26, 2003

Mental Institution

NotShadowStar posted:

I'm taking a numeric analysis course this semester, and the second chapter is literally all about floating point errors and bounds checking and how much this is going to gently caress you over and over until you get it right.

Then we have languages like PHP and Java, who were apparently too good to learn that crap.

Just out of curiousity what book are you using?

csammis
Aug 26, 2003

Mental Institution

bobthecheese posted:

Except that 70% of them aren't even valid bugs anymore, because the code has evolved around them, and everyone involved when the bug was reported no longer has anything to do with the project.

I spent a non-trivial portion of last week going through my team's defect backlog and categorizing out those 70% so I can say gently caress 'em mark as wontfix and never look back :unsmith:


e: ^^^^ goddamn it, I did it wrong!

csammis
Aug 26, 2003

Mental Institution

pseudorandom name posted:

US banks think that asking you for both your password and your security questions is two-factor authentication.

But how could anyone know what year my father was born?? :saddowns:

csammis
Aug 26, 2003

Mental Institution

Doc Hawkins posted:

Can't! I like this one:



I've seen this up in the QA pit where I work. Sometimes I'm surprised it doesn't have stab marks on it :smith:

csammis
Aug 26, 2003

Mental Institution

Munkeymon posted:

:drat:

Also, Emm Ess Ess Cue Ell but only because we've had a lot of back-and-forth lately with some nontechnical people lately over which database we actually use around here. "No, we won't support MySqueal alongside the real database."

We support MSSQL and Oracle where I work. I use Emm Ess Ess Cue Ell and Sequel Server pretty much interchangeably for that product, Tee Ess Cue Ell for the Microsoft language, Pee Ell Ess Cue Ell for the Oracle language, and Sequel Developer for the Oracle tool v:shobon:v

Never have I heard anyone pronounce it Squeal and I hope I never do. I'd probably think it was either a new scripting language that I'd never heard of or some notification tool like Growl.

csammis
Aug 26, 2003

Mental Institution

Hammerite posted:

Not in MySQL.

Haha seriously?

MySQL Reference posted:

Transactions cannot be nested. This is a consequence of the implicit commit performed for any current transaction when you issue a START TRANSACTION statement or one of its synonyms.

Transactions cannot be nested as a consequence of their inability to be nested :thumbsup:

csammis
Aug 26, 2003

Mental Institution

AlsoD posted:

As somebody with no database experience whatsoever, how would a thread with its posts be represented? Each sub-forum a table, each thread a column and each new post a row?

code:
SA_FORUMS
=========
ForumID  Title
1        GBS
202      CoC

SA_THREADS
==========
ThreadID  ForumID  Title
280371    202      Coding horrors: post the code that makes you laugh (or cry)

SA_POSTS
========
PostID     ThreadID  AuthorID  Content
399078901  280371    172603    "As somebody with no database experience whatsoever,"
It's pretty straightforward as databases go

csammis
Aug 26, 2003

Mental Institution

kitten smoothie posted:

Of all the questionable figures in open source software history, Stallman eating his own toejam seems like one of the harmless bits. It's not like he killed his wife or anything.

I'm not sure one can fairly equate the importance and impact of Hans Reiser and RMS

csammis
Aug 26, 2003

Mental Institution

revmoo posted:

I'm on thin, thin ice at my company for pointing out SQL injection flaws. I give up. I'm sorry, but saying you can't only validate forms in the browser is not an offensive remark in any way. gently caress.

Were you nailing the boss's daughter in front of him as you said this? :psyduck:

csammis
Aug 26, 2003

Mental Institution
Hahaha, the PHP Sadness guy turned off commenting on his site. I guess too many people called out too many of his whines. I remember one where it was pretty clear he'd never understood what static meant.

e: to be clear about what I am saying: there is much to be sad about in PHP. This guy just couldn't be told that his complaints were themselves horrors.

csammis
Aug 26, 2003

Mental Institution
It's horrible interview etiquette to get up and walk out on them right there but man I would have been tempted if that had been sprung on me.

What does it do in the larger scope of the product?

csammis
Aug 26, 2003

Mental Institution

geonetix posted:

I saw this excerpt in that conversation and felt it needed some attention:

Oh Linus, never stop being a horrible dick.



My new favorite image

csammis
Aug 26, 2003

Mental Institution

b0lt posted:

For example, if you want to find out which commit put your AWS keys in your public github repo so you can find out which commits you need to purge/how long it's been visible to the public.

git blame config.py
Python code:
672461b1 (redacted) aws_access_key = 'AKIAJDBRZGUZ2PE334MQ'
672461b1 (redacted) aws_secret_access_key = 'NZGwVHLrgxIJFz497lzQS9rR4cG8zMkR6mGjakcq'
git log 672461b1fa13450f680d75d20899a05dfcdc662c
code:
commit 672461b1fa13450f680d75d20899a05dfcdc662c
Author: [Redacted]
Date:   Mon Dec 31 22:43:20 2012 -0500

    initial commit

commit 9d466a40be9ab65b808983fd2a493c96cbf44681
Author: [Redacted]
Date:   Mon Dec 31 19:39:50 2012 -0800

    Initial commit
Oh.

Nothing like a practical example :golfclap:

csammis
Aug 26, 2003

Mental Institution

HappyHippo posted:

A friend of mine is taking a data structures course in computer engineering, taught using c++. They apparently aren't allowed to use subscript notation (as in a[x]), ever. They must use *(a + x) always. I have no idea why.

Just a guess, but maybe the professor feels that makes the "offset from memory address" idea of array access more clear for computer engineers?

csammis
Aug 26, 2003

Mental Institution
shruges posts don't have enough commas to be teapot posts

csammis
Aug 26, 2003

Mental Institution
I found this in a third party header file the other day:

code:
#ifdef (__sun__)
#define signed
#endif
with no corresponding #undef. Imagine my surprise when I pulled in that header and our Solaris build broke in <climits> due to multiple definitions of std::numeric_limits<char> :psyduck:

csammis
Aug 26, 2003

Mental Institution

Volmarias posted:

Why would anyone do this? I mean, if your code needs to be so secure that even stacktraces give away information, just don't enable logging :psyduck:

We once had a minidump faxed to us for debugging purposes. It ended up being 84 pages long. When we asked why they had to fax it the answer was "in case it needs redaction" :psypop:

edit: in case this sounds like I'm recalling a distant memory this happened in March of 2013.

csammis
Aug 26, 2003

Mental Institution

The reverse of a peristaltic process. Peristalsis is the process of moving something through a hollow tube by compressing the sides of the tube. Swallowing is a good example - the digestive system uses peristalsis to move food from one end to the other.



In other words, :barf:

csammis
Aug 26, 2003

Mental Institution

LeftistMuslimObama posted:

This is not a coding horror, rather a horror from a coding textbook. An excerpt from my intro to OSes class textbook:
...
This textbook is written in the most insufferable, halting nerd-syntax and also has frequent footnotes just for the sake of making Star Wars references and putdowns on people who don't immediately understand the material. If you find yourself typing the word "thusly" as frequently as this book does, you need to hire a technical writer to clean your poo poo up.

What the hell book is this, "OSes for Dummies"?

csammis
Aug 26, 2003

Mental Institution
Wow, my condolences. That sounds completely insufferable.

If you're interested in an OS textbook that isn't self-absorbed bullcrap, I liked Modern Operating Systems by Tanenbaum or Operating System Concepts (the dinosaur book)...but this was 10+ years ago and maybe the modern editions are also written for children by children :(

csammis
Aug 26, 2003

Mental Institution

Suspicious Dish posted:

It's also fundamentally the wrong abstraction and has been since the day the concept of multithreading appeared. fork(); will only fork the current thread, so if you have resources (like a mutex) that were managed by a separate thread, your child could hang waiting for a mutex that never gets unlocked, since the other thread holding it doesn't exist anymore. So you're not allowed to call malloc(); (it takes a mutex internally), you're not allowed to basically call anything but setenv, dup, and exec();.

One of the bigger horrors I've experienced at work (that wasn't code I wrote) was a third party library we use for fulltext indexing. When indexing a certain file type the indexer would hang and two of the processes would show up in the process list. Sure enough, we finally figured out that the library was fork()ing forty goddamn frames deep in the call stack. It seems that the library designers assumed it would only ever be used by a single-threaded parent process and when we changed our process framework to use per-thread mutexes instead of global mutexes then *poof*

Naturally the company that created this library hasn't existed for some time and the IP is currently owned by one of our biggest competitors :sigh:

csammis
Aug 26, 2003

Mental Institution

Skuto posted:

I'm assuming he's talking about separate feeding datastructures per thread with a lock per datastructure rather than a single global lock for "all potentially shared data" or something like that.

Yep that's right

csammis
Aug 26, 2003

Mental Institution

Thermopyle posted:

I mean, I know nothing about this poo poo, but this sounds like gobbedly-gook from CSI. Multiple branches? Oh no we're hosed!

I read this as fragmenting the encrypted files in multiple locations (that happen to be registry keys) so that a scan looking for those files wouldn't find them in any one place.

csammis
Aug 26, 2003

Mental Institution

Karate Bastard posted:

Its --help option is almost offensively unhelpful however. It does produce a lot of help, but ain't nobody got time for reading all that.

Please enjoy your Friday knowing that I opened up a terminal to find out what yes --help printed :haw:

csammis
Aug 26, 2003

Mental Institution

Hammerite posted:

Why would you turn it into a #define rather than a const variable?

In C, const means read-only but not constant - it could be modeling a value in memory which does change, so subsequent reads could return different values. You just can't write to it. Since it's just a variable you still get all the normal variable things like storage allocation. #define is the way to form constant literal values.

e: unless you want to use C enums but since we're at the moment arguing about how int-enums are literally Satan it seems in poor taste :v:

csammis fucked around with this message at 13:39 on Oct 23, 2015

csammis
Aug 26, 2003

Mental Institution

evensevenone posted:

Isn't this because newer POWER has some kind of XML hardware accelerator thing?

Holy poo poo, that's a real thing. I had no idea :psyduck:

csammis
Aug 26, 2003

Mental Institution

Bognar posted:

Vim plugins for IDEs give you the best of both worlds.

Unless the plugin is incomplete and some basic commands aren't implemented and then you fork the plugin repo and you spend all your time figuring out how it works so you can JUST TURN OFF SEARCH HIGHLIGHTING :saddowns:

csammis
Aug 26, 2003

Mental Institution

ratbert90 posted:

Strewn about the project I inherited are C files, in these C files are bullshit like this:

what in the gently caress? WHAT IN THE GOD drat gently caress?

Edit* I copy and pasted the whole c file.

Are they meant to be exec()'d from another process? That would explain closing all the file descriptors since the new image inherits open file descriptors from the exec()ing process.

Adbot
ADBOT LOVES YOU

csammis
Aug 26, 2003

Mental Institution

ratbert90 posted:

I'm not worried about the closing of the fd's. Why does this program exist? Why didn't they just call the two whole things from the main program? Why are they not checking return codes? Why does this thing EXIST?

Yeah, my guess is that there was a need to launch a couple of things from a program but they had to run as root so a little fork()/exec() setup was created with a bunch of tiny programs that do nothing but clean up from having been exec'd and then run their commands. As for why they're not checking return codes, lovely developers do lovely things, who knows?

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