teleren/devto huggingface dataset:
Does this make sense to anyone?
Tags: programming, career, help, agile
Published: 2022-06-10 21:01:51

My colleagues and I are burned out on standard agile tools. Where are radical new thoughts in the last 20+ years?

We are building something so unfamiliarly new that we suspect no one understands it. 

In fact, we know from limited experiments so far that most people do not get it.

Does the concept make sense to you when you try it out?

Is it too complicated for most people to understand? Does it require too much abstract sophistication? Are we simply wrong with the whole idea?

Can you make sense of it? If not, feel free to roast it, and us, here on this thread.

[Twigflo.com](https://twigflo.com)
Surfing in the waves of change!
Tags: javascript, career, webdev, motivation
Published: 2022-06-10 21:00:59

I just finished the Learn Javascript for Free Course from Scrimba, and Per had asked people to write about their journey.  Probably about three years ago, I started yearning to become more involved in computer science.  I have been a teacher since 2009.  And I'm pretty good at it.  But honestly, my passion is computer science.  And I want it to be my children's passion, too.  Fifty years from now, not knowing computer science fundamentals may be a short path to an unpleasant life.  

The world is changing, and we must change with it.  I say to my kids, "You better learn how to surf in the waves of change and ride them, or when those waves come, you will be crushed by them.  The choice is yours."

Three years ago, I began learning on FreeCodeCamp, then I switched to the Odin Project.  In the background I was coaching robotics teams and learning about and teaching Python3.  Then I switched to Coursera to pick up HTML, CSS, and Bootstrap knowledge. Next, I moved into Udemy, where I picked up Angular, React, and NodeJS.  I have four deployed websits on my github. 

Then I decided to try a bootcamp. The bootcamp felt rushed, and I was not getting to network, which I have found to be crucial in the job search I am still in.  I found out about Scrimba there, though.

Scrimba has been where it is at.  I have accomplished more in Scrimba in three weeks than I did in months in the other paths.  Not because of pressure, but because the model works: you network, you gain access to meaningful conversations, you network. And most of all, you get to build practical projects that are not overwhelming to solidify your knowledge.  As Per says, "muscle memory". 

Now I will continue on with Scrimba and Udemy, and see where the future lies. I hope to become a Junior Developer on the Front End side soon, and then build out to become a full-stack developer.  I am wrestling with those waves, and getting better at staying on the board.
Integer to Roman
Tags: leetcode, dsa, theabbie
Published: 2022-06-10 21:00:55

Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D` and `M`.

**Symbol**       **Value**
I             1
V             5
X             10
L             50
C             100
D             500
M             1000

For example, `2` is written as `II` in Roman numeral, just two one's added together. `12` is written as `XII`, which is simply `X + II`. The number `27` is written as `XXVII`, which is `XX + V + II`.

Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not `IIII`. Instead, the number four is written as `IV`. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as `IX`. There are six instances where subtraction is used:

*   `I` can be placed before `V` (5) and `X` (10) to make 4 and 9. 
*   `X` can be placed before `L` (50) and `C` (100) to make 40 and 90. 
*   `C` can be placed before `D` (500) and `M` (1000) to make 400 and 900.

Given an integer, convert it to a roman numeral.

**Example 1:**

**Input:** num = 3
**Output:** "III"
**Explanation:** 3 is represented as 3 ones.

**Example 2:**

**Input:** num = 58
**Output:** "LVIII"
**Explanation:** L = 50, V = 5, III = 3.

**Example 3:**

**Input:** num = 1994
**Output:** "MCMXCIV"
**Explanation:** M = 1000, CM = 900, XC = 90 and IV = 4.

**Constraints:**

*   `1 <= num <= 3999`

**SOLUTION:**

    class Solution:
        def intToRoman(self, num: int) -> str:
            sym = {
                1: "I",
                5: "V",
                10: "X",
                50: "L",
                100: "C",
                500: "D",
                1000: "M"
            }
            keys = list(sym.keys())
            k = len(keys)
            vals = []
            i = 1
            while num > 0:
                curr = num % (10 ** i)
                vals.insert(0, curr)
                num -= curr
                i += 1
            print(vals)
            op = ""
            curr = 0
            while curr < len(vals):
                v = vals[curr]
                if v in sym:
                    op += sym[v]
                else:
                    found = False
                    for i in range(k):
                        for j in range(i + 1, k):
                            if v == keys[j] - keys[i]:
                                found = True
                                op += sym[keys[i]] + sym[keys[j]]
                                break
                    if not found:
                        for key in keys[::-1]:
                            if v > key:
                                op += sym[key] * (v // key)
                                vals.insert(curr + 1, v % key)
                                break
                curr += 1
            return op
Quick Tips for a Stress-Free Home Buying Experience
Tags: fha, mortgage, finance
Published: 2022-06-10 20:43:02

Although purchasing your first home is a major decision, there are other minor decisions to be made along the route. Here are a few pointers to ensure your journey goes smoothly. These pointers can assist you in avoiding some of the most typical blunders.

Put a strain on your budget.

Calculate your monthly mortgage payment and determine how much you can afford. After you've completed this, you can talk to a San Jose home loan lender about it. One of the most crucial components of successful homeownership is making sure you can make your mortgage payment obligations without difficulty. Use mortgage calculators to figure out how much you'll pay each month in principal and interest. You should also determine how much money you'll require at closing. Many home purchasers are unconcerned about the additional costs that arise after the purchase of their home. Make sure you include the cost of moving and additional maintenance.

Look for a reputable mortgage lender.

In Connecticut, there is no shortage of expert mortgage lenders. However, you must exercise caution while selecting one for your house purchase. Choose a [Connecticut FHA loans ](https://www.prysma.com/fha-loans/)lender with whom you feel comfortable collaborating. A smart mortgage lender will pay attention to you and prioritize your demands. They will explain the various home loan choices to you in straightforward English. It's usually a good idea to interview a few of them to see which one is the best fit for you.

I hope the suggestions above will assist you in your property search.
Flipping an Image
Tags: leetcode, dsa, theabbie
Published: 2022-06-10 20:30:40

Given an `n x n` binary matrix `image`, flip the image **horizontally**, then invert it, and return _the resulting image_.

To flip an image horizontally means that each row of the image is reversed.

*   For example, flipping `[1,1,0]` horizontally results in `[0,1,1]`.

To invert an image means that each `0` is replaced by `1`, and each `1` is replaced by `0`.

*   For example, inverting `[0,1,1]` results in `[1,0,0]`.

**Example 1:**

**Input:** image = \[\[1,1,0\],\[1,0,1\],\[0,0,0\]\]
**Output:** \[\[1,0,0\],\[0,1,0\],\[1,1,1\]\]
**Explanation:** First reverse each row: \[\[0,1,1\],\[1,0,1\],\[0,0,0\]\].
Then, invert the image: \[\[1,0,0\],\[0,1,0\],\[1,1,1\]\]

**Example 2:**

**Input:** image = \[\[1,1,0,0\],\[1,0,0,1\],\[0,1,1,1\],\[1,0,1,0\]\]
**Output:** \[\[1,1,0,0\],\[0,1,1,0\],\[0,0,0,1\],\[1,0,1,0\]\]
**Explanation:** First reverse each row: \[\[0,0,1,1\],\[1,0,0,1\],\[1,1,1,0\],\[0,1,0,1\]\].
Then invert the image: \[\[1,1,0,0\],\[0,1,1,0\],\[0,0,0,1\],\[1,0,1,0\]\]

**Constraints:**

*   `n == image.length`
*   `n == image[i].length`
*   `1 <= n <= 20`
*   `images[i][j]` is either `0` or `1`.

**SOLUTION:**

    import math
    
    class Solution:
        def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
            n = len(image)
            for j in range(math.ceil(n/2)):
                for i in range(n):
                    image[i][j], image[i][n - j - 1] = 1 - image[i][n - j - 1], 1 - image[i][j]
            return image
Terraform Workflow: Simplified
Tags: devops, iac, infrastructureascode, infrastructure
Published: 2022-06-10 20:20:23

[Terraform](bpbonline.com/products/infrastructure-automation-with-terraform?_pos=1&_sid=670ffeb27&_ss=r) is an open-source "Infrastructure as Code" tool by HashiCorp and is written in the [GO language](bpbonline.com/search?q=GO&type=product).

Terraform is an infrastructure automation tool that uses high-level configuration language previously called HashiCorp Configuration Language (HCL) to describe the desired state of the infrastructure on multiple cloud or on-premise environments. From this configuration, Terraform then generates a plan to reach the desired state and then executes the plan for infrastructure provisioning. 

Currently, Terraform is one of the most popular open-source, cloud-agnostic Infrastructure-as-code (IaC) tools because it uses simple syntax, provisions infrastructure across multiple cloud and on-premises, and safely re-provision infrastructure for any configuration changes. Terraform is mostly used by DevOps engineers to automate infrastructure creation.

**Terraform workflow**
Terraform core workflow consists of lifecycle stages init, plan, apply, and destroy. These stages are executed as commands to perform the operation expected by them.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpbs4k6zsvdgsyskitnq.png)

Here’s the description and command for the execution of these stages in the Terraform workflow:

**Terraform init** runs a number of initialization tasks to enable Terraform for use in the current working directory. This is usually executed only once per session.
`Command:`
`# Initialize Terraform`
`$ terraform init`

**Terraform plan** compares the desired Terraform state with the current state in the cloud and builds and displays an execution plan for infrastructure creation or destruction. This command is just for the creation of a plan for you to verify/review the work done by you and your teammates; it does not change the deployment. So, you can update the Terraform configuration if the plan is not as per your requirements.
`Command:
$ terraform plan`

**Terraform apply** executes the plan that is created, comparing the current and desired states. This will create or destroy your resources, which means it potentially changes the deployment by adding or removing resources based on changes in the plan. Terraform apply will run the plan command automatically to execute the most recent changes. However, you can always tell it to execute a specific terraform plan command by providing a plan file.
`Command:
$ terraform apply`

**Terraform destroy** will delete all resources that are created/managed by the Terraform environment you are working in.
`Command:
$ terraform destroy`

These are important sets of commands that you cannot work without, and they are dependent on the sequences shown in figure.

Hope this was helpful.
Remove Linked List Elements
Tags: leetcode, dsa, theabbie
Published: 2022-06-10 20:00:46

Given the `head` of a linked list and an integer `val`, remove all the nodes of the linked list that has `Node.val == val`, and return _the new head_.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/03/06/removelinked-list.jpg)

**Input:** head = \[1,2,6,3,4,5,6\], val = 6
**Output:** \[1,2,3,4,5\]

**Example 2:**

**Input:** head = \[\], val = 1
**Output:** \[\]

**Example 3:**

**Input:** head = \[7,7,7,7\], val = 7
**Output:** \[\]

**Constraints:**

*   The number of nodes in the list is in the range `[0, 104]`.
*   `1 <= Node.val <= 50`
*   `0 <= val <= 50`

**SOLUTION:**

    # Definition for singly-linked list.
    # class ListNode:
    #     def __init__(self, val=0, next=None):
    #         self.val = val
    #         self.next = next
    class Solution:
        def removeElements(self, head: Optional[ListNode], val: int) -> Optional[ListNode]:
            if not head:
                return head
            if head.val == val:
                return self.removeElements(head.next, val)
            else:
                head.next = self.removeElements(head.next, val)
                return head
Installing Jekyll
Tags: jekyll, jamstack, tutorial, beginners
Published: 2022-06-10 19:58:00

---
canonical_url: https://cloudcannon.com/community/learn/jekyll-tutorial/
series: Jekyll Beginner Tutorial
--- 
By [Farrel Burns](https://cloudcannon.com)

Brought to you by [CloudCannon](https://cloudcannon.com/jekyll-cms/), the Git-based CMS for Jekyll.

Jekyll is a Ruby Gem that can be installed on most systems. It’s a straightforward process on both Mac and Linux, and only slightly more involved on Windows. Either way, it won’t take you long to get set up with Jekyll! 

How to install Jekyll
---------------------

Jekyll is a Ruby Gem, which means you will need to install a couple of dependencies to allow the Gem to run on your system.

### You will need:

1.  [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.4.0 or higher, including all development headers (check by running the command `ruby -v`)
2.  [RubyGems](https://rubygems.org/pages/download) (check by running the command `gem -v`)
3.  [GCC](https://gcc.gnu.org/install/) (check by running the command `gcc -v`, `g++ -v`)
4.  [Make](https://www.gnu.org/software/make/) (check by running the command `make -v`)

For a step-by-step walkthrough to help you install these, head to the [Jekyll installation guides](https://jekyllrb.com/docs/installation/) and follow the instructions for your system.

### Install Jekyll

Once you have done that you are ready to install the Jekyll gem. Go to your command line interface and run

```shell
    gem install jekyll bundler
```

Final installation check
------------------------

To check that the Jekyll installation has worked properly, run the following command:

```shell
    jekyll -v
```
Blob shapes with CSS
Tags: webdev, css, html, design
Published: 2022-06-10 19:54:08

_In this article, I'm going to talk about how can we create Blob shapes just using CSS._

_So let's start with this_. To achieve this, we're going to use a well-known CSS property called `border-radius`. Yes, you read it right we can do with just `border-radius`. To understand how this works, we need to first understand the property in-depth.

## Learning about border-radius

We use border radius to have rounded/smoother corners for the elements. Each element in HTML has four corners(top-left, top-right, bottom-right, and bottom-left). We can use this property in multiple ways. For example,

```css
// one value (all 4 corners)
border-radius: 10px;
// four values (top-left top-right bottom-right bottom-left)
border-radius: 10px 20px 30px 40px;
```
### How this works

**_This syntax is just a shorthand_**. As we already know, we apply all 4 border-radius just using the single property. So if we want to apply it to a single corner (let's say top-left), we can do

```css
border-top-left-radius: 10px;
```

![Top left border-radius example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ec5kumjjzywlehnz6mr.png)
_What it does here is_, it goes 10px right and down from the top-left corner and creates the round shape.

### Enhance the learning
 So we learned the basics of `border-radius`. But we have another thing to talk about which is, we can pass another value to this.

```css
border-top-left-radius: 10px 20px;
```

![Top left border-radius example with two values](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rl1afwycbivts6pq1bmp.png)
_Now, what's it doing here is_, it is going 10px to the right and 20px down and connecting with a round shape.

## Creating blob shapes
We did learn about shorthands, but we're not going to write shorthands, right? So the question here is, can we not do this directly from the border-radius property? The answer is, that we can. Let's learn about syntax by looking at this example.

```css
border-radius: 10px 20px 30px 40px / 40px 30px 20px 10px;
```
![Blob shape using border radius](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iaq8ux5o0vhjbhlaqmtp.png)
 
If you notice, each value after the slash(/) is mapped to its corresponding value. This results in this.

```css
border-top-left-radius: 10px 40px;
border-top-right-radius: 20px 30px;
border-bottom-right-radius: 30px 20px;
border-bottom-left-radius: 40px 10px;
```

## Let's make this more fun
Okay, now we have learned to create blob shapes with CSS. To make it more fun we can add animations, transitions and hover effects, etc. Please check out this [codepen](https://codepen.io/itssharmasandeep/pen/bGLQgWB) with a simple hover effect with pseudo-elements.

I hope this article was helpful and you learned something new. You can connect with me at [Linkedin](https://www.linkedin.com/in/itssharmasandeep/)
Check if Number Has Equal Digit Count and Digit Value
Tags: leetcode, dsa, theabbie
Published: 2022-06-10 19:30:41

You are given a **0-indexed** string `num` of length `n` consisting of digits.

Return `true` _if for **every** index_ `i` _in the range_ `0 <= i < n`_, the digit_ `i` _occurs_ `num[i]` _times in_ `num`_, otherwise return_ `false`.

**Example 1:**

**Input:** num = "1210"
**Output:** true
**Explanation:**
num\[0\] = '1'. The digit 0 occurs once in num.
num\[1\] = '2'. The digit 1 occurs twice in num.
num\[2\] = '1'. The digit 2 occurs once in num.
num\[3\] = '0'. The digit 3 occurs zero times in num.
The condition holds true for every index in "1210", so return true.

**Example 2:**

**Input:** num = "030"
**Output:** false
**Explanation:**
num\[0\] = '0'. The digit 0 should occur zero times, but actually occurs twice in num.
num\[1\] = '3'. The digit 1 should occur three times, but actually occurs zero times in num.
num\[2\] = '0'. The digit 2 occurs zero times in num.
The indices 0 and 1 both violate the condition, so return false.

**Constraints:**

*   `n == num.length`
*   `1 <= n <= 10`
*   `num` consists of digits.

**SOLUTION:**

    from collections import Counter
    
    class Solution:
        def digitCount(self, num: str) -> bool:
            n = len(num)
            ctr = Counter(num)
            for i in range(n):
                if ctr[str(i)] != int(num[i]):
                    return False
            return True
How not to leak features when using Firebase Remote Config
Tags: android
Published: 2022-06-10 19:11:02

---
title: How not to leak features when using Firebase Remote Config
published: true
date: 2022-06-10 19:08:59 UTC
tags: Android
canonical_url: https://www.rockandnull.com/firebase-remote-config-android/
---

 ![How not to leak features when using Firebase Remote Config](https://images.unsplash.com/photo-1510148567806-766658eb5b86?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDI5fHxsZWFrfGVufDB8fHx8MTY1NDg4ODA2MA&ixlib=rb-1.2.1&q=80&w=2000)

Remotely turning on and off features is a great concept. It adds another layer of confidence when releasing new versions of your app.

You release your new version first, make sure there were no regression, and then turn on any new features one at a time. Did something go terribly wrong with the shiny new feature? No panic, no rollbacks, no new releases. Just remotely switch it off.

One of the most popular solutions for controlling the app's behavior remotely is the [Firebase Remote Config](https://firebase.google.com/products/remote-config). And it delivers. It's reliable, easy to integrate, and provides a friendly UI for turning on and off features.

The way it works is by not executing the code of a new feature if the remote flag is not enabled. For instance, a feature flag might be called `shiny_feature`. Firebase will fetch the enabled features [usually during startup](https://firebase.google.com/docs/remote-config/loading). If the `shiny_feature` flag is in the enabled list, then this feature will become available to the users.

What happens though when you guard your new feature behind a flag during development? When you start sending test versions to colleagues and QA you might think it's fine to turn the feature on for the testing period, and then turn it off just before the new version is released to the public.

But this might be problematic since the clients will be fetching the list of enabled flags for that testing period. The fetching of the enabled flags is a best-effort process. If for some reason it cannot be fetched, the app will use the last version of the enabled flags list already on the device. Releasing the app immediately after turning off a feature, and you will almost definitely witness usage of the guarded features, even if you have the feature off.

So what's the solution to this problem? Just use different feature names before and after releasing a feature. An easy way to do this, instead of manually changing the flag name before the production release, is to automatically append a post-fix to the feature name to distinguish between the development and production versions.

A simple sample code would be:

```
fun featureName(name: String) = 
    "$name${if (BuildConfig.DEBUG) "_dev" else "_prod"}"
```

Remember to import the correct `BuildConfig` of your app's module. Alternatively, use some [build variants](https://dev.to/mavris/demystifying-android-build-variants-53m6-temp-slug-7540633) to distinguish between prod and non-prod versions.

Hopefully, you learned how to avoid any feature to accidentally be enabled on your watch :)

Happy coding!
With Dynamic SQL Queries on TypeScript & NodeJS
Tags: typescript, sql, webdev, javascript
Published: 2022-06-10 19:01:17

Hello,
In this article, I will show you how to write a more dynamic, fast and sustainable SQL queries with `@ssibrahimbas/query` package, which is the npm package I wrote with my own keyboard.

This package creates you SQL queries. But it doesn't run them. We usually use ready-made SQL clients (like sequelize, pg) to run SQL queries in NodeJS. I developed this package only as a query-builder by making use of the Single Responsibility pattern. It's the job of sequelize or pg to execute the query. Whichever you want!

Let's install the npm package

`npm install @ssibrahimbas/query`

> for yarn `yarn add @ssibrahimbas/query`

Okey, now let's create an index.js file and code it

```javascript
const { Query } = require("@ssibrahimbas/query");

console.log(
  Query.table("users").select("id", "name").where("id", "=", 1).getAll()
);
```

The process here is to create the query that returns the id and name field if id 1 from the users table.

When we run the code we will get the following result:
`SELECT id FROM users WHERE id = '1'`

Better install a driver and give it a try on the real database! It was developed entirely with TypeScript, full support for TypeScript & JavaScript and has +50 unit tests. And the documentation is pretty good too!

I would be grateful if you share your experiences as comments.

[Npm Package](https://www.npmjs.com/package/@ssibrahimbas/query)