teleren/devto huggingface dataset:
Diving into Dev Tools
Tags: javascript, beginners, programming
Published: 2021-11-04 15:43:25

So if you have made it this far in your coding career to have stumbled upon the concepts of Dev Tools you have probably been debugging your code like a caveman using the primitive console.log() method... If that is the case then today I come to you bearing gifts, the gifts of Developer Tools!!!!

There are many different task you can perform with the wide array of DevTools Available to you for the purpose of todays post we will discuss them in relation to debugging your code.

The first section of the Dev Tools toolbox we want to get familiar with is going to be the sources panel. To get there we want to right click on the page in google chrome and click inspect page... alternatively you can press Command+Option+I (Mac) or Control+Shift+I (Windows, Linux). Once the Dev Tools panel appears you can click on the sources tab, and wal lah...

The sources panel is comprised of 3 parts. The first is called the File Navigator pane which list every file that the page request. The second being the Code Editor which displays the contents of the files we selected with our File Navigator. The third part being the JavaScript Debugging pan which is comprised of multiple tools used inspecting the pages javascipt.

As apposed to console.log()ing every time we want to see whats going on with our code through the help of Dev Tools we can now add breakpoints at specific parts of our code and accomplish the same task only far quicker.

With DevTools we can use EventListnerBreakpoints to pinpoint specific events in our code which can help us debug quicker and with more accuracy when utilized correctly. This is simply one of the many breakpoint types available in your ToolBox.

Another useful trick in our ToolBox is ablility to step through and even over certain blocks of code and function calls. This gives you the power to use a breakpoint and stop the code even closer to your actual error or bug.
Github's co-pilot made me super excited!
Tags: javascript, github, githubcopilot, webdev
Published: 2021-11-04 15:37:11

As I was browsing my inbox yesterday, I noticed that my application to use Github Co-pilot was accepted. I immediately opened VS Code and tried some simple snippets. To my surprise, it worked exactly as expected! For example, typing just a snippet beginning with the word
*calculated*, it automatically generated a function! 

I have to say I was impressed, and enjoyed playing around with it for half an hour or so, but it was only after next day that I really used it and appreciated it.

You see, first thing I did after arriving at work in the morning, was to activate the extension on VS Code. I also tried a few snippets and that was it. 

As I kept coding and coding, the more thrilled I became. It is really amazing. No, it won't take your job and I am not afraid of it, because all it does is to automate the boring *snippet search on stack overflow* . And it does a pretty good job at it. 

The more i use it, the more i love it, and the reason is that it makes me focus on the logic behind the code, rather than the syntax implementation. Don't expect it to finish of your all days work or complete that demanding task in no time, just realise that is here to help. 

After all, your mind and analytical thinking is still needed, and won't be deprecated anytime soon for any copilot-like solution.

Thanks for reading!
REACTivating
Published: 2021-11-04 15:20:55

I took an in-person React class with a few co-workers back in 2017. It was winter, the classroom was poorly insulated, and I was a few months pregnant so I was fighting through some distracting abdominal pains. My JavaScript skills were lacking so lots of it didn't sink in. For my final project I attempted to build a game (lofty goal!): Munchkin Loot Letter. It's a very simple card game but when I tried to translate it into code I became lost in all the logic! Needless to say, the app was a flop and never really got off the ground. I tend to love (and get caught up in) styling but when it comes to making things function I get frustrated and give up.

My goal after completing Scrimba's [Learn React for Free](https://scrimba.com/learn/learnreact/) and [The React Bootcamp](https://scrimba.com/learn/react/) courses is to actually build this game. I want to impress myself and my wife who is a fellow Munchkin Loot Letter aficionado!

I'm about halfway through the free React course and I'm really enjoying it. I've got a bug in my To Do List App but I'm moving on and hoping I can come back to it later!

_Next day update: I fixed the bug! It was a one character error. I was returning "todo" instead of "todos!" Ahhhh! So relieved to have figured it out._
Could you tell the issue?
Tags: php, laravel, database, help
Published: 2021-11-04 15:05:47

![Laravel eloquent query](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1oa9jiyl0fysy0p4e5sv.png)
Hey thank you for reading and helping me :)
The above Laravel eloquent queries giving different result. Could you tell the difference? I am one step away from pulling my hair .
COP26 Website emissions? Appalling.
Tags: sustainability, performance, webdev, climate
Published: 2021-11-04 15:02:23

Like many people worldwide, I'm awaiting the conclusion of the COP26 climate conference this week in Glasgow with hope, and not a little apprehension. Unfortunately, a case of the flu meant I was not up to having a look at the official website until this morning.

The first thing I noticed when visiting the [COP26 homepage](https://ukcop26.org/) was how long it took to load, not a good sign for such a critical website. As we know, slow websites are generally polluting websites, and I immediately ran it through the [website carbon calculator](https://www.websitecarbon.com/). The most recent test was from the <time datetime="2021-07-08">8th of July</time>, and came in at 5.70 grams of CO<sub>2</sub> per page view; or worse than 94% of sites tested by them so far - not a good start for the official website of the conference that has been described as "'the last chance saloon' to save the world from runaway climate change".

<figure>
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mcryuo23re1az7ch36z7.png" alt="This web page is dirtier than 94% of web pages tested. It looks like this web page uses bog standard energy." loading="lazy" />
<figcaption>
Carbon results for ukcop26.org on <time datetime="2021-07-08">8th of July, 2021</time>.
</figcaption>
</figure>

Wanting to get some more up to date figures, I decided to re-run the test, but it timed-out; generally a sign of very poor performance. [PingdomTools](https://tools.pingdom.com/) reports the homepage as having a total page weight of over <strong>18 MB</strong>. Manually running the Carbon Calculator formula on that figure results in just under <strong>11 grams of CO<sub>2</sub></strong> per page view. So not only was the site bad to begin with, it now emits almost double the amount it did in July.
<figure>

- 18.1 MB = 18,100,000 bytes.
- 18,100,000 when multiplied by repeat visits = 13,665,500 bytes per page view.
- 13,665,500 at 1.805 kilowatt-hours of electricity per gigabyte of data = 0.022972215 kWh per page view.
- 0.022972215 * 475 grams per kWh = 10.911802125 grams of CO<sub>2</sub>e per page view.

</figure>

Website emissions are not something that people are widely aware of, but it is disappointing nonetheless that the website does not even appear to run on clean energy. It might also have been hoped that when developing a website for a major climate summit, carbon emissions would have been taken into account. COP26 is all about setting examples, and its website sets a very poor example indeed.

I have reached out via phone and email to the summit to make them aware of this, and have also tried to get in touch with Alok Sharma, the summit president. I will of course update this if I get a response.
Cloud: IO limits gone full circle
Tags: postgres, performance, cloud, tuning
Published: 2021-11-04 14:15:53

In the old days we used rotating disks, which had mechanical arms moving over the surface to read data, which meant there was a certain latency before data could be obtained, and a limited amount of bandwidth. The solution for getting more bandwidth was to use more disks (RAID). Still the overall usage was essentially bound by IOPS because of the mechanical arms/attenuators. (there was other storage media before that, but that is outside of the scope of this article)

Then came the solid state disks (SSD). Because these do not use mechanical, rotating disks, the latency is severely limited. In fact, this was such an improvement that the existing access protocols were found to be limiting SSD and new protocols were needed to take advantage of parallelism and bandwidth that was made possible by SSD (such as multipath IO and NVMe). Of course new storage (technology) comes with their own problems, but that is beyond the scope of this article.

Fast forward further in time and we enter the cloud era. Now we can rent a (virtual) machine, and elastically scale up and down, and let all these properties that we have obsessed about in the past, such as the number of disks, disk failure rates, bandwidth, etc. be the problem of the cloud vendor, we can just use the infrastructure...

Or can we? If you carefully look at the specifications of the virtual machines of all major cloud providers, you will notice that a cloud machine shape has obvious limits such as number of vCPUs and memory, but also has limits on disks, both on the layer of the virtual machine, as well as on the disk.

The disk limits being less obvious also gives me the impression that these are put in such a way that makes it easy to miss these.

But that is not what I wanted to discuss: if you look and work out the information about IO limits for a cloud machine shape together with one or more disk devices, you will notice that the IO limits of especially the smaller machine shapes are quite low.

In fact...if you take the IO limits of such machines, it leaves an impression with me that we essentially are back at the disk limits of the time of rotating disks. 

But it's not all nostalgia: there is another side to this; this means that disk IO sensitive applications that have to use these machines have to be tuned for limited IOPS again, and cannot assume close to unlimited amounts of IOPS and bandwidth, using tuning such as using large IOs to be able to reach bandwidth, because parallel usage of small IOs will run into the IOPS limit.
Delay between retries for Supervisor
Tags: supervisor, delay, unix, programming
Published: 2021-11-04 13:36:13

Having process managing tools on current systems is a must have. The most common used, or at least the tools I have been using, are `systemd` and `supervisor`.

While both do basically the same, `supervisor` is lacking one crucial ability: _The ability to have a delay between process restarts_

While this is not always necessary, in some cases it will prevent your process to get into `FATAL` state which stops it altogether.

But why isn't there such an option?

## The solution already exists
The problems is not that it is impossible to add such a feature, but rather that the maintainers need to merge and maintain it.

There already exists a [feature request from 2014](https://github.com/Supervisor/supervisor/issues/487) and the solving [pull request from 2015](https://github.com/Supervisor/supervisor/pull/659) which, to this time of writing, haven't been merged.

I have to make clear: I am not blaming the maintainers for not merging it. It is simply a matter of time from the maintainers.

## How can you still add a delay
To still add a delay you need to get somewhat creative.
While searching for a solution I found the feature request for supervisor (see above), this mentions a solution to use a `sleep X` after your `command` for your supervisor process.

```
[program:www]
command=bash -c "<path to your script>; sleep X"
```

While this might work, the problem is that supervisor can not gracefully stop this process using a `SIGTERM` signal. The `SIGTERM` will only hit your `bash` command, but not your actual script.

So what can you do?
While reading further into the feature request if found a pull request to `symfony/messenger` component, here the author added a script which actually is capable forwarding the `SIGTERM` signal into the child process.

You can find the PR here: https://github.com/symfony/symfony-docs/pull/13597

Extracted from this PR, the scripts looks as follows:

```bash
#!/bin/bash

# Supervisor sends TERM to services when stopped.
# This wrapper has to pass the signal to it's child.
# Note that we send TERM (graceful) instead of KILL (immediate).
_term() {
    kill -TERM "$child" 2>/dev/null
    exit 1
}

trap _term SIGTERM

# Execute console.php with whatever arguments were specified to this script
"$@" &
child=$!
wait "$child"
rc=$?

# Delay to prevent supervisor from restarting too fast on failure
sleep 30

# Return with the exit code of the wrapped process
exit $rc
```

So the "only" thing you need to change is to prepend this wrapper in front to you previous command:

```
[program:www]
/path/to/wrapper <path to your script>
```

This way every `SIGTERM` will passed into your script and will exit as soon as the child is terminated. If you child process will die with some exit code larger 0, it will sleep for 30 seconds before exiting. After that period, supervisor will restart it again.

---

Credits goes to the authors of both pull requests as they have done the work already. I am just a messenger :)
My new blogging journey
Published: 2021-11-04 13:27:46

... and so, my new tech blogging journey begins! 

I'll be dedicating some time to start posting content related to some of my main technology interests around software engineering, and in particular around topics like:

* Python and .NET development
* DevOps
* Data engineering

And I shall start proceedings with a detailed explanation of how to get your blog posts on various different platforms and into your own static website at no cost

Keep watching this space!
Excel Formulas to Check register balance in Excel 365!!
Tags: excelformula, excelformulas
Published: 2021-11-12 04:06:38

---
title: Excel Formulas to Check register balance in Excel 365!!
published: true
date: 2021-11-04 13:20:06 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-check-register-balance-in-excel-365/
---

Previously, we have seen the formulas to **[check multiple columns are equal in Excel 365](https://geekexcel.com/how-to-check-multiple-columns-are-equal-in-excel-office-365/)**. Similarly, here we will show the formulas to  **check register balance in Excel 365**. Let’s learn the new formula given below!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## Generic Formula

- To check register balance, you have to use the following  **formula**.

```
=balance-debit+credit

```

## Syntax Explanation

- **Plus operator (+)** – This symbol is used to add the values.
- **Minus Operator (-)** – This symbol will help to subtract any two values.

## Practical Examples

- For instance, you have to  **create a sample data**  in Excel.

![](https://geekexcel.com/wp-content/uploads/2021/11/Sample-data-11.png)
_Sample data_

- To generate basic outline numbering, you need to use the following formula in **[formula bar](https://geekexcel.com/how-to-use-formula-bar-for-various-purpose-in-excel-365/)**.

```
=balance-debit+credit

```

![](https://geekexcel.com/wp-content/uploads/2021/11/Use-Formula.png)
_Use the Formula_

- Then, you have to  **Hit the Enter key**  to get the result as shown below in the **cell G6**.

![](https://geekexcel.com/wp-content/uploads/2021/11/Result-in-cell-G6.png)
_Result in the cell G6_

- Now, you need to  **press Ctrl+D key**  to get the results in all other columns.

![](https://geekexcel.com/wp-content/uploads/2021/11/Output-5.png)
_Output_

## Closure

In this post, you can get some clarification about the formulas ** ** to **check register balance in Excel 365**. If you have any other  **ideas**  or  **questions** , do share them with us here in the  **comment**  section below. Thank you so much for Reading!! For more updates, check out our website **[Geek Excel](https://geekexcel.com/)!! **And [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

**Keep Reading:**

- **[Excel Formulas to Check If the Cell Value is NOT This or That!!](https://geekexcel.com/excel-formulas-to-check-if-the-cell-value-is-not-this-or-that/)**
- **[Excel Formulas to Check Multiple Cells have Same Value!!](https://geekexcel.com/excel-formulas-to-check-multiple-cells-have-same-value/)**
- **[Formulas to Check If the Cells Contain Certain Text!!](https://geekexcel.com/excel-formulas-check-if-cells-contain-certain-text/)**
- **[How to Create an Array of Numbers in Excel Office 365?](https://geekexcel.com/how-to-create-an-array-of-numbers-in-excel-office-365/)**
- **[Excel Formulas to Check Date is Same Month ~ A Complete Tutorial!!](https://geekexcel.com/excel-formulas-to-check-date-is-same-month/)**
Segurança no React Native
Tags: javascript, reactnative, security
Published: 2021-11-04 13:17:43

No dia 28 de outubro de 2021 aconteceu o primeiro meetup da [GOK](https://gok.digital/), nele eu e o [Emerson Souza](https://www.linkedin.com/in/emersonsouzadev/) falamos sobre segurança no React Native.

> Hey, eu atualizei esta postagem no [meu blog pessoal, veja agora!](https://www.tuliocalil.com.br/post/seguranca-no-react-native)

Alguns pontos abordados foram:

- Proteção contra Root e Jailbreak.
- Obfuscação de código.
- Encriptação de dados.
- SSL Pinning.
- Protegendo variáveis de ambiente.
- Fluxo de CI/CD seguro.
- Serveless functions para proteger API Keys.
- Obervabilidade.

O evento foi gravado e você pode assistir aqui:

{% youtube aJ3U1m9LHYo %}

E você encontra o repositório contendo o código de tudo que foi usado aqui:
{% github gok-dev/meetup-react-native %}

Espero que gostem!
Ah, claro: [TEMOS VAGAS](https://jobs.kenoby.com/gokdigital)
Kids + Reading = Fun?
Published: 2021-09-20 02:05:15

Little Johnny sits at home. Mom is cooking dinner while on the phone with a client from her job. Dad is outside mowing the lawn. Neither really has time to engage little Johnny. So what is a parent to do? If you're a modern family you have probably given you child a tablet, phone, or even a laptop. Little Johnny now spends all his time, when not engaged at school, playing the latest games online. Watching Youtube to laugh at the same funny little clips that his friends enjoy. This whole time little Johnny is lacking a very basic necessity for his growth. Connection.

This is what the people are Scribble stadium are trying to accomplish. They aim to create a fun interactive experience that kids can use to connect with each other and express themselves through art and writing.

Joining this team has been a great experience for me. I joined fairly early on in the development of the project. My job, as well as that of my fellow developers, was to create a bot. A virtual player that would play along with kids if there was not enough players.

This presented a lot of challenges. I hadn't programmed in over two months at this time and had to almost re-learn Node.js from scratch. On top of that, I had to learn how to create a bot, which I'd never done before. Needless to say it was a tough time for everyone.
Por que escrever é importante pra sua carreira?
Tags: video, career
Published: 2022-02-16 21:40:47

---
title: Por que escrever é importante pra sua carreira?
published: true
date: 2021-11-04 12:46:00 UTC
tags: video,career
canonical_url: https://blog.lsantos.dev/por-que-escrever-e-importante-pra-sua-carreira/
cover_image: https://raw.githubusercontent.com/khaosdoctor/blog-assets/master/images/2021/11/Thumb.png
---

E temos vídeo novo no ar! Você pode dar uma olhada nele lá no YouTube! Hoje é dia de a gente falar sobre carreira com escrita de artigos!

{% embed https://www.youtube.com/watch?v=m7aFhdjGujM %}

### Referências citadas

- [Artigo original](https://medium.com/@khaosdoctor/como-e-por-que-todo-dev-deveria-escrever-artigos-1f8b9ba74d4)
- [Artigo bacana sobre por que não escrevemos artigos](https://dev.to/danianepg/seis-motivos-para-nao-escrever-artigos-bjc)
- [Microsoft Editor](https://www.microsoft.com/pt-br/microsoft-365/microsoft-editor)
- [Grammarly](https://www.grammarly.com/)
- [Extensão ReadTime](https://marketplace.visualstudio.com/items?itemName=johnpapa.read-time)
- [Meu artigo sobre organização pessoal](https://dev.to/khaosdoctor/o-guia-definitivo-da-organizacao-pessoal-parte-1-44ea)

### Links dos meus blogs

Como eu falei, eu gosto bastante de escrever, então que tal dar uma lida em outros blogs que eu tenho?

- [Medium](https://medium.lsantos.dev)
- [Dev.to](https://dev.to/khaosdoctor)
- [FreeCodeCamp](https://www.freecodecamp.org/news/author/_staticvoid/)
Saying goodbye to The .NET Stacks
Tags: dotnet, csharp, azure
Published: 2021-11-04 13:28:26

---
title: Saying goodbye to The .NET Stacks
published: true
date: 2021-11-04 12:42:14 UTC
tags: dotnet, csharp, azure
canonical_url: https://www.daveabrock.com/2021/11/04/bye-dotnet-stacks/
---

I wanted to write a quick note to let everyone know that I will no longer be producing _The .NET Stacks_. This does not mean I'll be going away or leaving the wonderful .NET community—it just means I'll be producing content in other ways.

I wouldn't call the newsletter a smashing success by any means, but was thrilled that something I started while bored during a pandemic grew to a few thousand readers every week on various mediums (whether over e-mail, _dev.to_, or _daveabrock.com_). I'm grateful to all of you for reading and being so supportive—and if it helped you, I'm even happier. It's been a lot of fun and I've even "met" quite a few friends along the way, even if we've never physically met.

I initially set out to produce something more substantive and not a weekly thing where I send out links every week, as I felt there wasn't a lot of that out there. I wanted to write about trends and topics, and interview folks, and provide a little more context. I quickly realized why there wasn't a lot of that out there: it's so much work to do that on a weekly basis, week in, week out.

With a busy personal life, I'm passionate about community work but with limited time. I did a lot of work to automate things as I could, but _The .NET Stacks_ doesn't leave time for any other community work or projects that I'm passionate about. To me, I could either slim down the newsletter and its quality and make it easier to manage, or focus work in other areas. I've chosen the latter.

It's hard to believe I've produced 70 weekly issues over 18 months, and have used the newsletter to ramble about .NET to the tune of about 104,000 words. Thanks to you all: thanks for reading every week, and thanks for those of you who have emailed me nice words or to ask if I've lost my marbles—both valid, by the way—and thanks for listening. I hope you'll continue to keep up with me at _daveabrock.com_. Talk to you soon and keep in touch.