teleren/devto huggingface dataset:
Main steps to build an eCommerce website with Shopware
Tags: webdev
Published: 2020-12-02 10:47:57

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/esya2h3ue7gya3rg8hjj.png)
eCommerce website development is a rewarding thing. It contributes to your business promotion, buyers engagement and strengthening their loyalty to your brand.

Although website development requires a thoughtful approach, so it could fully meet your business needs, there is a vast amount of eCommerce solutions to ease the task. 

One of those solutions is **Shopware eCommerce platform** that allows creating a digital store from the ground up without going mad. Quite the opposite, Shopware has enough capabilities to make you enjoy a development process.

Let’s review which steps to follow to turn your scratch into an excellent website:

* **Analyse what type of products or services you will offer on your upcoming website**. Begin with your competitors analysis and you won’t go wrong, as your rival’s company has already gained certain experience in your business niche. It will be very useful to have an idea of their tactics, so you could refine yours;


* **Figure out what business model you are going to apply**. You need to decide where you are going to sell your products. It can be exclusively your website, or you can do it through a marketplace too. A little hint: omnichannel businesses are in high demand;


* **Select a domain name**. Once you have coped with two previous tasks, you are free to choose your domain name. Note that your domain name must somehow relate to your company message and business specification. Right at the start it’s more reasonable to focus on a shared domain. Subsequently, when your business expands, you can already afford a dedicated domain;


* **Choose your eCommerce platform**. There’s a wide variety of website builders to every taste and budget. If you only begin your eCommerce journey, pay attention to Shopware. As I have already mentioned, it possesses a big number of functionalities, and some of them will certainly meet your company needs. Moreover, if you have a limited budget, Shopware makes it possible to build a worthy website for free.

Shopware eCommerce platform has a high usage rate all over Europe not in vain. [This article](https://dinarys.com/blog/make-an-ecommerce-website-with-shopware?utm_campaign=Submission&utm_medium=Community&utm_source=GrowthHackers.com) explains more about Shopware major features and overviews its benefits. You shouldn’t miss it!
Ontologies - part I: Introduction
Tags: datascience, owl, beginners, ontology
Published: 2020-12-02 10:39:40

As someone who studied philosophy back in the day (am I old yet?) I've thrown the word ontology around a lot. As someone who is now a web developer, I've heard it in passing in the corridors. But as someone in a 3-man IT/DEV/OPS team, I have been gifted the task of diving into it because someone had to.

Luckily I like a challenge. 

![David Tenant about to lose it](https://dev-to-uploads.s3.amazonaws.com/i/igfka94b0nt028otqjoq.gif)

A major aspect of this challenge will be to explain to my coworkers what this is and how they will need to wrap their minds around, so this series of posts will be an exercise in summarizing and condensing what I learnt each day.

##Basically, what is an ontology?

Before you think of data, think of the real world. You know fruit comes from a tree, not from a seed. You don't know how you know or when you learnt, but you know that you plant a seed, get a tree, get some fruit. One type of fruit comes from one type of tree. Carrots are edible, so is fruit, but a carrot is not a fruit.
All these statements are description of reality. What if someone tried to unravel the matrix behind reality, break all of the fruit-stuff I mentioned before to tiny bits of reality, then classify those in neat boxes and relationships between said boxes?
Basically that's an ontology. Classes and relationships.

##Why do we need this?
The main advantage is that those relationships and classes can be translated into a language the machine can understands, ie, your computer. If someone says "this carrot came from the carrot tree" you know it's wrong - but how does your computer know that this can not be true in reality?

![Guy dancing in carrot costume](https://dev-to-uploads.s3.amazonaws.com/i/u4146j5zconqb3ht79md.gif)

##Is this the same as a taxonomy?
Most of us are more familiar with a taxonomy. At the very least you've seen one in biology class. 

![red fox](https://dev-to-uploads.s3.amazonaws.com/i/1qcqnslmp0puzotwwzip.jpg)
Species: Vulpes vulpes -> Genus: Vulpes -> Family: Canidae -> etc.
Taxonomies are hierarchical, they formalize the relationships. It's a type of structure, and you can often easily visualise it as a tree-like structure. They tend to be applied to one domain. You classify documents, you classify tools, but how do you connect information in documents about the tools? That's where ontologies help. 
[This](https://www.earley.com/blog/what-difference-between-taxonomy-and-ontology-it-matter-complexity) post was very helpful to me.

Enough for one blog, see you later hopefully for the rest.
My First Ever Blog Post
Tags: devblogging, blog, python, programming
Published: 2021-04-09 10:32:09

---
title: My First Ever Blog Post
published: true
date: 2020-12-02 10:27:31 UTC
tags: DevBlogging,blog,Python,programming
canonical_url: https://pybash.hashnode.dev/first-blog-post
---

### Whoever is Reading this post,

This is my first ever blog post. I am not going to tell you anything in this post. Just wanted to get a hand with this. I'll post better content so please don't just skip this blog post because it's silly and a waste of time.

So let me give you an introduction about me. I am a **developer** and I make simple yet effective & useful apps( **Desktop** ) that help people in everyday life. All of my apps are available on my **[GitHub](https://www.github.com/play4Tutorials)**. One such app is **[UnHackable](https://github.com/play4Tutorials/UnHackable)**, which generates random passwords to keep you safe on the Internet. So maybe go check it out. And let me know if you find any issue because I am constantly working and fixing it. That would be a real help if you did.

And I guess that's the end of it. All about me. Hope you liked it and enjoyed it. Let me know in the comments.

[https://www.github.com/play4Tutorials/UnHackable](https://www.github.com/play4Tutorials/UnHackable)
Plain text vs plaintext
Tags: beginners
Published: 2020-11-06 20:01:59

Sometimes when we are programming we don't always do the right thing. This can easily be the result of how a requirement is phrased and a lack of context in assigned tasks. Lets take this example.

> No password may be stored as plaintext.

If this were presented to a developer implementing a way to store passwords what would happen? Some developers may see this and think they only need to encode the password using `Base64`. Other developers may see this and think passwords should be encrypted. These are two very different solutions.

The problem is in the way the requirement is presented. If this is presented as a one line task assigned to a developer you may end up with the `Base64` encoding solution. The task lacks context. It doesn't provide a reasoned argument for the requirement which may indicate which solution is better. That context may look something like this.

> Passwords are a security mechanism meant to prevent access to some part of a system. Passwords should not be stored as plaintext so they cannot be easily exploited to gain access to the system.
>
> No password may be stored as plaintext.

With this context a developer may understand that `Base64` encoding is easy to recognize and decode to gain access to the system.

There is also an ambiguity in the requirement that is not being addressed. The ambiguity is in the meaning of plaintext. Plain text has two definitions.

Developers wanting to use `Base64` encoding are defining plain text as readable text.

[Plain Text](https://en.wikipedia.org/wiki/Plain_text)

> In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects (floating-point numbers, images, etc.).

Developers wanting to use encryption are defining plain text as unencrypted data.

[Plaintext](https://en.wikipedia.org/wiki/Plaintext)

> In cryptography, plaintext usually means unencrypted information pending input into cryptographic algorithms, usually encryption algorithms. Cleartext usually refers to data that is transmitted or stored unencrypted ("in clear").

The requirement should clear the ambiguity by addressing what is meant by plain text.

> Passwords are a security mechanism meant to prevent access to some part of a system. Passwords should not be stored as plaintext so they cannot be easily exploited to gain access to the system.
>
> No password may be stored as plaintext. Meaning, passwords should not be store as unencrypted data or "in the clear."

When writing tasks for other developers it is important to:

1. provide clarity by giving the context of a problem
2. remove any ambiguity that may result in an unintended solution
Wednesday Links - Edition 2020-12-02 🦌
Tags: microservices, docker, java, graalvm
Published: 2020-12-02 10:20:21

A Byzantine failure in the real world (8 min read) 💥
https://blog.cloudflare.com/a-byzantine-failure-in-the-real-world

... and discussion around Raft weak spots (4 min read) 🦶
https://twitter.com/heidiann360/status/1332711011451867139

Micrometer support added to Lettuce (30 sec read) 🥬
https://github.com/lettuce-io/lettuce-core/pull/1495

Maven prepares for version 4 (30 sec read) 🆙
https://github.com/apache/maven/commit/3736be9c15122d65e6ef675557eb0f882f82b012

Jackson 2.12 features (8 min read) 🎉
https://cowtowncoder.medium.com/jackson-2-12-features-eee9456fec75

Oracle JRE and JDK Cryptographic Roadmap - TLS deprecations and more (4 min read) 🛣️
https://java.com/en/jre-jdk-cryptoroadmap.html

Metal for IntelliJ Platform (1 min read) 🦾
https://blog.jetbrains.com/platform/2020/11/metal-for-intellij-platform/

Running React Applications at the Edge with Cloudflare Workers (15 min read) 👷
https://www.infoq.com/articles/react-app-edge-cloudflare-workers

Profiling a GraalVM native image with perf (4 min read) 🚄
https://www.loicmathieu.fr/wordpress/en/informatique/profiler-une-image-native-graalvm-avec-perf/

Solving a substitution GraalVM issue (5 min read) 🔃
https://blog.frankel.ch/solving-substitution-graalvm-issue/

HTTP Search method (2 min read) 🔎
https://twitter.com/jasnell/status/1327256382383374339

Fail Fast Is Failing… Fast! (9 min read) 🍂
https://pathelland.substack.com/p/fail-fast-is-failing-fast

Docker for Java devs: 5 things you need to know not to fail your security (8 min read) 🔐
https://snyk.io/blog/docker-for-java-developers/

Goodbye Dockerfile: Cloud Native Buildpacks with Paketo.io & layered jars for Spring Boot (20 min read) 🧳
https://blog.codecentric.de/en/2020/11/buildpacks-spring-boot

AWS EC2 Mac Instances Launch (3 min) 🍏
https://www.youtube.com/watch?v=Pn3miC_tTH0

Name by role (8 min read) 🏷️
https://blog.ploeh.dk/2020/11/30/name-by-role
Three Handy Xcode and Swift Tips
Tags: swift, ios, mobile, xcode
Published: 2020-12-02 10:08:55

Xcode is a great tool for developing iOS applications and it is packed with a huge amount of features. The problem is that they are not always easy to find and have caused me frustration in the past.

Below I will highlight a few of the, I think, lesser-known features and shortcuts that make your life easier in Xcode.

### Generate Memberwise Initialisiers
Swift structs come fully loaded with automatic init generation, which can save you a lot of time. Classes are not so lucky. 

![Screen Shot 2020-12-02 at 9.33.11 AM](https://dev-to-uploads.s3.amazonaws.com/i/nq8w2o8w2g01ljfdh150.png)

We have all spent far too long writing our own init for a class, but no longer! Xcode offers a handy feature that generates them for us.

![Screen Shot 2020-12-02 at 9.33.43 AM](https://dev-to-uploads.s3.amazonaws.com/i/onjo9e44yf6j1ctlb2mh.png)

By right-clicking on the class name and opening the refactor menu, we are presented with the "Generate Memberwise Initializer" option. This does what it says on the tin and generates an init for us.

![Screen Shot 2020-12-02 at 9.34.08 AM](https://dev-to-uploads.s3.amazonaws.com/i/76mh8fxqyr9oguxqtfs0.png) 

### Multi Cursor Editing
Most IDEs and text editors have powerful multi cursor functionality, allowing you to select multiple lines and edit them at the same time.

It is less well known that Xcode offers this functionality too! It is generally a little less powerful than most editors offer, but it gets the job done if used smartly.

![Screen Shot 2020-12-02 at 9.45.46 AM](https://dev-to-uploads.s3.amazonaws.com/i/akf9lo77kicg41cfk87e.png)

A great use for this feature is when working with the Codable protocol. We all love using camel case when writing Swift, but the APIs we connect to seem to always work in snake case. Setting up the Coding Keys for Codable to correctly read the returned JSON can be a pain, especially for more complex responses.

Using the multi cursor select we can copy the class variables into the CodingKeys struct and use control + shift + down (or control + shift + click) to get multiple cursors and fill them out.

{% youtube b3SjFGQW3Tk %}   

### Quick Open
A really handy shortcut for finding files and classes in Xcode is using quick open, which can be triggered by using command + shift + O.

Open the interface and start typing the name of the class, variable, or file that you want and tap enter to open it.

![Screen Shot 2020-12-02 at 10.07.01 AM](https://dev-to-uploads.s3.amazonaws.com/i/gd2vhf1ouxzhkd5692mt.png)
Is fetch too low-level? Do you have a favorite wrapper?
Tags: discuss, fetch, javascript, typescript
Published: 2020-12-02 10:06:48

Furthermore, I am not sure about [node-fetch](https://www.npmjs.com/package/node-fetch) or [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch), on `Node.js`'s side.

What is surprising about `fetch`, is that it does not ["raise-for-status"](https://www.geeksforgeeks.org/response-raise_for_status-python-requests/) by default. Similarly, not sure about XMLHTTPRequest, where I rarely use it natively. See [XMLHTTPRequest vs fetch](https://stackoverflow.com/questions/35549547/fetch-api-vs-xmlhttprequest).

Maybe a relatively safe way is to do it like this.

```ts
import deepMerge from './util'

export function createApi<
  T extends Record<
    string,
    {
      options: RequestInit
      response: any
    }
  >
>({
  validate = (r) => {
    if (!r.ok) throw new Error(`${r.status}: ${r.statusText}`)
  },
  parse = (r) => r.json(),
  options = {},
}: {
  validate?: (r: Response) => void
  parse?: (r: Response) => Promise<any>
  options?: RequestInit
} = {}) {
  return async <K extends keyof T>(
    url: K,
    opts: T[K]['options'] = {}
  ): Promise<T[K]['response']> => {
    return fetch(url as string, deepMerge(options, opts)).then(async (r) => {
      validate(r)
      return parse(r)
        .then((r) => {
          if (r.error) throw new Error(r.error)
          return r
        })
    })
  }
}
```

Umm, I tried writing it, and it gets a little complex in TypeScript version...

Yes, this is not even accounting for [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)...
any? and empty? are not antonyms
Tags: todayilearned, ruby, beginners
Published: 2020-12-02 09:59:55

---
title: any? and empty? are not antonyms
published: true
tags: til,ruby,beginners
---

## What I Learned

```ruby
[nil].any? # => false
```

Because my expectation was it to be `true`. My conception of `Enumerable#any?` was that it _returns true if it has any record_. Not only that, my metal shortcut it was that was an antonym to `Array#empty?`.

## And why exactly is this interesting? 

1. Ruby has many methods which mean and do the same thing. Like `Array#size` and `Array#length` and, to some extent, `Enumerable#count`.
2. Ruby has many methods which mean and do opposite things. Like `Enumerable#all?` and `Enumerable#none?`
3. Knowing what `empty?` does and of 1. and 2., I believed that `any?` would do its opposite. 

Enlightenment came about during code review where I was suggesting to remove the unnecessary `if` conditional

```ruby
if collection.any?
  collection.map do |i|
…
```

After discussing the problem and poking the code we were able to remove the `if` by preventing `nil` from getting into `collection`.
Stateful Là Gì- So Sánh Sự Khác Nhau Giữa Stateless & Stateful
Published: 2020-12-02 09:59:45

Stateful là gì? giữa Stateless vs Stateful có sự khác biệt như thế nào không phải ai cũng biết.Hãy cùng tham khảo bài viết dưới đây nhé.. Xem chi tiết tại: http://laptrinhvacongnghe.com/stateful-la-gi/
5 Best Coding Challenge Websites For Beginners
Tags: codenewbie, computerscience, programming
Published: 2020-12-02 09:55:07

The Best way to improve your coding skills is by solving lots of coding problems. By solving the coding problems, you will get familiar with the programming language, improve your logical skills, interactive coding, learn the inside out of programming concepts, get prepared for the job interviews, and a lot more.

##Exercism-
The [Exercism](https://exercism.io/) is an Online Coding platform founded by Katrina Owen and Jeremy Walker in 2013. Exercism has 3400+ exercises across 52 different languages offered free of cost to users. Exercism offers a mentor for the solution discussions after you submit a working solution to a problem. As of today, Exercism has over 330K users in over 200 countries, 50 programming languages, and 1.4m solutions submitted.

##SPOJ-
[SPOJ](https://www.spoj.com/) platform is based on the Online Judge System where users submit the programs for automatic assessment. SPOJ has more than 13000 tasks with 45 different programming languages. SPOJ has around 814k registered users, 6835 public problems, and more than 2.6m submissions as of today.

##Programmr-
[Programmr](http://www.programmr.com/) is an internet interactive platform for anyone to discover and practice coding. They believe that the most effective means to find out is at your very own pace in a self-taught setting. Programmr claims to make the globe's ideal coding simulators, where you can code as well as run all kinds of programs and can be considered as best coding website for beginners. Programmr has a fantastic online coding simulator as well as a B2B API that permits anybody to integrate coding widgets right into internet sites.

##TopCoder Challenges-
[TopCoder](https://www.topcoder.com/) is a competitive programs platform. It supplies a collection of mathematical challenges that you can take on in your own personal code editor. There's constantly challenges up as well as running on the site as well as you can constantly get involved if you're up for it.

##CodeWars:
[Codewars](https://www.codewars.com/) is a properly designed platform where individuals collaborate to create obstacles. There are two groups of individuals making it work, the programmers who authorize kata to educate different techniques, fix kata with services that inform others, and also comment with positive responses, and also the leaders will certainly moderate the content as well as area.

There are off course [more](https://techyeverything.com/21-coding-challenge-websites/) platforms where you can practice coding and the key concepts. The above websites can be ideal for a beginner as they have a simple User Interface with minimal things on screen that may intimidate sometimes.
Tomcat Là Gì- Tìm Hiểu Tổng Quan Về Apache Tomcat
Published: 2020-12-02 09:47:34

Apache Tomcat là gì- Đây là một loại web server HTTP được phát triển bởi Apache Software Foundation, nó có khả năng hỗ trợ mạnh cho các ứng dụng Java. Xem chi tiết tại: https://blog.itnavi.com.vn/apache-tomcat-la-gi/
Extremely easy-to-use drawing software includes many brushes, backgrounds, textures
Tags: drawingsoftware
Published: 2020-12-02 09:45:59

[MediBang Paint Pro](https://en.taiwebs.com/windows/download-medibang-paint-pro-610.html) is an extremely easy to use painting software that includes numerous brushes, backgrounds, textures, and comic book fonts for user to use to make their ideas come to life. Registering at the online art community MediBang allows users to have access to cloud storage and share their work, and create groups with other users. MediBang Paint Pro is light, and user friendly, and comes loaded with all of FireAlpaca’s features and more.
Features:
• Manage multiple pages in one file
• Create comic panels easily
• Over 700 free materials
• Use it on Windows or Mac!
• Back up your data safely with cloud storage
• Simple, easy to use interface
• Stunningly crisp lines
• Publish to the world, with just one click!
• Work together, produce artwork as a team
Closure Là Gì- Kiến Thức Tổng Quan Developer Nên Nắm Vững 
Published: 2020-12-02 09:40:19

Closures là một trong những yếu tố quan trọng quyết định xem bạn có được được tăng lương hay không.Vậy Closure là gì , có tính năng nổi bật gì. Xem chi tiết tại: https://blog.itnavi.com.vn/closure-la-gi/
How to update the same line in the Terminal
Tags: howto, cpp, tipsandtricks, todayilearned
Published: 2020-12-02 11:10:47

---
title: How to update the same line in the Terminal
published: true
date: 2020-12-02 09:28:58 UTC
tags: Howto,Cpp,TipsAndTricks,todayIlearned
canonical_url: https://10xlearner.com/2020/12/02/how-to-update-the-same-line-in-the-terminal/
---

Hello ! I’m Xavier Jouvenot and in this small post, we are going to see how to update the same line in the Terminal.

_Self promotion_: You can find other articles on my [website](www.10xlearner.com) 😉

## Problematic

When displaying information in the terminal with your program, you can easily end up spamming it with so much information that no human can understand what is happening. Moreover, you can also fill the history buffer, so that the useful information is lost if a user want to come back and look at what happened.

To reduce the amount of information displayed in the terminal, a solution is to update the same line over and over for similar informations. For example, to mark the progress of a download/update, you don’t have to display a new line each time a new bytes has been downloaded. You rather want to update the number of Bytes downloaded on the same line during the progression of the download, which will reduce the amount of flooding of your application.

Of course, there are also some cases where you want to display a lot of information in the terminal so that the user can look and search into all the information you can give to him. So you should be well aware about which information you want to be displayed for later reading, and which one are only displayed and useful on the moment, during the execution of the program.

## Solution

Now that we have seen why and when it is important to be able to update the same line over and over in the terminal, let’s the solution.

The solution is actually pretty short as you only need to use the character `\r` at the beginning of the string of characters that you want to display on the terminal. By doing so, you will update the last line displayed in the terminal by replacing it with the one that you specified. But be careful! If you end your last line with a new line character (`\n`), the `\r` will have no effect and a new line will be added in the terminal.

Let’s look at an example:

```
std::cout << "Progress 0%";
std::this_thread::sleep_for(std::chrono::seconds(1));

std::cout << "\rProgress 10%";
std::this_thread::sleep_for(std::chrono::milliseconds(1));

std::cout << "\rProgress 20%";
```

This code will display "Progress 0%", then, one second later, the previous line will be replaced by "Progress 10%" and finally, another second later, the line will be updated once again with the string "Progress 20%".

And just like that, we have updated the last line in our terminal 🙂

* * *

Thank you all for reading this article, And until my next article, have a splendid day 😉