Rob Bank wrote:Can I check if you are in C# mode? Seems var is not a Java syntax.
And RaceResult parse does not accept path so do you mean;
This does not printf anything but neither do I get any direct errors so I'm thinking this could work once I figure out how to correctly implement some modifications I did to Participant to more accurately match my app objectives.
Lightbulb, I think I get the intension of path in RaceResult. It enables a main shortcut like;
Tim Holloway wrote:1b. GUIDs are HORRIBLE database keys. They're effectively long random strings, so you cannot slice a database according to any logical function. Which can interfere with optimization and housekeeping.
They have no inherent sequence, so you'd better have at least one other unique chronometric field in the table if you want to be able to access by order added.
Use GUIDs as, say, invoice ID numbers and see how customers react.
The one thing GUIDs are good for is (virtually) ensuring that every record in the table has a truly Globally Unique ID, regardless of where it was originally created. And that's a great help when you have a system with multiple feeds, but not for most other applications.
2. Who passes around random number generators? Unless you are specifically looking for repeatability of "random" numbers on a per-thread basis in a multi-threaded environment, one RNG is all most people need, and there's no need to instance it.
3. See Item #2. It's even less likely that you want multiple instances of a generator for a blockchain. [...] Having more than one generator defeats the whole concept.
Which reminds me. The most popular logging classes also use static accessors to obtain the logger instance. Because, again, that avoids the need to explicity inject or construct them.
Rob Bank wrote:Those concepts aside, I'm still stuck on the usage of lineOfCsv in the Participant class and path in the RaceResult class and how they relate.
As I see it, RaceResult invokes Participant participant. There is no invoking the other way around. So, after I in my main class do Participant.parse(lineOfCsv), RaceResult can operate on my data parsed into Participant. Hence, what is the intention of the RaceResult class reading path?
What seems most logical to me (still not knowing what to do with RaceResult's path) would be to (in my main class) do [...] where I get errors like Cannot make a static reference to the non-static method participants() from the type RaceResult
Tim Holloway wrote:An extremely common case would be where you have a single-threaded app who is the sole writing client to a database where the primary key is a sequence number.
Another case would be if you needed a random number generator. Mathematical RNGs (see Knuth) start from a seed and each successive value is produced based on the preceding value. Which, of course means that they aren't truly random, but that's immaterial.
A more complex case might be a blockchain generator, where the last block is referenced by the next block to be generated.
That's the only sanctioned way to obtain such useful things as the HttpServletRequest, HttpServletResponse, HttpSession objects, [i]etc.[i] within JSF.