Liutauras Vilda

+ Follow
since Nov 12, 2014
Liutauras likes ...
BSD Linux Mac OS X VI Editor
London, United Kingdom
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt Green check
expand Greenhorn Scavenger Hunt

Recent posts by Liutauras Vilda

D.J. Quavern wrote:

Campbell Ritchie wrote:Yes, a Sieve would be much a more efficient algorithm, but the OP is using a technique which doesn't record prime numbers, simply printing each individually.

What does the OP mean?

D.J. Quavern, don't hesitate to refer Campbell to this tutorial in case he haven't read it:

On a more serious side, I wouldn't be suprised if he actually wrote it

OP means original poster
1 day ago

Jason Andrews wrote:Is there anything I missed or should these languages be re-ordered.

While to know the language syntax and the language itself to some extent is mandatory in order to be able to write program with such language, I think that's not the most important part in the journey you are planning to take.

I think you need to understand programming as a discipline to a much bigger extent than the language itself. And this is where all the time will sink for you (in my opinion) if you ever start on these projects yourself. For what is worse, there isn't a single book which could teach you that, I guess the picture can only be assembled from many different pieces.

Those pieces of the picture often (but not necessarily) are being provided in the computer science's taught courses.

While there are great programmers without such degrees (and even in this community), I personally feel that I learned a lot in academia, and without that as a starter pack, I don't know whether I would have been where I am now. Of course, academia was just a 1/3 of the picture. Then tremendous amount of read threads here (in the past 5 years or so) about good software engineering practices, as well as spent good amount of time practicing with those ideas gave me the chance to outgrow (I think that happened now) a junior position, so I could competitively work on some programming projects what you seems to be aiming at yourself.

What I'm trying to say, that I never thought which language I should learn first or most... That's simply not about that. But I guess you'll figure that out sooner rather than later.
4 days ago
If I'd generate getter with an IDE, I'd get the method name called getSalaryIncome(). As a result of calling it, I'd expect to get back a monetary value.

That fails to pass the Principle of least astonishment, because instead, I'd get a some sort of date.
4 days ago

private LocalDate salaryIncome;

Why salaryIncome field has so weird data type? The field name and its data type don't fit well together to me.

Seeing this part of the code I'm puzzled, whether data type is wrong or the variable name is wrong, and I'd need to spend way more time than I'd expect to spend on deciphering it.
4 days ago
Hi Steven.

You have this method.

Do you notice how your method name and the return type are asymmetric? Your API user is asking if there is a winner, but instead of an expected concrete answer, user is given some game status booklet, which need to read through in order to figure (or maybe not?) out the answer.

In particular I see you return X_WON or IN_PROGRESS. I guess there will be also O_WON which I don't see there yet.

But do you see how these are misleading as the return types for such method name? Read method name out loud... I think more closer (not saying yet it is right either) to the reality would be getWinner(), so it could return X or O or IN_PROGRESS (with latter meaning there is no winner yet).

Notice when I talked about getWinner() as return types I wrote only X or O or IN_PROGRESS, that's because GameStatus doesn't fit them anymore if the method name is getWinner(), and the winner is perhaps Player/Symbol? Worth to think through naming strategy once again.

For what is worth, method isWinner() I'd expect to return either false or true and nothing else.

Thinking more about isWinner(), I see this method name doesn't fit in this case at all, because you'd expect to invoke such method on some entity as Player.X, for example Payer.X.isWinner()? If you invoke such method on Game, then perhaps better would read as hasWinner(), meaning ticTacToe.hasWinner().
4 days ago

Not sure how important is that if at all, but game is really called "Rock–Paper–Scissors" (difference sequence from yours).

Also, package names concept is slightly different. Try to find information on web what is the common approach naming packages. I don't think package name rock.scissors.paper makes much sense here.
5 days ago
Hi Cliff,

Please post your current updated code and please tell us if you still have some issues with it.
5 days ago

Monica Shiralkar wrote:Thus I thought someone already knowing scala could guide me that which types of examples I can focus on to start with.

Start on basics, where you'd want to start with every language, to understand its syntax and technical capabilities. It can involve simple exercises such as find the largest number within an array of numbers.

Scala, Java, Python are general purpose languages, so to say that Python is suitable for data science, while is ok, but same saying holds I think for Scala and even Java. Python just has perhaps more libraries for data scientists, however, that does not necessarily mean if you use Python you need/must write programs which are data science project related. i.e. could be network scanner/analyser written in Python, perhaps same as in other mentioned languages too.

However, if you are interested in Scala at the moment, and looking for some niche area in it, you may want to look into akka toolkit, so you could use in combination with Scala. As for project? Could be anything, for instance twitter messages feed filter.

Something like (all happens in real time):
1. Reads your twitter messages feed.
2. Filters some of the feeds ([1] by user, [2] by keywords in feed, [3] by ...) and shows only them.
3. Prints them in console live?

Might be pointless project, but you'd learn something along the way for sure.
6 days ago

Campbell Ritchie wrote:Is that only coffee he is drinking?

The cup is bottomless, so no.
1 week ago
Sorry for a late reply. Thanks Stephan. Will look into that.

From the quick glance, I see that actual tests sitting just in one module, but not in others. Interesting how that would behave if tests were spread across more modules. But I guess I can easily check this out by pulling the project and adding some dummy tests to other module(s).

I'm going to work more on this today on my side, so will report back if I succeeded or at least to what extent got some success.

Thanks once again.
1 week ago
A tutorial which you may tried or think is of a high quality would work well too. I just couldn't justify myself which one is a quality one and which one isn't.
1 week ago
Hello ranchers,

I've integrated SonarCloud with Maven project which is a multi-module project. During the build by Jenkins, I do get project analysed.

However, Code Coverage does not get produced. I have some understanding, that having jacoco-maven-plugin within the parent pom file isn't enough, and I need perhaps build coverage reports in each module, and only then in the parent pom somehow specify the location where to find each and every module's individual reports?

Am I thinking towards right direction?

Basically need some advice and tips what I should start researching. Did some already, but nothing concrete could find.

Appreciate for the help.
1 week ago