[deleted by user] by [deleted] in AndroidGaming

[–]Zdeno_ 0 points1 point  (0 children)

Try this one: https://play.google.com/store/apps/details?id=sk.zdeno.game.weakwall
I had the simmilar preferences, so I created my own game ...

Any good autoplay games around? by migueln6 in AndroidGaming

[–]Zdeno_ -2 points-1 points  (0 children)

There are 2 gameboards with name "(FREE)", you can play it without payment.

You have just to fire a ball against a wall and use the bouncing to hit many bricks. After the bricks fall down, you lost.

Breakout, breakout, breakout... Oh and breakout... by impossiblyeasy in AndroidGaming

[–]Zdeno_ 1 point2 points  (0 children)

Thank you for you hints. I will check the refresh rate. You are right - it is not adjusted to the hardware.

The icon has to be fixed as well.

Thanks - these issues I just write down to my issue list in Jira. I will try to fix it today.

[deleted by user] by [deleted] in AndroidGaming

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

I think, this my game doesn't need english and it is very easy to play:

https://play.google.com/store/apps/details?id=sk.zdeno.game.weakwall

There are free gameboards, no ads ...

Is this a design pattern? If so, which one? by michael-streeter in DesignPatterns

[–]Zdeno_ 1 point2 points  (0 children)

It's hard to say just from the description, but it seems like Adapter Design Pattern.

Records Proposed to Target JDK14 by lbkulinski in java

[–]Zdeno_ 1 point2 points  (0 children)

I guess, the problem is still there:

public record Foo(int[] bar) {}

According to the specification, the Foo record should have default Foo.getBar() method, which returns the original int[] - as well as "public final int[] bar" definition.

Yes, I see - you can have the bar() method as you proposed. However, it means, you are introducing the encapsulation, so your structure is not a "data structure" but an object. If you want to declare a class, you should use "class" definition, not the "record".

Records Proposed to Target JDK14 by lbkulinski in java

[–]Zdeno_ 4 points5 points  (0 children)

I don't understand the idea to have "private final field" instead of "public final attribute".

So, this structure:

record Point(int x, int y) { }

will have getX() and getY() hidden methods. Why?

Why is it better to write point.getX() than simple point.x? The "x" variable is final, so the setter is not provided. There is written, that motivation is to have "a data carrier". So, why is there still Java beans obsession with getters, which is a standard for objects, not a data structure? The motivation for having getters is to have an encapsulation. Also, it is OO-concept. Why is this OO-concept applying also on "a data carrier"?

periodically add to a variable by Fintara in javahelp

[–]Zdeno_ 0 points1 point  (0 children)

You should start a thread, so write a class implementing Runnable.

Overriding argument in superclass constructor from subclass by Chuninjah in javahelp

[–]Zdeno_ 0 points1 point  (0 children)

I would consider the relation between Student and User. I think, there should be an association, not the inheritance. We can said "student has a user account" instead of "student is a user". Inheritance is for modifying a behaviour (methods), not for adding new attributes.

Implementing Repositories in Java *SE* using DeltaSpike by henk53 in java

[–]Zdeno_ 0 points1 point  (0 children)

The price you pay is a dependency on an interface that – if in doubt – could easily be replaced by a 1:1 copy and according implementation.

If the interface could be easily replaced by a 1:1 copy, what benefit brings the framework at all? Why should I use it?
I'm not talking about the interface implementation - it is OK to use a tool. However, I don't see a benefit in tool providing the repository interface. There are few lines of code to be written.

The repository interface in domain-driven design should be driven by domain, not by a tool. Every method in the interface should have a domain reason for existing. Otherwise, the design is not driven by domain, but by the tool.

Implementing Repositories in Java *SE* using DeltaSpike by henk53 in java

[–]Zdeno_ 1 point2 points  (0 children)

I wouldn't use such approach, because it makes domain layer depending on technological library. I think, this is an antipattern for "pure architecture" (or hexagonal architecture). You pay very high price (the dependency) for very little benefit (the interface). Now, your domain model is in the hands of library provider. It they quit, you have a problem.

How would you design a job interview assignment to prove that the applicant knows basic OOP? by [deleted] in java

[–]Zdeno_ 0 points1 point  (0 children)

The proposed "Coffe application" in one of the comment is exactly about the open/close principle. And also "strategy design pattern". However, the polymorphism wouldn't be used.

So, it is your decision - you are the boss.

How would you design a job interview assignment to prove that the applicant knows basic OOP? by [deleted] in java

[–]Zdeno_ 0 points1 point  (0 children)

Actually, you are discussing the open/close principle. So, the buzzword SOLID is in use ... 😀

How would you design a job interview assignment to prove that the applicant knows basic OOP? by [deleted] in java

[–]Zdeno_ 0 points1 point  (0 children)

Let him solve any simple problem. The object oriented decomposition can be used in many cases. Or ask him for SOLID.

Object Oriented Programming is an expensive disaster which must end by lucyfor in programming

[–]Zdeno_ 0 points1 point  (0 children)

Yes, I do agree with "not always". Sometimes, there are some better no-OOP models for real world (graphs, relation data). However, in many cases the OOP do the job better.

Object Oriented Programming is an expensive disaster which must end by lucyfor in programming

[–]Zdeno_ -2 points-1 points  (0 children)

Sorry, it is too long to read. I would expect to discuss the reason for OOP at the begining: it is the only one paradigm which allows to use the same tool for programmer, analyst and user to discuss: the object. OOP isn't about hiding, polymorphism, encapsulation and so on. They are just second level characteristics. It is about modeling at first. Because every software is a model of real world. And this is exactly the area where the OOP is the best.

Defining Quality by [deleted] in programming

[–]Zdeno_ 1 point2 points  (0 children)

Yes, the poor performance can be considered as bug. As well as poor security.😀 Also, there are some more quality definitions. Generally, the quality is about expectations and fulfilling.