teleren/devto huggingface dataset:
Why NextSketch?
Tags: design, tooling, architecture, productivity
Published: 2022-09-19 10:46:34

Hello!

I thought I'd write a bit about why NextSketch helps me and can help you as well in creating diagrams to use. Personally over the course of my projects, I've always used things like Pen & Paper, Mindomo, or just MS Paint and never thought too much of it.

But time after time, it started breaking my flow. You can't edit a rendered image in Paint, switching between browser-based tools and IDEs isn't cool, and Pen & Paper, well, that can just descend into madness when things grow.

So eventually, this followed me to Editor4J. Editor4J was and is, one of my biggest projects. With the architecture more complex than ever, pen and paper became a bottleneck in development.

So I decided I had enough, no longer would I be oppressed by such tooling! NextSketch is a (commercial!) plugin for all IntelliJ-based IDEs that lets you create diagrams with Nodes and Links. I've been working on it for 2 months and it's now available on the JetBrains Marketplace!

The whole diagramming experience is integrated into the IDE and sketches can be easily stored in the project folder. It's an invaluable tool for me especially when designing GUI architecture. I hope you enjoy using NextSketch as much as I did working on it! 

Check it out at https://plugins.jetbrains.com/plugin/19963-nextsketch and let me know what you think!

Have fun!
CURIOSITY - How it's crucial for you and I as developers
Tags: webdev, node, testing, productivity
Published: 2022-09-19 10:45:25

#I'm going to go straight to the point and drop no fluffs.

As developers, We should be curious about everything we encounter while learning. I believe it'll go a long way in our journey to building that first project, getting that first job or becoming world-class developers.

Recently, I got caught up in trying hard to get a job and building projects and dropped something that had always been part of me. I wasn't so concerned about the little things anymore. I just wanted to get things done.

##Here's what happened.

I got a NodeJS task to solve a test that wasn't passing. I tried debugging this for almost 30 minutes till I took to Google and found that all I needed to do was to change a word. I just needed to change response.body to response.text. 

If you're familiar with NodeJS, you'll know that res.send returns the content type of its return value in the response header automatically and res.end returns a text if you don't specify a content type in the header of your API.
Though both methods do the same thing, I could have easily solved this test error if I had just opened Google a few weeks ago and searched for the difference between res.end and res.send when I was still learning Node basics.

And all this boils down to being curious about the little things. If two things do the same thing, why not search for why both exist, if I can get the job done with one of them?

There is a high chance that there's a reason for it.
Also, it goes beyond the scope of what functions and methods do. Ask questions, stay curious, and always find out if there's a reason for something.

I hope this speaks to someone or helps someone.
Much love, guys, peace ❤️✌️
Metaplex NFT
Published: 2022-09-19 10:19:03

In this post, I am going to show you the accounts that are created when you create an NFT with Metaplex.

Let's create a barebone NFT with Metaplex.

![createNFT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oi7wvrl9qvu8ryeb4m7r.png)

This nft is of type CreateNftOutput.

![nftType](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yu36iuzo6toy8t5o4krs.png)

We have created 4 addresses: mintAddress, metadataAddress, masterEditionAddress and tokenAddress.

How are those addresses used and connected between them?

![AddressRelation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a78mwoz18er12feavs87.png)

In solana all accounts are generated from a program. All states are stored in a account separated from the program. 

I am not going further as Loris Leiva already explained very well how NFTs are represented in Solana. Check his post to learn more.
https://lorisleiva.com/owning-digital-assets-in-solana/how-nfts-are-represented-in-solana
I need like this in a different way any volunteer?
Tags: css, flex, design, challenge
Published: 2022-09-19 09:58:41

```
    <div class="home-border">
      <div class="left-border"></div>
      <div class="right-border"></div>
      <div class="top-border"></div>
      <div class="bottom-border"></div>
    </div>
```

```
<style>
/* Borders */
.home-border {
  position: relative;
}
.home-border .left-border {
  position: absolute;
  height: 100vh;
  width: 2px;
  background-color: var(--main-color);
  top: 0;
  left: 10px;
}
.home-border .right-border {
  position: absolute;
  height: 100vh;
  width: 2px;
  background-color: var(--main-color);
  top: 0;
  right: 10px;
}
.home-border .top-border {
  position: absolute;
  height: 2px;
  width: 100%;
  background-color: var(--main-color);
  top: 10px;
  left: 0;
}
.home-border .bottom-border {
  position: absolute;
  height: 2px;
  width: 100%;
  background-color: var(--main-color);
  top: 98.8vh;
  left: 0;
}
/* End Borders */
</style>
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25877fzmis46x7b8smeg.PNG)
[dagger-demo] 3D Tic Tac Toe
Tags: codepen, javascript, daggerjs, framework
Published: 2022-09-19 09:38:15

<p>I thought about making this game while playing with my daughter in one of the public playgrounds in my neighborhood. The playground had a life-size Tic Tac Toe game made of wood, and my daughter played this game for the first time in her life (she's 4) and really liked it.</p>

<p>My codepen-version of this game is written in React. 3D is achieved using CSS3 transitions. The winning player is detected using bitwise operations against a list of winning patterns.</p>

{% codepen https://codepen.io/dagger8224/pen/RwMedQx %}
#TestCulture 🦅 Episode 18 - Leverage multi-device testing
Tags: beginners, testing, agile, devops
Published: 2022-09-19 09:37:13

𝐖𝐡𝐚𝐭 𝐢𝐬 𝐦𝐮𝐥𝐭𝐢-𝐝𝐞𝐯𝐢𝐜𝐞 𝐭𝐞𝐬𝐭𝐢𝐧𝐠? Multi-device or cross-device testing is a type of testing that verifies if an application works across different browsers, screen sizes, resolutions and devices as expected. It is 𝚝𝚑𝚎 𝚙𝚛𝚘𝚌𝚎𝚜𝚜 𝚘𝚏 𝚟𝚎𝚛𝚒𝚏𝚢𝚒𝚗𝚐 your application’s compatibility with different browsers and devices and making sure that it works consistently and as intended without any dependencies, or compromise in quality. The goal is also to perform really complex 𝗲𝗻𝗱-𝘁𝗼-𝗲𝗻𝗱 𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗲𝘀 on multiple devices, independently of which action is realized.

𝐖𝐡𝐲 𝐢𝐬 𝐦𝐮𝐥𝐭𝐢-𝐝𝐞𝐯𝐢𝐜𝐞 𝐭𝐞𝐬𝐭𝐢𝐧𝐠 𝐜𝐡𝐚𝐥𝐥𝐞𝐧𝐠𝐢𝐧𝐠?

➡️ 𝗟𝗮𝗰𝗸 𝗼𝗳 𝗿𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀. Multi device testing implies more devices and testers to properly test all devices. Bugs and risks tend to be 𝕙𝕚𝕘𝕙𝕖𝕣 on multiple devices testing. Moreover, setting up cross-platform tests with traditional tools is 𝕔𝕠𝕞𝕡𝕝𝕖𝕩.

➡️ 𝗖𝗼𝘀𝘁 𝗺𝗮𝗻𝗮𝗴𝗲𝗺𝗲𝗻𝘁. Multi-device testing involves the use of multiple tools to test complex user paths. Sometimes, one tool can be used per technology and device which exponentially increases the cost to test (maintenance, training, creation and analysis).
Getting a complete QA environnement can become a timebomb.

➡️ 𝗣𝗼𝗼𝗿 𝘃𝗮𝗹𝗶𝗱𝗮𝘁𝗶𝗼𝗻. Manual validation is often made by developers or project managers. Validation activities then take too much time compared to development activities.
Moreover, when running complex and large functional tests, it becomes 𝚒𝚖𝚙𝚘𝚜𝚜𝚒𝚋𝚕𝚎 to maintain every test at scale. 😰


-----------------


📚 𝕊𝕠𝕦𝕣𝕔𝕖𝕤:

🦅 https://agilitest.com/challenges/multi-device-testing

🦅 https://agilitest.com/blog/automate-scenario-test-multi-channel


--------------------


Thread [on Twitter.](https://twitter.com/agilitest/status/1555207164079267841?s=20&t=CAZFOOPkGTmLltaMuuMbMA)
Logging Patterns with Hibernate Reactive and Vertx
Tags: java, tutorial, webdev, cloud
Published: 2022-09-19 09:24:37

---
title: Logging Patterns with Hibernate Reactive and Vertx 
published: true
description: 
tags: java, tutorial, webdev, cloud
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
{% embed https://youtu.be/8Z76rCcnGKQ %}

No views  19 Sept 2022  In this video we continue with the tutorial on how to use Hibernate Reactive with Eclipse Vert.x 4.x. In particular, we cover the topic of logging.
Clean Code Chapter 1
Tags: career, programming, books
Published: 2022-09-19 09:21:30

I'm currently reading Clean Code by Robert C Martin. Here are some of my takeaways, chapter by chapter.

---

### There will be code

Essentially, no matter how sophisticated software applications become, there is a layer of abstraction that cannot be achieved without human intervention. 

> The folks who think that code will one day disappear are like mathematicians who hope one day to discover a mathematics that does not have to be formal. They are hoping that one day we will discover a way to create machines that can do what we want rather than what we say. These machines will have to be able to understand us so well that they can translate vaguely specified needs into perfectly executing programs that precisely meet those needs.
> 
> *Page 2*

---

### Bad Code

* Bad code has the potential to bring a project down.
* We *wade* through bad code: it impedes our progress, and changing it is a struggle.
* Bad code rots faster than clean code.

---

### The total cost of owning a mess
* As mess increases, team productivity decreases.
* Redesigning doesn't solve the problem, it just adds to it. 
  * The new system has to replicate the old system, keeping up with any changes.
  * By the time the system is near to complete, it's potentially so messy that it needs a redesign as well. 
* The mess of bad code is *your* fault.
  * Non-technical stakeholders look to *you* for the information required to make promises and commitments.
  * Even when we're not asked, we should  forthright with our opinions.
  * It's unprofessional to bend to the will of stakeholders who don't understand the risk of making messes.

---

### Schools of thought
* No school of thought is correct. 
* Different schools evolve from disagreements with existing forms.
* One doesn't have to accept the truth of different schools of thought.
* One should see, and respect, the other's point of view.

---

### We are authors
* We are writers of literature. 
* The main purpose of our code is to be read. 
* The majority of our time spent on a program is consumed by reading. 

---

### The boy scout rule
* Leave the campground cleaner than you found it.
* Don't submit new code without first cleaning up the existing code.
* Ensure that every submission not only delivers the requested feature, but also improves the underlying system specification.

---

### Bibliography
* *Implementation Patterns,* Kent Beck, Addison Wesley, 2007.
* *Literate Programming,* Donald E Knuth, Centre for the Study of Language and Information, Leland Stanford Junior University, 1992.
What is react native training?
Tags: reactnative, training, javascript, webdev
Published: 2022-09-19 09:04:12

There is no denying that over the past year, and particularly over the last few months, React Native has truly taken off. While React Native has long been a viable alternative for startups and small- to medium-sized enterprises, we are also witnessing an increase in the number of corporate and enterprise firms looking at and embracing the technology, rewriting many old native applications using the framework.

[React Native Training](https://www.igmguru.com/digital-marketing-programming/react-native-training/) is now not just a feasible solution, but also an exponentially cheaper alternative for developing real-world mobile applications for the majority of use cases, as a result of the rising cost and declining efficiency of developing native cross-platform mobile applications.

With this increase in popularity comes the requirement for current developers to become adept with the framework as quickly as they can. As with any technology, the best method to learn this is through hands-on instruction from industry experts, who can usually teach you in a few days what it would take you weeks or months to figure out on your own.

With a focus on classroom workshops and on-site corporate training, we will provide top-notch and cutting-edge training and course content across North America and Europe.
C - Debugging
Tags: c, debug, programming, debugging
Published: 2022-09-19 09:01:07

## # What is debugging

A 'bug' is a metaphor for a glitch in your program that might crash or exploit your program on use.   

Debugging is the practice of finding and fixing a bug in programs, software, or systems that prevents it from running correctly.

A common practice for debugging is printing data of the program to the console.

The term debugging was first coined by a woman named Admiral Grace Hopper. She found a Moth in the computer's relay which impeded operation. By removing it she said she 'debugged' the system, or something to that effect.

---

## # What are some methods of debugging manually

**Rubber Duck Debugging**

Rubber Duck Debugging is a way of explaining you code and the process to rubber duck to find and fix a bug in the system.

There are only three simple steps to rubber ducking:

- Assume your duck knows absolutely nothing about your problem. State the problem, how things are sitting at the moment, and what you are trying to accomplish instead. 

- Explain the flow of things. What happened? Go over every single step of the process without missing out on a single detail. 

- Arrive at a realization of the fix.

> Tip: for more info on how to use rubber duck read this [article](https://www.thoughtfulcode.com/rubber-duck-debugging-psychology/)

---
Props drilling in React
Tags: react, javascript, cleancode
Published: 2022-09-19 08:56:13

There are 2 common ways to solve Props drilling in React: use ContextAPI/Redux and use React Composition.

Drawback of `Context` in solving Prop drilling in React: reusability
For example, you have the `User` component deep nested, and you want to use it in other `Provider`:

```
	App
	 |-- Homepage
		   |-- User.Provider
				   |-- ... WhateverComponents
						 |---- ProfileComponent => use userData from provider here

```

What if we want to use `userData` in other container?
```
App
  |-- Homepage
  | 	   |-- User.Provider
  |			   |-- ... WhateverComponents
  |					 | ...
  |
  |-- Cart (what if we want to use userData in here?) userData will be empty here!

```

Context is suitable for passing props to many different component **under 1 nested Provider:** 


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


There's a way to solve Props Drilling, that is **Component compose**
We can re-write the above structure in code like this:
```typescript
// app.tsx
const App = () => {
	const userData = {...}
	return (
		<Homepage>
			<Component1>
				<Component3 data={userData} />
			</Component1>
			
			<Component2>
				<Component4 />
				<Component5>
					<Component6 data={userData} />
				</Component5>
			</Component2>
		</Homepage>
	)
}
	
```

the `userData` is pass right away from the container, not having to go thru parent components. This can also improve performance thus when the `userData` changes, only the components use it will re-render.

**Cons of React Composition:** when your container grows larger and larger it may cause so much deep nested components layer. To this problem, we should consider split them into smaller components and decide wisely which props should each container need and hold.

References:
https://felixgerschau.com/react-component-composition/
https://reactjs.org/docs/context.html#when-to-use-context
https://kentcdodds.com/blog/prop-drilling
https://frontendmastery.com/posts/advanced-react-component-composition-guide/
Apirone donation widget
Published: 2022-09-19 08:44:49

Apirone is glad to announce launching a donation widget. It is simple and easy to install and customize.

Now it is easy to accept donations in cryptocurrencies on your website, online store, or blog. You can collect contributions in any cryptocurrencies that the Apirone system provides and will provide. All new currencies supported by Apirone automatically appear in the widget.


## How to add the widget to your web resource?

If you have already been an Apirone account user, there is nothing complicated about adding a donation widget on your site. Insert the widget script on your site, and modify all the features according to your requirements. Now the widget is ready to help you accept donations. If you do not have an account in the Apirone system, create it. It is free and user-friendly. 

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

## How does a donor donate? 

When donors want to send money, they get an invoice to pay, and that’s how coins arrive at your account. It works as an ordinary payment in the Apirone system. It is better to have an opportunity to accept donations in several currencies to engage more donors, so we recommend creating addresses for all the currencies Apirone supports.

If you have any questions and suggestions, contact our support team at [support@apirone.com](mail:support@apirone.com)

Github with manual - [https://github.com/Apirone/donation-widget](https://github.com/Apirone/donation-widget)
Codepen - [https://codepen.io/Apirone/pen/RwMxOyJ](https://codepen.io/Apirone/pen/RwMxOyJ)
What is a class in Ruby?
Tags: ruby, programming, objectoriented
Published: 2022-09-19 08:31:11

I will try to explain what a class is in some other way, somehow quoting or paraphrasing in some parts what [@steveklabnik](https://twitter.com/steveklabnik) said a very long time ago in a presentation about OOP in Ruby.

Plato had a theory called "A Theory of Forms and Ideas" which is something like this:

Think about a perfect triangle as described by a mathematical formula. This would be a description of a form or idea of a triangle.

Plato says this triangle exists in an abstract and perfect state, but it is somehow independent of our minds. These Ideas or Forms live in their own realm, which is not our universe. 

We might try to draw a triangle, but this will be an (imperfect) representation of the triangle in our universe.

Still, almost no matter how badly we can draw a triangle, anyone can recognize it as a triangle if it has the general shape:


![An image showing various triangles drawn by hand](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6a8sjzw0hnmxrgriiy7w.png)



Thus we draw a triangle shape, and even if imperfect, we can work with it as a triangle that works out. We can compose other objects, we can calculate various parts of them, can split them into smaller objects, and much more. 

A class is like a Form or Idea of an object. 
We think about what object we will like to create, and then in the realm of Forms and Ideas we say a definition of it that usually contains data this ideal object might have and how it will behave. 

We have a notation for this in Ruby: 

```ruby
class Triangle
end
```

**Thus, a class represents the Idea of how we want an object to be.**

Then we instantiate an object that looks like the idea we wanted to describe. 
But it is not precisely that idea. 

We draw that idea in our universe where now we can move it around, add data to it & so on. 

```ruby
triangle = Triangle.new
```

The `triangle` will behave like the `Triangle`(the idea) but will not be the Idea itself.
How to use the "any" keyword in Python 3.10
Tags: python, tutorial, beginners, codenewbie
Published: 2022-09-19 08:09:41


### THIS:

![how to use any keyword in python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wo4avki2zs6qve4yfdbi.png)
### not THIS:

![how not to use any keyword in python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7jmvmeuoxpwze6g5b3vn.png)

---

### Why "THIS"?
- It's pythonic. It's as simple as can be, while keeping readability in mind.

### Why would anyone do "not THIS"?
1) You are like me and read an outdated guide by a slightly 
overenthusiastic fellow coder. 
2) I really don't know.

---


1 minute tip! 

---

_Please feel free to leave a comment if you think there's something wrong with this picture, otherwise, have a good day!_
A Quick 10-Second Programming Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-09-19 08:00:01

---
title: "A Quick 10-Second Programming Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12591442e48.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_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:___ When do front end developers go out to eat?

___A:___ On their lunch `<br>`.
 -->
Print Number Pattern Using Loops
Tags: discuss, programming, career, algorithms
Published: 2022-09-19 07:59:08

I recently found this question on one of those job interview preparation websites. The problem is simply to print a pattern of numbers given a number from 1 to _n_. For example, _n_ is _5_:

```
5 5 5 5 5 5 5 5 5 
5 4 4 4 4 4 4 4 5 
5 4 3 3 3 3 3 4 5 
5 4 3 2 2 2 3 4 5 
5 4 3 2 1 2 3 4 5 
5 4 3 2 2 2 3 4 5 
5 4 3 3 3 3 3 4 5 
5 4 4 4 4 4 4 4 5 
5 5 5 5 5 5 5 5 5
```

This honestly gave me a headache because I was trying to interpolate a mathematical function to calculate the particular digit based on the variables: _n, column_, _row_.

The solution I finally came up with considers each row (left to right) as an array of _n*2-1_ elements, and the entire pattern as a fictitious multi-dim array of _n*2-1_ rows (top to bottom). It's fictitious because I'm not actually creating a multi-dim array. This means that _n*2-1_ is the _length_ of each row (array).

The first row is initialized with _n+1_. Then at each iteration from row _0_ to _length_ the array elements from index _row_ to the inverse index _length-row_ are manipulated (decremented and incremented). This means that on the first iteration in row _0_, the elements between indices _0_ to _9-0_ are decremented. This is the reason why the array was initialized with _n+1_. At the second iteration the elements between the indices _1_ to _9-1_ are decremented. And so on until the midpoint on index _4_ has been passed after the fifth row. Then the operation is reversed and the elements between indices _length-row_ to _row_ are incremented.

```c
int main() {
  int n = 5;   

  int length = (n*2)-1;
  int numbers[length];

  // initialize array row with n+1
  for (int i = 0; i < length; i++) { 
      numbers[i] = n+1; 
  }

  // iterate through all rows
  for(int row = 0; row < length; row++) {
      // decrement elements until midpoint
      for(int i = row; i < (length-row); i++) { 
          numbers[i] -= 1;  
      }
      // increment elements after midpoint
      for(int i = (length-row); i < row; i++) { 
          numbers[i] += 1;  
      }        
      // print current array row
      for(int i = 0; i < length; i++) { 
          printf("%d ", numbers[i]); 
      }
      // print line break        
      printf("\n");
  }
  
  return 0;
}
```

I originally solved the question in C, as part of learning the programming language. To present an interactive solution here, I converted it to TypeScript, but the algorithm is basically the same. 

{% embed https://codesandbox.io/embed/print-pattern-using-loops-ne6po3?fontsize=14&moduleview=1&theme=dark %}

I would like to know if there are any other solutions to this problem or improvements to my solution.