Anyone with a bit of experience to know the right questions to ask can now code in any language or platform.
$csv = array_map('str_getcsv', file($argv[1]));
And this is the result: const csv = readFileSync(filename, 'utf-8').split('\n').map(line => line.split(','));
You can't parse CSV this way, because you need to respect delimiters. Counter example: 1,"1,5",2
"1,5" being the German notation for "1.5". Hence, a simple split(',') will break this thing.PHP's str_getcsv is, of course, a proper CSV parser and not a string splitter. Unless your code uses basically zero stdlib API calls, you will have to double check everything.
Please note that this kind of bug isn't even easy to catch if you test CSV file doesn't contain a quoted entry.
$csv = str_getcsv(file($argv[1]))
Would make it easier.That is why when Rausis(https://www.chessgames.com/perl/chessplayer?pid=14248) rating was approaching 2700 in his 50s everyone was very suspicious.
It is partially due to the incredible levels of stamina required to stay on top of the game for 4-6 hours.
Also as Kramnik said when he was retiring, you start making strange(read wrong) decisions suddenly.
Learned absolutely loads - far more than sitting down with a book and trying to learn from that. Not least because I’ve tried before and quickly lost interest.
Instead I’ve learned the basics and made a working web app, which I’m pretty pleased with.