#TIL: a daily recap of my first two months as a Ruby on Rails developer
From early April to early June, I attended Le Wagon Paris’ fullstack coding bootcamp. Each day, I shared what I’d learned on Twitter. Wanna know what it feels like to dive into coding for 2 months for the first time? Well, read on!
Day 01
#TIL @Lewagonparis, day 01:
— Rémi Mercier (@mercier_remi) April 9, 2018
💻 set up a proper dev environment (@homebrew, ruby...)
💾 installed tools (homebrew...)
👨💻 wrote some ruby scripts
>_ fooled around w/ the command line (already learned that w/ @benrict @CTourriere @jmorel et al.)
🙌 Met a bunch of lovely people pic.twitter.com/e0QR5Q84Lv
Day 02
#TIL @Lewagonparis, day 02:
— Rémi Mercier (@mercier_remi) April 10, 2018
📖Refreshed my memory w/ data types, variables and methods
🔎Spent a LOT of time searching through the Ruby doc
👴Computed my age in days since my birth
👏Concatenated strings with interpolation
🗣️Talked a lot w/ my terminal with if/elsif/else
Obviously this is a colorful number. But I had to write a method do do this for me. I managed to split 362 into an array of integers, calculate 3*6*2 using .reduce, but the product (n * n+1) looping on each element... 🤷♂️
— Rémi Mercier (@mercier_remi) April 11, 2018
Day 03
TIL @Lewagonparis, day 03:
— Rémi Mercier (@mercier_remi) April 11, 2018
➰ Looping with while/for
🤕 Sorting names (case insensitive) given by a user and modifying specific array separators in the output 😭
♠️Playing back jack with my terminal
🐛Simple debugging
✋Fooling around destructive methods (.map!) pic.twitter.com/qYA1HGNWXR
I spent something like three hours on the sorting exercice and ended up with some bad bad styling (errors "Use Kernel#loop for infinite loops" and "Literal true appeared in a condition"). So I'll have to think of another way to do it.
— Rémi Mercier (@mercier_remi) April 11, 2018
Day 04
TIL @Lewagonparis, day 04:
— Rémi Mercier (@mercier_remi) April 12, 2018
[ ] Played with arrays
🔻Yielded a LOT!
✂️Split arrays based on arbitrary rules or blocks passed on method
🧐Refactored dirty code to "hop!" n number of time
🐷Tried to write a translator in Louchebem --> parisian butcher slang (poke @jmorel_fr) pic.twitter.com/KKqo1YsW6V
Day 05
TIL @Lewagonparis, day 05:
— Rémi Mercier (@mercier_remi) April 13, 2018
{ } Hashes FTW (@opendatasoft taught me all about dictionaries 👊)
👨🎤 How hash helps my terminal sings Motorhead 🤘 even if I pass arguments in the wrong order
[ ] > { } Turned an array into a hash whether I pass a block to my method or not pic.twitter.com/qrlQVEeK8d
This gave me some fucking headache --> https://t.co/JC6SR1yPmI
— Rémi Mercier (@mercier_remi) April 13, 2018
Still can't wrap my head around how yield(parameter) interact with the block I pass to my method, but hey, it's Friday, so, we'll see about that next week now.
Day 06
TIL @Lewagonparis, day 05:
— Rémi Mercier (@mercier_remi) April 16, 2018
/ / Learnt how to REGEX
📞 Checked if a French phone number input is valid
📖 Checked if two strings are anagrams (with array.sort and hash.each)
✉️ Spotted emails for first name, last name and domain to crack jokes about @live.com users pic.twitter.com/9hPDRzokaE
Spent over an hour over how to properly raise an ArgumentError 🤕https://t.co/QD1rwFcBMe. It still needs some refactoring but it works! 🧟♂️ pic.twitter.com/hami3tqllF
— Rémi Mercier (@mercier_remi) April 16, 2018
Day 07
⏲️Play the Longest Word with my terminal
— Rémi Mercier (@mercier_remi) April 17, 2018
🔠 Generate a letter grid
📖 Submit a word
✅ Check if input is valid (letters picked from the grid)
👀 Go and check a remote dictionary through an API
🗣️ Output a score based on input length and ⏲️ to answer
Serious progress can be made in thinking outside my text editor and not getting lost in my head. Also, tackling smaller tasks and adding smaller commits.
— Rémi Mercier (@mercier_remi) April 17, 2018
And of course, it's TIL day 07, not 06! 😁
— Rémi Mercier (@mercier_remi) April 17, 2018
Day 08
Btw, kuddos to @xavarques for bringing us two homemade cakes to make us understand the difference between a Class and an instance. 😁
— Rémi Mercier (@mercier_remi) April 18, 2018
The vending machine program was really fun to build. You need to handle the number of candies left when someone buy one, if a user can buy from your machine even if he didn't put enough money...
— Rémi Mercier (@mercier_remi) April 18, 2018
Worked on the length of my method and size of my commits too! Created a lot of smaller method handling a single logic, then called 'em in a general method. Code was more readable and easier to debug!
— Rémi Mercier (@mercier_remi) April 18, 2018
Day 09
Inheritance in a nutshell:
— Rémi Mercier (@mercier_remi) April 19, 2018
🏢 class Building (has generic variables: walls, usage)
|___ 🏥 subclass Hospital inherits walls & usage but has its own properties | (emergency room)
|___ 🏨 subclass Hotel have specific properties (lobby, dining area)
So to put in all in emojis
— Rémi Mercier (@mercier_remi) April 19, 2018
🏢 class Building
|___🏥 subclass Hospital
| |___🏨 Instance Hospital Saint-Antoine
| |___🏩 Instance Hospital de la Pitié-Salpêtrière
|___🏨 subclass Hotel
|___🏣 Instance Hotel 1
|___🏠 Instance Hotel 2
🍲 Built a Restaurant class with a class method allowing the user to filter all instances of Restaurant (so, all restaurants) by city. (tricky one that one though)
— Rémi Mercier (@mercier_remi) April 19, 2018
And finally, fetched a webpage 📄, stripped it and printed it in the terminal (using open-uri and nokogiri gems).
— Rémi Mercier (@mercier_remi) April 19, 2018
Day 10
✌️Untangled myself by coding every user stories one by one throughout the whole architecture
— Rémi Mercier (@mercier_remi) April 20, 2018
✅ Managed to make my cookbook work#ruby #learntocode
Day 11
#TIL @lewagonparis day 11:
— Rémi Mercier (@mercier_remi) April 23, 2018
💻 Model View Controller (bis repetita)
🍝 Got tangled in all these files calling each other (bis repetita)
✂️Coded sraping logic in a ServiceObject
🔎Scraped a lot of info from cooking website with if/else condition
Day 12
#TIL @lewagonparis day 12:
— Rémi Mercier (@mercier_remi) April 24, 2018
💻 Model View Controller w/ multiple models, repositories, views and controllers
🖌️ Draw my DB model and objects model
🍝 Didn't got tangled in all these files 💪
🚦Coded my first router from (almost) scratch#ruby #100DaysOfCode #learntocode
✂️Refactored my multiple repositories classes to a parent repository class w/ inheritance. Had to create short methods in children classes to handle specificities. 💇♀️ https://t.co/hZpOyA5yVI
— Rémi Mercier (@mercier_remi) April 24, 2018
Day 13
#TIL @lewagonparis day 13:
— Rémi Mercier (@mercier_remi) April 25, 2018
⛏️Dug into data modeling
🕵️♀️Played around user sessions
👥Routed specific users to specific menus
After 18 hours of intense coding, now is the time for a fresh 🍻.
— Rémi Mercier (@mercier_remi) April 25, 2018
Day 14
#TIL @lewagonparis day 14:
— Rémi Mercier (@mercier_remi) April 26, 2018
🖌️ Relational database design
❓ Queried with SQL
👏 Joined tables to query multiple tables
💾 Used sqlite and sqlite3 to store data
🤔 Dabbled w/ Sinatra
Day 15
#TIL @lewagonparis day 15:
— Rémi Mercier (@mercier_remi) April 27, 2018
Mixing ❓ SQL and 💻 MVC redux 👇https://t.co/mIPrlIlnOJ
🛠️ Build a lot of classes capable of CRUD against SQL tables
— Rémi Mercier (@mercier_remi) April 27, 2018
👨💻 Coded a terminal-based copycat of HackerNews with:
➕ add a post
📗📙 update a post's title and URL
☠️ delete a post
🔺upvote a post
Day 16
#TIL @lewagonparis day 16:
— Rémi Mercier (@mercier_remi) April 30, 2018
💾 Coded migration files
✍️ MVC using ActiveRecord (instead of SQL) 🤯
👺Used @stympy's Faker gem in seeds file to prepopulate DB with Doctor Who data 👽
🔎Scrapped HN API endpoint to get top 10 posts#ActiveRecord #learntocode #100DaysOfCode
Day 17
#TIL @lewagonparis day 17:
— Rémi Mercier (@mercier_remi) May 1, 2018
✍️ ActiveRecord associations and validations FTW!
💾 Coded migration files (again!)
⛵️ Shipped micro-app with Sinatra 👨🎤#ActiveRecord #learntocode #100DaysOfCode
Loved all those Active Record validations: uniqueness, presence, format... Really elegant stuff. But couldn't wrap my had around scopes and how to use 'em in Sinatra 🤷♂️
— Rémi Mercier (@mercier_remi) May 1, 2018
Day 18
#TIL @lewagonparis day 18:
— Rémi Mercier (@mercier_remi) May 2, 2018
✍️🎨 HTML and CSS introduction (experience w/ @jmorel_fr came in handy)
😻 Pushed a copycat of @Shpigford's website to @github pages (sorry for copying ur website's shamelessly Josh 🙇♂️ but it's really 👌)#HTML #css #learntocode #100DaysOfCode
All in all, it took me about a couple of hours (mostly because I'm super lazy though).
— Rémi Mercier (@mercier_remi) May 2, 2018
Day 19
#TIL @lewagonparis day 19:
— Rémi Mercier (@mercier_remi) May 3, 2018
🎨 CSS components all day long:
🔴 Buttons of all shapes and colors
👦 Avatars small and big
🖼️ Banners
💌 Inbox
🃏 Cards#css #learntocode #100DaysOfCode
Day 20
#TIL @lewagonparis day 20:
— Rémi Mercier (@mercier_remi) May 4, 2018
🎨 @getbootstrap, CSS grids and Flexbox all day long!
🃏Cards in grids
🃏Cards next to a map 🗺️
❓Forms all all shapes and sizes
🖼️ Layouts#css #learntocode #100DaysOfCode
Day 21
#TIL @lewagonparis day 21:
— Rémi Mercier (@mercier_remi) May 8, 2018
<%=👨💻 %> Middleman all day long#learntocode #100DaysOfCode
Day 22
#TIL @lewagonparis day 22:
— Rémi Mercier (@mercier_remi) May 8, 2018
👩🔬 Moved to algorithmics with JS
🌳 Manipulated DOM all day long
🆔 .getElementById
🔎 .querySelectorAll
🎨 .style.backgroundColor#learntocode #100DaysOfCode
All these ( ) and those ; gave me quite a headache compared to Ruby syntax. But that was fun to move back onto more programming stuff.
— Rémi Mercier (@mercier_remi) May 8, 2018
Day 23
#TIL @lewagonparis day 23:
— Rémi Mercier (@mercier_remi) May 9, 2018
🌳 DOM events
📞 Event listeners
🚗 Created a game of cars racing each other with keyup
⏲️ AJAX
🔎 Looked up words through a dictionary API
💁♂️ Updated page on the fly with DOM manipulation#learntocode #100DaysOfCode
Day 24
🕵️♂️ Coded an anonymous chat that posts new messages on server through API then fetch them then every 3 seconds to append them to DOM.
— Rémi Mercier (@mercier_remi) May 10, 2018
Day 25
#TIL @lewagonparis day 25:
— Rémi Mercier (@mercier_remi) May 11, 2018
👨🎨 Product design sprint (w/ Figma)
#learntocode #100DaysOfCode
Day 26
#TIL @lewagonparis day 26:
— Rémi Mercier (@mercier_remi) May 14, 2018
🚉 @rails FTW!
🤯 Routes, http requests, API parsing, ERB, session handler, rails command line basics, link_to... SO MUCH BEAUTY! #learntocode #100DaysOfCode #RubyOnRails pic.twitter.com/5B8ilsD6dn
Added session logic to create persistent score throughout multiple rounds. Used a session.delete method in the controller to restart a new game! 😍
— Rémi Mercier (@mercier_remi) May 14, 2018
Day 27
#TIL @lewagonparis day 27:
— Rémi Mercier (@mercier_remi) May 15, 2018
🚉 Models & CRUD with #rails
🧙♂️Model and controller generator w/ rails generate
⌨️ Ruby console
🛣️ The 7 CRUD routes (sounds like a T. E. Lawrence copycat) #learntocode #100DaysOfCode #RubyOnRails
In the end, created a to-do app (the ABC of CRUD apps). My partial _form doesn't handle well the branch 'new article'/'update article' but 🤷♂️, still fun to build.
— Rémi Mercier (@mercier_remi) May 15, 2018
Also had a bit of trouble w/ the delete action (had to specify that my link_to needed a delete method). pic.twitter.com/Q0ZNmXExIC
A lot of stuff to learn today, but all the pieces of the puzzle are getting into place!
— Rémi Mercier (@mercier_remi) May 15, 2018
Got rid of the ugly border of my articles title + add destroy logic to get rid of shitty articles. 🔥 pic.twitter.com/Loi5Z4tsMH
— Rémi Mercier (@mercier_remi) May 15, 2018
Finally managed to add URL to my articles' title! 🙌
— Rémi Mercier (@mercier_remi) May 16, 2018
Had completely forgot about the strong params in my articles controller (URL wasn't permitted and I didn't put validations in place, so no errors🤦♂️). pic.twitter.com/ezPuhvrYqD
Day 28
#TIL @lewagonparis day 28:
— Rémi Mercier (@mercier_remi) May 16, 2018
🚉 Advanced routing: collection, member, nested resources...
👍 Validations, helpers and simple_form
All this leading to a Yelp-like website where you can add restaurants, reviews... 🍴 (yes, I love 🐽).#learntocode #100DaysOfCode #RubyOnRails pic.twitter.com/8eX3YQrhaW
Day 29
#TIL @lewagonparis day 29:
— Rémi Mercier (@mercier_remi) May 18, 2018
📯 Asset pipeline
🚉 Advanced routing for a 3-model app
🤨 validates uniqueness of multiple models
🤔 access a model's instance data through another one w/ associations
🤯 knowing how to nest routes w/ resources#100DaysOfCode
Day 30
#TIL @lewagonparis day 30:
— Rémi Mercier (@mercier_remi) May 18, 2018
🚉 Advanced routing for a 3-model app bis repetita
👨🎨 A lot of design w/ not enough commits (bad bad dobby)
🛫 No deploy: got banned by Heroku (40 students pushing under the same IP 🤦♂️)
📸 Dabble with Cloudinary for img upload
Created a cocktail app w/ all this! Cheers 🍸 pic.twitter.com/2PxGE62kut
— Rémi Mercier (@mercier_remi) May 18, 2018
Day 31
#TIL @lewagonparis day 31:
— Rémi Mercier (@mercier_remi) May 22, 2018
🏠 Started working on an Airbnb-like app
👩🧑🧑🧔 First team project
💎 Used devise for authentification
🔥 Shipped a big part of basic features#learntocode #RubyonRails #100daysofcodechallenge
On the down side:
— Rémi Mercier (@mercier_remi) May 22, 2018
🤚First conflicts between branches on github
👉 Verified the importance of assigning user stories to each team member to avoid the auction market around features
Day 32
#TIL @lewagonparis day 32:
— Rémi Mercier (@mercier_remi) May 22, 2018
🏠 Worked on an Airbnb-like app days 2
#learntocode #RubyonRails #100daysofcodechallenge
Day 33
#TIL @lewagonparis day 32:
— Rémi Mercier (@mercier_remi) May 24, 2018
🏠 Worked on an Airbnb-like app day 3
🐛Debugged pundit errors (oh joy!)
#learntocode #RubyonRails #100daysofcodechallenge
Day 34
#TIL @lewagonparis day 33:
— Rémi Mercier (@mercier_remi) May 24, 2018
🏠 Worked on an Airbnb-like app day 4
🔐Shipped sign-up & sign-in through GitHub with omniauth-github gem on top of devise.
🐛Squashed bugs in dev
🐛Squashed bugs in production #learntocode #RubyonRails #100daysofcodechallenge pic.twitter.com/C4ROVKXY68
Fun part was to retrieve the image URL from GitHub and pass it to the carrierwave handler to upload the picture on Cloudinary.
— Rémi Mercier (@mercier_remi) May 24, 2018
Day 35
#TIL @lewagonparis day 35:
— Rémi Mercier (@mercier_remi) May 25, 2018
✍️ Wrote a tutorial on how to let people login w/ GitHub on your rails app when you already use Devise to handle authentification
🤦♂️Made all the n00b errors so you don't have to.https://t.co/uYQXRkogJR#learntocode #RubyonRails
Day 36
#TIL @lewagonparis day 36:
— Rémi Mercier (@mercier_remi) May 29, 2018
🔥 Final two weeks dedicated to final projects!
✍️ A lot of thoughts and drawing over models and DB schema to start from a clean state.
📺 Will stream coding everyday 🤓#learntocode #RubyonRails #100daysofcodechallenge
Currently coding https://t.co/zz9x7pe8ZT - Day #01 🔥📺 https://t.co/CfsROt90ji
— Rémi Mercier (@mercier_remi) May 29, 2018
Writing test for https://t.co/zz9x7pe8ZT right now. Watch me doing stuff I don't understand at all, live. Or don't. 😬 https://t.co/KJ7PZsLnGu
— Rémi Mercier (@mercier_remi) May 29, 2018
Day 37
#TIL @lewagonparis day 37:
— Rémi Mercier (@mercier_remi) May 30, 2018
✍️ Finalized the DB design of https://t.co/zz9x7pe8ZT
👩💻 Coded models and associations
🐛 Wrote some (mostly) useless tests to learn MiniTest syntax
📺 Livecoded said tests here 👉 https://t.co/7P6QGYdqln #rubyonrails #100daysofcodechallenge pic.twitter.com/uTpeZbZC3t
About tests: I know my tests are mostly useless since two of 'em test ActiveRecord logic. But 🤷♂️, it was still cool to get a first bite at MiniTest syntax. Will try Rspec next to test models, controllers... Also, it's integration tests on Friday, so expect some more! 🐛👏
— Rémi Mercier (@mercier_remi) May 30, 2018
Day 38
#TIL @lewagonparis day 38:
— Rémi Mercier (@mercier_remi) May 30, 2018
👩💻 Coded a bunch of controllers and views for https://t.co/zz9x7pe8ZT
🛣️ So many roads! #rubyonrails #100daysofcodechallenge
Day 39 & 40
#TIL @lewagonparis day 39 & 40:
— Rémi Mercier (@mercier_remi) June 4, 2018
🚀Showed first version of https://t.co/zz9x7pe8ZT to le Wagon's buddies
🗺️ Had fun getting lost in all these relationships then finding the light again#rubyonrails #100daysofcodechallenge pic.twitter.com/oJwmjxRXSM
Also, discovered the power of polymorphic URL helpers! 🧙♂️https://t.co/Vkm2EpYTXY pic.twitter.com/4sG5TLk4xa
— Rémi Mercier (@mercier_remi) June 4, 2018
Day 41
#TIL @lewagonparis day 41:
— Rémi Mercier (@mercier_remi) June 4, 2018
🔥 https://t.co/zz9x7pe8ZT is coming along nicely and calmly!
👏 A lot of cool features shipped today:
🕵️♂️🤵 Custom navigation based on sign-in option#rubyonrails #100daysofcodechallenge pic.twitter.com/bUnjS1DhtR
💯 People can vote for activities, week-ends, destinations... thanks to acts_as_votable gem
— Rémi Mercier (@mercier_remi) June 4, 2018
🧙♂️ A lot of cool details in views: average of votes, some well placed AJAX...
💪 And did I mention that the team ships calmly? This is gold people!
Day 42
#TIL @lewagonparis day 42:
— Rémi Mercier (@mercier_remi) June 6, 2018
📩 Guests invited to projects on https://t.co/zz9x7pe8ZT now get a custom email based on their login history
🔥 No more redirections when guests are suggesting ideas and destinations for a party. AJAX only! #rubyonrails #100daysofcodechallenge pic.twitter.com/km4YzG1wiu
Day 43
#TIL @lewagonparis day 43:
— Rémi Mercier (@mercier_remi) June 7, 2018
👇 rinse and repeat https://t.co/3t2e2JdUCX
Day 44 & 45 (Demo Day)
#TIL @lewagonparis day 43, 44 and 45:
— Rémi Mercier (@mercier_remi) June 8, 2018
💅 Put the finishing touches to https://t.co/zz9x7pe8ZT
🎤 Rehearsed over and over again for tonight pitch session!
📺 Follow it live here 👉 https://t.co/4xwwkDt6ge
Those were some solid 9 weeks! 💪#rubyonrails #100daysofcodechallenge
Check out our demo of harry.team here 👇.