teleren/devto huggingface dataset:
What’s More Essential for Developers to Focus On: Result or Process?
Tags: career, learning, mastery, discuss
Published: 2018-10-25 12:33:42

---
title: What’s More Essential for Developers to Focus On: Result or Process?
published: true
tags: career, learning, mastery, discuss
canonical_url: https://www.essentialdeveloper.com/articles/whats-more-essential-for-developers-to-focus-on-result-or-process
cover_image: https://thepracticaldev.s3.amazonaws.com/i/oml88ycefeiq353zzso2.png
---

{% youtube IoN-TbTdvJY %} [Watch on YouTube](https://www.youtube.com/watch?v=IoN-TbTdvJY)

In this video, I'd like to ask you an important question, but before that let me tell you what we believe to be one of the best skills a software developer can master: **Long-term vision**.

It might sound obvious, but in our experience, most developers focus on short-term gains in the endless pursuit of _Silver Bullets_ and _Magic Solutions_, when the fastest route is usually patience.

Why is the long-term so important? Most results in our life/career are asynchronous (good results take time) or are even out of our control. Instead of trying to control the result, we can visualize what the result can be (the long-term vision) but **focus on the process to get there**. Even better, be flexible and welcome changes along the way!

For example, **[Test Driven Development](https://www.essentialdeveloper.com/professional-ios-engineering-season-1)** is a discipline that can give you control over the development process. For TDD to work, it's required consistency. **[Consistency is the key](https://www.essentialdeveloper.com/articles/the-importance-of-discipline-for-ios-programmers).** Consistency is the focus on the process. TDD is just an example, you can choose your own preferred process. But follow the process. Every day.

Now, the important question I want to ask you: Right now, do you focus more on the result or the process to get there?

[Subscribe now to our Youtube channel](https://www.youtube.com/essentialdeveloper?sub_confirmation=1) and catch **free new episodes every week**.

* * *

We’ve been helping dedicated developers to get from low paying jobs to **high tier roles – sometimes in a matter of weeks!** To do so, we continuously run and share free market researches on how to improve your skills with **Empathy, Integrity, and Economics** in mind. If you want to step up in your career, [access now our latest research for free](https://www.essentialdeveloper.com/courses/career-and-market-strategy-for-professional-ios-developers).

* * *

Originally published at [www.essentialdeveloper.com](https://www.essentialdeveloper.com/articles/whats-more-essential-for-developers-to-focus-on-result-or-process).


## Let’s connect
If you enjoyed this article, visit us at [https://essentialdeveloper.com](https://essentialdeveloper.com) and get more in-depth tailored content like this.

Follow us on: [YouTube](https://youtube.com/essentialdeveloper) • [Twitter](https://twitter.com/essentialdevcom) • [Facebook](https://facebook.com/essentialdeveloper) • [GitHub](https://github.com/essentialdevelopercom)
Angular vs NPM vs Node.js
Tags: angular, node, npm
Published: 2020-02-19 19:55:39

---
title: Angular vs NPM vs Node.js
published: true
tags: Angular,Node.js,NPM
canonical_url: https://www.code4it.dev/blog/angular-vs-npm-vs-node-js
cover_image: https://res.cloudinary.com/bellons/image/upload/t_dev-to/Code4IT/Covers/npm-angular-node.jpg
---


There's a lot of confusion about Node.js, NPM and Angular. These 3 "entities" are often used together, especially for Angular applications, but they are not the same thing.

Let's make it clear!

![Typical structure of an Angular Application](https://dius.imgix.net/2015/01/Screen-Shot-2015-02-17-at-12.04.46-pm.png)


## Node.js

Node.js is a __server environment__ based on JavaScript. You can download it from the [official site](https://nodejs.org/) and run it on Windows, Linux, Mac, etc.

__Node.js uses asynchronous programming__: while a typical server handles one request per time (thus creating overhead while waiting for the request completion), Node.js accepts all the request and handles them one by one in a manner that does not block other requests. This is obviously very efficient.

## NPM

[NPM](https://www.npmjs.com/package/npm) is the package manager for Node.js packages. It contains thousands of free packages available to download; also, via command line, it's easy to download and update those packages.

NPM is commonly used with Node.js, so it is installed with the server environment.

The way to install a package is with the command `npm install <package_name>`.

## Angular

Angular is a framework based on JavaScript that makes it easy to build applications for the web. Often you'll see Angular applications written in Typescript, a modern class-oriented language based on JavaScript. The result is the same: Typescript is compiled into JavaScript, so they are interchangeable. Well, at least the latest versions of JS, because types and decorators are required in order to, respectively, use _dependency injection_ and set metadata.

Being based on JavaScript - guess what? - it fits perfectly with Node.js. And of course NPM, that allows you to download JavaScript packages to include in the project.

## Wrapping up

Now we know what Node.js, NPM and Angular are, and how they fit together.

Node.js is just the server that handles the requests from the web page; these pages can call web APIs from whatever kind of server, and of course look up to data in any type of DB.
ClassicPress launches - alpha version ready for testing
Tags: wordpress, opensource, php, showdev
Published: 2018-10-25 10:14:51

---
title: ClassicPress launches - alpha version ready for testing
published: true
description: ClassicPress is a hard fork of WordPress that focuses on the business market
tags: WordPress, Opensource, PHP, showdev
---

![https://www.classicpress.net/download/](https://thepracticaldev.s3.amazonaws.com/i/14nhutn6e5t0ilrn0dpp.png)

# ClassicPress is here!

After hundreds of hours of intense work by dozens of volunteers, I'm extremely excited to announce the [first alpha release](https://www.classicpress.net/download/) of ClassicPress, codenamed Sunrise.

ClassicPress is a business-focused fork of WordPress that is powerful, versatile and predictable.

This is a huge step forward in being ready for version 1 (release dates will be announced by the end of the month). To make sure we release a production-ready version of ClassicPress we need to make sure everything has been thoroughly tested. 

Can you help test ClassicPress? 

Visit [https://www.classicpress.net/download/](https://www.classicpress.net/download/) to get started
What is your favorite way to find the hottest packages?
Published: 2018-10-25 10:06:33

---
title: What is your favorite way to find the hottest packages?
published: true
description: Nowadays one of the main skills of a developer is to find right library/package/tool. Otherwise, months or even years of work can be wasted.
tags: 
---

Hi there!

Nowadays one of the main skills of a developer is to find right library/package/tool. Otherwise, months or even years of work can be wasted.

Of course, there are some most obvious ways to find popular/trending stuff:
- Google (searching subjects you are interested in)
- Github (trending, observing what your followees like)
- Twitter (you should subscribe to industry activists)

However that's well known things. But there have to be other approaches. For instance, there is cool Chrome extension I found few months ago:
- [GitHunt](https://github.com/kamranahmedse/githunt)

But maybe there is more?
How do you find the right tools for your work?
WordPress Plugin Boilerplate Powered 3.0 – I, Developer
Tags: dev, wordpress
Published: 2018-10-25 08:33:33

---
title: WordPress Plugin Boilerplate Powered 3.0 – I, Developer
published: true
tags: dev,Wordpress
canonical_url: https://daniele.tech/2018/10/wordpress-plugin-boilerplate-powered-3-0-i-developer/
---

After 4 years of development a new major version, with a lot of improvements from code organization to composer support!

The post [WordPress Plugin Boilerplate Powered 3.0 – I, Developer](https://daniele.tech/2018/10/wordpress-plugin-boilerplate-powered-3-0-i-developer/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
CodeTip - Javascript: Pseudomandatory parameters in es6 functions
Tags: codetip, javascript
Published: 2018-10-25 07:20:14

---
title: CodeTip - Javascript: Pseudomandatory parameters in es6 functions
published: true
description: 
tags: codetip, js, javascript
---

In many programming languages, the parameters of a function are by default mandatory and the developer has to explicitly define that a parameter is optional. In Javascript, every parameter is optional, but we can enforce this behavior without messing with the actual body of a function, taking advantage of [es6’s feature of default values for parameters.](http://exploringjs.com/es6/ch_parameter-handling.html#sec_parameter-default-values)

```js
const _err = function(message) {
  throw new Error(message);
}
 
const getSum = (a = _err('a is not defined'), b = _err('b is not defined')) => a + b;
 
getSum(10); // throws Error b is not defined
```

`_err` is a function that immediately throws an Error. If no value is passed for one of the parameters, the default value is going to be used, `err` will be called and an Error will be thrown. You can see more examples for the [default parameters feature on Mozilla’s Developer Network.](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/default_parameters)
Null Object Pattern
Tags: designpatterns, javascript, ruby
Published: 2018-10-25 05:13:27

---
title: Null Object Pattern
published: true
description: design patterns, null object pattern
tags: design patterns, js, javascript, ruby
---

Many times functions accept object references that can be null, and we tend to add if statements to treat the special case where null is passed to a function, and either provide a default response or do nothing. In the following example our calculateSpeed function expects an object that has a getSpeed function. In Javascript we will have to do something like:

```js
class Car {
  getSpeed(){
    return 100;
  }
}
 
 
const calculateSpeed = function(vehicle){
  if(vehicle && typeof vehicle.getSpeed === 'function'){
    return vehicle.getSpeed();
  } else {
    return 50;
  }
}
 
const car1 = new Car();
 
console.log(calculateSpeed(car1)); // 100
console.log(calculateSpeed()); // 50
```

But there is a better way to achieve that. Using the [Null Object Pattern](https://en.wikipedia.org/wiki/Null_object_pattern) we can create a class that acts as vehicle, lets call it `DefaultMovable`.

```js
class DefaultMovable {
  getSpeed(){
    return 50;
  }
}
```

Our `DefaultMovable` class provides the default functionality (aka the else in our previous code snippet), that way we can avoid the if/else statement.

```js
class Car {
  getSpeed(){
    return 100;
  }
}
 
class DefaultMovable {
  getSpeed(){
    return 50;
  }
}
 
const calculateSpeed = function(vehicle = new DefaultMovable()){
  return vehicle.getSpeed();
}
 
const car1 = new Car();
 
console.log(calculateSpeed(car1)); // 100
console.log(calculateSpeed()); // 50
```

The UML diagram of this pattern will look like this:

<img src='https://thepracticaldev.s3.amazonaws.com/i/ac5vmqznoh60opulysdv.png' />

The same example in Ruby would look like:

```ruby
class Car
  def get_speed
    100
  end
end
 
class DefaultMovable
  def get_speed
    50
  end
end
 
 
def getSpeed(vehicle = DefaultMovable.new)
  vehicle.get_speed();
end
```


This is just a pattern and as every pattern it has its pros and cons, apply it thoughtfully based on your use case. (The example is fictional for the shake of demonstrating the pattern)
CodeTip - Ruby: Compare class instances
Tags: ruby, compare, classes
Published: 2018-10-25 05:07:48

---
title: CodeTip - Ruby: Compare class instances
published: true
description: compare class instances in ruby
tags: ruby, compare, classes
---

In the [previous post](https://dev.to/avraammavridis/javascript--compare-class-instances-1i3f) I wrote about how to compare objects in Javascript. In Ruby we can do the same using the Comparable module. We include the comparable module in our class and we define a pseudooperator-method `<=>`. Let’s say we have again a Car class that looks like this:

```ruby
class Car
  attr :speed
 
  def initialize(speed)
    @speed = speed
  end
end
```

And now let’s make their instances comparable by including the Comparable module and defining the `<=>` pseudooperator.

```ruby
class Car
  include Comparable
  attr :speed
 
  def <=>(other)
    self.speed <=> other.speed
  end
 
  def initialize(speed)
    @speed = speed
  end
end
 
car1 = Car.new(100)
car2 = Car.new(120)
car3 = Car.new(90)
 
p car2 > car1 # true
p car3 > car2 # false
 
 
cars = [car1, car2, car3]
 
p cars.sort() # [#<Car:0x000055aec8add4b0 @speed=90>, #<Car:0x000055aec8add500 @speed=100>, #<Car:0x000055aec8add4d8 @speed=120>]
```
What is your motivation to use WebComponents?
Tags: discuss, javascript, webcomponents
Published: 2018-10-25 05:04:51

---
title: What is your motivation to use WebComponents?
published: true
description: 
tags: #discuss #javascript #webcomponents
---

If you have already started to write WebComponents code in production/personal use, please let me know what is your motivation to use it.

Because it's standard? Don't want to use react/vue? Or other reason?
3 GIT productivity features explained
Tags: devtips, productivity, git
Published: 2018-10-25 04:42:08

---
title: 3 GIT productivity features explained
published: true
description: 
tags: devtips, productivity, git
---

I know there are some people in the community that use GIT on a day-to-day basis but only commit/pull/push while omitting some of the more useful features of it. I present to you 3 useful features, all related to committing, that will help your productivity and ease of change.

## 1) `git stash`

This is the simplest way to put what you have been working on away for a second in favor of an urgent bug fix. All you have to do is:

```
git stash
... do whatever it is needed to fix an urgent bug fix or whatever else
git stash pop
```

After you `git stash` all your uncommitted changes go away in a temporary place which you can re-apply using `git stash pop`.

## 2) Using multiple local branches

I know it has been said time and time again that anyone with a serious enough project should be using multiple branches for their project. That is not always true for all projects, but even so, if you only have one branch on the upstream it doesn't mean you can't use multiple branches on you own local repository. Here's how you do it:

```
git branch new-branch-name
git checkout new-branch-name
... commit whatever you want on this branch while keeping the main branch intact for more urgent modifications
git checkout master (or your main branch)
git merge new-branch-name
```

And voila! You have another way to quickly switch to another task if needed. Isn't that great?

## 3) Selective commits

Instead of committing all changes you can selectively choose which files go where using the `git add` command to add them and `git commit -m ...` to commit whatever you have added.

> Really mate? This is the "productivity tip" you're teaching? I have been using that since I was 5!

> I know I know, but bare with, I have made this mistake where I didn't know what the stage area was for and was always committing all my changes using `git commit -am ...`. I never knew there was an alternative for quite some time

With that said, here are the steps:

```
git add file_you_want_to_commit
git commit -m "Message properly explaining your changes"
git add another_file_you_want_to_commit
git commit -m "Another message properly explaining your changes"
```

That has been it for this tutorial. Hope you got something out of it. I have published a video explaining these features a bit more in-depth. You can check it out here:

{% youtube 0SqmKR_jA0A %}

What other features have you wished you knew when starting to use git?
Backing up data in RethinkDB
Published: 2021-03-04 22:04:36

---
title: Backing up data in RethinkDB
published: true
date: 2018-10-25 00:00:00 UTC
tags: 
canonical_url: https://ulisesavila.com/rethinkdb/backing-up-data
---

## Introduction

One recurrent task for database administrators is creating and applying back ups. In this tutorial you will learn how to do this task in a RethinkDB environment.

## Requeriments

- A running installation of RethinkdB.
- The python package `rethinkdb` installed to your machine with `pip`. The `import` tool is bundled in that package. It is recommended to use the Python 3 version package, as Python 2 is reaching its end of life soon.

## Setting up your data

Before creating a backup it is important to setting up the RethinkDB server, just do this steps quickly:

1. Open your Web Panel, it is located at `localhost:8080`
2. Go to the `Tables` section and add a database named `FinancialXchanges`.
3. In the database `FinancialXchanges` create a table named `Dollar`
4. 

Now go to the `Data Explorer` section and run the following query:

```
r.db('FinancialXchanges').table('Dollar').insert( [
{
"week": 26, "id": 1, "cad": 1.28837, "jpy": 109.89
},
{
"week": 27, "id": 2, "cad": 1.30979, "jpy": 109.89
},
{
"week": 28, "id": 3, "cad": 1.25588, "jpy": 106.751
},
{
"week": 29, "id": 4, "cad": 1.2483, "jpy": 104.709
},
{
"week": 30, "id": 5, "cad": 1.27785, "jpy": 108.165
},
{
"week": 31, "id": 6, "cad": 1.27459, "jpy": 107.137
},
{
"week": 32, "id": 7, "cad": 1.26657, "jpy": 108.987
}
] )
```

Now you have the required data to follow this tutorial

## Doing a backup

The command to create a backup is `dump`, by default it does a backup of all the server. To limit its scope use the `-e` option, you can choose the name of the backup with the `-f` option:

```
rethinkdb dump -e FinancialXchanges.Dollar -f backup1.tar.gz
```

Such file will be stored in your actual folder in your terminal session, you can `ls` to see your backup:

```
YOUR_USER@YOUR_DOMAIN:~# ls
backup1.tar.gz
```

After this go to your Web Panel and erase the `FinancialXchanges` database because you are going to restore in the next section.

## Restoring a backup

The tool to restore a backup is `restore`. Restore is a powerful tool that let us apply backups over secure tunnels for example or even point to a specific database and table. In your case you only backed up one simple database so you can run the clean command without any extra options:

```
rethinkdb restore backup1.tar.gz
```

RethinkDB will tell you the amount of data imported to your server.

To settle things up, run this query in the `Data Explorer` section in the Web panel to list the contents of your restored table and database:

```
r.db('FinancialXchanges').table('Dollar')
```

You should be able to see the original data that you created steps before.

## Conclusion

As you saw managing back ups in RethinkDb is fairly easy. After this tutorial it is recommended to play with the different options of both `dump` and `retore` commands, so you can understand the different options that those command can offer to you.
Web Workers in React + Redux application
Tags: javascript, discuss, opensource
Published: 2018-10-24 23:51:06

---
title: Web Workers in React + Redux application
published: true
description: Run scripts in background threads and perform tasks without interfering with the user interface. 
tags: javascript, discuss, opensource
---

![Photo by Ben Konfrst on Unsplash](https://thepracticaldev.s3.amazonaws.com/i/jnrj7gxv8z34f45yuzbx.jpeg)


If you are interested in using [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker) in React+Redux application.

Read this article

https://hackernoon.com/web-workers-in-react-redux-application-129274e84a4e
SharePoint 2016: Changing logo for all sites in a site collection using PowerShell
Tags: sharepoint2016, sharepoint, powershell
Published: 2018-10-25 20:06:56

---
title: SharePoint 2016: Changing logo for all sites in a site collection using PowerShell
published: true
tags: SharePoint 2016,SharePoint,PowerShell,SharePoint2016
canonical_url: https://blogit.create.pt/miguelisidoro/2018/10/24/sharepoint-2016-changing-logo-for-all-sites-in-a-site-collection-using-powershell/
---

The post [SharePoint 2016: Changing logo for all sites in a site collection using PowerShell](https://blogit.create.pt/miguelisidoro/2018/10/24/sharepoint-2016-changing-logo-for-all-sites-in-a-site-collection-using-powershell/) appeared first on [Blog IT](https://blogit.create.pt).

Hello,

In a SharePoint 2010 to SharePoint 2016 migration project I was recently involved in, I noticed that in the new SharePoint 2016 Portal, the logo URL in all sites was pointing to an invalid URL.

# The Problem

The reason for this is that the Logo URL was pointing to a URL in the SharePoint hive (\_layouts virtual directory) and the \_layouts virtual directory URL has changed from SharePoint 2010 to SharePoint 2016:

- SharePoint 2010 Layouts root virtual directory URL: /\_layouts
- SharePoint 2016 Layouts root virtual directory URL: /\_layouts/15

# The Solution

Since the site collection has a lot of subsites and I would like to avoid having to change the logo URL manually one by one, I built a small PowerShell script that will loop all the sub sites in the site collection and change the Logo URL for each one. Here is the script:


$sitelogo = "/_layouts/15/Images/logo.jpg"

$site = "https://intranet"

$sites = new-object Microsoft.SharePoint.SPSite($site)

foreach ($web in $sites.Allwebs) {

$webUrl = $web.Url

"Changing site logo url at $webUrl"

$web.SiteLogoUrl = $sitelogo

$web.Update()

}

$sites.Dispose()


If you are a SharePoint developer or administrator and want to learn more on how to install a SharePoint 2016 farm in an automated way using PowerShell click [here ](https://dev.to/mlisidoro/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-1-54m5)and [here](https://dev.to/mlisidoro/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-2-5e36).

If you want to know all about SharePoint 2019, the upcoming version of SharePoint Server, click [here](https://dev.to/mlisidoro/sharepoint-server-gets-modern-sharepoint-2019-is-here-194f).

If you are new to SharePoint and Office 365 and want to learn all about it, take a look at these [learning resources](https://dev.to/mlisidoro/sharepoint-and-office-365-learning-resources-162e).

**NOTE:**  This script should also be valid for SharePoint 2013 and SharePoint 2019.

Hope this helps!

Happy SharePointing!


The post [SharePoint 2016: Changing logo for all sites in a site collection using PowerShell](https://blogit.create.pt/miguelisidoro/2018/10/24/sharepoint-2016-changing-logo-for-all-sites-in-a-site-collection-using-powershell/) appeared first on [Blog IT](https://blogit.create.pt).