teleren/devto huggingface dataset:
Day 18 of 100DaysOfCode
Tags: 100daysofcode, freecodecamp, javascript, regex
Published: 2020-09-07 20:16:56

Finished the regex challenges on FreeCodeCamp. Hopefully, that was enough of regex for a while. I just love the fact that there are so many challenges available for free on FCC!

![Regex scientist meme](https://dev-to-uploads.s3.amazonaws.com/i/6ybfaf20qqq1g7g0bzcc.png)

I also did the Eloquent JavaScript exercises for chapter 6. I like the exercises as they are a little harder than the ones at FreeCodeCamp. They really make you think what you have read and that way make the information better stick in your head. You can check my answer at the bottom of this post. 

#####Study plan
I decided to make a more robust schedule for coding. My base plan right now is:
1. Read a chapter of EJS in two days. Then do the exercises on the third day. 
2. Do at least ten challenges at FCC every day.

This is just the base plan and I'm adding some "spice" to the mix. The spice can be anything that I want to do on that particular day. 

I'll keep this at the beginning of my writings and change it as I see fit. 

I encourage everyone to make a plan. Plans help you keep your focus. 

###What I did today:

####1. Finished Regex at FreeCodeCamp
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/

![regex button meme](https://dev-to-uploads.s3.amazonaws.com/i/645k4datx5cvp6hevxt2.png)

####What I learned from it:
* Using lookahead
* What are capture groups

####2. Did the EJS CH6 exercises
https://eloquentjavascript.net/06_object.html#h_TcUD2vzyMe

####What I learned from it:
* Problem-solving
* Deeper understanding of using objects in JS
* How to make my own iteration class

####Time spent learning:
Task 'FCC'. Elapsed time: 0 h 44 min 19 s
Task 'EJS exercises'. Elapsed time: 1 h 43 min 53 s

####Time actually coding: 2 h 5 min

#### Total time: 2 h 28 min 12 s
Time spent is tracked by my [TaskTimer](https://www.arttupyykonen.com/tasktimer/) script and the [WakaTime app](https://wakatime.com/about).

### Further reading

#### [Eloquent JavaScript book](https://eloquentjavascript.net/)
My favorite coding book. 

#### [FreeCodeCamp](https://www.freecodecamp.org/learn)
Check out FCC for the best interactive exercises! I have finished the Basic JavaScript, ES6, and Regex lessons and can recommend them for a beginner! You can read more about the Basic JS and ES6 challenges at posts "Day 8" and "Day 11".

#### [Exercism coding challenges](https://exercism.io/)

###Psst
You can check my answers to the exercises of Eloquent JavaScript. You'll find them [here](https://www.arttupyykonen.com/ejs-solutions/).

See you all tomorrow!
Kompose Codeless NLP Powered Bot Builder
Tags: kompse, launch, chatbots, nlp
Published: 2020-09-07 20:11:33

After months of development, we are launching Kompose - A Codeless NLP Powered Bot Builder.

We explored many NLP libraries from spacy, NLKT, nlp.js, wink, compromise.cool, etc Here is are some details on NLP libraries for node js here: https://dev.to/devashishmamgain/nlp-libraries-for-node-js-and-javascript-1ja4

We finally settled for nlp.js, built things on top of it, adding the chat APIs layer, multi-tenant support, caching system, user interfaces, database storage, real time update processing and built a full-fledged chatbot builder.

It took us a month to launch the beta version of Kompose and another 2 months perfecting it.

Finally, we are launching the public version today on Product Hunt 

[https://www.producthunt.com/posts/kompose-by-kommunicate](https://www.producthunt.com/posts/kompose-by-kommunicate)

What are the features you would like to see for NLP based chatbots?
Continuous Delivery with Dave Farley
Tags: devops, continuousdelivery, sre
Published: 2020-09-07 20:05:33

---
series: "Small Batches"
cover_image: "https://assets.smallbatches.fm/episodes/17/devto.png"
canonical_url: "https://share.transistor.fm/s/675012fe"
date: "Mon, 07 Sep 2020 10:05:33 -1000"
tags: DevOps,ContinuousDelivery,SRE
published: true
---
The latest episode of Small Batches is out!
This is a special episode of Small Batches. I interview Dave Farley in this episode.

Dave, along with Jez Humble, is the co-author of "Continuous Delivery" published in 2010. The book introduced the ideas that grew into DevOps. So, no surprise that DevOps and continuous delivery are the same most people.

Together Dave and Jez introduced continuous delivery to the world. The practices and ideas still hold true ten years on.

Time and research have demonstrated that continuous delivery is the most effective way to develop software.  If you’ve read Accelerate then you know what I’m talking about. That’s partially why am so passionate about it and that doesn’t even account for the fun I have working in that environment.

Dave and I talked about different aspects of continuous delivery beginning with the difference between software development and software engineering. Or as Dave put’s it: scientific rationalism.

We also speak about the connection from delivery, feedback, and experimentation. Or, as he put’s it: "just doing engineering".

He also shared why he doesn’t like the term DevOps. I gotta say I tend agree with him after hearing his reasoning.

Lastly I get his view on the Preflight Checks I mentioned in an early episode of this podcast. Go to [smallbatches.fm/11](https://smallbatches.fm/11) for that episode.

Now I give you my conversation with Dave Farley.

You can find Dave at:

* The [Continuous Delivery](https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912) book
* [His YouTube channel](https://www.youtube.com/channel/UCCfqyGl3nq_V0bo64CjZh8g)
* [His blog](http://www.davefarley.net)
* [His consulting services](https://www.continuous-delivery.co.uk)
* [On Twitter](https://twitter.com/davefarley77)

Listen to Continuous Delivery with Dave Farley on [smallbatches.fm](https://share.transistor.fm/s/675012fe).
Typescript File Inheritance
Tags: typescript
Published: 2020-09-07 19:45:42

I am not sure how useful this pattern is, but it has some interesting effects, especially when sharing code between projects. So let me give you a brief description of it and you can see where to apply it.

Imagine we are writing a simple Web App with a frontend, written in Typescript, and a Node backend, also written in Typescript. This is an excellent opportunity to share some code between the 2 projects. Let's say this simple webapp has a `User` entity that is passed back and forth between the frontend and the backend, and that the backend stores the `User` in a database. The database entry might have some additional properties, like `password` which we don't want to share with the frontend.

First, we are going to create a shared representation of a `RequestUser`. This interface will be used by both the front-end and the backend and it in a top-level folder called `shared`:

`shared/user.ts`

```typescript
interface RequestUser {
    name: string;
    email: string;
}
```

Then, in the `api` folder, we want to use the `RequestUser` interface, but add to it to store more items in the Database entry:

`api/user.ts`

```typescript
import * as User from "../shared/user.ts";

interface DatabaseUser extends RequestUser {
    password: string;
}
```

This all seems fine, but what happens when we want to use both `RequestUser` and `DatabaseUser` interfaces in our API handler, keeping in mind the [`import * as ...`](https://www.jx0.uk/typescript/2020/06/27/typescript-star-as.html) patten previously described?

`api/handler.ts`

```typescript
import * as User from "../shared/user.ts";
import * as ApiUser from "./user.ts";

export function handler(body: any) {
    const rqUser: User.RequestUser = body.user as User.RequestUser;
    const dbUser: ApiUser.DatabaseUser = {
        ...rqUser,
        "password": 'P@55word'
    }
}
```

We now have 2 name spaces, `ApiUser` and `User` to represent User type models. We can compress that down to 1 namespace, using the `export * from` pattern. If we look again at our API-specific model file, we can tell it to export everything from the shared model, essentially inheriting all the exported members from that file:

`api/user.ts`

```typescript
import * as User from "../shared/user.ts";
export * from "../shared/user.ts";
...
```

And then in our handler again, we can clear up some of the references:

`api/handler.ts`

```typescript
import * as User from "./user.ts";

export function handler(body: any) {
    const rqUser: User.RequestUser = body.user as User.RequestUser;
    const dbUser: User.DatabaseUser = {
        ...rqUser,
        "password": 'P@55word'
    }
}
```

We have one less import, and we can see that the `RequestUser` and `DatabaseUser` are very closely related as they both come from the same namespace. It is slightly cleaner code, and lets newcomers to our code read and scan it with ease.
Refactoring to improve performance
Tags: dotnet, tips, welcome
Published: 2020-09-07 18:26:51

---
title: Refactoring to improve performance
published: true
description: 
tags: dotnet ,tips,welcome
//cover_image: https://direct_url_to_image.jpg
---
We, as developers, get lost in getting a feature complete within a time-frame and negate performance most of the time. Currently, I am working on an application where I was requested to improve performance. A page was taking around 14-15s to get loaded. I brought it down to 4-5s although it is still a lot to wait. Here are some things that impacted performance of application and how I sorted it out

**1. Lazy-loading everywhere** 
We used **Entity Framework** as **ORM**. In order to process data, we had couple of **foreach statements** and **nested loops** . Inside loop, properties of referenced entities and collections were manipulated . Loading such datas eagerly reduced around 100 queries.

**2. Automapper used everywhere**
Automapper was used extensively in our application. Suppose we had an **Address** Entity and it had reference to **State** entity which further had reference to **Province** entity , we mapped Address entity to **AddressViewModel** using automapper. Even when I needed detail of Address entity in AddressViewModel, it would map all details of references in AddressViewModel. One way to get rid of it was to configure Automapper in a way to exclude mapping references of entity but that would cause our application to break since it was used elsewhere. Mapping only required references helped to improve performance.

**3. Selecting every fields from Database**
Even if only some fields in a  table were needed, every fields were retrieved from database. Some of the columns stored large amount  of datas which resulted in weak performance. Selecting only the required fields improved performance by some margin.

**4. Less Use of TryParse**
In order to parse **Enum** from string or int , code used to wrapped inside **Try/Catch block** . If exception was caught, do something. Exceptions are meant to be unintentional but we depend on exceptions to perform an action. Changing those statements to use TryParse improved readability and performance slightly.

**5. Unaware of SelectMany querying pattern**
Whenever we needed a reference inside collections , we did SelectMany . Our common misconception was SelectMany does a single query to database and retrieved data. Using a profiler showed more number of queries than expected. Suppose , we had 5 items in collection and we used SelectMany to get references inside a collection, it did 5 queries where only 1 was expected. At the end, our solution was to issue a single query to required reference table.

That's all for now.
Happy Coding !!
Nudity detection with JavaScript and HTMLCanvas
Tags: javascript, webdev, beginners, html
Published: 2020-09-07 19:30:44

Guess, you get a javascript solution to avoid showing  an image uploaded by user that contains nudity.

Here is a wonderful solution:
Nude.js

You can directly jump to its repo:

{% github pa7/nude.js %}
######***IMP REQUEST:***

###### You are most welcome to join my team 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3qhbvg5fsrh3nt7anh36.png)

[ Click here for joining my team ]
(https://forms.gle/pSCALuEWHus3pg9F6).

###### *Also you are most welcome to join OPEN SOURCE INTELLIGENT SYSTEM (OSINT) if you can help in open source project regarding safeguarding humans from various diseases like CORONA outbreak*
######https://github.com/Manishfoodtechs/OSINTHRH/wiki

Contact email: Manishfoodtechs@gmail.com. 

If you have any problem, our team is also engaged in professional consultancy and delivery.

![](https://media2.giphy.com/media/oNrPzIy3OhHm7zrvA3/source.gif)

Imagecredit: Pixabay, manishfoodtechs,giphy renaissance
Is Django a Full Stack Framework?
Tags: django, python, beginners
Published: 2020-09-07 19:28:39

The title of this post, "Is Django a Full Stack Framework?" is a question I receive often from new web developers. It's a very valid question so I wanted to address it here rather than keep repeating myself in individual emails.

Websites can be broken up into two major components: the "back-end" and the "front-end". The back-end is where the underlying database and any related logic lives, while the front-end is the HTML, CSS, and JavaScript that controls how this data looks on a webpage.

For example in a blog website, the back-end would the database containing individual blog posts and perhaps user comments too. The front-end would be the HTML, CSS, and perhaps JavaScript that displays the content.

Django was first released back in 2005 when front-ends were relatively straightforward. There were no dedicated JavaScript front-end frameworks like React, Angular, Vue, Ember, and the rest.

As a result Django comes with an intentionally basic [Templating Language](https://docs.djangoproject.com/en/dev/ref/templates/api/) that can perform basic logic such as loops and filters. And to its credit, Django has resisted the temptation to add complexity here; the Django Templating Language still remains very bare-boned in functionality.

Most Django developers therefore fall into the back-end camp of the full-stack spectrum. They control the database and logic of a site and often, in companies, rely on a separate front-end developer to customize the presentation in a Django template.

These days an equally common set-up is to use [Django Rest Framework](https://www.django-rest-framework.org/) to transform a Django website into an internal API that can then be consumed by a dedicated JavaScript front-end framework.

The end result for a viewer is still one website, but under-the-hood a Django back-end is sending HTTP requests and responses to a separate JavaScript front-end. With this approach a large site like Instagram, which uses Django, can support multiple front-ends (web, iOS, Android) from a single back-end. This is also known as "API first" development and is increasingly popular.

In practice almost no developer is truly "full-stack" these days; there's simply too much to know with Python, JavaScript, and related frameworks. Can developers use both well? Yes. But they will always be somewhere on the spectrum such as 70/30 back-end vs front-end or the inverse.

So is Django a full-stack framework? Yes I would argue. You can build a powerful website with just traditional Django but generally speaking if someone says "full-stack" they are talking about an internal API that interacts with a separate, often complex, front-end powered by a JavaScript framework.
Installing Django 2 on Ubuntu 20.04LTS
Tags: python, django, webdev
Published: 2020-09-07 19:19:32

# Installing Django 2 on Ubuntu 20.04LTS

I will teach you how to install Django on Ubuntu 20.04LTS using the pip method. There are other methods such as using the APT packages in Ubuntu. I will not be utilizing that method because it isn't that flexible like pip. 

These are the steps we are going to follow in this series:
- Check our version of Python 3
  - Explain how to make Python 3 default over 2.7
- Installing pip and virtual environment (venv)
  - Explaining how to activate / deactivate the virtual   environment
- Installing Django inside the venv
  - Verifying Django version
- Creating a Sample Project utilizing Django-Admin
  - Avoiding nesting problems by using . and what it means
  - Migrating the Database and creating a Superuser
- Modifying the Settings.py ALLOWED_HOSTS
  - Testing your project after modifying
- Accessing the Admin side of the Sample Project
Rewriting git commit History is fun
Tags: showdev, watercooler, github, git
Published: 2020-09-07 19:15:28

Howdy folks? I hope you all are staying safe.

So, I was looking at the [git commit documentation](https://git-scm.com/docs/git-commit) and found a very interesting parameter for specifying the date while performing a commit.

Basic Syntax is:
```git
git commit --date=<date>
```

I also saw two related environment variables - `GIT_AUTHOR_DATE` & `GIT_COMMITTER_DATE`.

Then, the moment came when this idea struck my mind of rewriting commit history. But as usual, after digging deep I came to know that the idea has already been executed. (Why it happens all the time?? Is there anything left for me to do? :D)

My previous year's github contribution history which was pretty white looked like:
<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/i/6d8xmv16q5rc4gyyvt2z.PNG" alt="pagalprogrammer's github contribution history for the year 2018 - before">
  <figcaption>Fig.1 - My GitHub Contribution History of 2018 (Original)</figcaption>
</figure>


And with the help of a automation script, I rewrote it to:
<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/i/xm4naqwmcwk43t6p0aw5.PNG" alt="pagalprogrammer's github contribution history for the year 2018 - after">
  <figcaption>Fig.2 - My GitHub Contribution History of 2018 (Rewritten)</figcaption>
</figure>


After this, I explored more and found [gitfiti](https://github.com/gelstudios/gitfiti). Take a look at it if you wanna know more about it. It helped me rewrite my contribution history in a graffiti style.

The final result:
<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/i/0qrnw0gbnecqt3ehpvqe.PNG" alt="pagalprogrammer's github contribution history for the year 2016 - after">
  <figcaption>Fig.3 - My GitHub Contribution History of 2016</figcaption>
</figure>

Take a peek at [my GitHub History](https://github.com/pagalprogrammer?tab=overview&from=2016-12-01&to=2016-12-31).

I also wrote about this in my first rant on [devRant](https://devrant.com/). Go ++ it out: https://devrant.com/rants/2979790/rewrote-my-git-commit-history-now-it-looks-real-d
YouTube Video | YDKJS — Objects and Prototypes - 1
Tags: youtube, webdev, showdev, javascript
Published: 2020-09-07 19:13:02

Welcome to the YDKJS series. Every Javascript developer knows one thing that they don’t know enough Javascript. On the top level, it’s only var, for , if else just like any other Programming language, but if you want to dive deep and know how JS work. There is no better place then the legendary book series [You don’t know JS](https://maximdenisov.gitbooks.io/you-don-t-know-js/content/) by **Kyle Simpson**

This is the sixth part of the series

{% youtube Jh-yTjy4csQ %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | YDKJS — Scopes and Closures — 5
Tags: javascript, youtube, webdev, beginners
Published: 2020-09-07 19:08:07

Welcome to the YDKJS series. Every Javascript developer knows one thing that they don’t know enough Javascript. On the top level, it’s only var, for , if else just like any other Programming language, but if you want to dive deep and know how JS work. There is no better place then the legendary book series [You don’t know JS](https://maximdenisov.gitbooks.io/you-don-t-know-js/content/) by **Kyle Simpson**

This is the fifth part of the series

{% youtube Y9BK8tWq9O4 %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | YDKJS — Scopes and Closures — 4
Tags: javascript, youtube, webdev, beginners
Published: 2020-09-07 19:06:16

Welcome to the YDKJS series. Every Javascript developer knows one thing that they don’t know enough Javascript. On the top level, it’s only var, for , if else just like any other Programming language, but if you want to dive deep and know how JS work. There is no better place then the legendary book series [You don’t know JS](https://maximdenisov.gitbooks.io/you-don-t-know-js/content/) by **Kyle Simpson**

This is the fourth part of the series

{% youtube aYWFhTPjo9I %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | YDKJS — Scopes and Closures — 3
Tags: javascript, beginners, youtube, webdev
Published: 2020-09-07 19:03:42

Welcome to the YDKJS series. Every Javascript developer knows one thing that they don’t know enough Javascript. On the top level, it’s only var, for , if else just like any other Programming language, but if you want to dive deep and know how JS work. There is no better place then the legendary book series [You don’t know JS](https://maximdenisov.gitbooks.io/you-don-t-know-js/content/) by **Kyle Simpson**

This is the third part of the series

{% youtube W9OFJoj6pJU %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
Is It Worth To Buy Kinsta WordPress Hosting?
Tags: webhosting, kinsta
Published: 2020-09-08 05:27:32

---
title: Is It Worth To Buy Kinsta WordPress Hosting?
published: true
date: 2020-09-07 18:53:36 UTC
tags: Webhosting,kinsta,webhosting
canonical_url: https://codesquery.com/kinsta-wordpres-hosting/
---

Kinsta is one of the leading premium WordPress hosting provider in the world. It is founded in 2013 by Mark Gavalda. They offer cloud-based WordPress hosting solutions based on Google Cloud Platform with 23 data centres around the world. In this article, We will know is it Worth to buy Kinsta WordPress hosting for your [...]

The post [Is It Worth To Buy Kinsta WordPress Hosting?](https://codesquery.com/kinsta-wordpres-hosting/) appeared first on [CodesQuery](https://codesquery.com).