Skip to main content

Posts

Software Design and Architecture

                Architecture is the stuff that is really, really hard to change later.   Design (The Small Stuff): Choosing whether to use a for loop or a while loop. If you mess this up, you can fix it in 10 seconds. Design is the noun (the plan) and the verb (the thinking process) of arranging your components .   Architecture (The Big Stuff): Deciding to use a specific database or deciding how your app talks to the internet. If you mess this up and realize it a year later, you might have to delete everything and start over.    1.  SRS (Software Requirement Specification)   The SRS is the contract. It describes the features . If it is written in the SRS, the software must do it. If it is not in the SRS, the software will not do it.       2. NFR (Non-Functional Requirements) NFRs do not describe what the software does (features). They describe how well it does it. We call these the "il...
Recent posts

Types of Regression

  Linear Regression:                                                                       y = mx+b  m = slope (how much y changes w.r.t x) b = intercept (value of y when x = 0)  (visualize these both above on graph) y = dependent variable x = independent variable  Terminologies:            

Machine Learning

    Machine Learning: The field of study that gives computer the ability to learn without being explicitly programmed.  Types: Supervised Learning Unsupervised Learning   Recommender Systems Reinforcement Learning    Supervised Learning:      It is a method in which we give our algorithm both inputs and outputs, and the algorithm automatically generates an algorithm or mappings, so that at some point, that generated algorithm is so effective that if we give them inputs, respective outputs are automatically generated.   The Two Main Types Regression: Predicting a number (e.g., predicting the price of a house). Classification: Predicting a category (e.g., deciding if an email is "Spam" or "Not Spam").           Example:      Here in this example, to predict the prices of houses, we plotted a graph, and we observed that we could use the function of curve to find the unknown value. ...

OnClick and {}

1. The onClick Mystery: Is it the same? Yes, the concept is 90% the same. If you know how to handle a click in plain HTML/JavaScript, you already know how to do it in React. The logic flow is identical: Event: A user does something (Click). Listener: The element hears it ( onClick ). Handler: A specific function runs to deal with it. The "React Twist" (The 10% difference): There are two tiny syntax differences you must memorize: CamelCase: In HTML, it is onclick (lowercase). In React, it is onClick (camelCase). Function, not String: HTML (Old): onclick="doSomething()" (A string of code). React (New): onClick={doSomething} (Passing the actual function itself). So yes, your intuition is correct: Whenever you need to handle logic (clicks, hovers, typing), you will stick to this pattern: on[Event]={functionName} . 2. The Curly Braces { } : The Portal This is the most important syntax rule in JSX. Imagine your code file has two "Modes": HTML Mode: W...