teleren/devto huggingface dataset:
Clean Craftsmanship - Book Review
Tags: beginners, programming, productivity, craftsmanship
Published: 2022-08-06 15:00:00

Craftsmanship is the state of knowing how to do something well and is the outcome of lots of experience

# Disciplines

- Test-Driven Development:  Small cycles and tests come first
- Refactoring: The act of manipulating an unstructured code into code with a better structure—without affecting behavior
- Simple Design: 4 rules
- Collaborative Programming: Pair programming, Mob programming, code-review
- Acceptance test: Behaviors are encoded into tests. If those tests pass, the system behaves as specified.

## Test-Driven Development

###  laws of TDD

- Write no production code until you have first written a test that fails due to the lack of that production code.
- Write no more of a test than is sufficient to fail or fail to compile. Resolve the failure by writing some production code.
- Write no more production code that will resolve the currently failing test. Once the test passes, write more test code.
 
**Benefits:**
- No debugging-foo
- Low-level documentation
- Better design
- More Fun
- Lose the fear of change
- Guarantee deployment 

# Standards 

# Ethics
Think fast & Slow - Book review
Published: 2022-08-06 14:58:00

# Introduction
- It's easier to find the errors of others than to recognize own mistakes.
- We have to be aware of **biases of intuition**.
- The **heuristic of judgment** is prone to make mistakes.
- Often we substitute hard questions with easier ones, without even noticing them.

# Systems
We have systems to solve problems:
- **Fast**: Intuition, biases, automatic, low effort
- **Slow**: Logic, puzzles, complex tasks, concentrate

## Section 1
The basic elements of the judgments and the decisions are based on our two systems.

- **Least effort**: We use our intuition to avoid wasting energy
- **The Lazy Controller**: System 1 interprets the world and make almost all the decisions until we are faced with difficult calculations o focus on the task 
- **Associative machine**: Primmingm, repeated fallacies are easier to be accepted
- **Cognitive ease**: Repeated experience, priming idea, and good humor make things familiar, seems true, seems good, look easy
- **Conclusions**: We make decisions with little information,  Positive numbers are more unerring
- **Substitutions**: We change the difficult question for easy ones

## Section 2
Why it's too difficult to think in a statistical way
- **Law of lower numbers**: Confidence when in doubt
- **Anchors**: serve as a tipping point
- **Availability**: available information != probability
- **Representatibility**: impressions != probability

## Section 3
We are prone to overestimate what we know about the world, we have an excess of confidence and an illusion of certainty
## Section 4
Dialog with the discipline of the economy
## Section 5
Two me. One experiment, another remember
Need Help
Tags: programming, career, help, beginners
Published: 2022-08-06 14:26:00

Hello😊, I am Debak Roy a 2nd year computer science and engineering student from India and I am struggling a lot choosing the right path.

Due to my college courses I had to learn C programming Language so I went ahead and learnt it as best as I could after learning it I did a little Competitive Programming for about 3 months at the end of my first year and also started learning C++ as most of the folks in the CP community preferred C++ over other languages. When I got promoted to 2nd year I got to learn about many new things like open source, web development, machine learning and a few more. I knew a little bit about open source already so I watched some videos and it really peaked my interest in open source contribution. But since I only knew C properly finding projects made with C is really hard and I didn't find any😥 I could work on. 
Then I turned to web development as I really wanted to make a cool looking website😎 so I started watching some YouTube videos on the topic. After a few videos I came to realize that I had to learn 3 languages -> HTML, CSS and JavaScript but I was already learning C++ and DSA in C. 

With all the college course pressure and no idea which path to follow I am really confused and I am in need of some help.

--> Also I am saying these with getting a job in my mind.

**Any kind of help is greatly appreciated.**

Thank You for reading and your precious time.
How documentation can improve code quality
Tags: programming, productivity, beginners, codenewbie
Published: 2022-08-06 14:22:29

Hey there, you might be working on many projects and deadlines have caused you to rush the code to production. 

And after a long time when you come back to your project, you might feel lost and your code no longer feels familiar to you. Everything feels messed up and the code no longer makes sense to you.

In this article, I will discuss how we can improve code quality and make it more readable and easily understandable.

When it comes to a good project what things just come to your mind? Something user-friendly, accessible, compatible, and so on makes the quality of the project. But from the code's perspective how would you improve code quality?

- Readable

- Easily understandable

- Useable

How do we achieve this? good documentation

The secret to good documentation is to write it while you're writing the code. This helps ensure that no one needs to make assumptions about how something works, or is calling lengthy meetings to gain a working knowledge of a feature.

Here are five concrete steps you can take to write good documentation before it’s too late. 

###Be precise
Be precise about what the code does and what problem the code resolves. Underline the clear input to the function and the output returned by the function along with a short description of what it does.

###Explain decision
Explain why that code was needed and what impact will it have on the input values. elaborate more in detail on what challenges you ran into and how you overcome them.

###Reference and links
Links to issue tracker or any tools or anything useful that help you to drive the project in the right direction. You can add links to readme files, installation guides, and relevant issues.

###Code snippets
Lastly don't forget to add examples and code snippets. Code snippets help a developer to get the practical perspective of your working model

###Readme
Readme files in your project add up a clear knowledge and high-level understanding of the project from a developer perspective. The readme should highlight the prerequisite for the project and the steps to get started with the project. The readme should explain the clear intention of your project with a summary.

Documentation lives alongside the code as an equal player in our software. It's easy to forget supporting details after even just a short break from your project. To best set up your future self for success, document all the things you’ve established, Infrastructure as Code, or a fleeting future roadmap idea — To best set up your future self for success, document the things! Whether it’s a process you’ve established, Infrastructure as Code, or a fleeting future roadmap idea — write it down! 

You can find best practices at [google docguide](https://google.github.io/styleguide/docguide/best_practices.html)

Happy Coding!...
<img src="https://media.giphy.com/media/KctrWMQ7u9D2du0YmD/giphy.gif" width="100%" />
10 websites That web developers should know
Tags: beginners, webdev, programming, javascript
Published: 2022-08-06 14:11:34

#### Introduction
Welcome to 5+ websites made by developers for developers.

#### 1. Stack Overflow
This is the ultimate place to seek answers for a particular problem you may be having. There are thousands of answered questions,  if you do not see your problem, you can always ask a question. Even pro developers use Stack overflow to seek answers. You can even signup to answer people's questions, some jobs might give you preference for this. Stack overflow also conducts international surveys about web technologies, which you should check out.

#### 2. [frontend mentors](https://www.frontendmentor.io)
This is the place for frontend developers to take challenges and get community feedback and reviews on their projects. Frontend mentor is launching a hiring platform which is good because, if you complete a lot of challenges you get points, that help to build a strong frontend developer profile. In Addition, if you can complete some specific challenge well you can record yourself teaching it, and start a YouTube channel.

#### 3. [GitHub](https://github.com/)
GitHub allows developers from all over the world to collaborate and work together on projects; it utilizes a version control system called git that keeps track of code and allows sharing of code. GitHub makes it easy for you to contribute to open source projects and with GitHub, you can work on projects and have multiple versions of them. When employers check your profile they also check your GitHub, so loaded it up with your best projects.

#### 4. [Dev Docs](https://devdocs.io/)
Dev-docs is a combination of multiple API documentation put together in a clear well-organized fashion.
Dev-docs include  HTML, CSS, JS, JS frameworks, Dart, Django and so much more; it is like an Enclycopidia for almost any programming technology you can think of.

#### 5. [CodePen](https://codepen.io/)
Codepen is an online website that allows you to test and run HTML, CSS, JS, and other frontend web technologies such as React, Sass and etc. Codepen is also like Github, it also allows people to share their projects(which are called pens); see and test cool stuff people have built.

#### 6. [Daily.dev](https://daily.dev/)
Daily.dev is a relatively new developer community for keeping up with developer news, trends, and much more. daily.dev has a very clean interface and you should try it, you may love it.

#### 7. Bouns picks
Check out these other websites that may be worth your time:
8.   [Medium](https://medium.com/)
9.   [hashnode](https://hashnode.com/)
10. [Learning Anything](https://learn-anything.xyz/)

#### Conclusion
Thanks for reading, if you want to support me follow me or buy me a coffee [here](https://www.buymeacoffee.com/alex03). Have a nice day
ModuleNotFoundError: No module named 'kedro.versioning'
Published: 2022-08-06 14:11:18

i have upgraded my kedro to latest version.But i have used kedro.versioning in my project.And latest kedro has no module of this name.Can anyone please suggest anything
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bstr887sb1t0ilyf61q.PNG)
How to connect your flask application to AWS RDS with a CI/CD pipeline
Tags: showdev, python, aws, tutorial
Published: 2022-08-06 14:02:06

In this video I go through:

1. Creating an AWS RDS instance with PostgreSQL
2. Modifying a flask app to connect to the RDS instance
3. Setting up pgadmin so you can interact with the database server locally
4. CI/CD pipeline with GitHub actions

All the code for the video is on GitHub as well, with the link in the video description.

---

This video is the latest in a longer series where I detail the steps necessary to take a local hello-world flask application from your local machine to AWS so you can access via a domain name. [You can find the full playlist here](https://www.youtube.com/playlist?list=PLbn3jWIXv_iZ566tBk_DTIPGY4fUW4qBn)

---

If you find the video helpful you can greatly help me by doing one or all of the following:

* [supporting me on Patreon](https://www.patreon.com/programmingwithalex)
* [subscribing to my YouTube channel](https://www.youtube.com/channel/UC4UApj67YtJq2a2PAzmbQAQ)
* liking and/or commenting on the video
* sharing the video or [channel](https://www.youtube.com/channel/UC4UApj67YtJq2a2PAzmbQAQ) on any platform ([reddit](https://old.reddit.com), [twitter](https://twitter.com/), [discord](https://discord.com/), etc.)
* [starring the GitHub repo](https://github.com/programmingwithalex/aws_ecs_demo)
* [following me on GitHub](https://github.com/programmingwithalex)

---

Any questions or requests, just leave a comment.
What is Python pip Dependency Resolution?
Tags: python, programming, webdev, tutorial
Published: 2022-08-06 13:38:02

When you are using multiple packages in your Python project, these top level packages may depend on a common package with different version constraints. `pip` smartly resolves which version of this common dependancy to install.

For instance, if package `foo` has a dependancy on `bob>=2.0.0` where as `bar` has a dependancy on `bob<=3.0.0`, `pip` will have to resolve which version to download and install to make sure it is able to conform to both the constraints.

This process is known as dependancy resolution and involves an intense process (known as backtracking).

Eventually during the dependancy resolution, conflicts may arise (dependancy hell), due to which your installation may fail. This behaviour is different across the older versions of `pip` compared to the newer ones (legacy and new dependancy resolvers).

Sometimes it may be useful to know the details on how `pip` choses the version when given a list of multiple versions of the same dependency from the dependency tree, how to resolve conflicts when they arise and how to go about finding out conflicts that already exists in the package installed in the current environment/system.

For some folks just knowing what dependancy resolution is (as stated above), might be enough. But for some, the details might be really interesting. If thats the case, then [head over to this article](https://codingshower.com/pip-dependency-resolver-and-version-conflicts/) to have in in-depth encounter :)
Keeping contributions on GitHub after leaving an Organization
Tags: github
Published: 2022-08-06 13:28:16

I followed [the official best practices](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company
) on GitHub.

But in the very first step, this line confused me.😫

> Unverify your company email address by deleting it in your Email settings. You can then re-add it without verifying to keep any associated commits linked to your account. 

That's because I got a warning message like below when pressing the deleting email button as they say.
![a warning message](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sc33jkxzicrhq80bc42m.png)
Do I lose my contributions to the organization once I delete the email address?

## Conclution
Don't worry, you won't lose any contributions only if you re-add the deleted email like they say.😌

Then following their advice, I could keep my past contributions to the organization.


### BEFORE
![before deleting my email address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nus12yk00yc98s2333mq.png)
 
### AFTER
![after deleting my email address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4n05mz17u2bkneo9dqi.png)
PHP Comments
Tags: php, webdev, tutorial, beginners
Published: 2022-08-06 13:20:00

Comments are text within code that won’t be executed when the program is run.

Comments can be useful for explaining how code is working and leaving notes for other developers. PHP supports both single line comments and multi-line comments.

For single line comments, the syntax is // or #. Anything after these symbols on a line is ignored by the PHP interpreter.

For multi-line comments, anything between /* and */ is ignored by the interpreter.
```php
echo "Hi";
 
// This is a single-line comment. This line is ignored by PHP.
 
# This is also a single-line comment. THis line is also ingnored by PHP.
 
/* This is a multi-line comment.
   everything in between these two comment 
   delimiters is ignored by PHP. */
```

If you want to learn more about Web Development, feel free to [follow me on Youtube!](https://www.youtube.com/channel/UCze04H5oeudQ01G9DDj-frA)
How to Make a Responsive Admin Dashboard Using Html CSS JavaScript
Tags: css, javascript, beginners, tutorial
Published: 2022-08-06 13:20:00

{% youtube ECC-7Ogn_rw %}

How to Make a Responsive Admin Dashboard Using Html CSS JavaScript

This video will show you how to build a responsive admin dashboard using html css javascript

[Live Website](https://codewithsadee.github.io/dashboard)
[Github Repo](https://github.com/codewithsadee/dashboard)

---

HI 👋
I'm Sadee (webdev)
In this channel I make videos about Complete Responsive website.
You can checkout my channel 👇

📺 My Channel : [codewithsadee](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g)
🔔 Subscribe : [subscribe now](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g?sub_confirmation=1)

---

🔗 Essential links
-----------------------------
[Download the starter file to practice](https://drive.google.com/file/d/1xZ-ZidcMAvmvBoYLkdh96VfbwjmVoc2F/view?usp=sharing)

---

⏱️ Timestamps
-----------------------------
0:00 - Demo
2:52 - File structure
3:23 - Project initial
8:40 - Header
21:50 - Home section
49:19 - Project section
1:05:10 - Task section
1:17:46 - Footer
1:22:05 - Media queries

---

[![Become a patreon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnjl14kdm5qf08hu5lop.png)](https://www.patreon.com/bePatron?u=62535867)
Kubernetes' minikube uses my Go Lang Project!
Tags: github, go, opensource, kubernetes
Published: 2022-08-06 13:01:00

I am very honoured to announce that my **Go Language Project** [Box CLI Maker](https://github.com/Delta456/box-cli-maker) which makes Highly Customized Boxes for CLI is being used in Kubernetes's [minikube](https://github.com/kubernetes/minikube) which implements a local Kubernetes cluster for Mac OS, Linux and Windows, according to the description.

They are the first major user of my module which has been out for 2-3 years. This is a big achievement for me as it inspires me to make more Open source projects and continue as an Open source contributor throughout my career.

They added my module in PR [`#10818`](https://github.com/kubernetes/minikube/pull/10818) which was merged 1 year ago and it is also used in their [`cmd`](https://pkg.go.dev/k8s.io/minikube/cmd/minikube/cmd) and [`out`](https://pkg.go.dev/k8s.io/minikube/pkg/minikube/out) sub-packages.

Currently, my module has [222 🌟 stars](https://github.com/Delta456/box-cli-maker/stargazers) and [14 📦 importers](https://github.com/Delta456/box-cli-maker/network/dependents?dependent_type=PACKAGE&package_id=UGFja2FnZS0yMjc2NDgzNzMz) which is a good sign and motivation for me to develop on this open source project even further.

I would like to thank the open source and Go Lang community for all the support and love that made this feat possible!
Program On Queue In C
Tags: programonqueueinc, program, queue, c
Published: 2022-08-06 13:00:35

Have you ever seen a program on queue in C? No. Then you are in the right place. Today we will write a program in C that will use the queue data structure.

What is Queue?


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

Full Story here https://hecodesit.com/program-on-queue-in-c/
DeFi Smart Contract Development Company
Tags: defi, defismartcontract, defidevelopment, decentralizedfinance
Published: 2022-08-06 12:25:38

Protocols for decentralised finance (DeFi) are powered by smart contracts. And as a result of DeFi's recent unstoppable expansion, more smart contract development is taking place. The Defi smartcontracts have a higher concentration around the globe, and both entrepreneurs and consumers have equally benefited from them. So this is the main reason for the higher adoption rate of smart contracts.

There are many decentralised business solution providers available in this digital market. And they provides defi development as a separate service that involves the development and auditing process. We at Troniex have DeFi Smart Contract Developers who are experts in developing smart contracts, especially for running DeFi dapps without any vulnerabilities. We provide DeFi smart contract creation on numerous well-known blockchain platforms, including TRON, Ethereum, EOS, and others.

Troniex technologies offers various defi smartcontract services

**[KNOW MORE](https://troniextechnologies.com/defi-smartcontract-development-services-company)**
useCallback the Hook
Tags: reactj, javascript, usecallback, webdev
Published: 2022-08-06 12:23:00

##  My 2 cents on useCallback React hook.

useCallback hook memoizes the callback function passed to it as argument. In simple words it will not create another instance of same function until the value in second argument passed in  the useCallback as array of dependency changes.

Simple way to test whether the passed callback function has changed is by the `set` test. When ever the useCallback hook is called, add the function returned to the set and check the size of the set. if the size has increased that means a new function instance has been created.

When you call useCallback hook with only one argument, that is without dependencies it does nothing. 

{% codesandbox https://codesandbox.io/embed/usecallback-2dmys7?fontsize=14&hidenavigation=1&theme=dark&view=editor %}

I think i have got the basics right. But i am not able to solve un necessary re-rendering of `<ShowProducts/>` component. 

First of all  why it is a issue, it is a problem since i think `ShowProducts` re-rendering is unnecessary because looking at the props i am passing to this components are `arrayOfProducts` and a call back function to update how many times a item has been clicked / selected `updateSelectedCount`.

I understand that every time `selectedCount` changes a new instance of updateSelectedCount is generated so the ShowProducts component re-renders. But my question is why it should bother about the `updateSelectedCount` being changed.

My question is how i can stop re-rendering `<ShowProducts/>` keeping all the functionality intact.
Listening to multiple form controls in Angular
Tags: angular, tutorial
Published: 2022-08-06 12:16:29

Let's say you're in a situation where you're listening to one `FormControl` but you're dependent on the value of another `FormControl`.

There are two elegant (in my opinion) solutions to this that I've come across.

## Solution #1 - use `withLatestFrom`

[`withLatestFrom`](https://rxjs.dev/api/operators/withLatestFrom) is an rxjs operator that, as the name suggests, lets you pull the latest value of whatever Observable(s) that you pipe in.

![Image that shows the following code block `
this.form
    .get('field2')
    ?.valueChanges.pipe(
        withLatestFrom(this.form.controls['field1']?.valueChanges)
    )
    .subscribe({
        next: ([field1, field2]) => {
			// Do something with field1 and field2
        },
    });
`](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9dab42wjlv2yzjwjwcx5.png)

Here I am listening to the stream of `field2` but the subscription is executed only when `field1` has a value.

## Solution #2 - use `combineLatestWith`

[`combineLatestWith`](https://rxjs.dev/api/operators/combineLatestWith) is another rxjs operator that combines multiple streams and executes when any one of the Observables emit a value.

![Image that shows the following code block `
this.form.controls['field2'].valueChanges
            .pipe(combineLatestWith(this.form.controls['field1'].valueChanges))
            .subscribe({
                next: ([field1, field2]) => {
					// Do something with field1 and field2
                },
            });
`](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98p5f49raamr7v1f9idg.png)

## Both are useful in different scenarios

Here is what I mean by that - 

With `withLatestFrom`, the subscription is executed only when `field2` undergoes a value change and `field1` has a value. So if you just change the value of `field1`, nothing happens.

With `combineLatestWith`, the subscription is executed when **any** of the controls undergo value changes. This can be problematic if you're running a lot of code in the subscription execution. So, use it with caution!

The videos below show what I mean.

{% youtube 6HZCGEXtyoU %}

{% youtube VnCs2o7SsiE %}

If you want to try the code for yourself, it's up [here](https://github.com/rajsaha/listeningToMultipleFormControls) on GitHub.