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
Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Electrical engineers write a very special kind of code.

Adbot
ADBOT LOVES YOU

Carbon dioxide
Oct 9, 2012

https://thenewstack.io/which-programming-languages-use-the-least-electricity

Xarn
Jun 26, 2015
That's quite the name + content combo

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

It looks like they dont include energy used for compilation?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Or time spent developing, debugging, and testing :eng101:

Macichne Leainig
Jul 26, 2012

by VG
I'm finally being offered a full-time position at my side gig (that was hourly part-time work). It's a 20k pay bump, and the work is a lot more fulfilling. And, most excitedly, if I play my cards right, I can turn in my notice this week and my last day at my current job will be before our next PI Planning meeting.

The work rig they want to give me at the new place is a dual-2080 Ti machine (for use with machine learning, of course.) That's also a bonus.

Munkeymon
Aug 14, 2003

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



leper khan posted:

It looks like they dont include energy used for compilation?

It's O(1) but the number of times you run the code is O(n)

Carbon dioxide
Oct 9, 2012

"Announcement: Because nobody can agree on REST standards the company will move towards SOAP, an up to date communication protocol with a proven track record."

Apparently this is the idea of a funny April Fools' joke among developers.

Polio Vax Scene
Apr 5, 2009



It made me laugh

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Carbon dioxide posted:

"Announcement: Because nobody can agree on REST standards the company will move towards SOAP, an up to date communication protocol with a proven track record."

Apparently this is the idea of a funny April Fools' joke among developers.

I honestly thought you were making a sincere statement. Sounds completely plausible.

Volguus
Mar 3, 2009

Carbon dioxide posted:

"Announcement: Because nobody can agree on REST standards the company will move towards SOAP, an up to date communication protocol with a proven track record."

Apparently this is the idea of a funny April Fools' joke among developers.

The real joke is that developers would want to plan ahead instead of just sending whatever they feel like today on the wire.

smackfu
Jun 7, 2004

Heard at work today: Can our REST library handle XML responses instead of JSON?

MrMoo
Sep 14, 2000

smackfu posted:

Heard at work today: Can our REST library handle XML responses instead of JSON?

Of course, if you're lucky you may even get a CDATA,
code:
<JSON>{
  "firstName": "John",
  "lastName": "Smith"
}
</JSON>

Gildiss
Aug 24, 2010

Grimey Drawer

smackfu posted:

Heard at work today: Can our REST library handle XML responses instead of JSON?

Hahah.

What's a database? We want you to crawl Grubhub and scrap their site for restaurant data and then put that data into excel sheets which our backsystem will serve to the APP.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

Gildiss posted:

Hahah.

What's a database? We want you to crawl Grubhub and scrap their site for restaurant data and then put that data into excel sheets which our backsystem will serve to the APP.

:smith:

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Gildiss posted:

Hahah.

What's a database? We want you to crawl Grubhub and scrap their site for restaurant data and then put that data into excel sheets which our backsystem will serve to the APP.

And don't worry, only the entire Marketing department is allowed to edit those excel sheets manually.

Carbon dioxide
Oct 9, 2012

It is technically legal to use other formats than json in REST, including, yes, XML. As far as I know REST doesn't say anything about the format, only about the meaning of http methods on certain URIs, like POST on someURL/123 creates 123 while PUT does an update (but as I said, nobody can agree on which is supposed to which, there seem to be as many REST 'standards' as there are pages explaining REST).

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Carbon dioxide posted:

It is technically legal to use other formats than json in REST, including, yes, XML. As far as I know REST doesn't say anything about the format, only about the meaning of http methods on certain URIs, like POST on someURL/123 creates 123 while PUT does an update (but as I said, nobody can agree on which is supposed to which, there seem to be as many REST 'standards' as there are pages explaining REST).

well like
a) rest is a set of constraints on web services, so why would you need a special "rest" client if you have an http client? i imagine something calling itself a client rest library probably exists, but the pm asking about it specifically might indicate a lack of understanding of what rest is supposed to be.
b) ideally you should be able to just specify request type in web request and server framework will take care of the xml/json deserialization - however, someone asking if this is possible usually means a maintenance drone or a dinosaur programmer not familiar with web is trying to make a web request from some unholy legacy code, which is scary.

Messyass
Dec 23, 2003

Theoretically, a proper REST client would be able to do smart stuff like hypermedia navigation, so it's not just an http client.

But... because people (justifiably) don't give a poo poo about HATEOAS, and XML is uncool, REST basically just means "JSON over HTTP" now and we'll have to accept that.

sunaurus
Feb 13, 2012

Oh great, another bookah.

Messyass posted:

REST basically just means "JSON over HTTP" now and we'll have to accept that.

I'll keep stubbornly complaining about people using "REST" when they really mean "HTTP" until I die thank you very much

sunaurus
Feb 13, 2012

Oh great, another bookah.
"Relaying a question from our developers: do you intend to complete this integration using traditional SOAP requests or will we be using the newer REST requests?"

Translated to English from an actual e-mail in my inbox. A few e-mails later it turned out that the reason he was asking was that whatever framework his developers were using was apparently much faster at handling json than xml so clearly "REST requests" were the better design choice

redleader
Aug 18, 2005

Engage according to operational parameters
Use SOAP just to annoy them slightly.

Jose Valasquez
Apr 8, 2005

redleader posted:

Use SOAP just to annoy them slightly.

Goons don't know how to use SOAP

Pollyanna
Mar 5, 2005

Milk's on them.


Ive been kicking myself a bit recently for using non-REST endpoints while we put this new functionality together, it feels so weird not to have explicit get-post setups.

Clanpot Shake
Aug 10, 2006
shake shake!

We switched from REST to graphql a few months ago and it's been pretty good. It's still just JSON over HTTP though.

sunaurus
Feb 13, 2012

Oh great, another bookah.
I've seen a few attempts at structuring HTTP APIs to look like REST so that each endpoint represents a resource or a collection of resources. Eventually it always just becomes this weird masturbation over translating actions/procedures into resources (because endpoints can only refer to resources or collections). I've seen people argue for replacing `POST /login` with `POST /login-attempts` because the first is an action not a resource therefore it's not ~~REST~~ therefore it's ugly and can't be used (meanwhile the API isn't REST anyway as REST is basically useless without an AI client but hey whatever)

My Rhythmic Crotch
Jan 13, 2011

Gildiss posted:

Hahah.

What's a database? We want you to crawl Grubhub and scrap their site for restaurant data and then put that data into excel sheets which our backsystem will serve to the APP.

This reminds me of something I read about The Sims. They had excel sheets that modeled the AI and objects and stuff. The would tune and tweak the game from excel, then their tooling would scrape the spreadsheets to generate the datafiles for the build process. It was horrifying from a maintenance perspective, but kinda cool from the perspective of seeing all the internals represented as graphs and numbers.

Macichne Leainig
Jul 26, 2012

by VG

My Rhythmic Crotch posted:

This reminds me of something I read about The Sims. They had excel sheets that modeled the AI and objects and stuff. The would tune and tweak the game from excel, then their tooling would scrape the spreadsheets to generate the datafiles for the build process. It was horrifying from a maintenance perspective, but kinda cool from the perspective of seeing all the internals represented as graphs and numbers.

I like the idea on paper though. Seems like starting with hard math for your gameplay stuff is a good idea, especially with something with as much gameplay stuff as the Sims.

Now in practice I wouldn't want to try to work that kind of thing into my toolset.

Macichne Leainig fucked around with this message at 16:37 on Apr 3, 2019

raminasi
Jan 25, 2005

a last drink with no ice
Isnt bespoke tooling for designers standard game dev practice? Sure, the tool isnt usually Excel, but the decision isnt categorically ludicrous, especially given that reading data from a simple spreadsheet isnt that painful.

My Rhythmic Crotch
Jan 13, 2011

raminasi posted:

Isnt bespoke tooling for designers standard game dev practice? Sure, the tool isnt usually Excel, but the decision isnt categorically ludicrous, especially given that reading data from a simple spreadsheet isnt that painful.

I'm just imagining making custom annotations in java so that you can deserialize from excel files. Every member of every class having @Element(cell="B23") or something, and having to sync all that poo poo up every time someone makes a change. Barf.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ
And Karen in sales deciding to put some conditional formatting in the excel file or anyone moving things around in it because why not.

Bongo Bill
Jan 17, 2012

The appropriate thing to do in that case would be to have a build step that translates the Excel file into something more easily ingested by the program and validates it.

Roll Fizzlebeef
Sep 9, 2003


I would invert it. If people want to play with the data in excel, add a CSV export feature.

Wibla
Feb 16, 2011

We use Excel sheets to generate a ton of repetitive PLC code (think input/output/SCADA mapping etc). Works out pretty drat well for the most part, and reduces the error rate significantly in the process.

Pollyanna
Mar 5, 2005

Milk's on them.


gently caress it, man, whatever works.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
What I think you really need to do is some dependency inversion: have the Excel spreadsheet generate the code, not the other way around.

I have seen this before

Wibla posted:

We use Excel sheets to generate a ton of repetitive PLC code (think input/output/SCADA mapping etc). Works out pretty drat well for the most part, and reduces the error rate significantly in the process.

Okay I can see this too because that's some annoying crap.

Hollow Talk
Feb 2, 2014

Messyass posted:

Theoretically, a proper REST client would be able to do smart stuff like hypermedia navigation, so it's not just an http client.

But... because people (justifiably) don't give a poo poo about HATEOAS, and XML is uncool, REST basically just means "JSON over HTTP" now and we'll have to accept that.

An API I had the immense pleasure of pulling data from a while ago didn't really understand any of this, or that there are HTTP Requests Methods other than GET. Need to delete something? GET. Need to upload something? GET. Need to retrieve something? GET.

They also didn't really understand that query parameters are a thing, so all options are given as part of the url, without identifier. Some options were optional. I saw an endpoint that had two optional integer values. How does the thing know which one you supplied when your url is https://i.am.terrible/data/1/? Your guess is as good as mine.

Also, it didn't return JSON, but CSV.

They still called it a REST API. Guess that makes it sound better?

sunaurus
Feb 13, 2012

Oh great, another bookah.

Hollow Talk posted:

An API I had the immense pleasure of pulling data from a while ago didn't really understand any of this, or that there are HTTP Requests Methods other than GET. Need to delete something? GET. Need to upload something? GET. Need to retrieve something? GET.

They also didn't really understand that query parameters are a thing, so all options are given as part of the url, without identifier. Some options were optional. I saw an endpoint that had two optional integer values. How does the thing know which one you supplied when your url is https://i.am.terrible/data/1/? Your guess is as good as mine.

Also, it didn't return JSON, but CSV.

They still called it a REST API. Guess that makes it sound better?

I always think of this anecdote when people mention side-effects on GET requests

redleader
Aug 18, 2005

Engage according to operational parameters

sunaurus posted:

REST is basically useless without an AI client but hey whatever

Succinctly summarising my main problem with REST-inspired APIs.

Adbot
ADBOT LOVES YOU

Ither
Jan 30, 2010

sunaurus posted:

REST is basically useless without an AI client

AI client?

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