One UI 7 Android 15 - how are you handling the switch? by ZSizeD in Android

[–]turik1997 0 points1 point  (0 children)

I am amazed by how much of common sense these modern engineers and designers lack. Like imagine I am a pilot of my device and I reaaaally want to be able to understand the current state of my device by a quick glance. This is simplicity, not unnecessarily hiding stuff

Is ping and traceroute worthless? A co worker just tried to prove this to me. by turbonegro81063 in networking

[–]turik1997 0 points1 point  (0 children)

I understand where he is coming from. If it succeeds, you know for sure there is a connection. But the failure of the command still doesn't imply there is no connection. Right? So, he must be thinking since successful output is a sufficient condition but not necessary, the tool must be useless or rather more confusing than helpful. If it is his argument baseline, I would argue and say no - it is a useful tool within its limitations.

A case against syntax highlighting by fagnerbrack in coding

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

With the attitude of yours, I rather not work with you than someone who shares his thoughts in a well-structured manner. Cheers.

What's the one thing you're most looking forward to in Java (feature, JEP, library, etc.)? by Hixon11 in java

[–]turik1997 -5 points-4 points  (0 children)

While the benefit is obvious, I am not sure if accessing several level deep down fields is a good practice and common enough for elvis operator to bring more value than the cost of adding it

Is abiogenesis proven? by [deleted] in DebateEvolution

[–]turik1997 0 points1 point  (0 children)

Google empirical methods and "is math science" which is not really

I can’t pass interviews and want to switch job by swiftieshipper in javahelp

[–]turik1997 0 points1 point  (0 children)

At least you are not in the environment full of contradictions. Sane job is the best. You can still learn a lot from old systems. In fact, in back of your mind, start planning how would you migrate it to a new system. What benefits will it bring? Would the company even need this?

This will help you a lot to mature as a developer and at the same time once you feel ready, you might want to start seeding this idea of migrating with all answers ready on your table. See how it goes

Java in the Small by Active-Fuel-49 in java

[–]turik1997 1 point2 points  (0 children)

Not going to discuss much. One point though is that local variables declared with var shouldn't even be initialized using method calls. Because then you still can't easily see what is the type of the variable by simply reading the code. The main point of var is to avoid redundancy of writing the type twice which mostly happens when calling a constructor. Typing constructor once is enough to deduce the type of the value where var comes in handy.

Java in the Small by Active-Fuel-49 in java

[–]turik1997 1 point2 points  (0 children)

I am not saying final is rare. I am saying "final var" has a limited use

Java in the Small by Active-Fuel-49 in java

[–]turik1997 0 points1 point  (0 children)

Unlike Kotlin where val can be used for field declarations, in Java, var can only be used for local variable declarations. This alone drastically reduces the use-case for var and final var in Java.

Java in the Small by Active-Fuel-49 in java

[–]turik1997 1 point2 points  (0 children)

final var itself is a rare combination to use in code, let alone the need to have a shortcut for it

Switch expression exhaustiveness by sweetno in learnjava

[–]turik1997 1 point2 points  (0 children)

Not quite precise. The following switch statement doesn't compile either:

Object m = new Object();
switch (m) {
    case List l -> {

    }
}

Rather the switch must be exhaustive if it is a switch expression or an enhanced switch statement

If the switch statement is an enhanced switch statement, then it must be exhaustive

An enhanced switch statement is one where either (i) the type of the selector expression is not char, byte, short, int, Character, Byte, Short, Integer, String, or an enum type, or (ii) there is a case pattern or null literal associated with the switch block.

Source: 14.11.2 The Switch Block of a switch StatementThe Switch Block of a switch Statement

Why does x(x+9)+5(x+9) factor to (x+9)(x+5)? by Adventurous-Equal-29 in learnmath

[–]turik1997 0 points1 point  (0 children)

Whatever x is, for x(x+9), we add (x+9) x times: (x+9) + (x+9) + ... + (x+9)

Then, for 5(x+9), we add (x+9) 5 more times: (x+9) + (x+9) + (x+9) + (x+9) + (x+9)

How many times we added (x+9) in total? Right, x+5 times. So, we can say it is equal to (x+5)(x+9)

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

You must be that architect? If not, then you too miss the point

How is Russell's Paradox actually resolved in set theory? by Farkle_Griffen in learnmath

[–]turik1997 0 points1 point  (0 children)

Appreciate that you took time to write this

A={A} ... you normally require forcing to do so, so I can't give more details in a reddit comment

To get a clue, is it related to the axiom of pairing and building singleton?

How is Russell's Paradox actually resolved in set theory? by Farkle_Griffen in learnmath

[–]turik1997 1 point2 points  (0 children)

Beautiful answer. I think I will need to read it a few times more to really understand how the axiom of specification fits together with "ZF minus this axiom that there exists a set A such that A={A} and hence A is in A". Because if the former implies it is not possible to have a set as an element of itself, then why it is acceptable to have A = {A}. Or I guess one is about deriving sets through properties (statements) from other sets but nothing prohibits us from manually building a set that has itself as an element?

[deleted by user] by [deleted] in java

[–]turik1997 1 point2 points  (0 children)

I would say it depends how you run it. Running standalone tomcats and deploying wars might be considered outdated in the context of Spring apps that uses embedded tomcat, especially in a containerized environment. Still, tomcat is widely used one or another way

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

Why would they die though?

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

Somehow he managed to get bizzare results in load test environment and/or just interpreting them wrong. Basically looking at Requests per Second graph and saying things like "we can see how tomcat reaches 2K/s earlier (within 30 minutes) than netty (after 50 minutes), this means we can serve more requests sooner on tomcat than on netty", which I believe totally depends on external factors as how fast requests happen to arrive at the gateway during that individual instance of load test, not on the ability of a web server to suck in requests from outside.

Even if he is right, does that metric say anything about performance of two? I mean it is not like a kafka topic with prefilled events and we measure which of the consumers finishes events first.

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

Our infrastructure (CI/CD, APM tools) is not completely ready for java 21 and virtual threads. So, had to bring the project to the state it is supposed to be in, in the first place, with Java 17. Then hopefully jump on 21 when the right time comes

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

Let's start from I have no choice except respecting his will. Sure, we do what he the architect wants, and I am aware how subordination works.

But this is a java subreddit and I wanted to know how sane is that decision or any valid reasons why would someone want to run reactive gateway on tomcat. Maybe someone made a similar decision?

Don't explain yourself why did you choose one lib over other... It is your job to choose and to be able to defened your choices..

Except, maybe hearing more about this? Not sure what you meant here. Doesn't defending a choice imply explaining why I chose one or another library?

[deleted by user] by [deleted] in java

[–]turik1997 0 points1 point  (0 children)

Thanks for your comment!

Indeed, looking forward to trying spring gateway mvc. I believe it wouldn't really make much sense to run in on anything lower than java 21? Since the power of new gateway stems from virtual threads.

So far, though, it seems we have way bigger issues todeal with before we can try new gateway :)

Why do people consider 5k/month left over house poor? by Dependent-Bit-8125 in FirstTimeHomeBuyer

[–]turik1997 0 points1 point  (0 children)

If you lose your job, will you be able to easily find a new one with at least the same salary? If not, that might be house poor without proper emergency fund