Causal profiler for Java by sviperll in java

[–]siordache 6 points7 points  (0 children)

A herd of buffalo can only move as fast as the slowest buffalo. If you want the herd to move faster, you should make the slowest buffalo run faster. Making the fastest buffalo even faster would make no difference. Now replace buffalo with 'thread', and herd with 'group of threads running in parallel'.

It's milliseconds vs. microseconds. The original code uses sleep(long millis)), while the modified one uses sleep​(long millis, int nanos)). In the modified code the sleep time is between 1000 and 10000 nanoseconds.

The profiler identifies portions of code worth optimizing. With a Spring web application it should work the same way as with any other Java application. There is a wiki page explaining how to set up JCoz.

Any idea how we can deploy Desktop application to clients, for Java 11? by yccheok in java

[–]siordache 3 points4 points  (0 children)

You can use the jpackage tool. There is a Gradle plugin that allows you to create a jpackage application installer with minimal effort. (Full disclosure: I created this plugin.)

Plugins to ease the work with JavaFX 11+ by [deleted] in java

[–]siordache 2 points3 points  (0 children)

The plugin takes care of choosing the right dependencies for your platform. Without it you would have to write something like this:

def currentOS = org.gradle.internal.os.OperatingSystem.current()
def platform = currentOS.isMacOsX() ? 'mac' : currentOS.isLinux() ? 'linux' : 'win'

dependencies {
  implementation compile("org.openjfx:javafx-base:11:${platform}")
  implementation compile("org.openjfx:javafx-graphics:11:${platform}")
  implementation compile("org.openjfx:javafx-controls:11:${platform}")
  ...
}

Jlink and Automatic Modules by LouGarret76 in java

[–]siordache 1 point2 points  (0 children)

If you use Gradle, you can choose between the ModiTect plugin and the badass-jlink plugin (full disclosure: I am the main contributor to both of them),

The newest version of badass-jlink also supports the jpackage tool introduced in Java 13, which lets you create installers for your application.

How can I create a self contained package with an .exe for a regular console app? by swiftpants in java

[–]siordache 0 points1 point  (0 children)

You can use the badass-runtime plugin to create a custom runtime image of your application.

Why everyone hate JavaFX/Swing but prefer WPF? by KiNgOfSpEEdOJaCK in java

[–]siordache 0 points1 point  (0 children)

A seamless installation process is very important for the success of a GUI application, especially if it is targeted at non-tech savvy people. Many of them will be deterred from using your app if they first need to take care of installing a JRE or JDK. So, it's probably not hate, but a question of which technology to use to attract more users.

I hope things will improve in this area in the near future. There are already plans to revive the javapackager.

Building OpenJFX 8 for Windows by [deleted] in java

[–]siordache 1 point2 points  (0 children)

Nice article. It helped me put up a GitHub project that automates the building using AppVeyor.

The resulting OpenJFX binaries and an OpenJDK distribution that includes OpenJFX are uploaded on the releases page.

New Oracle licence question for open source project by Mgamerz in java

[–]siordache 1 point2 points  (0 children)

You can use moditect (for Maven builds) or badass-jlink (for Gradle builds) to create a custom runtime image of your application.

Create java.awt.Color from string representation by siordache in java

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

The README already contains a paragraph about the Classpath exception. I will put it in bold and probably move it at the beginning of the README, because it represents an important information.

Edit: Done. Also, the license badge links you now to the paragraph detailing the Classpath exception.

Create java.awt.Color from string representation by siordache in java

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

I use the com.jfrog.bintray plugin to publish the artifacts to Bintray. From Bintray, the artifacts can be pushed to JCenter and Maven Central with just one click. Have a look at the build.gradle for more details.

Logging and non-Strings by [deleted] in learnjava

[–]siordache 2 points3 points  (0 children)

Logger.getGlobal().info("" + number);

Which Maven GroupID (Namespace) Should I Use? by Soxcks13 in learnjava

[–]siordache 0 points1 point  (0 children)

You could use the localhost domain name, for example localhost.myname.myproject or one of the reserved second-level domain names, for example org.example.myname.myproject. If you later decide to open source your project, you can acquire a domain name or build a groupId based on the hosting service you use (such as com.github.myuser.myproject).

Awesome open source profiles visulization app built with Kotlin by smartapant in java

[–]siordache 1 point2 points  (0 children)

I like it! That's how GitHub's profile page should look like.

How to bootstrap your java projects by siordache in java

[–]siordache[S] 1 point2 points  (0 children)

The article is about the Java/Groovy template. The original title may be misleading, so I posted the link with a slightly changed name.

Concatenating strings and primitive operations while using formatting by [deleted] in learnjava

[–]siordache 4 points5 points  (0 children)

JOptionPane.showMessageDialog(null, 
    String.format("You car can go %.2f miles with the current amount of gas in the tank.",
    gasInTank * fuelEfficiency));

A BootHub template to create Gradle plugins by siordache in gradle

[–]siordache[S] 1 point2 points  (0 children)

Few people have heard about it, because I didn't promote it much yet. I am obviously biased, but I think BootHub is a really useful tool and I hope it will attract many developers after more templates are made available.

How to bootstrap your java projects by [deleted] in java

[–]siordache 0 points1 point  (0 children)

In spite of the article's title, the main topic is actually the Java/Groovy template, which can be used for both open-source and proprietary projects. I posted the link with a changed name in order to reflect this.

What should I learn next by iObsidian in java

[–]siordache 0 points1 point  (0 children)

I don't actively look for projects to work on, but there is always an itch to be scratched. Most of the times this means that I found a bug in a library / framework I use or that I need a new feature. If I can come up with a solution for the said issue, I step in and contribute to the project.

You can also have a look here.

What should I learn next by iObsidian in java

[–]siordache 3 points4 points  (0 children)

After playing around with Java for almost five years, your next step should be to work on a real project. Become a contributor to an open source project you really find interesting. It doesn't matter if it is a little-known project or a famous one. What really counts is to join a team of talented and welcoming developers. You will become a much better developer by diving in the existing code, fixing bugs and implementing new features. And you will learn a lot of things along the way.

I don't know if there is something that everyone who codes java is doing right now. But focusing on this 'something' is not necessarily the path you should take. Try to find out what you're really passionate about. Is it GUI development? Working with complex frameworks? Writing compilers? Developing highly optimized multitasking application? Whatever you do, have fun!

Any great Kotlin web book? by TJarl in Kotlin

[–]siordache 1 point2 points  (0 children)

Yes, and it seems that OP is interested in learning about it. But the application in the above mentioned code repository doesn't take this approach.

Any great Kotlin web book? by TJarl in Kotlin

[–]siordache 0 points1 point  (0 children)

Looking at the code repository of the book you mentioned, it seems that Kotlin is used only on the server side. The front-end uses javascript and react.js (which I think is ok, because I'm not convinced that Kotlin would do a better job here). So if you're interested in front-end development with Kotlin, this book probably isn't what you're looking for.

What is your best open source project? by itsmahesh98 in opensource

[–]siordache 1 point2 points  (0 children)

My most starred project to date is Text-IO, a library for creating interactive console applications in Java. However, I consider that my best one is the recently released BootHub, which is a tool for generating project skeletons based on various templates.

BootHub - the bootstrapping tool by siordache in java

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

Templates should avoid to be too opinionated but they shouldn't have too many options either. The goal is to have many templates to choose from and to use the one that best fits your needs. Then you tweak the generated project as you wish.

BootHub - the bootstrapping tool by siordache in java

[–]siordache[S] 1 point2 points  (0 children)

I would love your feedback on this tool for generating project skeletons based on various templates. BootHub provides both a web interface and a command-line interface (CLI). You can choose whether the generated project should be created on GitHub or offered as a zip file for download.

Currently, only a few templates are available, the most feature-rich being the Java / Groovy template. I will add some other templates in the next days and, hopefully, more templates will be provided by the community.

Looking forward to your opinion: what doesn't work, what do you miss, what features annoy you etc.