teleren/devto huggingface dataset:
Software Development
Tags: javascript, programming, systems
Published: 2022-04-20 02:01:38

Software applications of generating and maintaining applications, frameworks, and other software components through thinking, specifying, designing, documenting, programming, testing, and problem resolving.
Developers have created computer programs by conceiving, designing, and applying them. Some create new mobile or desktop programs, while others create the operating systems that run them.

Software developers, in any case, discover user needs, create programs, test new software, and modify. Software developers work closely with computer programmers in the computer systems, manufacturing, finance, and software publishing industries.
How to search a value on a JSON array column with MySQL?
Tags: mysql
Published: 2022-04-20 01:21:19

Let's suppose you need to find how many cars in your car shop had a rebuilt engine, and this column is a JSON with an array of diagnosed failures

How can you do this query? 
![a man scratching his head](https://media4.giphy.com/media/l3vRioHcAYTTZbXQA/giphy.gif?cid=ecf05e47p96asnawvtxn5fi0thqt935k0bbogqwj2bsxnmg7&rid=giphy.gif&ct=g)
```sql
SELECT COUNT(DISTINCT(CARS)) from CARS
where CARS.DIAGNOSES->>"$.diagnoses[*].failure.name" LIKE '%rebuilded engine%'
```
the  `->>`  operator in addition unquotes the extracted result. In other words, given a  [`JSON`](https://dev.mysql.com/doc/refman/8.0/en/json.html "11.5 The JSON Data Type")  column value  _`column`_  and a path expression  _`path`_  (a string literal)
The `->>` operator can be used wherever `JSON_UNQUOTE(JSON_EXTRACT())` would be allowed. This includes (but is not limited to) `SELECT` lists, `WHERE` and `HAVING` clauses, and `ORDER BY` and `GROUP BY` clauses.

the `$.` indicates how you can access a json and `[*]` can search in any position of an array.

![a man celebrating](https://media0.giphy.com/media/rmi45iyhIPuRG/giphy.gif?cid=ecf05e47u9okxqzxukefcm0ceasuuruo7wkiydc4erui0q1t&rid=giphy.gif&ct=g)
How does glob work in Python?
Tags: python, programming, tutorial, beginners
Published: 2022-04-20 00:20:09

Python is famous for huge list of ready made modules. These ready made modules can make our lives much easier if we make use of them.

Recently I have started exploring different Python modules. In this Short tutorial I will introduce you to the glob module. 

If you do not what a module is Please read this. 

## What the hack is glob module in Python?

In general Programming the term 'glob' means 'global'. You can read the full history on the [Wikipedia](https://en.wikipedia.org/wiki/Glob_(programming)). 

To make things simple, glob is a way of searching for files matches to a specific pattern. 

Wait, but you have regular expression that do the job? Yes, you have regular expression but glob modules makes things way more easier than regular expression if you are dealing with files.

## Install [glob module in Python](https://www.alixaprodev.com/2021/08/how-to-use-python-glob-module.html)?

Lets, get our hands dirty on glob module by first installing it. It is a python built in module, I know that. 

But to be on the safe side you can use the following command on your terminal to install glob module.

`pip install glob2`

Make sure you have python installed and you have pip set up.

## Example of using glob module

The best way to learn something is to learn it by example.

In this example we will use **python glob module to find mp4 files available in all sub directories** along with the root.

Check the following code.

```
import glob
path = './'
curfiles = glob.glob(path + '**/*.mp4',recursive=True)
for file in curfiles:
    print(file)
```

The same result can be achieved using regular expression. 


```
import re
import os
currentdir = os.getcwd()
files = os.listdir(currentdir)
pattern = "^*.mp4$"
prog = re.compile(pattern)
htmlfiles=[]
for file in files:
    result = prog.findall(file)
    if len(result)!=0:
        htmlfiles.append(result[0])

for htmlfile in htmlfiles:
    print(htmlfile)
```

## Words From My Heart

I am so thankful to you for reading this piece of article. I will be more than happy and pleased if you leave a like, comment on it.

PS: Please check out [my YouTube channel](https://www.youtube.com/codewithaliyt) if you love coding videos. [[Code With Ali](https://www.youtube.com/codewithaliyt)]
AWS Well-Architected Framework - Operational Excellence Pillar
Published: 2022-04-20 00:11:32

## What is the Operational Excellence pillar?

The Operational Excellence pillar focuses on how your organization supports your business objectives. It includes your ability to run workloads effectively, gain insight into their operations, and continuously improve supporting processes and procedures to deliver business value.

## Why is Operational Excellence important to improving my architecture?

Operational Excellence helps you define success for your workloads, identify risks inherent in their operation, and make informed decisions. It enables your teams' understanding of their roles in that success and helps you determine if they have what they need to succeed. Its best practices support measuring success through the achievement of business outcomes, understanding workload and operations health, responding when outcomes are at risk, and continuing improvement.

---

## What are the design principles of Operational Excellence?

There are five design principles for Operational Excellence in the cloud:

### Perform operations as code

In the cloud, you can apply the same engineering discipline that you use for application code to your entire environment. You can define your entire workload (applications, infrastructure) as code, and update it with code. You can implement your operations procedures as code, and automate their operation by starting them in response to events. By performing operations as code, you limit humane error and enable consistent responses to events.

### Make frequent, small, reversible changes

Design workloads to allow components to be updated regularly to increase the flow of beneficial changes into your workload. Make changes in small increments that can be reversed if they fail to aid in identifying and resolving issues introduced into your environment (without affecting customers when possible).

### Refine operations procedures frequently

As you use operations procedures, look for opportunities to improve them. AS you evolve your workload, evolve your procedures appropiately. Set up regular Game Days to review and validate that all procedures are effective and that teams are familiar with them.

### Anticipate failure

Perform "pre-mortem" exercises to identify potential sources of failure so that they can be removed or mitigated. Test your failure scenarios, and validate your understanding of their impact. Test your response procedures to ensure that they are effective and that teams are familiar with their activities. Set up regular Game Days to test workloads and team responses to simulated events.

### Learn from all operational failures

Drive improvement through lessons learned from all operational events and failures. Share what is learned across teams and through the entire organization.
SPAs in ASP.NET Core - Another Attempt
Tags: aspnetcore, csharp, javascript, typescript
Published: 2022-07-17 22:49:22

---
title: SPAs in ASP.NET Core - Another Attempt
published: true
date: 2022-04-20 00:00:00 UTC
tags: 
  - aspnetcore
  - csharp
  - javascript
  - typescript
canonical_url: https://wildermuth.com/2022/04/20/spas-in-aspnetcore-another-attempt/
cover_image: https://wilderminds.blob.core.windows.net/img/2022/04/20/cover.jpg
---

After discussing this topic with a client, I realized that my old method of hosting SPAs in  
[ASP.NET](http://asp.net/) Core didn’t handle resources correctly, so I dug in and came up with **yet another** technique. This one is the simpliest and the least intrusive and works better than most. Let me know what you think about it:

> [Watch](https://www.youtube.com/watch?HOJ8ge0Mi7Q)

[Subscribe to my YouTube Channel](https://www.youtube.com/c/swildermuth)

[![Creative Commons License](http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/3.0/)

 This work by [Shawn Wildermuth](http://wildermuth.com) is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/3.0/).  
 Based on a work at [wildermuth.com](http://wildermuth.com).

* * *

If you liked this article, see Shawn's courses on [Pluralsight](http://shawnw.me/pscourses).
Auto-scaling : Setup one for your app in five mins
Tags: webdev, tutorial, cloud, productivity
Published: 2022-04-19 23:54:30

## DAY 28 -Auto-scaling : Setup one for your app in 5 mins - Day Twenty Eight

[![Image tweet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfjzxg64r7q0i8ra6b8t.png)![Image Cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eukk37obulb1a5c1fsql.png)](https://twitter.com/intent/tweet?text=How%20to%20set%20up%20a%20Auto-scaling%20for%20your%20application%20in%205%20minutes%2C%20a%20blog%20by%20%40anuvindhs%0A%0Ahttps%3A%2F%2Fdev.to%2Faws-builders%2Fhow-to-setup-auto-scaling-for-your-app-in-5-mins-12dn%20)


[100 days of Cloud on GitHub](https://github.com/anuvindhs/100daysofcloud) - [Read On iCTPro.co.nz](https://ictpro.co.nz) - [Read on Dev.to](https://dev.to/anuvindhs)

------

## Setup your Load Balancer 

![Image LB](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lj9d16fwwoe6u1pzhsxt.png)
 
Check out this blog to see [how to setup loadbalancer in 2 mins](https://dev.to/aws-builders/load-balancer-setup-one-in-two-minutes-1c21).

{% embed https://dev.to/aws-builders/load-balancer-setup-one-in-two-minutes-1c21 %}

## Auto Scaling

 
### Creating Amazon machine image (AMI)
- Go to EC2 console
- Select your EC2 , Actions, Image and Templetes , Then click Create Image.
- Wait till AMi created you can check this on Images area on EC2 Console
![Image autoscaling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wea79m7312f9trhf8uef.png)

### Creating Launch Template

  - On Ec2 Dashboard Select Launch Template and click Create Launch Template.
  - Name it LaunchTemplate-AWS-EC2
  -  Name the Launch Template
  -  Selected EC2 AMI we have created earlier
  -  kept t2.micro as Instance type 
  -  Selected Key pair
  -  Selected your security group.

### Creating Auto Scaling Groups

   - On EC2 Dash Board Select Auto Scaling Groups
   - Click on to Create Auto Scaling Groups
   - Name it as Autoscaling-AWS-LAB
   - Select all available  **Subnets**
   - Attach to an **existing load balancer**
   - Select Choose from your load balancer target groups
     - Select Previously created **Target Group**
   - Health check **grace period** - 300
   - Enable **Monitoring** (optional)
   - Desired capacity **1** ,Minimum capacity **1**, Maximum capacity **4**.
   - **Target tracking scaling policy** , **Average CPU Utilization** - TargetValue **85%**
   - Add Notifications - you can add **SNS Notifications when ever auto scaling triggers** 
     - Create new SNS Topic , Add a Name and Email address Click Next
   - Click create auto scaling
  

----------

**✅Connect with me on [Twitter](https://twitter.com/intent/follow?ref_src=anuvindhs&screen_name=anuvindhs)
 🤝🏽Connect with me on [Linkedin](https://www.linkedin.com/in/anuvindhs)
🧑🏼‍🤝‍🧑🏻 Read more post on [dev.to](https://dev.to/anuvindhs) or  [iCTPro.co.nz](https://ictpro.co.nz)
💻 Connect with me on [GitHub](https://github.com/anuvindhs)**

----------
{% user anuvindhs %}
Web3Hunter Launch (Job board)
Tags: web3, webdev, programming, career
Published: 2022-04-19 23:53:16

I’m Hassan co-founder of web3hunter, we create a gateway(space) [Web3Hunter](https://web3hunter.co/) for talent to smoothly move to web3 space and find opportunities that much their needs.

I believe that each one deserve a job where she/he can learn, grow and contribute. I believe that finding a good match opportunity for the talent and the recruiter should be simple and effortlessly

More than a plateforme it's a community with like-minded people, a space to connect and create.

Today web3hunter is an opportunity board, backed by a new community. We decide to keep building this plateforme with you guys step by step.

Find our roadmap & join us to be part of the adventure

Just vibes 🙏

🌳 Integrity, transparency & creativity
Well-Architected Improvement Plan
Published: 2022-04-19 23:50:40

## Improve your architectures by addressing High-Risk Issues

After the Well-Architected Review is completed, you will receive a report identifying High-Risk Issues and Medium-Risk Issues. These issues are measured against the Framework.

## What are High-Risk Issues and Medium-Risk Issues?

### High-Risk Issue

A **High-Risk Issue (HRI)** is a architectural and operational choice identified by AWS that might have a significant negative impact. It may affect organizational operations, assets, and individuals.

### Medium-Risk Issue

A **Medium-Risk Issue** also might negatively impact business, but to a lesser extent.

## What resources are available for implementiong Improvement Plans?

1. Contact your AWS account manager for additional support and guidance.
2. If you don't have an AWS account manager, or don't have the bandwidth or skill set in your organization, reach out to AWS Well-Architected Partner Program memebers.
3. If your team is taking on the remediation of HRIs, review the steps that are outlined in the Improvement Plan. Reference Well-Architected Labs, which provide step-by-step guidance on how to implement best practices.
Been Busy - New Years Resolution - Dev Log 30
Tags: webdev, beginners, programming, startup
Published: 2022-04-19 23:17:51

Since my last blog post, I have been busy with Easter, interviews, and fighting with Google Ads. While trying to create an ad campaign for the job board with Google Ads I ran into an issue. Google flagged my account for "suspicious" activity and suspended my ads campaigns. I am pretty sure that a bot flagged me because I have not spent a dime yet. I got flagged right after starting my first-ever ad campaign. I have already reached out to Google to resolve the issue. They told me to expect a response in 5 to 10 business days, so looking forward to that. The automated support they have is in Beta and could use some work. It was a pain figuring out how to appeal the suspension.

I have also been interviewing with a company for a full-stack web development position. The company seems cool and online reviews from employees make it sound like a good place to work. The initial interview went well and I have been invited to do a technical, which I am hoping to get done sometime in the next couple of days. With both of those updates and Easter plus work, I have not had a ton of time to start a new project. I am leaning towards starting a SaaS or trying to cheese my way out of poverty with a mobile game. I honestly have been feeling the old Unity itch.

One thing that I was able to get done that is productive is that I fixed a bug with the job board. It was not sorting jobs via date by default. It turned out to be a simple logical error in the sort by date function. Now that I have updated it, the website is behaving as expected. So I do not have a ton to report this time, my next post will probably be next week.
Checklist for UI frameworks evaluation
Tags: frontend, ui, design
Published: 2022-04-19 23:03:10

---
title: Checklist for UI frameworks evaluation
published: true
description: UI frameworks have opinion on how to express the UI logic. Here is a checklist to evaluate if the "opinion" really works.
tags: frontend, ui, design
//cover_image: https://direct_url_to_image.jpg
---

* load server generated page without waiting in blank state for too long, load as much as possible within a time budget, defer unfinished loading to second roundtrip
* show loading indicator to allow other areas to show before everything ready, but not too many indicators
* show error in area, instead of make whole page unusable
* show result of my action without whole page refresh, keep uncommited edit state in other area
* show feedback while typing, save extra click
* show search results while typing, save extra click
* if button click takes some time, show a processing indicator on the button to prevent user clicking twice
* if server processing takes time, client may optimistically update before server confirm
* show error next to the input
* avoid multi page form, prefer minimal data entry initially, grow the form gradually as user provided more information
* use infinite scroll to load more
* use pull down to refresh
* use swipe to show/hide more actions
* use drag and drop to re-order items
* use drag and drop to connect relationship
* use half screen dialog to replace page jumping, use inline editing to replace modal dialog, avoid jumping around if possible
* use mansonry to layout double columns, use screen space more efficiently
* use FLIP layout animation to avoid content suddenly appear/disappear
* preload next page, show progress, save the waiting time after switching
* show current and next page side by side with transition animation, if no loading required
* go back to previous page without reload waiting
* perserve unsaved form in browser
* render big page with many dom nodes, showing only the porition in viewport
* multiple concurrent actions, end up with a consistent final state

Go through the checklist, and find out how to implement each feature in the framework you are evaluating (for example https://remix.run).
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2022-04-19 22:50:15

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## Never let a good crisis go to waste!

HTTPie for Terminal is celebrating 10 years since the first commit. This is cause for celebration, but recently, @jakubroztocil accidentally set the repo of this project to private causing the loss of many, many followers. Take a look at this post for some generous and valuable lessons learned. 

{% embed https://dev.to/pie/how-we-lost-54k-github-stars-28aj %}


## Evolving Legacy Code Bases with Micro-Frontends

Micro-frontends are the present and the future for scaling large client-side applications. Let’s dig into the reasons that led @mbellagamba and his team to adopt it.

{% embed https://dev.to/mbellagamba/implementing-micro-frontends-a-path-to-evolve-legacy-codebases-4e37 %}


## Write Better React Code in 2022

Although React is somewhat flexible in terms of how you can use it, following specific practices will help you get the most out of your experience. Following the release of React 18, @officialbidisha has some new info to share. 

{% embed https://dev.to/officialbidisha/react-18-to-the-rescue-38g3 %}


## Is Warp the Future of Terminals?

Like a lot of programmers, @perkinsjr spends a lot of time in front of the command line. Warp is a brand new terminal experience, so let's talk about it.

{% embed https://dev.to/perkinsjr/warp-is-the-future-of-terminals-24hh %}


## Boost your React with Test-Driven Development

Writing tests before adding features helps write better code because you think upfront about the design patterns, the architecture, and the variable's name that will be used. Follow these TDD tips from @koladev

{% embed https://dev.to/koladev/test-driven-development-with-react-redux-thunk-slices-requests-mocking-585i %}


## Spiff up your personal site

@tmchuynh believes that a dev's personal website should be an entity they are proud of in order to showcase the best parts of themselves to the industry. Here are some recent changes they made to spiff up their site ✨ 

{% embed https://dev.to/tmchuynh/a-personal-website-w-everything-268k %}


## Facing tough code monsters without letting them eat you

@colocodes recently read "Think Like a Programmer" by Spraul V. Anton and picked up some helpful problem-solving wisdom along the way. Check it out...

{% embed https://dev.to/colocodes/problem-solving-techniques-to-avoid-yelling-at-your-computer-41e9 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
Caden lets you take control of your data
Tags: webdev, startup, devrel, news
Published: 2022-04-19 22:46:38

Have you heard of [Caden.io?](https://www.caden.io/)

Caden is the newest idea from serial entrepreneur [John Roa](https://roa.com/).  His latest endeavor markets itself as the world's first Zero-Party Data Platform, providing an encrypted vault to Users to own their data, as well as tools for brands to interact with the data that a user consents to sharing. 

The concept is very intriguing from both a User and a Brand perspective.  Based on my experiences with an international B2B SaaS product, I believe we're nearing a paradigm shift with how data is handled, and Caden could very well be the tip of the spear that drives change.  So far Caden's platform has not been released to the public, but you can [sign-up for the wait list](https://www.caden.io/old-home) to be notified when you can participate.  

I've known John Roa since our days as undergrads at Western Michigan University and have had the opportunity to watch him succeed as an entrepreneur.  Prior to Caden, Roa founded the UX Studio [Akta](https://www.linkedin.com/company/-kta/), which was later [acquired by Salesforce](https://venturebeat.com/2015/09/02/salesforce-signs-definitive-agreement-to-acquire-digital-experience-consultancy-akta/).  I'm very confident that Roa will find an audience and a market for this kind of platform.  Check it out! 

P.S.  Caden is [hiring](http://jobs.caden.io/)!  Take a look at the roles and apply if you meet the requirements!
Alternative to parseInt() - input.valueAsNumber
Tags: input, method, javascript
Published: 2022-04-19 21:45:00

The problem with HTML inputs is even number type inputs (`<input type="number">`) return strings when called. Due to JavaScripts untyped syntax, weird things can happen with strings unless you add the safety net of using `parseInt()` or `parseFloat()`.

I recently found a cool little alternative, `input.valueAsNumber`! Awesomely, `valueAsNumber` will return a primitive `number` regardless of whether the input is `3` or `3.14` (integer or float) which can save you an extra step. 

Here is some basic syntax:
`console.log(input.valueAsNumber)` 
// 3.14, not "3.14" 😉

There is one slight caveat - _if the input is empty,_ `valueAsNumber` _will return_ `NaN`, so just beware of that.