code-301-reading-notes

View project on GitHub

jQuery

  • It is a javascript library.
  • You can use it as an object and then add methods for it.
  • Older browsers do not support the latest methods for selecting elements.
  • jQuery’s motto is “Write less, do more,” because it allows you to achieve the same goals but in fewer lines of code than you would need to write with plain JavaScript.
  • You can select either one element or multi elements in jQuery.
  • There is no need to use a loop when a selector returns multiple elements, you can update all of them using the one method.
  • If you want to use more than one jQuery method on the same selection of elements, you can list several methods at a time using dot notation to separate each one.
  • The html () and text () methods both retrieve and update the content of elements.
  • html() : This method gives every element in the matched set the same new content.
  • replaceWith(): This method replaces every element in a matched set with new content.
  • text(): This method gives every element in the matched set the same new text content.
  • remove(): This method removes all of the elements in the matched set.
  • Inserting new elements involves two steps: 1: Create the new elements in a jQuery object 2: Use a method to insert the content into the page
  • before() : This method inserts content before the selected element(s) .
  • prepend() : This method inserts content inside the selected element(s), after the opening tag.
  • after() : This method inserts content after the selected element(s).
  • append() : This method inserts content inside the selected element(s),before the closing tag.
  • You can create attributes, or access and update their contents, using the following four methods.
  • The css () method lets you retrieve and set the values of CSS properties.
  • jQuery allows you to recreate the functionality of a loop on a selection of elements, using the each () method.
  • The on () method is used to handle all events.
  • Every event handling function receives an event object.
  • When you start using jQuery, the effects methods can enhance your web page with transitions and movement.
  • The animate() method allows you to create some of your own effects and animations by changing CSS properties.

  • When a page loads jQuery from a CDN, you will often see a syntax starts with a <script> tag that tries to load the jQuery file from the CDN.
  • The position of <script> elements can affect how quickly a web page seems to load.

Article: 6 Reasons for Pair Programming

6 Reasons for Pair Programming

  • Improving the quality, you can use iterative loops, code reviews, fast feedback and error checking and linting.
  • Pair programming is the practice of two developers sharing a single workstation to interactively tackle a coding task together.
  • Pair Programming involves two roles: the Driver and the Navigator.
    • The Driver is the programmer who is typing and the only one whose hands are on the keyboard.
    • The Navigator uses their words to guide the Driver but does not provide any direct input to the computer.
  • Pair Programming use skills of developers explain out loud what the code should do, listen to others’ guidance, read code that others have written, and write code themselves.
  • Greater efficiency: It is a common misconception that pair programming takes a lot longer and is less efficient.
  • Engaged collaboration: When two programmers focus on the same code, the experience is more engaging and both programmers are more focused than if they were working alone.
  • Learning from fellow students: Working with a teammate can expose developers to techniques they otherwise would not have thought of.
  • Social skills: When working with someone who has a different coding style, communication is key.
  • Job interview readiness: The current employee and an applicant will carry out exercises together, such as code challenges, building a project or feature, or debugging an existing code base.
  • Work environment readiness: Code Fellows graduates who are already familiar with how pairing works can hit the ground running at a new job, with one less hurdle to overcome.