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
Fuck them
Jan 21, 2011

and their bullshit
:yotj:

ManoliIsFat posted:

Well it shouldn't be too bad, I'm sure with an environment where something like that is possible, the beautiful and intellectually well-regarded state of Floirda must have a first class backup setup. (good luck)

It's a state in New England. They contracted their work out to us down here, though.

Also, it's Flordia, not Floirda :colbert:

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

Shinku ABOOKEN posted:

Rust compiler is slow because it is written in Rust which is missing a lot of optimizations.
Give it time :shobon:

There's also that their modules aren't compilation units and instead they pretty much combine an entire project into one blob and then compile it at once, I'm not all that optimistic about them getting down compile times significantly.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?
code:
//Shapiro & Sher special use case. They don't have MLS Wizard nor Cirrus...yet they want syndication!
//So that means I have to find their user ID from their listing agent ID...
//Yes this is hard-coding agent IDs but IDGAF.
if (listing.agentCode == "001350" ||
    listing.agentCode == "000489" ||
    listing.agentCode == "206541")
{
    RtkSystemEntityModel.RTK_SYSTEMEntities context = new RtkSystemEntityModel.RTK_SYSTEMEntities();
    var user = context.Users.Where(u => u.pkUserId == 45586).Select(u => u).FirstOrDefault();

    exportListing.DirectListingDomainUrl = user.domainPrimary;
}
else
    exportListing.DirectListingDomainUrl = AppendMlsNumber(listing.CirrusUrl, exportListing.MlsNumber);
This is what happens when you have a client with a large purse. You absolutely cannot tell them no so you get total hack jobs.

Munkeymon
Aug 14, 2003

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



2banks1swap.avi posted:

It's a state in New England. They contracted their work out to us down here, though.

Also, it's Flordia, not Floirda :colbert:

New Hampshire? Any place intentionally overrun with lolbertairans is going to become a fractal horror.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
No, not NH. I still don't feel too comfy sharing it. I probably can but oh well.

And anyway, it was just dumb luck, it seems. Nothing particularly wrong.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Dren posted:

One of the main goals of Go was to solve the problem of the C compiler taking forever to parse nested C header includes. I don't support the practice of forcing users to include all header dependencies, I think it's better to write a self contained header with guards and suffer the compilation slowdown, but your code probably compiles faster for the trouble you're enduring.

Or you know, just have support for #import because its the compilers loving job to figure it out. Oh, I've seen this header before? Cool, just skip it. There. Done. No duplicates. We also need @import in the standard like yesterday too. I've already told the compiler about my class 27 different times, why not make me also tell the linker? I so thoroughly enjoy telling the computer poo poo it should already know, repeatedly. Otherwise, like why get out of bed in the morning?


Now this is crazy talk I know, but why not just have the compiler scan my source files and suss out the prototypes itself, with I don't know... Maybe letting me just stick my qualifiers next to the implementation instead of a completely separate file. Then the compiler could spit out a machine-readable version of the metadata. I wouldn't have to mess with headers at all! Nah... That's too crazy. After all, a compiler that did that would use like 1 whole MB of memory! We can't go around wasting memory willy-nilly! Our PDP-11 only has 512k! Better that we make all programmers deal with it for all eternity.

Vanadium
Jan 8, 2005

Sounds like you want to be writing C#. :sun:

JawnV6
Jul 4, 2004

So hot ...
Yeah the C preprocessor is trivial to extend.

Bongo Bill
Jan 17, 2012

Have you tried D?

raminasi
Jan 25, 2005

a last drink with no ice

Bongo Bill posted:

Have you tried D?

If your complaints are about tooling, D is not the place to run, at least the last time I checked.

Hughlander
May 11, 2005

Dren posted:

Got any keywords I can use to search about this? Like, is it in the version of gcc I'm stuck on? (4.4.7) Does it need #pragma once?

I'll just leave this here: http://blog.demofox.org/2013/09/13/external-c-header-guards/ it features a coding horror as well as sourced references to why it's such a coding horror.

Dren
Jan 5, 2001

Pillbug

Hughlander posted:

I'll just leave this here: http://blog.demofox.org/2013/09/13/external-c-header-guards/ it features a coding horror as well as sourced references to why it's such a coding horror.

Yeah that is pretty awful but at least he follows up his post with all the reasons it's a bad idea.

Hughlander
May 11, 2005

Dren posted:

Yeah that is pretty awful but at least he follows up his post with all the reasons it's a bad idea.

Actually that was me calling him out on it on Facebook.

evensevenone
May 12, 2001
Glass is a solid.
One of my coworkers started doing this:
Python code:
from common_imports import *

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

evensevenone posted:

One of my coworkers started doing this:
Python code:
from common_imports import *

Well they're common imports so you'll want them at some point anyway :v:

Jarl
Nov 8, 2007

So what if I'm not for the ever offended?
code:
        // We make a copy of the list, so that the listeners can remove themselves without concurrency problems
        for (DownloadFailedListener listener : new ArrayList<DownloadFailedListener>(downloadFailedListeners)) {
            listener.downloadFailed(directory);
        }
A handful like it.

baquerd
Jul 2, 2007

by FactsAreUseless

Jarl posted:

code:
        // We make a copy of the list, so that the listeners can remove themselves without concurrency problems
        for (DownloadFailedListener listener : new ArrayList<DownloadFailedListener>(downloadFailedListeners)) {
            listener.downloadFailed(directory);
        }
A handful like it.

Are you talking about overall architecture? The code makes sense.

Jarl
Nov 8, 2007

So what if I'm not for the ever offended?

baquerd posted:

Are you talking about overall architecture? The code makes sense.

Another thread might change downloadFailedListeners while it is being copied. That operation is not atomic.

Plorkyeran
Mar 22, 2007

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

Jarl posted:

Another thread might change downloadFailedListeners while it is being copied. That operation is not atomic.

That's not what it's protecting against. It's handling the case where the listeners want to remove themselves from downloadFailedListeners when downloadFailed is called on them in the loop, all on one thread. Everything about that code is quite normal other than the word "concurrency" in the comment.

Jarl
Nov 8, 2007

So what if I'm not for the ever offended?

Plorkyeran posted:

That's not what it's protecting against. It's handling the case where the listeners want to remove themselves from downloadFailedListeners when downloadFailed is called on them in the loop, all on one thread. Everything about that code is quite normal other than the word "concurrency" in the comment.

I know it handles that, but the author ALSO thought it would handle what he says in his comment. He actually thought it would be thread-safe.

EDIT:
I didn't think it was necessary to elaborate since his comment claims the code does X, but does not actually do X. "Concurrency" is the important word. :)

Jarl fucked around with this message at 14:31 on Oct 14, 2013

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Concurrency doesn't necessarily imply multiple threads executing simultaneously.

The comment is saying that it allows listeners to remove themselves while an event is being dispatched without breaking the event dispatching mechanism - the removal of the listener occurs concurrent with an event being processed through the same list of listeners. There's nothing in the comment which suggests thread-safety.

Jarl
Nov 8, 2007

So what if I'm not for the ever offended?

Jabor posted:

Concurrency doesn't necessarily imply multiple threads executing simultaneously.

The comment is saying that it allows listeners to remove themselves while an event is being dispatched without breaking the event dispatching mechanism - the removal of the listener occurs concurrent with an event being processed through the same list of listeners. There's nothing in the comment which suggests thread-safety.

Okay, it needs to handle thread-safety. The guy who wrote it thought it did, and thus that is what he implied with concurrency. I have never before seen anybody use the word concurrency and not be thinking about multiple threads (they run concurrently). The guy who wrote it thought it would make it thread-safe (which again, it needs to be, and I thought it was not necessary to mention, since it said concurrency, which apparently can be used to mean other things).

I hope now it is clear why it is a coding horror. Also the program is littered with thread-concurrency errors. Race conditions AND deadlocks.

shrughes
Oct 11, 2008

(call/cc call/cc)

Jarl posted:

I have never before seen anybody use the word concurrency and not be thinking about multiple threads (they run concurrently). The guy who wrote it thought it would make it thread-safe (which again, it needs to be, and I thought it was not necessary to mention, since it said concurrency, which apparently can be used to mean other things).

It can be. Concurrency generally just means doing things at the same time. Event-based programming or other use of non-blocking system calls lets you do I/O concurrently, using one thread. Also some languages don't expose a notion of "threads" but you still end up having multiple CPUs executing code at the same time. Also, if you have cooperatively scheduled threads (obviously not the case in Java), that logic would be unhygienic but fine.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Jarl posted:

code:
        // We make a copy of the list, so that the listeners can remove themselves without concurrency problems
        for (DownloadFailedListener listener : new ArrayList<DownloadFailedListener>(downloadFailedListeners)) {
            listener.downloadFailed(directory);
        }
A handful like it.

On the plus side, the right way to do it isn't that far off so fixing this should be simple.

Jarl
Nov 8, 2007

So what if I'm not for the ever offended?

Volmarias posted:

On the plus side, the right way to do it isn't that far off so fixing this should be simple.

Indeed. It was just scary, that he thought it would work.

substitute
Aug 30, 2003

you for my mum
Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

:stare: That is probably the most unsanitized thing I have ever seen.

EAT THE EGGS RICOLA
May 29, 2008

substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

Holy poo poo.

Dooooo itttttttttt

Polidoro
Jan 5, 2011


Huevo se dice argidia. Argidia!
What was the game that sent SQL queries to their server?

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction

Polidoro posted:

What was the game that sent SQL queries to their server?

http://forums.somethingawful.com/showthread.php?threadid=2803713&pagenumber=258&perpage=40#post398884189

astr0man
Feb 21, 2007

hollyeo deuroga
I like how it took less than half of a page for that discussion to deteriorate into a "attacking the SMB servers was equivalent to rape" discussion :psyduck:

Sang-
Nov 2, 2007

substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

the company im renting my house from in london right now had (two years ago) a very similar thing in their website. I informed them that this was a *massive* security problem, and as of just now, its still not fixed.

Polidoro
Jan 5, 2011


Huevo se dice argidia. Argidia!

Thanks! Remembered reading about it but couldn't remember the game.

Dren
Jan 5, 2001

Pillbug
That meatboy thing was hilarious. I can't believe someone would expose a MySQL server to the internet as their backend. At least the game is fun.

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


Dren posted:

That meatboy thing was hilarious. I can't believe someone would expose a MySQL server to the internet as their backend. At least the game is fun.

If I recall someone actually took advantage of it to hack it, and claimed that it was to warn the devs or something.

Look Around You
Jan 19, 2009

substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

This is absolutely amazing.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

I wonder if it accepts a DELETE statement?

PS You should probably obfuscate this a little more.

pigdog
Apr 23, 2004

by Smythe

substitute posted:

Just encountered this in the URL bar on a partner's website:

<url w/ query string>... &_statement=SELECT%20*%20FROM%20fabrics%20where%20type%20like%20'%<our product's name>%'%20AND%20photo%20like%20'%jpg%'%20and%20dropped%20=0%20and%20active=1%20order%20by%20name

Just remember that besides fixing the obvious security hole, you'd best change all passwords in the MySQL server and pretty much consider any files in that server compromised, too.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Beamed posted:

If I recall someone actually took advantage of it to hack it, and claimed that it was to warn the devs or something.

You could also read the actual story in this very thread. There's even a convenient link literally two posts before yours!

Adbot
ADBOT LOVES YOU

TheresaJayne
Jul 1, 2011
I remember working for a large company,

They do websites for large organisations all running on the same engine.

They had a restful SQL service so that devs didnt have to write new DAO/Service calls just call the webservice to get your query....

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