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
The Leck
Feb 27, 2001

New Yorp New Yorp posted:

Is this from radium.txt?
I don’t think radium would have used a test database.

Adbot
ADBOT LOVES YOU

redleader
Aug 18, 2005

Engage according to operational parameters

ChickenWing posted:

Let me tell you about the set of APIs I developed that our frontend steadfastly refuses to implement in any respectable fashion because they think having to use more than one API call for a certain behaviour is confusing

Are these APIs intended to be used by clients other than the frontend, or are they specifically to support the frontend and only the frontend? If it's the latter, I can understand his point because chaining a bunch of calls to 4 different REST endpoints for one UI action sucks.

speng31b
May 8, 2010

ChickenWing posted:

It's very fun, and cool, to develop a solid and at least reasonably RESTful API, and then have your frontend forcibly seize the reins after falling too far behind schedule to understand things like "code quality", and then start mandating hacks to your API because otherwise your app will never release

The other side of this coin is being on frontend web or mobile and listening to weeks on end of backend guys bikeshedding about which status codes are the most RESTful for some edge case.

Also you're doing the trendiest and most dogmatic possible take on scrum, with a flat technical hierarchy so noone has any moral authority to make a decision. Ultimately the dumbest person with the loudest opinion wins, you get all your responses as csvs for some reason because Chad read about it in a blog and as your soul drains out through all your orifices you stop caring forever and just accept whatever poo poo they give you.

speng31b fucked around with this message at 02:31 on Mar 29, 2018

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Lol at being stuck into front or backend dev. Full stack that poo poo all the way to the db and stomp all over each teams code base to ram your feature down their git pipeline, get promoted for delivering poo poo and then switch teams as it all starts to come apart.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Janitor Prime posted:

Lol at being stuck into front or backend dev. Full stack that poo poo all the way to the db and stomp all over each teams code base to ram your feature down their git pipeline, get promoted for delivering poo poo and then switch teams as it all starts to come apart.

gently caress that, build cloud native, ignore your existing stack entirely (and then switch teams as it all starts to come apart).

Bongo Bill
Jan 17, 2012

Decompose vertically, not horizontally. Banish the concept of layers from your mind. Go as near to the user or as near to the data center's processor as you need to make sure there's no game of telephone going on with the requirements.

fantastic in plastic
Jun 15, 2007

The Socialist Workers Party's newspaper proved to be a tough sell to downtown businessmen.

Janitor Prime posted:

Lol at being stuck into front or backend dev. Full stack that poo poo all the way to the db and stomp all over each teams code base to ram your feature down their git pipeline, get promoted for delivering poo poo and then switch teams as it all starts to come apart.

lol at being in engineering, fail up into management asap and then switch teams as it all starts to come apart

KoRMaK
Jul 31, 2012



Janitor Prime posted:

Lol at being stuck into front or backend dev. Full stack that poo poo all the way to the db and stomp all over each teams code base to ram your feature down their git pipeline, get promoted for delivering poo poo and then switch teams as it all starts to come apart.
This is good advice tho

KoRMaK
Jul 31, 2012



New Yorp New Yorp posted:

I worked with a client that had an API where you could POST some JSON to a Foo/Create method to create a Foo. They wanted to automate some stuff.

I quickly discovered that the response would contain the HTML rendering of the page that normally invoked the API including the new Foo. That's it. No new Foo ID. I asked how anyone was supposed to use the API to automate anything. They seemed confused by the question.

Lol looks like you gotta use xpath to find wat you need now

Service now does this poo poo, hibernating (doesn't respond) dev servers respond to api calls to tables with a 200 HTML response. "Wake me up (inside)" is retuned in the response body

Carbon dioxide
Oct 9, 2012

Advice for y'all: Try being less jaded.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Carbon dioxide posted:

Advice for y'all: Try being less jaded.

Sigh. That won't change anything.

FlapYoJacks
Feb 12, 2009

Carbon dioxide posted:

Advice for y'all: Try being less jaded.

It's never worked before, why start now?

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

vonnegutt posted:

one time I worked on an API that was required to return 200 for every http request. If it was an error we were required to return 200 with a body of {error_code: 500, error: foo}. We asked the client why and they acted like we were the weird ones.

I've just spent two months building an API integration for a service that does this. Plus it takes parameters for the POST requests. Plus the body has to be an encoded query string, and to allow it to actually submit to the API, you have to have some of the parameters in the query string, then repeat them in the encoded body string.

Then I've been sitting looking at logs for the past four hours because the integration works against the test endpoint they gave us, but is now failing in prod because the request can have either one specific param or the other and we can't tell in advance, so I make two sequential requests: first one with param1 says param2 is missing, error, second one with param2 says param1 is missing, error, ffs

RobertKerans fucked around with this message at 12:06 on Mar 29, 2018

vonnegutt
Aug 7, 2006
Hobocamp.

RobertKerans posted:

Then I've been sitting looking at logs for the past four hours because the integration works against the test endpoint they gave us, but is now failing in prod because the request can have either one specific param or the other and we can't tell in advance, so I make two sequential requests: first one with param1 says param2 is missing, error, second one with param2 says param1 is missing, error, ffs

Oh you're definitely working on the project I was on, godspeed

ChickenWing
Jul 22, 2010

:v:

speng31b posted:

The other side of this coin is being on frontend web or mobile and listening to weeks on end of backend guys bikeshedding about which status codes are the most RESTful for some edge case.

I've honestly just come to the conclusion that I will never get HTTP status codes right and should really just dehumanize and face to returning HTTP 400 for literally any user-generated error.


I remember in the earlier days of this project I was talking with the architect about something and I was pretty adamant that error X should be 422 and not 400 because it's specifically this behaviour and not that and he sorta laughed and said "sure, sounds good" and now I look back on that and understand exactly what was going through his mind at that point

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

I was in a project where I had to test the functionality behind an api and if you didn't get the flow and body at that point juuuust right, it would throw an error 500. Have fun debugging that.

CPColin
Sep 9, 2003

Big ol' smile.

Che Delilas posted:

Sigh. That won't change anything.

A good post

Bongo Bill
Jan 17, 2012

ChickenWing posted:

I've honestly just come to the conclusion that I will never get HTTP status codes right and should really just dehumanize and face to returning HTTP 400 for literally any user-generated error.


I remember in the earlier days of this project I was talking with the architect about something and I was pretty adamant that error X should be 422 and not 400 because it's specifically this behaviour and not that and he sorta laughed and said "sure, sounds good" and now I look back on that and understand exactly what was going through his mind at that point

I like this flowchart.

ChickenWing
Jul 22, 2010

:v:


That is a good flowchart. I wonder how long the disagreement discussion will last when I link it on slack

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

That's really good.

reversefungi
Nov 27, 2003

Master of the high hat!
Question about that flowchart: It says if the user's view doesn't change, then return a 204. What's a good example of this? I was trying to imagine a scenario where you would hit a save button on some front-end app and if that would return 204, but I guess even in this scenario you would display a little message that says "save successful," thus warranting a 200.

Munkeymon
Aug 14, 2003

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



The Dark Wind posted:

Question about that flowchart: It says if the user's view doesn't change, then return a 204. What's a good example of this? I was trying to imagine a scenario where you would hit a save button on some front-end app and if that would return 204, but I guess even in this scenario you would display a little message that says "save successful," thus warranting a 200.

Presumably the front end knows how to display the message based on the server indicating the operation succeeded.

CPColin
Sep 9, 2003

Big ol' smile.
A browser that sees a 204 won't try to clear the current document and load a new one, even if you forget the return false; on the end of whatever script just ran. Basically, you should be able to have a Save button that just performs a standard POST, without AJAX scripting, or something. But yeah, you'd still have to have scripting look for the 204 anyway, so who knows how useful this feature is.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
You have a form with a bunch of fields. The user edits one, then clicks the save button. You send off a PUT request with the new value of the one field the user edited.The server sends back some acknowledgement that the PUT was accepted. What should that acknowledgement contain?

There's a few potential options:

1. Nothing at all.
2. A status message of some sort.
3. The new values of the fields that were modified.
4. The full new state of the object being worked on.

204 is the first case, where there just plain isn't anything to report to the client beyond that their request succeeded. You could of course send a 200 with an empty body, but that's more confusing when looking at request/response logs, or a 200 with a body that says "hey nothing to report", but that's just reinventing a 204 response.

redleader
Aug 18, 2005

Engage according to operational parameters
I had one where you could apply search filters using syntax very similar to that of a SQL where clause.

Then I sent through a malformed parameter and got back a syntax error exception from their DB.

This same API took and returned data as CSV.

Despite the above, it was actually fine to develop against, and worked pretty well.

Hughlander
May 11, 2005

ChickenWing posted:

That is a good flowchart. I wonder how long the disagreement discussion will last when I link it on slack

You'll discover as I did the slack client doesn't render SVGs

Taffer
Oct 15, 2010


Hughlander posted:

You'll discover as I did the slack client doesn't render SVGs

Ahhh, the benefits of electon. :downs:

xiw
Sep 25, 2011

i wake up at night
night action madness nightmares
maybe i am scum

Cpig Haiku contest 2020 winner

redleader posted:

I had one where you could apply search filters using syntax very similar to that of a SQL where clause.

Then I sent through a malformed parameter and got back a syntax error exception from their DB.

Yeah I love it when an API basically demonstrates for you how to SQLI the database at the far end in its own error messages.

The worst longterm hack I've had with APIs is an ecommerce job where I'm regularly updating price and special price data at my end. There's a getProductInfo call to make, but it doesn't include special price info because they've been implemented as a loyalty discount if you're a customer.

So the only way to get the special price we could find is, roughly,

* call createGuestCart, get a cartID1
* call addProductToCart(cartID1,SKU)
* call getCartTotal(cartID)
* call createCustomerCart(customerID) where this is a magic customerID we keep around for this
* call addProductToCart(cartID2,SKU)
* call getCartTotal(cartID2)
* if the total for cart2 is lower than cart1, then we know the product's on special!

Repeat for 30k SKUs each day. Hope they never delete the magic customer.

I was on the phone with the vendor for hours over months trying to determine a better way of doing this and they couldn't think of one.

Volguus
Mar 3, 2009

xiw posted:

Yeah I love it when an API basically demonstrates for you how to SQLI the database at the far end in its own error messages.

The worst longterm hack I've had with APIs is an ecommerce job where I'm regularly updating price and special price data at my end. There's a getProductInfo call to make, but it doesn't include special price info because they've been implemented as a loyalty discount if you're a customer.

So the only way to get the special price we could find is, roughly,

* call createGuestCart, get a cartID1
* call addProductToCart(cartID1,SKU)
* call getCartTotal(cartID)
* call createCustomerCart(customerID) where this is a magic customerID we keep around for this
* call addProductToCart(cartID2,SKU)
* call getCartTotal(cartID2)
* if the total for cart2 is lower than cart1, then we know the product's on special!

Repeat for 30k SKUs each day. Hope they never delete the magic customer.

I was on the phone with the vendor for hours over months trying to determine a better way of doing this and they couldn't think of one.

This sounds like a classical service to service calls using client credentials. Nothing new here, and there are standards and libraries in all languages and platforms to help with implementing this. What's new is that neither service supported it or had any clue about what they were doing.
Sorry, I take that back. It is normal that no service had any idea of how to implement this. Would have been crazy otherwise.

CPColin
Sep 9, 2003

Big ol' smile.
Boss, to me at 3:30 yesterday: "Hey, does the time estimate for Feature X change if we include Details Y and Z?"
Boss, unprompted, to customer at 3:31 yesterday: "Do you need Feature X to include Details Y and Z?"
Me, to boss at 3:40 yesterday: "No, the estimate wouldn't change."
Customer, today: "I don't know what Details Y and Z are."
Boss, to us devs: "Can you answer Customer's question about Details Y and Z?"

Thanks, boss, for asking the customer a confusing question that we didn't actually need an answer to!

Edit: I replied to the customer within fifteen minutes of my boss's request. Now, two hours later, the other dev just replied that we don't need that answer and my boss asked him to reply to the customer.

CPColin fucked around with this message at 21:15 on Apr 4, 2018

Click Beelay
Oct 13, 2011

Click Beelay posted:

Crossposted from the front-end thread as I didn't realize nobody's posted there in a week, sorry!

--

I hope this is the right place, looking for some insight.

I just graduated with a BSc in compsci and I've been offered a frontend position at a startup, which is owned by a huge company in my country, for pretty decent pay considering I have no real-world programming experience.

I'll be using JavaScript, React, Async, and Redux, and will apparently be given some exposure to backend (my preference) and mobile development.

Now the hosed up part, I never used any of those technologies throughout my degree. The last three I'd never even heard of until I started researching after the interview. I was very up-front about my experience and was assured it wasn't an issue, though I was made aware that I "will be learning a gently caress load".

The whole thing seems bewildering to me but I'm committed now, or at least intend to be after I receive the contract and it checks out - provided I'm not about to make a stupid mistake. That said, one of my circle of friends is made up of mostly mid-senior developers and a couple architects who've all seen my work, and assured me that I'll be fine.

So far, I've picked up the javascript fundamentals from Codecademy and I'm in the process of trying to wrap my head around React from the obvious resources I could find, and I'll be spending the weekend doing the same for Async and Redux. I'm also in the process of building every basic javascript app I can find tutorials for.

For reference, all my spare time is spent with coding, at the gym, gaming, or with the missus so I'm not worried about being able to fit in a lot of research and practice in my own time, after work, as it'll probably be necessary.

My question - am I hosed, or is it likely that since I have no experience outside of uni I'm overthinking the difficulty of being thrown into several technologies I've never heard of? Finally, could anyone recommend some learning resources for the four things I've listed?

Thanks.

I don't really have a place to share this kind of thing in real life besides my partner but ~2.5 years after the above post I'm about to sign the contract for the lead developer position at this cool little place that took a chance on me! In this time we've grown from a local company of ~7 people to 30+ operating across two countries and it's been a wild ride.

My first ~1.5 years was spent grinding/building stuff/leetcode/learning something almost daily after work but it's paid off! I've had junior, intermediate, senior, and now lead contracts during my time here and my salary has increased by 267% since my original post. I don't get to code as much as I'd like to any more but it's rewarding as hell helping all the devs and QA guys grow, I've had the lead responsibilities since January so the new contract is essentially just a very happy and welcome acknowledgement.

Thanks thread for being a supportive environment when I doubted myself a lot. You guys are awesome and our industry is awesome.

Pollyanna
Mar 5, 2005

Milk's on them.


Click Beelay posted:

I don't really have a place to share this kind of thing in real life besides my partner but ~2.5 years after the above post I'm about to sign the contract for the lead developer position at this cool little place that took a chance on me! In this time we've grown from a local company of ~7 people to 30+ operating across two countries and it's been a wild ride.

My first ~1.5 years was spent grinding/building stuff/leetcode/learning something almost daily after work but it's paid off! I've had junior, intermediate, senior, and now lead contracts during my time here and my salary has increased by 267% since my original post. I don't get to code as much as I'd like to any more but it's rewarding as hell helping all the devs and QA guys grow, I've had the lead responsibilities since January so the new contract is essentially just a very happy and welcome acknowledgement.

Thanks thread for being a supportive environment when I doubted myself a lot. You guys are awesome and our industry is awesome.

Nice job, holy poo poo. I've been in the industry for like 3.5 years and I'm nowhere near your level.

Click Beelay
Oct 13, 2011

Pollyanna posted:

Nice job, holy poo poo. I've been in the industry for like 3.5 years and I'm nowhere near your level.

Thanks man. I was fortunate in that, for a long time, I was able to spend several hours a day learning after work due to having no major responsibilities. I've since bought a house and moved in with my partner so less time for grinding udemy/leetcode nowadays.

Keep in mind all my professional experience is 100% focused on a specific tech stack and tool sets, specifically MERN, GraphQL, some Postgres, TravisCI, AWS, Docker, etc. If I were to find employment elsewhere using a different tech stack and tools it's unlikely that I would be comfortable coming in as lead.

Paolomania
Apr 26, 2006

Pollyanna posted:

Nice job, holy poo poo. I've been in the industry for like 3.5 years and I'm nowhere near your level.

Don't sweat it. Ground-floor on a successful company is a rare opportunity. It took me 6+ years and 3 job changes before I landed some place that really had a supportive environment for growth.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Congrats, you've gone further than a lot of people in a very short span of time, and if you did get another job elsewhere I imagine you'd end up excelling just as you did here.

Click Beelay
Oct 13, 2011

That genuinely means a lot, thanks man. Still have a lot of imposter syndrome when meeting other devs at conferences/meetups but after 2.5 years I've kinda gotten used to it and keep stumbling forward anyway.

Murrah
Mar 22, 2015

I work remotely on a small team for a small company and Ive just hit my first year anniversary of working full time as a dev. Its great and Ive learned a lot of practical stuff albeit the app we work on was first started in 2009 and has a lot of stuff from around that time and quirks (JQuery/PHP/ Symfony 1.x framework,/MySQL).

Now, compared to when I was bright eyed and coming out of a bootcamp I realize just how hard things are and how much effort is taken to really hone in a skill and to exercise it to remember it. I really struggle with the energy needed to really pick up something modern on the side or complete projects. All the 'uninformed enthusiasm' I had for coding is gone and I just feel a lot of dread generally about work. I am regularly in awe and feel diminutive compared to my senior teammates who create integrations with API's and handle operations stuff I have no clue how to do- I know it just takes time and keeping at your skills etc.

I feel worse about the prospect of interviewing now and doing anything like a whiteboard coding scenario or getting asked about algorithms than I did a year ago. This is despite having a little over a year experience now just because I feel like Ive been brought right down to earth /rant

On the upside because the company is completely remote first I have been able to make plans to move across country with the companies blessing/relative indifference. Compared to where my life was over a year ago working remotely has been a real blessing.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Take the advice of those senior devs with a grain of salt. Surely they have something to do with the fact that you haven't migrated away from Symfony 1.

Murrah
Mar 22, 2015

rt4 posted:

Take the advice of those senior devs with a grain of salt. Surely they have something to do with the fact that you haven't migrated away from Symfony 1.

That's been largely a management direction thing I think, it's only part of the app as well. It's been said since early when I started there was an intention to replace it was just sidelined lol.

Adbot
ADBOT LOVES YOU

toiletbrush
May 17, 2010
that feeling when at the end of interviewing a candidate you are told that you're not interviewing to find a replacement for the other dev, who's leaving, you're interviewing to replace yourself, because you're replacing the lead, because his contract isn't being renewed, while he's there. And the other dev is still leaving.

that feeling when you know if you stay you'll never have a life outside of work ever again, and you're already lead on other things so you won't get a change in title or raise, but if you leave, the project will die - no-one will lose their job, but people you like will be affected - and you'll feel like a pussy/rear end in a top hat.

also that feeling when you were going to start looking for another job anyway but now your hand has been forced and you've no idea what to do :(

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