teleren/devto huggingface dataset:
How to make Interface properties optional without changing Interface??
Tags: angular
Published: 2021-06-10 12:53:03

Hey all, we might have come across this situation where we define the Interface but at the time of defining the object out of that we might not able to have the value of all the properties, so at that position what we will use?
Let's start this by taking the example and ways we can achieve it.

```javascript
interface CustomerDetails{
  firstName: string,
  lastName: string,
  mbNumber: string,
  adress: string
}
firstCustomer:CustomerDetails={
    firstName: 'Nikhil',
    lastName: 'Dhawan'
  }
```
Here we will get the below error message, which simply means that we don't have all properties

`Type '{ firstName: string; lastName: string; }' is missing the following properties from type 'CustomerDetails': mbNumber, address`

####How we can correct this situation?
The first way which will come to your mind will be making all properties optional like 

```javascript

interface CustomerDetails{
  firstName?: string,
  lastName?: string,
  mbNumber?: string,
  address?: string
}
firstCustomer:CustomerDetails={
    firstName: 'Nikhil',
    lastName: 'Dhawan'
  }
```
This approach will surely solve our error but we have a more elegant way to handle this rather than going to all interfaces and making the properties optional.

```javascript

interface CustomerDetails{
  firstName: string,
  lastName: string,
  mbNumber: string,
  address: string
}
  firstCustomer:Partial<CustomerDetails>={
    firstName: 'Nikhil',
    lastName: 'Dhawan'
  }
```
Here we used Partial<> which helps us to make the properties option for the underlying Interface.

So now if we write in this way we will be able to achieve the same behavior but without modifying our actual interface. 

Hope this helped you in learning something new and interesting, if you already knew this, please share it so others can also learn this or if any suggestions reach me out on [Twitter](https://twitter.com/nikhild64) or comment below. Till next time Happy Learning.
Do share your feedback.
Ruby, the "unless" keyword
Tags: ruby, beginners
Published: 2021-06-10 12:45:20

Article originally posted here : https://bootrails.com/blog/ruby-unless
  
You are probably familiar with the "`if else`" control flow but there are certain situations where there may be a visually better way to write these statements. Here we will discuss how you can achieve this via the `unless` keyword in Ruby and the different ways you can use it.  
  
## Unless you already know...  
  
When we use an `if` statement we want to check whether a condition is true or not. If it is true, you execute a block of code. If it is false, the code does not get executed. Simply put `if` checks for a truthy value. Like many other languages.  
  
You can think of `unless` as the exact opposite of this. `unless` can replace the `if` keyword but it will check for a falsy value and execute the code if the condition it is checking is false.  
Syntactically this is shown below:  
  
```ruby  
puts "Passed" if score > 50  
```  
```ruby  
if score > 50  
  puts "Passed"  
end  
```  
  
Becomes  
  
```ruby  
puts "Passed" unless score < 50  
  
unless score < 50  
  puts "Passed"  
end  
```  
  
As you can see the only difference is that you now need to change the condition. So `unless` is just the exact opposite of `if`.  
  
You might be wondering why Ruby gives you a keyword for this specifically. Well writing your control flow this way will improve the visual appeal of the code as you will no longer need to flip your conditions around using the `not` operator in more complex conditions.  
  
Samples:  
  
```ruby  
# okay, understandable, but your eye may miss the "!"  
do_something if !some_condition  
  
# okay, readable, understandable, but "not" is not always liked by Ruby developers  
do_something if not some_condition  
  
# okay, readable, understandable  
do_something unless some_condition  
```  
  
## As a modifier  
  
You may have noticed in the last example that `unless` can also be used as a modifier similar to `if`.  
  
In this sample:  
  
```ruby  
unless score < 50  
  puts "Passed"  
end  
```  
  
Becomes  
  
```ruby  
puts "Passed" unless score < 50  
```  
  
The left-hand side behaves as a then condition (code that will be executed) and the right-hand side behaves as a test condition.  
  
## Notes  
  
Even though it is completely possible to use `else` in the `unless` statement it is suggested in best practices that you should avoid doing this and prefer to use the `if` keyword when you need to have an else condition. This is because using `else` with `unless` can create confusing control flows to read. For example:  
  
```ruby  
# works, but not advised  
unless passed?  
  puts 'failed'  
else  
  puts 'passed'  
end  
```  
  
## Personal thoughts  
  
At the beginning, `unless` is clearly counter-intuitive. It took me some time before to use it daily without additional headaches. This keyword however is a good example of what Ruby is trying to achieve : increase readability.
Argument of type NextHandleFunction is not assignable - Nodejs
Tags: node, typescript, javascript
Published: 2021-06-10 12:11:03

How to fix the issue for the latest node express regarding with Argument of type "NextHandleFunction" is not assignable to parameter of type "PathParams".


Visit the full tutorial here:
https://letscodepare.com/blog/argument-of-type-nexthandlefunction-is-not-assignable-nodejs
Are You Learning Too Much?
Tags: growth, learning, motivation, beginners
Published: 2021-06-15 06:21:13

---
title: Are You Learning Too Much?
published: true
date: 2021-06-10 12:05:00 UTC
tags: growth,learning,motivation,beginners
canonical_url: https://x-team.com/blog/learning-as-procrastination/
---
Great software developers never stop learning. They're always deepening or widening their knowledge. In a field as fast-moving as programming, learning is essential to stay relevant and, some people forget, to keep a career interesting and dynamic.

Learning has undergone a drastic transformation since the development of the Internet. Gone are the dusty tomes we used to learn from. Today, much of learning happens through bite-sized, self-paced modules that are well-explained, professionally made, and easy to digest. Learning is no longer something to dread. On the contrary, it's become addictive.

And that's where it becomes dangerous. It's where learning turns into a form of procrastination, where we avoid doing what we're learning about in favor of learning just a little more about it.

For example, you can learn all there is to know about JavaScript through tutorials, guides, and courses, and still not be any good at it. At some point, you'll need to step away from those controlled environments and [build something from scratch](https://x-team.com/blog/new-and-better-project-ideas/) on your own, without any help.

We keep learning because we believe we're not ready yet. It's our [impostor syndrome](https://x-team.com/blog/dealing-with-imposter-syndrome/) whispering to us. We tell ourselves that we're not ready to make the jump yet, even though no one ever feels entirely ready before they do. We think we need another tutorial, something that's easy, just one more.

The reality is that you learn the most when you do the real thing. As a developer, you need to code. No training wheels. It's much harder to write JavaScript than it is to learn about it. In addition, you'll feel frustrated, annoyed, and it won't always be fun.

But that's the point. Those emotions tell you what you already understand and what you don't. They offer valuable information that you can use to direct your learning. Are you struggling with `this`? Learn about it quickly, then try working with it again.

Don't fool yourself into thinking you're learning when you're not doing the real thing. It's quite possible you're wasting your time. Tutorials, guides, and courses are useful as an introduction or a clarification, but real learning happens when you dive in deep. Knowledge is only power when it's applied.
Day 22/30 : Amazing Profile Cards Design Using HTML and CSS
Tags: html, css, webdev, tutorial
Published: 2021-06-10 12:02:27

Welcome to Day 22 of this [Challenge](https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1). This is what I created today. 

**➜ Here is the Demo :**
![Amazing Profile Cards Design](https://1.bp.blogspot.com/-TAZH9QTBv0g/YKoV4-GLlBI/AAAAAAAAAHE/SmDMEbPLSHUEA96OC8Pg5Sf9xDnWfH0FQCLcBGAsYHQ/s600/p22.gif)

**➜ Video Tutorial :**

{% youtube DjNqabcLOoE %}
**➜ Source Code :**
https://www.futurecodersweb.com/2021/06/amazing-profile-cards-design-using-html.html


**➜ Instagram Post and Reel for Day 22 :**
[See Post and Reel](https://www.instagram.com/future_coderss/)

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

Hey, If You don't know what is happening here. Don't Worry, I am doing a crazy challenge 😅. Read More about it from the post below.

{% link https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1 %}

**Support Me :**
👉 Buy me a Coffee: https://www.buymeacoffee.com/somanathgoudar
👉 [Follow Me on Instagram](https://www.instagram.com/somanath_goudar/)
👉 [Follow Future Coders on Instagram](https://www.instagram.com/future_coderss/)
👉 [Subscribe to My Main Channel](https://www.youtube.com/channel/UC_nTrhTr5fnBGjOxnkPUmmA)
👉 [Subscribe to Channel Created for this Challenge](https://www.youtube.com/channel/UCzGSyMOf2jPt1MkNBB3SJ3g)

------------------------------------------------------------------
Benefits of Marketplace Connector Extension?
Tags: javascript, php, magento, css
Published: 2021-06-10 11:47:07

Marketplace integration tool by which we can connect our online store([Magento](https://magento.com/)) with marketplace and upload as much as product as we want. It provides lots of benefits which i have discussed below:

**Reduces manual selling process:**
The [eCommerce marketplace integration](https://cedcommerce.com/blog/ecommerce-marketplace-integration-for-multichannel-selling/?utm_source=dev.to-ecommerce-marketplace-integration-for-multichannel-selling-sonker) simplifies the process by removing the majority of the manual tasks. It automates the entire workflow, which includes operations like product upload, order administration, and figure adjustments, among others.

**Secure and Fast Data Transfer:**
Because all of the platforms' APIs are connected in real time, data flow between them is not only quick but also safe. A validation is conducted on each data transfer call. The eCommerce connector reduces all friction in the data flow from marketplaces to stores and inventory, lowering the risk of errors.

**Saves time and effort:**
This connection saves the seller a lot of time and work by simplifying the selling process. Instead of being involved in the store, sellers can focus on other important issues.

**No need to switch between platforms:**
One of the best features of this connection is that it eliminates the need to switch between platforms in order to manage activity on that platform. Instead, all of the operations can be coordinated from a single location (or dashboard).

**Improves the SEO:**
The eCommerce marketplace integration places your products in the most relevant categories, allowing them to rank at the top of search results. It also allows users to change the descriptions in different languages depending on the location they want to target.
Reach other developers where they hang out (100 Bytes Of Wisdom: Day 55)
Tags: career, journey, advice
Published: 2021-06-10 10:49:02

---
title: Reach other developers where they hang out (100 Bytes Of Wisdom: Day 55)
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---

![Reach other developers where they hang out](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbfx3uah5metxr86is5c.png)

If you're trying to reach developers to show them blog posts, or to sell them something or whatever, think about the marketing technique of trying to reach them where they hang out. Some good places at the time of writing this byte are Dev.To, Twitter, Instagram and TikTok is on its way too. 

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
The feeling of Trunk-Based Development
Tags: humour, devops
Published: 2021-06-10 10:47:24

---
title: The feeling of Trunk-Based Development
published: true
cover_image: https://danlebrero.com/images/blog/trunk-based-development/trunk-based-development.png
tags: humour, devops
canonical_url: https://danlebrero.com/2021/03/03/the-feeling-of-trunk-based-development/
description: How Trunk-Based Development really feels
---

Trunk-Based development. 

Yet another practice that is rarely practiced in our industry, even if it is identified in the [Accelerate book](https://danlebrero.com/2020/01/22/accelerate-high-performing-technology-orgs-summary/#content) as one of the technical capabilities that is correlated with higher delivery performance.

Plenty of blogs and conference talks explain the marvellous benefits of using it.

You probably also needed to practice it to pass Jez Humble's  [Continuous Integration test](https://continuousdelivery.com/foundations/continuous-integration/#faq):

1. Each commit should trigger a build and run some test suite.
1. The build is never broken for more than 10 minutes.
1. Commit to mainline every day. 

<p class="sidenote">Yes. You need to commit to trunk/master/main every day if you want to claim that your company is doing Continuous Integration.</p>

If with all the existing material, your teammates haven't been convinced to use Trunk-Based development, adding more reasons to the debate is foolish.

Replicating the very successful method to [convince your company to use Clojure](https://danlebrero.com/2018/10/16/how-to-convince-your-company-to-use-clojure/#content) could be a possibility, but a year as CTO teaches you that [appealing to people's emotions](https://danlebrero.com/2020/12/16/cto-diary-meeting-the-business/#content) is more effective that any reasoning.

#### So how does Trunk-Based development feel like?

Basically: 

![the-feeling-of-trunk-based-development](https://danlebrero.com/images/blog/trunk-based-development/the-feeling-of-trunk-based-development.gif)

a race to be the first one to commit & push, so it is your teammate -- and not you -- the one that has to deal with any conflicts. 

Happy Trunk-Based developing!

---

Actually Trunk-Based development is great! For a more serious "Why Trunk-Based development" content I would recommend Mattia Battiston blog [Why I love Trunk Based Development](https://medium.com/@mattia.battiston/why-i-love-trunk-based-development-641fcf0b94a0) or Steve Smith talk [The Death of Continuous Integration](https://www.infoq.com/presentations/death-continuous-integration/). Enjoy!
JavaScript Quick Tip: Quickly Get All Unique Values From An Array
Tags: javascript, typescript
Published: 2021-06-10 10:39:20

The array is still one if not the major data structure in JavaScript. Especially given the fact that Set and Map were introduced way later, many developers have grown comfortable either going with a plain array or using a library for this purpose.

If we now take into account that the array is the only data structure in JavaScript that comes with functional monad methods (map, filter, forEach, etc.), although there is a proposal going on to add these methods to all iterables, it's often more comfortable to go with a plain array for most purposes.

The JavaScript array makes no assumptions about its elements. You can mix and match types, and you can also push duplicates. But what if you only want the unique values of your array?

Gladly, there is a pretty short one-liner that makes it easy for you to filter out duplicates and get an array only containing unique values.

## The Code

You can combine the spread operator together with the Set constructor to quickly get all unique values of an array:

```JavaScript
const array = [1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 4];

const unique Values = [...new Set(array)];
```

There is only one issue with this code: The Set relies on the strict equality comparison (===), so it doesn't work well for objects.

## The Whole Tip As An Image

If you like visual content more, or if you want to store it for later, I put all this into one single image for you. I hope you like it!


![A picture showcasing the above code](https://cdn.hashnode.com/res/hashnode/image/upload/v1623321195020/3bHF80KjG.png)

## Before You Leave

If you would love to read even more content like this, feel free to visit me on [Twitter](https://twitter.com/intent/follow?screen_name=oliverjumpertz) or [LinkedIn](https://www.linkedin.com/in/oliverjumpertz/).

I'd love to count you as my ever-growing group of awesome friends!
Lua v Ruby
Tags: lua, ruby, watercooler, healthydebate
Published: 2021-06-10 10:29:51

Lua. My 5th favourite language (after python, typescript, go and javascript). While not that powerful, it's the language of choice for roblox and some 2D gamedevs (via Love2D). Coded in C with easily readable syntax and good for beginners. Lua is going to put up a good fight.

Ruby. Not that popular in gamedev but useful in webdev (via ruby on rails) it is the language that just so happens to power DEV! Much more powerful than lua at the expense of speed and effectiveness as a first programming language for absolute beginners.

## Lua
Let's see what we have here:
- ✔ &nbsp;Fast
- ✔ &nbsp;Game engine support
- ✔ &nbsp;Simple syntax
- ✔ &nbsp;Dynamically typed
- ✔ &nbsp;Compiled
- ❌ Not very powerful
- ❌ Compiles to `.out` files unless you use srlua
- ❌ Have to download the package manager.

## Ruby
And rivalling lua:
- ❌ Not as fast as lua
- ✔ &nbsp;Game engine support (Ruby2D)
- ✔ &nbsp;Simple syntax
- ✔ &nbsp;Dynamically typed
- ✔ &nbsp;Interpreted
- ❌ Very powerful
- ✔ &nbsp;Webdev
- ✔ &nbsp;Built in package manager

And there we have it! Ruby wins by *1* point. This brings me to the end of *my* article but I would love to hear what you think! Comment down below to share your thoughts 💬.
Doubly Linked List

Tags: doublylinkedlist
Published: 2021-06-10 10:23:31

We will going to learn about <a href="https://favtutor.com/blogs/doubly-linked-list-python">doubly linked lists</a> in this post.
 
What exactly is a linked list?

A linked list is a data structure with each node representing an object. The Linked list data structure, unlike ordinary Arrays, does not have a contiguous memory structure. Every element has a reference that connects it to the next node.

Every element in the Linked list is referred to as a Node. Every node has a key or data element, as well as a pointer to the next member in the list. Head is the beginning pointer in the Linked list. It's important to note that the "Head" pointer is a reference to the first element of the Linked list, not another node. The value of Head will be null if the linked list is empty.

What is a Doubly Linked List, and how does it work?

It is easier to implement a singly linked list or a linked list, but traversing it in reverse is much more difficult. To overcome this, we can use a Doubly LinkedList, in which each node takes an additional pointer to point the previous node to the element in addition to the pointer for the next node.

Iteration is more efficient in a doubly linked list, especially if you need to repeat in reverse, and deletion of specific nodes is more efficient.

To summarise, a doubly linked list is a more complex sort of linked list in which each node holds a pointer to both the previous and next node in the series. A node in a doubly-linked list thus has three components: node data, a pointer to the next node in the list (next pointer), and a pointer to the prior node (previous pointer).

Why is it necessary to utilise a doubly linked list?

When both ahead and back navigation is required, a doubly linked list can be utilised in navigation systems. Browsers employ it to implement backward and forward navigation of visited web pages, also known as the back and forward buttons. Various applications use it to implement Undo and Redo features.

The Benefits of a Doubly Linked List

A DLL can be walked through both forward and backward.

If a pointer to the node to be destroyed is provided, the delete operation in DLL is more efficient.

Before a given node, we can quickly insert a new node.

A music player with next and previous buttons, similar to the concept of a double linked list, with the ability to travel back and forth between elements.

The Drawbacks of a Doubly-Linked List

Every DLL node necessitates more space for a prior pointer (This can be overcome by implementing XOR Linked list)
Prior to any operation, an extra pointer must be kept.
Neural Search Tutorial
Tags: deeplearning, machinelearning, tutorial, datascience
Published: 2021-06-10 10:21:31

We made a [tutorial](https://blog.qdrant.tech/neural-search-tutorial-3f034ab13adc) on Semantic Embeddings and Neural Search.
With this guide, you will build your semantic search service from scratch.

You won't need any complicated training of the neural network. Moreover, you can do all preparation steps in the Google Colab notebook.

Tutorial includes:
- What is the Neural Search?
- Getting embeddings from [BERT Encoder](https://github.com/ThilinaRajapakse/simpletransformers)
- Using vector search engine [Qdrant](https://qdrant.tech/)
- Creating an API server with [FastAPI](https://fastapi.tiangolo.com/).


If you want to learn how to build [projects like this](https://demo.qdrant.tech/), the tutorial is for you.
iWeb Scraping Services
Tags: webscrapingservices, mobileappscrapingservices, dataextration, webscrapingapi
Published: 2021-06-10 10:04:35

iWeb Scraping is the best web scraping and data extraction company, helping customers around the world with important data to fulfill their business requirements. Depending on the Data-as-a-Service (DaaS) model, iWeb Scraping utilizes Machine Learning and Cloud Computing methods to provide Big Data solutions to businesses. 
 
Our web data scraping services help businesses in getting the required data in the way they want it. We always use advanced web scraping, web crawling, as well as data extraction methods to provide ready-to-use data that powers different business intelligence apps.  

Visit Our Website:-www.iwebscraping.com