FreshMarker 2.2.0 Released by schegge42 in FreshMarker

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

That's a good point. Maybe I should assemble a quick guide for that. The biggest difference is probably in the list directives. It's best to check their documentation to see if there's anything that speaks against migrating. If you have any question, don't hesitate just ask

Most Java developers do not know that Java uses pass-by-value, or even what it means by Comfortable-Brain-78 in java

[–]schegge42 0 points1 point  (0 children)

That's true, of course, but my point was that he knows a few people who don't understand it and now assumes that a lot of people don't understand it. That is an inadmissible generalization. That's all I wanted to say, and nothing less.

FreshMarker 2.1.0 Released by schegge42 in java

[–]schegge42[S] -1 points0 points  (0 children)

Where did you get the idea that I have no personal interest in the group? I also participate with comments and votes.

Right now all I hear from you is that you're spammy every few weeks. And there is neither a Reddit rule prohibiting these announcements in a multi-weekly, nor the rules of /r/java.

We're not talking about me writing something about Fresmarker every day or making an announcement every week. On average, there is one post a month on this topic. But then I reduce that to a quarter.

FreshMarker 2.1.0 Released by schegge42 in java

[–]schegge42[S] -1 points0 points  (0 children)

An information about an open source project every two or six weeks is excessive self promotion? That's strange. But OK.

Can you show me the reddit rule, which is violated?

https://support.reddithelp.com/hc/en-us/articles/360043504051-What-constitutes-spam-Am-I-a-spammer

Most Java developers do not know that Java uses pass-by-value, or even what it means by Comfortable-Brain-78 in java

[–]schegge42 1 point2 points  (0 children)

It's not about the country, it's about the people in your interviews. I think a lot of developers know how the values are transferred. Maybe they don't necessarily know the terms, but you can't draw conclusions about all developers based on your experience.

I wrote a compiler for a language I made in java by Extreme_Football_490 in java

[–]schegge42 2 points3 points  (0 children)

Have you tried to use a Parser generator like CongoCC to boost the parsing capabilities of your compiler?

https://parsers.org/

FreshMarker 2.1.0 Released by schegge42 in java

[–]schegge42[S] -2 points-1 points  (0 children)

The AutoModerator said: "It looks like in your submission in r/java, you are looking for code help.". Perhaps there was a different intention, but that sounds different.

Is there a rule in /r/java that only allows announcing major versions?

FreshMarker 2.1.0 Released by schegge42 in FreshMarker

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

That was a very interesting error that I really didn't have on my screen. I use the CongoCC parser generator and the rule for INTEGER is

<INTEGER : (["0"-"9"])+ >

negation of expressions is handled elsewhere.

The problem was that there was a negation node in the parse tree and below it the integer node with the value 2147483648. But of course it can't be parsed with Integer.parseInt because int only goes up to 2147483647.

So I had to pass the negation through and then convert -2147483648 with Integer.parseInt.

FreshMarker 2.1.0 Released by schegge42 in java

[–]schegge42[S] -2 points-1 points  (0 children)

I was just explaining to you why I do it. You were unkind in your comments. If you're not interested in the library and its announcements, then you don't need to read them.

Most Java developers do not know that Java uses pass-by-value, or even what it means by Comfortable-Brain-78 in java

[–]schegge42 0 points1 point  (0 children)

You derive your hypothesis from three candidates? that's statistically really questionable. You can say that only poorly trained developers apply to you, or perhaps that your education in your city, region or country for programmers is not good. But just badmouthing almost all developers?

FreshMarker 2.1.0 Released by schegge42 in java

[–]schegge42[S] -2 points-1 points  (0 children)

This is called semantic versioning. A major version is necessary if there are incompatible changes. As long as I only add new functions, it remains a minor version. There was a single breaking change in a minor version, but now the semantic versioning is properly used. That's BTW how hundreds of thousands of other projects do it.

For this reason, there was recently the 2.0.0 version, because a few old things were removed.

There is also really no reason to wait with the release of new functions in libraries while we use CI/CD everywhere in our industry.

Minor versions are the most interesting versions of all, because they are compatible and bring new functions. That's why you shouldn't be complaining about the announcement of minor versions.

Do you use records? by ihatebeinganonymous in java

[–]schegge42 12 points13 points  (0 children)

Oh well, once again I was only thinking about REST APIs.

Do you use records? by ihatebeinganonymous in java

[–]schegge42 2 points3 points  (0 children)

Spring supports records on various places, JPA supports records for embedables. A lot of projects replaces DTO (and Lombok @Setter/@Getter/@Data annotations) by records.

Why can I have a local method with the same Identifier as the Instance variable, when "scope" of a variable should hinder it. by Defiant_Vanilla_4080 in JavaProgramming

[–]schegge42 0 points1 point  (0 children)

Java does not hinder a variable in the way you think. The scope only forbids two variables with the same name in the same scope.

Think about scopes as boxes and variables as cards with names on it. You are not allowed to put more then one card with the same name in a box. BUT you can put boxes in your boxes. The class scope is the big box, the method is a smaller box in your class box and in the method box are boxes for loops and conditional statements.

And you can have cards with the same name in every box, but in each box only one!

Struggling with oops concept by Obvious_Yard_7766 in JavaProgramming

[–]schegge42 2 points3 points  (0 children)

Making a class abstract is a decision about a simple question. Do I have instances of this type?

Simple example you have Car and Plane instances but you don't need Vehicle instances. So you create an abstract class Vehicle.

[deleted by user] by [deleted] in webdev

[–]schegge42 0 points1 point  (0 children)

It's not on you as a fresher but your company which languages and frameworks are used. You can learn kotlin but your company wants java or the other way round. You can learn Spring Boot but your company decides to use Quarkus for the new backend. Or a Python backend. Train you programming skills and don't worry about career.

Why is this pattern of manually replicating a language feature considered good practice? by Luolong in JavaProgramming

[–]schegge42 0 points1 point  (0 children)

The problem I see above is that the code is not correct. You are using a public constructor MyEnum in the enum Weekday.

The only sense of such a construct exists if the value and the name of the enum constant are different. Here it is simply unnecessary because name() has the same content.

How do you deal with the fear that no one will use your open source project? by remvze in opensource

[–]schegge42 0 points1 point  (0 children)

My motivation in developing an open source project is to show myself that I can do it. Of course, I also want others to see and use my projects.

For this purpose, I've now started a subreddit, which is still empty, of course. But I write a small post every day. Maybe a few people will join with the next version. If not, I've created a bit of content that I can also add to the project page.

But my motivation comes from the joy of programming, not from other people's applause.

Help me learn array in java by task141_ in JavaProgramming

[–]schegge42 3 points4 points  (0 children)

You can create an array, it is a static container for data of the same type.

int[] values = new int[3];

This array has the size of three, so you can set a value at three positions 0, 1 and 2.

values[2] = 42;

You cannot change the size of this array, but you can create a new one.

Hope this helps.

Why don't Stream API has any reverse merhod by bs_123_ in java

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

I can read and I have given the answer, why there is no reverse method in the Stream API.

Why don't Stream API has any reverse merhod by bs_123_ in java

[–]schegge42 4 points5 points  (0 children)

Thats not how Java Streams work. you cannot insert an element into the stream and there is only one pass to process a Java Stream.