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
QuarkJets
Sep 8, 2008

Oh God Forbid someone mock a dumb teenager

When it comes to coding horror, the coding gods do not care for your age, race, gender, or anything else. If you are writing code then they will ensure that your code is bad. Hallelujah

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

I love code like this because it's a testament to what you can get done if you free yourself from the shackles of aesthetic judgment and best practices and so on. If anything I envy people who can work like this.

csammis
Aug 26, 2003

Mental Institution
Dehumanize yourself and face to ten levels of indent

Tei
Feb 19, 2011
Probation
Can't post for 3 days!

QuarkJets posted:

Oh God Forbid someone mock a dumb teenager

When it comes to coding horror, the coding gods do not care for your age, race, gender, or anything else. If you are writing code then they will ensure that your code is bad. Hallelujah

hahaha.. this is true too.

Hallelujah

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
It's a spambot, they deserve it.

Munkeymon
Aug 14, 2003

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



Hammerite posted:

SQL Server has always seemed more gratuitously complicated.

I used it a few months ago and I think I just clicked Next until the progress bars showed? It might have required a restart which 😒


:allears: hah

Golbez
Oct 9, 2002

1 2 3!
If you want to take a shot at me get in line, line
1 2 3!
Baby, I've had all my shots and I'm fine
php:
<?
// SCMG, 06/30/2008: validating username first to eliminate sql injection
//   characters from being passed to auth class
$valUserName = new Zend_Validate_Regex("/^([a-zA-Z0-9\.\@\-\_]{6,100})$/");
?>
:sigh: thankfully I joined this company in 2014 so this isn't mine

Impotence
Nov 8, 2010
Lipstick Apathy

Golbez posted:

php:
<?
// SCMG, 06/30/2008: validating username first to eliminate sql injection
//   characters from being passed to auth class
$valUserName = new Zend_Validate_Regex("/^([a-zA-Z0-9\.\@\-\_]{6,100})$/");
?>
:sigh: thankfully I joined this company in 2014 so this isn't mine

is it bad that my first thought is "at least it's not trying to ban the word select, update, where"

spiritual bypass
Feb 19, 2008

Grimey Drawer

Golbez posted:

php:
<?
// SCMG, 06/30/2008: validating username first to eliminate sql injection
//   characters from being passed to auth class
$valUserName = new Zend_Validate_Regex("/^([a-zA-Z0-9\.\@\-\_]{6,100})$/");
?>
:sigh: thankfully I joined this company in 2014 so this isn't mine

PHP with a closing tag suggests further horrors, such as this code being in the middle of some HTML

FlapYoJacks
Feb 12, 2009

rt4 posted:

PHP with a closing tag suggests further horrors. such as this code being in the middle of some HTML

FTFY

Golbez
Oct 9, 2002

1 2 3!
If you want to take a shot at me get in line, line
1 2 3!
Baby, I've had all my shots and I'm fine

rt4 posted:

PHP with a closing tag suggests further horrors, such as this code being in the middle of some HTML

Horrors abound, but in this case those are just added by the bbcode php tag.

hyphz
Aug 5, 2003

Number 1 Nerd Tear Farmer 2022.

Keep it up, champ.

Also you're a skeleton warrior now. Kree.
Unlockable Ben
My horror is looking at coding jobs and every one being JavaScript

Impotence
Nov 8, 2010
Lipstick Apathy

hyphz posted:

My horror is looking at coding jobs and every one being JavaScript

why? JS is pretty good

QuarkJets
Sep 8, 2008

lol the horror is coming from inside the thread!!

FlapYoJacks
Feb 12, 2009

Biowarfare posted:

why? JS is pretty good

QuarkJets posted:

lol the horror is coming from inside the thread!!

tyrelhill
Jul 30, 2006
js is legit trash

Armauk
Jun 23, 2021


Biowarfare posted:

why? JS is pretty good

lol

Xik
Mar 10, 2011

Dinosaur Gum

I feel like the real horror here is how most of those apis work. Just a quick look through how those requests are constructed and these organisations presumably had teams or at least hired "real" developers that thought it was fine to expose public apis like this. Some are unauthenticated, some use basic auth with what appear to be hardcoded service accounts credential shipped with the front end. Most seem to not require verification of other account information before sending messages to their users phone etc.

Tei
Feb 19, 2011
Probation
Can't post for 3 days!
I am a huge fan of JS, but eh.

- Is prototype based instead of class based. The average programmer only understand class so is like giving a monkey a gun.
- Is single threaded
- Bad float pointer math
- Using + for concatenation (and this triggering hilarious conversions)
- Theres more than 100 ways to do one thing
- Lack of a import system to write modular (this has ben solved in modern versions)
- Lack of a strict mode that required strong typing.
- == triggering the hilarious conversion system

Is a fun language and I love it to bits, but is setup to create a lot of problems for the average programmer.

Tei fucked around with this message at 08:12 on Sep 19, 2021

spiritual bypass
Feb 19, 2008

Grimey Drawer
All of the mandatory async in the browser APIs is the worst part

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
javascript, or ecmascript whatever hair you want to split there, as a language is a normal and fine language that can do impressive things given the amount of work and intelligence put into its most popular interpreter and execution stacks. The concept of just-in-time javascript rendering of everything on the internet, the dev-side ecosystem that has sprung up around it, the design practices it has enabled, etc etc are loving dog poo poo though

Kazinsal
Dec 13, 2011
These days the language isn’t the problem, it’s the people who use it.

wolfman101
Feb 8, 2004

PCXL Fanboy

Xik posted:

I feel like the real horror here is how most of those apis work. (…) some use basic auth with what appear to be hardcoded service accounts credential shipped with the front end.

I actually just fixed this at a job not too long ago. I found out we were putting a token in plain text in the html doc and that token could be used in a few of our apis to change some data.

Volmarias
Dec 31, 2002

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

Xik posted:

I feel like the real horror here is how most of those apis work. Just a quick look through how those requests are constructed and these organisations presumably had teams or at least hired "real" developers that thought it was fine to expose public apis like this. Some are unauthenticated, some use basic auth with what appear to be hardcoded service accounts credential shipped with the front end. Most seem to not require verification of other account information before sending messages to their users phone etc.

Buddy, I've got some very bad news about the vast majority of people in nearly all businesses.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Volmarias posted:

Buddy, I've got some very bad news about the vast majority of people in nearly all businesses.

Xik
Mar 10, 2011

Dinosaur Gum

Volmarias posted:

Buddy, I've got some very bad news about the vast majority of people in nearly all businesses.

I've worked as a software dev in the medical insurance and finance industry so I'm unfortunately already painfully aware...

Hammerite
Mar 9, 2007

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

Vanadium posted:

I love code like this because it's a testament to what you can get done if you free yourself from the shackles of aesthetic judgment and best practices and so on. If anything I envy people who can work like this.

I used to be one of those people. My first real coding project (hobby project) was writing a PHP site from scratch without even using a framework because I didn't even know enough to realise that frameworks existed. The code was dogshit but it worked... poorly. Now I have a better idea of how to write decent quality code, and yet I am so much less productive than I was then when I was just typing garbage PHP into a text editor and debugging it on the live site. Not knowing you are doing it wrong is in a way the absence of a constraint.

Tei
Feb 19, 2011
Probation
Can't post for 3 days!
Writing bad code is like spitting straight up. It may feel good for a second, but then the spit lands on your face again.

Writing bad code would be like get asked to wear adult diapers with poo poo in it, and then travel like that from New York to San Francisco.

Is real bad for your mental health.

Tei fucked around with this message at 12:24 on Sep 21, 2021

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Everyone has a certain number of lines of bad code in them that they have to write before they can write good code

For some people it is more and for some people it is less but everyone has to get the bad code out of their system before they can start producing good code. I sincerely believe it

UraniumAnchor
May 21, 2006

Not a walrus.

Hammerite posted:

Everyone has a certain number of lines of bad code in them that they have to write before they can write good code

For some people it is more and for some people it is less but everyone has to get the bad code out of their system before they can start producing good code. I sincerely believe it

I sincerely believe that if you don't look at the code you wrote two years ago and go 'ugh', it's a sign you're not learning anything.

Hughmoris
Apr 21, 2007
Let's go to the abyss!

UraniumAnchor posted:

I sincerely believe that if you don't look at the code you wrote two years ago yesterday and go 'ugh', it's a sign you're not learning

wolfman101
Feb 8, 2004

PCXL Fanboy

UraniumAnchor posted:

I sincerely believe that if you don't look at the code you wrote two days ago and go 'ugh', it's a sign you're not learning anything.

Fixed that for you.

Edit, too slow

Ola
Jul 19, 2004

If you don't hate yourself as soon as you've thought of something you want to do in the future, what are you even etc.

Macichne Leainig
Jul 26, 2012

by VG
I'm integrating with a third party API.

They use OAuth2! Good!

They don't have any way for me to get a client ID and secret. Bad.

Emailed their tech support, they can help! Good!

Except they actually sent me a token, and it's just a base64 representation of literally "client:secret".

The client ID is "client" and the secret is "secret". Uhhh, I'm no OAuth2 expert, but that doesn't seem right...? :stonk:

Aren't you typically supposed to be able to generate your own client and secret as a developer?

Ola
Jul 19, 2004

Protocol7 posted:

I'm integrating with a third party API.


Problem found.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Protocol7 posted:

Aren't you typically supposed to be able to generate your own client and secret as a developer?
I guess, but this is basically the same as them sending you an API key. It's not great, but it's also not unheard of.

NtotheTC
Dec 31, 2007


Sagacity posted:

I guess, but this is basically the same as them sending you an API key. It's not great, but it's also not unheard of.

Except from the sounds of it everyone is getting the same API key?

Hammerite
Mar 9, 2007

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

Sagacity posted:

I guess, but this is basically the same as them sending you an API key. It's not great, but it's also not unheard of.

Yeah I think it would be normal for a well-built system, intended for third-party devs to interface with, that they give you some kind of API for registering your client. It's not essential* for all use cases for OAuth but I would be asking myself the same questions in the situation you describe (even if the "secret" was something halfway appropriate)

* for example, we created an OAuth provider for our various web resources to use for authentication to a central store of users. There was no need to provide an API for registering clients there, because they can be hardcoded - if we need to add, change or remove a client we can just deploy a new version with the relevant changes made.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

NtotheTC posted:

Except from the sounds of it everyone is getting the same API key?
Well, I assume it's not literally the text "client" and "secret"?

But isn't it the same when you use a key for accessing the Google Maps API from your website?

Adbot
ADBOT LOVES YOU

Volte
Oct 4, 2004

woosh woosh

Sagacity posted:

Well, I assume it's not literally the text "client" and "secret"?

But isn't it the same when you use a key for accessing the Google Maps API from your website?
It reads to me like it is the literal text "client" and "secret".

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