teleren/devto huggingface dataset:
CockroachDB's Online Schema Changes make modifying primary keys safe and terror-free!
Tags: database, sql, programming, cloud
Published: 2023-02-23 14:46:04

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

In the background, CockroachDB will create a new version of your data, to ensure that existing queries can still be serviced.

This means you can make scary-looking changes without fear of downtime or customer impact 💪
Using Backticks as Syntactic Sugar in JavaScript and Scheme
Tags: javascript, scheme, syntax
Published: 2023-02-23 14:42:53

ECMAScript 6 introduced the concept of [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to provide a convenient way to build up strings in JavaScript. 

For example:

```
> let h = "Hello", w = "World";
> `${h} ${w}!
  ${h} ${w} from line 2`

"Hello World!
Hello World from line 2"
```

This is reminiscent of using backticks in Scheme to construct lists using [quasiquotation](https://conservatory.scheme.org/schemers/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_sec_4.2.6):

```
> (let ((h 'hello)
      (w 'world))
  `(,h ,w !))

(hello world !)
```

Maybe its not a coincidence that template literals were called [quasi-literals](https://humanwhocodes.com/blog/2012/08/01/a-critical-review-of-ecmascript-6-quasi-literals/) when originally proposed:

> This scheme extends EcmaScript syntax with syntactic sugar to allow libraries to provide DSLs that easily produce, query, and manipulate content from other languages that are immune or resistant to injection attacks such as XSS, SQL Injection, etc.

Especially since there are no other [commonly-used languages](https://en.wikipedia.org/wiki/String_interpolation) that use backticks for string interpolation.

Anyway, thought this was an interesting observation on the evolution of the JavaScript language.
Paracetamol.ts💊| #17: Explica este código TypeScript
Tags: typescript, javascript, spanish, webdev
Published: 2023-02-23 14:39:22

## **<center>Explica este código TypeScript</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark> </center>

```ts
enum Values{
  "No" = false,
  "Yes",
  "Maybe",
};

console.log(Values.No);
```

- A. `0`
- B. `No`
- C. `Type 'false' is not assignable to type 'Values'`
- D. `Ninguno de los anteriores`

Respuesta en el primer comentario.

---
My reflections on Andela's EPIC values
Published: 2023-02-23 14:36:52

Hello everyone,
Being an Andelan is wonderful and there are a lot of EPIC things to say about it and yes, the amazing EPIC tower.
Andelans are known for their EPIC values which acronym means:

**E - EXCELLENT.**
**P - PASSION.**
**I - INTEGRITY.**
**C - COLLABORATION.**
These values can be better emphasized rather than just the acronym.

**E for EXCELLENT**
At Andela, there is a belief that, if you strive for excellence, with the total commitment you will achieve it.
During the onboarding ceremony, excellent was illustrated with a growth mindset session, been open-minded and believe in doing more as well as asking relevant questions.
My experience so far at Andela helped me differentiate between excellent and perfection, with this simple quote "if you strive for perfection you will never find it".
There is a gap between excellent and perfection, excellence is wanting to do and know more but looking for perfection will only lead to a closed mindset

**P for PASSION**
At Andela, there is a belief that everyone has the ability to do more which has to be unlocked by being passionate and not giving up.
Andela also helps young talent across Africa with the ALC programme meaning (Andela Learning Community). which has helped thousands of young Africans discover themselves. I am proud to say that I'm among the thousand.
As an aspiring Andelan, I understand what it means to be passionate by striving to know more and not giving up.

**I for INTEGRITY**
Andela believes in choosing the right people and trusting them to do the right things.
Andela believes in saying the truth always, knowing and doing the right thing, taking responsibility and giving credits when it's required.
I now understood what it means to cherish other people's hard work and also mine, to make sure I stay true to myself.

**C for COLLABORATION**
At Andela, there is a saying that "our sum is greater than our part".
Aspiring Andelans should be a good team player by treating everyone with respect, reaching out to people and leveraging on other people's knowledge.
During the onboarding, we are encouraged to solve problems as a team and reaching out to a teammate or anyone available when having issues.

it's also important to share your knowledge with people so that they can learn from you.
if_else in java script:
Tags: webdev, javascript, programming, react
Published: 2023-02-23 14:26:26



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

in this article i want explain some Tip about `if` and `else`.
in javaScript and also in another programming languages, the name of this topic is : `Conditional Statements`.
Im sure that you see this topic in your programming way in any language you work with it..
so you should know we use `if` and `else` word for our usage.
anyway, at first I write the syntax of if, else, etc.

> `if`:

```
if (condition) {
  //  the things we want will be done if the conditions are True.
}
```

> `else`:

```
if (condition) {
  //  the things we want will be done if the conditions are True.
} else {
  //  the things we want will be done if the conditions are False.
}
```

> `else if`:

```
if (condition1) {
  //  the things we want will be done if the condition1 is True.
} else if (condition2) {
  //  the things we want will be done if the condition1 is False.
} else {
  //  the things we want will be done if the condition1 and condition2 is False.
}
```

so it's done... these is all about if, else and else if.

> at the end, i write a example and you write the answer in comment if you like;)

```
var x = 0;

if (x = 0){
console.log("I should keep going, it doesn't matter how hard is!");
}else if (x = 00){
console.log("trying it's my answer");
}else{
console.log("i should not have shame feeling about trying");
}
```
enjoy,byeeeeè.
My experience in Bootcamp so far.
Published: 2023-02-23 14:24:28

Bootcamps aren't easy, I wanted to give up on the fourth day because it wasn't as easy as I thought and believe me, it has been a challenging and a productive period plus a deliberate moment of learning, unlearning and relearning.

The Bootcamp had helped me learn the professional way of working as a Developer, unlearning some irrelevant things that I know and relearning values to be part of me.

I was been pushed to learn new stuff like Deploying on Heroku, Git / Version Control, Linting Code, TDD, Travis e.t.c.

Also, I learned a lot from the Learning Facilitators Associate (LFA’s); they are very welcoming, always ready to help and give feedback in a manner that doesn’t demoralize me.

During the course of the bootcamp, the Bootcamp has imbibed in me the following:

•The growth mindset to work with the aim of achieving excellence

• The desire to do better than the past with great passion

•Knowing that I will be held accountable for my own actions thereby doing the right thing — Integrity

•Collaborating with teammates and leveraging on other people’s knowledge to achieving a better result.

I am excited that my hardwork pays and as a result, I was successful in the first week of this Bootcamp training and the second week of intensive coding training which made me an Andelan.
Andela Bootcamp challenges and how I adapted.
Published: 2023-02-23 14:12:12

I acquired a lot of knowledge during the Andela bootcamp, learning more than I thought in such a short period of time.

The Bootcamp was challenging, I have to learn new ways of doing things, the right standard to follow.

During my first two days at the Boot camp, I struggled with learning new things like git workflow, PT board, writing test e.t.c. I went through the process of learning, unlearning and relearning, and the most encouraging part is that I’m investing more quality time adapting to these changes compared to other things.

It was really difficult to adapt, but I helped myself by being open-minded, curiously wanting to learn more and asking questions.

I appreciate the fact that I’m getting better day after day, and I also love the fact that everything I planned to achieve before I started the Boot camp is falling into place even before my projections.

Learning new things may not come easy, however, I, Olumide Akinremi didn't relent on my laurels and encourage everyone else not to give up.

Thank you.
Enemies, Health Regeneration, and Scene Updates
Tags: programming, news, opensource, showdev
Published: 2023-02-23 14:00:00

Hi everybody! It's the third week of the development of my new game, [Escape The Wave](https://github.com/EmilienLeroy/EscapeTheWave). I'm excited to share some of the new features I've added to the game.

## Enemies can attack the player

One of the most significant updates to the game is that enemies can now attack the player. This feature adds a new level of difficulty to the game, making it even more challenging. When an enemy is near the player, the player will lose some of their life. If the player loses all of their life, the game is over.

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

## Life item added

To balance out the increased difficulty, I've added a life item to the game. This item allows the player to regain some of their life when they touch it. Currently, I've added the life item statically to the game, but in the future, it will spawn randomly on the map.

![Life](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wqg29neadu7jusuizr5.gif)

## Home and Score Scenes Added

In addition to these new gameplay elements, I've also worked on the home and score scenes. To make it easier to switch between scenes and pass data between them, I've added a router singleton. The home and score views are currently quite basic, as I haven't defined the theme of the game yet.


## Invulnerable Frames Added

Finally, I've added some invulnerable frames to the player when they take damage. This means that the player will blink when they're invulnerable, indicating to the user that they cannot take any more damage during this time.


![Frames](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02tp2n4tvihrutxm9p82.gif)

## What's next

Overall, I'm happy with the progress I've made in the third week of development. These new features add more depth to the game and make it even more engaging for players. I can't wait to see how the game continues to evolve as I add more elements to it in the coming weeks. Stay tuned for more updates!
Resolvendo problemas no HackerRank: Dividindo a conta
Tags: javascript, beginners
Published: 2023-02-23 13:27:08

Olá, seja bem vindo a mais uma etapa do Resolvendo problemas no Hacker-Rank,nessa sessão iremos dividir a conta de dois amigos: Brian e Anna, vejamos como fazer uma divisão justa entre os dois,principalmente sobre o que cada um pagará pelo alimento que ingeriu.

**Bill Division -**

O problema se dá em dois amigos dividirem a conta, seus nomes: Brian e Anna.O objetivo é que a conta seja dividida de maneira justa entre os dois,com cada um pagando o que ingeriu. Com isso, nos dão um exemplo de como será o problema:

- (conta)bill = [2,4,6].

- Anna, não comeu o item k= bill[2](se referindo a posição) que custa 6. Com isso, Anna pagará (2+4)/2 =3.

- Se ele incluir o custo de k, Anna pagaria (2+4+6)/2 =6. Tendo logo que devolver 3 a Anna.

- _Bill_: um array de números inteiros representando o custo de cada item pedido.

 _K_: um número inteiro representando o índice baseado em zero do item que Anna não ingeriu. 

_B_: a quantia de dinheiro que Anna contribuiu para a conta


O código para resolver isso foi feito usando Reduce, da seguinte maneira:


```
function bonAppetit(bill, k, b) {
    // Write your code here
 const payedForItem = bill[k];
 const actualBill = (bill.reduce((acc, cur) => acc + cur, 0) - payedForItem) / 2;

console.log(actualBill === b ? "Bon Appetit" : b - actualBill);
}
```
A primeira linha da função cria uma variável chamada payedForItem, que armazena o valor do item que a pessoa não quer pagar.

Em seguida, é criada uma variável chamada actualBill que calcula o valor real que a pessoa deve pagar, subtraindo o valor do item que ela não quer pagar (payedForItem) do total da conta (bill.reduce((acc, act)=>{return acc+act;},0)) e dividindo o resultado por dois (para dividir a conta igualmente entre duas pessoas).

A função então verifica se o valor real que a pessoa deve pagar (actualBill) é igual ao valor que ela pagou inicialmente (b). Se for, a função retorna a string "Bon Appetit". Caso contrário, a função imprime a diferença entre o valor que a pessoa pagou inicialmente (b) e o valor real que ela deveria pagar (actualBill).

O resultado será input 5.

```
4 1
3 10 2 9
12

5
```

Com isso concluímos mais um episódio, e nos vemos na próxima!!!
CPS Tester
Published: 2023-02-23 09:51:54

In the world of online gaming, speed and precision are often the difference between winning and losing. One of the key factors that can influence your success in online games is your clicking speed. This is where a CPS (Clicks Per Second) Tester comes in handy. In this article, we will explore what a CPS Tester is and why you need it.

What is a CPS Tester?

A [CPS Tester](https://testclickspeed.com/) is a tool used to measure how many clicks you can make per second. It is a simple tool that measures the speed and accuracy of your clicking ability. The tool works by counting the number of clicks you make within a specific time frame, usually one second. This number is then used to calculate your CPS score.

Why do you need a CPS Tester?

A CPS Tester can help you improve your gaming performance by allowing you to measure your clicking speed and accuracy. Knowing your CPS score can help you identify areas for improvement, such as increasing your clicking speed or improving your accuracy. This can help you gain an advantage in online games where speed and precision are crucial.

Additionally, a CPS Tester can be helpful for individuals who use their mouse frequently for work or other activities. By measuring your CPS score, you can identify any issues with your clicking speed and take steps to improve it. This can help you become more productive and efficient in your daily tasks.

How to use a CPS Tester

Using a CPS Tester is simple. There are various online tools available that you can use to measure your clicking speed. One such tool is the Kohi Click Test, which allows you to test your CPS score by clicking as many times as you can within one second. To use the tool, simply visit the Kohi Click Test website and click on the "Click Here to Start" button. Once the timer starts, begin clicking your mouse as quickly and accurately as possible. After one second, the tool will display your CPS score.

Conclusion

A CPS Tester is a valuable tool for anyone who wants to improve their clicking speed and accuracy. It can help you identify areas for improvement, and become more competitive in online gaming or more productive in your daily tasks. There are many online tools available to help you measure your CPS score, so take advantage of them and start improving your clicking speed today.
Do you have a high-performing engineering team?
Tags: devops, productivity
Published: 2023-02-23 13:15:03

We created a [simple scorecard](https://www.opseradevteamquiz.com/) that can help you assess your current state of developer productivity, CI/CD pipeline automation and security. 

It's based on our experience from the field and you'll get a personalized report at the end. 

Let me know if you have any questions.
HOW TO CREATE A SIMPLE SLIDER WITH VANILLA JAVASCRIPT
Tags: webdev, javascript, beginners, tutorial
Published: 2023-02-23 13:11:28



Sliders are one of the common features websites have. This tutorial will show you how to make a simple slider.  
The first step is to create the HTML structure for the slider using the _unordered list_ and _list item_ tags.

```<div class="slider-container">
  <ul class="slider">
    <li><img src="image1.jpg"></li>
    <li><img src="image2.jpg"></li>
    <li><img src="image3.jpg"></li>
  </ul>
</div>```

Next, you’ll style it with some basic CSS. The first thing we’ll do is style our slider-container and slider classes.

```.slider-container {
  width: 600px;
  height: 400px;
  overflow: hidden;
}```

```.slider {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 1800px;
  position: relative;
  left: 0;
  transition: left 0.5s;
}```

```.slider >  li {
  float: left;
}```

```.slider > li > img {
  width: 600px;
  height: 400px;
}```

Next, we'll add some JavaScript to make the slider functional. There are two logic involved here; displaying the next slide when the forward arrow is clicked and displaying the previous slide when the backward arrow is clicked.

```const slider = document.querySelector('.slider');
const prevBtn = document.querySelector('.prev');
const nextBtn = document.querySelector('.next');
let currentPosition = 0;
const step = 600;```

The moveSlider function updates the current position of the slider and sets the left position of the slider element to move it left or right.

```function moveSlider(direction) {
  if (direction === 'prev') {
    currentPosition += step;
  } else {
    currentPosition -= step;
  }
  slider.style.left = currentPosition + 'px';
}```

Add event listeners to the buttons that calls the moveSlider function with the appropriate direction.

```prevBtn.addEventListener('click', function() {
  moveSlider('prev');
});```

```nextBtn.addEventListener('click', function() {
  moveSlider('next');
});```

With these simple steps, you will be able to create a simple slider. It is possible to add other features and functionalities to it, but we’ll stop here in this tutorial.
Personal reflections: how release planning can bring remote teams together
Tags: java, devjournal, agile, motivation
Published: 2023-02-23 13:05:48

When the pandemic hit in 2020, our office closed and we began developing from home. Nearly 3 years on, we're starting to get back to the office! But, as creatures of habit, it can be hard to leave our now routine structure of working from home for a long commute, different desk, etc etc. I've found that any small reason for going into the office will usually lose against all the reasons to stay at home - unless there is a shiny carrot of a reason to get into the office beyond those reasons I set myself! 

To help us get a reason that might battle those stay at home anchors, we, the [ArcGIS Maps SDK for Java](https://developers.arcgis.com/java/) team, decided to make a standard Agile meeting an opportunity and motivation reason to get colleagues together in the one space. So we hosted an in person release planning session as a reason to get folks back in the office: and it was lovely.

In my dev journal style story map blog below, I share my personal reflections on shifting to working from home during the pandemic. I also share how finding any opportunity (release planning!) to get the team together in person can be a real boost for individuals and the team as a whole. 

{% embed https://storymaps.arcgis.com/stories/634b661f3c2f476387825887284bb814 %}
Spatial Mapping in Augmented Reality: A Technical Overview
Tags: programming, gamedev, productivity, webdev
Published: 2023-02-23 13:02:05

Augmented Reality (AR) has been gaining traction in recent years due to its ability to enhance the user's real-world experience by overlaying digital content on top of it. One of the critical components of AR is spatial mapping, which allows AR systems to create a 3D map of the user's environment. In this technical writing, we will provide an in-depth overview of spatial mapping in AR, including its components and applications.What is Spatial Mapping in AR?
Spatial mapping is the process of creating a 3D map of the user's environment in real-time, allowing AR systems to accurately place digital content within it. This process involves using sensors, such as cameras and depth sensors, to detect and interpret the user's surroundings.

Components of Spatial Mapping:
Spatial mapping in AR involves several key components, including:

Sensor Fusion:
AR systems use multiple sensors, such as cameras and depth sensors, to gather data about the user's environment. Sensor fusion is the process of combining data from these sensors to create a more accurate and complete representation of the environment.

Feature Detection:
AR systems use feature detection algorithms to identify key features of the user's environment, such as corners, edges, and planes. These features are used to create a 3D model of the environment accurately.

Surface Reconstruction:
Surface reconstruction is the process of creating a detailed 3D model of the user's environment using data collected from the sensors and feature detection algorithms. This process involves identifying and reconstructing surfaces within the environment, such as walls and floors, to create an accurate representation of the space.

Applications of Spatial Mapping:
Spatial mapping has a range of applications in AR, including:

Object Recognition:
Spatial mapping enables AR systems to recognize and identify real-world objects accurately. This allows AR systems to overlay digital content on top of real-world objects accurately, creating a more immersive experience.

Gaming:
Spatial mapping allows AR games to be played in the user's real-world environment, creating a more immersive gaming experience. For example, a game might use spatial mapping to create a virtual obstacle course within the user's physical space.

Navigation:
Spatial mapping can be used in navigation applications, allowing AR systems to provide real-time directions based on the user's surroundings. This could include highlighting specific features of the environment, such as landmarks, to help the user navigate.

Conclusion:
Spatial mapping is a critical component of AR that enables AR systems to accurately place digital content within the user's environment. By using sensors and advanced algorithms, spatial mapping creates a 3D map of the user's environment, allowing AR systems to recognize real-world objects and surfaces accurately. Spatial mapping has a range of applications in AR, from gaming to navigation, and is set to become even more important as AR continues to evolve and grow in popularity.
Howto migrate from Webpacker to cssbundling-rails in Ruby on Rails for CSS
Tags: ruby, css, webpack, rails
Published: 2023-02-23 12:54:08

A lot of Ruby on Rails applications created with Ruby on Rails version 5.x or 6.x or even upgraded from the previous versions are using webpacker as their primary asset pipeline. But now as webpacker has retired, it is time to move on. cssbundling-rails is or will be the most obvious step to go.

If you were using webpack(er) for CSS too as I did, I recommend moving your CSS pipeline to an alternative before moving your JavaScript setup to an alternative like jsbundling-rails or importmap-rails.

Read the full tutorial at:

- [Howto migrate from Webpacker to cssbundling-rails in Ruby on Rails for CSS](https://qameta.com/posts/howto-migrate-from-webpacker-to-cssbundling-rails-in-ruby-on-rails/)