teleren/devto huggingface dataset:
Building for Collaboration
Tags: devrel, productivity, showdev, datascience
Published: 2020-10-22 14:22:23

The feedback we’re most proud to consistently get from our customers is how Avo makes collaboration _across teams_ so much easier. Bringing together engineering as well as data and product team is no small feat and we are always working to continue streamlining that process. Creating the right workflow, that works for everyone involved, is how successful product companies today operate. We’re excited to tell you more about how to make collaboration within Avo even more seamless. 

‍
##Enable SSO on Your Workspace##
Anyone on your team can log in using SSO. There's no need to send invite links anymore, or set up each individual team member.

Contact us to set up your Google or SAML SSO and start collaborating more effectively!
‍

##Protect Main Branch##
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/26830ebf7uapq3zzl9vk.png) 

Worried about accidental changes being made on the main branch with this influx of new team members now on your Avo workspace? Configure your workspace to disable direct changes on the main branch – and require at least one approval from a colleague before a branch can be merged.


##Introducing Approval Workflows##
We are thrilled to tell you about our approval workflows. Have your peer reviewed to maintain the data quality you've worked so hard for.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/inhgkh2jtb1rddghly3d.gif)

If you're still working on a branch, keep it as a draft. Ready for review from your team? Ask them to review by updating the branch status to Ready for review. Happy with the suggested changes? Approve them!


##Add Branch Status##
Now you can update the status of your branch and notify all branch collaborators that the status just changed. Below is how we at Avo think of the approval workflow:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pat30xv1a8s6pugge6qx.png)


##And Finally, Comment on Specific Items‍##
On the branch review screen, you can now comment on specific items. This is one of our most highly requested features of them all, and it’s now live!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lvifoq5sjje4k3eymqs7.gif)
_Comment on specific item changes on the branch review screen 💬_


‍For future reference all discussions from the branch review screen are kept in context of the item after the branch has been merged.

‍

##Now Live!##
**Review workflows** are now live on all Avo workspaces, with approval workflows available for upgraded accounts.

[Get started today!](https://www.avo.app/onboarding/email)
Moving internal git repo to devops or github using PowerShell
Tags: git, devops, powershell, migration
Published: 2020-10-22 14:19:38

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wupk5bi5ro38rgdnoi1w.png)
I just started working with a new customer, to help them modernize their software development. One of the first tasks we decided on was to discontinue their use of Atlassian Stash for managing their repositories, and move to Azure DevOps so we could use both repos and pipelines.

Our first issue was that the Stash server didn't have an internet reachable endpoint, it was only available on the internal network. The second was that over the years with somewhat unplanned git usage there was a huge amount of branches they needed and wanted for historic purposes, so the only option was to move everything, all branches.

I didn't find any good tools to automate this, to move everyting, of the box so I decided to write a couple of powershell functions to help me. 
First, a function for checkout of the stash branches to my workstation, then a function to push them to an Azure Repo.

I had already cloned the repository from Stash so it was set up with the stash repo url as origin so the first function loops through all branches and checks out all remotes/origin branches.

```powershell
function CheckoutAllBranches() 
{

$branches = git branch --all

    foreach($branch in $branches)
    {
        if ($branch -like "*remotes/*") 
        {
            $branchName = $branch -replace "remotes/origin/" -replace ""
            $gitCheckout = "/c git checkout " + $branchName
            Start-Process cmd -Argument $gitCheckout -Wait
            Write-Host('checkedout branch: '+ $branchName )
       }
    }
}
```

The second function loops through all the local branches and pushes them to the Azure Repo.

```powershell
function PushToDevops() 
{
    $makeRemote = git remote add devops [url_to_azure_repo] 
    $branches = git branch
    foreach($branch in $branches)
    {
        $gitPush = "/c git push devops " + $branch 
        Start-Process cmd -Argument $gitPush -Wait
        Write-Host('pushed branch: '+ $branchName )
    }
}
```
I saved them to a ps1 file and executed the ps1 script file. I then cd'ed into the folder where I cloned the stash repo and run the checkout function:

```powershell
d:\repos\myrepo\>CheckoutAllBranches
```
Depending on how many branches you have - just wait. When It's done run the  second function

```powershell
d:\repos\myrepo\>PushToDevops
```
Pretty simple, but I haven't found any better tool that will let med move a big repository from private on-prem to external repo.
Agile Manifesto: 12 Principles
Tags: agile
Published: 2020-10-22 14:19:34

#The following 12 Principles are based on the Agile Manifesto

1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

2. Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage.

3. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.

4. Business people and developers must work together daily throughout the project.

5. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.

6. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.

7. Working software is the primary measure of progress.

8. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.

9. Continuous attention to technical excellence and good design enhances agility.

10. Simplicity–the art of maximizing the amount of work not done–is essential.

11. The best architectures, requirements, and designs emerge from self-organizing teams.

12. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.

That's all

Source: https://www.agilealliance.org/agile101/12-principles-behind-the-agile-manifesto/
Moq and how creating Mocks with Linq
Published: 2020-10-22 14:17:26

There is a not so known feature in _**Moq**_ library and is the possibility to create our Mocks with _Linq_.

Benefit to use _Linq_ to create our mocks:
* Remove boilerplate code
* Removing `Setup()`call for each member we want configurate
* Remove calling `.Object` when we use the object mocked
* We still able to Verify our mocks

So, let’s see an example 😎


### Simple & hierarchy/recursive properties
```csharp
var id = 32;
var username = "Andres";
var street = "14th Street NW";

var userModel = Mock.Of<IUserModel>(user =>
	user.Id == id &&
	user.Username == username &&
	user.Address.Street == street
);
```

### Methods with any parameter matching
```csharp
var userModel = Mock.Of<IUserModel>();
var userList = Fixture
	.Build<UserModel>()
	.With(x => x.Address, Fixture.Create<Address>())
	.CreateMany(10).ToList<IUserModel>();

var repository = Mock.Of<IRepository>(x =>
	x.Add(It.IsAny<IUserModel>()) == true &&
	x.Add(userModel) == false &&
	x.ActiveUsers() == userList
);
```

### Verify methods
```csharp
var userAdded = repository.Add(Mock.Of<IUserModel>());

var mock = Mock.Get(repository);

mock.Verify(user => user.Add(It.IsAny<IUserModel>()), Times.Once);
```

*** 
What do you think? will you start using _Linq_ to write your _Mocks_?


Fell free to share your thoughts on the comments 😎 💪
#004 Netlify & NameCheap: How to configure Netlify custom domain DNS on your NameCheap domain?
Published: 2020-10-22 14:13:41

Follow these steps to point your domain name from Namecheap domain to the Netlify nameservers:

- Having logged into Namecheap account, go to your Domain List -> click 'Manage' next to the domain website.com -> locate the 'Nameservers' section;
- Choose ‘Custom DNS’ in the drop-down menu;
- Fill in your custom nameservers into empty lines;
4 lines in total :

dns1.p07.nsone.net
dns2.p07.nsone.net
dns3.p07.nsone.net
dns4.p07.nsone.net

- Save changes using a checkmark icon next to the nameservers.

It may take 24-48 hours for the DNS changes to be accepted globally. Please give it some time to propagate.
Find that flaky test
Tags: ruby, bash, testing
Published: 2020-10-22 14:12:03

A simple way to find that flaky test while you go do other things. This will run your tests over and over until it fails, at which point it will print the number of times the tests passed and open the output from the failing test run.

`while rspec path/to/test_spec.rb > /tmp/last_run; do printf .; done | wc -c; less /tmp/last_run`

`rspec path/to/test_spec.rb > /tmp/last_run` runs the tests and writes output to a tmp file.

`while` will loop if the test run passes and stop looping on a failure.

`do printf .` prints a single '.' on a test pass.

`| wc -c` reads the string of '.' and counts them.

`less /tmp/last_run` displays the last_run, which will be the failure.
Just so much... stuff
Tags: apps, bloat
Published: 2020-10-22 14:10:50

##How many apps do you have on your phone right now? 

On average, most people have between 60 and 90 apps installed on their phone at any one time. Me? I have 206...

Two hundred. And six. 😲

The next question would be, do I use all of them? I checked my **App Usage Stats** app and it turns out, that over a 7 day period, I used the following:

1. Whatsapp 48%
2. Instagram 9%
3. Rightmove 8% (I am currently trying to buy a house)
4. Chrome browser 7%
5. Prime video 5%
6. YouTube 4%
7. Podcasts app 4%
8. Strava 3%
9. The phone 3%
10. Ebay 3%
11. Monzo 3%
12. Twitter 3%

Which lead to some interesting insights. First of all, I'm apparently a lot chattier with people than I thought, secondly I watch a lot less online video than I would have predicted but most importantly, there are 175 apps (206 minus the listed 12, minus 10% for apps which cant be removed) not on the above list and therefore not being used. They are just sat there potentially taking up precious battery bars and nibbling away at my data plan in the background. Not to mention taking valuable space I could be using for pictures of my cat.

![Marti cat](https://dev-to-uploads.s3.amazonaws.com/i/qgaigcklrtqes1akp0d9.jpg)
Now, please excuse me while I go away and uninstall 175 apps.
Code Smell 03 - Functions Are Too Long
Tags: codenewbie, beginners, programming, 100daysofcode
Published: 2020-10-22 14:06:30

*Humans get bored beyond line 10.*

> TL;DR: Refactor and extract functions longer than 5 lines.

# Problems

- Low Cohesion
- High coupling
- Difficult to read
- Low Reuse

# Solutions

1) Refactor

2) Create small objects dealing with some tasks. Unit test them.

3) Compose methods 

# Examples

- Libraries

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/1f12fb2d0cb9f8eea202526597cf4b83)
```php
<?

function setUpChessBoard() {

    $this->placeOnBoard($this->whiteTower);
    $this->placeOnBoard($this->whiteKnight);
    //A lot of lines
    //.....
    $this->placeOnBoard($this->blackTower);
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/0f66ce8c2bba8990e44a36495fa4c3e1)
```php
<?

function setUpChessBoard() {
    $this->placeWhitePieces();
    $this->placeBlackPieces();
}
```

# Detection
All linters can measure and warn when methods are larger than a predefined threshold.

# Relations

# Also Known as
- Long Method

# More info

- [Refactoring Guru](https://refactoring.guru/es/smells/long-method)

# Tags

- Complexity

# Conclusion

Extract long method into smaller pieces. Break complex algorithms in parts. You can also unit test these parts.

# Credits

Photo by <a href="https://unsplash.com/@invisibleecho">Hari Panicker</a> on <a href="https://unsplash.com/s/photos/long-road">Unsplash</a>

* * *

> Programs are meant to be read by humans and only incidentally for computers to execute.

_Donald Knuth_

{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}

*Last update: 2021/06/01*
#003 How to run SQL server on ubuntu; how to (re)start SQL server on ubuntu; how to stop SQL server on ubuntu
Tags: sql, ubuntu
Published: 2020-10-22 14:03:28

#1 Install it first: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017

#2 Check:
```
~$ sudo systemctl status mssql-server
```
#3 Do what you need:
```
~$ sudo systemctl stop mssql-server
~$ sudo systemctl start mssql-server
~$ sudo systemctl restart mssql-server
```
#002 How to install MS SQL on Ubuntu Server 18.04
Published: 2020-10-22 13:58:34

#Installation

The first thing to do is import the necessary repository key. From the terminal window, issue the following command:
```
sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
```
Next, add the repository with the command:
```
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-preview.list)"
```
Update apt with the command:
```
sudo apt-get update
```
And, finally, install MS SQL with the command:
```
sudo apt-get install mssql-server -y
```
#Configure MS SQL server
Once the installation completes, you then need to run a setup script and answer the required questions. The script is run with the following command:
```
sudo /opt/mssql/bin/mssql-conf setup
```
After answering all of the questions (which includes creating an admin password), you will then need to restart the MS SQL server with the command:
```
systemctl restart mssql-server.service
```
#Installing the command line tools
You now have a working MS SQL Server. However, in order to work with it you must install the necessary command line tools. To do this, issue the following commands:
```
sudo apt-get install curl -y
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update 
sudo apt-get install mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
```
Where PASSWORD is the password you set up during the MS SQL installation.

That's it. You're ready to begin working with your MS SQL Server on Ubuntu 18.04. It would work on the new version, try it and comment if you have an update or a better solution.
How important is Salesforce Consulting for your CRM implementation?
Tags: crmimplementation, salesforceconsulting
Published: 2020-10-22 13:56:38

A customer is the backbone of any organization. This requires a substantial investment for any business in order to maintain good relationships with its customers. Any small mistake in dealing with customers can put a company on the brink of closure, which is detrimental. With this in mind, it is imperative for any business to engage in viable customer relationship models that ensure current customers are retained in the business and attract new customers. A company must ensure that it is customer-oriented and that the customer pillar is strong and unshakable.

Competition is vital in all industries and this keeps all companies on their toes trying to maintain their niche. As a result of this competition, many business models have emerged to help with customer relationship management. One of these models is the customer relationship management (CRM) model. Synchronize, organize and automate business processes using technology. These business processes may include sales activities, technical support, and customer marketing services.

CRM is a practice that, when implemented successfully, reduces the overall costs of marketing operations and customer service. It is part of the commercial strategy of the company and the company must be careful in the implementation phase as it affects the entire commercial dimension. This requires [Salesforce consulting](https://www.cloudanalogy.com/salesforce-consulting-services/) for CRM implementation. It is imperative that the company consult its sales representatives before implementing a CRM. A company can outsource Salesforce consulting to consulting firms or the company can do it internally.

The company must make sure to choose the best company because the better the company, the more successful the implementation phase. You must verify the effectiveness and efficiency of the available companies, the good contractual conditions and the overall success of the company in the previous commitments. Outsourcing salesforce advice for [CRM implementation](https://www.cloudanalogy.com/salesforce-implementation/) can be less expensive than setting up an internal department to do the same.

The company can also establish an internal service to provide advice to the sales force for the implementation of CRM. This has the advantage of allowing the company to control the entire implementation process. It also improves business flexibility as you can operate at your own pace. However, it costs the company a lot of money as it has to create new departments and hire new employees to carry out the implementation.

A CRM system has critical benefits that a company can accumulate during its implementation. It contributes quality and efficiency to the relationship with the company's client, reduces the company's general costs and, therefore, increases profitability. All companies are encouraged to use the system to stay in today's competitive market.
Mah Hacktober 2020
Tags: hacktoberfest
Published: 2020-10-22 13:48:05

## What I Learned From Hacktoberfest

<!-- What did you learn that can help others contribute to the project you worked on? What did you learn that can help the users of that project?! -->
I've used Git before, but this time it's a lil bit different.
I want people to see what I achieved on my mini project, which is inspired by Alexa. And I want to share it with yall.
The module I used is pretty basic, 2 Google API, a NLP API, and AIML. The idea is, to feed AIML with template-based controlling sentence, then manual tag them in AIML. To seperate phrases, I used dependency tree. 
The accuracy is not that good, but maybe it's enough for your home project.
How many PRs you created in the Hacktober Fest 2020? ✨👩🏻‍💻
Tags: discuss, hacktober
Published: 2020-10-22 13:47:55

---
title: How many PRs you created in the Hacktober Fest 2020? ✨👩🏻‍💻
published: true
description: 
tags: discussion, Hacktober
//cover_image: https://direct_url_to_image.jpg
---

As Hacktober is going to end soon. What is your current score in Hacktober 2020?

![](https://media.giphy.com/media/Tbj1X2js8WPOE/giphy.gif) 

--------

🤩 ***PR created :*** 232
🥳 ***PR Merged :*** 112
🧐 ***Under Review :*** 90

**Note:** *That's not my score of course but you can use this format to describe yours*
 
Also, Express you Hacktober Fest feelings in a gif 😅 (oh that will be fun).

-------------------

This is mine. 😂

![](https://media.giphy.com/media/xULW8PxkpgZDQkXmak/giphy.gif)
#001 How to install Vivaldi Browser on Ubuntu 18.04 Bionic Beaver Linux
Tags: linux, vivaldi
Published: 2020-10-22 13:45:27

---
title: #001 How to install Vivaldi Browser on Ubuntu 18.04 Bionic Beaver Linux
published: true
description: 
tags: #linux #vivaldi
//cover_image: https://direct_url_to_image.jpg
---

---
## How to install Vivaldi Browser on Ubuntu 18.04 Bionic Beaver Linux
### As a root you should do the following steps using your terminal:

1. Add Vivaldi repository:
```
$ wget -qO- http://repo.vivaldi.com/stable/linux_signing_key.pub | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=i386,amd64] http://repo.vivaldi.com/stable/deb/ stable main"
```
2. Install
```
$ sudo apt install vivaldi-stable
```
3. Start it
```
$ vivaldi
```
Done.
Learn Python List data structure in single video.
Tags: python, datascience
Published: 2020-10-22 13:36:13

{% youtube pPoWFgQOEKI %}

This video covers complete detail on Python lists. It starts with the information on how to create a list using square bracket notation as well as list function. Then, I explain about indexing elements of a list. Further, I talk about list slicing operation which are succinct method to get substring from the original string in Python. We can also use negative indices in Python lists.

I cover topics of Data Science, Machine Learning, Java programming and Data Engineering in my channel. If you like it, consider [subscribing](https://www.youtube.com/channel/UCu_nGQVE4vY8Lo7ItraJp8w?sub_confirmation=1)

Towards the later part of the video, I teach about how we can iterate through a list and how we can make use of the enumerate function to get index along with the actual element from the list. I also explain about the unpacking operation in Python lists.

I also walk through many of the important built-in methods to work with list datatypes. We learn about how we can insert an element and remove an element from a list. Also, we may need to search for an item in a list. For that, we can use the index method or we could also use Python "in" operator. I also explain a function sorted and a method to sort elements of a list in ascending or descending orders.

Finally, I give few practical examples of list comprehension. List comprehension provides elegant solution to writing loops, but this should be used only in simple cases. If we use it in complicated cases, it may reduce the readability of the code. We can also include guards in list comprehension to filter elements based on if expression.