Liutauras Vilda

Marshal
+ Follow
since Nov 12, 2014
Liutauras likes ...
Mac OS X VI Editor BSD Java
Merit badge: grant badges
For More
London, United Kingdom
Cows and Likes
Cows
Total received
623
In last 30 days
0
Total given
2009
Likes
Total received
1851
Received in last 30 days
4
Total given
2244
Given in last 30 days
20
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

Junilu Lacar wrote:Here's how I might do it in Kotlin


I'm wondering whether a nice touch would be to reduce 5 and 25 to just 5 in programatic way, unless this .any { this % it == 0 } sort of does similar. Well, maybe it doesn't.
12 hours ago
@OP

So you just need to incorporate into the template you have been given a code Piet wrote.

What is DSA?


i.e.

Or


Think which approach is better and why.
1 day ago

Lou Hamers wrote:I see the same kind of messiness in personal experience from actual business supporting projects. You rarely see a project that doesn't have a large number of messy warnings that the devs simply ignore. Projects I have the lead on are the only ones that come close to being "clean", and even then, they still aren't. (I always lecture my developers a little, "Warnings sometimes turn out to be bad errors in disguise, but there isn't any value in warnings if there's so many of them that they're ALL ignored.") If so many devs won't even pay attention to a simple thing like a javac warning or an IDE warning


Our team in that respect leverage Sonar. No code can get in which fails quality gates. Initially I was championing an idea that such thing should not be enforced but rather part of a mindset, but over the time I learned, that enforcing quality gates programatically works better.

2 days ago

Campbell Ritchie wrote:I never knew that rounding mode was called banker's rrounding.


I read somewhere it is a default behaviour in .NET languages (i.e. C#), those languages are quite popular in financial sector, banking applications in particular - I presume they might be more familiar with that term

You are right, we were better to hear about that in non-meaningless (MD) forum.
4 days ago
Those other readers who might never heard of it, as Stephan rightly identified, it is called a Banker's Rounding: https://wiki.c2.com/?BankersRounding

To be honest, I wasn't pleasant to see such behaviour change as well, not only it is dangerous, but also makes to think twice, what else one could expect.

It is understandable in a way that it is a version jump from 2 to 3, and might be documented well, but still, a migration becomes a risky call at best.
4 days ago
python2

python3
5 days ago

Junilu Lacar wrote:It's a little surprising for me when I get that kind of reaction; it's as though people have never heard of top-down design vs bottom-up design. Is that something that only folks from older generations know about now? I don't get it. I grew up in the Structured Analysis and Design era and starting top-down seems more sensible to me.


Perhaps more of a thing of those specific people who never heard of top-down design (it is a bit weird though, kind of common sense thing..). These days also in computer science course you'd rather see than not a module called something similar to Systems Analysis and Design, where students are being taught about top-down and bottom-up designs. And the usual saying I heard is, that bottom-up might be suitable if the system you are designing is really small, or bigger system decomposed to something considerably small where you could take a bottom-up approach, but anything bigger than that, of course, without seeing a big picture first, would be quite difficult to think about nitty gritty details at first. Maybe not that impossible, but rather not productive, because to most extent you'd figure out at the end, that you don't need what you got, and what you need actually you don't have it.

On the other hand, depending who is your audience, but you know yourself, that's not something uncommon that people who are starting out, finding quite difficult to include into design only what is really necessary at that time, and leave out what doesn't really matter yet, so they do go to nitty gritty details too much and too early - but this is what that Systems Analysis and Design module is actually attacking, how to think about abstract ideas at first, and only then zoom in when you really have to.

Mark Sando wrote:Not sure if it's of any relevance, I use postman to hit the endpoints


Please give us a curl command you get from postman. Look for </> on the right hand side of postman and please copy/paste what you see there.
1 week ago

Piet Souris wrote:rot13, rot17, ...: that somehow reminds me of Advent of Code 2022, day 11!



Istvan, I don't know if you need help deciphering that, but Piet said, be ready on 1st Dec 2023.

Mark Roberge wrote:Then how do I make it executable?


Campbell is a former and non returning BlueJ user, luckily this problem could be solved without using BlueJ.

Perhaps Campbell meant that you'd need to have some sort of main method, a starting point of your program, where you could use your written library.

Do you know how that main method looks?
1 week ago
Fair enough. You can have 3 characters there, but then yes, you got to do something way before that.

Earlier, I wrote:And no, I did  not modify any of the actual code.


Ok, I did not realise that counts as code modification in such scenario.
Istvan, that is indeed my solution!

I never heard of rot13 before, so it was fun to decrypt your message
That's the thing, hard to discuss without spoiling. When you and others say 'character', I don't know what is actually being meant.

All I can say is, that I hope where it says "write something here" I can write anything I want, and so I did, and the solution is something what contains 3 characters (two of them being the same) in spoken language.

And no, I did  not modify any of the actual code.

It does get puzzling, doesn't it

Paul Clapham wrote:Some of which have 4 characters which are all different.


I'm certainly intrigued now.

Stephan van Hulst wrote:..it took me a few minutes to trim the answer down to 4 characters


I'm having hard times to trim up to that.