teleren/devto huggingface dataset:
Zuri Intership
Published: 2021-08-20 11:35:19

Hey, Geoffrey Here I  joined this awesome internship program because i want to be better, i believe that technology can solve a lot of human existing challenges thus why by the end of 8 weeks, i  i target to come up with an simple app that will help solve a small challenge in the society i come from. I want to improve majorly on Android development, especially native development, but am also open to other exciting technology . I’m inspired by the people I have already met so far,and I hope to meet great minds so that we can grow together. My stack include mobile

Here are a few resources and websites that have helped in my journey so far..

Android Development resource
Introduction to Kotlin (android.com)
11 week of android
https://www.youtube.com/watch?v=SMOhl9RK0BA
figma:
https://youtu.be/FK4YusHIIj0
Grow with Google Git and Github:
(254) Git and GitHub Crash Course For Beginners | Google IT Automation with Python Certificate - YouTube
Python for Beginners:
(254) Python for Beginners | Google IT Automation with Python Certificate - YouTube
Zuri internship:
https://training.zuri.team
redirect from old urls to new urls
Published: 2021-08-20 11:18:30

Hello everyone I want to redirect urls like this
from
https://www.example.co.uk/pages/terms-conditions
to
https://www.example.co.uk/terms-conditions
I developed updated site using django framework and now want to redirect old site urls to new urls and not loosing traffic. what is the best way of doing.....?
What is Kubernetes Downward API and why you might need it?
Tags: containers, kubernetes, openshift, crio
Published: 2021-08-20 11:10:27

---
title: What is Kubernetes Downward API and why you might need it?
published: true
description: Kubernetes Downward API
tags: containers, kubernetes, openshift, crio
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---
Let's check one of the lesser known Kubernetes features, that allows to expose pod metadata to your application - the Downward API:

{% youtube c4IOAXE5Mo8 %}

***

*You can always hire [our mentors](https://mkdev.me/en/specializations) and learn directly from them!*
Go like error handling in TypeScript
Tags: typescript, go, node, webdev
Published: 2021-08-20 10:59:30

In this article we'll learn about how we can handle our errors like Go with TypeScript.

_**Note:** In TypeScript this is probably not a "best practice", or even a good practice at all but let's have fun experimenting nonetheless!_

Let's take the following as an example.

```ts
import * as fs from 'fs/promises';

async function main(): Promise<void> {
  try {
    const result: Buffer = await fs.readFile('./package.json');
    // Do something with result
  } catch (error) {
    // Handle error
  }
}

main();
```

In Go, this should look as below.

```go
package main

import "io/ioutil"

func main() {
	data, err := ioutil.ReadFile("./package.json")

	if err != nil {
		// Handle error
	}

	// Do something with data
}
```

Let's write our `async` handler helper function! This function basically returns a Tuple of result and error as TypeScript doesn't have multiple returns.

```ts
type Maybe<T> = T | null;

type AsyncResult = any;
type AsyncError = any;
type AsyncReturn<R, E> = [Maybe<R>, Maybe<E>];
type AsyncFn = Promise<AsyncResult>;

async function async<R = AsyncResult, E = AsyncError>(
  fn: AsyncFn
): Promise<AsyncReturn<R, E>> {
  try {
    const data: R = await fn;
    return [data, null];
  } catch (error) {
    return [null, error];
  }
}
```

We can use our `async` utility as below. We can pass our Result and Error generics types.

```ts
import * as fs from 'fs/promises';

async function main(): Promise<void> {
  const fn: Promise<Buffer> = fs.readFile('./package.json');
  const [data, error] = await async<Buffer, NodeJS.ErrnoException>(fn);

  if (error) {
    // Handle error
  }

  // Do something with data
}

main();
```

Perfect! We now have isolated our `try/catch` with Go like error handling pattern.
How to build a MongoDB Admin Panel/GUI in just 10 minutes!
Tags: adminpanel, mongodb, crud, nocode
Published: 2021-08-20 10:57:54

Admin panels are fantastic tools that increase productivity, give insights into data, and help resolve the pain points of any particular team or employee, further leading to efficient business processes. MongoDB doesn't come with a comprehensive admin panel out of the box, but with DronaHQ, you can not only build a full-fledged admin panel but also connect it to various third-party services like Slack, Zendesk, Stripe & more to build a complete integrated dashboard!

[Click here](https://www.dronahq.com/mongodb-admin-panel/) to read more or watch a video on the same!
Why do we love Next.JS in 2021?
Tags: nextjs, javascript, react, typescript
Published: 2021-08-20 10:54:57

It is a fact that there is a constant modification of web technologies at present. Therefore, it is important to comprehend modern technology and frameworks, particularly their advantages and downsides. We like to make things easier and faster right now, and what we consider impossible the day before has become a standard right now.

React was built by Facebook for adapting to this iteration, and it is a library that allows web app development services to make the UI more efficient and simpler. At this time, the component-based development reached its climax.

Nevertheless, Next JS was developed in 2016 for creating full pages and not components (such as React). It offered some benefits to the developers, marketers, and business owners, which we have mentioned in this article.

 
What is meant by Next JS?

 
NextJS Development Services

 

This happens to be a framework that enables the developers to create extremely fast and static websites and top-notch apps. Furthermore, the Automatic Static Optimization feature will allow combining the terms “static” plus “dynamic” by creating a hybrid app with statically created pages as well as server-side rendered pages.
Next JS provides us with some benefits as mentioned below:

    Better than average performance

    Top-notch user experience

    Quick feature development

Big companies such as Uber and Netflix and smaller businesses are making use of this framework these days. Besides this, Next JS is also thought to be amongst the fastest-developing React frameworks that are ideal for any static site.

 
Must Read: Difference Between Next.js vs. Nuxt.js vs. Nest.js

 
When should you use Next JS?

It is your business objectives that should decide why you should use any technology. You should be using Next JS in case you like to do the following:

    Boost marketing channels

    Enhance your sales and conversion

    Provide a better UX to the clients

    Reduce the maintenance expenses

    Stay ahead of the competition online

    Easily scale your business

It will be feasible to attain these objectives with the help of Next JS because of all these benefits mentioned above. 

Let's know here Next JS Advantages and Drawbacks:https://www.rlogical.com/blog/why-do-we-love-next-js-in-2021/
Python3, APIs and Docker Two Weeks Boot Camp By Lux Academy and Data Science East Africa.
Published: 2021-08-20 10:31:12

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5e1g8lzm6hwuyl4xjcc.png)



This will be an intensive programming and technical writing free bootcamp where you will learn how to develop, ship, and run APIs using python with the help of docker. 

TOOLS & TECHNOLOGIES:
- Python3.
- Docker.
- Flask and FastAPI.
- Postman. 

Important Dates:

1). 30th August, Application  Deadline. 

2). 6th September BootCamp Starts
 
3). 17th September  2021 Training Ends

All learners will be required  to:  
- Attend two online classes per week.
- Write two technical articles per week.
- Complete two weeks  Capstone  Project, you will be required to build an open-source application with Beyonic API, https://apidocs.beyonic.com/ using Python & Docker. 

**Connect with the community members:*
Lux Tech Academy:   https://twitter.com/lux_academy 

Data Science East Africa: https://twitter.com/HarunMbaabu 

Beyonic Developer's Group : https://t.me/joinchat/AeUYkRMxslY0MjVh 

---
Application Link 👉🏻 : https://bit.ly/PythonAPIsBootCamp
Better file structure in React projects
Tags: react, webdev, discuss
Published: 2021-08-20 10:30:05

---
title: Better file structure in React projects
published: true
description: Is there a perfect file structure for React projects? Probably not. But some are far better than others
tags: react, webdev, discuss
cover_image: https://images.pexels.com/photos/1370294/pexels-photo-1370294.jpeg?w=1600
---

Is there a perfect file structure for React projects? Probably not. But some are far better than others.

Over the years I discovered that I tend to structure files in some specific ways, which I believe are easier to understand and reasonable.

## Meaningful folder names

[Naming things](https://martinfowler.com/bliki/TwoHardThings.html) is one of the toughest things to get right in programming. One of my favorite tactics to naming folders is to extract the subject and use it:

- want a place for **public** resources? the `public` folder should be a good fit;
- have some custom **hooks** that you are proud of? keep them easy to find in the `hooks` folder;
- want to include yet another **css** file? store them in the `css` folder.

And so on and so forth.

## Little to no folder nesting

I always wondered about the `src` folder and why it exists. And to this day it still is one of the many mysteries of programming.

I like to keep all my folders as close to the project root as possible. This way, they can be discovered more easily by any new dev working on the project.

[Avoiding too much nesting](https://reactjs.org/docs/faq-structure.html#avoid-too-much-nesting) is also recommended by the official React documentation as well.

## Grouping by feature

The `components` folder is one of my exceptions: it has two (2) levels of nesting. Common components are accessible right from the folder root, while "specialized" components have they own folder.

The contents of the `components` folder:

- `Button.jsx` - common button components
- `Link.jsx` - common link component
- `Forms`
  - `AddClientForm.jsx` - specific "form" component
  - `EditClientForm.jsx` - another specific "form" component

## Minimal example

This is the project structure for a [starter project I authored](https://github.com/victorocna/awesome-react-starter) and for many projects I'm working on right now.

- `api`
- `components`
- `css`
- `data`
- `functions`
- `hooks`
- `models`
- `pages`
- `public`
- `LICENSE`
- `README.md`

I hope the folder structure is self explanatory. If it is not, I have done a lousy job at naming folders. Let me know in the comment section below.

## Closing thoughts

My favorite file structure:

- is easy to read and understand
- is shallow nested
- is grouped by features

Have a different opinion? Can't wait to hear it!
My Goals for Zuri Backend Programme
Published: 2021-08-20 10:19:21

2. Developing good communication skills

3. Learning in-demand skills to increase professional opportunities

4. Dedicating at least 20 hours a week to achieve optimal efficiency in the backend track

5. Become better in time management by tracking your time

6. Working effectively in a team

Tutlrials link: 
Git: https://m.youtube.com/watch?v=PhNvhrt_zYU&list=PLL0ge2KQPI3WHrqxCc-FOSFAkrg5c84kw&index=3

Figma: https://m.youtube.com/watch?v=jk1T0CdLxwU&t=4s

Python: https://youtu.be/bjInfNt0pAo

Zuri: https://zuri.team
HNG Internship. 8 weeks, achievable goals
Published: 2021-08-20 10:05:37

HNG Internship is an annual virtual internship targeted at developers and designers which spans for period of 2-3 months, with this year edition being the eighth cohort. The internship program focuses on the post-training phase, and creates a virtual work environment for participants. During the programme, the interns contribute to projects of substantial impact, collaborate with one another and learn important software engineering and design concepts.

The tracks available for the internship are

* Frontend Web Development
* Backend Web Development
* Mobile Development
* Digital Marketing
* UI/UX Design

Check [HNG's website](https://internship.zuri.team/) to learn about the internship. My desired track for the program is Mobile application development with Flutter/Dart.

My goals and expected achievement after 8 weeks of internship
“The best way to predict your future is to create it.” - Abraham Lincoln 

### I've streamlined the goals I want to achieve after 8 weeks of the program

* Get to the last phase of the internship.
* Network & collaborate: Obviously, meeting talented and wonderful people is an aspect I won't want to miss out in the programme. I'm open to meeting and collaborating with diverse set of people.
* Improve technical and soft skill: By the end of the internship, my technical and soft skills should have undergone an extensive reconstruction. Let's wait and see how this goes.
* Build and contribute to Projects: Project, project, projects. I hope to build


## Want to get started in tech?
You can check these resources to start your career in tech:

[Git Tutorial](https://techpadi.africa/2020/12/a-simplified-introduction-to-git/)
[Figma Tutorial](https://www.youtube.com/watch?v=FTFaQWZBqQ8)
[Flutter Tutorial](https://youtube.com/techwithsam)
[PHP Tutorial](https://www.youtube.com/watch?v=OK_JCtrrv-c)
[Python Tutorial](https://youtube.com/techwithtim)
How to Haskell?
Tags: beginners, haskell, tutorial
Published: 2021-08-20 09:45:36

I made a few attempts to learn Haskell **from-a-book** using various sources but procrastination won the day.

Then I joined a  [MOOC](https://www.futurelearn.com/courses/functional-programming-haskell) with the University of Glasgow, virtual birthplace of  Haskell where many of its original developers worked and from whose site I ~~stole~~ *borrowed* the graphic above.

It's only a few hours a week but  *if not completed within 6 weeks I have to pay to continue* . The prospect of a £62 fee should kill the procrastination demon - And sharing my notes publicly here ~~will~~ may shame me into learning something.

I saw a number of ``` haskell, ``` #haskell posts here - Looking forward to learning from you all and clearly can't do tags within text yet.. if it is allowable!?

I also started **[Dylan Israel's Scrimba Markdown course](https://scrimba.com/learn/markdownblog)**.  My posts here begin as assignments in the Markdown course which will take a couple of hours over a few days. You'll notice places where I format the text for no reason. Those places are assignments in the Markdown course :-) - (I can't even do emojis yet - that's what years of SAP ABAP does to you).
Incorrect Current Location on Chrome Desktop
Tags: help, javascript
Published: 2021-08-20 09:24:22

Hello,

I am working with google map and got one weird issue related to the current location access.

>> On Desktop/Laptop, On Allow Current Location Access, navigator.geolocation.getCurrentPosition returns incorrect longitude & latitude on chrome browser but returns accurate one on Firefox.

This behaviour is not when you are on mobile, location picked up is correct in this case. 

Example Code:     console.log(navigator.geolocation.getCurrentPosition(console.log, console.log, {maximumAge:60000, timeout:5000, enableHighAccuracy:true}));

Gives me different result on Chrome browser on Desktop.


Trying to identify the reason, but got nothing as such.

Anyone who can help in identifying the root cause for this?
Azure Fundamentals [AZ-900] Video Tutorial
Published: 2021-08-20 09:12:39

## AZ-900 Module 1 

{% youtube E8bwwecZTbc %}

https://youtu.be/E8bwwecZTbc

Azure Fundamentals part 1: Describe core Azure concepts
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-cloud-concepts/

## AZ-900 Module 2 

{% youtube FuAfECKUTo4 %}

https://youtu.be/FuAfECKUTo4

Azure Fundamentals part 2: Describe core Azure services
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-core-azure-services/

## AZ-900 Module 3 & 4

{% youtube pUMBpfZNALw %}

https://youtu.be/pUMBpfZNALw

Azure Fundamentals part 3: Describe core solutions and management tools on Azure
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-core-solutions-management-tools-azure/

Azure Fundamentals part 4: Describe general security and network security features
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-general-security-network-security-features/

## AZ-900 Module 5 & 6 

{% youtube VxzqVpgbrV4 %}

https://youtu.be/VxzqVpgbrV4

Azure Fundamentals part 5: Describe identity, governance, privacy, and compliance features
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-identity-governance-privacy-compliance-features/

Azure Fundamentals part 6: Describe Azure cost management and service level agreements
https://docs.microsoft.com/en-us/learn/paths/az-900-describe-azure-cost-management-service-level-agreements/
Here are 10 FREE Udemy courses for you to learn React
Tags: react, beginners, programming, codenewbie
Published: 2021-08-20 09:03:10

_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/)_

1. React - The Beginner's Course 2021

https://www.udemy.com/course/react-the-beginners-course/

2. Learn the Basics of React (Incl Hooks - 2021)

https://www.udemy.com/course/react-js-tutorial/

3. Build your first React JS Application

https://www.udemy.com/course/build-your-first-react-js-application/

4. React Fullstack with node/express, PostgreSQL and AWS

https://www.udemy.com/course/react-fullstack-with-nodeexpress-psql-and-aws/

5. React with Redux, React-Router, Hooks, and Auth0

https://www.udemy.com/course/modern-react/

6. React Fundamentals

https://www.udemy.com/course/react-fundamentals/

7. React basic in just 1 hour [2021]

https://www.udemy.com/course/react-basic-in-just-1-hour/

8. Intro to React Native build a cryptocurrency tracker app

https://www.udemy.com/course/ultimate-react-native-with-firebase/

9. Build Tic Tac Toe Game By React.js [Reducer Hook Tutorial]

https://www.udemy.com/course/reactjs-tic-tac-toe-game-in-30-minutes/

10. Build a Pet Hotel web app with React using ScaffoldHub

https://www.udemy.com/course/react-pet-hotel/

_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)._
What's your PC Specification?
Published: 2021-08-20 08:54:07

Mine is ASUS G73Jh-B1 17.3

2.0GHz Intel Core i7-2630QM Quad-Core
14GB RAM
1.5TB (500GB SSD x 1TB SSD) SSD
Blu-ray ROM with DVD Burning
Nvidia Geforce GTX 460M
17.3" Widescreen Display
Integrated Camera and Microphone
Bluetooth, 802.11b/g/n Wi-Fi
Windows 10 Pro (64-bit)
A pure functional Primality Test in Scala
Tags: scala, functional
Published: 2021-08-20 08:34:16

A good algorithm to determine if a number is prime is one that tests only a subset of all numbers to enhance its performance. On the contrary, a non-optimized algorithm performs the test on each number, like the [Sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes).

One particular optimization descends from the fact that all primes greater than 3 are of the form 6k ± 1, where *k* is any integer greater than 0. There is a famous Python algorithm that implements this optimization.

``` { python}
def is_prime(n: int) -> bool:
    """ Primality test using 6k+-1 optimization. """
    if n <= 3:
        return n > 1
    if n % 2 == 0 or n % 3 == 0:
        return False
    i = 5
    while i ** 2 <= n:
        if n % i == 0 or n % (i + 2) == 0:
            return False
        i += 6
    return True
```

In this post, I would like to translate this algorithm using a pure functional approach in Scala language.

Using *Functional Programming* we achieve some notable results:

* No side effects - *if the code compiles, then it works*
* Thread-safe and concurrency-safe
* Easier to reason about, because the function is *algebraic*
* Results can be combined - *using pipelines*

... and many others. (See [this post](https://qvault.io/clean-code/benefits-of-functional-programming/) if you want to learn more)

The algorithm above is not functional because the function *is_prime* is not pure. The reason is that it uses a variable (i) in a *while* loop.

To express the same algorithm as a pure function we need to eliminate all variables and use just constants. To do that, we use recursion.

This way, instead of storing the loop index (i) into the function, we pass it as a parameter to the function itself.

This is a first attempt.

``` { scala}
def isPrime(n: Int, i: Int = 5): Boolean = {
    if (n <= 3)
        return n > 1
    if (n % 2 == 0 || n % 3 == 0)
        return false
    while (i * i <= n) {
        if (n % i == 0 || n % (i + 2) == 0)
            return false
        return isPrime(n, i + 6)
    }
    true
}
```

As you can see, (i) is now an optional parameter of the function, and inside the *while* loop, the value of (i) is updated at every call.

To underline that (i) is an internal parameter and that the user should never supply it, we could use the *implicit parameter group* feature of Scala. In this way, we isolate the (i) parameter and make it clear that it is a parameter used only for recursion.

``` { scala}
def isPrime(n: Int)(implicit i: Int = 5): Boolean = {
    if (n <= 3)
        return n > 1
    if (n % 2 == 0 || n % 3 == 0)
        return false
    while (i * i <= n) {
        if (n % i == 0 || n % (i + 2) == 0)
            return false
        return isPrime(n)(i + 6)
    }
    true
}
```

This algorithm performs quite well, especially in multithreaded contexts.

The function above can be easily called like this:

``` { scala}
println("Is 7669 prime? " + isPrime(7669))
```

You may find full source code in my GIT repo https://github.com/guildenstern70/PurePrimality