Win a copy of Learning Regular Expressions this week in the General Computing forum!

Liutauras Vilda

Marshal
+ Follow
since Nov 12, 2014
Liutauras likes ...
BSD
software developer, moderator at coderanch, a father, husband and nintendo switch owner
London, United Kingdom
Cows and Likes
Cows
Total received
415
In last 30 days
4
Total given
1246
Likes
Total received
1246
Received in last 30 days
12
Total given
1126
Given in last 30 days
13
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Liutauras Vilda

Pass the test? Add your name to the wall, partner.

OCMJEA Wall of Fame [order by Date]
VersionNameFinal Exam DatePart 1 ScoreAssignment ScoreStoryAssignmentWhat's NextCountry
JEE6Mahmut ErenOctober 19, 201876%147/160-Quick Computer-Turkey
JEE6Nataraj BasappaSeptember 26, 201873%152/160https://www.natarajmb.com/2018/09/journey-to-ocmjea/Quick Computer-UK
JEE6Mustapha SENHAJIFebruary 03, 201873%142/160-Retire EarlyAWS Solutions ArchitectMorocco
JEE6Gautam DebDecember 15, 201776%156/160-Retire Early-India
JEE6Ernest BarrosoNovember 02, 201778%131/160Two months on the 3 stepsGemstone InternationalSpring Professional CertificationVenezuela
JEE6Francesco FabiOctober 09, 201771%148/160-Team DoctorTOGAFItaly
JEE6Om Narayan PandeyJune 26, 201780%156/160-Dream Car-India
JEE6Samrat RoyMay 24, 201783%155/160https://coderanch.com/t/680789/certification/OCM-JEA-storyGemstone International-India
JEE6Sanjay GarothayaMay 01, 201780%151/160-Team Doctor-USA
JEE6Amine Ouali AlamiApril 02, 201778%156/160-Utility international-Morocco
JEE5Rajesh NarayananMar 17, 201792%143/160-Team Doctor-India
JEE6L. WitkowskiMar 1, 201771%140/160-Retire Early-Poland
JEE6Rajesh Kumar SrivastavaJan 24, 201773%139/160-Utility InternationalExpertise in Machine Learning & AIIndia
JEE6Raghavendra DesojuJan 23, 201783%149/160-Quick ComputerAWS Solutions ArchitectUSA
JEE6Carlo CangemiDecember 23, 201688%144/160-Dream Car-Italy
JEE6K. TsangDec 2, 201671%-(JEE5 upgrade)---Hong Kong
JEE6Sergio Navarro GarzaMay 28, 201683%149/160-Utility InternationalTOGAFSpain
JEE6Caio BessaMay 19, 201671%143/160-Retire EarlyIELTSBrazil
JEE6Mithun M SMay 05, 201678%141/160StoryWireless Phone CompanyTOGAFIndia
JEE6Yogaraj KhanalMarch 23, 201671%138/160-Quick ComputerOSCPNepal
JEE6Angelo VerdicchioFeb 05, 201683%148/160-Factory HomesImprove design & architecture skillsItaly
JEE5Sourav BiswasFeb 17, 201693%144/160-Retire EarlyImprove design & architecture skillsAustralia/India
JEE6Siddhesh JogJan 27, 201676%146/160-Wireless Phone CompanyImprove design & architecture skillsIndia
JEE6Mika KilpeläinenDec 7, 2015PP-Gusher OilHTML+CSSFinland
JEE6Vijay SNNov 28, 201586%145/160 90%-Wireless Phone CompanyImprove Architect SkillsIndia
JEE6Efthymia ArmanidiJune 2, 201571%149/160 93%-Team DoctorITILGreece
JEE6Rodrigo CayresOct 19, 201581%153/160 96%-Big Smokes Cigar ShopOCEJEE6JSFD (JSF)Brasil
JEE6Vijaya RaghavaSept 26, 201581%143/160-Team DoctorPMP, HadoopIndia
JEE6Claudia ArévaloJun 25, 201588%153/160StoryFactory HomesTOGAFColombia
JEE6Heliton Rodrigues Aranha FilhoApr-30-201573%NA (JEE5 Upgrade)http://www.coderanch.com/t/650230/java-Architect-OCMJEA/certification/Certified-OCMJEA-finallyNA (JEE5 Upgrade)TBDBrazil
JEE5K. TsangMar 4, 201589%144/160part1 part2/3Quick Computer-Hong Kong
JEE6Mike DegteariovMar-31-201578%151/160-Team DoctorHadoopCanada
JEE6Bora SevenMar-12-201571%140/160StoryBig Smokes Cigar ShopTOGAF9Turkey
JEE5Heliton Rodrigues Aranha FilhoOct-18-201471%141/160http://www.coderanch.com/t/650230/java-Architect-OCMJEA/certification/Certified-OCMJEA-finallyFactory HomesTBDBrazil
JEE6Rahul SharesthSep-19-201483%141/160-DreamcarTBDIndia
JEE6Mahavir SinghAug-10-201471%140/160-Utility InternationalImprove Architect skillsIndia
JEE5Anuj SethiJul-1-201490%141/160-Team DoctorImprove architect skillsIRE
JEE6Raffaele SangiovanniMay-1-201480%153/160-Wireless Phone CompanyScrumITA
JEE5Pothiraj MarichamyMar-1-201495%P-Team DoctorTBDUSA
JEE5Uma Monday2014-02-2895%145/160-Gemstones InternationalTOGAF9USA
JEE5Sirish K Somanchi2013-06-1178%152/160-Team DoctorTOGAF9India
JEE5Marco Bresciani2013-01-3164%134/160-Wireless Phone CompanyRuby and RoRItaly
JEE5Subrahmanyam BV2012-12-1589%152/160-Team Doctor-India
JEE5Sachin Dixit08-Dec-201278%144/160-Team DoctorPMPIndia
JEE5Diego Lins de Freitas11-October-201285%140/160-Quick ComputerIEEE - CSDPBrazil
JEE5Juan Gonzalez del Pino11-October-2012PPStoryGusher OilNot sureSpain
JEE5Chandra S Billanuka15-July-2012PP-Wireless Phone CompanyTBDUSA
JEE5Chennakrishna R Gottam29-July-2012PP-Gusher OilPEGAUSA
JEE5Srinivasulu Kopparapo06-July-2012P71%"Here"Gusher OilJava Enterprise Edition Certified MasterUSA
JEE5Sudha Sundar18-Feb-2012P153/160HereGusher OilOracle IT Implementation Specialist, PMPUSA
JEE5Neeraj Javiya21-Jan-2012PPHereTeam DoctorTBDUSA
JEE5Mahesh R. Desai12-Dec-2011PP-NA (JEE5 Upgrade)Oracle Linux Fundamentals, PMPCalifornia, USA
JEE5Sada Kurapati22-Dec-201195%146/160Part I StoryGusher OilTOGAFUSA
JEE5Mahesh R. Desai12-Dec-2011PP-NA (JEE5 Upgrade)Oracle Linux Fundamentals, PMPCalifornia, USA
JEE5Eric Manuguerra04-Oct-201185P-Factory HomesTBDFrance
JEE5Mayur Bodkhe27-Sep-2011P143/160-Wireless Phone CompanyTBDUK
JEE5Sankha S Pathak27-Aug-2011P155/160-Wireless Phone CompanyTOGAFINDIA
JEE5Vignesh Murali Natarajan21-Aug-2011100P-Big Smokes Cigar ShopPMP?India
JEE5M. A. Riveros T.21-Aug-2011PP-DreamcarTBDColombia
JEE5Jari Timonen29-JUN-2011PPPart1Factory Homes-Finland
JEE5Roxana Crisan17-Jun-201193P-DreamcarTBDRomania
JEE5Tan Chin Sheng12-Jun-201196P-Factory HomesTOGAF9Singapore
JEE5Ashutosh Sharma29-Mar-2011PPHereBig Smokes Cigar ShopTOGAF9USA
JEE5Martin Zisler19-Jan-2011PP-Gusher OilJEE6 WebservicesSwitzerland
JEE5Wolfgang Unger21-Dec-2010PP-Big SmokesHoliday in BrazilGermany
JEE5Jeanne Boyarsky17-Nov-201087PHereFactory HomesTBDUSA
JEE5Rupesh Kumar17-Nov-201082P-Dream CarTBDUSA
JEE5Sylvain Duchesne12-Nov-2010PP-Dream CarSCEA for Java EE6 - UpgradeCanada
JEE 5Ravi Iyer21-Oct-2010PPStoryFactory Homes-India
JEE5Kuppusamy Venkatasubramanian19-Jul-201085PHereDream CarTBDSingapore
JEE5Varun Chopra03-Mar-201096PStoryFactory HomesTBD-
JEE5Jose Luis Iturbide24-Apr-200971PStoryFactory HomesSpring & AndroidMexico
J2EEGabriel Belingueres30-Dec-20088591-Fly By Night--
J2EEStefan Meier29-Dec-20088977StoryFly By NightSCEA5 Upgrade-
J2EEMahesh R. Desai12-Dec-20088189StoryFly By NightSCEA for Java EE6 - UpgradeCalifornia, USA
J2EEPaul Michael5-Nov-20089177StoryFly By NightFlex or .Net-
J2EEAbhinav Srivastava6-jul-20088995hereFly By Night --
J2EEAshish Sarin15-Aug-20087092hereFly By NightTOGAF-
J2EEPatrick Williams14-Nov-20078587StoryFly By NightSCJD & Upgrades-


Other Java Certification Wall of Fames

SCJA Wall of FameSCJP Wall of FameSCJD Wall of FameSCBCD Wall of Fame
6 hours ago
Please be aware, that GitHub is experiencing problems (seem to be serious) over the day https://status.github.com/messages

Website isn't consistently accessible. Services don't get synchronised with other platforms. etc...
1 day ago
I see..

I had also few problems with system freeze. Mine problem was (at least I think and didn't experience again), that I used to use caffeine app to prevent computer going to sleep in any way (hdd sleep, screen sleep, etc.), so this app didn't work after system upgrade, so every time computer screen went to sleep, or screen saver went on, computer got frozen.

So what I did: turned off screen saver (don't need them), turned off hdd sleep after X minutes, turned off screen sleep after X minutes (anyway I liked always keep my mac with caffeine on) - and didn't experience any freeze again.

Anyway, you are right, but I'm expecting some update any time soon, so the issues would be addressed. This has been true with almost all releases of macOS. The difference is, that problems disappear after some time, while on MS Windows they grow like mushrooms after the rain, and unfortunately barely somebody picks them.
1 day ago
Sresh Rangi and Gerard Charles, will get back to you later... seeing some good comments
1 day ago

Piet Souris wrote:I also had a look at your code. My first impression is that I get a sense of over-desinging here and there, making things more complex than necessay. Perhaps it is the modern way of dong, I don't know, but for instance this Builder.build() looks a bit cumbersome.
...
About the RegenerationRules, why do you fix the 2 and the 3, given that the class is final? I had a similar class, with two fields: List<Integer> stayAlive and ditto: becomeAlive, that were parameters of my constructor.


Yes, probably it was over-designed here. It was really a wacky builder pattern implementation (with an idea to augment), which in turn served very little.

The thought behind that was, that I took some hypothetical future requirement of some extra rules let's say:
And I thought I could let them change over the moment in time...
But since I did not attempt to implement non of these extra's, I most likely over-complicated without seeing obvious deficiencies and went down the wrong route. Yet more experiments to come. Thanks!

Piet Souris wrote:...determine the neighbors of a Location... but that method is not foolproof...

Good point, missed it. Thanks for the comments!

Piet Souris wrote:But please report your impressions at the GDCR with your code!


Indeed these were my goals to have some prior experiments done as my homework, so could have more productive time there after being fallen to few traps already!
1 day ago

salvin francis wrote:I looked at your code a bit more in-depth today and the following questions came to my mind :

  • Why can one not instantiate World ? The only way you are allowing is via a empty() method which generates according to a fixed SIZE of 10
  • Why is World square ? (as in number of rows=number of columns)


  • Well, one CAN instantiate world, and that is exactly through a method empty(). I think it is expressive and tells what one can expect from such a created world, meaning the world to be empty.
    At this stage I did not concentrate much on such aspects as world's height, width, shape.. I might do care about them when I come to the moment of GUI need and in particular if I would want users to be able to set world size, but once again, at this stage my main goals were to experiment with design decisions, and so the different aspects of code could be tested throughout without exposing much/or at all of their internals, or in isolation if we can call it like that.

    salvin francis wrote:
    I see that you have implemented this as a fixed world with cells which are either Alive or Empty. The way I approached this was that I made an implementation which only kept Alive cells. There were no "Empty" cells.
    Actually this is what fits in the real world philosophy too. In real life, we would observe a 'petri dish' with some cells. These cells would grow/die depending on various conditions, the 'petri dish' is their domain/world. With the implementation of "Empty" it looks like the world has some "slots" where a cell can reside or not.

    Just food for thought


    This your thought made me stop and think for a while. Sounds reasonable what you say. I see the way to avoid EMPTY and have only ALIVE, I'll try such approach as haven't tried yet. Thanks!


    NOTE: (to those who follow)... The main reason of mine to start this project was/is to experiment with various designs implementing this game. I wouldn't say there is obviously good or obviously bad design(s). And I wanted to try some of these (designs) before I attend GDC event, so I would have some of my own prior experience in order to be more productive during the event.
    1 day ago
    First, pie slices to those who haven't got yet!!!

    Some interesting points floating around, which in turn already allowed me to see some deficiencies with my current design. I need to absorb/experiment with each of these first.

    But even now, I already can say a big thanks for your time and constructive criticism - I'll get back to each of you (salvin, Piet, Sresh), either late night today or other day once manage to spend some time on it.
    1 week ago
    In case somebody reads, one of my colleague here, Stephan, raised some concerns (behind the hood, within GitHub platform) regarding the topology, where I mixed up two different contexts Location and Direction into one - Location, and as a result represented directions where to move in order to find neighbours by reusing Location class (and that is bad), which actually represents an absolute path within a world map. So separated these lately and now there are Location and Direction (appear as an inner enum as it is needed just there for the moment).

    Another point we discussed that I have an enum Cell which implements (/-ed actually) Mutable interface. And there he had a point. Enum is an immutable from Java's stand point, and to implement Mutable interface was a bit odd, even though the ideas underneath didn't clash much as simply two different domains interfered Java's (immutable enum) and automaton game (where cell mutates). As a result I renamed Mutable idea within the domain entirely, so it became:

    Mutable -> Regenerable
    Mutable.mutate() -> Regenerable.regenerate()
    MutationRules -> RegenerationRules


    And these make much more sense now. Thanks to him.

    However, we still got an argument whether to represent Cell as an enum is a good idea. Maybe to have Cell as a regular class with an inner enum State ALIVE, ETC... would be better. I must say I had implemented that 2 days ago - well, more experiments to come.

    It is very interesting little project to work on.
    1 week ago

    salvin francis wrote:I ran that program and it just printed a huge log of dots and zeros !!!
    Even a simple JFrame with a single textarea would be great.


    Yet again, first of all, thanks for reviewing it.

    Yeah. Agree, it isn't user friendly and much interactive yet. But I have created for myself an enhancement item, so at some point will get it done.

    However, at this stage my main goal was to come up with a design so it would be simple to understand, easy enough extend and very importantly to test. Tried to keep separate pieces responsible as much as their need to be responsible for, so changing something I wouldn't need to rewrite tests from scratch and similar. Interesting, but initially that was exactly my experience. Started with semi TDD, thought came up with a fairly nice approach, however, trapped to a situation, that I was not able to test everything without exposing objects internals as for instance Location class was relying on World's internal data structure to count alive neighbours around, and I did want to have minimum getters, minimum mutation... etc. So most of the time such figuring out design, but I'll have time for GUI, just my designer's skills aren't anywhere great.

    salvin francis wrote:I am glad to see that your glider "wraps-around" the world.


    Yep, since all action happens on an infinite grid, I was looking for the way to put this concept in place.

    Thanks for comments.

    salvin francis wrote:minor suggestions: Maybe World.SIZE could have an access modifier (probably public) ?


    Nah Stephan some time ago suggested, and once again re-read Effective Java by Joshua Bloch, so basically I give visibility as much as it is needed and no more. On that point of view, I'd prefer that even interfaces would provide an ability to implement package-private methods, as sometimes (and I faced this situation too), I exposed method (meaning had to make public) without real need of that, i.e. Cell.mutate() is public, while perfectly could work with package-private visibility.
    1 week ago

    Jeanne Boyarsky wrote:In World, the indentation of this code misleads about what it does. Since the two forEach() statements are aligned, they imply that they are operating on the same stream.


    First - thankful for a review and comments.

    Agreed. Indentation was misleading. With streams kind of can get messy when always aligning by the dot ".". I simply now just let IDE to format for me based on by default pre-configured its rules.

    Jeanne Boyarsky wrote:More importantly, calling map.put() in a forEach isn't good practice. Is there any reason you can't use a collector which would dispense with the inner forEach() entirely.


    That's a good one! I was so concentrated on design, so got less than optimum at other points. Initially I simply had 2 habitual loops, so later decided to replace with forEach, hence got horrible blocks. Just refactored to use collectors you suggested in empty(); nextGeneration(); methods, indeed much better as it hides internals how data structure gets populated. However, a bit struggled until remembered how to do it with specific Map's implementation.

    Jeanne Boyarsky wrote:I'm not a fan of the default method in Mutate. It feels like a hack since it isn't used for legacy code.


    Well. I was researching about default before attempted to use it. To my disappointment, since Java moving towards modernising herself, I don't understand why default is so implied to be used only for legacy code. It is such a nice feature to have in my opinion (makes even slimmer gap between interface vs abstract class) and it fitted perfectly to my idea. Upon hypothetical requirements change mutable(s), i.e. Monster just need to implement that interface without providing any extras; and define their mutation rules. I'm not up (convinced yet) for removing it and implementing this method in the very same way in each and every concrete Mutable implementation.

    Thanks for the comments once again!
    1 week ago

    Junilu Lacar wrote:If I had a collection of Book objects, would bookList.toArray(Book[]::new) be easier to read than bookList.toArray(new Book[0])?


    With no doubts. new Book[0] is confusing as hell to me, because it gives an impression that it will create a 0 length array, and since we know arrays can't expand, it gives a feeling while Book[]::new suggests me that it will create an array of the needed size whatever that size might be, which in fact I don't need to know. That's how my brains interpret that.
    1 week ago
    Hello Ranchers,

    For a long time I was fascinated about this project, but never attempted to implement it myself. That's changed.
    So decided to create a personal construction site and work at it to practice and experiment with various design decisions implementing this cellular automaton.

    For the past 3-4 days I wrote and re-wrote.. this project countless number of times (small portion of commits history recorded).
    The version I have currently is something I think I could try to justify why I have it like that, and to what angle it has flexibility to offer so I chose to implement it that way.

    However, do extra pairs of eyes see some illogical design decisions, or have tips what to think about how this could be improved further to avoid some potential limitations I could face when some hypothetical requirements change?

    Don't get fooled by the width of the project (only very few source files), but it really taught me many lessons already, and I believe it will again.

    From the very first versions I came up with, this recent version I think got shorter twice, I think it has more flexible design, it was way easier to test and achieve good enough test coverage. I'm currently at a stage when I need some subtle tips to move on further refinements (or.. fixes).

    Please find project implementation at my GitHub area. For those who don't know the mentioned project, please read the description on Wikipedia.

    Thanks.
    1 week ago
    Software craftsmanship events worth knowing, attending...

    (sorted by the 'when' in an ascending order)
    NameWhenWhereAbout
    Hackathon~Mid of October (lasts 1-2 day(s))Physical attendance. Facilitated all around the world.A design sprint-like event in which computer programmers and others involved in software development, including graphic designers, interface designers, project managers, and others, often including subject-matter-experts, collaborate intensively on software projects.
    Global Day of Coderetreat~Mid of November (lasts 1 day)Physical attendance. Facilitated all around the world.Intensive practice event, focusing on the fundamentals of software development and design.
    Advent of Code~1st Dec - ~25th Dec (25 days long)Online attendance.Fun series of small programming puzzles for a variety of skill levels.
    1 week ago
    And modulus really help you to extract digits.

    Think how dividing and using modulus operator you can extract individual digits. Brute force way to understand is to get calculator and play a bit (with some pretty predictable numbers to use for division, modulus) and see what you get.
    1 week ago