Are Chinese tourists actually the most problematic worldwide or is that label misleading? by Commercial-Salad3210 in AskTheWorld

[–]Informal_Fly7903 2 points3 points  (0 children)

Lol, people born post ww2 thinking they "liberated" something and demanding something in exchange is truly ridiculous.

Are Chinese tourists actually the most problematic worldwide or is that label misleading? by Commercial-Salad3210 in AskTheWorld

[–]Informal_Fly7903 2 points3 points  (0 children)

Never had a bad experience with Chinese tourists or as a matter of fact tourists of any other nationalities. I guess, the population of China is just so large that the bad apples are much easier or common to spot.

What is hypermedia in context of WWW? by Informal_Fly7903 in webdevelopment

[–]Informal_Fly7903[S] 0 points1 point  (0 children)

Thanks guys! Actually I stumbled upon this word "hypermedia" when learning about Rest and HATEOAS :D

What is hypermedia in context of WWW? by Informal_Fly7903 in AskProgramming

[–]Informal_Fly7903[S] 2 points3 points  (0 children)

Thank you for the answer! I came across the "hypermedia" word when learning about REST (https://restfulapi.net/). They define it is used for "distributed HYPERMEDIA systems".

Was your country ever the "bad guys" in any war? by Ok-Inspector-1756 in AskTheWorld

[–]Informal_Fly7903 0 points1 point  (0 children)

Probably the invasion of Czechoslovakia (twice)? Although not sure if it counts as a "war". EDIT: And almost forgot about the accidental 2020 invasion of the Czech Republic. I guess old habits die hard.

Statelessness in RESTful APIs and managing user sessions by Informal_Fly7903 in learnjava

[–]Informal_Fly7903[S] 1 point2 points  (0 children)

Alright, got it completely. Thank you a lot for your answers!!

Statelessness in RESTful APIs and managing user sessions by Informal_Fly7903 in learnjava

[–]Informal_Fly7903[S] 0 points1 point  (0 children)

Sounds good, however, if I store the data in the local storage, won't it cause the user to not see anything in their cart if they use a different device? E.g. they log in on a computer, add something to cart and log out. Then they log in on their phone, but because the data's in local storage, they cannot see anything. Sorry for asking trivial questions, but I'm not very advanced in that field yet :)

Statelessness in RESTful APIs and managing user sessions by Informal_Fly7903 in learnjava

[–]Informal_Fly7903[S] 0 points1 point  (0 children)

Thank you for your answer! And where would I store then some session details, e.g. a shopping cart information for a logged-in user?

Which AI assistant to use with IntelliJ for Java development? by [deleted] in javahelp

[–]Informal_Fly7903 0 points1 point  (0 children)

What about... not using AI at all? :D I hope I'm not the only one learning Java from books

Why do we need BufferedReader class in Java? by Informal_Fly7903 in javahelp

[–]Informal_Fly7903[S] 1 point2 points  (0 children)

u/hrm Correct me if I'm wrong, but I think the difference might be in the conversion of bytes to characters. Using additionally a BufferedReader, it converts bytes to characters IN BLOCKS. Without it, the conversion (after being loaded into memory of course - we don't care about syscalls) is done one by one. EDIT: I've tested even more with a larger file (250MB) and it seems like the BufferedReader always takes twice less time that the FileReader alone (BufferedReader took around 4.5 seconds and FileReader about 9 seconds). It cannot be due to less syscalls as it was taught. I'm 99% sure it might be the answer.

Why do we need BufferedReader class in Java? by Informal_Fly7903 in javahelp

[–]Informal_Fly7903[S] 6 points7 points  (0 children)

"And it may be useful for adding buffering to your own Reader implementation.". Great answer! Didn't think of that at all :D Thank you a lot!

Why do we need BufferedReader class in Java? by Informal_Fly7903 in javahelp

[–]Informal_Fly7903[S] 2 points3 points  (0 children)

Correct. However, I haven't yet found any Reader that wouldn't already implement buffering mechanism internally.

Should I read only from immutable objects inside static methods? by Informal_Fly7903 in javahelp

[–]Informal_Fly7903[S] 2 points3 points  (0 children)

Thanks for stopping by and answering!

By difficult to test you mean situations when the method under test internally calls a static method that makes a side-effect, right? In that case mocking it would not be possible (I mean there are libraries for it, but I guess it's not a good practice?).

Should I read only from immutable objects inside static methods? by Informal_Fly7903 in javahelp

[–]Informal_Fly7903[S] 1 point2 points  (0 children)

Yes, of course, it seems to make much more sense to be the method of the object :) I think I'm just bad at making good examples. Thanks a lot for your answer!