teleren/devto huggingface dataset:
MiniScript Roundup #8
Tags: miniscript, minimicro, scripting, programming
Published: 2023-12-01 23:23:53

Here's this weeks MiniScript news roundup.
https://miniscript.synapticbytes.dev/miniscript-roundup-8


![Robo Reindeer Rumble](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybky9xsyfe14gmbpgszi.png)
Cloud Run - basic logging for your TypeScript app
Published: 2023-12-01 23:21:45

In the [previous article](https://dev.to/subfuzion/cloud-run-typescript-boilerplate-for-getting-started-4gco), you deployed your TypeScript app to Cloud Run.

Cloud Run will capture basic logs based on what you print to `stdout` and `stderr`, generally what you write using `console.log` and `console.error`.

After deploying the app, you can use a new gcloud command that's currently in beta to read or even tail your logs.

First, ensure you've got beta support:

    gcloud components install beta

Or, if you already had it installed, but just want to update:

    gcloud components update

Now you can read your logs:

    gcloud beta run services logs read [SERVICE] \
      --project=[PROJECT] \
      --region=[REGION] \
      --limit=10

You should see something like this:

![log output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgqt4iksqy2tn3kg8ouo.png)

You can also tail your logs:

    gcloud beta run services logs tail blogdemo --project javascript-demos

And, of course, now every time you send a request, you'll see a log entry print to your terminal, similar to this:

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

For the project that you generated in the previous article, update the `logs` and `logs:tail` scripts in package.json with the values you used for `deploy`:

- `[SERVICE]` - the name of your service
- `[PROJECT]` - your cloud project ID
- `[REGION]` - the region you deployed to

Then you can run either `npm logs` or `npm logs:tail`.

## Next

In the next article, you'll see how you can get more value out of your logs using structured logging, which among other things, will help you correlate logs by HTTP request.
Type Conversion and Casting
Published: 2023-12-01 23:01:42

Type casting is the process of converting a variable from one data type to another. In Java, which is a statically-typed language, variables have a specific type, and type casting allows you to change a variable’s type under certain conditions.

In Java, numeric values are typically stored using data types such as int, long, byte, double, and float. Character values are stored using String, char, and boolean for boolean values (true or false).

**Implicit Conversion**

Implicit or automatic conversion occurs when two conditions are met:

the two types are compatible, 

the destination type is larger than the source. 

For example, converting from a byte to a long is implicitly done by Java because the long type is large enough to hold all values of a byte. This is also known as widening conversion.

However, implicit conversion has drawbacks. For instance, if an operation results in a value that cannot be accommodated by the destination type, a compile-time error occurs.

**Explicit Conversion**

On the other hand, explicit conversion occurs when the destination type is smaller than the source type. For example, if a long value is being assigned to an int variable, explicit conversion is required. This is also known as narrowing conversion and is done using type casting with the general form: `(target type) value`.

**Type Promotion Rules**
Type promotion rules dictate the promotion of data types when performing operations. First, byte, short, and char values are promoted to int. If one operand is a long, the entire expression is promoted to long. If one operand is a float, the entire expression is promoted to float. If any operand is double, the result is double. These rules help ensure consistent and predictable behaviour during operations involving different data types.
Newsletter Repost - OpenLampTech issue #107
Tags: mysql, php, webdev, programming
Published: 2023-12-01 23:00:16

MySQL binlog | Laravel exception handling | WordPress plugin context | MySQL GUIs. **OpenLampTech** is a media and content source for MySQL, PHP, and the LAMP stack.

---

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

---
Head over to the **OpenLampTech** page and [grab a free subscription](openlamptech.substack.com) so you don't miss out on any of the great content published each week.
Day 845 : Come Up
Tags: hiphop, code, coding, lifelongdev
Published: 2023-12-01 22:55:35

_liner notes_:
- Professional : Pretty good day. Made progress on the documentation for a new SDK. Had a couple of meetings. Got some clarifications on some things.

- Personal : Went through Bandcamp to plan out what I would by the next day for Bandcamp Friday so that artists get more off each sale. I got all the social media stuff prepped. Did a little coding. Went to sleep. Don't think I watched any anime.

![The mountainous coastline of Mallorca, Spain covered with rocks and pine trees.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y130xoufpxidevyjrc67.jpg)

Going to eat dinner. Come up with ideas to talk about on the radio show. Put together tracks to play. Maybe do some coding and watch some anime. Not sure because it gets so dark so early. Makes me sleepy. haha.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube WL1OONNvW7M %}
Code Smell 233 - Collections Count
Tags: webdev, javascript, programming, beginners
Published: 2023-12-01 22:35:43

*You count collections or collections.count?*

> TL;DR: Chose narrow names

# Problems

- Bad Naming

# Solutions

1. Accurately describe your collections

# Context

Names are significant and should not deceive the reader.

You name things and lose the scope of the name. 

It is important to be accurate of the expected reference on the names.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/75e43eb48e025f1e41e65c1e7439c7b7)
```javascript
const standardModelParticles = {
  quarks: [
    {
      name: "Up",
      charge: "2/3",
      type: "Quark",
    },
    {
      name: "Down",
      charge: "-1/3",
      type: "Quark",
    },
    // ...
  ],
  leptons: [
    {
      name: "Electron",
      charge: "-1",
      type: "Lepton",
    },
    {
      name: "Muon",
      charge: "-1",
      type: "Lepton",
    },
    // ...
  ],
  gaugeBosons: [
    {
      name: "Photon",
      charge: "0",
      type: "Boson",
    },
    {
      name: "W Boson",
      charge: "Â±1",
      type: "Boson",
    },
    // ...
  ],
  higgsBoson: [
    {
      name: "Higgs Boson",
      charge: "0",
      type: "Scalar Boson",
    },
  ],
};
 
const quarks = standardModelParticles.quarks.length; 
// Bad name. It does not represent a count
// But a Collection of things
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/8b0d7ed980f656ff26f070e228fbc760)
```javascript
const standardModelParticles = {
}; // Same as the "Wrong" example
 
const quarksCount = standardModelParticles.quarks.length; 
```

# Detection

[X] SemiAutomatic 

Some linters can check the types and names and infer a mistake

# Tags

- Namings

# Conclusion

Take care of your names.

Use automatic refactor tools whenever you come across a bad name.

# Relations

{% post https://dev.to/mcsee/code-smell-163-collection-in-name-2gif %}

{% post https://dev.to/mcsee/code-smell-134-specialized-business-collections-2bm8 %}

{% post https://dev.to/mcsee/code-smell-33-abbreviations-356o %}

# Disclaimer

Code Smells are my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Sandy Millar](https://unsplash.com/@sandym10) on [Unsplash](https://unsplash.com/photos/a-group-of-three-nesting-dolls-sitting-on-top-of-a-wooden-table-5PCeHBkMCmk)
    
* * *

> Some people are good programmers because they can handle many more details than most people. But there are a lot of disadvantages in selecting programmers for that reason — it can result in programs that no one else can maintain.

_Butler Lampson_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
Wagtail page explorer: redirect to edit if subpages not allowed
Tags: wagtail, django, python
Published: 2023-12-01 21:49:17

When clicking on a page in explorer, it shows a list of its subpages by default. This also applies to page models with `subpage_types = []`. This is confusing, and it's better to redirect the user to the edit page instead of showing him an empty list of subpages. 

To achieve this, we need to create `middleware.py` and add it to `MIDDLEWARE` in `base.py` (for ex. `"pages.middleware.RedirectToEditMiddleware"` if we have our file in `/pages/middleware.py`). 

Here is a code that allows us to fix this issue:

```python
from django.http import HttpResponseRedirect
from django.urls import reverse
from wagtail.models import Page

class RedirectToEditMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        response = self.get_response(request)
        if '/admin/pages/' in request.path:
            page_id = request.resolver_match.kwargs.get('parent_page_id')
            if page_id is not None:
                page = Page.objects.get(id=page_id)
                if not page.specific.allowed_subpage_models():
                    return HttpResponseRedirect(reverse('wagtailadmin_pages:edit', args=(page_id,)))

        return response
````
Understand web Accessibility: how to navigate on the web with disabilities (part 2)
Tags: a11y, html, learning, webdev
Published: 2023-12-01 21:42:58

The [World Health Organization (WHO)](https://www.who.int/health-topics/disability#tab=tab_1) estimates that over 15% of the world's population—or 1.3 billion people—self-identify as having a disability, making this group the largest minority group globally.

## Types of disabilities

- **Visual disabilities**: color blindness, blurry vision, low vision, tubular vision, blind people.

For visual impairments, we may use the magnifier tool, the browser zoom (like zoom at 300%), font sizes, text spacing, line-height and other customizations in the browser. The Windows High Contrast Mode is used for 4% of the Windows devices. Some users will use assistive technologies like audio transcripts or screen readers (Jaws, NVDA or Voice Over) that read aloud the page content (by parsing the HTML code).


- **Hearing disabilities**: deafness or ringing; people will use subtitles or captions for videos and all medias with sound.


- **Motor skills disabilities**: multiple sclerosis, tetraplegia, cerebral palsy, tremors, tendonitis, etc... This type needs to use keyboard navigation or another specific tools, so be careful about the focus visibility or providing a logical order in your pages.


- **Cognitive disabilities**: autism, dyslexia, attention disorders, elderly people, etc... You should take care of providing simple and clear design and layouts, avoid some editorial rules like justified texts or too complexe sentences, use descriptive links and buttons (avoid the "click here" text).


## Temporary disabilities
Digital accessibility also benefits for temporary disabilities such as a broken arm, lost glasses or someone recovering from surgery.

Some situational limitations also: bright sunlight or a noisy environment where reading audio transcripts could be usefull for everyone.
The Ultimate Guide to Buying an Electric Skateboard for Your Commute
Published: 2023-12-01 21:28:08

**Electric skateboards** have become increasingly popular in recent years, as they offer an easy, environmentally friendly way to get around. They are a great alternative to traditional skateboards, and can be used for both commuting and recreational purposes. Before you make a purchase, however, it is important to consider a few key factors, such as budget, range, and safety. This guide will help you make the right decision for your **electric skateboard** needs.

## Set Your Budget

Electric skateboards can range in price from a few hundred dollars to a few thousand. It is essential to set a budget before making a purchase, as it will help narrow down the available options. Consider how much you are willing to spend, and make sure to stick to it. It is also important to factor in the cost of any additional accessories you may need, such as a helmet or protective gear.

## Range Matters

The range of an **electric skateboard** is an important factor to consider, as it will determine how far you can travel on a single charge. If you are using the skateboard for commuting, make sure to choose one that can cover the distance you need to travel. It is also important to consider the terrain you will be travelling on, as this can affect the range of the skateboard.

## Safety First

Safety should always be your number one priority when using an **electric skateboard**. Make sure to wear a helmet and any other protective gear, such as knee and elbow pads, to reduce the risk of injury. Also, be sure to check the laws in your area to ensure you are following the local regulations. Lastly, make sure to read the instructions carefully and practice in a safe area before venturing out.

## Find the Right Board

Once you have set your budget, considered the range, and taken the necessary safety precautions, it is time to find the right board for your needs. There are a variety of **electric skateboards** on the market, from budget models to more advanced options. Consider the type of terrain you will be travelling on and make sure to read reviews from other users. This will help you make an informed decision and ensure you get the best possible board for your needs.

## Conclusion

Purchasing an **electric skateboard** can be an exciting experience, but it is important to consider a few key factors before making a purchase. Make sure to set a budget, consider the range, and take the necessary safety precautions. Lastly, take the time to find the right board for your needs. By following this guide, you will be sure to find the perfect [electric skateboard](https://www.ecomobl.com/blog/electric-skateboard-diy-step-by-step/?utm_source=dev_to&utm_medium=rankking) for your commute.

## References

  * [electric skateboard](https://www.allianceofceos.com/?URL=https://www.ecomobl.com/blog/electric-skateboard-diy-step-by-step/ "electric skateboard")
gnu-on-alpine 3.18.5 and alpine-plus-plus 3.18.5 Released
Tags: docker, linux, github, showdev
Published: 2023-12-01 21:22:42

## TL;DR

I just released [gnu-on-alpine](https://github.com/cicirello/gnu-on-alpine) 3.18.5 and [alpine-plus-plus](https://github.com/cicirello/alpine-plus-plus) 3.18.5, [two lightweight containers for implementing GitHub Container Actions with shell scripting](https://dev.to/cicirello/gnu-on-alpine-and-alpine-plus-plus-two-lightweight-containers-for-implementing-github-container-actions-with-shell-scripting-360i). Both containers are built upon [alpine](https://hub.docker.com/_/alpine) to keep the image size small for fast loading within GitHub Actions, and both are preinstalled with bash, coreutils, findutils, and gawk; and alpine-plus-plus is additionally preinstalled with git.


## Changelog gnu-on-alpine 3.18.5 - 2023-12-01

### Changed
* Bumped alpine to 3.18.5.

## Changelog alpine-plus-plus 3.18.5 - 2023-12-01

### Changed
* Bumped alpine to 3.18.5.


## More Information

For more information, see my earlier post about gnu-on-alpine and alpine-plus-plus here on DEV, as well as their GitHub repositories and project pages. Please consider starring on GitHub.

{% link https://dev.to/cicirello/gnu-on-alpine-and-alpine-plus-plus-two-lightweight-containers-for-implementing-github-container-actions-with-shell-scripting-360i %}

{% github cicirello/alpine-plus-plus %}

{% github cicirello/gnu-on-alpine %}

{% embed https://actions.cicirello.org/alpine-plus-plus/ %}

{% embed https://actions.cicirello.org/gnu-on-alpine/ %}


## Where You Can Find Me

Follow me [here on DEV](https://dev.to/cicirello) and on [GitHub](https://github.com/cicirello):

{% user cicirello %}

Or visit my website:

{% embed https://www.cicirello.org/ %}
Desafios de ser um profissional jr
Tags: career, jr, webdev, ux
Published: 2023-12-01 21:07:56

Primeiro postagem e eu tirando verdadeira poeira daqui desse blog...
o que falar do blog que durante muitas vezes foi minha rede de apoio profissional... é muito difícil voltar á escrever ou pelo menos parece... WHY???
<img width="100%" style="width:100%" src="https://media.giphy.com/media/sG0mwvsyTVP3ZZsfbV/giphy.gif">


Let's talk about estamos em 2023, e como essa é uma história pra lá de clichê (baseada em fatos e contos do cotidiano corporativo comum...)

Antes da trama; onde tudo começou... lá em meados de 2013... quando eu fiz a faculdade de design gráfico, antigo desenho industrial se você é um Baby boomer!
...
eu  nunca me identifiquei com produção gráfica, e fui me envolvendo com o digital no final do curso e lá pra meados de 2016... num sonhado tão tão distante tempo... Cringe! Eu resolvi aprender a programar... e ter meu blog, no qual eu compartilharia todas as minha descobertas do mundo Front-end... onde se passa as telinhas para o código, eu feliz da vida trabalhando com Wordpress numa profissão que é uma espécie de faz tudo para a cria do tio Tim Berners-Lee... WEB DESENHO ou... em outras palavras web design.. ou para alguns web projetista... pois a palavra bíblica do Tio Norman (Apple)( estudioso que surgiu com o termo experiência do usuário) Experiência do usuário ou UX... ainda não tinha chegado ou se popularizado muito, confesso que é uma área nova e essa palavra só foi dita em 1990!!
Mesmo depois de ter sido web designer, foi através dessa profissão que eu pude finalmente conhecer o termo: EXPERIÊNCIA. e... o mais importante: Usuário!
formando um grupo... uma expressão...! Quase uma palavra bíblica e/ou de ordem para quem projeta para web e muitas vezes fora dela.

Passando por alguns hiatos(python) e voltando aos caminhos de origem... resolvi voltar dessa vez o mais Roberto Carlos possível em  O Portal ops... digo : O Portão.(música).

Com um quadro pandêmico e sem oportunidades de estágio pela demanda pós pandemia e trabalho remotos (sim contextualizando a procura por áreas da tecnologia pós pandemia.)

A gente tem que se virar nos 40 para pular o tempo das coisas e a experiência, sendo jr... sem Sandy (a voz doce da dupla)...
Nem tudo é o mar de rosas do the Fevers mas sigamos... para as cenas dos próximos capítulos...
The 5 Best Porcelain Dinnerware Brands Available On Amazon
Published: 2023-12-01 20:48:29

**Porcelain dinnerware** is a timeless classic. It is elegant and durable, making it a great choice for everyday use and special occasions. Porcelain dinnerware can come in many forms, from simple white plates to intricately designed works of art. It is often used for formal events, but can also be used for casual meals. Amazon offers a wide variety of porcelain dinnerware from many different brands. Here are five of the best porcelain dinnerware brands available on Amazon.

### Lenox

Lenox is one of the oldest and most respected porcelain dinnerware brands on the market. Founded in 1889, Lenox has been crafting beautiful tableware and home decor for over 130 years. Their porcelain dinnerware is elegant and timeless, and comes in a variety of styles and patterns. From simple, white plates to intricately patterned designs, Lenox has something for everyone.

### Spode

Spode has been making fine porcelain dinnerware since the late 18th century. Their pieces are classic and timeless, and are perfect for formal dinners and special occasions. Spode offers a wide variety of styles, from classic white plates to colorful, floral patterns. Whether you are looking for something traditional or something more modern, Spode has something for everyone.

### Villeroy & Boch

Villeroy & Boch is a German company that has been crafting fine porcelain dinnerware since 1768. Their pieces are known for their quality and craftsmanship, and come in a variety of styles and patterns. From simple, white plates to intricate designs, Villeroy & Boch has something for everyone.

### Royal Doulton

Royal Doulton is a British company that has been crafting fine porcelain dinnerware since 1815. Their pieces are elegant and timeless, and come in a variety of styles and patterns. From classic white plates to brightly colored designs, Royal Doulton has something for everyone.

### Wedgwood

Wedgwood is one of the most renowned porcelain dinnerware brands in the world. Established in 1759, Wedgwood has been crafting fine porcelain dinnerware for over 250 years. Their pieces are elegant and timeless, and come in a variety of styles and patterns. From classic white plates to intricately patterned designs, Wedgwood has something for everyone.

Whether you are looking for something traditional or something more modern, there is a [porcelain dinnerware](https://malacasa.com/blogs/news/fine-porcelain-dinnerware-exploring-mediterranean-diet?utm_source=dev_to&utm_medium=rankking) brand available on Amazon that has something for everyone. From Lenox to Wedgwood, these five brands offer a wide variety of styles and patterns, so you can find something to suit your taste and style.

## References

  * [porcelain dinnerware](https://forum.lvivport.com/proxy.php?link=https://malacasa.com/blogs/news/fine-porcelain-dinnerware-exploring-mediterranean-diet "porcelain dinnerware")
Choosing the Right Vape for You: A Buyer's Guide to E-Cigarettes
Published: 2023-12-01 20:16:20

## Understanding the Different Types of Vapes

One of the first things to consider when choosing a vape is the type that suits your needs. There are several options available, each with its own unique features and benefits.

## Finding the Perfect Size for Portability

When it comes to vapes, size matters. Whether you prefer a compact and discreet option or one that offers a longer battery life, finding the perfect size for portability is essential.

## Exploring the Importance of Battery Life

Battery life is a critical factor to consider when purchasing a vape. After all, you don't want to run out of power in the middle of a vaping session. Look for vapes with long-lasting batteries or those that can be easily charged on the go.

## Choosing the Right Nicotine Strength

The nicotine strength of your vape can significantly impact your vaping experience. It's important to choose a level that suits your preferences and helps you gradually reduce nicotine intake if that's your goal.

Choosing the right [vape](https://vapeland.online/blogs/news/disposable-vs-rechargeable-vapes-pros-cons?utm_source=dev_to&utm_medium=rankking) is a personal decision that depends on your individual preferences and needs. By considering factors such as vape type, portability, battery life, and nicotine strength, you can find the perfect option for you.

## References

  * [vape](https://www.bti-usa.com/public/insecure_redirect?id=vapeland.online/blogs/news/disposable-vs-rechargeable-vapes-pros-cons "vape")



## Relevant Websites:

  * [Vaping Post](https://www.vapingpost.com/)
  * [Ecigclick](https://www.ecigclick.co.uk/)
  * [VaporFi](https://www.vaporfi.com.au/)