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
Shaggar
Apr 26, 2006
yeah complaining about descriptive classnames in java is a sign of a bad programmer.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I'm fine with descriptive class names. TransactionAwarePersistenceManagerFactoryProxy is not a descriptive class name.

more like dICK
Feb 15, 2010

This is inevitable.
It is though? It tells you exactly what it is. What alternate name would suggest that describes what the class is?

MononcQc
May 29, 2007

DumbPieceOfCodeThatsProbablyBuggyAnyway


except all classes would have that name in all projects

Shaggar
Apr 26, 2006

Suspicious Dish posted:

I'm fine with descriptive class names. TransactionAwarePersistenceManagerFactoryProxy is not a descriptive class name.

it is a proxy for the default JEE persistencemanagerfactory that is spring transaction aware. This allows you to inject it inplace of a standard PersistanceManagerFactory in order to gain the transaction capabilities of spring w/out adding compile-time spring dependencies

if you need it then it makes immediate sense. if you don't then it doesn't matter.

Toady
Jan 12, 2009

singling out framework class names without context is funny but a little unfair

Shaggar
Apr 26, 2006
right. 99% of people using that class will be people working inside spring itself.

Cybernetic Vermin
Apr 18, 2005

the names is the wrong thing to go after in this case either way, but then the design philosophy debate would get spergy and dull (a first for the thread in that case)

plus transactional behavior is easily the best use case of injection bullshit (and really the secret super feature of a lot of the otherwise dubious framework wankery in Java)

Shaggar
Apr 26, 2006

Cybernetic Vermin posted:

injection bullshit

lol. p-langer spotted.

Cybernetic Vermin
Apr 18, 2005

i think you have that backwards, as dependency injection bullshit is pretty clearly a reaction to dynamic languages, and is overused terribly in bad situations

the other aspect is of course people who feel that singletons are ever so wrong, but want to use them so badly, and feel that jesus will forgive them as long as they do singletons declaratively, which is of no semantic difference whatsoever

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Suspicious Dish posted:

I'm fine with descriptive class names. TransactionAwarePersistenceManagerFactoryProxy is not a descriptive class name.

it's a frightening name, but these are probably concepts and techniques that can't be explained with a couple of simple words :shrug:

more like dICK
Feb 15, 2010

This is inevitable.

Cybernetic Vermin posted:

i think you have that backwards, as dependency injection bullshit is pretty clearly a reaction to dynamic languages, and is overused terribly in bad situations

the other aspect is of course people who feel that singletons are ever so wrong, but want to use them so badly, and feel that jesus will forgive them as long as they do singletons declaratively, which is of no semantic difference whatsoever

A 'singleton' bean in Spring is actually really different from a GOF singleton though.

Sapozhnik
Jan 2, 2005

Nap Ghost
yeah good luck trying to do meaningful transactions with mongo or redis w/ ruby or javascript or whatever loving baby language you're using

i sure wouldn't want to be you when this undulating fuckpile spectacularly shits the bed in production

spring owns :cool:

Nomnom Cookie
Aug 30, 2009



redis has atomic ops iirc?

how to make a fast nosql in 3 steps

1. keep everything in memory. fsync occasionally, maybe
2. provide atomic CAS and inc/dec
3. write a blog about how transaction are dumb and you don't need them. heres how you implement a queue using atomic primitives

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

Kevin Mitnick P.E. posted:

redis has atomic ops iirc?

how to make a fast nosql in 3 steps

1. keep everything in memory. fsync occasionally, maybe
2. provide atomic CAS and inc/dec
3. write a blog about how transaction are dumb and you don't need them. heres how you implement a queue using atomic primitives

both mongo and redis have them

tef
May 30, 2004

-> some l-system crap ->
heh, atomicitiy is a feature, not a reasonable expectation

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

tef posted:

heh, atomicitiy is a feature, not a reasonable expectation

which kind of atomic

JewKiller 3000
Nov 28, 2006

by Lowtax
holy poo poo how do people use dynamically typed languages for anything spanning more than one source file

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Sweeper posted:

which kind of atomic

i mean my new bitcoin exchange is gonna be based on mongodb and node.js. i mean who wants transactions or even guaranteed writes/exception handling when there's money and antagonistic users involved?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

JewKiller 3000 posted:

holy poo poo how do people use dynamically typed languages for anything spanning more than one source file

great unit tests

:lol: like those things even go together

JewKiller 3000
Nov 28, 2006

by Lowtax

ultramiraculous posted:

great unit tests

:lol: like those things even go together

double sulk
Jul 2, 2010

ultramiraculous posted:

i mean my new bitcoin exchange is gonna be based on mongodb and node.js. i mean who wants transactions or even guaranteed writes/exception handling when there's money and antagonistic users involved?


[–]hahahabar 1 point 17 days ago
> Deploy time costs developer time.
Oh, yeah, that additional second at the end of the day will really make a difference!
permalinkparent

JewKiller 3000
Nov 28, 2006

by Lowtax
sulk what do you know about deployment time or developer time

FamDav
Mar 29, 2008

JewKiller 3000 posted:

sulk what do you know about deployment time or developer time

hey now he writes scala at his job. he's a big boy

Soricidus
Oct 21, 2010
freedom-hating statist shill

JewKiller 3000 posted:

holy poo poo how do people use dynamically typed languages for anything spanning more than one source file
i'm really not sure, but it seems to work out ok surprisingly often, particularly if you can afford not to care about efficiency

it's almost like the quality of the language isn't really that important in the end

Zombywuf
Mar 29, 2008

JewKiller 3000 posted:

holy poo poo how do people use dynamically typed languages for anything spanning more than one source file

The same way they use statically typed languages: terribly

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

JewKiller 3000 posted:

holy poo poo how do people use dynamically typed languages for anything spanning more than one source file

idk how's this a problem with dynamic typing

I mean my only point of reference for static here is f90's module system and it kind of sucks compared to python's namespaces

gonadic io
Feb 16, 2011

>>=

Symbolic Butt posted:

idk how's this a problem with dynamic typing

I mean my only point of reference for static here is f90's module system and it kind of sucks compared to python's namespaces

pictured: a proponent of dynamic typing

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
if you were talking about javascript I would totally get it, modules in javascript is a huge hack. but dynamic typing in general ehhh

explain it to me how can it be so bad, I'm a baby

gonadic io
Feb 16, 2011

>>=
dynamic typing has its uses and i'm definitely not saying "hurr durr it's bad mmkey"

however static typing (by which I mean modern static typing) is essentially a set of safety rails for you the programmer.

often you will want to go outside of those rails in which case great use your language's dynamic or casting or whatever

most of the time though, i find it way better to have those rails there by default rather than trusting the programmer to remember where they are. would you rather find your mistakes at compile time or through extensive unit testing? (this is a trick question)

there's a reason that all dynamic languages have extensive static analysis toolkits

gonadic io
Feb 16, 2011

>>=
if you are a perfect programmer than you don't need a type system.

you also don't need any modern bullshit and programming in c or asm would lead to much faster programs.

you are not a perfect programmer.

Nomnom Cookie
Aug 30, 2009



AlsoD posted:

dynamic typing has its uses and i'm definitely not saying "hurr durr it's bad mmkey"

however static typing (by which I mean modern static typing) is essentially a set of safety rails for you the programmer.

often you will want to go outside of those rails in which case great use your language's dynamic or casting or whatever

most of the time though, i find it way better to have those rails there by default rather than trusting the programmer to remember where they are. would you rather find your mistakes at compile time or through extensive unit testing? (this is a trick question)

there's a reason that all dynamic languages have extensive static analysis toolkits

i'm not sure i'd call a kludged-together third-party type inferrer a static analysis toolkit. LLVM might qualify, along with Roslyn. eclipse might have something usable for java, or it might be specialized to eclipse

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

JewKiller 3000 posted:

holy poo poo how do people use dynamically typed languages for anything spanning more than one source file

by not being colossal retards i guess

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
idk what kind of mistakes some of you are constantly making that have you stockholm-syndromed into thinking that static typing is somehow beneficial but it must be a real shitshow at your job. i imagine you are constantly saying things like "oops i accidentally added the customer's age and name together. good thing java was there to be my safety net."

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

AlsoD posted:

however static typing (by which I mean modern static typing) is essentially a set of safety rails for you the programmer.

ok I think I get this

but I don't understand how this is related to coding projects with multiple files. this seems to be an issue with how the programming language deals with modularity, not with the type system

unless you're just talking about "how do I deal with dynamic typing in huge projects"

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Symbolic Butt posted:

if you were talking about javascript I would totally get it, modules in javascript is a huge hack. but dynamic typing in general ehhh

explain it to me how can it be so bad, I'm a baby

my own babby opinion is that the program is going to test whether the types match up at some point, and there's going to be hell to pay if they don't. so if it's gonna happen either way, it may as well happen at compile time.

the usual complaint about static typing is the "boilerplate" it entails, and while i might have agreed with that ten years ago modern autocomplete n refactoring tools have p. much eliminated the overhead

Max Facetime
Apr 18, 2009

Shaggar posted:

you mean like this?
Java code:

void SomeMethod<T,E>(T parameter) throws E


yase, something like that. this has the "feature" that it's limited to one exception hierarchy only, so practically it can operate on a single module only. you could write some

Java code:
<T, E1 extends Exception, E2 extends Exception> void someMoreAdvancedMethod(T param) throws E1, E2;
this could operate on module A and then module B and handle two different exception hierarchies, but to take advantage of that, now the module that will be executing the method has to be adapted so you can get the 2 exceptions out of it without casts or such

and then there's other things like perhaps you don't always know if you should use 1 or 2 exception hierarchies, or maybe the 2 hierarchies end up being the same one and it just gets silly and I haven't even bothered working out if any of this would work cos it's all so stupid

exceptions should be passed through as sets rather than individually

gonadic io
Feb 16, 2011

>>=

Symbolic Butt posted:

ok I think I get this

but I don't understand how this is related to coding projects with multiple files. this seems to be an issue with how the programming language deals with modularity, not with the type system

unless you're just talking about "how do I deal with dynamic typing in huge projects"

with regards to JewKiller 3000's specific complaint:

one area where static types directly make programming easier is w.r.t auto-completion. Since it's known at compile time if a certain object implements Runnable or Collection or whatever then there's only so many methods you can call from that object and so the IDE can give them in a list. Correct me if I'm wrong, but I don't think that can be done from python for example. Sure you can autocomplete names from the list of identifiers in the project + standard library or whatever but it's not the same.

funnily enough this works great for J-langs, Agda and Idris but not Haskell itself :(

gonadic io
Feb 16, 2011

>>=

i bought that C++ book you were recommending, for a "primer" it's a loving tome jesus christ. not sure I'm ever going to have time to go through it

Adbot
ADBOT LOVES YOU

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

AlsoD posted:

one area where static types directly make programming easier is w.r.t auto-completion. Since it's known at compile time if a certain object implements Runnable or Collection or whatever then there's only so many methods you can call from that object and so the IDE can give them in a list. Correct me if I'm wrong, but I don't think that can be done from python for example. Sure you can autocomplete names from the list of identifiers in the project + standard library or whatever but it's not the same.

whoa this is literally the first valid argument in favor of static typing i've ever seen. that said i guess it's up to you but i personally don't think improved autocompletion is worth the programming equivalent of having someone follow you around all day and yell at you whenever you end a sentence with a preposition

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