100 Days of Code Day 75
I did the exercise ‘Armstrong Numbers’ on the Javascript track because it was easy and I only have two hard ones on the C# track. That way if I start one of them and can’t finish in a day I still have something to submit.
I had problems with this one. The number quickly got too big. Javascript started keeping it in scientific notation with limited accuracy. I thought counting down from sum to zero would help but nope (still kept it).
I found BigInt which allows for more decimal places. Unfortunately Math.pow(a, b) wasn’t accepting BigInts(). Eventually I made my own Math.pow for BigInt values and it worked.
After submitting my code I looked at community solutions and saw I could have just said a ** b instead which does work for BigInts. I did a quick revision and submitted that. They must have updated this one because there were a lot of community solutions that no longer worked. I bet the BigInt requirement was added that broke other people’s code.
I then went and started the React exercise on the C# track and got sucked into it. I had it almost working just off by one test. After going around in circles I decided to submit it and see what the difference was. It wasn’t much. Just one exercise left on the C# track. Tomorrow I should do the React exercise in Javascript. I have a feeling it may be quite a bit different.
The Chip (Part 2)/Freakazoid is History
- Roddy MacStew: At least let the lad go!
- Guitierrez: No, I cannot.
- Roddy MacStew: Why?
- Guitierrez: Because he tasks me! He tasks me! ’round the moons of Snivia, I chuckle at thee. Beyond the Corpian clouds I chuckle more at thee. Revenge is a dish best served with pinto beans and muffins! Kirk, old friend, I… Oh, sorry. [He fixes his tie.] Good-bye.
Just one left and I couldn’t let it be, as Guiterrez said it tasks me (Yes I know it is a Star Trek II reference which in turn a Moby Dick reference).
So I did it, I was going to start it and finish it tomorrow. Again I got close and I just went for it. So FOUR YEARS in the making….. I have completed the C# track. Halleluiah!

