Liutauras Vilda

Sheriff
+ Follow
since Nov 12, 2014
Merit badge: grant badges
Forum Moderator
Liutauras Vilda currently moderates these forums:
For More
London, United Kingdom
Cows and Likes
Cows
Total received
In last 30 days
2
Forums and Threads

Recent posts by Liutauras Vilda

Joey Pittman wrote:The term redneck started


For everyone started differently. For me it started back in 1997 with a first-person shooter game called Redneck Rampage.
2 months ago

Campbell Ritchie wrote:many of those old threads still contain useful material


Over the time they will be even more useful. Think written by humans.
2 months ago

A Tham wrote:I am using Spring and Java for a web application
...
But I some users still get the same billingNo when they access it simultaneously.


Is the same service, i.e. same Spring application accessing db simultaneously? Or different services of web application share the same DB?
2 months ago

Campbell Ritchie wrote:Congratulations, everybody


Congratulations all. Campbell seems regained 1st place.
2 months ago
Would be better if you'd show some code, as Tim said, that would help to visualise the stuff.

Moving this to more appropriate forum (from Beginning Java).
3 months ago
Campbell been pushed down as well by one place. What's going on.
3 months ago
Here is another take how you could get yourself up to speed.

Get the drawing board out (your company used app or some free), and try to draw application at high level, so you could see which components talk to which, what they are responsible for, that way you'd get boundaries defined your application or specific parts of code you are interested in operate at.

Now, from the diagram and understanding you have built thus far, you can take a specific component(s) and drill down more and draw yet another diagram(s), but this time at a slightly lower abstraction level.

The important thing to mention, this exercise would be beneficial not just in understanding application/system that is new to you, but also would be useful when you'd need to extend it, maybe integrate with other system.

Needless to say, that would be useful to any new joiners like yourself. Diagrams (think design documents), regardless for how complex or simple features they are, of course best if they are drawn and exercised, meaning discussed with the team upfront, before any development takes place, that way, at least in my experience, is saved a lot of time in development phase, because most of the problems get solved before you even write a single line of code. And you face significantly less surprises. Some you still can't avoid.
3 months ago
Phillip, my suggestion would be do not leave code in such state, but rather refactor it and make it a bit more readable.

At the moment method(s) are quite long so it is hard even to pinpoint the relevant area that you addressed or needed to be addressed. Ideally, you should have come to us and say, look, this 3 line length method misbehaving for me, you get an idea

Try to work on that if you fancy, so you are prepared for any other surprises that may come.
3 months ago

Alex Werdefroy wrote:questions had syntax or formatting that I had never encountered before


And hopefully you won't encounter anymore. Tell them off if you do. Congratulations!
I don't have android, but anyway, I found one test failing by looking to screenshot - log messages alignment.
4 months ago

Mike Simmons wrote:Well, I wouldn't say it's a CodeRanch post editor problem.  It's user error. :p


Absolutely, that's why I edited my post earlier to acknowledge that. But what I learned, I don't know even how to copy a single method from IDEA and have it well formatted. If you copy method heading with leading spaces, then the whole thing gets shifted to the right, so one or another way, need to do some pre-formatting before putting code into CodeRanch editor.
6 months ago
Copy/Paste result of above

6 months ago

Mike Simmons wrote:Given Bruno's code example


It's a known CodeRanch post editor behaviour, erm... yep.

If you'd go to IntelliJ, copy some method (single method within the class) and paste it to post editor and click view, you'd see that braces get shifted slightly to the right, like Bruno showed, while actually what you copied is indented in a bit more habitual way, i.e. like in screenshot.

[Edit] CodeRanch post editor behaviour. Myself looking to screenshot more, I think it is just the way stuff gets copied within IntelliJ. As seen, method heading gets copied without leading spaces, while the body of the method with leading spaces and this is what you get in the post here...
6 months ago
Sorry, I misread Tim's post. Actually he explained all that already.
6 months ago
This is where the picture probably speaks most. But let me try also to navigate you in textual way.

Settings > Editor > Code Style > Java > Wrapping and Braces (tab) > Braces placement > click on "End of line" and choose "Next line", I think.

But anyway, regardless that a lot of people use one or another way, I'd think (not proven scientifically), a default way is preferred in professional environment.
6 months ago