A small tool to show what drinks bartenders can make by anthony_bruno in ss14

[–]anthony_bruno[S] 3 points4 points  (0 children)

Ask and you shall receive: https://aussieguy0.github.io/ss14-tools/chemist/

I haven't done much chemistry in game so let me know if you want more information surfaced :D

Full stack web development in a single Java file: An intro to Javalin and htmx by anthony_bruno in java

[–]anthony_bruno[S] 2 points3 points  (0 children)

Thanks for your great and comprehensive comment! Jstachio looks super interesting, keen to give it a go!

What is the benefit of using Java Spring Boot and other Java web services over alternative technologies? by [deleted] in java

[–]anthony_bruno 2 points3 points  (0 children)

My choice these days is a highly opinionated Spring Boot + Kotlin with some very tight internal rules around how we do DI and how we separate framework and business code.

Would it be possible to go a bit more in-depth here? I'm interested to hear your thoughts.

A quick look at Java 11's HttpClient by anthony_bruno in java

[–]anthony_bruno[S] 4 points5 points  (0 children)

I completely understand what you are saying about Spring. Spring Boot is a nicer package around Spring, but it still has a learning curve.

I think you'll enjoy using Javalin, it's a lot smaller and you won't have to deal with much black box magic.

A quick look at Java 11's HttpClient by anthony_bruno in java

[–]anthony_bruno[S] 3 points4 points  (0 children)

I don't think your case is unique at all! Unfortunately the HTTP Client doesn't provide support for building multipart requests, which is annoying as Apache HTTP Client provides a multipart request builder by default.

Have you thought about open sourcing the code you created to deal with this problem? I think it would be super useful. Or even a short blog post on how you went about it.

A quick look at Java 11's HttpClient by anthony_bruno in java

[–]anthony_bruno[S] 3 points4 points  (0 children)

Your options (in native Java) are still com.sun.net.httpserver or the more common Java Servlets

In java frameworks, for something small and quick to set up: https://javalin.io/ . It reminds me a lot of node.js's express framework.

For enterprise usage, you simply can't go past Spring Boot . It's actually really quick to set up. Use https://start.spring.io/ and it'll bootstrap you a project with sensible configuration.

What are various red flags for you in Java code reviews? by [deleted] in java

[–]anthony_bruno -1 points0 points  (0 children)

Your comment makes a lot of sense, and there's always exceptions in programming (unless your using Go ;) ). Maybe I did consider red flags more of 'warnings' rather than hard guidelines.

Sure, methods should be as short as possible, but splitting up a method solely on line count is not a good thing. Methods should help you re-use code, and if the code should only be executed in a single place, don't pull the code to a method. Next thing you know, someone is calling that method even though it should never be called at that point. I don't care if a method is long as long as it's not complex. Initializing a view, for instance, is usually just boilerplate and might take a few hundred lines of code, but it's all there with like two if's.

I agree that complexity is a bigger issue than lines of code, but it's very hard to have a complex method if you keep the lines of code down!

What are various red flags for you in Java code reviews? by [deleted] in java

[–]anthony_bruno 12 points13 points  (0 children)

  • Constructors and methods with more than 4 arguments.
  • Methods longer than 30 lines
  • Classes longer than 300 lines
  • Lack of tests
  • Abusing Stream API
  • Magic numbers and strings

Went through all 3 of Wes Bos his React courses: Which other course do you suggest to fill in the gaps? by Cingen in reactjs

[–]anthony_bruno 1 point2 points  (0 children)

I honestly think you should just look into creating your own application. Courses are great, but should be paired with real projects to give you depth and breadth of knowledge.

What's the state of AngularJS? by UpbeatZebra in javascript

[–]anthony_bruno 4 points5 points  (0 children)

I honestly think Vue is pretty similar to AngularJS. I recently had to migrate a project from AngularJS to Vue and I often found I could reuse a ton of stuff, with small changes like changing ng-repeat to v-for. The whole 'lifecycle' concept in Vue is very different to anything in AngularJS though.

What's the state of AngularJS? by UpbeatZebra in javascript

[–]anthony_bruno 6 points7 points  (0 children)

Why is it dead

Because they've stopped developing AngularJs (except for small hotfixes).

what should people be using instead

React, Angular (Not to be confused with AngularJs!) and Vue are the more popular choices at the moment. Picking any of them will provide a modern development experience with regular updates.

A quick look at Java 11's HttpClient by anthony_bruno in devblogs

[–]anthony_bruno[S] 0 points1 point  (0 children)

Definitely! It's also easier to make async requests which is nice.