teleren/devto huggingface dataset:
My 1st Hacktoberfest.
Tags: hacktoberfest, opensource, productivity, experience
Published: 2021-11-08 08:31:52

This year was the <b>8th HACKTOBERFEST</b>🍁🍂
 
This was actually my first time attending <b>Hacktoberfest</b>. Despite hearing about it the year before, I chose not to join.
This year I decided to give my best and try it out.

After registering, the search🧐 for an open-source project began.
Because this was my first time contributing to an open-source projects, I was a little bit nervous. I was at a loss as to which projects to choose. Python is my preferred technology stack. I also have a good grip in Front-End. As a result, I began searching for open-source projects involving the Python programming language and HTML,CSS.
I was stunned by the number of project lists that flashed on my screen. However, there is no need to be concerned. <em>"There are still 26 days left,"</em>🤔 I told to myself, <em>"I'll figure it out!"</em>
As a result, I began looking for beginner-friendly GitHub repositories. I also discovered a repository for DSA learning.  When I looked at the repository, I discovered that it was about data structures and algorithms. It also offered a choice of programming languages to use. As a result, I followed the process for creating a contribution file in the repo.
(However, it has been discovered that DSA repos are being <strong><em>EXCLUDED</em></strong> this year.)

Then, in the middle of the month, my <b>Mid-Term Exams</b> kept me occupied🥲. <b>15 days</b> have passed in this manner. The date was <em>October 24th</em>. I completed 6 PRs, of which only <b>1</b> got 'Accepted.' <em>"Man, it doesn't look very easy,"</em> I thought. To be honest I got a little bit disheartened🥺 got a little bit demotivated. Then, by coincidence, I received a message from one of my DISCORD friend who had also attended Hacktoberfest. He informed me that his PRs had been merged. He gave me some advice on how to select high-quality Repositories.

And after many 'research' I was able to sign off the month with <b>5</b> more PRs. And guess what? They all got Accepted🎉.
...
The Hacktoberfest team also had the merged PRs held for 14 days as <em>pull request maturity time</em>.
...
The maturation time was met by all my PRs. And now I'm proud of myself for contributing to opensource projects and successfully completing the <b>Hacktoberfest 2021</b> ✌️🥳.

✨✨✨
<b>MORAL OF THE STORY: </b><b><em>It's never too late, never too late to start over. The result is always worth it!!</em></b>
✨✨✨
Tips in php 8
Tags: php, laravel, programming, beginners
Published: 2021-11-08 08:22:36

Let's talk about some interesting points in php8 :- 

Array unpacking also supports string keys 
```php
$array1 = ["a" => 1];
$array2 = ["b" => 2];
$array = ["a" => 0, ...$array1, ...$array2];
var_dump($array); // ["a" => 1, "b" => 2]
```
The new array_is_list function
```php
$list = ["a", "b", "c"];
array_is_list($list); // true
$notAList = [1 => "a", 2 => "b", 3 => "c"];
array_is_list($notAList); // false
$alsoNotAList = ["a" => "a", "b" => "b", "c" => "c"];
array_is_list($alsoNotAList); // false
```
I hope it helps everyone.
Xcode: Could not attach to pid : “44825”
Tags: xcode
Published: 2021-11-08 07:56:34

##My solution is as follows, set the Xcode settings:
`TARGETS -> Build Settings -> Signing -> 
Code signing inject base entitlements  : Yes
`

##More error info relate about the error:

`Xcode: Could not attach to pid : “44825”
attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
Details
Could not attach to pid : “44825”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
User Info: {
    DVTRadarComponentKey = 855031;
    IDERunOperationFailingWorker = DBGLLDBLauncher;
    RawUnderlyingErrorMessage = "attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)";
}
System Information
macOS Version 11.6 (Build 20G165)
Xcode 13.1 (19466) (Build 13A1030d)
`
Free All-in-one & Real-time Shipment Tracking API
Tags: devops, webdev, programming, opensource
Published: 2021-11-08 07:47:07

You can get real-time shipment status information through this API without creating a tracking command.

```php
<?php
POST: https://www.kd100.com/api/v1/tracking/realtime
Content-Type: application/json
API-Key: Enter your API Key here
signature: MD5(json+API-Key+SecretAccessKey)
{
    "carrier_id": "DHL",
    "tracking_number": "9926933413",
    "phone": "95279527",
    "ship_from": "Toronto, Canada",
    "ship_to": "Los Angeles, CA, United States",
    "area_show": 1,
    "order": "desc"
}

//200
{
  "code": 200,
  "message": "OK",
  "data": {
    "carrier_id": "DHL",
    "tracking_number": "9926933413",
    "order_status_code": 4,
    "items": [
      {
        "context": "Partial delivery",
        "time": "2021-07-09 18:47:17",
        "order_status_description": "Delivered",
        "area_name": "null",
        "location": "null"
      },
      {
        "context": "With delivery courier",
        "time": "2021-07-09 18:47:02",
        "order_status_description": "Out for delivery",
        "area_name": "null",
        "location": "null"
      },
      {
        "context": "Arrived at Delivery Facility",
        "time": "2021-07-08 19:13:10",
        "order_status_description": "In transit",
        "area_name": "null",
        "location": "null"
      },
      {
        "context": "Shipment picked up",
        "time": "2021-05-25 04:57:39",
        "order_status_description": "Accepted",
        "area_name": null,
        "location": null
      }
    ]
  }
}

//60101
{
    "code": 60101,
    "message": "No result found"
}
?>
```
My second week in taskforce4.0
Published: 2021-11-08 07:36:26

Being a software developer requires you to be very responsible for your tasks and to keep the team engaged. My second week in the task force was quite intensive but on top of that, it was very productive.

In this week we have learned  GIT and what it means for teams to collaborate on the same project and keep track of the changes being made.

Not only that we have learned git but also we have learned how to use git productively and efficiently. We have been introduced to different gitwork flows that software development teams can use to drive projects towards achieving goals. and also git is not enough alone but when combined with other third-party software providers such as Github and Gitlab you can make the work easy for the team and other departments like the operations department. 

With CI/CI pipeline setup for the project, you can achieve much more where your project has to go through different stages for the features being developed to be considered ready for production. this concept of CI/CD pipeline helps the process to be automated so that the tests and containerization process can be automated. This whole process is what we call the DEVOPS process.

We have also learned the concept of software documentation. where we have seen that documenting your software is important not only for you but for every stakeholder involved.
Overall this week was amazing and also educative. Being in a team that follows best practices is much more important because you have the workflows each and everyone in the team is knowledgeable of these practices.

I would like to conclude by saying that every software development company should adopt these best practices because they are time-saving and professional as well.
Project Management: Static Analysis Tools
Tags: contribution, formatter, linter, rebase
Published: 2021-11-08 07:16:51

Static analysis tools operate on our source code (static) vs. running program (dynamic). They help us maintain the quality of our source code by fixing formatting issues, spotting suspicious coding constructs, or alerting us to common errors. Here, I would recommend IDE ***Pycharm*** for Python project, this IDE is integrated with a lot of support of style checks.

To do this work, I started with a new branch `git checkout -b staticTool`, and created a `contributing.md`. Then, the **Black** library in **Python** was used for formatting and **Pylint** was used for linting.

After all these commits, using 
```shell
git rebase main -i
git log
git commit --amend
```

Then I squashed the last 3 commits (squash) into the first one, updated the first commit message with `--amend` option. At this stage. This branch was completed and ready to be merged to `main` with

```shell
git checkout main
git merge staticTool
git push origin main
```

In summary, the final commit is [here](https://github.com/Qiwen-Yu/TextHTMLPress/commit/d6119cb342b6895a8d522e9451c36488345c2e12).

From my point of view, the most useful part is the `Add a Linter`. With **Pylint**, the program can have a better code patterns and avoid making silly mistakes.
Dates in JavaScript, design tips, Typescript, NFTs, and more

My 10 favorite Tech Twitter tweets from this week:
Tags: javascript, webdev, beginners, programming
Published: 2021-11-08 07:10:38

_If you found value in this thread you will most likely enjoy my tweets too so make sure you follow me on [Twitter](https://twitter.com/VladPasca5)  for more information about web development and how to improve as a developer. This article was first published on my [Blog](https://vladpasca.hashnode.dev/)_

All you need to work with dates

By VittoStack 

{% twitter 1455798598692638723 %}


Web developers are not the best at design. But George is here to help

By _georgemoller 

{% twitter 1455552239368654851 %}


Great introducing to Typescript

By SimonHoiberg 

{% twitter 1455085599166275587 %}


Learn CSS position the right way

By Prathkum 

{% twitter 1455779144369782787 %}


Great list of websites you can use as a developer

By csaba_kissi 

{% twitter 1455122114265092097 %}


Web design made simple

By study_web_dev 

{% twitter 1456202321273163776 %}


Great ways to make passive income as a developer

By sunilc_ 

{% twitter 1455966196415741958 %}


List of free certificates for developers

By denicmarko 

{% twitter 1455125936807030791 %}


The only introduction to NFTs you'll ever need

By heyOnuoha 

{% twitter 1456245987320676362 %}


Blogging is a great way to learn and earn as a developer without actually writing code

By Insharamin 

{% twitter 1455137122386472961 %}


_I hope found this useful and if you did please let me know. If you have any questions feel free to DM me on  [Twitter](https://twitter.com/VladPasca5)._let me know. If you have any questions feel free to DM me on  [Twitter](https://twitter.com/VladPasca5)._
Everything About Django - 3 (Models and Migrations)
Tags: python, django, webdev, beginners
Published: 2021-11-08 07:03:26

This is the **third blog** of the series **Everything About Django**. In this article we are going to study about **Models** and **Migrations**.

## What are Models?
* Models are the database tables.
* Django uses ORM (Object Relational Mapping) for models.
* Each model is a subclass inherited from `django.db.models.Model` class.
* Every attribute in Django Model specifies a field in the database table.

## What is ORM?
* ORM means Object Relational Mapper, one of the most powerful feature of Django.
* Django's ORM is just a pythonical way to create SQL to query and manipulate your database and get results in a pythonic fashion.
* How wonderful this is, you need not type SQL and do all the db stuff.

## How to create a model?
Let's take an example to see how a model is made.
```
from django.db import models
class Student(models.Model):
    name = models.CharField(max_length=100)
    roll = models.IntegerField()
    address = models.CharField(max_length=200)
```
This way I have created a table Student with the following attributes : name - Char, roll - Integer, address - Char.
In SQL we do this by :
```
CREATE TABLE Student
(
roll int,
name varchar(100),
address varchar(200)
);
```
So you see how easy and pythonic this is with Django.

## What is a migration?
* Once we have defined a model, it's just a python code not yet reflected in our database, no table is created so far, until we migrate this to our database.
* Once our models is defined, we need to run `python manage.py makemigrations`. See the example bro.
![makemigrations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll3m8xslaqsknar7kpcq.png)
* Here core is the app in which my models is defined. It creates a folder in my app `migrations`.
![migrations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fph7sm29z6vypjbqn59i.png)
* With every makemigrations, a file is created like `0001_initial.py` which contains the information about our reflected changes in the database, which looks like this.
![0001_initial.py](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cm1yyxjki16yuyqza18q.png)
This is a internal file created by django to reflect changes in the db.
* Once we have made migrations, we need to actually reflect them in the database to create and modify the table. For this run, `python manage.py migrate`. This command will run the latest migrations made and reflect their changes.

I will create an article on tips while creating a model, where I will define all the attributes, functions one should define in a model.
## THANK YOU
You can find me on : [Priyanshu Panwar](http://priyanshu-panwar.github.io/) | [LinkedIn](https://www.linkedin.com/in/priyanshu-panwar)

Please feel free to comment for any help or topic I should write an article on.
How to be a Bad Developer!?
Tags: javascript, python, programming, webdev
Published: 2021-11-08 06:52:26




Hello, everyone  [Nomadev](https://twitter.com/thenomadevel)  here, back with another blog on tech. I think all have read about the Traits of a Good Software Engineer many times before.  But here is the RECIPE TO MAKE YOU A BAD PROGRAMMER

## For becoming a bad programmer you should  


## - Only watch tutorials, Never code!

The first step to be a bad programmer is to watch tutorials WITHOUT practicing by coding them.

You need to believe you will understand concepts just by seeing them, that's the most important thing one should start with.



## - Code more, think less

A bad programmer will first code then think of how to go about it. Terms like pseudo-code, mind mapping are none of their business. When presented with a problem, the bad programmer will start thinking about solutions first. Debugging is for the birds. And a truly bad programmer will actually put that solution in without actually verifying the problem first. By doing so, he will snag the prestigious “Fastest time from bug filing to actual check-in time into the source repository” award. 



## -  NOT following DRY & KISS

DRY - Don't Repeat Yourself
KISS - Keep It Simple Stupid

A bad programmer will extent simple programming into unnecessary long code, not using functions/structures is a plus.



## - Memorize syntax, not the logic

The key ingredient to becoming a bad programmer is memorizing code.
A bad programmer will never take the effort of understanding the logic that goes into the process



## - Learn LANGUAGES, not CONCEPTS

A bad programmer just wants to go language to language and not to learn important concepts like algorithms, frameworks, complexity, etc
Week two Experience in task force 4 at Awesomity and Code of a africa
Tags: awesomity, codeofafrica, taskforce
Published: 2021-11-08 06:34:52

Hey my good people,

As I promised in my previous post, today I will be also sharing with you how my second week at #awesomity && #codeofafrica has been.
To start with, I would say it was a very informative and demanding week in which I learned a lot(as always😍).

I would categorize skills gained into two categories, **soft skills** and **technical skills**. And let's talk about those skills starting with technical skills and I will end soft skills.

### Technical skills.
During the second we had an interesting discussion around software development and best practices with our one and only Yannick (CTO at #awesomity), where we talked about some interesting topics bellow.

#### Git workflow
We looked at how and why a team working on one same project, should use git as tool to help them keep track of every single changes made and different versions of codes they have. We went farther by discussing what are the best practices while working  with git.

#### CI/CD
CI/CD for those who don't know stands for Continuous Integration, Continuous Delivery and Continuous Deployment. It is a method to frequently deliver apps to customers by introducing automation into the stages of app development. for the seek of time you can read more about it [here](https://www.redhat.com/en/topics/devops/what-is-ci-cd)

#### DevOps
DevOps is an emerging technology that is introduced in agile development that helps a team working on a project to delivery a good and quality software. I would recommend reading more about the topic its an interesting topic to know. 

### Soft Skills
We also had some interesting discussion around **Values** and the importance to have them as a person and as well as team, we also talked about **Critical Thinking** which was a really an  interesting topic where we learned a lot on how to approach a problem while trying to come up with a solution for it.   

As last week ended our week with a 5 min presentation about what we learned the whole week, expect that this time round it was a personal presentation.

To end with, I would like to thank you for reading this and hopping to see you again next week sharing as I will be sharing this week's experience. I am also excited to see what this week brings😎, see you.
Add Git branch name to each commit
Tags: git, githook, gitbranchname
Published: 2021-11-08 06:12:42

![git hook image](https://cdn-images-1.medium.com/max/800/1*nIvskGIC9GjbAY0Kf-39hg.png)

## Overview
This story is about how to utilize git hooks in order to add branch name to each commit. I have used the script from this article and modified it to my needs to minimize the restrictions.


## Details
Follow the instruction given below to enable it:

* Move inside your repository's home directory.

* Rename the `.git/hooks/prepare-commit-msg.example` to `.git/hooks/prepare-commit-msg`

* Change file permissions:

```bash
sudo chmod 755 .git/hooks/prepare-commit-msg
```

* Paste the script given below in that file

```bash
#!/bin/bash
#
# Automatically adds branch name and branch description to every commit message.
# Modified from the gist here https://gist.github.com/bartoszmajsak/1396344
#

# This way you can customize which branches should be skipped when
# prepending commit message.
RED="\033[1;31m"
GREEN="\033[1;32m"
ORANGE="\033[0;33m"
NOCOLOR="\033[0m"

if [ -z "$BRANCHES_TO_SKIP" ]; then
  BRANCHES_TO_SKIP=(master production staging main)
fi

AUTHORINFO=$(git var GIT_AUTHOR_IDENT) || exit 1
NAME=$(printf '%s\n\n' "${AUTHORINFO}" | sed -n 's/^\(.*\) <.*$/\1/p')
# Regex to check the valid branch name
VALID_BRANCH_REGEX="(^(feature|hotfix|bugfix|release|dev|improvement))|^([A-Z]+\-[0-9]+)$"

# Get branch name and description
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')

# Branch name should be excluded from the prepend
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$")

# A developer has already prepended the commit in the format BRANCH_NAME
BRANCH_IN_COMMIT=$(grep -c "$BRANCH_NAME" $1)

# check the branch name is valid or not
if [[ "$BRANCH_NAME" =~ $VALID_BRANCH_REGEX ]]; then
  # if face any error in mac then run chmod u+x .git/hooks/prepare-commit-msg and restart your terminal
  if [ -n "$BRANCH_NAME" ] && ! [[ $BRANCH_EXCLUDED -eq 1 ]] && ! [[ $BRANCH_IN_COMMIT -ge 1 ]]; then 
    sed -i.bak -e "1s/^/[$BRANCH_NAME] /" $1
  fi
else
  echo -e "\n${RED}Please correct the branch name${NOCOLOR}"
  printf "\nBranch Name not as per the defined rules like:  "
  echo -e "${GREEN}dev, hotfix, bugfix, release, dev, improvement, hotfix-102\n"
  echo -e "${ORANGE}You cannot push in these branches directly: ${BRANCHES_TO_SKIP[@]}\n"
  echo -e "${ORANGE}Current BRANCH_NAME: ${BRANCH_NAME}"
  echo -e "\n${RED}Oh, please stop. I cannot allow you to commit with your current branch: ${BRANCH_NAME}${NOCOLOR}"
  exit 1;
fi
```

* After these changes, the branch name will be added to your every commit and it will look like this

![commit message](https://cdn-images-1.medium.com/max/800/1*CkQeX9JBiXHgO5AoD-7TeQ.png)

* It will not allow you to commit directly to the following branch

1. master
2. production
3. staging
4. main

* You can change these restrictions based on your requirements.

## Final Thoughts

I hope you would love this story and let me know if anything can be improved.


![thank you](https://cdn-images-1.medium.com/max/800/1*G3nO1-1vugfSYqX4LGXjyw.png)
2 weeks down, 4 to go
Tags: codeofafrica, awesomitylab, taskforce
Published: 2021-11-08 06:07:22

You know how movies paint developers as nerds writing codes wearing hoodies in the dark..it makes sense right? well, wrong (besides the nerds part). We kicked off another week with a presentation skills session, if you re not that advanced in your career to present in front  of a large audience yet, at the very least you need skills to present  to tech leads or PMs and that does not come bundled with the net ninja programming tutorials  and I am glad we had that.

The came the fun part, I consider it fun when I start working on things I have more or less no experience with like project containerization and setting up CI pipelines because that's really where new knowledge is acquired and I am a sucker for learning new things...also that's when you internally be like "ooh i still have a loooooot to learn" which is key to keep your mind hungry.

Values. What are we really without values? I learned that the more values you have in common with someone (or an organization ) the more the collaboration will likely be smooth and that is so true because think of you and your friends and why you get along so well...yeah exactly

Also shout out to Olaf for a critical thinking session(on a Saturday) with us as software engineering = solving problems = critical thinking. my math never been good but I am sure that means without critical thinking skills that makes u less of a SE.

Week two was challenging as it is mostly the case when you are doing things for the first time but as the internet says "if u are not occasionally getting your b*** kicked u re doing it wrong "

Week 3 here we come :))