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.
 
  • Locked thread
Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
GODDAMN ANT loving SUCKS

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Wheany posted:

GODDAMN ANT loving SUCKS

let me tell you about gradle

Xarn
Jun 26, 2015
Please do, because I used Ant to build .apks for Android, it sucked, but didn't get to use Gradle.

MononcQc
May 29, 2007


I'm gonna have uses for this

Shaggar
Apr 26, 2006

Wheany posted:

GODDAMN ANT loving SUCKS

why in the world are you not using maven?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

MononcQc posted:

I'm gonna have uses for this

it is really perfect

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Shaggar posted:

why in the world are you not using maven?

i was transferred to a different project where i'm now the only developer

i'm actually studying how to convert this to maven, but, like

how have people lived like this??

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
every time I see examples of D I think it looks like a nice language, but ive never heard of anyone using it for anything consequential. why is that? does it only look nice to me because my brain has been broken by c++?

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
we have a repository manager, but i don't really know who to contact about it. the domain of the repository manager contains the company name from two aquisitions ago.

also, i have been querying the sha1-hashes of some of the jars in the ant based project and some of them are like 11 years old, according to https://repository.sonatype.org/

Shaggar
Apr 26, 2006
setup a local nexus repo for your internal stuff and for proxying central

Powerful Two-Hander
Mar 10, 2004

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


i am going to just rewrite this entire app in mvc because the amount of back and forth binding of stuff is completely nuts.

Loading a page ends up loading theldataset at least twice for some reason and every change gets passed back to the code behind to update a session object that is then compared to a reloaded object in the db to work out what has changed and save it

there's so much back and forth between db and server to basically do a set of nested CRUD operations, the whole thing must be 2 to 3 times slower than it should be.

10 years without any refactoring of the code base :toot:

Gul Banana
Nov 28, 2003

Illusive gently caress Man posted:

every time I see examples of D I think it looks like a nice language, but ive never heard of anyone using it for anything consequential. why is that? does it only look nice to me because my brain has been broken by c++?

you've actually got the answer in your post: D is kind of better than C++. that's all it's good for though, being c++-but-a-little-better, and Betterness doesn't outweigh being different

jony neuemonic
Nov 13, 2009

LeftistMuslimObama posted:

none of my langs have them. what am i missing out on.

code that actually looks like your intent instead of a bunch of janky for loops.

they're very good.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
map is banned at epic because the bosses heard that map reduce was good

fritz
Jul 26, 2003

LordSaturn posted:

python literally has map() and filter() built in

reduce() can be done, but not as nicely

EDIT: I'm a liar, python also has reduce()

van rossum took reduce out of python 3 and wanted to remove the others along w/ lambda: http://www.artima.com/weblogs/viewpost.jsp?thread=98196

Jerry Bindle
May 16, 2003

quote:

filter(P, S) is almost always written clearer as [x for x in S if P(x)]
lol

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
ive been writing a lot of python lately and i h8 list comps.

theres so many times i write one and then have to go back and change it later to add a bit of logic, so now i have to rewrite it as a for loop and [].append instead

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

the talent deficit posted:

i unironically think java8 is good, and i say that as a fan of erlang, rust and haskell

we had a largish project at work and i made the decision it would be in java due to the jvm and typesafety. since it was new at the time we used java 8 and i didn't think streams would be a big deal but holy poo poo they own.

also the new time stuff (just joda time but still) is leaps and bounds better.

it's too bad that the java collections are still mutable by default.

i just wish java had traits at this point. rust's implementation of them are great imho.

i like kotlin a lot too, but i've discovered and reported multiple bugs in the compiler post 1.0 that made my code compile, but break at runtime, which turns me off of it a bit. i like the automatic generation of getters/setters, and extension methods.

EDIT: also if the jvm would change (lol) and allow value types, and also keep generic types at runtime instead of erasing them, i'd be really happy. not being to overload a method with different collection element types is a bummer.

CRIP EATIN BREAD fucked around with this message at 15:35 on Oct 14, 2016

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

Flat Daddy posted:

ive been writing a lot of python lately and i h8 list comps.

theres so many times i write one and then have to go back and change it later to add a bit of logic, so now i have to rewrite it as a for loop and [].append instead

ALSO ive wanted flatMap multiple times now and i either have to copy and paste a stackoverflow flatten() method to all my projects or write an incomprehensible two dimensional list comp inline... batteries included my rear end

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
i had full choice in language and self-pwned myself. i shouldve used typescript or c#

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

ThePeavstenator posted:

Epic does a lot of recruiting around here where they like to talk about the fact that they have this really hip campus. Are they pretty much just trying to suck new graduates in for a year of 80 hour work weeks before they die from exhaustion? Because having a campus with all the stuff they talk about in it seems kind of over-the-top for a place that has employees that go home at night.

honestly, the fancy campus is more for the customers. we bring them all out here during contract negotiations and during training so theyre all wowed by it and think we're super cool. it's a sales tool. when you are working you don't see anything but the halls between you and your meetings. i enjoy the campus 100x more when i come out on weekends with my dogs to take them for a quiet nature walk.

they definitely hire a lot of fresh grads, but the hours expectations are more like 40-50 hours per week outside of crunchtimes. im just trapped in a personal hell of evershifting goalposts. my tl told me straight up that he feels like this process is exploitative and he doesn't blame me if i'm looking for other work.

now that we're past crunchtime i'm rolling in around 9:30 and leaving around 4:30.

HoboMan
Nov 4, 2010

ok so my SqlConnection wrapper class is being weird. the instances basically carry an open connection for their lifetime so i have my class implement IDisposable. my Dispose method just calls Dispose on the SqlConnection, but this is throwing runtime exceptions? i get the feeling i'm not doing this right in general too.

(InvalidOperationException, specifically)

HoboMan fucked around with this message at 16:00 on Oct 14, 2016

Shaggar
Apr 26, 2006
make sure you aren't already closing it elsewhere ex: in a using block or somehow outside of the wrapper.

HoboMan
Nov 4, 2010

i set vs to break on exceptions and it seems to be happening in Not My Code and the connection is open, but it's not attached to a real database

Sapozhnik
Jan 2, 2005

Nap Ghost

CRIP EATIN BREAD posted:

we had a largish project at work and i made the decision it would be in java due to the jvm and typesafety. since it was new at the time we used java 8 and i didn't think streams would be a big deal but holy poo poo they own.

also the new time stuff (just joda time but still) is leaps and bounds better.

mega agreed. also don't forget Optional.

quote:

it's too bad that the java collections are still mutable by default.

Guava, my dude

quote:

i like the automatic generation of getters/setters, and extension methods.

AutoValue, my dude

HoboMan
Nov 4, 2010

HoboMan posted:

ok so my SqlConnection wrapper class is being weird. the instances basically carry an open connection for their lifetime so i have my class implement IDisposable. my Dispose method just calls Dispose on the SqlConnection, but this is throwing runtime exceptions? i get the feeling i'm not doing this right in general too.

(InvalidOperationException, specifically)

also what if someone is a dipshit and doesn't use a using block?

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

LeftistMuslimObama posted:

honestly, the fancy campus is more for the customers. we bring them all out here during contract negotiations and during training so theyre all wowed by it and think we're super cool. it's a sales tool. when you are working you don't see anything but the halls between you and your meetings. i enjoy the campus 100x more when i come out on weekends with my dogs to take them for a quiet nature walk.

they definitely hire a lot of fresh grads, but the hours expectations are more like 40-50 hours per week outside of crunchtimes. im just trapped in a personal hell of evershifting goalposts. my tl told me straight up that he feels like this process is exploitative and he doesn't blame me if i'm looking for other work.

now that we're past crunchtime i'm rolling in around 9:30 and leaving around 4:30.

That makes sense. I've just gotten a bad vibe from their persistent recruitment efforts that all seem to be pandering really hard to millennials in a patronizing way.

Shaggar
Apr 26, 2006
it sounds like you're trying to handle some connection pooling and maintenance yourself. don't. let ado.net handle it. by default when you dispose of a sql connection it returns it to the pool so it doesn't matter if you are constantly creating and disposing of sqlconnections. the pool will handle it for you.

unless you have additional resources you need to dispose, stop implementing idisposable and just wrap your connection creation in usings.

and in general if your class is IDisposable and someone doesn't dispose it then you're sol. its on them to observe the contract.

cinci zoo sniper
Mar 15, 2013




thinking about picking up c#. any word of advice?

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
speaking of c# SqlConnections, the way we currently do it is that we have a Database class with a SQLConnection GetConnection() method that just opens a connection with the correct credentials so you can use it in a using block, and that database object is injected into whatever needs it (this is ASP.NET core). is there a better way to do this? i don't think the current way is bad, but i don't know if there's a more "correct" way that i should use.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

ThePeavstenator posted:

That makes sense. I've just gotten a bad vibe from their persistent recruitment efforts that all seem to be pandering really hard to millennials in a patronizing way.

im right there with you. experienced people wont come here because they see the tools we use as a dead end for their career so their only option is aggressively trying to snap up college grads with enticing salaries in a low-cost area.

HoboMan
Nov 4, 2010

Shaggar posted:

it sounds like you're trying to handle some connection pooling and maintenance yourself. don't. let ado.net handle it. by default when you dispose of a sql connection it returns it to the pool so it doesn't matter if you are constantly creating and disposing of sqlconnections. the pool will handle it for you.

unless you have additional resources you need to dispose, stop implementing idisposable and just wrap your connection creation in usings.

and in general if your class is IDisposable and someone doesn't dispose it then you're sol. its on them to observe the contract.

Yeah I guess I kinda am. Through benchmarking I have found that explicitly keeping a connection open throughout a workflow is waaaaaaay faster than relying on the automatic pooling. I instantiate the SqlConnection in the constructior of my object so it's not like I can really use a using block on my SqlConnection though.

e: It's just a wrapper class to saves me from having to type out 100 lines of loving with constructing a query and automatically retrying and deadlock reporting and poo poo every time I make a query.

HoboMan fucked around with this message at 17:28 on Oct 14, 2016

raminasi
Jan 25, 2005

a last drink with no ice

Gul Banana posted:

you've actually got the answer in your post: D is kind of better than C++. that's all it's good for though, being c++-but-a-little-better, and Betterness doesn't outweigh being different

rust is in the same boat and already has more traction and the reason is: the digital mars people seemed to think that the most important part of language adoption is whether the language is good, and not whether it has a community and good tooling

Workaday Wizard
Oct 23, 2009

by Pragmatica
wasn't the D compiler or standard library proprietary?

brap
Aug 23, 2004

Grimey Drawer

cinci zoo sniper posted:

thinking about picking up c#. any word of advice?

1. install visual studio
2. read jon skeet's book or some poo poo, idk
3. profit

Shaggar
Apr 26, 2006

cinci zoo sniper posted:

thinking about picking up c#. any word of advice?

don't drop it! haha! but for real install vs community and do some mvc and webapi.

Shaggar
Apr 26, 2006

Asymmetrikon posted:

speaking of c# SqlConnections, the way we currently do it is that we have a Database class with a SQLConnection GetConnection() method that just opens a connection with the correct credentials so you can use it in a using block, and that database object is injected into whatever needs it (this is ASP.NET core). is there a better way to do this? i don't think the current way is bad, but i don't know if there's a more "correct" way that i should use.

its how I do it. Its fine I think. If I have different data stores I'll create delegates that return sql connections and name them after the stores w/ the implementations being basically new SqlConnection("connectionName") or w/e. Then you can inject those into wherever as constructor params. it works for me.

Shaggar
Apr 26, 2006

HoboMan posted:

Yeah I guess I kinda am. Through benchmarking I have found that explicitly keeping a connection open throughout a workflow is waaaaaaay faster than relying on the automatic pooling. I instantiate the SqlConnection in the constructior of my object so it's not like I can really use a using block on my SqlConnection though.

e: It's just a wrapper class to saves me from having to type out 100 lines of loving with constructing a query and automatically retrying and deadlock reporting and poo poo every time I make a query.

you may need to adjust your pooling options if you're having issues with it. it should be plenty fast.

Xarn
Jun 26, 2015
My recollection is a bit hazy, so this might be not 100% correct.

The problem with D was that it went "look, we are 1.0 and production ready" wayyyy before it actually was. This meant, that its pitch of "All the speed of C++, better metaprogramming, ranges abstracted as objects, not iterator pairs, optional GC" kinda broke down under close inspection. Parts of the standard library REQUIRED GC (AFAIK they don't anymore), so people who came for C++ but better left. The GC was laughably bad during the early 1.x days, so people who did want GCed language also left, because they moment you put any pressure on the collector, it became unusably slow.

This kinda left D with Alexandrescu and couple of people who drank the coolaid, but no real adoption.

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

so i found out that the exceptions are from a finalizer being in the wrapper and calling Dispose (it was in a code fold). i just removed it as the SqlConnection is the only member and i know trying to close one in a finalize is bad, although i am not sure why.

  • Locked thread