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 / serverAttacks.md
Created January 18, 2024 11:16
Type of attacks disuccsion
  1. What is a CSRF attack? How does it use HTTP requests? And why do we call it the one-click attack?
  2. What is an XSS attack? And what is the connection between it and cookies/sessions? And what are the two main categories of XSS?
  3. What is SQL injection? and what is the attacker’s intention from it?
  4. Consider the below SQL command, where is the vulnerability? think about some ways an attacker can misuse it:
const { username, password } = req.body
let strQry = `SELECT Count(*) FROM Users WHERE username=${username} AND password=${password}`;
  1. What does End-to-End encryption means? Share an example of an well-known app using E2EE, how is that app using it?

Using session Cookie VS. JWT for Authentications

  • Can you explain the steps that take place when a user signs in to a website?

  • Where are each of session/cookie and JWT data stored?

  • Which technology is stateful and which is stateless and what is the different between both?

  • What are the advantages and disadvantages of each of them in your opinion?

@halitbatur
halitbatur / mongoose.md
Created January 11, 2024 12:47
Mongoose and Express discussion
  1. What are the differences and connections between Mongoose schemas and models? How do they work together in an Express.js application?
  2. How does Mongoose handle data validation? Discuss the benefits of using Mongoose for data validation as opposed to doing it manually in your Express.js routes.
  3. What are virtuals in Mongoose? Discuss how and why you might use them in a project. Give examples of scenarios where virtuals can be particularly useful.
  4. What is population in Mongoose? How does it differ from simply storing object IDs in your documents? Discuss scenarios where population is beneficial and when it might be better to avoid it.
  5. How does Mongoose handle asynchronous operations? Discuss the role of promises and async/await in managing database interactions in an Express.js application.
@halitbatur
halitbatur / nosqlvssql.md
Created January 2, 2024 13:28
No SQl vs SQL discussion

Discuss the answers for these questions with you teammates and write your answers in the comments.

  1. What is the difference between SQL and NoSQL?
  2. What is referencing and what is embedding in MongoDB?
  3. Why should we embed more than referencing when we can in MongoDB?
  4. When should we prefer referencing over nesting in MongoDB?
  5. What are ORMs? Why we use them? Give an example of an SQL request with and without using ORM.
  6. What is the difference between a table and a collection?
@halitbatur
halitbatur / sql.md
Created January 2, 2024 13:21
SQL Discussion

SQL discussions

  1. What is the difference between SQL and MySQL?
  2. What do you mean by DBMS? What are its different types?
  3. What are the types of joins in SQL? Give an example for each one.
  4. What is a Primary key?
  5. What are the different operators available in SQL?
  6. What is the need for group functions in SQL?
  7. What is a Relationship and what are they?
@halitbatur
halitbatur / restd.md
Created December 13, 2023 12:12
Rest discussion questions

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 / reactFrameworks.md
Last active November 6, 2023 15:42
JS and React popular frameworks

Learning Objectives

The objective of this discussion is to expose you to some of the popular frameworks that are built on top of JavaScript or React. The goal is not for you to know how to use these, but simply understand what their intended usage is in case you want to use it at some point in time.

For each of these, I want you to answer the following questions for the class:

  1. Why does this exist? Why did people spend hundreds of hours of their time to build this?
  2. For what types of projects would you use this for?

Questions

  1. Gatsby
  2. Storybook
@halitbatur
halitbatur / reactprops.md
Created October 19, 2023 12:16
React Components and Props Discussion
  1. What is a React component, and how does it differ from a traditional JavaScript function or class?
  2. How would you describe the role of props in React? Why might they be crucial for component reusability?
  3. How do state and props differ in a React component? Can you think of scenarios where you'd use one over the other?
  4. If components are meant to be reusable, how can props help in achieving this goal? Can you think of real-world analogies or examples?
  5. In a typical React application, components are often nested within other components. How do props facilitate data flow in such hierarchies? What challenges might arise from this?
  6. React documentation emphasizes that props should be "immutable". What does this mean, and why might it be an important principle in React development?
@halitbatur
halitbatur / reactquestions.md
Created October 12, 2023 13:36
React Discussion Questions

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 / fetchDisscusion.md
Created October 4, 2023 10:07
Fetch Disscusion

Fetch Discussion

  1. What do you think "asynchronous" means in the context of programming? Why might it be important?
  2. Imagine you're on a website, and you click a button to view a list of your friends. The list takes some time to appear. Why might that be the case?
  3. How do you think a website's responsiveness impacts user experience? What could be the consequences if a site becomes unresponsive for a few seconds?
  4. Why might it be problematic if a browser had to "wait" for every operation to complete before doing anything else?
  5. If you were designing a website that needed to fetch information, like a news site, what challenges do you anticipate you'd face? How might you ensure the website remains responsive?
  6. Are there other ways you've heard of (or can research) for handling operations that might take some time? For instance, how might you deal with loading an image?
  7. What might happen if a website tries to fetch some data, but there's an issue (e.g., the data doesn't exist, or the server is d