Skip to content

Instantly share code, notes, and snippets.

@ngencokamin
Last active March 23, 2021 20:55
Show Gist options
  • Save ngencokamin/5d888938701bd3d59b664ac29f387cb8 to your computer and use it in GitHub Desktop.
Save ngencokamin/5d888938701bd3d59b664ac29f387cb8 to your computer and use it in GitHub Desktop.
Document of things I've learned

01/05/21 - Today I learned more about git syntax, an area I was previously somewhat unfamiliar with. I feel that while not all the information was new, I gained a greater understanding of how it works.

01/06/21 - Today I learned about symbols and javascript syntax in Ruby

01/07/21 - Today I learned how to iterate through the entirety of an array with each loops

01/08/21 - Today I learned about the HTTP gem and its basic usage, as well as learning about APIs in general

1/11/21 - Today I learned basics about ruby on rails routes and general syntax

1/12/21 - Today I learned how to create and modify persistent data in Ruby on Rails

1/13/21 - Today I learned how to display each item in an object using loops in Ruby on Rails

1/14/21 - Today I learned about query and segment parameters

1/15/21 - Today I learned about post requests, as well as formatting fontawesome icons for a web page through html

1/18/21 - Today I learned how to format a rails application to match REST standards

1/19/21 - Today I learned how to use Active Record Migration to modify a rails database schema

1/20/21 - Today I learned how to validate rails model attributes

1/21/21 - Today I learned basics of SQL query syntax and usage

1/22/21 - Today I learned how to implement active record queries to modify how data is displayed with protections against SQL injection attacks

1/25/21 - Today I learned how to use association methods in rails

1/26/21 - Today I learned how to implement user authentication in rails

1/27/21 - Today I learned how to implement a differing levels of user authorization by creating a method in the rails applications_controller and adding "before_action [method], except [params]" to the start of a controller in rails.

1/28/21 - Today I learned that has_many through (syntax: has_many :X, through: :Y) can be used to access another modal through a join table. For example, in a products model one could write 'has_many :categories, through: :product_categories', and then find the categories of the first product in a table by typing Product.first.categories

2/1/21 - Today I learned how to update every object in an array by using the "update_all" active record query in rails

2/3/21 - Today I learned that unlike ruby, javascript is an asynchronous language, meaning that lines of code do not wait for previous lines to execute before they do. If you want to ensure that one line of code waits for the previous line to be executed (or at least start to execute), you can nest setTimeout commands to ensure a waiting period between the previous command running and the current one.

2/4/21 - Today I learned that v-if="boolean" can be used in vue.js to show and hide a section of a webpage, which can be toggled using a button with v-on:click="boolean = !boolean"

2/5/21 - Today I learned that you can use the Axios library to send get, post, patch, and delete requests to a given url, with a fairly similar syntax to the ruby HTTP gem

2/8/21 - Today I learned the babel can be used in order to utilize ES2015 syntax and utilities while still ensuring compatability with obscure or outdated browsers that don't support ES2015.

2/9/21 - Today I learned that axios.defaults.baseURL can be used to set a base url in vuejs, improving quality of life by removing the need to type the base url in axios requests and instead allowing just the extensions to be used throughout the code.

2/10/21 - Today I learned how to use vue v-models in conjuction with html input tags and axios patch requests to get dynamic inputs from a user and push the changes to a rails server database

2/11/21 -

2/12/21 -

2/15/21 -

2/16/21 -

2/17/21 - Today I learned that functions defined in app.vue are universal and can be called in child vue files with the syntax "$parent.[function]"

2/18/21 - Today I learned that components can be used in VueJS to keep certain elemtns separated for cleanliness and easy reuse of common elements. Components can also call upon other components, creating a hierarchy of many interweaved components that can perform complicated actions while remaining concise and easy to understand.

2/22/21 -

2/23/21 - Today I learned how to render multiple partials in rails. This is useful for tasks such as displaying comments on a post with this syntax: "post = render partial: "post.json.jb", locals: {show: @show} post[:comments] = @show.comments.map do |comment| render partial: "api/comments/comment.json.jb", locals: { comment: comment } end post"

2/24/21 - Today I learned the <pre> tag can be used in html to display pre-formatted text. <pre> contains fixed width text that adheres to spacing and line breaks.

2/26/21 - Today I learned that it's important to have a show view in a rails backend, even without a show action. Even if the information is never showed individually on the frontend, a show view is important to ensure that new and updated data are sent to the frontend for use.

3/1/21 - Today I learned that the factory_bot_rails gem can be used in Ruby on Rails can automatically build a new instance of a class. With software like faker, you can automatically create new class instances with randomly generated data for testing purposes.

3/2/21 - Today I learned the github markdown syntax for tables and checklists

Tables:

header1 | header2
--------|--------
entry1  | entry2

Checklists:

- [x] Checked off item
- [ ] Unchecked item

3/3/21 - Today I learned that TDD (Test Driven Development) is a style of programming that involves writing tests before starting on the program itself, incrementally building up to full features through the process of creating the simplest possible strategy and then refactoring as the tests and code get incrementally more complex.

3/5/21 - Today I learned the importance of taking a break when challenges arise rather than continuing to try increasingly desperate strategies and becoming overwhelmed. I also learned the importance of taking a step back and not only considering whether I can do something, but also whether I should (or even need to).

3/8/21 - Today I learned that the official twitter embed method is not supported by VueJS due to needing to incorporate a script tag into the template section. Instead, vue-tweet-embed can be used.

3/9/21 - Today I learned that using vue router-links to the same route with a different parameter leads to the page not updating if data is retrieved on page creation. This is due to the page not reloading, and thus not running the necessary code. This can be solved by using an a tag instead for links that require the page be reloaded.

3/10/21 - Today I learned git stash can be used to locally save uncommited changes (staged or unstaged) for later and revert them back to working copy. This can be used to save changes that are not necessary or could cause problems in that moment, but might be useful down the line.

3/15/21 - Today I learned that the ruby on rails "updated_at" attribute is not updated automatically by default, but can be updated on update action with the .touch method.

3/16/21 - Today I learned that servers can broadcast changes in realtime to websockets on the frontend, showing live changes to anyone connected to that websocket channel.

3/18/21 - Today I learned that it's important to take breaks to avoid burnout, and that both underplanning and overplanning can be equally detrimental to achieving a good result. While not strictly speaking a developtment related TIL, the realization that overplanning can cause more harm than good was an important one for me.

3/19/21 - Today I learned that markdown syntax can be used in a trello card description to display an image from a link.

3/22/21 - Today I learned about Gulp, a Javascript toolkit designed for automating time consuming or annoying tasks. One usage is with the Material Styles bootstrap theme, which optionally uses Gulp to customize the appearance of the site

3/23/21 - Today I learned about hero images, strong images anchored to the top (or other prominent location) designed to draw attention/reinforce branding through imagery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment