teleren/devto huggingface dataset:
Theming In Android Revisited: Part 1
Tags: android, beginners, theme, style
Published: 2019-08-03 19:03:01

---
title: Theming In Android Revisited: Part 1
published: true
description: 
tags: android, beginner, theme, style
---

Last year, some time in July, I wrote a [blog post](https://dev.to/pabiforbes/theming-your-android-app-3md9) about theming in Android. The post received some good comments, so I decided to revisit the topic with newly acquired information to share with the community. But before we get into how to theme our apps, let's see why it should be considered.

# What is Theming? 🤷🏿
A theme can be described as _unifying an idea and theming is designing or bringing that idea to life to an object, application, or space_. Theming is used to create a holistic look and feel.

Should we care about how our application looks like? 
Well, you would want to create a memorable experience for your end users. And to create a reusable set of attributes to apply to your entire application. Theming also enables us to create visual consistency in our applications. [Smashing Magazine](https://www.smashingmagazine.com/2018/02/comprehensive-guide-to-mobile-app-design/) describes visual consistency as follows - _"Typefaces, buttons, and labels need to be consistent throughout the app"_ . 

Let's get into theming, for this post, we will be making use of Material Components. Add the following to your gradle file:

`com.google.android.material:material:$material_version`



## Color 🎨

Color was the main topic in my previous post about theming. I also included useful tools such as the [Material Design Palette](https://www.materialpalette.com/) and the [Color Tool](https://material.io/tools/color/#!/?view.left=0&view.right=0). Extracting colours from these tools might look like this: 


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


And as pointed out in the previous post by, {% user adolgiy %} there seems to be a duplication of color from the exported file from the Material Color Tool. So how do we solve the duplication issue? Well, it is quite simple, we name our colors. A cool online tool you can make use of  is [Name that Color](http://chir.ag/projects/name-that-color), and the result looks like this:

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


That helped us get rid of duplicate colors and we named our colors, because colors have names. That will be particularly useful if we need to define multiple themes for our apps. This is how we will define the style for the app's theme using the colors:
![](https://thepracticaldev.s3.amazonaws.com/i/9tm3ishuenght5yrzv4j.png)

### On Colors
"On" Colors - namely On Primary, On Secondary, On Background, On Surface, On Error, as seen in the image above, are used to usually used for iconography, text, and strokes.


## Cool Resources 👀
- [Material Design- The Color System](https://material.io/design/color/the-color-system.html)
- [Material Design](https://material.io/)
- [Uplabs](https://www.uplabs.com/) _for some inspiration_
- [Smashing Magazine](https://www.smashingmagazine.com/2018/02/comprehensive-guide-to-mobile-app-design/)


_Happy Theming_
React state management. What should I use?
Tags: react, redux, webdev, discuss
Published: 2019-08-03 20:25:29

When I first started developing apps in react, I used redux along with redux-saga for state management and async tasks but after I came to know about the react hook 'useReducer' combined with the context API, I don't feel there is any necessity to use redux but I say many big companies using redux for state management. I am confused what should I be using. Should I stick to using redux or should I use the new useReducer hook combined with context API?
Deep dive into technology
Published: 2019-08-03 20:18:50

I am from India and recently moved to Australia, Melbourne for my postgraduate in VR and Data analytics. I love web and that's how I got my first freelance project in 2015. After I completed my diploma in IT. I was amateur and still am but web development has evolved and I am finding it hard to catch up with or rather say difficult to channelise things to the way how I want it to be.
How do you make those cool tech gig type websites? Please guide me with good material where I can improve the look and feel of the website
What's the use of if __name__ == '__main__': in Python?
Tags: discuss, explainlikeimfive, python
Published: 2019-08-03 19:46:16

So I'm doing [this series](https://dev.to/wangonya/building-command-line-applications-with-python-5l4) and I want to make it as beginner-friendly to Python newbies as possible. I just wrote a piece of code and I want to explain what each line does, but I just can't figure out how to explain `if __name__ == '__main__':` simply. I mean, I use it all the time but I'm having a hard time explaining it in a way that someone who's just getting into Python would understand. The explanations I'm getting online aren't helping so... someone please #explainlikeimfive 😄
I'm a DevOps engineer at Playstation; what would you like to know?
Tags: devops, sre
Published: 2019-08-03 19:38:44

Hi everyone! My name is Fernando Garcia (twitter: @su_xcode). I'm one out of five DevOps engineers that work day and night for production operations at Playstation in San Francisco. 

What kind of things do people in this field want to know? Are you interviewing for any DevOps jobs? I can give you some tips if you need any. 
I have a great set of interview answers that would help you. I can give real world scenarios of what to do, and what not to do. 

I wrote all kinds of Ansible roles, python scripts, bash one-offs, and all other fun automated stuff. One day, I'd like to get my story of how I ended up working for a company like Sony with no college degree written somewhere. It's a long story, full of long nights, harsh struggles, the loss of a mentor, and really trying to stay afloat in the super expensive bay area.  

##A little about myself: 
I never went to college; not by choice, strictly because I was just too poor at the time to afford it. One day I'd love to actually go to college and get a degree. One day.

My background consists of a wild plethora of random jobs. Once I was a ramp manager at San Jose, Airport. You know, one of those guys that would hold those glow sticks and guide the plane into the terminal. Followed by being a mechanic at a small mom and pop shop. It was thanks to that mechanic job that introduced me to a hiring manager for some tire delivery service. It wasn't glorious, but it payed a lot better than my $7.50/hr mechanic job. It was the most important and beneficial decision I ever made. Getting that "large truck driver" experience landed me a job as a freight delivery guy for Cisco Systems. It's a long story as to how I ended up working in tech, but to sum it up it went like this: Delivering boxes and pallets of routers and switches got pretty boring really quick, so I got nosy and started asking the managers there how a guy like me can work in the datacenter. I met some awesome lab managers and landed a job as a rack-n-stack cable monkey. I say that lovingly. 

Fast forward a couple years, long nights of reading, studying, online courses, I became A+ Certified, CCNA certified, Linux+ Certified, MCSA Certified, and currently in the process of getting AWS certified. 

So people of dev.to, where do I start? How do I do this? Because like most things in my life, I'm just going with the flow and let time and gravity guide me. I hope to meet some cool people while I'm here!
What are the signs of workaholism?
Tags: programing, career, psychology
Published: 2019-08-03 19:12:32

---
title: What are the signs of workaholism? 
published: true
description: Seriously I don't know...
tags: #programing #career #psychology
---
*heavy sigh*

I love programing/development/coding. I love my web development job. I love my lifestyle so far. I've been a developer for almost 3 years now.

Before that, I used to work as a project coordinator for a couple of months and I hated my job. But I remember I almost worked myself to death. I remember one time staying in the company offices till 2 am working on a high stake project all by myself to make it easier for my colleagues working on it the next day. Even though I was well paid and had a great boss, I was miserable and depressed. I think because I tried too hard to like my job by working my ass off. But truth of the matter was that I found the job boring, considered myself expandable, and it just wasn't my jam. 

The career switch I made really did do wonders to fend off that depression.

Fast-forward to today. I find myself spending most of my free time working on coding side-projects, reading docs, reading tech blogs, trying new dev tools, solving coding challenges, helping others with their coding projects, etc. I am sure many developers can relate to this routine. I still occasionally see and hang out with friends, but I don't seek them out, and I do prefer alone time (I am an introvert).

But when does this become workaholism? I've burnt out once before, but that was due to high pressure working as a fullstack dev in a small team at a startup and I have recovered. I am just scared I would burn out doing the "free time" dev activities I mentioned above, and that it would cause the same depression I got years ago.

Does anyone have experience dealing with and avoiding workaholism/burnout?
Top 3 Open Source ASP.NET Core based e-commerce web applications
Tags: dotnet, ecommerce, csharp
Published: 2019-08-03 18:19:56

Top 3 Open Source ASP.NET Core based e-commerce web applications
Listed below are top 3 open sources, cross-platform ASP.NET Core based e-commerce web applications

**nopCommerce**

nopCommerce is the best open-source e-commerce shopping cart. nopCommerce is available for free. Today it’s the best and most popular ASP.NET e-commerce software. It has been downloaded more than 1.8 million times!
nopCommerce is a fully customizable shopping cart. It’s stable and highly usable. nopCommerce is an open source e-commerce solution that is ASP.NET Core based with an MS SQL 2008 (or higher) backend database. There are several plugins also available.

Site — https://www.nopcommerce.com/
GitHub Link — https://github.com/nopSolutions/nopCommerce

**SimplCommerce**

A simple, cross-platform, scalable, modularized e-commerce system built on .NET Core. This application is based on Micro Service Architecture.

Site — http://www.simplcommerce.com/
GitHub Link — https://github.com/simplcommerce/SimplCommerce

**grandnode (Powered By nopCommerce)** 

It’s an open-source, free, cross-platform e-commerce software based on ASP.NET Core 2.2 and MongoDB — NoSQL database. You can run it on Linux, Windows, and macOS easily. GrandNode also supports Docker, so you are able to install it just in seconds with Docker.
It can be used for any kind of online store. GrandNode is a perfect choice for people who want to sell simple products. It’s a solution dedicated to the most demanding users. You can also create auctions, booking/reservation products or product kits. GrandNode became a mature solution especially for developers who want to develop a modern, functional and high-performance e-commerce system.

Site — https://www.grandnode.com/
GitHub Link — https://github.com/grandnode/grandnode

This open-source e-commerce web applications are great to get started. You can also check out their source codes for a good reference of real-time scalable applications.
ASP.NET Core starter templates for SasS MultiTenant application infrastructure
Tags: dotnet, csharp, saas, multitenant
Published: 2019-08-03 18:16:34

Some of the top Open Source templates for setting a strong infrastructure base for your SasS application. This framework provides the base for getting started quickly doing all the infrastructure part needed to handle multitenancy.

**ASP.NET Boilerplate — Web Application Framework**
ASP.NET Boilerplate is a general purpose application framework specially designed for new modern web applications. It uses already familiar tools and implements best practices around them to provide you a SOLID development experience.
ASP.NET Boilerplate works with the latest ASP.NET Core & EF Core but also supports ASP.NET MVC 5.x & EF 6.x as well.
https://github.com/aspnetboilerplate/aspnetboilerplate
https://aspnetboilerplate.com/
https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy

**abp — Preview**
It is also an open source web application framework for asp.net core. It is is an entire rewrite of ABP Boilerplate mentioned above
https://abp.io/

**SasS kit**
SaasKit is a .NET toolkit for building SaaS (Software As A Service) applications.
The goal of the project is to help developers build SaaS products without getting in the way. It aims to be platform agnostic and as simple to use as possible.
https://github.com/saaskit/saaskit
https://benfoster.io/blog/tagged/saaskit

**Finbuckle.MultiTenant**
Finbuckle.MultiTenant is a multitenancy library for ASP.NET Core 2.1+. It provides functionality for tenant resolution, per-tenant app configuration, and per-tenant data isolation
https://www.finbuckle.com/MultiTenant/Docs
https://github.com/Finbuckle/Finbuckle.MultiTenant

**cloudscribe**
ASP.NET Core multi-tenant web application foundation with management for sites, users, roles, claims and more
https://github.com/cloudscribe/cloudscribe
https://www.cloudscribe.com/introduction

**OrchardCore**
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that application framework.
https://github.com/OrchardCMS/OrchardCore
https://orchardcore.readthedocs.io/en/dev/
Copying a file from Windows to Linux through SSH
Tags: ubuntu, windows, filetransfer
Published: 2019-08-03 18:13:47


If you are working on Windows and need to transfer a file from window to Ubuntu server follow these simple steps

**First, Install and configure SSH on your Ubuntu server**

Execute the following commands :
$ sudo apt update
$ sudo apt install openssh-server

Enable port 22 for SSH in firewall
$ sudo ufw allow 22

Check status whether SSH is running in a linux machine
$ sudo systemctl status ssh

You can start or stop SSH using the following commands
$ sudo systemctl status ssh
$ sudo systemctl status ssh

**Copy file from Windows to Ubuntu server**
Execute this command

scp Filepathinwindows username@ubuntuserverip:linuxserverpath

Example
scp D:/TxtFile.txt root@ipaddress:/home/usr/

On transferring, cmd prompt will ask for password enter your ubuntu password corresponding to user
where are you from?
Tags: motivation, codenewbie, powerwash
Published: 2019-08-03 16:55:37

---
title: where are you from?
published: true
description: 
tags: #motivation #codenewbie #powerwash
---

‪Stop power washing your life story. If you've been healing, say it. If you've build some amazing memories, share it. Show who you are, and what you will become.‬
Ordering engineering-blogs entries by votes
Tags: python, tornado, rss, serverless
Published: 2019-08-03 16:05:31

TL;DR

A web to order the RSS entries contained in the engineering blogs list

https://github.com/kilimchoi/engineering-blogs

this is the web

https://entries-by-votes.now.sh/

Source code 

https://github.com/juanpabloaj/entries-by-votes


## Short description

If you are like me, probably as part of your daily routine you check some engineering blogs. A few months ago I found this repo with an amazing list of blogs. 

https://github.com/kilimchoi/engineering-blogs

It is great, but how to identify the most interesting (or popular posts)? well, I remembered this article related to how Hacker News ordered his posts.

https://medium.com/hacking-and-gonzo/how-hacker-news-ranking-algorithm-works-1d9b0cf2c08d

```
Score = (P-1) / (T+2)^G

where,
P = points of an item (and -1 is to negate submitters vote)
T = time since submission (in hours)
G = Gravity, defaults to 1.8 in news.arc
```

With that info, a few lines of python/tornado to get votes from Hacker News and Reddit, and the help of our friends of [zeit.co/now](https://zeit.co/now) (as serverless deployments service), the dinner has been served.


Peace.
Accidental Adventures in Robotics: Intro to Series - 1
Tags: robotics, ros, autonomousrobots, mobilerobots
Published: 2019-08-03 14:34:49

---
title: Accidental Adventures in Robotics: Intro to Series - 1
published: true
description: After joining AWS last year, I accidentally got into robotics after seeing a tweet announcing the launch of the AWS RoboMaker service.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/4o9isezlvr2fcelcjwuv.jpeg
tags: robotics, ROS, autonomous robots, mobile robots
---

It's time to come out of the closet, so to speak.

I love robots. 🤖🤖🤖


<h3>🧐 What's this series about? </h3>
<p>After joining the AWS Developer Relations team last year, I accidentally got into robotics after seeing a tweet announcing <a href="https://aws.amazon.com/robomaker/">the launch of the AWS RoboMaker service</a>. I'm excited to share tips about how to get into robotics development & some hardware suggestions.</p>



<h3>👩🏻‍💻 What kind of techy stuff will you talk about? </h3>
<ul>
<li>Python (no way I'm getting into C++ too this year!) </li>
<li>ROS1 vs ROS2 </li>
<li>Gazebo (for simulations)</li>
<li>autonomous robots </li>
<li>mobile robotics </li>
<li>cloud robotics </li>
<li>fleet management </li>
<li>robot toys for STEM learning </li>
<li>sample hardware </li>
<li>AWS RoboMaker, of course! </li>
</ul>


<h3>🙌🏾 Will you show me how to write the code?</h3>
<p>You bet! I'll also show you how to use the <a href="https://docs.aws.amazon.com/robomaker/latest/dg/cloud9-create-ide.html">Cloud9 IDE within the AWS console</a>, which was specifically enhanced to build an entire Ubuntu development environment for you. In fact, creating an AWS RoboMaker development environment takes only 1 click! </p>

<h3>🎥 Is this series only in written form, or will you include videos too? </h3>
<p>Besides blogging here, I'll continue to stream for <a href="https://www.twitch.tv/aws">AWS Twitch</a> about Open Source efforts in ROS2 and how to leverage the AWS RoboMaker solution.</p>
<p> If you're curious to check a few of those out ahead of time, you've my permission to go crazy...<p/>
<ul>
<li><a href="https://www.twitch.tv/aws/video/425649684">Hack Your Robot</a></li>
<li><a href="https://www.twitch.tv/aws/video/438139941">Building Relationships with Robots</a></li>
</ul>
</br>
</br></br>
¡Gracias por tu tiempo!
~Alejandra💁🏻‍♀️ & Canela🐾
</br></br>
Share your experience to learn Test Driven Development in React.js
Tags: react, javascript, webdev, beginners
Published: 2019-08-03 14:14:05

---
title: Share your experience to learn Test Driven Development in React.js
published: true
description: 
tags: react.js, javascript, webdev, beginners
---

I have been wishing to learn how testing happens in any small or big complex level React.js projects. I have heard about JEST and other stuff but I want to go through it in an organised manner. So please share your articles, tutorials, and key experiences that would help. Thank you!
I've Trained Programming Interns For 6+ Years, Ask Me Anything!
Tags: ama, coding, career, beginners
Published: 2019-08-03 13:47:25

---
title: I've Trained Programming Interns For 6+ Years, Ask Me Anything!
published: true
tags: ama, coding, careers, beginners
---

I've had the marvelous privilege of running an internship program in my area through my software company. I've worked with the computer science and career service departments of our local universities to continually improve this internship, and am proud to say that we've had a dozen graduates of the program to date, most of whom went on to full-time development and IT positions.

Interns work 6 hours a week (almost always remote) on actual projects in C++ and Python. They have opportunities to participate in team leadership, hiring, and standards authoring. Although remote, we're fully collaborative, and offer the same level of administrative structure you'd find in any full-time industry job (remote or otherwise). Ours is definitely an unusual program, but it works.

Since our company has between 3-10 active employees at any given time, I wear many hats. In running this internship, I've simultaneously served as lead developer, hiring manager, trainer, mentor, technical writer, code reviewer, IT, DevOps, you name it! I've helped interns learn to manage time, handle conflicts, solve problems, ask questions, review code, write documentation...and much, much more.

I've made a lot of mistakes over the years of running this program, but it's been an adventure I've loved every minute of. I've been taking the time to look back as I get things in place for (hopefully) the next round of interns next year.

Ask me anything!

---

Read the article based on this AMA...

{% link https://dev.to/codemouse92/how-to-become-a-developer-part-1-coding-skills-5fen %}
Daily Challenge #31 - Count IPv4 Addresses
Tags: challenge
Published: 2019-08-03 13:40:33

---
title: Daily Challenge #31 - Count IPv4 Addresses
published: true
series: Daily Challenge
description: Write a function that counts the number of IP addresses between two addresses
tags: challenge
---

Your [challenge](https://www.codewars.com/kata/526989a41034285187000de4) is to write a function that accepts starting and ending IPv4 addresses and returns the number of IP addresses from start to end, excluding the ending address. All input will be valid IPv4 addresses in the forms of strings. 

>Examples:
`ipsBetween("10.0.0.0", "10.0.0.50")  =>   50 `
`ipsBetween("10.0.0.0", "10.0.1.0")   =>  256 `
`ipsBetween("20.0.0.10", "20.0.1.0")  =>  246`

It would be impressive if anyone wanted to try their hand at creating the same function for IPv6. You might have to work with some hefty numbers though. 

Good luck, happy coding!

---
_This challenge comes from user xDranik. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!_

_Want to propose a challenge for a future post?  Email **yo+challenge@dev.to** with your suggestions!_