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
Powerful Two-Hander
Mar 9, 2004

Mods please change my name to "Tooter Skeleton" TIA.




god sighs and reverts another commit

Adbot
ADBOT LOVES YOU

Powerful Two-Hander
Mar 9, 2004

Mods please change my name to "Tooter Skeleton" TIA.



Shaggar posted:

C# code:
public abstract class Orifice 
{
	public abstract bool AcceptsInput {get;}
	public abstract bool ProducesOutput {get;}
}

bug raised: Orifice fails to keep track of contents or capacity

Shaggar
Apr 26, 2006


Nap Ghost

an orifice doesnt have capacity or contents, the thing on which the orifice resides has content and capacity and generates streams from those contents via orifice(s)

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




shouldnt both those always be return true anyway

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




except ears i guess, cant put much in there

Sapozhnik
Jan 2, 2005



Nap Ghost

Carthag Tuek posted:

except ears i guess, cant put much in there

coward

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'


Carthag Tuek posted:

except ears i guess, cant put much in there

sigh

girlcum

Share Bear
Apr 27, 2004



Armitag3 posted:

I need a good book on web API design but all my results are returning blogspam and REST 101. Anyone got any titles? tia

i've stuck with https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design which i believe i got from this thread

i think the main rest guy doesn't like it cause it's not RESTy/CRUDy enough and binds to http (like people use anything else)

Soricidus
Oct 20, 2010
freedom-hating statist shill

MrQueasy posted:

"Butt butt#get()" would be a good username if nonalphanumeric ascii was allowed.

The verbose-ness of Java's terrible broken type system is nowhere near as annoying as dealing with the lambda idiosyncracies. Being unable to throw non-runtime exceptions from most lambdas is really annoying when you run into it. It's worse when people are addicted to overusing Optional.

it’s a boring language for getting things done in. the thing with checked exceptions in lambdas is a particularly annoying wart, but all languages have their horrors and the jvm ecosystem is one of the less terrible places to be ime

a particularly good thing about java is that its users know it’s a tool not a religion. they don’t have a cutesy name for themselves like “javanauts” or use adjectives like “beautiful” or go on about things being “javaceous” or w/e, they just sigh and hammer out another “catch (IOException e) { throw new UncheckedIOException(e); }” and get on with their day

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.



Share Bear posted:

i think the main rest guy doesn't like it cause it's not RESTy/CRUDy enough and binds to http (like people use anything else)

rest is so diluted a term as to be meaningless. it's safe to ignore it unless it's clearly defined at point of use. the thesis that coined it was talking about web browsers, which is not the target audience for your json database skin

for possibly helpful content, I find http://www.codetinkerer.com/2015/12/04/choosing-an-http-status-code.html helpful. it's a few years old and I don't really keep up with trendy webdev so it may be out of date

skull mask mcgee
Nov 14, 2016



Shaggar posted:

C# code:
public abstract class Orifice 
{
	public abstract bool AcceptsInput {get;}
	public abstract bool ProducesOutput {get;}
}

i remember this james mickens talk

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.



Soricidus posted:

they don’t have a cutesy name for themselves like “javanauts” or use adjectives like “beautiful” or go on about things being “javaceous” or w/e, they just sigh and hammer out another “catch (IOException e) { throw new UncheckedIOException(e); }” and get on with their day

did you mean: chop some wood with a javax

CarForumPoster
Jun 26, 2013
I have a high school diploma AND a hobby coin project

Now that you're sufficiently in awe, you motherfuckers shut up and let me tell you how human safety in your self driving car works in the REAL WORLD


Bored Online posted:

mecheng =/= mechanic =/= machinist

I've been employed as all three at various ages and it is gods true path.

...not the path to money
...or happiness
...or job security

Anyway, learn python, raise angel dollars, ???, ...



Powerful Two-Hander posted:

god sighs and reverts another commit

lmao

Powerful Two-Hander
Mar 9, 2004

Mods please change my name to "Tooter Skeleton" TIA.



Carthag Tuek posted:

except ears i guess, cant put much in there

linux user spotted

MrQueasy
Nov 15, 2005

Quit shakin' me, kid!

Soricidus posted:

a particularly good thing about java is that its users know it’s a tool not a religion. they don’t have a cutesy name for themselves like “javanauts” or use adjectives like “beautiful” or go on about things being “javaceous” or w/e, they just sigh and hammer out another “catch (IOException e) { throw new UncheckedIOException(e); }” and get on with their day

instead most java I find these days seems to be written by copying Java7 era stack overflow, or depending on a version of jee that was never published to maven for some reason.

Gazpacho
Jun 18, 2004

NUKE THEIR ASS
TAKE THEIR GAS


Slippery Tilde

terrible programming: model view viewmodel presenter controller

cinci zoo sniper
Mar 14, 2013



AbstractMonadFactory

mystes
May 31, 2006



cinci zoo sniper posted:

AbstractMonadFactory
Is this a new burrito themed NFT?

Sapozhnik
Jan 2, 2005



Nap Ghost

Java has some rather painful flaws as a boring business language though.

Chiefly the lack of a decent way to initialize record types. There are no named arguments in the language so you have to use builders (not checked at compile time) or have a 20-positional-argument constructor.

Record types come up a lot in line-of-business drudgery.

Armitag3
Mar 15, 2020

Forget it Jake, it's cybertown.



Share Bear posted:

i've stuck with https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design which i believe i got from this thread

i think the main rest guy doesn't like it cause it's not RESTy/CRUDy enough and binds to http (like people use anything else)

Thanks for the link, it's a good read. I've built APIs before, I guess I was looking for some deeper topics like rate-limiting, security, idempotency, etc. (which is why I thought an actual technical book was the way forward)

mystes
May 31, 2006



Sapozhnik posted:

Java has some rather painful flaws as a boring business language though.

Chiefly the lack of a decent way to initialize record types. There are no named arguments in the language so you have to use builders (not checked at compile time) or have a 20-positional-argument constructor.

Record types come up a lot in line-of-business drudgery.
Builders/"fluent apis" are rampant everywhere and the lack of real type safety sucks... I guess maybe there's no way to fix them without cool poo poo like Idris?

DoomTrainPhD
Feb 12, 2009



Today I made a MOTD script with the company logo in ascii art instead of working on my tickets. It displays relative system information such as uptime, free memory, a few useful commands, etc. My boss loved the stupid script more than he should have and immediately asked to put it in the build. :v:

DoomTrainPhD fucked around with this message at 06:09 on Nov 18, 2021

Bored Online
May 25, 2009

We don't need Rome telling us what to do.


DoomTrainPhD posted:

Today I made a MOTD script with the company logo in ascii art instead of working on my tickets. It displays relative system information such as uptime, free memory, a few useful commands, etc. My boss loved loved the stupid script more than he should have and immediately asked to put it in the build. :v:

:unsmith:

Xarn
Jun 26, 2015


mystes posted:

Builders/"fluent apis" are rampant everywhere and the lack of real type safety sucks... I guess maybe there's no way to fix them without cool poo poo like Idris?

You could do it with an absolute fuckton of boilerplate, just have each builder method return a new type and store what was already set in the type...

Just n^2 boilerplate types :v:

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

Xarn posted:

You could do it with an absolute fuckton of boilerplate, just have each builder method return a new type and store what was already set in the type...
Yeah, they're called staged builders. A library like Immutables can even generate them for you.

NihilCredo
Jun 6, 2011

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



Xarn posted:

You could do it with an absolute fuckton of boilerplate, just have each builder method return a new type and store what was already set in the type...

Just n^2 boilerplate types :v:

2^n actually, since for every field you need a flag recording if it was set or not

you can get away with just n types if you enforce a particular order of invocation

my homie dhall
Dec 9, 2010


if you want java or its ecosystem with decent types use kotlin

Xarn
Jun 26, 2015


NihilCredo posted:

2^n actually, since for every field you need a flag recording if it was set or not

you can get away with just n types if you enforce a particular order of invocation

gently caress, you are right

I am turning in my nerd card

Gazpacho
Jun 18, 2004

NUKE THEIR ASS
TAKE THEIR GAS


Slippery Tilde

what http client would you expect to be used in a 9 year old android project:

- HttpURLConnection
- Android HttpClient
- Retrofit callbacks
- Retrofit Rx
- (comedy option) Spring RestTemplate

the correct answer is: all of them

Gazpacho fucked around with this message at 14:31 on Nov 18, 2021

necrotic
Aug 1, 2005
I owe my brother big time for this!

you forgot okhttp somewhere in there

Gazpacho
Jun 18, 2004

NUKE THEIR ASS
TAKE THEIR GAS


Slippery Tilde

how to implement the MVVM pattern: create a class that inherits from ViewModel and use it somehow. that's it. that's all you have to do

Powerful Two-Hander
Mar 9, 2004

Mods please change my name to "Tooter Skeleton" TIA.



"guys this cert expired and now we can't access these instances can you renew it please?"

*New cert is issued for the wrong DNS name*

"Ok it's done if it doesn't work just try 'proceed unsafely' ticket closed"

ffs

Powerful Two-Hander fucked around with this message at 15:04 on Nov 18, 2021

NihilCredo
Jun 6, 2011

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



Powerful Two-Hander posted:

"guys this cert expired and now we can't access these instances can you renew it please?"

*New cert is issued for the wrong DNS name*

"Ok it's done if it doesn't work just try 'proceed unsafely' ticket closed"

ffs

use it as an excuse to move to let's encrypt and close the contract

spite is an excellent motivator, and janitoring certs sucks balls

Gazpacho
Jun 18, 2004

NUKE THEIR ASS
TAKE THEIR GAS


Slippery Tilde

oh I forgot some parts of the app use embedded web view so those use XmlHttpRequest to call the backend

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.



DoomTrainPhD posted:

Today I made a MOTD script with the company logo in ascii art instead of working on my tickets. It displays relative system information such as uptime, free memory, a few useful commands, etc. My boss loved the stupid script more than he should have and immediately asked to put it in the build. :v:

this reminds me of when I prefixed each of our project board columns in trello with a lil relevant emoji just for fun (and to make them pop more in dropdown menus). a couple days later the boss comes by my desk and asks for "a minute". immediately my stomach drops, wracking my brain wondering what I did that just got me fired (boss was great, this is just how my brain works).

"so I had some ideas for some of these emojis…"

DoomTrainPhD
Feb 12, 2009



pokeyman posted:

this reminds me of when I prefixed each of our project board columns in trello with a lil relevant emoji just for fun (and to make them pop more in dropdown menus). a couple days later the boss comes by my desk and asks for "a minute". immediately my stomach drops, wracking my brain wondering what I did that just got me fired (boss was great, this is just how my brain works).

"so I had some ideas for some of these emojis"

That's fantastic! I am quite proud of my ascii art as well!

Share Bear
Apr 27, 2004



Armitag3 posted:

Thanks for the link, it's a good read. I've built APIs before, I guess I was looking for some deeper topics like rate-limiting, security, idempotency, etc. (which is why I thought an actual technical book was the way forward)

i think more clarification about the specifics of those topics would be helpful to provide a better answer

like monocqc wrote this which is very good at explaining backpressure/flow in the context of queues: https://ferd.ca/queues-don-t-fix-overload.html
then there's the idea of rate limiting client interactions with exponential backoff but then the implementation details are on your end to enforce the rate limits based on observable load
security is either basic auth or implementing your own oauth server (OR more depending on constrains)

programming is terrible

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.



DoomTrainPhD posted:

That's fantastic! I am quite proud of my ascii art as well!



hell yeah that looks great

cinci zoo sniper
Mar 14, 2013



a hiring manager did comment on my (python stemlord) cv that im unlikely ready to solve problems in a strongly typed language, because i lack traditional cs background

Adbot
ADBOT LOVES YOU

12 rats tied together
Sep 7, 2006



rule of thumb you should do fib backoff instead of exponential, but "exponential backoff" remains the term to use for any type of retry timer that increases after consistent "please retry that" responses

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