teleren/devto huggingface dataset:
Day 444 : 4:44
Tags: hiphop, code, coding, lifelongdev
Published: 2021-09-02 22:08:02

_liner notes_:
- Professional : Had quite a few meetings today. In between them, I was able to get some code in. I implemented a new way to get some data and store as an environmental variable. Got to use some stuff like child process that I've never really had a chance to before. I tested it out as much as I could and sent it off to a team member to test it out since I don't have a Facebook account. I'll check it out tomorrow and see if it worked. Reviewed a PR for an update to a library and made some comments. Also got started on documenting how to style the Web Components I made. Not a bad day. Looking forward to buttoning up a few of them before the weekend tomorrow.

- Personal : Last night, I watched Marvel "What If...?". It was a really good one with a sad ending. Went through tracks for the radio show. Ordered some food and stuff. Did some research on some potential future purchases. Didn't do any coding because my brain was fried. haha.

![Landscape of Yosemite, CA, United States with gray mountains and a waterfall in the distance with a green and orange-red forest filling the valleys under the cover of a large shadow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rd91ccasr4sp7ni2fsp.jpg)

Going to go through more tracks tonight. Maybe do some coding. The part with setting up the schema for the database always trip me up. Figuring out what data I'll need and what's the best way to store and access it. I want to watch an episode of Boruto, probably over dinner. Pretty much it.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube zSkA61esq_c %}
How do you debug/trace /gain knowledge of new codebase for backend web services
Tags: discuss, backend, api, wwatercooler
Published: 2021-09-02 21:11:41

Hi just a question as to people switching companies or a person coming across a new huge backend codebase having multiple services or multiple services even dependent on other services or projects.
Exactly how is you process of gaining codebase knowledge and exploring the code itself?
Some examples of java projects or higher level overview would be really insightful!
Thanks
Sharing my online event countdown maker
Tags: showdev, webdev
Published: 2021-09-02 20:37:16

Today, I'm sharing with you a free tool to build public-facing online countdowns for your event. 

It's available here: https://datelist.io/tools/countdown
It's free to use, and, it will stay forever. 

So, feel free to use it as much as you want :)
Laravel Beyond CRUD IMO
Tags: laravel, ddd
Published: 2021-09-02 20:15:47

---
title: Laravel Beyond CRUD IMO 
published: true
description: 
tags: laravel, ddd
//cover_image: https://direct_url_to_image.jpg
---
> This post was originally published on https://blog.eichgi.com/laravel-beyond-crud-imo

Folks, today's opinion is about the Laravel Beyond CRUD course published by Spatie. As Freek said, if you work with Laravel chances are you are using one of their many libraries for the Laravel ecosystem.

Link to the course: laravel-beyond-crud.com

This is a video series & book that provides a mindset when it comes to work with large projects using the Laravel Framework. The entry point is related with Domain Driven Design (DDD) and how could it be applied into the Laravel context. I expected to have some code examples in order to see how the wiring up needs to be modified when connecting the domains modularization and laravel's inner functionality. At the end it's a good overview.

The next episode shows what a Data Transfer Object (DTO) is and its advantages. Having defined a known data structure for data transfer helps to handle communication; a common case is data storage from the request to the controller. Instead of grabbing data manually, you are able to curate it or transform it before its final usage. And testing might get easier given you always know what to provide and expect.

In order to not disclose or diving deeper into the course I will stop here. But the following are some points and it's a part of what you can find in this course:

- Keeping model classes small and clean
- Structuring complex queries
-  Passing data around in a structured way using Data Transfer Objects
- How to make code reusable by using actions
- Improving code clarity by using meaningful names
- Keep controllers light by using view models
- Adding behaviour to collections
- Testing actions, DTOs and model-related classes
- Using enhanced test factories to seed data for every scenario

I believe this is a great content whereas you are becoming proficient with Laravel or if you wishes to know the advanced topics. As mentioned previously I'd like to had more content but the course goal is to show off some techniques, patterns and good practices for your projects. Feel free to share your comments 😎
Firebase Authentication problem ! help :)
Tags: react, firebase, javascript, help
Published: 2021-09-02 19:55:09

Hi guys. My problem is I'm using react-router in my app to show some routes and hide some based on The Authentication State, which here is the Token but in react apps there are helper extensions that allow us to change some things in code like react extension. This means that anyone can change the authentication state from it and show the hide or disabled routs, is there any way or better way to solve this problem? thanks.

note: I'm sorry about my bad English
The 3 most interesting C++ posts of August 2021
Tags: bestofdev, cpp
Published: 2021-09-02 19:54:19

Let me share with you 3 interesting [#cpp](https://dev.to/t/cpp) posts from August.

I don't take the most popular articles anymore, because I find that while some articles do meet the criteria to add #cpp as a tag, but they are not mostly about C++. So there is a bit of subjectivity to this list. Yet, I try not to include multiple articles from the same author and I don't include the wrap-up of the previous month either ;)

Feel free to share your favourite one in the comments.

***
[Mr. Unity Buddy](https://dev.to/unitybuddy) wrote a great C++ cheat sheet for beginners which is clearly the most popular post last month. Many people find cheat sheets useful so it's definitely an important contribution, thank you!

{% link https://dev.to/unitybuddy/c-cheat-sheet-for-beginners-33h1 %}

***

[Sandor](https://dev.to/sandordargo) continued his series about the `<algorithm>` header and tackled heap algorithms in one of the latest episodes.

{% link https://dev.to/sandordargo/the-big-stl-algorithms-tutorial-heap-operations-9jd %}

***

Last but not least, [Dave](https://dev.to/iamdeb25) shared his insights on an evergreen topic: pointers and references.
The article on this list is just the first episode of an interesting series.

{% link https://dev.to/iamdeb25/pointers-and-references-design-goals-and-use-cases-13e7 %}

Happy coding!

## Connect deeper

If you liked this article, please 
- hit on the like button,  
- [subscribe to my newsletter](http://eepurl.com/gvcv1j) 
- and let's connect on [Twitter](https://twitter.com/SandorDargo)!
Create a custom map/filter/reduce in JavaScript,Python and Ruby
Published: 2021-09-02 19:42:24


When I learn a new language I like to create my own map/filter/reduce functions in it because is a great way to test my skills, working with functions,arrays,functions as arguments,etc.

So now I will compare how I would create it in all of them starting with JavaScript

```javascript

// Map

function myMap(array,callback) {
    newArray=[]
    array.forEach(value => newArray.push(callback(value)))
    return newArray
}

const transformed = myMap(["red","blue","purple"] , (color) => `Color ${color}`)

console.log(transformed)

//Filter

function myFilter(array,callback) {
    newArray=[]
    array.forEach(value => callback(value) && newArray.push(value))
    return newArray
}

const filtered = myFilter([1,4,8,2,10,6] , number => number > 5)

console.log(filtered)

// Reduce

function myReduce(array,callback) {
    let acc = 0
    array.forEach(value => acc = callback(acc,value))
    return acc
}

const reduced = myReduce([4,5,9,10] , (acc,current) => acc + current)

console.log(reduced)
```
Let's do it in python now

python is pretty much the same, just using lambdas instead arrow functions

```python

# Map

def myMap(list,callback):
    newList=[]
    for item in list:
        newList.append(callback(item))
    return newList

transformed=myMap(["red","blue","purple"],lambda color: "Color " + color)

print(transformed)

#Filter

def myFilter(list,callback):
    newList=[]
    for item in list:
        if callback(item) : newList.append(item)
    return newList

filtered= myFilter([1,4,8,2,10,6],lambda number : number>5)

print(filtered)

#Reduce

def myReduce(list,callback):
    acum=0
    for el in list:
        acum=callback(acum,el)
    return acum

reduced = myReduce([4,5,9,10] , lambda current,actual:current+actual)

print(reduced)
```
And now Ruby

Ruby is a little bit more different, you pass blocks that act like anonymous functions, arguments are enclosed in | argname |
and they are called inside the function using the yield word

```ruby


#Map

def myMap(array)
    newarray=[]
    for value in array do
        result=yield(value)
        newarray.push(result)
    end
    return newarray
end

transformed=myMap(["red","blue","purple"]) do | color | "Color #{color} " end

puts transformed.inspect

# Filter

def myFilter(array)
    newarray=[]
    for value in array do
        newarray.push(value) if yield(value)
    end
    return newarray
end

filtered = myFilter([1,4,8,2,10,6]) do | number | number > 5 end

puts filtered.inspect


#Reduce

def myReduce(array)
    acc = 0
    for value in array do
        acc = yield(acc,value)
    end
    return acc
end

reduced = myReduce([4,5,9,10]) do | acc,curr | acc+curr end


puts reduced.inspect

```
Here is a image that show that all of them have the same result

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

In general I had a lot of fun learning new things and I think it is such a great thing to do to improve your coding skills.
ViewGroup: RelativeLayout in Android {Android Development} | Day 4
Tags: android, sharingknowledge, layout, 50daysofcode
Published: 2021-09-02 19:13:57


**More about RelativeLayout**

In last blog I talked about viewgroup, then we have a glance over different types of viewgroups
And lastly we jumped towards LinearLayout.


In today's blog we will have a look over RelativeLayout👇

2.Relative Layout⬇️

**What is RelativeLayout?**
RelativeLayout is a view group that displays child views in relative positions.
The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or relative to parent layout.

If I want to explain Web developer about RelativeLayout .
I would say Relative Layout in Android is similar to css grid .
You can position childblocks(TextView,button, ImageView etc) relative to each other or to the parent class that is RelativeLayout.

**Properties of RelativeLayout:**
1. android:layout_alignParentTop
➡️ If "true", makes the top edge of this view match the top edge of the parent.
2. android:layout_centerVertical
➡️ If "true", centers this child vertically within its parent.

And many more properties,
Read more about RelativeLayout 👇
https://developer.android.com/guide/topics/ui/layout/relative
React with Django REST API
Published: 2021-09-02 19:09:28

```python
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'todo',
    'rest_framework',
    'coreapi',
]

```
Why I love building with Next.js — a fireside chat with Cassidy Williams of Netlify
Tags: nextjs, javascript, webdev
Published: 2021-09-02 19:07:50

In this fireside chat, I joined [Cassidy Williams of Netlify](https://twitter.com/cassidoo) to talk about the performance benefits of [Next.js](https://nextjs.org/docs), and how developers can make the most of the framework.

Next.js has a lot of options when it comes to data fetching methods, which can be both a blessing and a curse. Learn about how to think about data fetching methods in Next.js to build performant static sites that create dynamic user experiences. We also cover why we personally use Next.js for projects, the best way to style a Next.js app — and I decided to bring back the phrase “surf the web.”

{% youtube BqQcgHEif5s %}

## Learn more about Next.js

{% link https://dev.to/whitep4nth3r/a-next-js-complete-beginner-tutorial-using-the-spotify-api-3756 %}

{% link https://dev.to/whitep4nth3r/how-i-set-up-my-new-next-js-projects-with-a-handy-bash-script-58o0 %}

{% link https://dev.to/contentful/how-to-add-algolia-instantsearch-to-your-next-js-application-4lcg %}

{% link https://dev.to/whitep4nth3r/how-to-avoid-using-relative-path-imports-in-next-js-eki %}

{% link https://dev.to/contentful/paginating-your-contentful-blog-posts-in-next-js-with-the-graphql-api-10f6 %}
Video PowerShell Switch Statement - Different take on branching
Tags: powershell, if, condition, scripting
Published: 2021-09-02 18:54:32

{% youtube EqJ0lBO1rM4 %}

GitHub link: https://github.com/kprocyszyn/About-PowerShell/tree/main/PowerShell%20Switch%20statement

One switch statement can replace multiple if/else statements, it makes code more readable and is really easy to use - there's no reason why you shouldn't give it a try!
How to: Contribute to OpenNMS
Tags: blog, howto, circleci, community
Published: 2021-09-07 21:16:17

---
title: How to: Contribute to OpenNMS
published: true
date: 2021-09-02 18:51:35 UTC
tags: Blog,HowTo,circleci,community
canonical_url: https://www.opennms.com/en/blog/2021-09-02-how-to-contribute-to-opennms/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-contribute-to-opennms
---

Submitting issues, fixing bugs, contributing features, enhancements, and extensions, writing documentation, or reporting security issues are all valuable ways that our community helps make OpenNMS a better monitoring platform.

OpenNMS uses Jira to manage issue tracking and development. Once you have a Jira account and have signed the OpenNMS Contribution Agreement (OCA), you can start contributing. The basic workflow is as follows:

- Identify the issue
- Create a Jira ticket 
- Develop, develop, develop 
- Submit the patch to GitHub
- Create a pull request (PR) 
- PR review by another developer/community member 
- Update patch based on review 
- Approve and merge PR 

CircleCI, our continuous integration system, takes over, checking code for compile errors, running tests, and building and publishing all the packages for a release.

Learn more about how you can contribute in this [Discourse article](https://opennms.discourse.group/t/how-to-contribute/1768 "Discourse article").

<style type="text/css">.fusion-body .fusion-builder-column-0{width:50% !important;margin-top : 0px;margin-bottom : 0px;}.fusion-builder-column-0 > .fusion-column-wrapper {padding-top : 0px !important;padding-right : 0px !important;margin-right : 3.84%;padding-bottom : 0px !important;padding-left : 0px !important;margin-left : 3.84%;}@media only screen and (max-width:800px) {.fusion-body .fusion-builder-column-0{width:100% !important;}.fusion-builder-column-0 > .fusion-column-wrapper {margin-right : 1.92%;margin-left : 1.92%;}}@media only screen and (max-width:800px) {.fusion-body .fusion-builder-column-0{width:100% !important;}.fusion-builder-column-0 > .fusion-column-wrapper {margin-right : 1.92%;margin-left : 1.92%;}}</style>

![Jira-GitHub development workflow](https://www.opennms.com/wp-content/uploads/2021/09/ContributionWorkflow-448x1024.png)
The 5-minute trick
Tags: webdev, mobile, newbie
Published: 2021-09-02 18:41:12

The 5-minute trick
Learning to code is hard. In fact, learning any new technology / programming language / framework / library is hard.

It's also important - that we keep learning. The development industry is always evolving, and the way we create websites today is vastly different from how we did it 20, 10 or even 5 years ago. That's why being able to learn new stuff and adapt to changes is critical: to increase your hireability and make sure you're always doing the best you can.

But then comes the tricky part, because how are you supposed to stay on top of everything and actually pick up new skills?

The answer is consistency.

You simply need to tap away at something, bit by bit, for a long time. It's the only way to properly learn and store new concepts in your brain. Especially difficult concepts like coding.

That raises the next question, though: how can you stay consistent? It's a great idea in theory, but you need a strategy to carry it out.

Enter: The 5-minute trick.

And what's that, I hear you ask? Well the name is something I just coined, so you won't get far Googling it. But it's actually a pretty simple strategy I've used to improve my skills for years.

The idea is that, whatever you're learning or want to get better at, you set aside 5 minutes every single day to work on that thing. Easy, right? And when I say work, I mean actively working on it (not just consuming a video/article etc.).

The point is to force your brain to enter "learning mode" every day. And 5 minutes is the perfect number, because no day exists where you don't have 5 minutes to yourself. Regardless of your responsibilities, job, family etc., I believe that 5 daily minutes is doable for everybody.

How you use the time isn't as important, and depends on what you're learning. If you're learning to code, 5 minutes is enough to get you to open your code editor and write a few lines of code. It's enough to have you play around with one new concept you aren't familiar with. And here's the key: Now that you're in "code-mode", there's nothing stopping you from keeping it going.

So if you got the time, absolutely keep crushing it and blow right past the 5 required minutes. That will only accelerate your growth. On the flipside, if you've had a busy day/week and have to stop after 5 minutes, that's fine too - you'll be back tomorrow.

I find this strategy incredibly useful to help me stay consistent. By building the daily habit, picking up new skills become second nature. And that's exactly what will help you excel in your development career 🔥
If OnPrem and Cloud where children
Tags: webdev, architecture
Published: 2021-09-02 18:36:39

On Prem or "on premisis" is the opposite of cloud in the sense that the product lives with the client, spounging of the food, water and electricity supplies of your customer, just kidding, its not a teenager but it has some similarities, on Prem can lead to limited supportability but at least you can keep a closer eye on your product.

Cloud, it's in the cloud, it's not your problem, just make sure you throw money at it because it will be phoning home asking for rent money every single month!
A simple Gradle build with example on Ubuntu
Tags: gradle, ubuntu, java, linux
Published: 2021-09-02 18:34:44

Gradle is a higly customizable, powerful and fast build system.
Let's walk through a simple example to configure a project using gradle.

First, download a specific [release](https://gradle.org/releases/). 

Here are the steps to configure it.

```
$ mkdir /opt/gradle
$ unzip -d /opt/gradle gradle-7.2-bin.zip
$ ls /opt/gradle/gradle-7.2/
LICENSE  NOTICE  README  bin  init.d  lib  
```
Add the following line in `~/.bashrc`.
```
export PATH=$HOME/.local/bin:$PATH 
```

`~/.bashrc` file should be updated to get the changes.
```
$ source ~/.bashrc
```

Run `gradle -version` when the above steps are completed. 
![gradle version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7n93o76726wkpqgyg4p0.png)

Let's call the project name `blue` and scaffold gradle for it.
```
$ mkdir blue
$ cd blue
$ gradle init
```
It will ask few to setup the directory strucutre
```
Select type of project to generate:
 1. basic
 2. application
 3. library
 4. Gradle plugin
``` 
For this example, let's select `2. application`. 

The following question will ask selecting the implementation language which I choose `java`. 

The other options could be selected as per the given default choice.

Let's create a `makefile` and add some basic gradle commands there.
```
$ cat makefile
 JAVA_HOME = /opt/sun/jdk15
 GRADLE_HOME = /opt/gradle/gradle-7.2

 GRADLE = $(GRADLE_HOME)/bin/gradle
 clean:
       ./gradlew clean  
 build:
      ./gradlew build
 run:
      ./gradlew run
 test:
      gradle test --tests AppTest 
```

`App.java` which is located in `app/src/main/java/blue/` is the entry point to the project. 
Edit this class and add soem message to it.

```
package blue;

public class App {
 private String getMessage() { return "My Gradle Project"; } 
 
 public static void main(String[] args) {
   App app = new App();
   System.out.println(app.getMessage());
 }
}
```
Now, run the project.
```
$ make build
$ make run
```

The sample message should be printed in the console if the build is successful.

[Download](https://github.com/skypy/blue) this sample.
Golang - Meu primeiro Hello World
Published: 2021-09-02 18:01:55

---


O programa “Hello, World!” é um clássico tradicional, consagrado pelo tempo em programação de computadores. É um programa inicial, simples e completo para iniciantes e é uma boa maneira de garantir que seu ambiente esteja devidamente configurado.

```
package main

import "fmt"

func main() {
  fmt.Println("Hello, World!")
}
```

`package` é uma *palavra-chave* da linguagem Go que define a qual pacote de código esse arquivo pertence. Só pode haver um pacote por pasta e cada arquivo `.go` deve declarar o mesmo nome de pacote no topo de seu arquivo. Neste exemplo, o código pertence ao pacote `main`.

`import` é uma *palavra-chave* da linguagem Go que diz ao compilador de Go quais outros pacotes você quer usar neste arquivo. Aqui, você importará o pacote `fmt` que vem com a biblioteca padrão. O pacote `fmt` fornece funções de formatação e impressão que podem ser úteis durante o desenvolvimento.

A `fmt.PrintIn` é uma *função* da linguagem Go, encontrada no pacote `fmt`, que diz ao computador para imprimir um texto na tela.

A função `fmt.Println` vem seguida por uma sequência de caracteres, como `"Hello, World!"`, entre aspas. Quaisquer caracteres que estiverem entre aspas são chamados de *string*. A função `fmt.Println` imprimirá essa string na tela quando o programa for executado.

Os aplicativos em Go requerem um pacote `main` e exatamente uma função `main()`, que serve como ponto de entrada para o aplicativo. A função `main`
 não recebe argumentos e não retorna valores. Em vez disso, ela diz ao 
compilador de Go que o pacote deve ser compilado como um pacote 
executável.

Uma vez compilado, o código é executado ao inserirmos a função `main()` no pacote `main`. Ele executa a linha `fmt.Println("Hello, World!")` ao *chamar* a função `fmt.Println`. O valor da string `Hello, World!` é *enviado*, em seguida, para a função. Neste exemplo, a string `Hello, World!` é também chamada de um *argumento*, uma vez que é um valor que é enviado para um método.

As aspas que estão em ambos os lados do `Hello, World!` não são impressas na tela porque você as utiliza para dizer ao Go onde sua string começa e onde termina.
Search Books {Day - 20}
Tags: 100daysofcode
Published: 2021-09-02 17:58:53

#100daysofcode {Day - 20}

Search your favourite book here. Today I Created a Book searching Site using API. Really getting much pleasure using API..!
Preview: https://biggest-books-library.netlify.app
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfe82cjswe1vw4l2nn9c.png)
#devcommunity #javascript #develooper

﻿