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
poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Volguus posted:

If i don't use groovy for my dev work to install that huge runtime just to use one tool (gradle) ... meh. Then again, the day I find that maven cannot do X (that I need) I will switch to gradle. Hasn't happened yet.
And, Ant vs Maven debate, the biggest thing is project maintenance, after a while Ant, being manual and all, it really becomes a PITA. This is not an issue with Maven vs Gradle, not as far as I could tell.

We use gradle here at work and I have neither groovy nor gradle installed. Gradle wrapper bro.

Adbot
ADBOT LOVES YOU

Volguus
Mar 3, 2009

poemdexter posted:

We use gradle here at work and I have neither groovy nor gradle installed. Gradle wrapper bro.
:negative:

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Keetron posted:

Why would anyone use Apache Ant over Maven?

If you already have ant build files?

I can't think of another reason

poemdexter posted:

We use gradle here at work and I have neither groovy nor gradle installed. Gradle wrapper bro.

I really hate gradle. I've wasted way way way too much time with gradle for how little I've actually used it.

BabyFur Denny posted:

Why would anyone use Maven over Gradle?

In my experience: maven works, gradle doesn't. Now maybe I'm more familiar with editing maven files, yeah, but what am I supposed to learn gradle or something? Pah!

Kuule hain nussivan
Nov 27, 2008

Can anyone recommend a good, concise tutorial for Spring? I haven't used it in ages and am supposed to convert a web app to it, so a practical run through of the framework would be great. I think the only non-basic thing Iwould need to do is configure it so that it uses certain classes depending on which profile is used.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Everything is locked down here. We can only install things approved through some group of people and then use the installer provided on our machine. Also they use artifactory internally which is fine except they don't allow outside repos meaning you have to have every dependency requested and then someone manually installs it into artifactory. Bonus: they never add the source or javadoc jars for the library.

I honestly have no idea how they got the gradle wrapper placed into the project in the first place since that requires a real gradle install first.

I've also wasted way too much time in maven when gradle just works. Heaven forbid you have to deal with any sort of automated pipeline using the maven release plugin.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

poemdexter posted:

Everything is locked down here.

I stopped listening after this. I mean, how can you work at all?

Volguus
Mar 3, 2009

poemdexter posted:

Everything is locked down here. We can only install things approved through some group of people and then use the installer provided on our machine. Also they use artifactory internally which is fine except they don't allow outside repos meaning you have to have every dependency requested and then someone manually installs it into artifactory. Bonus: they never add the source or javadoc jars for the library.

I honestly have no idea how they got the gradle wrapper placed into the project in the first place since that requires a real gradle install first.

I've also wasted way too much time in maven when gradle just works. Heaven forbid you have to deal with any sort of automated pipeline using the maven release plugin.

My :negative: was about the fact that you said

poemdexter posted:

We use gradle here at work and I have neither groovy nor gradle installed. Gradle wrapper bro.
which is false. That's what the wrapper does: installs poo poo for you. Ah, it's nice in the sense that you don't have to worry about it, sure, but you still have the groovy runtime, you still have gradle and you still have ... everything on top of it.

About

poemdexter posted:

Bonus: they never add the source or javadoc jars for the library.
.. my condolences.

ErikTheRed
Mar 12, 2007

My name is Deckard Cain and I've come on out to greet ya, so sit your ass and listen or I'm gonna have to beat ya.

carry on then posted:

What's your thought on using Kotlinscript as the Gradle DSL?

It seems a lot better than the Groovy DSL, code completion actually works reliably in IntelliJ. It still hasn't hit 1.0 yet, though it's close (they're up to release candidates).

Unfortunately, it doesn't matter for me as my current company is using Play Framework so I'm cursed with using sbt. And we're using the Java API for Play.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Keetron posted:

I stopped listening after this. I mean, how can you work at all?

Very slowly. Considering I completely burnt out at the last place I worked, I'm ok with forced slowness. My team is working on making it better but it's an uphill struggle. We'll get there.

geeves
Sep 16, 2004

BabyFur Denny posted:

Why would anyone use Maven over Gradle?

I can't get Scala to compile with Gradle. Keep running into dumb errors. Maven was quick and easy for it.

On the other hand, Gradle is much better than Maven especially when you can run a bunch of tasks in parallel. Once I got the hang of how to structure everything, I knocked off 70% of average build time for our team.

Not a fan of Groovy, but we've been re-writing them in Kotlin.

Cached builds are a huge time saver. Especially when you have to do multiple builds in a row because you're a fuckup.

geeves fucked around with this message at 04:15 on Aug 18, 2018

hooah
Feb 6, 2006
WTF?
For testing, I'm trying to set up a data structure that will correspond people to accounts. A person can have multiple accounts, but an account belongs to only one person. I need to be able to query both ways. What would be a good data structure for this? I tried a BidiMap<String, List<String>> from Apache Commons, but I couldn't retrieve the person via one of their accounts, even if the target person had only one account and I did peopleToAccounts.getKey(Arrays.asList("dude's only account")).

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

BidiMap's docs say it requires a 1:1 relationship (since it's basically a reversible map where either side can be the key and the other the value). So you'd have to look up a person by passing their entire account list as stored - not sure why it didn't work for your single account version though! Maybe the implementation you used doesn't lookup by hashcode etc?

Not sure if there's a ready-made collection for it, but I think you basically want to keep a pair of maps - one mapping each person to their collection of accounts (you could use a MultiValuedMap if you want), and then a reverse lookup with a basic map that links each account to its owner, 1:1. Just need to make sure you keep them both synchronised (and synchronized ;) )

This is assuming you want fast lookups both ways, and you can't just store one of those maps and iterate over it to find the opposite thing when you need that

baka kaba fucked around with this message at 03:21 on Aug 29, 2018

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

hooah posted:

For testing, I'm trying to set up a data structure that will correspond people to accounts. A person can have multiple accounts, but an account belongs to only one person. I need to be able to query both ways. What would be a good data structure for this? I tried a BidiMap<String, List<String>> from Apache Commons, but I couldn't retrieve the person via one of their accounts, even if the target person had only one account and I did peopleToAccounts.getKey(Arrays.asList("dude's only account")).

Generally, you should use a Multimap instead of doing it yourself with a map of lists.

If you're using Guava, the operation you want is built-in: https://google.github.io/guava/releases/19.0/api/docs/com/google/common/collect/ImmutableMultimap.html#inverse()

Not sure if there's an equivalent in apache commons.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

yeah that would be great if you can use it. MultiValuedMap is apparently the Commons equivalent but... I haven't used it but it looks weird. Seems like you can check if a value exists somewhere, but that's about it

e- maybe it's not that weird, the Guava one looks the same - it just has a convenience function to generate a mirrored copy from an immutable multimap. I thought it was a live inverse view on a mutable one for a minute

baka kaba fucked around with this message at 03:27 on Aug 29, 2018

hooah
Feb 6, 2006
WTF?
Cool, I didn't know about multimaps, and I haven't had a chance/reason to explore Guava. Thanks.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
I'm looking to run javadoc on this file: https://github.com/ankidroid/Anki-Android/blob/master/api/src/main/java/com/ichi2/anki/FlashCardsContract.java

I haven't used java in five years or more so I'm not sure whether I can run something like javadoc.exe myFile.java and have it spit out an myFile.html. The windows examples link on the Javadoc FAQ is a 404.

I'm not even sure how to tell if I have the java sdk installed on my machine. java.exe, javaw.exe, and javaws.exe are available in my command prompt, but javac isn't.

Any directions to give?

(A generous person could also feel free to generate the doc and pastebin it or something if it's a one-step procedure).

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
If you haven't installed the JDK, it's not installed. The compiler et al aren't put into your PATH by default though, although JAVA_HOME might be (which should point to whichever JDK you're using). That said, if you're using Android Studio, that basically comes with its own JDK.

You might want to post in the Android thread too.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Newf posted:

I'm not even sure how to tell if I have the java sdk installed on my machine. java.exe, javaw.exe, and javaws.exe are available in my command prompt, but javac isn't.

Any directions to give?

Sounds like you have the JRE installed but not the JDK.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
I figured it out. Noticing the long-unclicked Eclipse icon on my taskbar, I guessed that some version of the java sdk must exist on the machine. I had earlier tried using windows explorer and the start menu to find javac.exe, but they failed. Of course, it was in the first place I looked (program files (x86)/java/sdk/bin). Eclipse's export javadoc worked out for me.

Such pangs of nostalgia at running Eclipse...

Volguus
Mar 3, 2009

Newf posted:

I figured it out. Noticing the long-unclicked Eclipse icon on my taskbar, I guessed that some version of the java sdk must exist on the machine. I had earlier tried using windows explorer and the start menu to find javac.exe, but they failed. Of course, it was in the first place I looked (program files (x86)/java/sdk/bin). Eclipse's export javadoc worked out for me.

Such pangs of nostalgia at running Eclipse...

If i remember correctly eclipse can run on the JRE, it doesn't need the SDK, since it has its own compiler.

Lamont Cranston
Sep 1, 2006

how do i shot foam
So I’m moving into a new position at work where I’m going to be writing mostly Java (coming from a position where I’ve been writing Go almost exclusively for about two years and then perl before that). I haven’t written a line of Java since college when Java 5 was the new hotness. Should I just pick up a copy of Effective Java and go from there? I’m also not super familiar with the intricacies of maven or the tooling around Java in general (not what they were teaching back in Algorithms & Data Structures a decade ago), is there a decent reference/primer for that kind of stuff?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
You might want to look at the Sun Oracle Java tutorials and look at the new stuff. I think Generics were in Java 5, but you'll want to look at Lambdas and Streams.

Not sure where to suggest looking for build systems tutorials.

Take a look at IntelliJ as your IDE rather than Eclipse.

Volguus
Mar 3, 2009

Volmarias posted:

Take a look at IntelliJ as your IDE rather than Eclipse.

And then go back to Eclipse like any normal human being.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Intellij is the best Java IDE.

hooah
Feb 6, 2006
WTF?
I've had to go back to using Eclipse at work the last few weeks after months of IntelliJ, and it just doesn't compare. It's crashed/frozen a few times, so the loooong startup time is really noticeable. The whole "perspective" thing is kind of annoying, especially when debugging and fixing code. It's pretty ugly.

ivantod
Mar 27, 2010

Mahalo, fuckers.

Lamont Cranston posted:

So I’m moving into a new position at work where I’m going to be writing mostly Java (coming from a position where I’ve been writing Go almost exclusively for about two years and then perl before that). I haven’t written a line of Java since college when Java 5 was the new hotness. Should I just pick up a copy of Effective Java and go from there? I’m also not super familiar with the intricacies of maven or the tooling around Java in general (not what they were teaching back in Algorithms & Data Structures a decade ago), is there a decent reference/primer for that kind of stuff?

As for books, I would recommend this one: https://www.manning.com/books/modern-java-in-action

It should be coming out in the next few days hopefully, but if you buy it now you can already read the work in progress version (which should be 99% finished anyway) so you wouldn't have to wait.

Disclaimer: I did some technical review work on the previous edition of this book.

hooah posted:

I've had to go back to using Eclipse at work the last few weeks after months of IntelliJ, and it just doesn't compare. It's crashed/frozen a few times, so the loooong startup time is really noticeable. The whole "perspective" thing is kind of annoying, especially when debugging and fixing code. It's pretty ugly.

Honestly, if there is one thing I wish they could go back and revisit a decision that was made early on in Eclipse's life, it's perspectives. It probably seemed a good idea at the time, but it just hinders instead of helps most of the time as far as I am concerned. I feel the way it's done in Idea works a lot smoother, esp. with debug.

ivantod fucked around with this message at 19:42 on Sep 3, 2018

Lamont Cranston
Sep 1, 2006

how do i shot foam
Awesome, thanks for the help.

Volmarias posted:

Take a look at IntelliJ as your IDE rather than Eclipse.

We actually all use IntelliJ at work, so that's no problem (even with vim mode on I'm still absurdly slow in it so far but hopefully that will improve)

olives black
Nov 24, 2017


LENIN.
STILL.
WON'T.
FUCK.
ME.
Anyone have any experience with Baeldung courses? Wondering if this is worth the cash, or if I should go with something cheaper like Pluralsight/Udemy/etc.

geeves
Sep 16, 2004

olives black posted:

Anyone have any experience with Baeldung courses? Wondering if this is worth the cash, or if I should go with something cheaper like Pluralsight/Udemy/etc.

I'd start with reading his blog which is pretty good, especially for the little day-to-day things that aren't so day-to-day. I would say if you like the blog his courses probably would be a good investment, it's better than most of the trash on Udemy.

If you want to see the beginnings of a spring boot API, check out https://github.com/pram/spring-react-boilerplate

olives black
Nov 24, 2017


LENIN.
STILL.
WON'T.
FUCK.
ME.

geeves posted:

I'd start with reading his blog which is pretty good, especially for the little day-to-day things that aren't so day-to-day. I would say if you like the blog his courses probably would be a good investment, it's better than most of the trash on Udemy.

If you want to see the beginnings of a spring boot API, check out https://github.com/pram/spring-react-boilerplate

Will do, thanks!

FateFree
Nov 14, 2003

Man I feel like I'm totally missing something. I've been forced to use IntelliJ at work and I'm having the complete opposite thoughts, it seems so clunky and crappy compared to eclipse (well, compared to STS which is what I have been using specifically). I don't get it!

Ola
Jul 19, 2004

The one thing that I struggled with in Intellij was Ctrl-Y is delete line, not redo. Lost a few chunks of code before I learned.

RandomBlue
Dec 30, 2012

hay guys!


Biscuit Hider

FateFree posted:

Man I feel like I'm totally missing something. I've been forced to use IntelliJ at work and I'm having the complete opposite thoughts, it seems so clunky and crappy compared to eclipse (well, compared to STS which is what I have been using specifically). I don't get it!

In my experience it's more responsive than Eclipse and it has a working dark theme which helps with eye strain. Last I tried none of the dark theme options for Eclipse worked well in windows, they all had issues of some kind.

Ola posted:

The one thing that I struggled with in Intellij was Ctrl-Y is delete line, not redo. Lost a few chunks of code before I learned.

If you change the keymap to Visual Studio then ctrl+z & ctrl+y function as you'd expect, or you could just remap that command yourself.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

I never knew ctrl-Y was a thing, ctrl-shft-z felt very natural.

Ola
Jul 19, 2004

Yeah I figured it was best to just get used to a new convention because sooner or later I'd install a new IDE or use a new laptop and would rather do as little custom config as possible. Just started using CLion as well, I really like the Jetbrains stuff.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Zaphod42 posted:

If you already have ant build files?

I can't think of another reason

That would be a reason to migrate to maven, not to keep using ant.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Kuule hain nussivan posted:

Can anyone recommend a good, concise tutorial for Spring? I haven't used it in ages and am supposed to convert a web app to it, so a practical run through of the framework would be great. I think the only non-basic thing Iwould need to do is configure it so that it uses certain classes depending on which profile is used.
I stand by this:

Wheany posted:

If you need a quick course on Spring Boot, check out this playlist on youtube, it's an excellent starting point because the instructor explains a lot of the magic that Spring does behind the scenes.

Most tutorials I've seen are just "Here's how easy it is to make TodoApp", where they just go "see how easy this was" without telling you why, and more importantly what you can change to do something that is not TodoApp

ChickenWing
Jul 22, 2010

:v:

FateFree posted:

Man I feel like I'm totally missing something. I've been forced to use IntelliJ at work and I'm having the complete opposite thoughts, it seems so clunky and crappy compared to eclipse (well, compared to STS which is what I have been using specifically). I don't get it!

It takes a while, but over time you'll find that a) it's way more performant than eclipse, and b) has a ton more built in features. There's the odd QOL feature from STS that I found myself missing after I switched, but I honestly can't remember any of them anymore (been using intellij for about a year and a half ish)

I've been you. Give it a while. Keep looking up shortcuts, eventually you'll become a powerful intellij keyboard warrior. If it helps, I'm p sure there's a built in way to set yourself up with eclipse keybinds

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Intellij pro tip: double tap the shift key, start typing.

Adbot
ADBOT LOVES YOU

ChickenWing
Jul 22, 2010

:v:

ironically I almost never use that, it always seems much slower than the specific searches

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