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.
 
  • Locked thread
Bloody
Mar 3, 2013

Space Whale posted:

We walked through the code together (tribal knowledge, woo!! gently caress writing poo poo down!) and he kept apologizing for how bad the code was.

i do this every time i show someone any code i've written.

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

Space Whale posted:

I thought consulting was glamorous not "oh my gooooood why didn't you call us sooner." On the flip side I feel better about my code.

lol

Bloody
Mar 3, 2013

'i know its bad, i know, sorry, this part is especially gross'

Bloody
Mar 3, 2013

common issue in creative fields: more quickly developing an eye for what is good/what is bad than developing the skills to create something good. if you're lucky, after years of effort you may be capable of creating things that you consider to be good

Space Whale
Nov 6, 2014
This isn't his code, as in he wrote it. He did not.

This is the mess we're fixing though.

Bloody
Mar 3, 2013

wait then why is he apologizing for it

Space Whale
Nov 6, 2014

Bloody posted:

wait then why is he apologizing for it

He had some knowledge of it and a lot of stuff that isn't documented (biz rules, accounting formulas, bla bla bla) and he had to impart it and walk me through it, otherwise it's basically super slow spelunking and deciphering.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

echinopsis posted:

what is this? something forgeniers get to remote work from their hut in mongolia

yes

it's some e-commerce system made in php. it's... not very nice to work with but eh I've seen worse.

HoboMan
Nov 4, 2010

so the api i am now lead dev on is secretly just a wrapper for a another api that no one even knew about

by a wrapper i mean the endpoints in it literally just call endpoints for a different api

e: i'm really at a loss for what to do about this

HoboMan fucked around with this message at 21:54 on Aug 22, 2016

echinopsis
Apr 13, 2004

by Fluffdaddy

Symbolic Butt posted:

yes

it's some e-commerce system made in php. it's... not very nice to work with but eh I've seen worse.

so what do ya do? janitor websites or handle transcations

CPColin
Sep 9, 2003

Big ol' smile.

HoboMan posted:

so the api i am now lead dev on is secretly just a wrapper for a another api that no one even knew about

by a wrapper i mean the endpoints in it literally just call endpoints for a different api

e: i'm really at a loss for what to do about this

Get paiiiiiiiiid

MrMoo
Sep 14, 2000

Replace it with Apigee, or is the service supposed to reimplement those features?

HoboMan
Nov 4, 2010

MrMoo posted:

Replace it with Apigee, or is the service supposed to reimplement those features?

lol no, it's literally an api for our api

HoboMan
Nov 4, 2010

CPColin posted:

Get paiiiiiiiiid

different internal api that no one is developing because the ohter api was masking it so the fact it exists fell though the cracks

HoboMan
Nov 4, 2010

like this is dumber than i could have possibly ever imagined

MrMoo
Sep 14, 2000

The closest I have seen is having a C++ API wrapped by a C API being wrapped by an open source C++ API because the C API was old and they introduced C++ to simplify the internal code and reduce memory leaks but no one wanted to introduce a new API to support. C++ source was popular due to ABI breakage on compilers.

HoboMan
Nov 4, 2010

hahahaholy poo poo i found the "hidden" api. this server is literally making an http request to itself

AWWNAW
Dec 30, 2008

HoboMan posted:

hahahaholy poo poo i found the "hidden" api. this server is literally making an http request to itself

ultimate code reuse

quiggy
Aug 7, 2010

[in Russian] Oof.



im a little slow but this is also useful in multithreaded contexts, ie thread A will never change the object so it wants it const to enforce that, but thread B may be simultaneously changing the object. thread A needs to know that it may change (volatile) but also that it's not allowed to do the changing itself (const)

quiggy
Aug 7, 2010

[in Russian] Oof.


GameCube posted:

*reading visual studio express 2005 build output, in idiot undergrad voice* cannot assign to a variable that is const? what the gently caress? *selects the word "const" by holding trackpad button with one finger and dragging over it with the other, code compiles* wow computers are loving bullshit, why would they include a word that just makes your code not compile *submits homework assignment, gets wasted at 6 pm on a tuesday*

speaking of which i was trying to read some code today from one of our interns and he had a member variable i that he used as a loop variable anywhere he used as a loop and for some reason every single method had the following line in it:

code:
i;
:psyduck:

JawnV6
Jul 4, 2004

So hot ...
"the compiler yelled at me about unused variables (before i wrote the actual loop) without that!"

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

HoboMan posted:

hahahaholy poo poo i found the "hidden" api. this server is literally making an http request to itself

yesssss

CPColin
Sep 9, 2003

Big ol' smile.

HoboMan posted:

different internal api that no one is developing because the ohter api was masking it so the fact it exists fell though the cracks

Oh nice that's way better!

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

new version of android apparently has some java 8 support. you can use lambdas on projects targeting back to android 2.3 but some of the other features require targeting the new api #

time to learn me a lambda i guess

Luigi Thirty
Apr 30, 2006

Emergency confection port.

well the player has a throttle in my 3D game now so that's something

hobbesmaster
Jan 28, 2008

Lutha Mahtin posted:

new version of android apparently has some java 8 support. you can use lambdas on projects targeting back to android 2.3 but some of the other features require targeting the new api #

time to learn me a lambda i guess

lambdas own

functional programming owns

jony neuemonic
Nov 13, 2009

HoboMan posted:

hahahaholy poo poo i found the "hidden" api. this server is literally making an http request to itself

please never stop posting.

Sapozhnik
Jan 2, 2005

Nap Ghost
oauth2 is poo

it's surprisingly difficult to make a well-layered implementation of an oauth2 provider but then maybe i'm just a terrible programmer

at least it's not oauth1 where you had to do a bunch of cryptographic shite yourself because oh no what if somebody breaks your TLS encryption and we want to delude ourselves that all hope of security isn't already lost

cowboy beepboop
Feb 24, 2001

MALE SHOEGAZE posted:

loving owned for like 5 hours in stage because i didn't know java has its own CA trust process

people bitch and whine about containers and flatpak et al but java doing its own dumb ssl stuff is terrible and gets a pass because??

Shaggar
Apr 26, 2006

Mr Dog posted:

oauth2 is poo

it's surprisingly difficult to make a well-layered implementation of an oauth2 provider but then maybe i'm just a terrible programmer

at least it's not oauth1 where you had to do a bunch of cryptographic shite yourself because oh no what if somebody breaks your TLS encryption and we want to delude ourselves that all hope of security isn't already lost

just use the oauth2 stuff built in to .net. if you need a more sophisticated workflow, checkout identityserver3 (or 4 if ur on .net core).

hobbesmaster
Jan 28, 2008

my stepdads beer posted:

people bitch and whine about containers and flatpak et al but java doing its own dumb ssl stuff is terrible and gets a pass because??

that's because it's cross platform! you could be using it on an os that doesn't have a cert store!

hobbesmaster fucked around with this message at 06:41 on Aug 23, 2016

triple sulk
Sep 17, 2014



windows

:whitewater:

fritz
Jul 26, 2003

AWWNAW posted:

ultimate code reuse


class hierarchy look like a dishrag

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Lutha Mahtin posted:

new version of android apparently has some java 8 support. you can use lambdas on projects targeting back to android 2.3 but some of the other features require targeting the new api #

time to learn me a lambda i guess

just press ctrl-space and let the ide do it. no learning required

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
like seriously
button.addClickListener(
<ctrl-space>
and the ide will suggest "event -> {}"

Progressive JPEG
Feb 19, 2003

HoboMan posted:

hahahaholy poo poo i found the "hidden" api. this server is literally making an http request to itself

a few months ago i wrote a script that would delete itself from the service that ran it before exiting

it actually worked pretty well

JawnV6
Jul 4, 2004

So hot ...

Wheany posted:

<ctrl-space>

wish this was like predictive text where you could mash repeatedly until there's a whole function

gonadic io
Feb 16, 2011

>>=

Progressive JPEG posted:

a few months ago i wrote a script that would delete itself from the service that ran it before exiting

it actually worked pretty well

if only the nsa had done the same

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
so it seems object oriented C, and especially my beloved use of superclasses at non-zero offsets, is technically broken as it violates strict aliasing. basically nobody can agree on what C code compiles to anymore. there are two proposals for dialects of C that make intuitive sense and privilege the programmer's needs over the compiler writer's:

boringcc: https://groups.google.com/forum/m/#!msg/boring-crypto/48qa1kWignU/o8GGp2K1DAAJ
friendly c: http://blog.regehr.org/archives/1180

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost

fritz posted:

class hierarchy look like a dishrag

  • Locked thread