teleren/devto huggingface dataset:
Why and how to use collections in jekyll
Tags: webdev, jekyll, beginners, staticsites
Published: 2019-06-05 08:05:41

---
title: Why and how to use collections in jekyll
published: true
cover-image: https://thepracticaldev.s3.amazonaws.com/i/3b2zd0asv0ho7ow2uwyb.png
description: Jekyll makes creating a static site as easy as pie 🥧. But, what is a Jekyll Collection? Why would that be useful and what is the process to add in a collection? Let's dig in!
tags: webdev, jekyll, beginners, staticsites
---


## Why Use Collections?
This site is built on Jekyll which we'll write more about later but essentially
this site is built as a blog. We also have quite a few social media posts
that we want to provide more content about on our website. This way, we can share some content on social media and send readers to our site for more information. Since we have long form blog posts already that is our <a href="https://jekyllrb.com/docs/posts/" target="_blank">posts</a> type. We wanted another way to provide another type of content but didn't want it to be a full post. Enter what we call <a href="https://github.com/dev-diaries/web/tree/master/_social-posts" target="_blank">_social posts</a>. These are a `collection` (see what we did there?) of all the social media posts on the site. This way to display them we can avoid any needless filtering of the blog post by a certain tag or category. Jekyll collections give us an easy way out of the box to create a subtype on our blog 🙌.


## How
The first thing we needed to do was update our config to "register" the new 
collection:

```yaml
collections:
  social-posts:
    output: true
```

Here we name the collection `social-posts` and declare that we want it to output a page for each document. This way each social post will have it's own dedicated page so when users go to our site to learn more information they can see an entire page dedicated to [Text navigation: jumping between words](/social-posts/text-navigation/) for example.

Now that we have that, we need to make the directory so Jekyll knows to grab the social posts. So, in the root of our project we make the directory:

```bash
mkdir _social_posts
```

Then create our post within that directory. We change directory (cd) into
the directory (folder) we just made and then create (touch) the first post:

```bash
cd _social__posts
touch text-navigation.md
```

And bingo! We have a new collection of social media posts with one post (text-navigation). Want to see how we integrated it on this site? Check out our <a href="https://github.com/dev-diaries/web/commit/3176105dac2f421246512f4dd0946627ef2ec47a" target="_blank">commit</a> because <i>don't talk about it, code about it</i>. We'll be posting much more about how this site was built and as we add in more features we'll of course blog about it, because <i>sharing is caring</i>.

[Original Post on Dev Diaries](https://www.dev-diaries.com/blog/why-and-how-to-use-collections-in-jekyll/)
Memento – Mnesia Distributed Database in Elixir
Tags: elixir, mnesia, erlang, database
Published: 2019-06-05 07:45:02

[<img alt="Memento" src='https://raw.githubusercontent.com/sheharyarn/memento/master/media/logo.png' width='250px'/>][memento]

[Memento][memento] is a fast, powerful and extremely easy-to-use Elixir wrapper around Mnesia, the Erlang Distributed Realtime Database. 


[memento]:  https://github.com/sheharyarn/memento
Moving onto the next project
Tags: python, django, webdev
Published: 2019-06-05 07:40:45

https://github.com/wesley-ruede/product-hunt

So this one is gonna be a lot more complex as it will have user authentication and the html will be a lot cleaner as it will be extensible. As I get further through it and I go into the actual process of hosting it, I'll update it. That an all I learn.

For loops in dictionaries to allow Python to work its 'magic' in the framework:

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

This piece of code will parse in data from the other html document to organize it. Having to replicate the nav bar and make all changes by hand can be kinda quirky and/or time consuming. The solution is to use the for loop to extend this data as such:

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

and this will take all the data between the block content and endblock, and pass that back to the base.html. As I learn new techniques I'll post them here.
Learn Redux or Not? 
Tags: redux, hooks, training
Published: 2019-06-05 07:31:57

---
title: Learn Redux or Not? 
published: true
description: Should you learn Redux with the arrival of hooks?
tags: [redux, hooks, training]
---

I just finished going through [Learn Redux](https://www.learnredux.com/) by Wes Bos.  This course is really good.  It's free.  It's short.  It somehow manages to both give a great overview on Redux and dig into the details of how it works in just 2.5 hours.  And although [I've come up with strategies](https://dev.to/grepliz/a-review-of-javascript30-aka-how-to-finish-your-online-courses-hpk) to complete the online courses I enroll in, I was very close to not finishing this one halfway through.

What happened?

First, I want to mention that I'm the mother of two young toddlers.  So anyone with kids will know that at this season of life, *learning time* is at a premium.
I want spent the little bits of free time I have as efficiently as possible.  So I either want to learn things that are very relevant or things that really interest me. 

I attended a [Hooks training](https://reacttraining.com/) in San Francisco where the trainers kept emphasizing that Redux functionality is now in React via hooks.  Much in the same way jQuery is now apart of the browser.  Realizing that Redux will likely be falling out of favor for React hooks, I didn't feel as motivated to finish the course.

But more I thought about it, I came up with 3 good reasons to continue learning about Redux.

***1. There is a lot of projects still using Redux.***

Although I'm not personally working with Redux, I know there is a lot of React projects out there that do.  Even in my own company, there are active React/Redux projects and there is no plan to switch over in the near future.

***2. Learning Redux helped me understand useReducer.***


The [useReducer hook](https://reactjs.org/docs/hooks-reference.html#usereducer) was a little confusing to me at first, but having some idea about Redux actually helped me understand this hook better.  

***3. Not every company likes to upgrade.***

As engineers, we tend to want to always upgrade to the latest and greatest.  Sometimes this is not possible.  If you end up at a company or situation where only a pre-hooks React version is allowed, Redux is still a viable solution for state management. 

In conclusion, I still think it was worth my time to finish the course.  Wes Bos is a knowledgeable instructor and there is a good probability that I may end up working on a project using Redux.  And at the very least, it helped me with my understand of the useReducer hook.
How to install macOS Catalina on another partition
Tags: macos, macoscatalina
Published: 2019-06-05 06:49:42

---
title: How to install macOS Catalina on another partition
published: true
description: How to install macOS Catalina on another partition
tags: macOS, macOS Catalina
---

# Create a new Partition
Following [How to create a partition on your Mac to install the developer beta of macOS Catalina](https://www.imore.com/how-to-partition-your-mac)

Please ignore **How to switch partitions** section

# Install the latest "official" macOS on the new partition
Restart Mac, and press Command+R immediately after launch Mac.  Then you can see "Reinstall macOS" option.
Please make sure that you select the new partition for installation.

# Install macOS Catalina beta 
1. Get profile from [Beta Software - Download - Apple Developer](https://developer.apple.com/download/)
2. Install downloaded pkg
3. Then we can get update in Preference, continue to install
4. :tada:

# refs
* https://www.imore.com/how-to-partition-your-mac
when did stackoverflow become the most pointless place to ask a question?
Tags: ldap, community
Published: 2019-06-05 06:34:30

---
title: when did stackoverflow become the most pointless place to ask a question?
published: true
description: 
tags: LDAP, community
---

So I'm really struggling to get LDAP to authenticate against the server (any links to good resources would be appreciated) and post a question on Stackoverflow which immediately decides it should be on Superuser instead.
The question contains a clear list of steps taken and links to articles followed.

The only response is 'what steps did you do?'

Why has the community got so pathetic when it used to be so helpful?
Testing Expectations 
Published: 2019-06-05 06:01:03

If you take a read through these 
 [Automation Mistakes](https://techbeacon.com/app-dev-testing/top-7-test-automation-mistakes-how-avoid-your-next-fail) you will find it is mainly targeting management. I was hoping for something a little different, but since we're on the subject.

The article mentions the mistake of automating the same test script steps currently done by the team. And it hints at the use of passing everything through QA. I want to elaborate here on what I think is important to keep in mind. 

First off, if you are needing to have your humans run test scripts you're using your human wrong. Minimum wage laws are preventing you from hiring people who don't think so give them a challenge they need to think on. 

This first step however can't be done in isolation as the test script execution approach expects a specific flow to the development release. To turn your employees into thinker, ones that use automation or not, they can no longer sit at the end, nor can they be expected to verify your application has no regressions and is working as defined.

That sounds pretty bad, didn't you hire these people specifically to identify regressions and verify functionality because you can't trust a developer to test their own stuff. And this is why agile calls everyone a developer, you want a team responsible for the development and quality of what is released. In all likelihood if you are investing the use of automation then your expectations on what these people were hired for is showing to be wrong.

Let's pretend for a moment that you have a team handling all regression and new functionality validation, keeping defect escape and delivering time low. You see automation as purely a way to prepare for growth. My advice, leave that team alone and hire a new team for automating the growth. 

Back in the land of reality you likely have a diverse team of different testing skills. Their success or failure probability changes per release, their may may be additional hands looking at the release before and after QA. The QA team is pressed for time and never gets through everything.

In such a world is an expectation of learning good software development or test automation technology while releasing new product functionality, all while debugging the test automation still in development or has inconsistent results, is that going to be realistic? 

Automation is a big expense, you don't want the cost going only into QA development, put it into the release pipeline and infrastructure. Doing so provides a good place to discuss specific improvements.
Launching Open Source side project. `Ten Hands`: a Command Line task organizing tool
Tags: showdev, opensource, react
Published: 2019-06-05 04:22:03

Hey folks,

[Edit 1]: Ten hands 2 available now. Check https://tenhands.app and https://github.com/saisandeepvaddi/ten-hands for using updated version.

As developers, we keep opening terminals to run our tasks such as _npm run start_.

`Ten Hands` is an app where you can easily add your projects and add their tasks at one place and run them.

|                  Dark                  |                  Light                  |
| :------------------------------------: | :-------------------------------------: |
| <img src="https://thepracticaldev.s3.amazonaws.com/i/yznta2ggybmwqcb0kusu.PNG" /> | <img src="https://thepracticaldev.s3.amazonaws.com/i/xyfjnthzxa3w3sjfrics.PNG" /> |


NodeJS projects (any project with `package.json`) can be directly uploaded and their `scripts` will be added automatically.

If it's not NodeJS type project, you can create a Ten Hands project with any name and add any commands that run in terminal into that. So it'll help you organize frequently using command line tasks at one place. 

This started out as educational project for me to get practice on React Hooks and TypeScript, and has been very helpful to learn many things. 

This is free and Open Source project and available for Windows, Linux (.deb), and Mac. Building the project yourself is also very easy and can be done in 2 steps. Please check github link for details.

You can also contribute in Github (feedback/code/docs/suggestions... anything). Everyone at any level of expertise is welcome to contribute/teach/learn. Create issues/PRs and I'll take a look.

Check the Github and Product Hunt links here.

[Github](https://github.com/saisandeepvaddi/ten-hands)
[Product Hunt](https://www.producthunt.com/posts/ten-hands)
React Native Slider/Seekbar Example
Tags: reactnative, android, ios, javascript
Published: 2019-06-05 04:02:36

---
title: React Native Slider/Seekbar Example
published: true
description: React Native Slider/Seekbar Example
tags: #reactnative #android #ios #js
---

Source : <a href="https://www.skptricks.com/2019/06/react-native-slider-seekbar-example.html" > React Native Slider/Seekbar Example</a>

This tutorial explains how to make slider/seekbar layout in react native application that helps to select a single value from a range of values. Basically Sliders allow users to make selections from a range of values. Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.


<img src="https://1.bp.blogspot.com/-3-HHTCdJelo/XPXt9wWApkI/AAAAAAAAC7c/OOQLywIW4vModRTV-2ZXKTjTrc6Tc5gkQCLcBGAs/s400/react-native-slider-seekbar-example.jpg" />

<a href="https://www.skptricks.com/2019/06/react-native-slider-seekbar-example.html" >Click here to read more...</a>
React Native Full Width Horizontal JSON ScrollView showing Page Numbers
Tags: reactnative, android, ios, javascript
Published: 2019-06-05 03:55:51

---
title: React Native Full Width Horizontal JSON ScrollView showing Page Numbers
published: true
description: React Native Full Width Horizontal JSON ScrollView showing Page Numbers 
tags: #reactnative #android #ios #js
---

Source : <a href="https://www.skptricks.com/2019/06/react-native-full-width-horizontal-json-scrollview-showing-page-number.html" >React Native Full Width Horizontal JSON ScrollView showing Page Numbers </a>

This tutorial explains how can we create full width horizontal JSON ScrollView showing page numbers in react native application and here we are using random user json api that helps to generate random user and display the user data in scroll view layout. When user scroll left to right or right to left, then it will display the user data accordingly. Also it will display the total number of users count in the bottom of the screen and when user scroll left then user count increases and right then user count decreases.

<a href="https://www.skptricks.com/2019/06/react-native-full-width-horizontal-json-scrollview-showing-page-number.html" >React Native Full Width Horizontal JSON ScrollView showing Page Numbers </a>

<img src="https://1.bp.blogspot.com/-fpiQDIez1HI/XPJzdRPAv3I/AAAAAAAAC48/q5I3hAPOHIEmnXt8G9E5xlXCyorX3l-8wCLcBGAs/s400/react-native-full-width-horizontal-json-scrollview-showing-page-number.png" />


<a href="https://www.skptricks.com/2019/06/react-native-full-width-horizontal-json-scrollview-showing-page-number.html" >Click here to read more...</a>
React Native Generate Random Color on Button Click
Tags: reactnative, android, ios, javascript
Published: 2019-06-05 04:01:02

---
title: React Native Generate Random Color on Button Click
published: true
description: React Native Generate Random Color on Button Click
tags: #reactnative #android #ios #js
---

Source : <a href="https://www.skptricks.com/2019/06/react-native-generate-random-color-on-button-click.html" >React Native Generate Random Color on Button Click</a>

This tutorial explains how to dynamically generate random color on button onPress in react native android and iOS application. In this example we are going to generate rgb color by calling rgb function.

<a href="https://www.skptricks.com/2019/06/react-native-generate-random-color-on-button-click.html" >React Native Generate Random Color on Button Click</a>

<img src="https://1.bp.blogspot.com/-Qt-fbL3DTwo/XPPc8D-EipI/AAAAAAAAC60/p_W4YQAytvcR6VKI6U6s02k8wAjCMXL2wCLcBGAs/s400/react-native-generate-random-color-on-button-click.png" />

<a href="https://www.skptricks.com/2019/06/react-native-generate-random-color-on-button-click.html" >Click here to read more...</a>
How to show an alert in React Native
Tags: reactnative, android, ios, javascript
Published: 2019-06-05 03:59:23

---
title: How to show an alert in React Native
published: true
description: How to show an alert in React Native
tags: #reactnative #android #ios #js
---

Source  : <a href="https://www.skptricks.com/2019/06/how-to-show-alert-in-react-native.html" > How to show an alert in React Native</a>

This tutorial explains how to show alert message in react native application. In react native we are having Alert component that helps to display alert message in user screen. Launches an alert dialog with the specified title and message. Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button. This is an API that works both on iOS and Android and can show static alerts. To show an alert that prompts the user to enter some information, see AlertIOS; entering text in an alert is common on iOS only.


<a href="https://www.skptricks.com/2019/06/how-to-show-alert-in-react-native.html" > How to show an alert in React Native</a>

<img src="https://1.bp.blogspot.com/-i540JsNzuYk/XPO0NjsZUwI/AAAAAAAAC6U/5F_5WJ_MXc0xdnz11teQaI9Fdfi0oUsYwCLcBGAs/s400/how-to-show-alert-in-react-native.jpg" />

<a href="https://www.skptricks.com/2019/06/how-to-show-alert-in-react-native.html" > Click here to read more...</a>
React Native Change Background Color of View Component Dynamically using Animation
Tags: reactnative, android, ios, javascript
Published: 2019-06-05 03:57:39

---
title: React Native Change Background Color of View Component Dynamically using Animation
published: true
description: React Native Change Background Color of View Component Dynamically using Animation
tags: #reactnative #android #ios #js
---

Source : <a  href="https://www.skptricks.com/2019/06/react-native-change-background-color-of-view-dynamically.html" >React Native Change Background Color of View Component Dynamically using Animation </a>

This tutorial explains how to change background color of view component dynamically using animation in react native application. Here we are going to use Animated component of react-native package that provides very smooth transition, while changing background color dynamically.

<a  href="https://www.skptricks.com/2019/06/react-native-change-background-color-of-view-dynamically.html" >React Native Change Background Color of View Component Dynamically using Animation </a>


<img src="https://1.bp.blogspot.com/-b-yKnyk5d1k/XPOWtqXNgQI/AAAAAAAAC5o/RCD-DLRUE-kodK7_uObz5__xWwn87dQRgCLcBGAs/s1600/react-native-change-background-color-of-view-dynamically.jpg" />

<a  href="https://www.skptricks.com/2019/06/react-native-change-background-color-of-view-dynamically.html" >Click here to read more...</a>
I Tried the Top 5 Coding Challenge Websites
Tags: beginners, challenge, skills
Published: 2019-06-05 03:39:57

---
title: I Tried the Top 5 Coding Challenge Websites
published: true
description: I asked for coding challenge suggestions and briefly tested a few of them out. Here are my results.
tags: beginner, challenge, skills
---

Thank you to everyone who replied to the following tweet! It's an excellent list of sites people like to use.

{% twitter 1133927062039867392 %}

I did a quick look over all of these sites and am providing my immediate impressions from them. It's very possible they might be missing something. :) If a correction needs to be made, or if there's another really awesome thing about any of these sites that I missed, just drop a comment and I can update this post.

# 1. [codewars](https://www.codewars.com/)
- 20+ languages available
- Others' solutions are available for review
- You can practice writing your own tests

# 2. [HackerRank](https://www.hackerrank.com)
- 20+ languages available
- Many skills categories and challenges to explore
- Job board seems like an added benefit :)

# 3. [exercism](https://exercism.io/)
- 50+ languages available
- ["Mentored mode"](https://exercism.io/mentored-mode-vs-independent-mode)&mdash;the linked page has a ton of information about the structure of this
- There's a lot of steps for each challenge, with downloading the code and then having to resubmit it. I have a preference for interactive challenge sites.

# 4. [CodinGame](https://www.codingame.com/start)
- Several languages available (I didn't count, they were in a select)
- Multiple types of challenges of varying skill levels
- A bit overwhelming to me, there's a lot happening on each screen

# 5. [ProjectEuler](https://projecteuler.net/archives)
- Not an interactive coding website, BUT
- A lot of *great* challenges for writing software solutions to

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).
Java, C++, or C#???
Tags: cpp, csharp, java, discuss
Published: 2019-06-05 03:22:32

Alright. I would consider myself a new developer. I have worked primarily with Node, Javascript, and React and have been looking to enter the workforce as a developer.

In my search for a new career, I am of course always looking to develop my skills and learn more. As I look online (granted, this might just be in my area) I see a LOT of open positions for .NET, and many backend jobs looking for experience with Java. 

## The Question
My question is, as someone who would consider themself to be pretty strong on the Javascript/Node front, **what would be a more beneficial programming language to seek out learning next? Would learning Java, C++, or C# make me a better programmer?***

## Here are my first thoughts for each:
- **Java**: It's all over the place, so it seems like it would be good ont he resume as well as a skill overall to understand. My first interview I bombed because it was for a backend Java position. (I applied for a Node/JS frontend position)

- **C++**: It closely related to C (in my understanding). Apparently that can help a lot with other languages based on C. Also, I've heard it's good because it doesnt manage things like memory automatically so it makes you a better developer in the sense that you need to understand aspects of how the language works a little more than you might with other languages.

- **C#**: Somewhat like C? Also it's part of the .NET stack which seems to have many jobs out there.

*I'm not necessarily looking for the best language to get a job right away. I'm trying to think more long term. That thinking leads me towards C++ because of what I said above, but not knowing any of these languages, I am hoping someone might have some more insight! I'd rather learn a language with skills that can apply across the board than something really specific to a certain stack, but then my locked in to that.

Or...maybe go the totally other direction and go with Swift?!