teleren/devto huggingface dataset:
My Scrimba Front End Developer Journey — Entry 2
Published: 2022-07-30 23:26:25

I’ve now completed my second week following along Scrimba’s Front End Developer Journey, and my momentum has definitely slowed down — but that was expected. JavaScript is hard. I really love the design of Scrimba though and am slowly picking up on basic JavaScript concepts (as I struggle to do the pre-made challenges throughout each lesson, then redo them after watching Per show how they’re supposed to be done).

This week I’ve been doing Module 3 — Making Websites Interactive, which builds upon the previous modules’ HTML and CSS skills by adding the all magical JavaScript stuff that I’m really here to learn. Overall it’s one of the longer modules with 177 lessons and more than 8 hours of video. As a newbie coder it’s daunting, but also pretty exciting to see how easy it is to make websites more dynamic. In the past I’ve relied on WordPress and pre-built plugins to do these things, but now I can start to see how to do them on my own.

I started by following along and building the passenger counter which seemed simple but I was surprised by how much went into it. Event listeners, iterations, incrementing, and the DOM are just a few of concepts I can remember going over. Then I moved onto building a blackjack game which added if/else statements, arrays, loops, and Math. Child’s play. Then, after that, I built an actual Chrome extension which had me manipulating local drives, storing data, refactoring functions, and manipulating HTML. To say that my brain is fried, is an understatement.

Each of the projects contain dozens of lessons ranging from an hour to almost 3 hours of tutorials, but actually take more than twice as long because you’re pausing and coding along with each lesson. After each project are a series of challenge lessons which force you to use the code you’ve previously learned. The tutorials for those are short though, only about 20 minutes all together, but the coding for them takes much longer. I’m honestly surprised I got through so much this week.

I’ve got one more set of lessons to get through with Module 3 before I can move on, but I may go back and run through this module again once I am done. There’s just a lot of information crammed into this module that I want to understand better. We’ll see once I get through the rest of it.
Asus ZenFone 9
Tags: smartphone, riparazione, assistenza, asus
Published: 2022-07-30 22:33:04

Riparazione e Assistenza Smartphone Asus fuori garanzia.
Il nostro laboratorio esegue interventi di riparazione in 1 ora su appuntamento utilizzando ricambi originali oppure compatibili di ottima qualità!
Tutte le nostre riparazioni sono garantite tre mesi.

Per maggiori informazioni consulta il nostro sito: https://bresciapc.com

https://bresciapc.com/
CSS Debugging Disappearing Elements
Tags: css, debug, webdev
Published: 2022-07-30 21:38:00

I'm going to share with you a trick so cool you'll be shocked ⚡️

But first, here's a little intro for those who have no idea what the subject of this post is for:

Some elements appear on the screen only when the user interacts with another element. 

For example, a suggestions box appears when the user types text, or a dropdown is rendered when a menu item is hovered.

(Like the dropdown items of this [MUI component](https://mui.com/material-ui/react-autocomplete))

Sometimes those dynamically appearing elements don't exist in the DOM until they are needed - for example, appearing when another element is being interacted with. 

How can they be inspected? Since clicking the _inspect_ button will cause those dynamically-added elements to disappear.

![devtools inspect button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5toisjeo4xzf5klz64m.png)

## 1. Timeout trick

Most developers are familiar with this trick, but for those who aren't - to "freeze" the DOM, execute a `debugger` command (within devtools console) inside a `setTimeout` with enough duration which lets you run around, do whatever you need to do, in order to show the evasive thing you wish to inspect:

```js
setTimeout(() => { debugger; }, 3000)
```

![debugger inside timeout gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmke5tnnqfu9kuny3n2v.gif)
 
While this is handy, it can be annoying to constantly run this command when you are constantly debugging some random CSS weirdness.

## 2. <kbd>F8</kbd> in Devtools `Sources` panel

Hitting <kbd>F8</kbd> while the `Sources` panel is open will freeze the DOM also and go into `debugger` mode.

## 3. Hotkeys automated debugger:

The above trick can be automated using a dedicated keyboard shortcuts (Chrome browser). 

1. Install the [shortkeys extension](https://www.shortkeys.app/) 
2. Click on the extension icon and chose "options":
![shortkeys options menu item](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irsbt95x9buqpugj1u6s.png)
3. Configure it as follows:
![shortkeys configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yieoj8yf0d7zi07vwx0p.png)
4. Click "Save shortcuts" button (bottom-right)

Now, go to any page, **make sure** _devtools_ is opened, and hit <kbd>CTRL</kbd>+<kbd>SPACEBAR</kbd> keys, while your inspection target element is visible.

## 4. _Emulate a focused page_ with devtools:

1. Open Devtools
2. Hit <kbd>Command</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> (OSX) or <kbd>CTRL</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> (Windows)
3. Type `focused`
4. Select `Emulate a focused page` 

![Emulate focused page options in devtools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nutbqlme58znbxhi812.gif)
 

Now interacting with devtools will not lose focus from the element which was focused.


![booyakasha](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/om1ojoocz7eispq8x7f9.jpg)
SWE/SRE - System Design
Tags: swe, sre, cloud, design
Published: 2022-07-30 21:35:00

As an SWE/SRE system design is the most important as part of design skills. Now where to start? is the biggest question. you might find plenty of things online like "Grokking the System Design Interview" or online classes or youtube videos. Tired of seeing those or reading those? Well, then where to start. In my point of view these are the important things:

- Analyze the problem? Think about where the question came from? What problem actually solves? Why do you actually need design for it?

- Above questions raises lot of other questions. right? 

- Now breakdown the problem to pieces

- solve each piece and combine the solution. 

- Think about scalability. thats the most important thing. For example if you are designing twitter . What if all the people around the world start using twitter?  Can your design sustain?

- Think about frontend, backend, middle layer, api layer, database layer, networking layer, servers, security , certificates, load balancing, deployment model, datacenters, cloud, autoscaling, testing model , containerization, versioning, HADR, best practices, Memory, bandwidth, cost, capacity, caching, CDN , DNS etc etc. there might be lot more , please add in the comments if you think about more things.

- Now you really do not have time to explain during the interview. atleast give an overview at the end but discuss mainly about what design are you planning to do and how load balancing works.

- I would say, think from the small things. Like how do you design a pen/pencil. How do you design a book? how do you design a phone? how do you design a toy? sounds funny right. But then thats where the analysis starts. 

- Database is most important component in all the applications. Not always relational DB works and not always No sql DB works. can you combine both of them ? Yes why not, if it serves the purpose. 

- Again, in all the above things, you are not writing code. You are only thinking about the design and bringing the parts together. How do you do this?

- Flow Diagram? Flow diagram is the most important thing. all the design you can put together in a diagram first and you can explain the things later.

Now should we start with a problem? Please suggest in the comments which is the design you want to discuss or lets break the things together and work on an acceptable design

Are you guys ready?
Day 112: Week finished early
Published: 2022-07-30 21:24:12

Hi!
For once I finished my weekly tasks Before Sunday nad I have tomorrow fully for myself with a clean weekly backlog as I just completed the remaining task for this week. I still have too much to do to fit them all in a single day but at least I'm the one making the rules. so I expect to do a bit of Flutter, Figma, movies and some sleep, too much? I know but I only have tomorrow and the following day before a Flutter demo and only tomorrow to catch up with my daily UI Challenges so there will be a lot going on and if it doesn't fit no worries the weekend is supposed to be for resting anyway 
Let's see how it goes

signing off...
Multiple widgets with tailwindcss
Tags: codepen, css, tailwindcss, react
Published: 2022-07-30 21:05:00

**Components available in the figma community 👇**

[https://www.figma.com/community/file/1122657723598718827](https://www.figma.com/community/file/1122657723598718827)

**App 👇**
[https://widget-components.vercel.app/](https://widget-components.vercel.app/)

Share my work if you like. ❤ ❤ ❤

{% codepen https://codepen.io/frankuxui/pen/bGvpEwN %}
How to build responsive web apps using React.
Published: 2022-07-30 20:52:00

Today, I will share with you how I make the web apps I build using react.js (javascript library) responsive across multiple devices.

First of all, I use `bootstrap v5` but that is not all, I have added some custom css styling that target the elements in my react web app that make my projects responsive across all platforms.


![BMC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tcnz5utcdugffuzgjwbr.gif)

Here is my css styling, you should add this to your `index.css`

```css
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
}

body {
    min-height: 100vh;
}


.App {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
}

.section {
    background-color: whitesmoke;
    border: 1px solid blue;
    flex: 1;
}

```

with this few lines of code, I am able to **write once, run anywhere** and it will still be responsive.

**bootstrap 5**

I still use bootstrap grid system to make my project responsive. 

```html

 <section className="section">
        <div className="container">
            <div className="row">
             <div className="col-md-6">
                <div>
                   <p>I really like the female footballer sam kerr</p>
                </div>
             </div>
           </div>
        </div>
</section>           
```

**source code**
You can take a look at my [website](https://ifeanyi-crypto.netlify.app)

**Thank You**

Follow me on [twitter](https://twitter.com/ifeanyiTchima), [github](https://github.com/MasterIfeanyi) and [linkedin](https://www.linkedin.com/in/ifeanyi-thankgod-chima/)

<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Rod cutting Problem (similar to unbounded knapsack)
Tags: java, algorithms, dp
Published: 2022-07-30 20:31:26

**Problem**:
Given a rod of length `n` units, the rod can be cut into different sizes and each size has a cost associated with it. Determine the maximum cost that can be achieved by cutting the rod and selling it in the market.

```java
import java.util.*;
public class Solution {
	public static int cutRod(int price[], int n) {
        //intuition 
        /*
        Since, we have to maximize the profit by cutting the rod in different length
        let say length of the rod is 5
        and the prices for cutting in different lengths are : 2 5 7 8 10
        so we will have to keep on picking lengths(we could take a length any 
        no of times to maximize the profit of selling the rod) until there is no more length is left to be picked from;
        This is exactly similar to unbounded knapsack problem:
        */
        int dp[][] = new int[n][n+1];
        for(int row []: dp) Arrays.fill(row,-1);
        return maxProfit(n-1,price,n,dp);
	}
    public static int maxProfit(int index, int[] price,int target,int dp[][]){
        if(index==0){
            return (target/(index+1))*price[index];
        }
        if(dp[index][target]!=-1) return dp[index][target];
        int take = 0;
        if(target>=index+1){
            take  = price[index]+maxProfit(index,price,target-(index+1),dp);
        }
        int dontTake = 0 + maxProfit(index-1,price,target,dp);
        return dp[index][target] = Integer.max(take,dontTake);
    }
}
```
Diagrams are the ultimate engineering tool
Tags: programming, design, beginners, productivity
Published: 2022-07-30 20:13:35


Since I was a little kid, diagrams have fascinated me.
As I grew as a software developer, I discovered how much more there is to them.

![Good Will Hunting drawing diagrams on a blackboard](https://media.giphy.com/media/4PQMn0gNTzJ0k/giphy.gif)

## Diagrams are engineering tools

Diagrams are visually beautiful. They also embody the promise of a hidden, complex yet elegant mathematical underworld. An image can replace 1000 words – a diagram can replace 1000 ideas.

Diagrams are everywhere:
- business strategy
- chemical processes
- control systems
- project planning
- fantasy football
- category theory
- database schemas
- electrical circuits
- ...

Diagrams are not only omnipresent across disciplines. They are pervasive within disciplines. When we collaborate, ideate, and write documentation, we create diagrams. They are immediate and malleable.
Changing an arrow to point from A to B instead of C; drawing a box around E and E – a user can make drastic changes instantly.

That diagrams are ubiquitous is not a coincidence.

## Diagrams are the way humans model the world

Diagrams are usually about the same size: five to ten objects connected by at most a dozen arrows. More complex relationships require nesting.
Us humans need abstraction to break things down into manageable amounts of "things."

Arrows compose: an arrow from A to B, followed by an arrow from B to C means that changing A will impact C.
We understand the world causally: if arrows didn't compose, the diagram wouldn't make sense.

Feedback loops are immediately visible. Participants with no formal background understand that something special is happening.

Research in category theory shows that many diagrams correspond to categories. Often, these are symmetric monoidal categories.

## Diagrams allow us to work across disciplines

The implications are enormous. Engineers in one field can make significant contributions to other fields. They are experienced working with similar diagrams. Questioning what an arrow means in a state machine diagram, pointing out that a connection is missing: these are incredibly subtle and valuable insights. Yet people with no software background routinely make these observations.

## Diagrams are powerful

Take diagrams seriously. They are the most powerful software engineering technique I know.

How do you use diagrams in your work?

(Cover image by [Jazz Di Mauro](https://www.flickr.com/photos/jazzmasterson/))
How I used an open source mentality to dig my path forward through school
Tags: opensource
Published: 2022-07-30 19:48:00

I like to believe I have been always involved in open source. Even as a kid and a student.

When I was in school, I came up with an "open source"/"open collaboration" methodology to finish my homework fast with little effort. Back then I had no clue what open source was - but now I can find a parallel line of thinking between the two.

Here is how it would work:
Given a certain homework of 4 parts, I would start working on a part it, maybe do Part A) and B).

Then I would ask someone else in my class to do part C) and D)

Then ask someone else to verify all of A), B), C) and D) - did all parts make sense? 

If so, then great homework done for everyone. This applies to most homework in a way or another

This could scale further...depending on the amount of work required.

Everyone who'd have collaborated on the homework would at that point have the full answer.

It was part of the process - if you're part of the "homework project", you get full access to the full homework.

Strength in numbers?

In the end,  before submission everyone would just take all of the work done as a group, change it a little bit & submit it.
Worked. Every. Single. time.


![Copy meme](https://i.kym-cdn.com/photos/images/original/001/208/136/6b6.png)

Homework done. Open source style.

Was this legal at school? Probably not.


## Later in life

In the world of software however, collaborating in plain sight is absolutely rewarded. 

Open source works pretty much just like that.


I have a couple of open source projects under my belt, some a little successful other, not so much. (if you're interested check my Github [here](https://github.com/orliesaurus)
Open source to me, has always been an interesting concept:

- I build something that I think is useful
- I put the code in the public domain
- Other people CAN use my code for free to solve their problems faster
- People can help me make the code better
- [Repeat this a few tens of times]
- Eventually, the next person that uses the project has a much better experience


...but can someone make a living out of it?

That's something I will explore in the next piece!

## What about you?
🤔 Have you worked hard through school, or did you work smart?
Was the approach you took worth it?
Let me know in the comments!
Do I regret moving to London?
Published: 2022-07-30 19:30:26

I moved to London from Poland to work as a software engineer at [Intercom](https://www.intercom.com/). 

A year later, I was asked whether I regret my decision to move here.

Watch this video to find out:

{% embed https://youtu.be/V3sK98xVR28 %}
What is a custom hook in React JS?
Tags: react, hook, functionalcomponent, classcomponent
Published: 2022-07-30 19:25:00

Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class.
**When we want to share logic between two JavaScript functions, we extract it to a third function.**
 Both components and Hooks are functions, so this works for them too! A custom Hook is a JavaScript function whose name starts with ”use” and that may call other Hooks. Unlike a React component, a custom Hook doesn’t need to have a specific signature. We can decide what it takes as arguments, and what, if anything, it should return. In other words, it’s just like a normal function. Its name should always start with use so that you can tell at a glance that the rules of Hooks apply to it. for example :

```
import { useState, useEffect } from 'react';

function useFriendStatus(friendID) {
  const [isOnline, setIsOnline] = useState(null);

  useEffect(() => {
    function handleStatusChange(status) {
      setIsOnline(status.isOnline);
    }

    ChatAPI.subscribeToFriendStatus(friendID, handleStatusChange);
    return () => {
      ChatAPI.unsubscribeFromFriendStatus(friendID, handleStatusChange);
    };
  });

  return isOnline;
}
```
As you can see, we can use other hooks in our custom hook.
AI Identification- Variables in Physical Concepts
Tags: aiidentification, ai, identification
Published: 2022-07-30 19:18:02

AI identification has reached that point in the world where AI programs can now help identify variables in physical concepts. AI Identification Variables are always necessary to understand any physical phenomena. While most physical connections contain factors that scientists are aware of, a few have remained mysterious. Researchers from Columbia University have now created software that watches such physical occurrences and recognizes the pertinent factors using artificial intelligence (AI)....

https://hecodesit.com/ai-identification-variables-in-physical-concepts/
React Functional Components
Published: 2022-07-30 19:13:00

As you start out learning React, you may have came across React components and became confused. I hope by reading this, you can gain more clarity. As such, I will break down what a React component is, why it's used, and how it's used with a few examples. 

## 
**What is a React component?**
It's simply building blocks being used to break down and simplify how a website works. For example, in the image below, you can see how the Google page is broken down into several parts like Logo, WordBox, SearchButton, etc. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8ttnt69qgupv1f3imao.png)

## 
**Why would anyone want to do that?**

By breaking down a website with components, it makes it easier for the coder to identify and update any mistakes made. One of the main benefits in using components, is being able to save time by reusing components. These are just a few reasons to use components, but if you want learn about more then I would suggest clicking [here](https://www.uxpin.com/studio/blog/reactjs-benefits-and-components/).

## **Functional Components**

Functional components are javascript functions that must start with a capital letter. They usually pass in properties, also known as props. To learn more about props, I would suggest clicking [here](https://www.w3schools.com/react/react_props.asp). A example of how a functional component looks:

```
function WordBox(){
  return <div>Hi!</div>;
}
```
Another way functional components are written are like this:

```
const WordBox = () => <div>Hi!</div>;
```
There is always some top level component and most often it is a component called App. With any component, it can call other components as well. For example, 

```
function App(){
  return (
     <div>
      <WordBox/>
      <Logo/>
     </div>
   );
}
```
You can see that it's calling the component WordBox we used in the example above and Logo as a component in the picture shown above.

## 
**Rendering Components**

In order for the components to show, it needs to be rendered using ReactDOM.render() method. Most often there is a file called index.js where ReactDOM.render() is used, although the file name doesn't have to be called that. The method will pass in the **top level component** as the first argument, and then pass `document.getElementById("root")` in the second argument. For example, 

```
ReactDOM.render(<App />, document.getElementById("root"));
```
You can see here that the component App, the top level component, is being called. With `document.getElementById("root")`, it is getting the element in the HTML file, that you will need to create, with the ID of root. To learn more about the HTML file, I would suggest clicking [here](https://www.w3schools.com/react/react_render.asp).

I hope this provided clarity for you and good luck coding! 

Sources used:

-[Picture image](https://blog.devgenius.io/java-script-lets-talk-react-basics-322629bb6e62)
-https://reactjs.org/docs/components-and-props.html
-https://www.geeksforgeeks.org/reactjs-components/
Las 5 mejores sartenes del mercado
Published: 2022-07-30 19:01:03

Las sartenes son una herramienta de cocina imprescindible. Se utilizan para muchos propósitos diferentes, desde cocinar hasta hornear y más.

Las sartenes son uno de los utensilios de cocina más utilizados. Vienen en una variedad de formas y tamaños, por lo que puede ser difícil elegir el mejor. Es por eso que hemos elaborado esta lista de las 5 mejores sartenes del mercado actual.

Las sartenes vienen en muchas formas y tamaños diferentes, por lo que es difícil saber lo que necesita sin probarlas usted mismo. Es por eso que hemos elaborado esta lista de [las 5 mejores sartenes del mercado](https://ready4read.page/mejores-sartenes-moneta/) actual.