100 Days of Code Logs

100 Days of Code Logs

As the days progress I will keep this blog post up to date as a change log to keep track of what I did on each day of the challenge.

Index:

  1. Day 0: January 1st
  2. Day 1: January 2nd
  3. Day 2: January 3rd
  4. Day 3: January 4th
  5. Day 4: January 5th
  6. Day 5: January 6th
  7. Day 6: January 7th
  8. Day 7: January 8th
  9. Day 8: January 9th
  10. Day 9: January 10th
  11. Day 10: January 11th
  12. Day 11: January 12th
  13. Day 12: January 13th
  14. Day 13: January 14th
  15. Day 100: April 8th

Day 0: January 1st

Today I started and finished a Calculator Project using Plain Javascript, the main challenge were not the operations but working with the UI. Some of the main problems were:

  • update the numbers typed in and the result at the right time
  • get the right values from the button
  • differentiate between numbers and operators as well special operators (=, remove)
  • validate the input so that the app doesn’t end up with multiple operators (ex: +++-4)

I have to say that day after day, I’m starting to feel more comfortable using Javascript with ES6 syntax.

See the Pen Calculator in plain Javascript by Alexander Luna (@mr-moon) on CodePen.



Day 1: January 2nd

Today I worked on the Ruby Exercises from The Odin Project (found here) and completed them all. I also completed the first 3 exercises of The Euler project. While working with Prime Numbers in Ruby I noticed that the Prime Number validator Prime.prime?(n) is actually slow and I spend some time reading the Ruby language repository and found out that their algorithm to determine whether a number is a prime or not is about 3x slower than the algorithm I found on the internet while searching for better algorithms. I compared the build in prime method from Ruby with this algorithm:

def isprime?(n)
  return false if n ==1
  return true if n == 2 || n == 3
  return false if n % 2 == 0 || n % 3 == 0

  i = 5
  w = 2

  while i * i <= n
      return false if n % i == 0
      i += w
      w = 6 - w
  end

  return true
end

I tested both Prime.prime?(n) and isprime?(n) with 1,000,000 numbers, the results are quite surprising:

ruby prime_tester.rb
(Prime) Time to complete (1 mil): 9.670435
(Prime) 78498 prime numbers found

(isprime?) Time to complete (1 mil): 2.173219
(isprime?) 78498 prime numbers found

This might be a future contribution to the Ruby Language but for now it requires more testing.

And that wraps up day 1

Day 2: January 3rd

Today I spend most of the time building a blog using Ruby on Rails 5. I already have experience building apps using Rails 4 which I’m currently using in production which is why I’m working on upgrading to Rails 5. The is live available thanks to Heroku here: https://immense-cove-36319.herokuapp.com/

Day 3: January 4th

I build a Pomodoro clock with a graphical user interface in pure Javascript. I like the idea of a Pomodoro clock and would like to make a desktop version using electron in the coming days. More on that later.

As I mentioned in a previous post I was working on a contribution to the Ruby Language to reduce the Prime:prime? processing time. Currently my pull request is still pending but it passed all local tests and specs as well as appveyor integration tests and travis-ci integration tests. Over all I’m happy with my contribution so far although I had to do 2 quick fixes because of stupid errors I made to make it work.

And that pretty much wraps up day 4 of the challenge.

Day 4: January 5th

Today was a chilled day, I just finished the Web Development 101 curriculum from The Odin Project and I’m now working on the Ruby curriculum. I put most of my effort today into writing Ruby scripts and finishing my Weather API project from Free Code Camp:

See the Pen Local Weather API by Alexander Luna (@mr-moon) on CodePen.



Day 5: January 6th

For this date I mainly wrote ruby scripts to solve some common problems. I also took some time to organize my repo, commit some changes that were left on my local machine as well as keep progressing through The Odin Project.

Day 6: January 7th

Today I progressed more through the ruby programming curriculum and build a tic tac toe CLI game. The rest of the day I spend reading through the reading material for the curriculum, ElectronJS’s documentation and preparing myself for SEO course at Google here in Berlin.

Day 7: January 8th

I barely wrote code today, I spend over 4 hours at Google’s Office in Berlin learning about SEO & Google Analytics. I was able to update some of my blog’s html & config files and create a Pull Request on github to TheOdinProject

Day 8: January 9th

I started to work on a Progressive Web App using reactjs, Firebase, the NASA API and Remote Pair Programming. I’m currently part of the Google and Udacity scholarship and to improve our knowledge, Udacity introduced Remote Pair programming projects. The idea is to build a project using the skills we learned in this course with a random pair that Udacity assigns to us every monday.

Day 9: January 10th

I’m still working on the PWA using reactjs and Firebase. I’m also working on a Ruby challenge from TheOdinProject more on that tomorrow. And I wanted to thank firefox for the drinks and the study session for rust language in their community spaces here in Berlin.

Day 10: January 11th

I worked on a Retro Snake game in Javascript and kept reading some lessons from TheOdinProject and worked on some Ruby Benchmarking tests:

See the Pen Retro Snake Game by Alexander Luna (@mr-moon) on CodePen.



Day 11: January 12th

Great news, I deployed Version 1 of the Google udacity project 🍻 The ReactJS and Firebase part is pretty much done, now I will have to tackle the Service Worker part to make the offline experience great. Take a look: nasa-udacity

Day 12: January 13th

I’m still polishing my React project but also working on some new things now. I posted my Retro Ping Pong Game on CodePen give it a try If you like retro games or just want to take a look at the Javascript code:

See the Pen Retro Ping Pong Game by Alexander Luna (@mr-moon) on CodePen.



Day 13: January 14th

I worked on the Pomodoro Clock I previously build using vanilla Javascript. Currently I’m converting it into a Desktop app using ElectronJS.