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
D34THROW
Jan 29, 2012

RETAIL RETAIL LISTEN TO ME BITCH ABOUT RETAIL
:rant:

Protocol7 posted:

Passwords and whatnot changed for obvious reasons.

Found this gem in an application provided by my company's offshore resources:



That's two sets of hardcoded credentials. In clientside Javascript. :smithicide:

There's two PowerShell scripts on our company network shares that have hardcoded credentials as well. They no longer work, yes I've tried them, but that they were ever there horrifies me.

Adbot
ADBOT LOVES YOU

OddObserver
Apr 3, 2009

Protocol7 posted:

Passwords and whatnot changed for obvious reasons.

Found this gem in an application provided by my company's offshore resources:



That's two sets of hardcoded credentials. In clientside Javascript. :smithicide:

At least it's using === to do it.

Ola
Jul 19, 2004

OddObserver posted:

At least it's using === to do it.

Added layer of security. :hmmyes:

BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


Having had to write an API Gateway in AWS using a lambda function to handle auth to an S3 bucket because credentials in client side JS is bad wrong this made my eye twitch.


Edit: having to do babbys first what is MVC lecture to a group of non technical people but have sign off on the technical design of a project.

BigPaddy fucked around with this message at 18:56 on Feb 1, 2022

wolfman101
Feb 8, 2004

PCXL Fanboy
I also recently removed a hard coded token from JS that was working.

Votlook
Aug 20, 2005

Protocol7 posted:

Passwords and whatnot changed for obvious reasons.

Found this gem in an application provided by my company's offshore resources:



That's two sets of hardcoded credentials. In clientside Javascript. :smithicide:

That is one way to interpret 2 factor authentication

Hammerite
Mar 9, 2007

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

Votlook posted:

That is one way to interpret 2 factor authentication

Something you have (lovely code) and something you are (a lovely coder)... checks out

boo_radley
Dec 30, 2005

Politeness costs nothing
https://twitter.com/nilscaspar/status/1488966680378109957

Tei
Feb 19, 2011

Criptobros code is a spaguetti ball of bad code.

https://twitter.com/marcan42/status/1489116645440507904

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Rest of the thread is amazing too:

https://twitter.com/marcan42/status/1489120184392908801

Ola
Jul 19, 2004

Meh, I've gotten attached to it now. Might keep it.

Xarn
Jun 26, 2015
C++ code:
#define _(Text) gettext(Text)

Beef
Jul 26, 2004
Perfectly legal as long as that is not in a header.

It is in a header isn't it.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Yes, that's the official API for gettext. It's gross but marking translateable strings kinda is something that merits a single-character prefix.

OddObserver
Apr 3, 2009

Plorkyeran posted:

Yes, that's the official API for gettext. It's gross but marking translateable strings kinda is something that merits a single-character prefix.

It's also not that likely to collide with other stuff, unlike, say, Xlib.h or windows.h #define's

Zopotantor
Feb 24, 2013

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

Plorkyeran posted:

Yes, that's the official API for gettext. It's gross but marking translateable strings kinda is something that merits a single-character prefix.

Should be updated to use a UDL.

Xarn
Jun 26, 2015

Plorkyeran posted:

Yes, that's the official API for gettext. It's gross but marking translateable strings kinda is something that merits a single-character prefix.

No. Also afaik it is technically reserved identifier when global, like a macro.

OddObserver posted:

It's also not that likely to collide with other stuff, unlike, say, Xlib.h or windows.h #define's

Unless you try to write C++ like it was a saner language

C++ code:
    std::unique_lock _(m);
:suicide:

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...
There was a proposal to use _ as a wildcard for pattern matching in C++23 (or whenever), but apparently that has now been superseded by __.

Plorkyeran
Mar 22, 2007

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

Zopotantor posted:

Should be updated to use a UDL.

Well given that it's a C library...

But yes, a UDL would be a a much better way to do something similar in C++.

Falcorum
Oct 21, 2010

Zopotantor posted:

There was a proposal to use _ as a wildcard for pattern matching in C++23 (or whenever), but apparently that has now been superseded by __.

I'm still amazed they ever got rid of trigraphs

Nalin
Sep 29, 2007

Hair Elf
IBM fought long and hard to keep them. It makes me wonder about their code.

Xerophyte
Mar 17, 2008

This space intentionally left blank

Nalin posted:

IBM fought long and hard to keep them. It makes me wonder about their code.

There's no mystery: several IBM customers -- notably banks, and I suspect also military clients -- still use EBCDIC instead of ASCII in various codebases that have been around since the mainframe days. You can read IBM's reply to the committee's "how many backwards yokels still use this crap?" inquiry here, if you want to briefly live in a world where IBM-only codepages are still a valuable contribution.

They're also not wrong, entirely. The standard should strive very hard to be backwards compatible, you shouldn't need to worry that a feature you rely on will be going away just because it is niche. Trigraphs were just sufficiently ruinous to be worth removing anyhow.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

I love that PDF and the sheet level of three-piece suit it exudes.

The part I couldn't figure out is: what kind of old code needs both to retain trigraph support *and* to get updated to C++17? Shouldn't extremely legacy software be entrusted to extremely legacy language versions?

OddObserver
Apr 3, 2009

Xerophyte posted:

There's no mystery: several IBM customers -- notably banks, and I suspect also military clients -- still use EBCDIC instead of ASCII in various codebases that have been around since the mainframe days. You can read IBM's reply to the committee's "how many backwards yokels still use this crap?" inquiry here, if you want to briefly live in a world where IBM-only codepages are still a valuable contribution.

They're also not wrong, entirely. The standard should strive very hard to be backwards compatible, you shouldn't need to worry that a feature you rely on will be going away just because it is niche. Trigraphs were just sufficiently ruinous to be worth removing anyhow.

EBCDIC does seem to have an _, though, so that's not it in this case.
And yeah, IBMs ability to keep running 50 year old software is actually pretty admirable.

Xerophyte
Mar 17, 2008

This space intentionally left blank

NihilCredo posted:

The part I couldn't figure out is: what kind of old code needs both to retain trigraph support *and* to get updated to C++17? Shouldn't extremely legacy software be entrusted to extremely legacy language versions?

It's not uncommon for very old code and very new code to live side-by-side in that sort of still-used legacy system. You might reasonably want to keep the battle-tested, bug-free ancient C code intact while using C++17 in the shiny new code that calls it from one file over, and that's a lot easier if the same compiler and settings mostly works for both because the language hasn't had any major breaking changes. That sort of compatibility is also helpful if you're trying to modernize legacy code, since then you can more easily do so incrementally.

I can understand IBM's position. It's just that, unfortunately for them, trigraphs are the worst.

CPColin
Sep 9, 2003

Big ol' smile.
Some might say that the worst trigraph was "IBM" all along

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

CPColin posted:

Some might say that the worst trigraph was "IBM" all along

"C++" is up there too.

Jazerus
May 24, 2011


NihilCredo posted:

I love that PDF and the sheet level of three-piece suit it exudes.

also the sheer level of bad writing

ExcessBLarg!
Sep 1, 2001

Xerophyte posted:

You might reasonably want to keep the battle-tested, bug-free ancient C code intact while using C++17 in the shiny new code that calls it from one file over, and that's a lot easier if the same compiler and settings mostly works for both because the language hasn't had any major breaking changes.
Why can't they support different encodings across translation units then? The old trigraph EBCDIC can remain as such and the new C++17 might have to be written in (*gasp*) ASCII. You'd need a common encoding for the symbols but that's something the compiler could figure out and fix up before passing it onto the linker, no?

Xerophyte posted:

That sort of compatibility is also helpful if you're trying to modernize legacy code, since then you can more easily do so incrementally.
It's hard to argue that they're making a good faith effort to modernize when they won't (or can't) adopt an encoding standard the rest of the industry settled on 50 years ago.

ExcessBLarg! fucked around with this message at 02:33 on Feb 6, 2022

Xarn
Jun 26, 2015
Well, you see, IBM provides perfect backwards compatibility for mainframes. This means that your environment will always be perfectly the same, including the old keyboards that led to creation of trigraphs.

ExcessBLarg!
Sep 1, 2001
poo poo, you think those keyboards are capacitive buckling spring? Where can I buy new?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
You get one free with the purchase of a mainframe.

Bongo Bill
Jan 17, 2012

ExcessBLarg! posted:

poo poo, you think those keyboards are capacitive buckling spring? Where can I buy new?

This was a joke question, but there's a company called Unicomp that bought IBM's old keyboard factory and offers updated designs with the same mechanism.

ExcessBLarg!
Sep 1, 2001
Yeah but those are membrane buckling spring. Close. I have two Model Ms I've been using for 20 years, but the Model Fs are where it's at.

Tei
Feb 19, 2011

https://twitter.com/bgluckman/status/1491576221649358848


Car have a media system integrated. The radio subsystem download files from HD radio stations and try to interpret them based o the extension [!]. Local radio uses a image withouth extension. This file enters the cache of the system, and causes a unexpected exception, that reboot the device... forever. Has a result, a type of vehicle gets frozen to only play this radio station forever.

Beef
Jul 26, 2004
Mazda just loves putting these little easter eggs in their car radios, don't they.
https://99percentinvisible.org/episode/the-roman-mars-mazda-virus/

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.bbc.co.uk/news/uk-england-tyne-60369098

quote:

An energy firm has apologised after 74 customers hit by power cuts during Storm Arwen accidentally received compensation cheques for trillions of pounds.

Northern Powergrid is paying tens of thousands of pounds to customers hit by days of outages in November.

But a number with Halifax and Newcastle postcodes received cheques made out for 13-figure sums.

...

A spokeswoman for Northern Powergrid said an electricity meter reference was incorrectly quoted as the payment sum.

Smells like a software issue that wasn't identified before the cheques went out, although who knows. Wonder what their system was doing.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Hammerite posted:

https://www.bbc.co.uk/news/uk-england-tyne-60369098

Smells like a software issue that wasn't identified before the cheques went out, although who knows. Wonder what their system was doing.

In freedom land they're accountable for the value on the check. Not sure if that's also true in the UK, but lol if they go bankrupt because they wrote bad checks.

DoctorTristan
Mar 11, 2006

I would look up into your lifeless eyes and wave, like this. Can you and your associates arrange that for me, Mr. Morden?

leper khan posted:

Not sure if that's also true in the UK, but lol if they go bankrupt because they wrote bad checks.

It isn’t and they won’t.

Adbot
ADBOT LOVES YOU

Jazerus
May 24, 2011


DoctorTristan posted:

It isn’t and they won’t.

tyranny

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