Due to father’s day and my birthday, I skipped coding during weekends 🙂
Day 15: Work (Animated banner)
4th of September
This section will be filled with my GIF image of web animation.
Day 16: Work (Animated banner) & Eloquent Javascript Exercises
5th of September. Again, the GIF will be filled up. Geh. Why my work is so dragging me from doing something fun.
By the way, I have been very thirsty to back to more fundamental stuff. That is why I join to NodeGirls’ coding dojo session. I have been in multimedia, content production & web dev industries. What I have to chase up is learning new framework or tools. I have used JavaScript for 2 years almost but it was all about having myself to adjust to libraries or framework. I started to throw questions to myself. Am I confident to JavaScript on to really deep fundamental level? I know answers. It is unfortunately no. Am I a rare lazy ass to end up like this? No. There are a lot of people like me but we are so invisible in the industries. Well, I guess people, of course, don’t want to expose their obstacles in the professional field. I don’t blame that because I do know how it feels once you share your point of honest thoughts along with your own struggles, starting to become Achilles hills.
Besides of coding dojo, I also started to massage my brain into fundamental JavaScript. I have three JavaScript books. “Eloquent JavaScript” (Oh, if you want, you can also read the content from the website. I highly recommend to buy the book though), “JavaScript and jQuery interactive front end web development book http://javascriptbook.com/” and “beginning JavaScript”. I think this is a good chance to review JavaScript quizzes from the books that I have again.
I picked up the eloquent JavaScript as the first re-read starter.
Below is my code solution to the quiz called “Fizz buzz”
for (i=1; i<20; i++) { for (i=1; i<20; i++) { if(i%15 ==0) { console.log("FizzBuzz"); } else if (i%3==0) { console.log("Fizz"); } else if (i%5==0) { console.log("Buzz"); } else { console.log(i); } }
Well, That is easy fizzy 🙂
Day 17: Work (Animated banner) & Eloquent Javascript Exercises
6th of September
Below is my solution to the quiz “Hash triangle”
var note = ''; for (var i = 0; i<7; i++) { note += '#'; console.log(note); }
Day 18: Work (Animated banner) & Coding Dojo
7th of September
I attended the Thursday coding dojo session. I was at the intermediate session and the session was about refactoring the code clearer.
If you want to try to clean the code by yourself, here is the code source you can see.
https://github.com/node-girls-australia/coding-dojo/tree/master/katas/tennis-refactoring-kata
Day 19: Coding Kata submission to the dojo session and my code solution on it.
8th of September
Half of day, I worked for my current main job. Rest of the day, I was looking for beginner kata source.
So today I found good quiz from eloquent JavaScript and submitted my quiz to here
https://github.com/node-girls-australia/coding-dojo/commit/fd8aef223c67510dee1031a66b6b88de5b51bee9
Below is my solution to the quiz “chess board”
var boardSizeEach= 8; var boardFilling = ""; for (var yAxis = 0; yAxis<boardSizeEach; yAxis++) { for (var xAxis=0; xAxis<boardSizeEach; xAxis++) { if((xAxis + yAxis) % 2 == 0) boardFilling += " "; else boardFilling += "#"; } boardFilling += "\n"; } console.log(boardFilling);
Day 20: Eloquent Javascript Exercises
9th of September
Reversing an array(http://eloquentjavascript.net/04_data.html)
Not quite solved. I don’t know what I’ve done wrong on my code.
http://jsbin.com/mubobiv/edit?js,console
function reverseArr (arr){ var newArr = []; for (var i=0;i<arr.length; i++) { newArr.unshift(arr[i]); } return newArr; } function reverseArrInPl(arr) { var temp = []; for (var i = 0; i < Math.floor(arr.length/2);i++){ temp[i] = arr[i]; arr[i] = arr[arr.length -1 -i] = temp[i]; arr[arr.length -1 -i] = temp[i]; } return arr; } console.log(reverseArr(["A", "B", "C"])); var arrValue = [1,2,3,4,5]; reverseArrInPl(arrValue); console.log(arrValue);
Day 21: Eloquent Javascript Exercises
10th of September
A list (http://eloquentjavascript.net/04_data.html)
http://jsbin.com/gafasi/edit?js,console
function arrayToList(array) { var list = null; for (var i = array.length - 1; i >= 0; i--) { list = { value: array[i], rest: list }; return list; } } // console.log(JSON.stringify(arrayToList([1, 2, 3, 4, 5]))); console.log(arrayToList([1, 2, 3,4,5]));