teleren/devto huggingface dataset:
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2023-01-27 08:00:26

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259a37a785.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
A new database query walks into a bar.

The server says "Sorry, cache only."
 -->
A Very Potter React App
Published: 2023-01-27 07:28:47

This app has been years in the making! My journey through Flatiron School's Software Engineering program has been an unconventional one, and I want to take a moment to acknowledge that here. I first came to Flatiron some months after my younger sister was killed. During that trying time, I found myself searching for more out of life, feeling that life was too short to just get by. 

After studying the social sciences in college, retraining my brain to be more technical was quite a challenge, and took longer than I originally expected. After all is said and done, getting through this program is my proudest achievement to date, because there were many moments when I didn't think I ever would. That said, let's get into it!

The main function of this app is to show a representation of the Hogwarts sorting ceremony (all recognizable characters and names of the wizarding world of Harry Potter are the property of J.K. Rowling). It also displays all students, as well allowing for the addition and deletion of students.


![Pre-sorting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68ooxdpyw1nrxyvotnht.png) ![Post-sorting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uf3urpcgtqzwkudz3o6y.png)

I enjoyed getting familiar with React, it was more intuitive than anything I've encountered so far, and the framework is both highly customizable and user-friendly out of the box. I know I've only scratched the surface of what it can do! React Router and the Form from "semantic-ui-react" were wonderful tools. No more worrying about including the preventDefault() method! 

In fact, this Form is so user-friendly and handles so much behind the scenes that I actually had some trouble with articulating what makes a "controlled form". With a **controlled** form, the React component that renders a form also manages user input with state. This also allows for us to clear forms upon submit by updating the state.

I always like to highlight one "silly" mistake from each one of my projects, and this one's was forgetting to assign ids to my database items, and wondering why my POST request wasn't working!

https://media.giphy.com/media/xT5LMzIK1AdZJ4cYW4/giphy.gif

![Homer Simpson gif](https://media.giphy.com/media/xT5LMzIK1AdZJ4cYW4/giphy.gif "Doh gif")


It was important to me to include the carousel feature in this app, because I wanted a sense of the queue that students must wait in. This turned out to be trickier than I could have imagined, but [this tutorial](https://mediajams.dev/post/add-a-responsive-image-carousel-to-your-react-app) really helped me out.

This is one app that I'm not quite ready to shelf just yet, I look forward to improving the styling and adding more features, but for now, that's a wrap!

[![React App](http://img.youtube.com/vi/VZTbVi7yVNI/0.jpg)](https://www.youtube.com/watch?v=VZTbVi7yVNI)

See the repo [here](https://github.com/TheCodingBarista/potter-project).
PHP Laravel: How To Resolve: Access Forbidden, 403 error
Tags: php, laravel, livewire, access
Published: 2023-01-27 06:57:19

If you are just getting started with PHP, you would find this useful.
While Working directly with php and laravel and accessing the admin page, you might experience the 403 forbidden permission access error.

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

This error can be caused by different things.

1. The author restricted access to the admin page mostly for security reasons.

2. You need to give the 777 permission in your htdocs. First go into your htdocs folder, then use this command: chmod 777 -R [foldername].

3. This could be as a result of missing or misconfigured .htaccess file. If that is the issue, go to the documentation and get the correct configuration to look like this:

```
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
```

4. It can also be because you have not properly set up your .env file.

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

5. It can also mean you have a folder in your public folder named 'admin'.
- Go to your public folder

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

- change the name of the file. eg, admin_assets or what ever you choose.

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0bnhrqjaukkybbucgtod.png)
Reload your browser and you should be able to view your admin page.

There are other reasons for the forbidden 403 error, however, these are the most common in php Laravel.

Follow me on Twitter Handle: https://twitter.com/mchelleOkonicha

Follow me on LinkedIn Handle: https://www.linkedin.com/in/buchi-michelle-okonicha-0a3b2b194/
ADDING GIT REMOTE ORIGIN
Tags: github, git, remote, programming
Published: 2023-01-27 05:16:01




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jhxtiqq579zhg0i5ktc.png)
Git is a source code management tool used in DevOps. It is a free and open-source version control system used to efficiently manage small to very large projects. Git is a version control system that allows multiple developers to collaborate on non-linear development by tracking changes in the source code.

step 1
Delete the .git directory present in your local environment

`rm -rf .git `
this removes specific files or a group of files from a Git repository. Git rm’s primary function is to remove tracked files from the Git index. Furthermore, git rm can be used to remove files from the staging index as well as the working directory.

so this means that there’s no longer a link between our local working directory and the remote repository

step 2
after removing the .git we are going to then initialize a new git repository by using the command

`git init`
this command creates a blank new repository

so we need to start tracking this files, we start creating versions of it and to do this we are going to use the git add -A command:

`git add -A`
the flag -A command means to track all files present.

after adding our files to our git repository we are going to commit them using the git commit command

`git commit -m 'commit message'`
when we try to push this code to the GitHub we are going to encounter an error


this is because we have not defined the connection between our local working repository and the remote repository in GitHub.

step 3
so here we are going to do just as you see in the recommendation you have been given by git, git really does a lot to ensure that we have a easy time interacting with it

git remote add <name> <url> takes two parameters, name and url.

name parameter means the name of the branch in which your code is going to reside in, most people prefer origin

the url is the http url found in your github repository


copy that code and run in your terminal

`git remote add origin <paste your url here>`
then push your code to your remote repository branch

`git push origin`
if you get an error saying “The current branch main has no upstream branch.” then you need to run this command

`git push --set-upstream origin main`
with that you have set a remote origin and have pushed your code to github!
Psychological safety in software development
Tags: programming, productivity, motivation
Published: 2023-01-27 06:38:30

# TL:DR;

psychological safety is essential for the success of software development teams. By fostering open communication and encouraging a culture of learning and innovation, teams can work more efficiently, effectively, and creatively. By promoting psychological safety, managers and leaders can help their team members to reach their full potential and take the team to the next level.

## Long Version

### What is psychological safety

> Psychological safety refers to the belief that one will not be punished or humiliated for speaking up with ideas, questions, concerns, or mistakes. It is a shared belief held by members of a team that the team is safe for interpersonal risk-taking. This safety allows team members

### Why is psychological safety important

Psychological safety is an essential aspect of any successful organization. Software development organizations are no exception.

One of the main benefits of psychological safety is the ability to foster open and honest communication. When team members feel safe to speak up, they are more likely to share their thoughts and ideas, which can lead to more efficient problem-solving and decision-making. In a field that is constantly evolving and where new technologies and approaches are continually emerging, it is essential to stay up-to-date and adapt to change.

Furthermore, it allows for creativity and innovation to flourish. When team members feel secure in their ability to express themselves, they are more likely to think outside the box and come up with new and unique solutions. In software development, this can be the difference between the success and failure of a project.

However, creating a culture of psychological safety is not always easy. It requires active effort and commitment from everyone on the team, including managers and leaders. One important step is to actively listen to and encourage open dialogue among team members. Managers should also create an environment where mistakes are viewed as opportunities for learning, not as failures.

Another important step is to establish clear guidelines and expectations for communication and behavior within the team. This can include things like setting ground rules for respectful dialogue and providing training on active listening and conflict resolution.

Finally, it is essential to hold every one on the team accountable for maintaining a culture of psychological safety. This includes managers, who should lead by example and model the behavior they expect from their team.
Classless Blog
Published: 2023-09-09 19:04:04

---
title: Classless Blog
published: true
date: 2023-01-27 06:33:28 UTC
tags: 
canonical_url: https://themes.gohugo.io/themes/classless-blog/
---

classless blog This is a hugo-theme for blogs. It is extremly minimalistic and only features standard html - no javascript or custom css. This makes it very accessible, responsive and privacy friendly (there is no tracking at all). To make it also look good a classless-css framework can be included. Demo A demo of this theme (with the default “Water.css” framework) is hosted on Gitlab pages. Choose a framework Some cool classess-css frameworks are:
Blue/Green Deployment with Load Balancer and Auto-scaling in AWS
Tags: aws, devops, automation
Published: 2023-01-27 06:21:31

**What is Blue/Green Deployment?**
A blue/green deployment is a deployment strategy in which we create two separate, but identical environments. One environment (blue) is running the application version which is live and currently serving the production environment. One environment (green) is running the new application version with new changes. Using a blue/green deployment strategy increases application availability and reduces deployment risk by simplifying the rollback process if a deployment fails, also ensuring zero downtime for our release. Once testing has been completed on the green environment, live application traffic is directed to the green environment and the blue environment is deprecated.

**Terminologies:**
Green Nodes - The EC2 Instances which are currently serving the live production environment.
Blue Nodes  - The EC2 Instances with the new changes which has to be released in production.
Blue Load Balancer - The load balancer serving the live production environment.
Green Load Balancer - The load balancer which will be used for Green environment.

**Infrastructure required:**
We need to create a new "Green Load Balancer" and a new target group "Target Group - 2" and attach it to "Green Load Balancer" which forwards the traffic with traffic weight 100%. Also create a new target group "Green Target Group" which we'll be using later.
The current live production environment will have a "Blue Load Balancer" which has a rule that forwards traffic to a target group "Target-Group-1" with traffic weight 100%.
Attach target group "Target-Group-2" to "Blue Load Balancer" with traffic weight 0%. So, the current running environment won't be affected.

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

Deployment Steps:
Step-1: Green Deployment

As part of Green Deployment Job we are detaching the target group which is attached to "Green Load Balancer" auto-scaling group .i.e. "Target Group-2 and we'll attach the "Green target group" which we have created earlier. Later we'll deploy the new version of application in this for green testing.

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

             



Step-2: Blue Deployment

As part of Blue Deployment Job we again deploy the new version of application to "Target Group-2" and switch the weight to send all traffic from this. Detach the "Green target group" from green auto scaling group and attach the one which is at 0% in Blue .i.e. "Target Group-1".

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

          



Step-3: Reduce old blue Instances

The last step after the testing in new version would be reduce the old version instances capacity from old "Blue Auto Scaling Group" and bring it to zero.

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

         

The Blue/Green Deployment is completed.
Planning a coding project in 7 steps.
Tags: webdev, beginners, tutorial, productivity
Published: 2023-01-27 06:10:07

This is how I approached planning my first personal project. Follow along as I go through and complete each step.


# Steps
1. [Pick a Project](#pick-a-project)
2. [Research Similar Projects](#research)
3. [Choose your stack](#choose-stack)
4. [Decide on Features](#decide-features)
5. [Architect Your Project](#architect-project)
7. [Create Timeline](#create-timeline)

## Pick a Project (Be Curious) <a name="pick-a-project"></a>

>  Step 0, be curious. Step 1, act on that curiosity. 


Deciding on a project can be the most daunting task sometimes. A good tip is to take those ideas that send you down the rabbit hole and build around them. A project can encompass many areas of learning also, and skill growth across the board. Not only benefits your career but keeps the passion for programming alive.

For me, It happened as I saw my country Trinidad mentioned in a medical drama. I wondered how many times Trinidad gets mentioned in TV and Movies. As I thought I decided I wanted to make this my own. It would allow me to use my front-end skills, creating user interfaces and data displays. Also, it would grow my back-end capabilities. Through database creation, management as well as manipulating data. In the end, stay curious.


## Research Similar Projects <a name="research"></a>

## Choose your stack <a name="choose-stack"></a>

## Decide Features <a name="decide-features"></a>

## Architect Project <a name="architect-project"></a>

## Create Timeline <a name="create-timeline"></a>
472. Leetcode Solution in CPP
Tags: cpp
Published: 2023-01-27 03:51:42

==============================================================

Description:
Given an array of strings words (without duplicates), return all the concatenated words in the given list of words.

A concatenated word is defined as a string that is comprised entirely of at least two shorter words in the given array.

 

Example 1:

Input: words = ["cat","cats","catsdogcats","dog","dogcatsdog","hippopotamuses","rat","ratcatdogcat"]
Output: ["catsdogcats","dogcatsdog","ratcatdogcat"]
Explanation: "catsdogcats" can be concatenated by "cats", "dog" and "cats"; 
"dogcatsdog" can be concatenated by "dog", "cats" and "dog"; 
"ratcatdogcat" can be concatenated by "rat", "cat", "dog" and "cat".
Example 2:

Input: words = ["cat","dog","catdog"]
Output: ["catdog"]
 

Constraints:

1 <= words.length <= 104
1 <= words[i].length <= 30
words[i] consists of only lowercase English letters.
All the strings of words are unique.
1 <= sum(words[i].length) <= 105
==============================================================

Solution:
```cpp
class Solution {
 public:
  vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {
    vector<string> ans;
    unordered_set<string> wordSet{begin(words), end(words)};
    unordered_map<string, bool> memo;

    for (const string& word : words)
      if (isConcat(word, wordSet, memo))
        ans.push_back(word);

    return ans;
  }

 private:
  bool isConcat(const string& s, const unordered_set<string>& wordSet,
                unordered_map<string, bool>& memo) {
    if (memo.count(s))
      return memo[s];

    for (int i = 1; i < s.length(); ++i) {
      const string prefix = s.substr(0, i);
      const string suffix = s.substr(i);
      if (wordSet.count(prefix) &&
          (wordSet.count(suffix) || isConcat(suffix, wordSet, memo)))
        return memo[s] = true;
    }

    return memo[s] = false;
  }
};
```
=================================================================
#leetcode
#challenge
Here is the link for the problem:
https://dev.to/chiki1601/909-leetcode-solution-in-7j6
Docker container statuses
Tags: docker, containerstatus, containermanagement
Published: 2023-01-27 05:53:19

**Docker container statuses and their meanings are as follows:
**



**created**: A container has been created but has not yet been started.

**restarting**: A container is being restarted.

**running**: A container is running and is being managed by the operating system.

**removing**: A container is being removed.

**paused**: A container has been paused, but is still being managed by the operating system.

**exited**: A container has stopped running, but is still being managed by the operating system.

**dead**: A container has stopped running and is no longer being managed by the operating system.

**Healthy**: A container is running and responding to requests

**Unhealthy**: A container is not running or not responding as expected

These statuses can be used for container management and automation processes. For example, if a container is in the "exited" status, it can be restarted, or if it is in the "dead" status, it can be recreated. Additionally, you can check if the container is healthy or not by using the **HEALTHCHECK** command.
Maximizing Efficiency: Proven Strategies for Boosting Productivity
Tags: productivity, effenciency, webdev, beginners
Published: 2023-01-27 05:47:12

Productivity is a topic that is important to many people, as it can have a significant impact on our ability to achieve our goals and accomplish our tasks. Whether you are a student, an employee, or a business owner, there are many strategies and techniques that you can use to increase your productivity and make the most of your time.

One of the most important things to consider when trying to improve your productivity is to set clear, specific goals for yourself. This will give you a sense of direction and help you stay focused on what you need to do. It is also important to break down your goals into smaller, more manageable tasks, as this will make it easier to make progress and stay on track.

Another key aspect of productivity is time management. This involves being able to effectively use your time to accomplish your tasks, rather than wasting it on unimportant or unnecessary activities. One of the most popular time management techniques is the Pomodoro Technique, which involves breaking your work into 25-minute intervals, with short breaks in between. This can help you stay focused and avoid burnout.

Another important aspect of productivity is organization. This includes things like keeping your work area clean and tidy, having a clear filing system, and using tools like calendars and to-do lists to keep track of your tasks. Being organized can help you stay on top of your tasks and avoid feeling overwhelmed by the amount of work you have to do.

There are also a number of tools and technologies available to help you increase your productivity. For example, apps like Evernote and Trello can help you stay organized and on top of your tasks, while tools like RescueTime can help you track how you are spending your time and identify areas where you might be wasting time.

One strategy that can boost productivity is to learn to prioritize. This means that you focus on the most important tasks first, and then work on the less important tasks later. By focusing on the most important tasks, you will be able to make the most progress and accomplish the most in a given period of time.

Another strategy is to take breaks, it is important to take breaks regularly to refresh your mind, so that you can stay focused and productive. Breaks can be as simple as going for a walk, or even just stepping away from your desk for a few minutes.

In addition to these strategies, there are also a number of other things you can do to improve your productivity. For example, getting enough sleep, eating a healthy diet, and exercising regularly can all have a positive impact on your productivity.

In conclusion, productivity is an essential aspect of achieving our goals and getting things done. By setting clear, specific goals, practicing time management, staying organized, and using tools and technologies to help you, you can increase your productivity and make the most of your time. Remember to also prioritize, take breaks, and maintain a healthy lifestyle for an overall boost in productivity.