Stepankha Yuliannia

Ranch Hand
+ Follow
since Mar 24, 2021
Stepankha likes ...
Java ME Quarkus Java
Merit badge: grant badges
Biography
Stepankha Yuliannia, PhD.
I'm from Ukraine
For More
Germany and other parts of EUR
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
7
Received in last 30 days
0
Total given
5
Given in last 30 days
0
Forums and Threads

Recent posts by Stepankha Yuliannia

Hi Laurentiu,


Slightly off-topic and non-technical - With Java being such a mature language, how do you stay up-to-date with the latest trends and technologies in the Java ecosystem, and what advice do you have for developers such as this community who want to do the same?


Regards
1 year ago
@Campbell Ritchie
Well, I think the finally block is still useful for containing cleanup code that needs to be executed regardless of whether the exception was caught or not...

When catching several exception types in a try block, it is possible that different exceptions may be thrown and caught at different points within the block. In this case, the finally block ensures that any code that needs to be executed after the try block, regardless of the type of exception caught, will be executed. For example, if resources were allocated in the try block, they can be cleaned up in the finally block to ensure that they are always released. I see your point though - catching only one exception type in a try block, is unlikely that different exceptions will be thrown and caught at different points within the block.

@Ron McLeod
Interesting read, thanks: JEP 421: Deprecate Finalization for Removal

1 year ago
Hi troubleshooters,


Typical interview question is "Can you explain the difference between final, finally, and finalize in Java?". And it is pretty straightforward:
final = method is executed only when we call it
finally = block is executed as soon as the try-catch block is executed
finalize = method is executed just before the object is destroyed

But what if you are asked to describe some best practices for finally and catch blocks in exception handling (or how to handle multiple exceptions in a single try-catch block)? Do you have some real-life example?


Regards
1 year ago
Hi Esteban,


It seems like the tools you need to install (if you want to apply all the examples discussed throughout the book) are the typical ones more suitable for the development phase:

1. IDEs - Jetbrains, Eclipse, Netbeans
2. JDK - JDK 17
3. Profilers - VisualVM
4. Other tools - Postman

Regards
1 year ago
Hi Laurențiu,

I am sure you have seen a lot of different Java devs throughout your career. What do you think is the most common mistake, that Java devs encounter when troubleshooting their code, and what advice would you give them to avoid it?

Thanks
1 year ago
Thank you Campbell, the advice always use the equals() method except for these is the main one!
1 year ago
Hi Laurențiu,

I have recently troubleshooted Java code and stumbled upon an interesting issue. Basically what it came down to was what is the difference between '==' and '.equals()' in Java.

Can you please briefly elaborate when would you use one over the other?

Thank you
1 year ago
Many thanks for coming Laurențiu Spilcă
1 year ago
For a distributed system like microservices, the telemetry can be generated by the applications running on a VM machine, baremetal machine, container, serverless function potentially in different parts of the world. This can be a challenge from the telemetry perspective - how to trace the flow of information for example. In your book, do you mention some best practices when it comes to these potential issues?
1 year ago
Yes, there is a lot of stuff happening in this space - Azure Stack Hub, Azure AppInsight, Sumo Logic, Splunk, SolarWinds, Data Dog, New Relic... New tool for this almost every week.
I used some of them and they are quite good at spotting outliers, but as you say AI can only help little bit - you still need humans to go and investigate if it's a "Memorial day problem"
1 year ago
Thank you for your extensive reply, it is really appreciated. I do agree with your point of greenfield = go to cloud. This is exactly what we did (Azure) and the main reason was how easy it is to start using it without much work and how it integrates well with the rest of the components. Basically you are paying for the whole ecosystem. But there is a problem with some data governance and security - as you mention e.g. GDPR

Congratulations on your book by the way, it has lots of interesting topics.

1 year ago
Hi,

I'm looking at the picture in your book which caught my attention:


It shows the shipping stage of the pipeline, which processes/transforms and stores telemetry for use before presentation stage of the pipeline. I have previously dealt with this part and had choices of shipping to:
1. queues, pub/subs
2. directly into local Splunk & syslog
3. to the cloud aggregators

We decided to use cloud aggregators for various reasons - what would be your decision process when deciding the destination for the telemetry data?
1 year ago
Warm welcome Jamie Riedesel
1 year ago
Hi Alex,

Eric Brewer's CAP Theorem states that for the three properties that you want in a distributed system - consistency, availability, and partition tolerance - it is only ever possible to simultaneously achieve two of them. (we typically relax one constraint, for example consistency, in real-world distributed systems). Within the context of functional programming (FP), we use immutability to reason about how a program behaves, and that helps us with things like concurrency so that we can tell that this is the value. Now, when we take that outside of a single process or some memory, and now apply that to how distributed systems (DS) behave, now we're talking about persistent storage, we're talking about messages on the wire etc. Would you then agree that FP is closer to this real-world scenarios and therefore more native for DS?

Many thanks & have a good one

Junilu Lacar wrote:

Alexander Granin wrote:

Stepankha Yuliannia wrote:I'm just going to add that performance is a big thing/reason to use FP (supports parallel programming). OOP does not support parallel programming.

Yes, agree. I'd only say that the term "performance" is quite overloaded, and we might be talking about different things here


Just wanted to get some clarification on this "OOP does not support parallel programming" statement.

Admittedly, I haven't written any Java programs that use them but Java does have features that support parallel programming. Are you both disagreeing with that assertion or is there some nuance in what you said that I'm just missing? Isn't support for parallel programming "a function" (excuse the pun) of implementation rather than the programming paradigm (OOP vs FP) itself? A similar example would be tail recursion. Nothing in OOP or FP says that tail recursion optimization isn't supported, right? Currently, Java doesn't support TRO as far as I know but other JVM languages like Kotlin and Scala do.



Read/write safety is the biggest concern and bottleneck in parallel processing. So what I meant is OOP is not "real" parallel computing in my view. Functional programming basically deals with immutable objects, which means you are quite unlikely to need to worry about some thread changing the content before you get to use it - it also solves it by saying "why re-use and recycle the same memory space? There's so much memory compared to processors, let's just forget about saving space and worry about speed."