New around here? Register your SA Forums Account here!

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
Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
he thinks blazor is great because itll transition c# developers to the frontend

e: ef is awful because you should just query Mongo directly

Flat Daddy fucked around with this message at 16:05 on May 3, 2019

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

by vyelkin
I just learned of the Bazel build system and I am truly and utterly horrified by it.

It requires Java, uses protobufs for configuration, and cross-compiling is a giant lol bag of nope.

Basically, I don't think I will ever get envoyproxy into Buildroot because of it.

brap
Aug 23, 2004

Grimey Drawer
that node-ecstatic guy hosed up. the only reason to remove a published package from the registry is if it contains bona-fide malware. you deprecate instead. npm even added a whole "audit" system for dealing with these situations.

course, the whole problem with node is that people will take a dependency on something as soon as glance at it regardless of whether it's some guy's library or there's some org behind it that actually dedicates resources to its maintenance.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

ratbert90 posted:

I just learned of the Bazel build system and I am truly and utterly horrified by it.

It requires Java, uses protobufs for configuration, and cross-compiling is a giant lol bag of nope.

Basically, I don't think I will ever get envoyproxy into Buildroot because of it.

it works great inside Google where there are whole teams for managing different toolchains.

also I like it for my personal garbage because it's what I'm used to and I never need to cross compile anything anyway.

What do you mean by the protobuf part though? i've never had to use a protobuf to configure anything

gonadic io
Feb 16, 2011

>>=

ratbert90 posted:

I just learned of the Bazel build system and I am truly and utterly horrified by it.

It requires Java, uses protobufs for configuration, and cross-compiling is a giant lol bag of nope.

Basically, I don't think I will ever get envoyproxy into Buildroot because of it.

Still beats groovy

Zlodo
Nov 24, 2006

Finster Dexter posted:

webdev? allow me to introduce you to Go's `go get` command...

i didn't say they were the only clowns

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

ratbert90 posted:

I just learned of the Bazel build system and I am truly and utterly horrified by it.

It requires Java, uses protobufs for configuration, and cross-compiling is a giant lol bag of nope.

Basically, I don't think I will ever get envoyproxy into Buildroot because of it.

yeah its really good

FlapYoJacks
Feb 12, 2009

by vyelkin

Illusive gently caress Man posted:

it works great inside Google where there are whole teams for managing different toolchains.

also I like it for my personal garbage because it's what I'm used to and I never need to cross compile anything anyway.

What do you mean by the protobuf part though? i've never had to use a protobuf to configure anything

I thought the config files were derived from protobufs?
Also, the documentation sucks and is outdated/often wrong.

gonadic io posted:

Still beats groovy

Everything beats groovy. Autotools beats groovy ffs.

DONT THREAD ON ME posted:

yeah its really good

Compared to meson? Nah

HoboMan
Nov 4, 2010

is blazor still somehow ~powered by the blockchain~?

gonadic io
Feb 16, 2011

>>=
I very nearly ended up a pants developer

Captain Foo
May 11, 2004

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

gonadic io posted:

I very nearly ended up a pants developer

usually called "tailors" and they don't post here

akadajet
Sep 14, 2003

HoboMan posted:

is blazor still somehow ~powered by the blockchain~?

never was. that was just a joke.

Bloody
Mar 3, 2013

the more i read about dependency injection frameworks the more it feels completely unnecessary and complexifying

Bloody
Mar 3, 2013

like im halfway through https://martinfowler.com/articles/injection.html and so far the toy problem is 100% solvable by a function that takes a type that satisfies the correct interface. but for some reason instead its a method in a class and that class is going to own an instance of some random thing thats going to get deus ex machinaed into place by some random rear end framework

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
dependency injection frameworks solve one problem but cause dozens of new ones

the one problem they solve is the ability to write unit tests that don't really test much of anything

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Bloody posted:

the more i read about dependency injection frameworks the more it feels completely unnecessary and complexifying

it's enterprise programming, there's no real work to do so let's make up some bullshit to justify our salaries

gonadic io
Feb 16, 2011

>>=

Bloody posted:

like im halfway through https://martinfowler.com/articles/injection.html and so far the toy problem is 100% solvable by a function that takes a type that satisfies the correct interface. but for some reason instead its a method in a class and that class is going to own an instance of some random thing thats going to get deus ex machinaed into place by some random rear end framework

Most legacy java patterns are obseleted by decent typeclass or first class function support

Bloody
Mar 3, 2013

this is in a c# code base and the di thing its using references that article in its documentation lol

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Symbolic Butt posted:

it's enterprise programming, there's no real work to do so let's make up some bullshit to justify our salaries

yah theres no reason di frameworks have to work via magic annotations or xml or w/e its just enterprise smoothbrains

HoboMan
Nov 4, 2010

di: ok i guess
di frameworks: bad

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
di is the one design choice that has never failed me

im never sitting around regretting using di

Bloody
Mar 3, 2013

it seems like a phenomenal pile of complexity just to avoid thinking about how your data gets around

Bloody
Mar 3, 2013

i am probably 100% conflating DI with DI Frameworks

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


DONT THREAD ON ME posted:

di is the one design choice that has never failed me

im never sitting around regretting using di

Bloody
Mar 3, 2013

every single example i am looking at on the internet is just bafflingly stupid

wait no this one looks fine. ok DI is fine, it is literally just constructors with arguments. thats fine. DI frameworks are bafflingly stupid still

gonadic io
Feb 16, 2011

>>=

DONT THREAD ON ME posted:

yah theres no reason di frameworks have to work via magic annotations or xml or w/e its just enterprise smoothbrains

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
dependency injection means giving an object values for its instance variables
those values are usually themselves complex objects that have instance variables, etc
this is nice when you are writing a unit test for one object, and you don't want to have to figure out how to instantiate its whole chain of dependencies
in fact you may prefer mock implementations for those dependencies that don't really do anything, so you can focus on the one particular thing you're testing
the di framework will do this for you, it knows you are in test mode so it just uses the mock impl classes for your interfaces instead of the real ones
but this means you are giving up control of object construction and lifetimes to your di framework
it turns out that when and how things are constructed is a really important part of the data and control flow in an object oriented program
and now you don't get to write it directly in java/c# anymore, you're stuck trying to coax the framework into doing what you would have, but with annotations or xml
so now who the gently caress knows what the flow of your program looks like
it works ok when you're using really awful enterprise patterns with poo poo like service classes all over that will only ever be singletons and you don't care and you just want to throw them into the pile of singletons and have the framework populate your instance variables however it wants to
pools of objects also work ok
anything beyond that, good loving luck, hope you know spring real well and like reading documentation

Xarn
Jun 26, 2015

Bloody posted:

wait no this one looks fine. ok DI is fine, it is literally just constructors with arguments. thats fine. DI frameworks are bafflingly stupid still

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED
you can literally read about why dependency injection frameworks are useful on the wikipedia page: https://en.wikipedia.org/wiki/Dependency_injection#Dependency_injection_frameworks

it's about scales of code. if you have a small self-contained program that doesn't have independent components to test, you don't need dependency injection. likewise, if the things you need to configure in your application are easily representable as, say, scalar values instead of code, you don't need dependency injection frameworks

Bloody
Mar 3, 2013

DELETE CASCADE posted:

this is nice when you are writing a unit test for one object

just lol

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED
also yea like the previous poaster said, its a design choice, so its not NECESSARY for anything, but it does make things easier

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bloody posted:



wait no this one looks fine. ok DI is fine, it is literally just constructors with arguments. thats fine. DI frameworks are bafflingly stupid still

ya lol

you could have a di framework that requires you to write a bit of boilerplate but is actually simple to read and reason about but nope gotta be a lovely dsl

DONT THREAD ON ME fucked around with this message at 22:04 on May 3, 2019

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
@Autowired ftw

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
but for real di frameworks own because i don't want to worry about what type is fulfilling the interface

Captain Foo
May 11, 2004

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

All I know about it is from this thread but isn't di hard to illustrate with toy problems because it only is actually helpful once your codebase exceeds the size of "toy"

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Captain Foo posted:

All I know about it is from this thread but isn't di hard to illustrate with toy problems because it only is actually helpful once your codebase exceeds the size of "toy"

not really its very simple to understand, is almost immediately useful and scales well.

its literally just passing dependencies to constructors, eg passing a database connection into a view controller rather than storing the connection in a global. thats it. the frameworks do lots of different things to make this easier depending upon language but thats all orthogonal to the concept of di.

there are times where i dont use di, but in these cases im also not writing tests or using version control

DONT THREAD ON ME fucked around with this message at 22:36 on May 3, 2019

redleader
Aug 18, 2005

Engage according to operational parameters

Jabor posted:

oh no, my continuous integration is broken because for some reason it downloads half the code from arbitrary places on the internet for every single build. there is no way this problem could have been avoided.


Zlodo posted:

build processes should never ever involve internet accesses

so what's the alternative? janitor your own local package repo? check a bunch of binary dependencies into source control? you're obviously gonna have to hit the internet at least once, somehow

Progressive JPEG
Feb 19, 2003

i worked on a big guice project once and they were really into turning random bs into providers, frequently with providers chaining off of each other and it just ended up creating problems. for example I was frequently finding bugs that were caused by a class getting provided the wrong thing in a way that was very hard to diagnose, or tracking down performance issues that were the result of expensive code getting instantiated when the developer didn't expect. all of which couldn't be replicated in the unit tests that were claimed to be made so much easier under the di system

since then I've just worked on projects that used constructor arguments and/or function passing without any of the di glue bs and I haven't missed it one bit

at this point I think di frameworks are only useful for setting up bumper rails that force your coworkers to declare dependencies in their constructors, but at the cost of total opacity when those dependencies don't behave the way you expect, and at the risk that the code will be turned into an interdependent mess of providers when functions would be better

Progressive JPEG
Feb 19, 2003

also I picture di frameworks as plastering over code that's poorly structured to begin with. like if you've got some code 20 layers down that's making queries into an external database then maybe you should rethink that structure. if you're using regular constructors in that situation then the pain of passing a database client through 20 layers is obvious while with a di framework the pain is obscured until it bites you in the rear end

Adbot
ADBOT LOVES YOU

redleader
Aug 18, 2005

Engage according to operational parameters
the built-in asp.net di framework seems alright. no magic annotations or xml; you declare your dependencies (ISomething -> SomethingImpl) and their lifetime in your app startup method. sure, you have to write a single line of boilerplate whenever you need something to be injected, but eh.

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