teleren/devto huggingface dataset:
I killed software development, sorry :/
Tags: webdev, beginners, news
Published: 2022-06-15 11:23:26

Sorry for the clickbait in the header. You see it wasn't only me, there were 5 of us committing this crime. And we're not particularly sorry either. However, the rest of the header is more or less accurate :)

For 6 months me and my team have planned out a cold blooded murder, and today we did it! Today we murdered software development as a profession. So if you're one of the 45 million software developers in the world, you can go home now. Maybe teach yourself to play the violin, or start growing potatoes or something ...?

Don't believe me? Then head over [to our website](https://aista.com?secret=devto) and create your software in seconds by simply clicking a button. No download required, we'll host everything for you. The process of creating your own unique backend is done in 1 or 2 seconds :)

* [Your own personal Cloud HUB](https://hub.aista.com)

The way it works is that we read meta data from your database, then we use this meta data as a formal specification, to create a CRUD web API wrapping your database with all CRUD operations in a couple of seconds. In addition the thing is super flexible and allows you to configure stuff such as for instance ...

* Which tables to create HTTP endpoints for
* reCAPTCHA support for endpoints
* Authorisation and authentication for your endpoints
* URLs to use for your endpoints
* Publish web socket messages when endpoints are invoked
* Log endpoint invocations
* Etc, etc, etc

For a typical database with 15 to 20 tables, the system produces roughly 3,000 lines of code in 1 or 2 seconds. Basically _eliminating_ the need for backend software development. In addition, the thing also creates a complete Angular frontend for you. You can test out [the frontend parts here](https://sakila.aista.com/). However, I suspect the true strength of the system is really in its backend generator.

If you don't have a database you can connect to, no problem, just head over to the plugins in your dashboard and install a database in a minute or two, for then to generate a CRUD API wrapping your newly installed database. To understand the process better you might want to watch the following video.

{% embed https://www.youtube.com/watch?v=h4s0bwEC_a4 %}

So we confess, we've just murdered an entire profession, or at least some 20 to 50 percent of the profession - However, we're not done yet, so I suspect we'll reach 98% within a year or two ^_^

Thank you for reading ... ^_^

Psst, I've heard McDonalds are looking for burger flippers ...?
JavaSript Shorthands
Tags: webdev, javascript, beginners, programming
Published: 2022-06-15 11:20:29

**JavaScript** is one of the most widely used and fastest growing language for Web Development. It is necessary for us, the developers to use the best coding practices to save our time along with the processing resources. Here are **SOME** of the shorthand, developers can use to save their time.

For any questions and queries, ping me on [LinkedIn](https://www.linkedin.com/in/mursalfurqan/).

## 1. Ternary Operator
**Instead of**
```javascript
if (number > 5) {
     result = 'Yes'
} else {
     result = 'No'
}
```
**Use**
```javascript
const result = number > 5 ? 'Yes' : 'No'
```
---
## 2. Falsy Shorthand
Instead of
```javascript
if (value !== null || value !== undefined || value !== ''){
     new_value = value
}
```
Use
```javascript
new_value = value || 'Hello'
```
---
## 3. Variable Declaration
Instead of
```javascript
let x
let y
let z = 5
```
Use
```javascript
let x, y, z=5
```
---
## 4. For Loop Shorthand
Instead of
```javascript
const names = ['Mursal', 'Furqan', 'Ali', 'Imran']

for (let i = 0; i < names.length; i++){
     console.log(names[i])
}
```
Use
```javascript
const names = ['Mursal', 'Furqan', 'Ali', 'Imran']

for (let name of names){
     console.log(name)
}
```
---
## 5. Object Property
Instead of
```javascript
let x=1, y=2
let object = {x:x, y:y}
```
Use
```javascript
let x=1, y=2
let object = {x, y}
// You can omit the member name
// If it's same as the variable name
```
---
## 6. Default Parameter
Instead of
```javascript
function volume(a, b, c){
     if (a === undefined){
          a = 0
     }
     if (b === undefined){
          b = 0
     }
     if (c === undefined){
          c = 0
     }
     return a*b*c
}
```
Use
```javascript
let volume = (a=0, b=0, c=0) => (a*b*c)
```
---
## 7. Double Bitwise Not
Instead of
```javascript
Math.floor(4.9) // => 4
```
Use
```javascript
~~4.9 // => 4
```
---
## 8. Short-Circuit
Instead of
```javascript
let dbHost
if (process.env.DB_HOST){
     dbHost = process.env.DB_HOST
} else {
     dbHost = 'localhost'
}
```
Use
```javascript
let dbHost = process.env.DB_HOST || 'localhost'
```
How to write redux middleware - sample code snippet
Tags: redux, react, javascript, webdev
Published: 2022-06-15 11:15:46

Here is a sample snippet where you can add your logic to the redux middleware (this snippet will just console all your actions)

`const logMiddleWare = store => next => action => {
    // Replace your logic below
        console.log(action.type, action);
    next(action);
}`

Here is how it should be included in your store

`const Store = createStore(rootReducer, applyMiddleware(thunk, logMiddleWare));
`
How to Display a Web Application with Basic Authentication in WKWebView using SwiftUI (iOS)
Tags: swift, ios, wkwebview, swiftui
Published: 2022-06-15 11:07:21

This article shows how to display a web application with basic authentication in WKWebView using SwiftUI.

## Source Code
This source code was made with reference to ["WKWebView with Basic auth"](https://stackoverflow.com/questions/60508114/wkwebview-with-basic-auth) and ["Using WebKit Delegates"](https://developer.apple.com/forums/thread/126986).

**ContentView.swift**
```swift
import SwiftUI

struct ContentView: View {
    var body: some View {
        WebViewTest()
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
```

**WebViewTest.swift**
```swift
import SwiftUI
import WebKit

struct WebViewTest: UIViewRepresentable {
    func updateUIView(_ uiView: WKWebView, context: Context) {
        //
    }
    
    func makeCoordinator() -> Coordinator {
        Coordinator(self)
    }
    
    var url: String = "https://hogehoge.hoge"
    
    func makeUIView(context: Context) -> WKWebView {
        let view = WKWebView()
        view.navigationDelegate = context.coordinator
        view.load(URLRequest(url:URL(string: url)!))
        return view
    }
    
    class Coordinator: NSObject, WKNavigationDelegate {
            let parent: WebViewTest

            init(_ parent: WebViewTest) {
                self.parent = parent
            }

        func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge,
                         completionHandler: @escaping(URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
                let credential = URLCredential(user: "The user name to Basic Auth.",
                                               password: "The password to Basic Auth.",
                                               persistence: .forSession)
                completionHandler(.useCredential, credential)
            }
        }
}

struct WebViewTest_Previews: PreviewProvider {
    static var previews: some View {
        WebViewTest()
    }
}
```

## The Result
I cannot show you the contents of the web application. But I guess that you can check that all contents (text and images) are loaded.

![WKWebView](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1dcqq3h8y32x37cp5apo.png)

---
This original article is the following that is written by me. This is a translation of a portion of this original article from Japanese to English.

{% embed https://zenn.dev/akira_kashihara/articles/25f4a0437806bf %}
Calculate Amount Paid in Taxes
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 11:00:42

You are given a **0-indexed** 2D integer array `brackets` where `brackets[i] = [upperi, percenti]` means that the `ith` tax bracket has an upper bound of `upperi` and is taxed at a rate of `percenti`. The brackets are **sorted** by upper bound (i.e. `upperi-1 < upperi` for `0 < i < brackets.length`).

Tax is calculated as follows:

*   The first `upper0` dollars earned are taxed at a rate of `percent0`.
*   The next `upper1 - upper0` dollars earned are taxed at a rate of `percent1`.
*   The next `upper2 - upper1` dollars earned are taxed at a rate of `percent2`.
*   And so on.

You are given an integer `income` representing the amount of money you earned. Return _the amount of money that you have to pay in taxes._ Answers within `10-5` of the actual answer will be accepted.

**Example 1:**

**Input:** brackets = \[\[3,50\],\[7,10\],\[12,25\]\], income = 10
**Output:** 2.65000
**Explanation:**
The first 3 dollars you earn are taxed at 50%. You have to pay $3 \* 50% = $1.50 dollars in taxes.
The next 7 - 3 = 4 dollars you earn are taxed at 10%. You have to pay $4 \* 10% = $0.40 dollars in taxes.
The final 10 - 7 = 3 dollars you earn are taxed at 25%. You have to pay $3 \* 25% = $0.75 dollars in taxes.
You have to pay a total of $1.50 + $0.40 + $0.75 = $2.65 dollars in taxes.

**Example 2:**

**Input:** brackets = \[\[1,0\],\[4,25\],\[5,50\]\], income = 2
**Output:** 0.25000
**Explanation:**
The first dollar you earn is taxed at 0%. You have to pay $1 \* 0% = $0 dollars in taxes.
The second dollar you earn is taxed at 25%. You have to pay $1 \* 25% = $0.25 dollars in taxes.
You have to pay a total of $0 + $0.25 = $0.25 dollars in taxes.

**Example 3:**

**Input:** brackets = \[\[2,50\]\], income = 0
**Output:** 0.00000
**Explanation:**
You have no income to tax, so you have to pay a total of $0 dollars in taxes.

**Constraints:**

*   `1 <= brackets.length <= 100`
*   `1 <= upperi <= 1000`
*   `0 <= percenti <= 100`
*   `0 <= income <= 1000`
*   `upperi` is sorted in ascending order.
*   All the values of `upperi` are **unique**.
*   The upper bound of the last tax bracket is greater than or equal to `income`.

**SOLUTION:**

    class Solution:
        def calculateTax(self, brackets: List[List[int]], income: int) -> float:
            rem = income
            tax = 0
            prev = 0
            for b, p in brackets:
                if income >= b:
                    tax += (b - prev) * p
                    rem -= (b - prev)
                    prev = b
                elif rem > 0:
                    tax += rem * p
                    rem = 0
                    break
            return tax / 100
Fluid Player - Custom HTML5 Video Player Integration 🚀
Tags: javascript, tutorial, css, opensource
Published: 2022-06-15 10:58:21

{% youtube https://youtu.be/i0OU3r-txTE %}

Website :- https://www.fluidplayer.com/

---

HTML5 Video Players :- https://dev.to/sh20raj/top-html5-custom-video-players-with-documentation-video-5142

{% post https://dev.to/sh20raj/top-html5-custom-video-players-with-documentation-video-5142 %}

---

vLitejs Integration :- https://dev.to/sh20raj/vlitejs-integration-fast-and-lightweight-javascript-library-to-customize-media-player-542g

{% post https://dev.to/sh20raj/vlitejs-integration-fast-and-lightweight-javascript-library-to-customize-media-player-542g %}
A revolution in resizing images online !
Tags: productivity, javascript
Published: 2022-06-15 10:51:50

I am pretty sure that you might have to resize images. Then you have two options the first is to open Photoshop and do the brainstorming stuff. But nowadays, people are smart they use online image resizer to resize images within the browser. By using these resizer you can resize your image easily without leaving your browser.

But as you know whenever there is some pros there exists  some cons. This rule also applies in this case. You might have not noticed but while you select your image for resizing these image get uploaded to the website's server to process it further. Though these website have strict policy that they will delete the images within 1 hour. But you are uploading, you are taking risk on your images & privacy.

Therefore, I came up with a solution for this. 

Introducing [Online Pic Resizer](https://onlinepicresizer.com) a revolutionary website that can resize your images within your browser. Means you don't have to upload or share your images with anyone, this website resizes the image within your computer. 

This website using [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) of JavaScript to draw the image on a canvas object and resizing the canvas will ultimately resizes your image. Your image will not shared to anywhere all the magic happens in your browser.

That's not the only feature of this website. This website have a pointing system. That means if your sign up on this website and start earning points by resizing images as well as sharing the website. And if you are in top 5 resizer who collect most points. Then you name as well as profile photo will displayed in the leader board that is located in profile page. This leader board is shown to everybody that are registered on the website.

And one more thing they have mentioned that when their website have reached to large audience then they would arrange event that will reward you will surprising gifts and goodies.

That's it !!!!
Reyan :)
Subtract the Product and Sum of Digits of an Integer
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 10:30:37

Given an integer number `n`, return the difference between the product of its digits and the sum of its digits.

**Example 1:**

**Input:** n = 234
**Output:** 15 
**Explanation:** 
Product of digits = 2 \* 3 \* 4 = 24 
Sum of digits = 2 + 3 + 4 = 9 
Result = 24 - 9 = 15

**Example 2:**

**Input:** n = 4421
**Output:** 21
**Explanation:** 
Product of digits = 4 \* 4 \* 2 \* 1 = 32 
Sum of digits = 4 + 4 + 2 + 1 = 11 
Result = 32 - 11 = 21

**Constraints:**

*   `1 <= n <= 10^5`

**SOLUTION:**

    class Solution:
        def subtractProductAndSum(self, n: int) -> int:
            p = 1
            s = 0
            while n > 0:
                d = n % 10
                p *= d
                s += d
                n = n // 10
            return p - s
Outreachy: Everyone Struggles
Tags: outreachy, opensource, ux, uiux
Published: 2022-06-15 10:24:00

Welcome to blog 2!

### A vocabulary term I didn't know before I applied to Outreachy
Even though I've been into open source for more than a year before applying to Outreachy, I just somehow didn't know what FOSS stood for (I know it's kind of funny and embarrassing). It stands for _**'Free and open-source software (FOSS)'**_ and the meaning is pretty self-explanatory I believe 😋

I just saw this term everywhere and was a little confused for several weeks, before I just googled it!
Sometimes, knowing or learning something new is that simple: googling, or asking a friend or mentor 💁‍♀️

I also did not know that I could contribute to **_Open-source as a designer_**. When I eventually got to know that Outreachy (as well as GSOC) has some **UI/UX** related projects, I was very happy and all pumped up to contribute 💪

---
> So, another learning here is that Open-source is not just for developers/coders, you can contribute to Open-source as a **_designer, writer, community manager_** and much more 😎

---

In a recent meeting, our mentors discussed how important **_good commit_** messages can be. It's like a very important log of all the changes made, along with the reason and thinking behind those changes. So writing good and detailed commit messages is very important.

For the past 2 weeks, I've been trying to gather some feedback through a google form, which is a painfully slow process as it gets very difficult to get a form filled by people who use the app. 
Nevertheless, giving up is not an option; we shall see how this goes in the future!
Deep Insights into Low-code Development Tools
Tags: lowcode, opensource, github, programming
Published: 2022-06-15 10:13:55

In this chapter, we will share with you some of the top low-code development tools repos (LCDT repos) on GitHub in 2021 measured by different metrics including the number of stars, PRs, contributors, countries, regions and so on.

Note:

1. You can move your cursor onto any of the repository bars/lines on the chart and get the exact number.
2. The SQL commands above each chart are what we use on our TiDB Cloud to get the analytical results. Try those SQL commands by yourselves on TiDB Cloud with this 10-minute tutorial.

## Star history of top LCDT repos since 2011
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qt3zasptyu7hcmse4sex.png)

## Top 10 most starred LCDT repos in 2021 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4g55x13jpdiht0cjo8c.png)

## Top 10 LCDT repos with the most PRs in 2021
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4osvytytn74ttgat5mb.png)

## Top 10 LCDT repos with the highest YoY growth rate in 2021 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nevfp0hbpxy5lh8ocasc.png)

## Top 10 LCDT repos with the lowest YoY growth rate in 2021 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/772dwujswjld00wxd0r2.png)

## Top 7 most used programming languages in LCDT repos in 2021 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nks39m2jx8t1ip5bkll3.png)

## Top 20 countries/regions contributing the most to LCDT repos in 2021
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hc8idksfegoiamz2a4vs.png)
 

## The rankings of LCDT repos measured by Z-score in 2021
The analytical results displayed above are generated based on just one single metric of these three: stars, PRs, or contributors. Now, we will use the Z-score method to rank the LCDT repos on GitHub.

This is the comprehensive ranking calculated by z-score:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bq33fqzuysddh1fjqsl8.png)

https://ossinsight.io/blog/deep-insight-into-lowcode-development-tools-2021
WTF is WEB 5.0 ☣️
Tags: web3, dapps, solidity
Published: 2022-06-15 07:45:08


Web 5 announced by Block is the middle ground between web 2.0 and web 3.0 i.e.

✅ WEB 2.0 + WEB 3.0 = WEB 5.0

💵 Web 5 has made bitcoin their central currency but unlike web 3,

Web 5 is not built on the blockchain so Bitcoin will only act as a currency to purchase in app assets like subscriptions, mods and stuff like that.

👨‍💻 Web 5 is open source and is aiming to build a decentralized network layer using Bitcoin's layer 2 payment protocol called lighting.

Web 5 is divided in to 3 main components:

1. Wallet 👛
2. Node 🌐
3. DWAS 📱

Wallets and nodes are almost similar to web 3

but the add on's for wallets is what intrigue me,

so apart storing assets and identifying a user the wallet will also have the ability to store user settings and meta data,

E.g. you are some one who loves dark mode so rather than going to each app and turning on dark mode, All you will have to do is enable dark mode on your wallet and that setting will be carried forward to all your apps (A global state management system of sorts).

And as a web 5 developers you wont develop DAPP or PWA you will develop something called DWAS that's decentralized web apps

where the app will be hosted on a node in the network rather than on a central server,

You may ask how is this any different from web 3 it's simple in web 3 all the data is decentralized but

In web 5 the organization can store data related to their platform on their own servers but as a users will be able to abstract your personal information and preferences.
Smarty date and time formatting
Published: 2022-06-15 10:07:30

Some examples of date formatting:

{$smarty.now|date_format}
Jun 15, 2022

__ with example date (eg. mysql returned format) __

{$myDate = "2022.06.15 11:01:54"}

{$myDate|date_format}
Jun 15, 2022

{$myDate|date_format:"%D"}
06/15/22

{$myDate|date_format:$config.date}
Jun 15, 2022

{$myDate|date_format:"%A, %B %e, %Y"}
Wednesday, June 15, 2022

{$myDate|date_format:$config.time}
Jun 15, 2022
As a Fresher: Internship or Job?
Tags: beginners, webdev, discuss, programming
Published: 2022-06-15 10:02:21

Catch me on : [GitHub](https://github.com/deepakydv9315) || [Codepen](https://codepen.io/deepakydv9315) || [Instagram](https://www.instagram.com/syco_coders/)

As an Fresher it is most confusing decision choosing between job and internship, so let dev.to community  decide together.

my vote is for Internship, as a beginner we are unaware of Realtime industry environment and working too. Also internships are like training, your senior developers will guide you and definitely you gonna learn many quality bosting things. So i am up for internship
Shape the future of the Developer Ecosystem, get insights and win amazing prizes!
Tags: developernation, datainsights, survey
Published: 2022-06-15 10:01:19

---
title: Shape the future of the Developer Ecosystem, get insights and win amazing prizes!
published: true
description: Although Java has been around for more than two decades now, it keeps experiencing strong and steady growth. Nearly 5M developers have joined the Java community since the beginning of 2021.
tags: #developernation #datainsights #survey
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Although Java has been around for more than two decades now, it keeps experiencing strong and steady growth. Nearly 5M developers have joined the Java community since the beginning of 2021. Our data suggest that Java’s growth is fueled not only by the usual suspects, i.e. backend and mobile development, but also by its rising adoption in AR/VR projects.
Source: [State of the Developer Nation 22nd Edition](https://www.developernation.net/resources/reports/state-of-the-developer-nation-q1-2022)

![Developer Nation Survey](https://i.ibb.co/2dpMpWv/devto2.png)

Which languages do you prefer coding in and what are your pain points?
Are you working professionally in one area but building games on the side?
Where do you learn to code?

These are some of the questions the Global Developer Survey will ask in order to make sure Developers are heard. Your input is of essence and could shape the future of the Developer Ecosystem.

[The new edition has started](https://survey.developernation.net/name/dn23?utm_medium=some&utm_source=dev_to&utm_campaign=announcement_insights_devto) and you are officially invited!

Take part in the most complete survey Developer Nation has ever created, shape the key trends among developers for 2023 and enter amazing prize draws. 
That's on top of the other perks you could score:

**$1000** towards the desktop set up of your choice
**iPhone 13**
**Samsung Galaxy S22**
**Nintendo Switch**
**$100 Amazon** gift cards
Hardware
CertNexus Certified AI Practitioner (CAIP) certifications
Monthly subscriptions & licences
and many more...

Developer Nation likes to support the global developer community, but also to give back. So while taking the survey, you will find a question asking you to pick a **charity** you'd like to support this time.

Hope you enjoy the survey,
**[Start Here](https://survey.developernation.net/name/dn23?utm_medium=some&utm_source=dev_to&utm_campaign=announcement_insights_devto)**