teleren/devto huggingface dataset:
need assistance with DRF and React project 
Tags: djangorestframework, react
Published: 2019-03-26 09:51:35

---
title: need assistance with DRF and React project 
published: true
description: 
tags: Django Rest Framework,Reactjs
---

How can store a quiz under its category like js Quiz must stored under JS category whenever i click on Js category it should display it child js test and how i can tweak my Drf Api so that i can show a specific category of specific list of test categories for a specific candidate like a Python candidate will only able to see test of python
🏕️ The Campfire : a feature analogy
Tags: feature, concept, explainlikeimfive
Published: 2019-03-26 09:22:48

---
title: 🏕️ The Campfire : a feature analogy
published: true
description: Need to explain what is a dev feature ? Here you go !
tags: feature, concept, explainlikeimfive
cover_image: https://thepracticaldev.s3.amazonaws.com/i/v8l6li8lrvcuenycubha.jpg
---

A few days ago, a friend was asking me why some of the projects I was participating did not finish immediately, or that I sometimes came back to “tweak” them, so I did an analogy that I will share.

First of all, you have to see a project like a campfire: the more we code the basic structures, the more wood we add to our fire. This is what we call an MVP: minimum viable product; the heart of the idea of the project in which we participate.

## The larger the campfire, the more contributors around it

As we tend to add features to our project, the critical mass of this fire cannot spread to infinity without creating a mountain of wood and fire that will not be maintainable in the long run without exhausting all the contributors and burning the forest around (burning the resources of the company).

 ![Wrooosh](https://thepracticaldev.s3.amazonaws.com/i/51booqgfkbpuwd1j5q3t.jpg)

This is why we have to make small campfires (or features) around to always keep the same number of contributors but in the same place, having cut out the number of operations per small camp of x contributors (say for 10, 2 to 5 contributors, so that FnContributors <= 50% of TotalContributors).

Thus, a feature that is being developed today must be similar to a small campfire near the main camp: it must operate independently, the other small fires do not necessarily need the big one (but can improve it), if a relation between two campfire is necessary, it must never impact the main fire by posing a risk of extinction.

It’s time to go melt some marshmallow now, have fun! 🔥

 ![Small campfire](https://thepracticaldev.s3.amazonaws.com/i/qr22g8gb2cvammms3d2i.jpg)
Show off your swag 😎
Tags: discuss, swag, showoff
Published: 2019-03-26 09:14:24

---
title: Show off your swag 😎
published: true
description: Show the latest dev swag that you received in a giveaway or bought yourself!
tags: discuss,swag,showoff
---
![](https://thepracticaldev.s3.amazonaws.com/i/s3os09te6c4mhsqe6a4c.jpg)

This month I receievd an awesome sticker pack from Dribbble and Swag Box from Stackoverflow and I love it <3

![](https://thepracticaldev.s3.amazonaws.com/i/t6l6hy90be3nuqfsf09j.jpg)

Share your Dev Swag in comments below...
What is pseudocode?
Tags: beginners, tutorial, learning, devtips
Published: 2019-05-31 10:01:22

---
title: What is pseudocode?
published: true
tags: beginners, tutorial, learning, devtips
canonical_url: https://www.codetips.co.uk/beginner/what-is-pseudo-code/
---

> Pseudocode is the representation of code.

 ![What is pseudocode?](https://images.unsplash.com/photo-1516894039413-0ee3187dbd9d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ)

Pseudocode is used when you are trying to explain a programming concept, or to describe how you plan on implementing some functionality in your program, without the constraints of making it [syntactically](https://codetips.co.uk/beginner/what-is-syntax/) correct.

Take almost any previous article on this site and you will find pseudocode. In [What are loops](https://codetips.co.uk/beginner/what-are-loops/) we introduced the concept of a list and a loop:

<!--kg-card-begin: code-->
```
-- list --

recipients = James, John, Jimmy, Jane, Jake, Jemma, Joanne, Juliet, Jessica, Josh

-- Loop --

for $name in recipients {
    Dear $name

    .... body of letter ....
}
```
<!--kg-card-end: code-->

As far as I know, neither of these are valid in any programming language, by which I mean if you tried to use them, as they are written above, you'd get errors and the program wouldn't run.

They were added to the articles because it makes the process of explaining much easier. They say a picture says a thousand words, I think the same is true for code examples. Imagine reading all of the previous examples without the pseudocode examples, would you have understood them?

You may now be wondering why use pseudocode at all. If code examples make the process so much easier, why not just write syntactically correct code that can be executed? There are a lot of programming languages out there. We could explain these concepts in one programming language, but then it would only work for that one language. We could explain these concepts in all of the programming languages, but then these articles would become very long and very repetitive.

So we show you the concepts using pseudocode so you can focus on the concepts, not one specific programming language implementation.

> Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.
A bit more about that first key relationship…
Tags: dailywriting
Published: 2019-04-09 01:27:30

---
title: A bit more about that first key relationship…
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/a-bit-more-about-that-key-relationship/
---

Last week I told you there were 4 key relationships to attend to when you’re taking over a new team.

_You can read the first post here: [Key One: The relationship with yourself](https://dev.to/justzeros/priorities-for-a-new-development-manager-the-four-keys-5d6-temp-slug-9393687)_

In my excitement, I forgot to mention an important element of the first key.

**You’ve got to stop managing, and start leading.**

The first time I took over a new team I sat down with the past Team Lead, outlined their process on the whiteboard, and took pictures of it. Then I spent a few hours getting it into a Visio flowchart.

Next I met with the team and walked them through it. _“This is how you do things, right?”_

They silently nodded their heads.

_“Great”_, I thought, _“we’re all in agreement.”_

A month later I’m sitting with my boss, frustrated that nothing’s gotten done.

_“It’s easy to see how the process works, and the last Team Lead is the one who gave me the process. Yet nothing’s getting done.  **I don’t understand why they won’t just do the process as it’s laid out?”** _

Thus, I used the tried and true management approach of _calling another meeting to discuss the process._”

This meeting was more pointed, and I was less, ahem, _graceful_.

_“People, this isn’t that hard. All we have to do is follow the process and we’ll ship on-time. You’ve got to trust the process. I assume the problem is that you don’t really understand it, so let’s go through it again…”_

Finally, Gus spoke up from the back.

_ **“Boss, saying we’ll be successful ‘if we just use the process’ is like telling a relay team they’ll win the big race if they ‘run fast and pass the baton.’ It seems helpful and smart, but it’s actually neither. Your process looks good on paper because that’s the only place it actually exists: on paper. The real world is more complicated.”** _

Leaving that meeting I realized that I’d been trying to manage the process, not lead my team.

Instead of building followers and inspiring loyalty, I’d looked like a clueless boss and created resentment.

Which was, of course, the opposite of who I wanted to be.

**Final thought**

Yes, you have a process. We all do.

Yes, it’s important to understand it and use it. It’s a tool that your team needs.

But your job is not to manage the process – it’s to lead the people.

Once that sinks in, you’re ready for the second key, which is coming soon.

Be a better boss than I was back then – your team will thank you.

Marcus

The post [A bit more about that first key relationship…](https://marcusblankenship.com/a-bit-more-about-that-key-relationship/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
Why Coding?
Tags: webdev, begginer, career
Published: 2019-03-26 07:52:39

---
title: Why Coding?
published: True
description: My Developer Story
tags: #webdev #begginer #career 
---

Check out my latest blog post here 

https://medium.com/@jeffreyuvero/why-coding-83a4533f5aa5?source=friends_link&sk=4b4eff37214194697d0dedce623f7eac
How to shorten the bash shell prompt
Tags: ubuntu, terminal
Published: 2019-06-25 16:28:33

---
title: How to shorten the bash shell prompt
published: true
tags: ubuntu,terminal
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/1*cds9VJJfwti7gLY3HTg6-w.png)

So sometimes it happens that you are working on command terminal and you navigate inside a directory then again in the inner directory and so on until half of the screen width is filled with prompt string. Example below.

```bash
> _rana@Brahma: dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8 $ ls_
```

Now I want to display just the last directory in the terminal prompt string so that I am left with enough width space to execute lengthy commands.  
   
For this, We need to change the prompt string from the `.bashrc` file. Below are the steps -  
   
 1. Go to your home directory.  
 2. Open `.bashrc` file.  
 3. Search for string ‘PS1’. To search quick open the file in vi and type /PS1 and hit enter.  
 4. now you will find below code. (or similar to it) [I am working on Ubuntu 16.04]

```
> _if [“$color\_prompt” = yes]; then  
> PS1=’${debian\_chroot:+($debian\_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\_ **_w_** _\[\033[00m\]\$ ‘  
> else  
> PS1=’${debian\_chroot:+($debian\_chroot)}\u@\h:\w\$ ‘  
> fi_
```

5. Replace the ‘w’ (highlighted in bold) with capital W. So your new code will be.

```
> _if [“$color\_prompt” = yes]; then  
> PS1=’${debian\_chroot:+($debian\_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\_ **_W_** _\[\033[00m\]\$ ‘  
> else  
> PS1=’${debian\_chroot:+($debian\_chroot)}\u@\h:\w\$ ‘  
> fi_
```

6. Restart the terminal and navigate inside any directory. You will see just the last directory in teminal prompt.

```> _rana@Brahma: dir8$_```


Keep Learning.


- [How to start with Python Programming - A beginner's guide](https://www.pythoncircle.com/post/671/how-to-start-with-python-programming-a-beginners-guide/)
- [How to host django app on pythonanywhere for free](https://www.pythoncircle.com/post/18/how-to-host-django-app-on-pythonanywhere-for-free/)
Abraham Kiswani 
Tags: abrahamkiswani
Published: 2019-03-26 03:55:18

---
title: Abraham Kiswani 
published: true
description: About Abraham Kiswani    
tags: #abrahamkiswani
---

Abraham Kiswani has been in the security field for over 20 years.  He graduated from Alan B Shepard high school in 1987 and  has been a taser certified instructor for 5 years . He has managed a company with over 1100 people in it.He works with many charities, contributing to lower income families. During the holidays his company has given away over 3000 Fresh turkeys yearly for the past 9 years. He also has donted to the Tuskegee next project. Abraham loves antique muscle cars. He likes to scuba dive, skydive, bungee jump, and he loves water activities such as wave runners and boating.
Review of book “PHP 7 Data Structures and Algorithms”
Tags: php
Published: 2020-01-06 21:38:09

---
title: Review of book “PHP 7 Data Structures and Algorithms”
published: true
date: 2019-03-26 03:37:35 UTC
tags: PHP
canonical_url: 
---

I choose to read this book on [PHP 7 Data Structures and Algorithms](https://www.packtpub.com/application-development/php-7-data-structures-and-algorithms) written by Mizanur Rahman because I wanted to get a better idea about computer science topics like algorithms and thought it would be good to learn with a programming language I’m familiar with. However, the book also helped me gain a better knowledge for instance on how arrays in PHP work. A lot of data structures can actually be implemented with PHP arrays thanks to their flexibility although in many cases one is better served with classes found in the Standard PHP Library (SPL).

I especially liked the chapter on “Applying Recursive Algorithms” as it came with a number on practical examples on how to for instance create a menu using a recursive function.

It was interesting to read about the different kind of sorting algorithms and exploring search options. The author does compare the performance gains between different algorithms, but I was missing examples on when to use which.

I now have a basic understanding of what linked lists, heaps, graphs, trees and other data structures are and using various algorithms for faster sorting, etc. The book went into quite some detail, so I skipped a lot of it, but if necessary I’ll know where I can find the code.

On the whole, this is a good book for PHP developers who want to learn more about computer science topics or who already know about them, but want to get some idea how to best implement them with PHP. At some point I’ll probably grab another, more general, book to deepen my knowledge about data structures and algorithms though.
WordPress Recent Posts Markdown Generater
Tags: wordpress, showdev, feedback
Published: 2019-03-26 02:54:12

I made another thing. This time it's a WordPress plugin to generate a Markdown List of Links to your most recent posts. I built it specifically for linking back to your WordPress hosted blog posts at the end of your Dev.To (or other markdown supported) posts. 

# [Check It Out](https://wordpress.org/plugins/recent-posts-markdown/)

Or you can install it through your WordPress back end. Just search in the Add Plugins screen for `Recent Posts Markdown Generator`. 

Once installed you just go to Tools > Recent Posts Markdown. Select your post type and how many posts you want to link and BAM! A list of links to your most recent posts. 

# Sample Output:

```
## Recent Blog Posts
* [How To Measure Angles In Illustrator](https://harnerdesigns.com/blog/measure-angles-in-illustrator/)
* [Optimizing My Stars – PHP Generated SVG vs Canvas](https://harnerdesigns.com/blog/optimizing-my-stars-php-generated-svg-vs-canvas/)
* [Unlimited Private GitHub Repos for Free Accounts](https://harnerdesigns.com/blog/unlimited-private-github-repos-for-free-accounts/)
```
---

## Recent Blog Posts
* [How To Measure Angles In Illustrator](https://harnerdesigns.com/blog/measure-angles-in-illustrator/)
* [Optimizing My Stars – PHP Generated SVG vs Canvas](https://harnerdesigns.com/blog/optimizing-my-stars-php-generated-svg-vs-canvas/)
* [Unlimited Private GitHub Repos for Free Accounts](https://harnerdesigns.com/blog/unlimited-private-github-repos-for-free-accounts/)

---

# Let Me Know What You Think!

Thoughts, concerns and feedback are all welcome! Check out the [code](https://github.com/harnerdesigns/recent-posts-md) and let me know if this is something you could see yourself using!
The myth Angular is in decline
Tags: angular, javascript, frontend, discuss
Published: 2019-03-26 02:40:07

Last year the COO of the NodeJS Foundation Laurie Voss got [on stage at JSConf](https://www.youtube.com/watch?v=mSQh0gcDXkc) and proclaimed npm downloads of Angular had peaked and were in decline, backed up by data in [this blog post](https://blog.npmjs.org/post/180868064080/this-year-in-javascript-2018-in-review-and-npms). The NodeJS Foundation had conducted a survey of 10 million users and combined that data with metrics they collected from downloads of popular frameworks. 

I thought it was a bunch of hogwash then and still do now. This is why. Downloads of @angular/core and @angular/cli, the two most essential packages for Angular development are increasing over time!

The package Angular engineers rely on for development (@angular/core) has over 2.2 million weekly downloads and growing. 

![](https://thepracticaldev.s3.amazonaws.com/i/dglka9rfdxqrncluhvzk.png)

The @angular/cli package sees ~220,000 less downloads a week but the weekly downloads are also increasing. This is an impressive adoption rate for a tool a large majority of Angular developers rely on to build Angular.

![](https://thepracticaldev.s3.amazonaws.com/i/ew46rpxs195w4dhz15tp.png)

Since April 2018 weekly downloads of the @angular/core package have increased by ~1.5 million, roughly a 360% jump in one year.

It is worth noting the weekly downloads of React, Angular, and Vue are all seeing a healthy bump over the past year. 

React is the most popular JavaScript library with over 6 million weekly downloads. React has roughly a 260% increase in weekly downloads since April 2018. 

![](https://thepracticaldev.s3.amazonaws.com/i/510urwna3lo7gtqgs3is.png)

Vue has climbed in popularity to over 1 million weekly downloads in March 2019, enjoying a ~320% increase in weekly downloads since April 2018. 

![](https://thepracticaldev.s3.amazonaws.com/i/rtf7s4wgdyo9spbgaq7y.png)


If there is any trend regarding front end frameworks it is the JavaScript community is consolidating around the 3 major frameworks.  

It seems the NodeJS Foundation weighted the downloads against the legacy AngularJS project This could lead to a problematic picture of Angular adoption.

![](https://thepracticaldev.s3.amazonaws.com/i/dwk9l26stgqng3b79qdi.png)

It is important for organizations with so much influence in the development community to get the numbers right!

I find it quite ironic the @angular/core package has seen more growth in weekly npm downloads than React or Vue over the past year, considering a major player in the JavaScript community is getting on stage saying Angular is in decline. React is indeed the most popular library out there for web development and should be celebrated for its modular design, but don't count Angular out just yet! Angular is still an incredibly popular solution for front end web development and will probably remain so for the foreseeable future. 

P.S. Congrats to Vue for reaching over 1 million downloads on npm in March!
Getting Started with Web Development
Published: 2019-03-26 01:19:40

---
title: Getting Started with Web Development
published: true
description: 
tags: 
---



# Intro To Web Development # 1
# Activity 1 - _Getting Started With HTML_
---
---
![Lets do this Gif!](https://media0.giphy.com/media/zaezT79s3Ng7C/giphy.gif?cid=3640f6095c8e75b84d66374b32a9e0b6)
#### Making our first HTML Elements
---
---
<br>
<br>

# Activity 1 Instructions 
#### (Click `Markdown` Button for Syntax Highlighting)

### 📚 <a href="https://cdn.glitch.com/d2a8ee19-9bd5-4d21-93b5-0f2aa13d5a60%2FTables.pdf?1552967029828" target="_blank">Lesson 1 Tutorial Video</a> 📚

### 🚀 <a href="https://www.youtube.com/watch?v=20NPq5sk1H0" target="_blank">Lesson 1 Activity Video</a> 🚀 

### ✍️ <a href="https://cdn.glitch.com/8ca21e61-1af2-4c16-86ef-f58b2ebed822%2FHTML_1_Activity.pdf?1552844860749" target="_blank">PDF Print Instructions</a> ✍️

<br>
---
---



---
# 1) Create Header Element
---
---
### In the index.html section of the page we will begin to create very basic texts and list. Type in the following after the body tag

```html
<header>
  <nav>
    <a href="#">Home </a>
    <a href="#">About</a>
    <a href="#">Books</a>
    <a href="#">Contact</a>
  </nav><!-- End of nav tag -->
</header>
```
<br>
<br>


---
---
# 2) Create Section Element
---
---
### After typing in the header part, begin writing more content for the web page

```html
<section>
  <h2>Popular Books</h2>
  <ul>
    <li>Android Phones<p>Description of Android phones books</p>
    </li>
    <li> Arduino<p>Description of Arduino books</p>
    </li>
    <li>JavaScript<p>Description of JavaScript books</p>
    </li>
  </ul>
  <p>The website will describe the books available at the Library</p>
</section>
```
<br>
<br>


---
---
# 3) Create Footer Element
---
---
### After typing in the popular books section, create the footer(bottom of page)

```html
<footer>
  <h3>Queens Public Library</h3>
  <nav>
    <a href="#">Home </a>
    <a href="#">About</a>
    <a href="#">Books</a>
    <a href="#">Contact</a>
  </nav><!-- End of nav tag -->
  <p>&copy Queens Public Library, 2018</p>
</footer>
```
<br>
<br>

<br>
<br>


---
---
# Reference Materials 
---
---
* W3 Schools HTML Tutorial => <a href="https://www.w3schools.com/html/default.asp" target="_blank">Learn More</a>
  
* Lesson 1 Handout => <a href="https://cdn.glitch.com/8ca21e61-1af2-4c16-86ef-f58b2ebed822%2FGetting%20Started%20Handout.pdf?1552929281351" target="_blank">Learn More</a>

<br>
<br>

---
---
# Helpful Links & Resources 
---
---
 * Code Acadmey Course on HTML => <a href="https://www.codecademy.com/learn/learn-html" target="_blank">Learn More</a>
 

 <br>
 <br>
 
 ---
 ---

<br>
<!-- Don't Change this link lol  -->
<!-- It Links to the next project in the course -->

# Want the rest of the course? - Click Below
[<img src="https://cdn.glitch.com/3de17cd2-7b1c-47d0-9058-7a56907a69a5%2Fthumbnail.png?1553445493802">](https://webdev-landing-1-master.glitch.me/)
<br>


---
---

Made by [Lennyroy](http://www.lennyroyrobles.com/)
-------------------

\ ゜o゜)ノ
Grouping WordPress posts by category
Tags: wordpress
Published: 2019-03-26 00:58:24

---
title: Grouping WordPress posts by category
published: true
description: Grouping WordPress posts by category
tags: WordPress
canonical_url: https://chinarajames.com/grouping-wordpress-posts-by-category/
---
Let’s say we want to have our posts displayed like the following.

**Category 1**
* Post 1
* Post 2
* Post 3

**Category 2**
* Post 1
* Post 2
* Post 3

You will quickly realise that using the standard WordPress loop you won’t quite get what you want.

## The problem
Using the conventional loop, you will only have access to the categories (terms) of that single post at that point resulting in the following

**Category 1**
Post 1
**Category 1**
Post 2
**Category 1**
Post 3

## The Solution
The solution is actually quite simple. Get the list of terms first and loop over each term, in this loop get the posts tagged with that term. I am going to use [get_terms](https://developer.wordpress.org/reference/functions/get_terms/) which is a helper that ultimately calls [WP_Term_Query](https://developer.wordpress.org/reference/classes/wp_term_query/__construct/)to get the list of terms first.

```
<?php
$terms = get_terms( array(
  "taxonomy" => "category",
) );
```

The above returns an array of term objects with properties such as term_id. Now that we have the terms, we are going to loop through them, passing the term_id to the [get_posts()](https://codex.wordpress.org/Template_Tags/get_posts)function to get the list of posts tagged with that term. get_posts() ultimately calls [WP_Query](https://codex.wordpress.org/Class_Reference/WP_Query) and you could use that class if your case requires it. In my case, I just want the title of the post.
Our code now becomes the following:

```
<?php
$terms = get_terms( array(
  "taxonomy" => "category",
) );

foreach ($terms as $term) : 
  $posts = get_posts(["post_type" => "store", "cat" => $term->term_id]);
?>
  <h4><?= $term->name; ?></h4>
  <ul>
  <?php foreach($posts as $post) : ?>
    <li><?= $post->post_title; ?></li>
  <?php endforeach; ?>
  </ul>
<?php endforeach; ?>
```