Skip to content

Instantly share code, notes, and snippets.

View halitbatur's full-sized avatar
🏠
Working from home

Halit Batur halitbatur

🏠
Working from home
View GitHub Profile
@halitbatur
halitbatur / authAndSecurity.md
Created July 15, 2024 07:08
Discussion about Auth and Security

Discussion Questions on Authentication and Security

  1. Why is it important to secure a backend application, and what are some potential risks if it remains unsecured? Discuss how attaching data to a user identity can mitigate some of these risks.

  2. How does the use of tokens enhance the security of a web application? Explain the process of generating and using tokens for user authentication, and compare it with the use of plain email and password combinations.

  3. What are the benefits of using modern hashing algorithms for passwords compared to older methods? Discuss the role of salting in preventing attacks and the concept of an adjustable cost factor.

  4. Explain the steps that take place when a user signs in to a website. How is the authentication data handled and stored, and what are the implications of these storage locations on security and user experience?

@halitbatur
halitbatur / mongoose.md
Created July 11, 2024 07:20
Mongoose Discussion

Mongoose Discussion

  1. Explain the purpose of Mongoose middleware. How can you use pre and post hooks to manage data before and after certain operations? Provide examples of use cases where middleware would be beneficial in an Express.js application.
  2. How does Mongoose support indexing, and why is indexing important for database performance? Discuss how to create and use indexes in your schema and the impact they have on query efficiency.
  3. Describe the concept of schema methods in Mongoose. How do they differ from static methods, and when would you use each type? Give examples of scenarios where schema methods would enhance the functionality of your application.
  4. What are the advantages of using Mongoose’s built-in query helpers? How do they simplify the process of writing queries in an Express.js application? Discuss examples of custom query helpers you might create for a project.
  5. How does Mongoose handle relationships between different collections? Discuss the use of references and embedded docu
@halitbatur
halitbatur / mvc.md
Created July 4, 2024 07:17
MVC and CRUD

Discuss the points below with your teammates and add your answers below in the comments

  1. What is the best/most common file structure for backend NodeJS projects?
  2. What is the MVC architecture? Why we will be using it?
  3. Explore defining a schema in Mongoose, you can refer to this for more information (no answer in the comments required).
  4. What are the CRUD operations? add an example code of each CRUD operations in Mongoose.
@halitbatur
halitbatur / dataModel.md
Created July 4, 2024 07:15
Data Model activity

List of Apps

  • Twitch
  • Instagram
  • Airbnb
  • Uber eats
  • Twitter
  • Any Banking app (Most of them have similar data models)
  • Netflix
  • Github
  • Splitwise
@halitbatur
halitbatur / restdisucssion.md
Created June 25, 2024 06:47
Rest Discussion

RESTful API Discussion Questions

  1. What are the HTTP Methods in RESTful API and when would you use each of these?
  2. What does this HTTP Status codes represent?
    • 1xx
    • 2xx
    • 3xx
    • 4xx
    • 5xx
  3. What is the difference between the following response functions?
  • res.send()
@halitbatur
halitbatur / contextAPI.md
Created June 10, 2024 06:57
Context API and state management discussion
  1. What is React.useContext, and how does it differ from traditional prop drilling?
  2. What are some common use cases for React.useContext, and when might you prefer to use it over other state management solutions like Redux or MobX?
  3. How do you create and consume a Context in a React application? Can you walk through a basic example?
  4. What are the limitations of using React.useContext for state management? How do these limitations compare to other tools like Redux or Zustand?
  5. In what situations might it be beneficial to combine React.useContext with other state management libraries? Provide an example scenario.
@halitbatur
halitbatur / reactdiscussion.md
Created May 28, 2024 07:08
Intro to React Discussion

React Discussion questions

  1. What problems does React aim to solve?
  2. How might React differ from other JavaScript frameworks or libraries you've heard of?
  3. How might building an application with components be advantageous?
  4. How does React's Virtual DOM differ from the actual DOM, and why might this be beneficial?
  5. How does JSX combine JavaScript and HTML-like markup?
  6. How does a traditional website differ from a Single Page Application?
  7. Why might developers choose to build an SPA using React?
  8. How might an application's data or user interface be affected by changes over time?
  9. How do you think React manages this dynamic data?
@halitbatur
halitbatur / dom.md
Created May 21, 2024 07:20
DOM discussion questions

Dom discussion questions

  1. What is the Document Object Model (DOM) and how does it represent an HTML document?
  2. How can JavaScript be used to add, remove, or modify elements in the DOM? Provide examples of methods used for these operations.
  3. Explain the difference between the innerHTML and textContent properties. When should each be used?
  4. What are events in the context of the DOM, and how can they be used to interact with users? Discuss the concept of event bubbling and capturing.
  5. Discuss the performance implications of frequent DOM manipulations. What are some best practices to minimize reflows and repaints?
  6. How can modern JavaScript libraries and frameworks (like React, Angular, or Vue) help manage DOM manipulations? Compare their approaches with vanilla JavaScript.
@halitbatur
halitbatur / promise.md
Last active May 21, 2024 07:00
Promise Discussion Questions

Promise Discussion Questions

  1. In your own words, what does asynchronous mean?
  2. In your own words, what is a promise?
  3. In your own words, why is it called a Promise?
  4. In your own words, why is it called await?
  5. Please read the common mistakes section of MDN here and summarize what the common mistakes are.
  6. Why would you use async/await over .then?
@halitbatur
halitbatur / dsaDiscussion.md
Created May 15, 2024 09:54
DSA Discussion

Discussion questions about DSA and Algorithims in Javascript

  1. Discuss the concept of recursion in programming. How does it work, and in what scenarios might recursion be more advantageous than iterative solutions?
  2. Explain the difference between time complexity and space complexity in algorithms. Why is it important to consider both when evaluating the efficiency of an algorithm?
  3. What distinguishes linear data structures from non-linear data structures? Provide examples and use cases where one might be preferred over the other.
  4. Discuss difference between linear and binary search
  5. In your own words explain the following data structures:
  • Linked List
  • Stack
  • Queues