teleren/devto huggingface dataset:
Demand for Ruby/Rails 2022
Tags: ruby
Published: 2022-10-17 10:21:52

Hey guys,

How do you find the demand for Ruby/Rails in 2022? Less and less projects are available and although e.g HackerRank still has it as available language to do the coding challenges, a lot of similar sites have dropped it.

Are you worried? What's your take on it?

Please mention the country your are from as well if possible. I'm based on London, UK and while there is still demand for Ruby services here, I feel like it's fading.
Exact match search deeply nested objects - PostgreSQL
Tags: postgres, sql, database, programming
Published: 2022-10-17 10:17:53

Table Of Contents
        * 🚀[INTRO](#intro)
        * 🎯[GOAL](#goal)
        * 🏁[SOLUTION](#solution)
        * 🙏[THANK YOU](#thank-you)

## 🚀 Intro <a name="intro"></a>

Hi all! In this post I'll try to showcase the problem I faced recently. It is regarding the PostgreSQL database and how to query for an exact text match in the deeply nested objects and array of objects.


## 🎯 Goal <a name="goal"></a>

Let's consider that you are making a platform that allows people to register, create profile, add **skills** they poses and land a job offer. Let's assume that we are currently interested in creating a search engine that will search only for the exact match of the skill (e.g. "cooking") and It should return only the data that matched the search term.

Also, let's assume that we are storing the table that has a column called "sections" and it is of "jsonb" type. That object contains objects for "skills" (which contains an array of objects called "items"), "languages", "hobbies" etc.

Read more about JSON column in [PostgreSQL docs] (https://www.postgresql.org/docs/14/datatype-json.html)

### JSON object example
```JSON
sections: {
   skills: {
      items: [{
         name: 'cooking'
      }]
   },
   languages: {...}
   hobbies: {...}
}
```

So, our current goal is to get the search term the "employer" user entered - in this case 'cooking' and find all the user profiles that match this term exactly.


## 🏁 Solution <a name="solution"></a>

We can achieve this in the following manner:

```sql
SELECT *
FROM user_profile up
WHERE up.sections->'skills' @> '{"items":[{ "name": "cooking"}]}';
```

This will return all the user profiles from the user_profile table, that matched the skill search term exactly.

## 🙏 THANK YOU FOR READING!<a name="thank-you"></a>

Please leave a comment, tell me about you, about your work, comment your thoughts, connect with me! 

☕ SUPPORT ME AND KEEP ME FOCUSED!

<a href='https://ko-fi.com/Z8Z33D1HJ' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi4.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

Have a nice time hacking! 😊
JavaScript Regex Tip: change "HelloWorldAgain" to "Hello World Again" (Camelcase to Separate Words) with Explanation
Tags: javascript, tutorial
Published: 2022-10-17 09:50:17

So you might also have encountered this problem were you want to transpose a camelcased words into space separated words, well here it is.
```js

const words = "HelloWorldAgain".replace(/([a-z0-9])([A-Z])/g, "$1 $2");

console.log(words)

// output: Hello World Again
```
Let me explain that way you understand what is happening here.

We used the `.replace(arg1, arg2)`. The first argument is what were going to find. The second argument will replace what we found.

We used a regex `/([a-z0-9])([A-Z])/g`. This means where going to find 2 group, `()` means a capture group. As you can see we have 2 group `([a-z0-9])` and `([A-Z])`. So this means it will look small/numbers and capital that is together like `aB` or `6B`.

Next we have this `"$1 $2"`. so we explained a while ago about the regex capture groups. So `$1` will represent the group 1, and `$2` represents the group 2. So for example `aB` it will be `a B`, beause our second argument which is `"$1 $2"` has space between. Another example:
```js
`yourTheBest`.replace(/([a-z0-9])([A-Z])/g, "$1-$2");
// output: 'your-The-Best'
```
This is because our separator is dashed between "$1-$2". So if we like to add more groups we can add `$3` to represent the 3rd group. example:
```js
`yourTheB1est`
.replace(/([a-z0-9])([A-Z])([0-9])/g, "$1-$2 $3");

// output: 'yourThe-B 1est'
```
So in the above code we added another group which is `([0-9])` and it will find 0 to 9 character. So if it will find this characters together in order based on the group it will replace based on the format we types which is `"$1-$2 $3"` so it becomes `'yourThe-B 1est'`. It ignored the `yourThe` because it has no number after the `T`.

----------------------
I hope you learn a little on This short article. If you like to read more check my Blog site here: https://blog.brojenuel.com

If you like to Give Me Coffee
I'm not stopping You: https://ko-fi.com/brojenuel

If you have GCASH heres my GCash, just scan it using your Gcash app:

![Brojenuel GCash Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nh6k9wyyv3y9pt3z6rpt.png)
Re-posting For Better Reach : You are front-end developer? This is for you, Sample Data API
Tags: javascript, webdev, beginners, programming
Published: 2022-10-17 09:23:43

Hello,

New Update from my sample data API

1. SSL issue has been fixed.
2. performance of an APIs improved 
3. 5 new APIs added.


OLD POST starts from here.
--------------
Today i am making this post for my new website which is based on sample data.

Here, I have created for the front-end developer. 

It can be useful to new beginners who has started learning new front-end tech, But they are not having ready to use APIs. Sampledataapi is providing a ready to use APIs.

It can be also get used to practice for APIs calls.

Test your front-end against a Real / Fake APIs

1. 24 / 7 Available
2. SSL Enabled
3. CORS Enabled
4. Sample Data API / Fake Data API
5. Real Response

A hosted ready to use REST-APIs.
Ready to respond to your mobile app / react-native / AJAX or any other requests

Complete signup and user profile APIs


Hey Guys please visit the site and share your valuable thoughts here.

Thanks.

Here is the link for it [Sample Data APIs](https://sampledataapi.com?devto)
VSCode Extension: Mintlify Doc Writer - Documentation written easier and faster
Tags: vscode, mintlify, programming, tutorial
Published: 2022-10-17 09:20:42

A while ago I came across one of the most amazing if not the most amazing vscode FREE extension called [mintlify](https://marketplace.visualstudio.com/items?itemName=mintlify.document).

Upon looking at the extension statistics and download metrics I was surprised how unpopular it is despite its HUGE advantages and especially while the core funcionality of the extension is absolutely free!

Mintlify lets you - very simply - generate documentation for a chunk of a code you select, and its done pretty fast!

Have a look at the extension here:
https://marketplace.visualstudio.com/items?itemName=mintlify.document
{% embed https://www.loom.com/embed/3dbfcd7e0e1b47519d957746e05bf0f4 %}

<br><br>
📝 **Languages supported**
* Python
* JavaScript
* TypeScript
* JSX and TSX files
* C and C++
* PHP
* Java
* C#
* Ruby
* Rust
* Dart
* Go
🚧 More under construction


📑 **Docstring formats supported**
* JSDoc
* reST
* NumPy
* DocBlock
* Doxygen
* Javadoc
* GoDoc
* XML
* Google
🚧 More under construction


🚨 Disclaimer
_Mintlify does not store your code, but it does reach their servers to generate the appropriate documentation._
Standard Resume
Published: 2022-10-17 09:07:17

[Standard Resume](https://standardresume.co/) is one of the best Resume builder out there for Software Engineer.
It's really intuitive to use, I can build different CVs for various job offers in no time. Especially I like the template and customization options, so I can match my resume with either my general homepage or a dedicated portfolio site.

This sounds very ad-ish, I know, but I checked lots of resume building services, and this one really stands out. Congrats to the team!
RDBMS - Relational Database Management System
Published: 2022-10-17 08:58:14

---
title: RDBMS - Relational Database Management System
published: true
description: What is an RDBMS?
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
In this article, you can learn everything you need to know about relational databases - from all the basic terms and definitions to relationship types, key features, and examples of relational databases and management tools - https://www.devart.com/what-is-rdbms/
Skills you need to become a Web developer
Tags: webdev, beginners, programming
Published: 2022-10-17 08:26:07

Many questions are asked when one wants to start a career in web development, and one of those questions is, "**What are the key skills that I'll need for a web development qualification?**."

Knowing what a web developer does in their day-to-day job is essential. So, before you can call yourself a web developer and start applying for jobs, here are the following skills you need to master:

**Languages**
- HTML: A markup language used to create websites.
- CSS: Used to describe the visual presentation of the HTML pages. 
- JavaScript: Used to make these pages interactive.

_NB; Learning how to use these three core languages is mandatory because it is impossible to have a career in web development without being fluent in them. Also, note that these are not the only programming languages._

**Framework**
- Bootstrap: Allows you to create a responsive and mobile-friendly website that works flawlessly on any device.
- React Js: Used to create an interactive user interface and web application efficiently.

_NB; Using any of this will be fine._

**Design**
- Figma: Used for interface design
- Adobe Xd: A website UI/UX design solution that is quick and powerful.

_NB; You can master any of these for your design, or Photoshop and canvas._

By mastering these tools, you have everything you need to become a web developer.

As an extra, you can throw in learning how to use **Git** and **Github**
- Git: A version control system that allows you to keep track of changes made to your code.
- GitHub: Acts as a hosting service for your git repository, it enables collaborative and teamwork projects.

Let me throw in another most asked question, "**Do I need a certification to be a web developer?**" 
This is one of the biggest concerns for people changing careers from other fields to tech. The good news is that no qualification, certificate, or degree is required. As long as you can showcase your work and prove that you have mastered the necessary skills, you can get jobs as web developer.

I hope this article will help you in your journey to become a web developer.
Finding the longest word in a sentence/string (freecodecampnotes)
Tags: javascript, webdev, programming, beginners
Published: 2022-10-17 08:10:59

In this exercise we are given the following snippet to find the longest word in the sentence.

```javascript
findLongestWordLength(str) {
  
   return maxLen
}

findLongestWordLength("The quick brown fox jumped over the lazy dog");
```
Below are our attempts

{%gist 
https://gist.github.com/NaveenDK/9a22d5d48ce655070ba211c9156baad3.js %}

What is the correct answer? Attempt 2 as always, the reason being..

The split function

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3i8kyxz070is6h8xd8m5.png)
Custom React hook : useDebouncedEffect()
Tags: react, webdev, programming, tutorial
Published: 2022-10-17 07:44:07

## Background

Recently I saw a question on Stackoverflow where the poster was looking to run a `useEffect` in debounced manner.

Here is a screenshot:

![The original question](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06emzfszeaj2y58fun1m.png)


This makes sense as many times as there are situations where some effects need to run but not on every change to a dependency. Eg: In a type search bar which makes API calls, we can run `useEffect` in a debounced manner to optimise resource utilisation.

I tried to have a go at the answer and tried making a custom hook to solve the problem. I will try to summarise the hook below:

## The hook

This is the basic structure we know our custom hook would follow:

```
const useDebounceEffect = (fnc, deps, delay) => {

 useEffect(() => {


 },deps);

}
```

In addition to the params of the standard useEffect, this will have a `delay` parameter too. The hook internally will still use `useEffect`.

We will need to use a `setTimeout` to schedule our callback function. This timeout needs to be cleared too, so it is important to keep the ID of the timeout. We need to have a `ref` which holds our timeout ID. State variable is not required here since we do not want to cause a re-render whenever our `ID` changes.

```
const useDebounceEffect = (fnc, deps, delay) => {
  const ref = useRef();

  useEffect(() => {
    clearTimeout(ref.current);
    ref.current = setTimeout(() => {
      fnc();
      clearTimeout(ref.current);
    }, delay);
  }, deps);
};
```

The hook looks almost ready, but there is one problem: 
The dependencies are not complete. If after a render, `fnc` changes or `delay` changes, the effect is not triggered.

We get a warning for that from our linter too and we fix it to complete the hook.

```
const useDebounceEffect = (fnc, deps, delay) => {
  const ref = useRef();

  useEffect(() => {
    clearTimeout(ref.current);
    ref.current = setTimeout(() => {
      fnc();
      clearTimeout(ref.current);
    }, delay);
  }, [fnc, ...deps,delay]);
};
```

Note how we do not need to mention `ref` in the dependency. `ref.current` will always have the correct value since it is a mutable container and changing `ref.current` does not cause a rerender.

## Links

With this our hook is complete. Here is link to the [original question](https://stackoverflow.com/questions/74040422/what-is-the-best-way-to-add-a-debounce-effect-on-field-in-react-react-native/74040636#74040636) and a [running demo](https://codesandbox.io/s/elegant-montalcini-h7tps9?file=/src/App.js)
HOW INSTITUTE MANAGEMENT SYSTEM CAN HELP IN DATA SECURITY?
Tags: institute, education, software, instituteerp
Published: 2022-10-17 07:35:03



With modernization, the educational and institutional system is getting computerized. With everything on the simple institute management system, one can get the learning material from a place at any time. However, the positive aspects come with the negative phase which includes the exploitation of personal info we allocate on such platforms. Your data can be exploited and misused in case of a security breach, and it could be a hell of a risky thing.

**WHY STUDENT DATA NEED TO BE PROTECTED?**
You may be thinking about why students want data privacy at all. Students are particularly minors and are unaware of the fact that an organization or an individual is trying to fetch information about them. Students are taught to respect elders, which may act in opposition to them as persons with bitter intent might steal necessary data. Hence, it is the responsibility of schools and institutions to keep the privacy entrusted with their administrative authority.

**WHAT IS A BREACH OF SECURITY?**
A breach in Data privacy refers to unofficial access to students’ information, resulting in major and negative outcomes for the students. For example, a student’s home address might get into the wrong person’s hands because of a security issue and might lead to risk.

Even if there is no misuse intention, respecting and protecting the personal information of the student is necessary.

**OUTCOMES OF A DATA SECURITY BREACH**
A data security breach can be dangerous for a student’s life. Once you put your information on any digital software, all your data is just out there. school and educational websites have to stock  lots of information about students and guardians, and the breach of the data might lead to many wrong outcomes.

We don’t even need to write the risk linked with the leak of data on parental finances. It can risk a guardian’s finances if banking data gets revealed to people with bitter intentions.

**ROLE OF INSTITUTE MANAGEMENT SYSTEM IN STUDENT’S DATA SECURITY**
Security violations on many online platforms have led to the usage of institute management systems across India. It reduces manual errors and ensures data privacy. A single breach of data can lead to several pieces of information, and that is why you need software that works as a shield for the data and information from hackers.

**[Read More...](https://blogs.warals.com/how-institute-management-system-can-help-in-data-security/)**
RX-500 Project-Updates
Published: 2022-10-17 07:29:19

I was keeping a small log of my project updates while I was working on the more internal aspects of the project, for the design and UI, I kept compiling to android to test and make sure the dimensions and anchors were set properly.

**10-3-2022**

Started to create a small VM inside the RX-500 Game Project

I wanted to add the ability to both program for the virtual machine and learn to explore existing software and create exploits or discover vulnerabilities that would actually progress the story of the game.

A, B, C, X, Y and SP Registers, Stack and Memory which the program code is loaded into.



**10-5-2022**

VM can run simple integer based array and would preform certain actions against registers and the stack, loading values into the basic registers of the virtual machine as well as the basic halt instruction that stops the virtual machine.

It can place an array of bytes into the memory of the virtual machine by copying them “bit for bit”

Started to work on the RX-500 instruction manual that would double as an actual instruction manual for using the device as well as hints as to how to exploit it and even write software for it.( Inspired by Shenzhen I/O’s manual )

**10-8-2022**

VM can now read assembler source files and parse them into integer arrays

Also the source files have the ability to define both byte strings and directly write bytes to the source file.

VM can also compare registers and jump according to if an equal flag was set.

Added some email correspondences and company forms for the company that designed the RX-500 (Mouseteck)


**10-10-2022**

VM can write to the display and recognizes jumps and labels

Implemented basic system calls

Print String, which reads a location in memory until a 0 is reached which is the end of a string

Print Char which prints the given value as a character

Flushed out the basic instruction set for the Rx-500 manual.



**10-14-2022**

Modified the RX-500 project to run live parsed assembler code, subroutines, call and return instructions implemented

`:sub-001
loada 41
loadb 70
sys
ret
call sub-001`

{% embed https://youtu.be/T4WqCNPv2pY %}

**10-15-2022**

Added save and restore instructions to save the state of the registers when entering a subroutine.

`:sub-001
save
loada 55
loadx printchar
sys
restore
ret`


**10-16-2022**

Started to write a graphics driver that would modify the pixel data of the screen directly.

Also added a readkey system call
Spread operator in JavaScript.
Tags: javascript, webdev, programming, beginners
Published: 2022-10-17 07:24:51

The spread operator in JavaScript is a convenient way to make copies of objects. But there is one catch. If the object contains nested data, then the spread operator creates deep copies of the outermost data and shallow copies of the nested data.

In a deep copy, the value is copied. A brand new object/value is cloned. In contrast, shallow copy involves copying the reference addresses, due to which changing one object/value alters the other object/value. You can observe this in the code snippet image.

So to create deep copies of nested objects, we can stringify the objects using JSON.stringify() and then parse them JSON.parse(). This results in creating a deep copy of an object containing nested data.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52gouj9n1txqbzogoz9t.jpg)

credit: [Rabi Siddique](https://www.linkedin.com/in/rabi-siddique/)
API Gateway Trends behind Features: Apache APISIX 3.0 vs. Kong 3.0
Tags: api, apisix, apigateway, opensource
Published: 2022-10-17 07:24:24

On September 28, 2022, Kong released the new Kong Gateway 3.0, which achieved some new functions and performance improvements. On September 21, Apache APISIX, the top-level project of the Apache Software Foundation, also released the preview version of Apache APISIX 3.0, introducing ten highlights in terms of ecosystem and features.

Take a closer look at Version 3.0 of these two popular open-source API Gateway projects and figure out the development trend behind these updates

[https://api7.ai/blog/apisix-vs-kong-3-0](https://api7.ai/blog/apisix-vs-kong-3-0)
Into the JS verse
Published: 2022-10-17 07:22:12

If you're starting out with Ruby like I did and move on to JavaScript you're warned about how different it's going to be. When beginning this section of the curriculum I got to grasp just how different it really is. Being that my first few projects seemed to be a continuation of what was previously learned, JavaScript was like going into a whole new world.

Been There Done That is an application that acts like a grocery list for all the places a user would want to travel to in the world. All that needs to be done is the user types in the country/state and the city that's wanting to be traveled to. After that the form is submitted with a button to add that location to the list. If that place has been crossed off the list or maybe is just not looking to traveled to anymore there's a delete button provided that will remove it.

Prior to Js, event listeners were just one thing that was unheard of but stuck out to me throughout the material and made a lot of sense upon learning the many ones and ways they're used. The thought of the code listening for certain events to occur in order for an action to be made gave a good idea of all the programs that can be made using them. Of course the ones that immediately come to mind are the click events but the DOMContentLoaded and form events caught my attention. While some events like the click event are pretty straight forward the DOMContentLoaded event is one done behind the scenes to insure that the DOM loads before the entirety of the HTML script is loaded. The form submission event is used when a user submits a form to the server, most likely using a button, making a POST request. With this event extra steps have to be made for it to work. One of those step is when sending a POST request .preventDefault() needs to be added first to the event being passed in to prevent the default submission action of reloading the page.

```
function addPlace(e) {
    e.preventDefault()
    const locationInput = e.target.children[0]
    const cityInput = e.target.children[1]
    fetch("http://localhost:3000/places", {
        method: "POST",
        headers: {
```

Those are just a small fraction of the event listeners and the big world that is JavaScript. Even though Js was completely foreign to me the material throughout my learning made it easier to follow along and actually understand how to build a functioning application. There's so much to learn and do in this new language, and I'm looking forward to see just what all can be built.