teleren/devto huggingface dataset:
How Can I Prepare for a Coding Bootcamp?
Tags: anonymous, discuss, help
Published: 2022-08-09 16:13:08

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment or if you want to ask your own anonymous question._ 

***

Hey, DEV! Gonna start a coding bootcamp soon. I have a Bachelor's Degree in an unrelated field, but I graduated around 8 years ago, so I've forgotten what it's like to be a student. 

Are there any tips for excelling at a bootcamp for beginners? I feel like it's going to be overwhelming, so I want to do all that I can to get prepared for it. 

Thanks, DEV!
Terminal is your friend
Tags: bash, comment, productivity, javascript
Published: 2022-08-09 16:13:00

I work with javascript/typescript projects, some weird reason using terminal is significant part of my daily activity.

Sometime I almost forget which command are used. So I search which is the best way to document my important activity. My solution is extend any command with `&& echo :: <comment>`. This is original bash solution, and easy to find by grep find below.

```bash
du -h -d 1 && echo :: size of directory
```

```bash
history 0 | grep ::
```
Alis can make your life easier. You can add following line to `~/.zshrc`
```bash
alias h="history 0 | grep"

# or if use rg : rip-grep instead grep

alias h="history 0 | rg"
```
then you can wirte for example `h clone` to list your git clone links.

I use mac so I installed near every program by brew, and this is also help to remember outer application.

```bash
brew list
```

```bash
brew install zoxide
```

Few words about [zoxide](https://github.com/ajeetdsouza/zoxide): this is hyperspace navigation throught directory.

![zoxide hyper speed cd command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baxun6x9er3s2463olsw.gif)

After installed for example to `~\.zshrc` by this:
```bash
eval "$(zoxide init zsh)"
```

You can use as smart cd, for example I have repo directory so:
```bash
z re
```

### Repair/install `code` command on MacOS
My worst experience when I try to fix vscode `code .` command by manually, and accidental ower defined my $PATH so I cant use even the basic ls command. A litle bit hard to fix it the problem, so I wrote this line to remember.

```bash
sudo /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron && echo :: VS Code with sudo rights for install 'code'
```
> VS Code `SHIFT`+`COMMAND`+`P`
![vs code shift + command + P](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9a3f6iuyzrondiy0vvkw.png)
"Managing" a SQLite Database with J (Part 2)
Tags: sqlite, jsoftware, etl, addon
Published: 2022-08-09 16:07:00

*Cross posted from my blog: [Analyze the Data not the Drivel](https://analyzethedatanotthedrivel.org/2022/08/08/managing-a-sqlite-database-with-j-part-2/)*

When faced with unfamiliar program code [Roger Hui](https://rogerhui.rip/), the cocreator of the [J Programming Language](https://code2.jsoftware.com/wiki/Main_Page) would sometimes wipe out all the code comments. He told me this forced him to concentrate on the actual code and not the *opinions* of previous developers. Roger was an exceptional programmer; he knew that program comments are often dated, misleading and wrong. And, the only way to "correct the comments" is to read the code; so why not just read the code and skip the philosophy? Roger's comment purges underscore an important point. However you document your code, *it must be better than the null or empty document.*

With this in mind, I wrote a few versions of this post, but I hated them all. Then I realized that [`jodliterate`](https://github.com/bakerjd99/jacks/blob/master/jodliterate/UsingJodliterate.pdf) PDF documents *mostly* do what I want. So, instead of rewriting [`MirrorXref.pdf`](https://github.com/bakerjd99/jacks/blob/master/mirrorxref/MirrorXref.pdf), I will make a few comments about jodliterate group documents in general. If you're interested in using [SQLite](https://sqlite.org/index.html) with J, download the self-contained [GitHub files `MirrorXref.ijs` and `MirrorXref.pdf`](https://github.com/bakerjd99/jacks/tree/master/mirrorxref) and have a look.

**jodliterate Group Documents**

`jodliterate` group documents are directly generated from [JOD
dictionaries](https://analyzethedatanotthedrivel.org/the-jod-page/) using J, [pandoc](https://pandoc.org/), and LaTeX. Group documents have three major parts.

1.  An overview.

2.  Complete typeset source code.

3.  A global word index.

The source code and index sections are self-explanatory, but a few
remarks about overviews are warranted.

The *overview* might have several subsections. There's usually a
hyperlinked **Interface** subsection. J doesn't have formal interfaces like many programming languages. The words listed in the **Interface** section are words you will use when running the script. The **Interface** section highlights where to get started.

For complex scripts, there is usually a **Using** subsection [`MirrorXref.pdf`](https://github.com/bakerjd99/jacks/blob/master/mirrorxref/MirrorXref.pdf)'s **Using** subsection is typical.

Finally, there might be a **Code Hints** subsection. Code Hints are lists of hyperlinked words that you should heed.

For more, take Roger's advice and read the code.
[Ruby][Sorbet] Where should I put the RBI I wrote?
Tags: sorbet, ruby, rails
Published: 2022-08-21 05:17:31

---
title: [Ruby][Sorbet] Where should I put the RBI I wrote?
published: true
date: 2022-08-09 16:06:14 UTC
tags: ["Sorbet", "Ruby", "Rails"]
canonical_url: https://note.hiko1129.com/posts/1660061174/
---

<a href="https://note-hiko1129-com.translate.goog/posts/1660061174/?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp" target="_blank" rel=”noopener noreferrer”>Translate ja to en</a>

## 結論

sorbet/rbi/shims 以下に置く。

gemの場合には: sorbet/rbi/shims/gems  
(Railsの)appの場合には: sorbet/rbi/shims/app
と言った感じで。

## 根拠

https://sorbet.org/docs/rbi#hand-written-rbis-for-gems には下記が書かれており、

> When rbi-central does not have RBI files for a gem, tapioca init will still have created some autogenerated RBI files for that gem. These autogenerated files are a great way to start off writing hand-written RBIs for a gem! Simply copy the autogenerated file from the sorbet/rbi/gems/ folder to sorbet/rbi/shims/gems, and start modifying it by hand.

https://github.com/Shopify/tapioca#manually-writing-rbi-definitions-shims には下記が書かれている。

> A shim is a hand-crafted RBI file that tells Sorbet about constants, ancestors, methods, etc. that it can't understand statically and aren't already generated by Tapioca.
3d Rotating Slider With CSS
Tags: css, html, webdev, beginners
Published: 2022-08-09 15:44:00

Hello Guys i will show you a beautifull 3d css slider.
It is an automatic moving slider and cannot be controlled manually with next/prev buttons, it is just a design part.

This is the codepen link - 
{% codepen https://codepen.io/shubhamtiwari909/pen/GRxBoRR %}

* It is also responsive and will work on mobile phones and tablets.
* If you get stuck at any line of code feel free to ask in the comment section.

THANK YOU FOR CHECKING THIS POST
^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/javascript-map-with-filter-2jgo

https://dev.to/shubhamtiwari909/e-quotes-3bng

https://dev.to/shubhamtiwari909/deploy-react-app-on-netlify-kl
اشلون ابدي اتعلم برمجة مواقع؟
Tags: web, webdev
Published: 2022-08-09 15:43:48

احلى شي اشوفه بالنسبة للبرمجة هو مدى سهولة ايجاد مصادر لتعلمه من انترنيت. 70% من مبرمجين جميع انحاء العالم تعلموا البرمجة بنفسهم. ايضا اكثر الناس نجاحا في العالم تعلموا البرمجة بدون شهادة جامعية.

هذا البوست الي راح يكون اول بوست انشره و راح احجي بيه عن :

1. خطوات الي لازم تسويه بالبداية
1. مصادر عربية لتعلم برمجة المواقع
2. مصادر انكليزية لتعلم برمجة المواقع


### خطوات الي لازم تسويه بالبداية <u>كنووب</u>
البداية الصحيحة كلش مهم بالبرمجة. بدايتي في تعلم البرمجة هدرت هواي من وقتي بدون معنى و بعدين تندمت ما بديت بداية صحيحة. 


**لو اني ابدي اليوم اتعلم برمجة من جديد شسوي؟**
ا) اتاكد اذا كان برمجة المواقع مناسب. كل انسان اله شغف بمجال معين. و برمجة مجال شاسع كلش. قد يكون برمجة المواقع غير مناسب الك. [شوف هذا الفيديوا](https://www.youtube.com/watch?v=jWJt1MCPKHQ) ورا ما تخلص قراية البوست. اذا بعدك ما مقرر ابحث اكثر بمجالات البرمجة و لا تستعجل!

ب) ورا ما تختار مجال تعلم اساسياته بشكل زين! مثلا ببرمجة المواقع لازم تبدي تتعلم بالتسلسل:
1- html 
2- css
3- javascript
هاي اللغات كل واحد منهم اله غرض معين افهم اول شي شنو معناهم [بهذا الفيديو](https://www.youtube.com/watch?v=z8Y8wyaK2zY)

ج) خلص اساسيات ؟ لازم تبني مشاريع بسيطة و تختبر مهاراتك بيه. مثلا :
1- ابني موقع بسيط لنفسك
2- ابني مشروع موقع ملاحظات
3- ابني مشروع الة الحاسبة

د) بنيت مشاريعك البسيطة ؟ حلو الان امامك خيارين 🥒🥒

🥒خيار الاول : تصير مبرمج واجهات امامية
🥒 خيار الثاني : تصير مبرمج واجهات الخلفية (هي اسمه هيجي مو بايدي 😂)
[هذا الفيديوا](https://www.youtube.com/watch?v=KZwexD0GBUc) فرق بينهم 


### مصادر عربية لتعلم برمجة المواقع
قبل جان صعب تلكى مصادر عربية للبرمجة ولكن بما انوا بدا البرمجة يصير مجال مرغوب بدول وطن العربي فيزداد مصادر تعلمه باللغة العربية يوم بعد يوم. 

**اهم هاي المصادر:**
1. قناة [boodolf](https://www.youtube.com/c/Boodolf) الي بيه كلشي عن برمجة مواقع. ابدا [بهذا](https://www.youtube.com/watch?v=jkCkKquO8AU&list=PLB5t1uuIk_Cgm-D9zz-Oy6vEjyBHg4zHq)

2. قناة العظيم [TheNewBaghdad](https://www.youtube.com/c/hussienahmmed/featured) تابعه يفيدك

3. اكو بعد هواي قنوات عراقية او غير عراقية اخرى تكدر تبحث بيه من يوتيوب "مو كلشي اني اكلك ياه"


### مصادر انكليزية لتعلم برمجة المواقع
لغة الانكليزية في البرمجة اكبر ميزة راح تساعدك بالموضوع. تكدر تتعلم برمجة من مصادر عربية بس مشكلة مصادر عربية قليلة بالنسبة للانكليزي. بالنسبة الي 99% من تعلمي للبرمجة كانت من مصادر اجنبية. بالبداية كان انكليزي مالتي ضعيف لكن اجبرت نفسي اباوع فيديوهات بالانكليزي و اترجم كلمات ما اعرف للعربي و ورا فترة صرت افهم الفيديوا بدون ترجمة. هذا الشي ساعدني هواية بالتعلم و خاصتا الاكواد البرمجية عباراتها بالانكليزي.

### احسن مصادر انكليزية "اذا انت سجاج"
1. قناة [programmingwithmosh](https://www.youtube.com/c/programmingwithmosh/videos)
2. قناة [deved](https://www.youtube.com/c/deved)
3. اكو قنوات بالمىات تكدر تبحث عنه باليوتيوب 
4. موقع [sololearn](https://www.sololearn.com/). طبعا هذا الموقع كل واحد انصحه يبدا منه احسن شي. و عدهم تطبيق موبايل حملوه كلش مفيد
5. [w3 schools](https://w3schools.com/) اي شي تفكر تتعلمه موجود بهذا الموقع
. [codeacademy](https://www.codecademy.com/) هم موقع حلو



> راح انشر بوستات من اليوم عن البرمجة اتمنى تفيدكم.
Live Q&A session on Luos Discord tomorrow at 6:00 PM
Tags: opensource, microservices, help, luos
Published: 2022-08-09 15:43:08

🔴 Live Q&A session on Discord tomorrow at 6:00 PM CEST with Nicolas Rabault. Comment on this post with your question now and we’ll answer it and chat live!

To participate ⏩ https://discord.gg/mbhFNbSDn3?event=1004737808256221184

Save the date, it will be a small friendly event to ask all the questions you want about Luos: upcoming features, vision, best use cases, pros and cons.
Why useEffect is running twice in React
Tags: react
Published: 2022-08-09 15:39:11

If you have created a new project recently using [Create React App](https://reactjs.org/docs/create-a-new-react-app.html)
or upgraded to React version 18, you will see that the [useEffect](https://www.codingdeft.com/posts/react-useeffect-hook/) hook gets executed twice in development mode.

If you are new to useEffect hook, you can read one of my previous articles: [a complete guide to useEffect hook](https://www.codingdeft.com/posts/react-useeffect-hook/).

## Replicating the issue

Create a new react app using the following command:

```bash
npx create-react-app react-use-effect-twice
```

Update `App.js` with the following code:

```jsx
import { useEffect } from "react"

function App() {
  useEffect(() => {
    console.log("useEffect executed (component mounted)")
  }, [])

  return <div className="App"></div>
}

export default App
```

Here we have a useEffect hook and we are logging a message inside it.

If you run the application and open the browser console, you will see the message is being displayed twice.

![two messages in console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pqecvrupagpvi30xu6b.png) 

## Understanding the issue

In [StrictMode](https://reactjs.org/docs/strict-mode.html), starting from React 18, in development mode, the effects will be mounted, unmounted, and mounted again.

This happens only in development mode, not in production mode.

This was added to help React in the future to introduce a feature where it can add or remove a section of the UI while preserving the state. For example, while switching between tabs, preserving the state of the previous tab helps in preventing unnecessary execution of effects like API calls.

We can confirm the behavior by adding a cleanup function to the useEffect hook:

```jsx
import { useEffect } from "react"

function App() {
  useEffect(() => {
    console.log("useEffect executed (component mounted)")
    return () => {
      console.log("useEffect cleanup (component unmounted)")
    }
  }, [])

  return <div className="App"></div>
}

export default App
```

If you run the application, you will see the following messages in the browser console:

![unmount message in console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0plm2ogqm9zj30sg6or.png)
 

## Fixing the issue

If you have read the previous section, this is not really an issue. Hence it doesn't need any fixing.

If you still want to avoid useEffect being called twice, you can remove the `<StickMode>` tag from the `index.js` file.
Serverless: Champions of meetups in July
Tags: serverless, tutorial, techtalks, programming
Published: 2022-08-09 15:38:35

July was overloaded with the [most crowd-pleasing serverless videos](https://blog.meetupfeed.io/serverless-meetups-july-2022/). Take your knowledge to a whole new level with these educational tech meetups. Bury yourself in building apps, infrastructure, persistence and serverless patterns. Until next time!


[The Past, Present, and Future| Jeremy Daly](https://meetupfeed.io/talk/the-past-present-and-future-of-serverless-jeremy-daly)
Since the introduction of AWS Lambda in 2014, “serverless” has exploded into a vibrant ecosystem filled with a multitude of frameworks, services, tools, providers, and practices being adopted by startups and enterprises alike. Let’s take a look at the origins and where we are now. Then we’ll explore how companies are leveraging serverless, the evolving tools and processes they’re using to do so, and the emerging architectural patterns that are changing the way we build software.


[Building Applications with Infrastructure as Code | Talia Nassi](https://meetupfeed.io/talk/building-serverless-applications-with-infrastructure-as-code-talia-nassi)
How do you ensure consistency in your environments? How do you make sure the resources you deploy have the same configurations across different accounts? Infrastructure as code is the answer. In this talk, learn how to develop, debug, and deploy your serverless applications with the command line.


[How to Fail at Serverless (Without Even Trying) | Kam Lasater](https://meetupfeed.io/talk/how-to-fail-at-serverless-without-even-trying-kam-lasater)
Serverless is great. Everyone loves it. We’re not always sure serverless loves everyone. Kam wants to share some of the ways he has failed with apps going from local, to deployed, to running with production workloads.


[Dealing with Persistence in Applications | Marc Duiker](https://meetupfeed.io/talk/dealing-with-persistence-in-serverless-applications-marc-duiker)
Serverless means stateless, right? But surely applications need to persist in some state somewhere. What are the right choices for storage solutions that fit a serverless architecture? Join this session to learn about various options in the Azure cloud.

[Serverless Patterns Made Simple with Real World Usecases | Sheen Brisalis](https://meetupfeed.io/talk/sheen-brisals-serverless-patterns-made-simple-with-real-world-usecases-ndc-london-2022)
Patterns are common in all walks of life. Software architectural patterns are often viewed as complex constructs that are beyond the grasp of many engineers. When mixed with cloud computing and serverless, the perception makes it harder. Textbook-style narratives of serverless patterns often fail to connect with engineers. Sharing a true journey with the community brings authenticity and acts as a great learning platform. In this talk, Sheen will touch upon the experience of working with several applications, associated with a use case that can be easily related to. What better way to equip engineers to be efficient and innovative than sharing the knowledge!
Laravel 9 - Release Update
Tags: laravel, release, news
Published: 2022-08-09 15:34:00

Em 03 de Agosto foi liberado o release 9.23 do framework Laravel 9.

Neste artigo trago um resumo desta atualização.

Boa leitura.

---

##Novidades


> Artisan Docs


É através do Artisan que realizamos grande parte do trabalho de desenvolvimento de aplicações Laravel.

Conseguimos criar classes, executar migrações e testes.

Entretanto, sempre que precisávamos recorrer à documentação era necessário acessar o [site oficial](https://laravel.com/docs/9.x)  buscando pela informação desejada.

A partir deste release foi introduzido um novo comando:

```php
php artisan docs
```

Assim que executado ele trará uma lista com toda a documentação atualmente disponível no site oficial.

Ao digitar um item da lista será aberta uma nova janela do navegador padrão já com a respectiva documentação.

Para acessar diretamente a página da documentação sem visualizar alista de opções bastar digitar o comando `php artisan docs` precedido da documentação desejada, como por exemplo `Redis`.

Também é possível ir diretamente ao tópico desejado.

Por exemplo: `php artisan docs queues redis`

Abaixo o novo comando sendo executado.

{% embed https://youtu.be/ZKpC_U3QaAI %}

---


>DeleteQuietly


Em uma aplicação Laravel o ciclo de vida de um _model_  dispara diversos eventos, possibilitando ao desenvolvedor criar métodos específicos para capturar cada momento.

Para evitar este comportamento em classes que herdam de `Illuminate\Database\Eloquent\Model` é comum utilizar-se do método `withoutEvents()`.

O método `withoutEvents()` recebe como parâmetro uma função de call back tornando silenciosas todas as instruções executadas dentro desta função.

A implementação desta abordagem é relativamente simples como podemos ver no código a seguir:

```php
use App\Models\Product;
 
$product = product::withoutEvents(function () use () {
    product::findOrFail(1)->delete();
 
    return product::find(2);
});

```

Embora já houvessem métodos para salvar e atualizar um modelo de forma silenciosa, respectivamente `saveQuietly()` e `updateQuietly()` faltava o método para deletar, que foi adicionado no release 9.23.

Abaixo um exemplo de código utilizando o novo método.

```php
use App\Models\Product;
 
$product = Product::find(1);
 
$product->deleteQuietly();
```

---

###Bugs

Para usuários do recurso de agendamento de tarefas ([Queues](https://laravel.com/docs/9.x/queues#main-content)) disponível no Laravel esta correção veio em boa hora.

Em cenários com grande volume de tarefas agendadas para o mesmo horário utilizando banco de dados em memória [Redis](https://redis.io/), havia a possibilidade do banco de dados travar.

A correção consiste em limitar a quantidade de tarefas que podem ser adicionadas à fila principal, criando uma fila secundária onde as tarefas agendadas ficam em 'stand by', sendo liberadas de acordo com a disponibilidade da fila principal.

---


Todos os detalhes deste release podem ser vistos [aqui](https://laravel-news.com/laravel-9-23-0).
Hello world
Tags: beginners, vacancies, hiring, recruiter
Published: 2022-08-09 15:28:13

## Hello Dev community,
 My name is Hugo and I'm a recruiter with Airswift, a Global workforce solutions provider. Today, we are an integrated team of 7,000 passionate people from 70 countries. Driven by three corporate hubs in Houston, Manchester and Singapore supporting 70 regional offices.
 I work with I.T. vacancies most for the Major Oil & Gas companies in U.S. and Canada hiring professionals (W2,T4 and INC) to work as our contractors. 
 If you're located in US or Canada, you can contact me by email or LinkedIn.
https://www.linkedin.com/in/hugodopheide/
hugo.dopheide@airswift.com
🔍 How stick element to bottom of viewport on mobile
Tags: javascript, webdev
Published: 2022-08-09 15:23:00

Hi there 👋🏼

Not so long ago I had a task – to fix position the button on the viewport bottom. I spent some time in Figma to draw very beautiful button to stick to bottom of viewport.

In the moment I wrote this

```css
.beautiful-button {
    position: fixed;
    bottom: 0;
}
```

And...it worked!

I was happy of solved task and went to do another. Everything was fine until I insert field. When I click in and I saw keyboard and...my button disappeared. I was so sad.

So, maybe the problem is in the safe area? I try this

```css
.beautiful-button {
    position: fixed;
    bottom: 0;
    bottom: calc(0 + env(safe-area-inset-bottom));
}
```

and this doesn't work too.

I thought that Safari is Safari and go research next.

The first solution that came to mind was calculate the height of the viewport

```javascript
const viewportHeight = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
```

and this doesn't work. Viewport height with keyboard and without is equal.

After googling and colleagues asking I knew about Visual Viewport API (https://developer.mozilla.org/en-US/docs/Web/API/Visual_Viewport_API).

Turns out there is an API to get viewport size.

`The visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page. (MDN)`.

So, my solution will be to use this

```javascript
window.visualViewport.height
```

You can use `window.visualViewport` to listen events

```javascript
window.visualViewport.addEventListener('resize', resizeHandler);
window.visualViewport.addEventListener('scroll', scrollHandler);
```

And use `e.target` to get viewport's parameters.

That's all! My beautiful button is now in the position it should be.

Thank you for reading ❤️
Cleaning Services
Published: 2022-08-09 15:22:53

Local small business operated in San Diego County. 
ABC Home Services specialize in improving you indoor air quality in your home or place of work. We offer few services which will improve the indoor air quality in your house and reduce pollutants, and we also provide few products to help with save on energy costs when using your heating and air conditioning system. 

We service the entire San Diego County in CA. We service Residential & Commercial facilities. Our services offer Air ducts cleaning, [Dryer vent cleaning](https://abchomeservicesinc.com), carpet cleaning and H-VAC maintenance. We have a variety of products we offer to improve your indoor air environment and will help you to reduce energy costs. 

For more information you can check our website and get as much information about our services. If you are a business or a home owner we be happy to provide you with variety of solutions to you how to save on energy costs and improve your indoor air quality. we service all San Diego County, and bring with us 15 plus years of experience in this industry. 

We will be more than happy to assist you in any way we can help or refer you to other professional we affiliate with.