teleren/devto huggingface dataset:
Why coloring terminal is very important!
Tags: putty, developers, tutorial, software
Published: 2020-09-16 06:39:01

---
title: Why coloring terminal is very important! 
published: true
description: Add background color to your terminal to avoid negative impact.
tags: putty, developers, tutorial, software
cover_image: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/PuTTY_Ubuntu.png/1200px-PuTTY_Ubuntu.png
---

Developers who works for testing their applications or test cases on cloud environments instead of local environments are definitely will use terminals (i.e; Linux, poweshell and Gitbash etc).

Everyday we use to work on multiple tasks at a time. some times we do refer production environments for logs and to re-produce the same issue.

On peak times, we do wants to complete the tasks as faster as possible. same time we may confuse our selves while doing the modifications/deployments.

Then, definitely will get confused. we might do changes in production environment instead local environment. this definitely creates a huge problem, production server might stop because of simple thing.

To avoid this, terminals provide adding background color to the sessions. Using that, we can identify the environment we are working on.

As i use putty mostly, i am providing steps to add background color to session.

1. Open Putty
2. Select saved session and click on load button
3. On right side category, select Colours tab
4. Go to "select a colour to adjust block", then select "Default background" option.
5. Now select modify, then select color and click OK.
6. go to session tab, click Save button.

Now its got changed to selected background color and we might avoid a simple mistakes.

Thanks for reading my blog, please keep in touch for my next blog :-)
Vanilla JavaScript colouring our canvas elements 🌈
Tags: javascript, html, canvas
Published: 2020-09-16 06:33:13

So far, we have learned the [basics of the canvas](https://daily-dev-tips.com/posts/getting-started-with-the-html-canvas/), and how to [export it as an image](https://daily-dev-tips.com/posts/vanilla-javascript-save-canvas-as-an-image/). But it was all plain looking, so let's go ahead and explore our colouring options for the canvas.

Today we'll learn how to make the following;

{% codepen https://codepen.io/rebelchris/pen/ZEWogag %}

## Option for colouring

We have been using `fillRect` and `stroke` options.
If we want to add colour to this we can use the following two options:

- fillStyle => Colour for the inside of our element
- strokeStyle => Colour for the stroke

Let's say we want to make our block purple, all these options will result in the same result:

```js
ctx.fillStyle = 'purple';
ctx.fillStyle = '#800080';
ctx.fillStyle = 'rgb(128, 0, 128)';
ctx.fillStyle = 'rgba(128, 0, 128, 1)';
```

Let's try this out on our basic square in Codepen.

{% codepen https://codepen.io/rebelchris/pen/BaKxPmW %}

The same can be used for our strokeStyle as such:

```js
ctx.strokeStyle = 'purple';
ctx.strokeStyle = '#800080';
ctx.strokeStyle = 'rgb(128, 0, 128)';
ctx.strokeStyle = 'rgba(128, 0, 128, 1)';
```

And that will result in the following Codepen.

{% codepen https://codepen.io/rebelchris/pen/qBZYeVa %}

## Using transparency on canvas elements

The cool part, which you might have spotted, is the `rgba` method.

We can set our transparency and have overlapping elements like this:

```js
ctx.fillStyle = 'rgba(46, 196, 182, 0.5)';
ctx.fillRect(25,25,100,100);

ctx.fillStyle = 'rgba(231, 29, 54, 0.5)';
ctx.fillRect(75,75,100,100);
```

This will result in the following Codepen.

{% codepen https://codepen.io/rebelchris/pen/ZEWogag %}

## Browser Support

The canvas element is well supported these days and is defiantly a good option if you want to draw vectors on screen.

![HTML Canvas support](https://caniuse.bitsofco.de/static/v1/mdn-html__elements__canvas-1599916182087.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
What are the most important topics to learn in Python?
Tags: python, career
Published: 2020-09-16 06:31:02

Get a good development environment. Shell+Emacs, or Shell+VIM are OK-ish, but not very supportive for beginners. IDLE is not much better. I have not tried VSCode+Python plugin. Nor have I tried VisualStudio+Python plugin. PyCharm is excellent, I can recommend it to all.

The try writing some small programs using the environment, do “Hello World”, do “Fizz Buzz”, do “Factorial” and “Fibonacci”, do “Mean, Median, Mode, Standard Deviation”. They are small programs to get you into the swing of writing and executing Python programs. See if you can find an expert Python programmer to give feedback on your code. Feedback on what is right and wrong about the code you write is the most important thing to help you learn.

Then you need to find some harder programs to write. Find a problem from a field that interests you. The crucial thing is to decide what the data structures should be for solving the problem. Carefully organised data should lead to relatively straightforward algorithms and hence code. Python has list, tuple, set, dict (aka map), files (don’t forget RAII, with statement, using files) built in, but these are just the base tools, it is how you use and combine their use to create data structures for solving your problem that is crucial. You will find that most courses and webpages just introduce the base types, they do not really cover how to use complex combinations to represent the data of the problem. If ever you find yourself writing exceedingly intricate code, this is an indication that the data structure may be wrong.

The Python library contains a huge amount of really good stuff, along with a few bits of cruft that should be removed but is unlikely to be. Having a look at what modules there are in the library and looking at what they can do is always a good thing. The modules sys, os, and pathlib are ones everyone uses. Then there is itertools and functools lots of good stuff there. subprocess may become useful, or it may not. These are just a few, it is worth taking a look at the module index from time to time. During code development, always ask the question: is the feature I need for my code something already in the library? Always prefer library code to writing the same thing yourself.

So getting an environment working, writing some code to learn some Python syntax, learn the Python library, and learn Python data structures. Then the crucial skill is being able to create problem specific data structures and algorithms using the base tools.

PS There is also PyPI which has a mass of contributed modules and packages. Many of these are total rubbish, but there is a lot of good stuff in there. If you get into data analysis you will likely want numpy, pandas, scikit.learn, matplotlib. But there is a whole lot more. Always look for good quality pre-written, generally approved stuff before writing your own, it saves a lot of effort. Build on the shoulders of giants leads to quicker development of smaller more functional programs.

Meet the Experts for Better Guidence : https://nareshit.com/python-online-training/
A css-selector that a parent with child
Tags: css, html, javascript
Published: 2020-09-16 06:07:47

Sometimes we want to select elements with known child, we can use :has() selector, but no browser support now. (just check can i use :has() - https://caniuse.com/?search=%3Ahas())

However, we can use jQuery to select these elements by :has() like $("div:has(span.red)").

There is an example to show how it works:

https://codepen.io/timhuang/pen/jOqpxbY

```
$("div:has(span.red)").append("<p>this paragraph was added by jquery</p>"); 
```

jQuery is support the :has() pseudo-class just a draft on W3C: 

https://drafts.csswg.org/selectors-4/#relational

After the draft turning into specification we can use :has(), maybe css 4.
AWS and its use
Published: 2020-09-16 06:01:15

Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.
In simple words AWS allows you to do the following things-
Running web and application servers in the cloud to host dynamic websites.
Securely store all your files on the cloud so you can access them from anywhere.
Using managed databases like MySQL, PostgreSQL, Oracle or SQL Server to store information.
Deliver static and dynamic files quickly around the world using a Content Delivery Network (CDN).
Send bulk email to your customers.
Now that you know what you can do with AWS, lets have an overview of various AWS services.
Want to read this story later? Save it in Journal.
Basic Terminologies
Region — A region is a geographical area. Each region consists of 2 (or more) availability zones.
Availability Zone — It is simply a data center.
Edge Location — They are CDN (Content Delivery Network) endpoints for CloudFront.

Benefits of aws:-
Easy to use
AWS is designed to allow application providers, ISVs, and vendors to quickly and securely host your applications – whether an existing application or a new SaaS-based application. You can use the AWS Management Console or well-documented web services APIs to access AWS’s application hosting platform.
Flexible
AWS enables you to select the operating system, programming language, web application platform, database, and other services you need. With AWS, you receive a virtual environment that lets you load the software and services your application requires. This eases the migration process for existing applications while preserving options for building new solutions.
Cost-Effective
You pay only for the compute power, storage, and other resources you use, with no long-term contracts or up-front commitments. For more information on comparing the costs of other hosting alternatives with AWS, see the AWS Economics Center.
Reliable
With AWS, you take advantage of a scalable, reliable, and secure global computing infrastructure, the virtual backbone of Amazon.com’s multi-billion dollar online business that has been honed for over a decade.
Scalable and high-performance
Using AWS tools, Auto Scaling, and Elastic Load Balancing, your application can scale up or down based on demand. Backed by Amazon’s massive infrastructure, you have access to compute and storage resources when you need them.
Secure.
AWS utilizes an end-to-end approach to secure and harden our infrastructu
Day 2 - Testimonials Slider
Published: 2020-09-16 01:13:00

![testimonials project](https://media.giphy.com/media/VdJWjFE0GoQsT4C1TS/giphy.gif)
<figcaption>Posted on Day 3</figcaption>

For the second day I worked on building a [testimonials slider](https://github.com/josno/coding-bootcamp-testimonials-slider). Test it out [here](https://josno.github.io/coding-bootcamp-testimonials-slider/). I am using a variety of sources to get my project ideas from and today's project is from [Frontend Mentor](https://www.frontendmentor.io). These projects are great for zoning out on following a required style guide so I can focus on just getting things right. 

![struggle](https://media.giphy.com/media/l0K4hqqqwgFijgVLa/giphy.gif)
<figcaption> keep going </figcaption>

I also found myself struggling to write vanilla Javascript this time which leads me to believe that React and JSX is actually more like Javascript on training wheels. 



## What I Learned

![css](https://media.giphy.com/media/yYSSBtDgbbRzq/giphy.gif)
<figcaption> so old yet so true </figcaption>

The project has me further refining my SVG and layout skills. And this section today is dedicated to the philosophy that despite planning code ahead of time, something will always come up. There were many little details that slipped by me, not limited to:

- Layering things in order ahead of time, but oops, I nested my button inside two parent elements
- Perhaps one button will suffice, oh I was "thinking in React" - or may be I could have created one button after all - or...
- Do you really need that many containers?
- Responsive works, but how responsive do I want it to be?
- To flex wrap or not to wrap?
... and the list goes on.

## How This Can Help Me

Some notes and takeaways for myself includes answering and exploring contexts for the question like the ones written above. And it also makes me consider taking more time planning out my code. For example, 40 versus 20 minutes to make room for considering tougher edge cases.

Hold on to your hats for a double posting since I posted later about this one. Onto the next challenge!
Where do you host server-side code?
Tags: webdev, discuss, hosting
Published: 2020-09-16 05:53:49

---
title: Where do you host server-side code?
published: true
description: 
tags: webdev, discuss, hosting
cover_image: https://softwarebrothers.co/blog/content/images/2019/10/Blogpost-1.png
---
A while ago I created a [discussion](https://dev.to/madza/where-do-you-host-static-sites-5a09) on static sites and you gave some extended insights on options available 👍

Often you need to expand the functionality of the site, and that's where you write some server-side code. Where do you host it?

I'm aware of options like [Heroku](https://www.heroku.com/), [Vercel](https://vercel.com/), [AWS](https://aws.amazon.com/), [Google Cloud](https://cloud.google.com/) and [Digital Ocean](https://www.digitalocean.com/). Which one do you prefer and why do you like it?
Learn algorithms
Tags: java, algorightms, logic, programming
Published: 2020-09-16 05:44:43

Let me introduced you "Algorythms of the night".
The repo with a list of awesome algorithms that help you to solve your code issues or can help you in interviews if you are looking for a new job.

This repo is fully educational. It serves for education or practice.

Feel free to contribute.

By the way, you can follow Instagram account instagram.com/awesome_algorithm/

Repo: github.com/massoprod/algorythm-of-the-night
Regional Air Quality with Arduino Explore IoT Kit
Tags: arduino, iot, javascript, airquality
Published: 2020-09-16 05:33:38

Arduino just released their new cloud-enabled "Explore IoT Kit" with a board full of sensors and actuators.

I had the opportunity to work with the kit beforehand in a workshop sponsored by [Heroku](https://dev.to/heroku) as part of the [CascadiaJS](https://dev.to/cascadiajs) 2020 remote conference.

In my [Regional Air Quality with Arduino Explore IoT Kit](https://www.briangershon.com/blog/arduino-iot-explore-kit-getting-started-air-quality-sunrise-sunset/) blog article, I'll walk through what the kit contains, how to get started, provide links to example code, discuss some helpful information I found along the way, and wrap up with a Thank You to the workshop organizers.
AWS
Tags: aws
Published: 2020-09-16 05:25:05

Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user.

During the 1960s, the initial concepts of time sharing became popularized via RJE (Remote Job Entry), this terminology was mostly associated with large vendors such as IBM and DEC.

Cloud computing appears as early as 1996, with the first known mention in a Compaq internal document.

In August 2006, Amazon created subsidiary AMAZON WEB SERVICES and introduced its Elastic Compute Cloud. This cloud computing was popularized with Amazon.com.

AMAZON WEB SERVICES (AWS) is the world’s most comprehensive and broadly adopted cloud platform , offering 212 services from data centers globally. Millions of customers – including largest enterprises, the fastest- growing start-ups and leading government agencies are using AWS to lower cost ,become more agile and innovate faster.

AWS provides cloud computing platforms and APIs on a pay  as- you-go basis( also free tire is available for first 12 months) . Subscribers pay for OS/software/networking/availability and service options.

AWS is designed to help you build secure, high-performing, resilient, and efficient infrastructure for your applications. It defines user permissions and identities, infrastructure protection and data protection measures for a smooth and planned AWS adoption strategy. It gain visibility into your organization’s security posture with logging and mentoring services. Ingest this information into a scalable platform for event management, testing and auditing. It automated incident response and recovery to help shift the primary focus of security teams from response to analyzing root cause. It leverages event driven automation to quickly remediate and secure your AWS environment in near real time.AWS offers 210 security, compliance, and governance services and key features which is about 40 more  than the next largest cloud provider.

AWS container services run on the best global infrastructure with 69 Availability Zones across 22 Regions.

AWS is constantly adding new capabilities so you can leverage the latest technologies to experiment and innovate more quickly.
End of an era ⌛
Tags: javascript, webdev
Published: 2020-09-16 05:11:19

Moment.js, a library to parse, validate, manipulate, and display dates in javascript, is now deprecating itself, and encouraging developers to use a modern alternative.

Here's the complete blog about it https://momentjs.com/docs/#/project-status

Brief comparison of some alternatives:

| Name                                     | Size original/gzipped            | Tree-shaking | Popularity (stars) | Methods richness | Pattern    | Timezone Support   | Locale |
|------------------------------------------|----------------------------------|--------------|--------------------|------------------|------------|--------------------|--------|
| [Luxon](https://moment.github.io/luxon/) | 59.9K/17.2K                      | No           | 10k                 | High             | OO         | Good (Intl)        | -      |
| [date-fns](https://date-fns.org/)        | 78.4k/13.4k without tree-shaking | Yes          | 23.6k              | High             | Functional | Good (date-fns-tz) | 64     |
| [dayjs](https://github.com/iamkun/dayjs) | 6.5k/2.6k without plugins        | No           | 29.8k              | High             | OO         | Good (Intl)        | 138    |

*Cover photo by [Kevin Ku](https://unsplash.com/@ikukevk) on [Unsplash](https://unsplash.com/)*
[PHP artisan cache clear] Laravel Clear Cache Using Artisan
Tags: laravel
Published: 2020-09-16 05:02:51

```
//Clear route cache:
 Route::get('/route-cache', function() {
     $exitCode = Artisan::call('route:cache');
     return 'Routes cache cleared';
 });

 //Clear config cache:
 Route::get('/config-cache', function() {
     $exitCode = Artisan::call('config:cache');
     return 'Config cache cleared';
 }); 

// Clear application cache:
 Route::get('/clear-cache', function() {
     $exitCode = Artisan::call('cache:clear');
     return 'Application cache cleared';
 });

 // Clear view cache:
 Route::get('/view-clear', function() {
     $exitCode = Artisan::call('view:clear');
     return 'View cache cleared';
 });
```

[Laravel Clear Cache Using Artisan](https://www.phpcodingstuff.com/blog/laravel-clear-cache.html)
Tried to clone the react-credit-cards npm package
Published: 2020-09-16 04:58:32

I was working on this small but fun project in React, using hooks. Tried to replicate the react-credit-cards npm library as close as possible. Not the perfect one. But I'm learning and shared with you all!

Link - https://codesandbox.io/s/zen-galileo-og82y?file=/src/Components/Card/Card.jsx
Django Rails or Laravel? My personal journey part 3
Tags: python, ruby, php
Published: 2020-09-16 04:56:21

---
title: Django Rails or Laravel? My personal journey part 3
published: true
description: 
tags: Python,Ruby,PHP
//cover_image: https://direct_url_to_image.jp
series: Django, Rails or Laravel?

---
Hi, this is the third part of my review.

Today I will share my experience with Ruby on Rails. At first, Rails was not under my radar, in fact I have to admit that I didn't even know this framework existed. By hearing about it with passion in blogs and on different discussion groups, I decided to expand my research and get to know Rails.

I quickly fell in love with the Ruby language and the Rails framework. They say Ruby and Rails were designed for developer enjoyment and I totally agree with that. I quickly understood why several developers talk about it with passion.

Between Django, Rails, and Laravel, I found Rails to be the easiest to learn. Some blog reviewers say there are a lot of conventions to learn and that can make it a bit trickier at first. I don't agree. There is nothing more to learn in Rails than in Django or Laravel. In fact to start I would say that there is even less to learn and understand than other frameworks.

The designers of Ruby on Rails thought of the developer first and included a lot of shortcuts that skip a lot of configuration code.

The philosophy behind Ruby on Rails is to become Monolith King. That is to say, allow the developer to build a full stack application entirely in Rails from A to Z.

Ruby is also a very nice programming language and very easy to learn the basics. It reads like written English.

I have nothing bad to say both in terms of speed of development, fun and performance. Anything that can be done in Django and Laravel can be done in Rails, generally done faster and more easily.

That said, one issue with Rails and Ruby vs. Django and Laravel is popularity. Python has a huge community, and PHP runs on a massive amount of web servers.

Rails and Ruby don't have that kind of popularity and it shows.

For example, many (gem) packages are outdated or lack proper documentation. Additionally, some rare packages available in php or python are not available in Ruby on Rails.

Official Rails documentation is complete but not as easy to search and read as Laravel and Django documentations. 

Last but not least, in my local community, Rails and Ruby are almost non-existent. Could be a problem if I need local resources later.

As you can see, after my testing I literally split in half. On the one hand, I really like the efficiency and the pleasure of working with Ruby on Rails, but on the other hand, the lack of popularity has consequences that can be detrimental in the medium and long term.

Since I'm in the start-up phase and everything remains to be learned and done, why would I choose a framework that is several times less popular? This is a question that I will have to answer before making my choice.

I wonder, for you would the popularity of a programming language influence you in your choice of framework?

That's all for today, don't miss my fourth part on Laravel.