Practising coding can be fun, I guess
I have found recently that there are many websites you can practise your coding and get some feedback about your coding.
I first started do Jquery, AngularJS and Javascript tutorials at https://www.codecademy.com/learn But I get frustrated when you just use if and loops in simple cases over and over again. Good alternative is Codingame where you can do the code games with 20 different languages.
I have been doing Codingame.com games and I’m now finished 91% of easy games with Javascript. The problem with my codes are that they are correct and pass most of the test but fail when there is large data set ie. they are too slow to run for the checker.
I have had difficulties with functions in past. I always was ok with coding courses when we wrote “linear code” but when it was time to use functions / classes in Java / C I was totally lost. Now I noticed that I can write functions easily and use them but my pitfall is loops. I need to optimise them and find ways to not use them when they have to go through 10000 values.
Like here is my not very sophiscated code for comparing file extension to get MIME type.
function getType(name) { var paikka = name.lastIndexOf("."); //printErr(typeof paikka); var mime = "UNKNOWN"; if (paikka >= 0) { var end = name.substr(paikka+1,10); end = end.toLowerCase(); for (var k in EXT) { if (end === EXT[k]) { mime = MT[k]; break; } } return mime; } else { return mime; } }
There other similar websites than Codingame but I haven’t tested them yet:
Ruby Warrior
Code Combat
https://code.org/learn
Code Hunt
Fight Code
Code Monkey











