teleren/devto huggingface dataset:
RubyRussia 2020: How the largest Ruby event went online
Tags: ruby, rails, eventsinyourcity, writing
Published: 2020-11-25 13:30:25

For 10 years in a row, we have organized the annual RubyRussia conference in Moscow. Last year, we managed to bring together over 800 Ruby developers including Yukihiro Matsumoto, Aaron Patterson, Nick Suterrer, and other Ruby stars.

Even though many things have not gone according to plan in 2020, we managed to make the conference a success in an online format, getting more than 600 attendees during just the first day of the event!

[Learn more](https://evrone.com/rubyrussia-2020) about the challenges of transferring such a large event online, find tips for holding online events and get links to the reports about complexity in Rails projects, design and development of asynchronous architecture, and much more.
Variables in Postman
Tags: postman, testing, beginners, tutorial
Published: 2020-11-25 13:24:03

In this post, we will go over Postman Variables and look into different types of variable scope that are available in Postman and how we can use them with Postman Collection.

#### **What are Postman Variables?**
Variables are like boxes where you can store data and reuse them when needed. For example, you can store data related to your requests like your baseURL or API key or maybe some test data that you are using for your requests like username and password. You can store all these values in Variable and give it a name that you can reuse throughout Postman.

#### **Postman Variables Scope**
Postman has different scopes that allow or block the usage of a variable in a particular context. For example, if you have 2 collections and you don’t want other collections to use your variable you can give it a Collection scope to add Collection level scope restriction on it.

- **Global variables** – available throughout the workspace and can be accessed between environments, collections, requests, and test scripts.
- **Collection variables** – available throughout the requests in a collection
- **Environment variables** – set of variables stored for each environment, for example, local development vs testing or production.
- **Local variables** – temporary variables, only available for a single request or collection run and are no longer available when the run is complete.
- **Data variables** – import variables from external files (CSV & JSON), can be used when running collections via Newman or the Collection Runner.

---

### **Check out the video below to learn more about Postman Collections –**
{% youtube wtiY07tIbAE%}

---

#### To learn about API Test Automation using JavaScript, check out my free tutorial series here –
[JavaScript API Test Automation Tutorial Series](https://www.youtube.com/watch?v=ZSVw3TyZur4&list=PL6AdzyjjD5HDR2kNRU2dA1C8ydXRAaaBV)

---

I hope this video helped you out, let me know if you have any questions in the comments below!

Happy testing! 

...

📧 Subscribe to my [mailing list](https://automationbro.com/mailing-list) to get access to more content like this 
👍 Follow @automationbro on Twitter for the latest updates
Getting started with TypeScript & React
Tags: javascript, typescript, react, node
Published: 2020-11-25 13:16:26

---
title: Getting started with TypeScript & React
published: true
description: A quick and dirty guide for myself to get started with TypeScript.
tags: javascript, typescript, react, node
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/fkwkvhhpkk0l0i8z5wzv.jpg
---

A **quick and dirty** guide for myself to get started with TypeScript. Based on the notes from [Simon Willison](https://til.simonwillison.net/til/til/typescript_basic-tsc.md).

# Install

With `npm` installed, install TypeScript into the dev-dependencies with:

    $ npm install --save-dev typescript
    
1. `--save-dev` is the same as `-D`
2. `npm` is **N**ode **P**ackage **M**anager

# TypeScript config

Create a new TypeScript config with:"

    $ npx tsc --init

1. `npx` is **N**ode **P**ackage e**X**ecutor, and part of `npm`: it allows you to run Node “scripts” from a project rather than having to install them globally or to the PATH
    
Make a TypeScript file, `greeting.ts`:

```ts
const greeting = (person: string): void => {
  console.log(`Hello ${person}!`);
};
greeting("John");
```

1. `string` is the type of `person`
2. `void` is a special type to denote that this function doesn't return anything

Compile it with `tsc`, the **T**ype**S**cript **C**ompiler:

    $ npx tsc

And then run it:

    $ node greeting.js
    Hello John!

# TypeScript & React

Install `create-react-app` and create a new React app with TypeScript support with:

    $ npx create-react-app my-app --template typescript

1. `npx` here is install `create-react-app` before executing it

# A simple TSX component

A straight forward React component, `Greeting.tsx` showing TypeScript with JSX.

```tsx
import React from "react";
import { useState } from "react";

function Greeting(props: { name: string }) {
  const [value, setValue] = useState(props.name);
    
  const onChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
    setValue(event.target.value);
  };

  return (
    <>
      <input value={value} onChange={onChange} />
      <h1>Hello {value}!</h1>
    </>
  );
}

export default Greeting;
```

Add it to the `App.tsx`:

```tsx
import React from "react";

import Greeting from "./components/Greeting";

function App() {
  return (
    <div>
      <Greeting name="John" />
    </div>
  );
}
    
export default App;
```

Start the Node server:

    npm start
I made 100 high-quality illustrations, totally free. Use it anywhere without attribution.
Tags: webdev, opensource, showdev, css
Published: 2020-11-25 13:05:22

---
title: I made 100 high-quality illustrations, totally free. Use it anywhere without attribution.
published: true
description: A great resource for all developers to beautify their websites & products with free illustrations. No need to attribute either!
tags: webdev, opensource, showdev, css
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ntgonlmiqhy9vccp2wmn.png
---

Hey everyone,

I know that all of you are working on exciting products. To help you make it a bit more beautiful, I have made 100+ high-quality illustrations. As the title suggests, they are:
1. Totally free
2. <b>Absolutely don't need any attribution</b> :)

Here's Scale: https://2.flexiple.com/scale/all-illustrations

![Scale preview](https://ucarecdn.com/72c4965e-fd3c-403f-af90-26637de3c646/)
Daily Developer Jokes - Wednesday, Nov 25, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-11-25 13:00:29

---
title: "Daily Developer Jokes - Wednesday, Nov 25, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Nov%2025%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258f50f7c0.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why did the developer go broke?

___A:___ Because they used up all their cache
 -->
Faster Way to Change Directory on Linux/macOS
Tags: productivity, opensource, zsh, bash
Published: 2020-11-25 12:51:19

---
title: Faster Way to Change Directory on Linux/macOS
published: true
description: 
tags: productivity, opensource, zsh, bash
//cover_image: https://direct_url_to_image.jpg
---

As developers, we spend a lot of time working in the command line, and **we change directories frequently**. Procedures that we do frequently are worth optimizing, in this post I'll introduce [a tool](https://github.com/suzaku/shonenjump) I wrote that might help you save more time changing directories.

Suppose that in your daily development routine, you often need to switch between the following directories:

```bash
cd ~/go/src/github.com/pingcap/tidb
cd ~/go/src/github.com/pingcap/tidb-binlog
cd ~/projects/redis
cd /tmp
cd /usr/local/Cellar
```

Without any tool, the best you could do to save some typing is to use `..` or shell history. But we can do better.

I rewrote autojump in Go and created the tool [shonenjump](https://github.com/suzaku/shonenjump). With this tools, once you have entered the previous directories once, they would be saved in a data file, and then we can access them quickly:

```bash
j tidb # Jump to ~/go/src/github.com/pingcap/tidb
j go git tidb # Jump to ~/go/src/github.com/pingcap/tidb
j tm # Jump to /tmp
j Cell # Jump to /usr/local/Cellar
```

If you are interested to improve your productivity, please give it a try, it can be easily installed and uninstalled with `Homebrew` on macOS.
Learn about other commands with `tldr`
Tags: linux, bash, productivity
Published: 2020-11-25 17:44:12

---
title: Learn about other commands with `tldr`
published: true
date: 2020-11-25 12:50:00 UTC
tags: linux, bash, productivity
canonical_url: https://alvin.codes/writing/nifty-command-lines-tldr
series: Nifty Command Lines
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/41i5e2txc2hiogq1d9fj.jpg
---

There are a few reasons that computer terminals scare people (myself included):

- Movie stereotypes of green terminals used by hoodie-wearing hackers in basements.
- How terminals try to “help” you.

The default help pages (called `man` pages for manual, go figure) don’t feel designed for humans to me. They’re hard to use and make sense of.

[tldr pages](https://tldr.sh/) try to fix that. The `tldr` utility gives you a people-friendly list of examples to help you with a command.

Example with the `rename` command that we discussed in [a previous article](https://alvin.codes/writing/nifty-command-lines-rename):

[![Console output of tldr pages with the rename command](https://alvin.codes/static/14d4a5453ce5c2c319c81e0077d8d786/fcda8/tldr-rename-console-output.png "Console output of tldr pages with the rename command")](/static/14d4a5453ce5c2c319c81e0077d8d786/7388e/tldr-rename-console-output.png)

Compare that with the `man` page, as follows:

```
RENAME(1) User Contributed Perl Documentation

NAME
       rename - renames multiple files

VERSION
       version 1.600

SYNOPSIS
       rename [switches|transforms] [files]

       Switches:

       -0/--null (when reading from STDIN)
       -f/--force or -i/--interactive (proceed or prompt when overwriting)
       -g/--glob (expand "*" etc. in filenames, useful in WindowsX CMD.EXE)
       -k/--backwards/--reverse-order
       -l/--symlink or -L/--hardlink
       -M/--use=Module
       -n/--just-print/--dry-run
       -N/--counter-format
       -p/--mkpath/--make-dirs
       --stdin/--no-stdin
```

See how neat this is with `ffmpeg`, a tool that’s notoriously unfriendly.

[![FFMPEG Console output](https://alvin.codes/static/7e80259145769ace275d889d38f4c85b/fcda8/tldr-ffmpeg-console-output.png "FFMPEG Console output")](/static/7e80259145769ace275d889d38f4c85b/081d5/tldr-ffmpeg-console-output.png)

Also, as opposed to `man` pages, which require you to install a vim-like interface, tldr pages are easier to contribute to. Everything is in a [GitHub repository](https://github.com/tldr-pages/tldr).

Finally, `tldr` isn’t limited to the command line. There’s also a [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=bmuskalla.vscode-tldr), an [Alfred Workflow](https://github.com/konoui/alfred-tldr) and even an iOS app.

If you’re convinced, install it with `brew install tldr` on macOS and Linux.

That’s the end of the series! It introduced you to a few, well, nifty tools that I use quite often, and I hope that it will help you reach out to the terminal to save time.

Thanks!
Build A Flutter 💙 Tinder Clone with Firebase & BLoC #18/41 Profile Form
Tags: flutter, tutorial, dart, career
Published: 2020-11-25 12:47:29

---
title: Build A Flutter 💙 Tinder Clone with Firebase & BLoC #18/41 Profile Form
published: true
description: Tutorial on building a Tinder clone with Flutter, Firebase and Bloc
tags: #Flutter #Tutorial #dart #career
//cover_image: https://direct_url_to_image.jpg
---

In this series of videos we are going to build a Tinder clone using Flutter, Firebase as a backend and Bloc as our state management solution.

Here we set up the profile form.

Protip: Watch video at 1.25 speed.


{% youtube 4e8GeT2Ls-0 %}
Who Needs Black Friday Discounts When You Can Have These Amazing React Landing Templates for FREE!!
Tags: startup, react, javascript
Published: 2020-11-25 12:43:34

Black Friday and Cyber Monday are two of the most eagerly awaited days of the year. Prices drop massively, and people buy like there's no tomorrow. For website developers and business owners, this is also a great time to pick up on pricey web and mobile applications/ plugins etc at a very reasonable price. But, with our absolutely free React landing page templates, every day is of the year is Black Friday! 

Designed with startups in mind, the free React landing page templates are suitable for a wide range of businesses. These landing page templates come with powerful features that not only make the front end attractive, but also make it easy to integrate with your back end. On top of that, these landing page templates are React and Gatsby based making them SEO friendly and also super fast. Moreover, the Gatsby framework also helps make the website more secure. Aside from these, all the landing page templates are integrated with Mailchimp. As a result, keeping your leads and contacts updated with your work is now that much easier!

Now Black Friday and Cyber Monday are great and everything, but where else could you get such awesome, feature packed React landing page templates for free all year round? And that's not all - new pre-built landing page demos are added weekly so whatever your business is, we'll have a template that's perfect for you!

So come and check them out at the links given below:

👉 Check it live here: https://startuplanding.redq.io/
👉 Check it on Github: https://github.com/Startup-Landing/Startup-Landing
👉 Check it on Producthunt: https://www.producthunt.com/posts/startup-landing
ISO C++ forbids converting a string constant to char*
Tags: cpp, computerscience
Published: 2020-11-25 12:21:13

```char* p = "abc";```

#Problem

In the given line of code, we defined an array of char* objects. We initialize pointers with string constants. But the compiler shows error and as the error explains itself, converting a string constant not allowed in C++. There is no extra explanation for this error because it is a rule of C++ and as we all know C++ is a very sensitive programming language as both “a” and “A” have different meanings along with memory allocation.

If you have use C instead of C++ a lot, then you may be wondering why is a conversion from string constant to char* is valid in C but invalid in C++?
Till  C++03, line of code given above was valid, but used a criticize implicit conversion i.e., a string constant should be treated as of type char const *, because you can't modify its contents. And if you modify its contents, there will be undefined behaviour.
When C++11 comes to the real world of programming, the implicit conversion, which used to be criticized, was officially removed, so code that depends on it should no longer compile.

Read more at kodlogs.com

**How?**
##How to resolve this problem?
As we discuss why converting a string literal to const char* is not allowed, so instead of doing this, we can declare an array of const char*. If we don’t modify the strings pointed by the array, this should not be a problem.
What is your approach for learning a new tech?
Tags: webdev, watercooler, beginners, productivity
Published: 2020-11-25 12:39:20

---
title: What is your approach for learning a new tech?
published: true
description: 
tags: webdev, watercooler, beginner, productivity
cover_image: https://www.scottishbooktrust.com/uploads/store/mediaupload/2282/image/alphabet-1219546_640.jpg
---
A crucial part for any dev to stay relevant and competitive in the field is to pick-up new technologies fast.

What is your usual approach to learning a new tech? 

* Do you start right away with studying Official docs?
* Do you first check some YouTube tutorials, read some blog posts to get an overall insight?
* Do you prefer to browse some open-source projects and experiment in online playgrounds to explore the practical side?
* Or do you usually start the project with minimal knowledge and search for something only when the necessity arises?
PHP8 API Controller with Attributes
Tags: php8, php
Published: 2020-11-25 12:32:56

---
title: PHP8 API Controller with Attributes
published: true
description: Updated my API framework to work with PHP8 attributes & working on swoole integration out of the box with docker. Heavily inspired by dotnet core web api
tags: php8, php
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/mjmo8p03k5rr42vfsgw1.png

---
Updated my API framework to work with PHP8 attributes & working on swoole integration out of the box with docker. Heavily inspired by dotnet core web api

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mjmo8p03k5rr42vfsgw1.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7io28fauz3ifj6r9nnc7.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8h8dhggp50zw2gpsm4zu.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/op5372yjbtg9lsxm3ord.png)
What tech surprised you, when you revealed which company it's from?
Tags: watercooler, tech, experience
Published: 2020-11-25 12:28:06

---
title: What tech surprised you, when you revealed which company it's from?
published: true
description: 
tags: watercooler, tech, experience
cover_image: https://cdn.shopify.com/s/files/1/0571/4205/products/MYSTERYBOX_a61ca7d2-347a-434a-ad05-eab4392895e2.jpg?v=1576601079
---
Nowadays, in the vast ocean of technologies, sometimes we use some of them without even knowing the companies behind them. 

I was quite surprised to find out that: 
1. [Marko](https://markojs.com/) is by [Ebay](https://www.ebay.com/) 
2. [Yarn](https://yarnpkg.com/) is by [Facebook](https://www.facebook.com/)
3. [React-helmet](https://github.com/nfl/react-helmet) is by [NFL](https://www.nfl.com/)

Could you re-call some other examples from your experience?
Have you built any projects with WebAssembly?
Tags: webdev, discuss, webassembly
Published: 2020-11-25 12:17:04

---
title: Have you built any projects with WebAssembly?
published: true
description: 
tags: webdev, discuss, webassembly
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--1GKAspPr--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/raulmgx1pgc5e7duukm4.png
---
[WebAssembly](https://webassembly.org/) is a safe, portable, low-level format designed for efficient execution and compact representation of code on modern processors including in a web browser.

At the end of 2019, W3C [announced](https://www.w3.org/2019/12/pressrelease-wasm-rec.html.en) that WA has officially become the fourth language for the Web, which allows code to run in the browser.

Have you built any projects with WA and do you believe in the future potential for it?
Dealing with Compiler and Linker Errors
Tags: cpp, computerscience, beginners, oop
Published: 2020-11-25 12:03:34

---
title: Dealing with Compiler and Linker Errors
published: true
description: understanding and resolving possible errors in code
tags: cpp, computerscience, beginner, oop
cover_image: https://images.unsplash.com/photo-1555861496-0666c8981751?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxzZWFyY2h8M3x8ZXJyb3J8ZW58MHx8MHw%3D&auto=format&fit=crop&w=900&q=60
series: Programming 101 with C++
---

# Compiler Errors 

* forgetting to declare the function before calling it
* not including the header file
* not declaring the function in the header file

# Linker Errors

* not implementing the function 
* the .cpp file with the function is not getting linked with your main file

These are some of the possible errors that can happen when we start working with more moving parts. As a beginner it is good to actually try and do them deliberately and see what errors we are getting, so the next time you see that error in your code, you'd have an idea of what went wrong.

Please leave out comments with anything you don't understand or would like for me to improve upon.

Thanks for reading!
Pagination in Nuxt
Tags: nuxt, vue, help
Published: 2020-10-14 19:28:22

---
title: Pagination in Nuxt
published: true
description: looking paginate my blog page
tags: nuxt, vue, help
//cover_image: https://direct_url_to_image.jpg
---

I'm attempting to add pagination to my blog which is setup with  nuxt/content module and I am currently pulling all my posts in which I want to avoid. 

this is the blog page:
```vue
...
<ul class="pl-5">
<li v-for="post in posts" :key="post.id">
<nuxt-link :to="{ name: 'blog-slug', params: { slug: post.slug } }">
<h3 class="py-1 text-white">{{ post.title }}</h3>
<p class="text-white">{{ post.description }}</p>
<a :to="{ name: 'blog-slug', params: { slug: post.slug }}" class="text-red-600">Read More</a>
</nuxt-link>
</li>
</ul>
...

<script>
export default {
async asyncData({ $content, params }){
  const posts = await $content('posts', params.slug)
  .only(['title', 'slug', 'date'])
  .sortBy('createdAt', 'desc')
  .fetch()

  return { posts }
 },
}
</script>
```

Now I know I can use `limit(10)` to limit the number of posts shown but I'm not sure how I would tie that into a pagination component I guess using params? 

Anyone have any experience with this who could point me in the right direction? If so much appreciated.
Write a loop that sets newscores to oldscores shifted once left, with element 0 copied to the end.
Tags: cpp, computerscience
Published: 2020-11-25 11:55:26

I got a problem with my textbook under the for-loop chapter. It’s saying something like this:

**Write a loop that sets newscores to oldscores shifted once left, with element 0 copied to the end. ex: if oldscores = {10, 20, 30, 40}, then  newscores = {20, 30, 40, 10}.**

I am learning c++ and writing my code in codeblocks. What could be the possible solution to this problem? As far as I can understand the above problem it says to set some values to oldscore from newscore. Once shifted, then we need to copy the very first vale with 0  and shift it to the end.
#Resolution:

I’ve found a possible solution to the problem above. I am attaching my sample code snippet below:
```
int main()
{
   const int Value_Size = 4;

   int oldScores[Value_Size] = { 10, 20, 30, 40 };
   int newScores[Value_Size];

   for (int n = 0; n < Value_Size; ++n)
   {
      std::cout << oldScores[n] << ' ';
   }
   std::cout << '\n';

   newScores[Value_Size - 1] = oldScores[0];

   for (int n = 0; n < Value_Size - 1; n++)
   {
      newScores[n] = oldScores[n + 1];
   }

   for (int n = 0; n < Value_Size; ++n)
   {
      std::cout << newScores[i] << ' ';
   }
   std::cout << '\n';
}
```



This is it.
But you can [read more](https://www.kodlogs.com/blog/5/write-newscores-oldscores-shifted-left-with-element-copied) at Kodlogs.com