teleren/devto huggingface dataset:
Learn Dart #7: Setup VS Code for development in under 30 seconds
Tags: dart, vscode, webdev, beginners
Published: 2018-11-15 10:48:49

In today's quick tip, we will see how to set up Visual Studio Code to develop your Dart projects. It's as straightforward as installing some packages and we're good to go!

Learn more in the video below:
{% youtube 8kFuE8xdDgg %}
→ [**Watch on YouTube**](http://bit.ly/2FpjFaw)

---

**Subscribe to [my YouTube channel](http://bit.ly/2P2N1jC) for more videos on Dart**. Thanks!

**Like, share and [follow me](https://twitter.com/creativ_bracket)** 😍 for more content on Dart.

## Further reading:

* [**Dart Code** – Dart and Flutter support for VS Code](https://dartcode.org/)
* [**Full-stack Web Development with Dart**](http://bit.ly/2P2N1jC)
Using Codacy for automated code reviews
Tags: productivity, beginners, career, devtips
Published: 2018-11-15 10:06:15

---
title: Using Codacy for automated code reviews
published: true
description: A tool for automated code reviews
tags: #productivity #beginners #career #devtips
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ge6n3ngcpbj442a0t5s1.jpg
---

Whether you are a solo developer who wants to improve your code quality or a team of developers who want to have automated code reviews and standards, [Codacy](https://Codacy.com) could just be the right choice. 

With Codacy you could automatically identify issues through static code analysis. Get notified on security issues, code coverage, code duplication and code complexity in every commit and pull request. 

Integrating Codacy into your workflow is quite simple:

1) Add your git repository

2) Codacy automatically detects issues with every push

3) Get notified of the issues and suggestions which you could take action on

Here are some extra goodies you get with Codacy:

You could define your quality threshold and make sure all teams and projects are publishing healthy and consistent code, Identify exactly which lines of code are being covered by your test suite and which aren’t.

##Pricing
Once I like a product, the next thing I rush to is pricing 😂

Codacy has a developer and startup-friendly pricing scheme. 

###Opensource plan
Codacy is forever free for all opensource projects.

###Pro plan $15-$18/month
This plan allows you have Private and public repositories, gives you higher priority and faster analysis and you get priority support.

###Enterprise plan $$
For this you get a custom plan tailored for your business with first-class security on your servers, you would have to contact Codacy for pricing details

###Startup 0$ (yep, you read that right)
For teams up to 4 users, you get everything in the Pro plan for free! This plan was not available before but was just recently added, you could take advantage of this opportunity if you're interested. 


##Supported languages

Here are the officially supported languages:
Scala
Java
JavaScript
Python
Ruby
PHP
Apex
JSP
XML
Velocity
VisualForce
C#
JSON
Kotlin
Markdown


Here are the community supported languages (languages added to Codacy by one of their users):
CoffeeScript
CSS
C/C++
Dockerfile
SASS
Shell Script
Swift
TypeScript
LESS
Go
SQL
Elixir
Powershell


 
{%youtube T06DxwyNxRo %}
REST API Automation using python unittest
Tags: python, testing, rest
Published: 2018-11-15 10:02:56

---
title: REST API Automation using python unittest
published: true
description: 
tags: python, testing, REST
---
[Automation framework](https://github.com/manojkken/RESTAPI-UnitTest-Framework)

This framework can be used to test your REST APIs . The end point used here as an example is: [reqres](https://reqres.in/) .
What trends of digital marketing shall we wait for in 2019?
Tags: marketingtrends, digitalmarketing, advertising, marketing
Published: 2018-11-15 09:23:57

---
title: What trends of digital marketing shall we wait for in 2019?
published: True
description: The post forecasts digital marketing trends in 2019 
tags: Marketing-trends, digital-marketing, advertising, marketing    
---

Marketing trends are intensively developing from year to year. All the spheres of marketing are changeable. Top marketing consultants forecast that innovated marketing strategies would be focused on video marketing. It is one of the core trends in 2019. At the same time images and texts wouldn’t loose its relevance completely. 
Online video would be one of the most powerful trends in digital marketing. The experts consider that its popularity will be high for a long time. By the way the researchers are sure that the youth prefer online video more than TV or images. 
Look for digital marketing trends 2019 here http://merehead.com/blog/digital-marketing-trends-2019/ You could know about the most perspective methods of digital marketing in 2019.
One of them is the native advertising. If the ordinary advertising has bored customers to death, native one would be effective.The information shouldn’t claim to buy something any more it should be useful and advisable.Only if it is really needful it would be perceived positively.
Personalization would be also in the highest flight. The researchers admit that generalization isn’t effective any more and individual approach increase the chances for success.  
There will be lots new digital marketing trends next year. Stay up to date with the news in this sphere and be successful.
My Solutions for Perfect Number in Several Languages
Tags: go, rust, elixir, clojure
Published: 2018-11-15 03:28:07

---
title: My Solutions for Perfect Number in Several Languages
published: true
description: 
tags: go, rust, elixir, clojure
---

There's a warm discuss in post [Write a script to find "Perfect Numbers" ](https://dev.to/peter/write-a-script-to-find-perfect-numbers-48nn). Here's my solutions.

**Ruby**

```ruby
def sum_divisions(n)
  (1...n).select{|i| n % i == 0}.sum
end

def perfect_number?(n)
  n == sum_divisions(n)
end

(1..10_000).each do |i|
  puts "#{i} is perfect" if perfect_number?(i)
end
  
```

**Node**

```js
const sum = (accumulator, currentValue) => accumulator + currentValue;

function range(size, startAt = 0) {
  return [...Array(size).keys()].map(i => i + startAt);
}

function sumDivisions(n){
  arr = range(n-1, startAt=1).filter(x => n % x == 0)
  return arr.reduce(sum, 0);
}

function is_perfect_number(n){
  return sumDivisions(n) == n
}

range(10000, 1).forEach(function(x){
  if(is_perfect_number(x)){
    console.log(x);
  }
})
```

**Go**

```go
package main

import (
  "fmt"
)

func sum_divisions(n int) int {
  sum := 0
  for i := 1; i < n; i++ {
    if n % i == 0 {
      sum += i
    }
  }
  return sum
}

func is_perfect(n int) bool {
  return n == sum_divisions(n)
}

func main() {
  for i := 1; i <= 10000; i++ {
    if is_perfect(i) {
      fmt.Println(i)
    }
  }
}

```

**Rust**

```rust

fn main(){
  let perfects = (1..10_000).filter(|x| is_perfect(*x) );
  for x in perfects {
    println!("{}", x)
  }
}

fn is_perfect(n: i32) -> bool{
  n == sum_divisions(n)
}

fn sum_divisions(n: i32) -> i32{
  (1..n).filter(|x| n % x == 0).sum()
}

```

**Elixir**

```elixir
defmodule Play do
  def perfect?(n) do
    n == sum_divisions(n)
  end

  defp sum_divisions(n) do
    Enum.filter(1..(n-1), fn(x) -> rem(n, x) == 0 end)
    |> Enum.sum
  end
end

Enum.each(2..10_000, fn(x) -> if Play.perfect?(x), do: IO.puts(x) end)

```

**Clojure**

```clojure

(defn sum_divisions [x]
  (apply + 
    (filter #(= 0 (rem x %)) (range 1 x))))

(defn is_perfect [x]
  (= x (sum_divisions x)))

(doseq [i (range 1 10000)] 
  (if (is_perfect i) (println i)))
```

v2, thanks @jcsvveiga

```clojure
...
(doseq [ i (range 1 10000)
        :when (is_perfect i) ] 
  (println i) )

```

# End

I'm new to Node, Go, Rust, Elixir and Clojure, if you have better code, welcome comment.

Happy playing!
Amazon Corretto, a no-cost, production-ready distribution of OpenJDK
Tags: java, productivity, opensource, career
Published: 2018-11-15 08:31:35

---
title: Amazon Corretto, a no-cost, production-ready distribution of OpenJDK
published: true
description: Amazon is committed to supporting Java and keeping it free
tags: #java #productivity #opensource #career
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vg2g7zux38n17qmz3jo4.jpg
---

In case you are looking for a secure and up to date distribution of the Open Java Development Kit, look no further. 

Introducing [Amazon Corretto](https://aws.amazon.com/corretto/), which is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto comes with long-term support that will include performance enhancements and security fixes. 

Amazon runs Corretto on thousands of production services. Patches and improvements in Corretto enable Amazon to address high-scale, real-world service concerns, meeting heavy performance and scalability demands. 

The Corretto 8 preview corresponding to OpenJDK 8 is available at this time for Amazon Linux 2, Microsoft Windows, and macOS platforms and Docker image. Preview builds can be downloaded by visiting [aws.amazon.com/corretto](aws.amazon.com/corretto).

Amazon will distribute security updates to Corretto 8 at no cost until at least June 2023, and to Corretto 11 until at least August 2024.

Amazon Corretto is certified to meet the Java SE standard and can be used as a drop-in replacement for many Java SE distributions. Also, Amazon Corretto lets you run the same environment in the cloud, on premises, and on your local machine.

Amazon Corretto sounds wonderful and is available for download and use at no cost. 

For further reading:
[Introducing Amazon Corretto, a No-Cost Distribution of OpenJDK with Long-Term Support](https://aws.amazon.com/blogs/opensource/amazon-corretto-no-cost-distribution-openjdk-long-term-support/)

[Re-affirming Long-Term Support for Java in Amazon Linux](https://aws.amazon.com/blogs/compute/re-affirming-long-term-support-for-java-in-amazon-linux/)
Guide to Hiring Developers
Tags: career, hiring
Published: 2018-11-15 08:27:49

---
title: Guide to Hiring Developers
published: true
description: An article from 2009 about what to look for when hiring software talent.
tags: #career #hiring
---

Some time ago now there was an article on Slashdot about how to find good developers. Here are the primary points of the article;

# Positive indicators

* Passionate about technology
* Programs as a hobby
* Will talk your ear off on a technical subject if encouraged
* Significant (and often numerous) personal side-projects over the years
* Learns new technologies on his/her own
* Opinionated about which technologies are better for various usages
* Very uncomfortable about the idea of working with a technology he doesn’t believe to be “right”
* Clearly smart, can have great conversations on a variety of topics
* Started programming long before university/work
* Has some hidden “icebergs”, large personal projects under the CV radar
* Knowledge of a large variety of unrelated technologies (may not be on CV)

# Negative indicators
* Programming is only a day job
* Don’t really want to “talk shop”, even when encouraged to
* Learns new technologies only in company-sponsored courses
* Happy to work with whatever technology you’ve picked, “all technologies are good”
* Doesn’t seem too smart
* Started programming at university
* All programming experience is on the CV
* Focused mainly on one or two technology stacks (e.g. everything to do with developing a java application), with no experience outside of it
servephp.com - Create, Provision, Deploy and Manage Servers 
Tags: servephp
Published: 2018-11-15 08:22:32

---
title: servephp.com - Create, Provision, Deploy and Manage Servers 
published: true
description: 
tags: #servephp
---

ServePHP will help you in Creating, Provisioning and Managing Server and Website/Applications, Performing many important tasks like Attaching Domains, Applications, Cron Jobs, Firewall Rules, Auto Deployments and lot more without writing single line of command in Terminal yourself, these tasks are just a click away using simple interface.

Start Trial on - https://servephp.com/
[Video] Using ML to improve performance with predictive fetching
Tags: webdev, machinelearning, webperf, addy
Published: 2018-11-15 06:25:06

---
title: [Video] Using ML to improve performance with predictive fetching
published: true
description: Katie Hempenius and Addy Osmani talk about using ML to improve web performance by predictively fetching content.
tags: webdev, machinelearning, webperf, addy
---

In episode 15 of The State of the Web, I chat with Katie Hempenius and Addy Osmani about a new web performance technique that uses machine learning to predict which content to fetch. Check it out!

{% youtube 03qta1Ufn3c %}
SDKs and World Class Developer Experience
Tags: api, sdks, dx, devrel
Published: 2018-11-15 02:30:19

---
title: SDKs and World Class Developer Experience
published: true
tags: APIs,SDKs,DX,DeveloperExperience
canonical_url: https://dzone.com/articles/sdks-and-world-class-developer-experience
---

Developing an SDK for your API can significantly increase the developer experience by providing native support for a developer's preferred programming environment. This article describes some best practices, strategies, and processes to help your API provide a world-class developer experience.

The post [SDKs and World Class Developer Experience](https://dzone.com/articles/sdks-and-world-class-developer-experience) appeared first on [DZone](https://dzone.com).
When do you know the performance bottleneck is not your code, but the infrastructure?
Tags: discuss, scaling, performance
Published: 2018-11-15 04:42:26

---
title: When do you know the performance bottleneck is not your code, but the infrastructure?
published: true
description: 
tags: discuss,scaling,performance
---

I have cases where we'd see some performance issue with our REST API and start working on optimizing it.

I think the first thing anyone does is blame the code. Maybe we haven't used the SQL queries right? Could we change the algorithm to process the data better? Are we indexing the columns properly?

But at what point do you consider that perhaps it's the infrastructure: should we upgrade the EC2/RDS instance? Add more load-balanced servers?

Upgrading the infrastructure will definitely improve performance, but at a financial cost. We'd always want to get the last bit of performance from the current hardware by changing the software as much as possible, right?
Choosing an open source library/framework 👆
Tags: discuss, opensource
Published: 2018-11-15 02:49:42

---
title: Choosing an open source library/framework 👆
published: true
tags: discuss, open-source
---

I had some very good and also very bad experiences and choices with open-source and would love to know some of yours!

What are the key aspects you look for when choosing an open source library or framework?
Is College Worth It?
Tags: discuss
Published: 2018-11-15 02:19:51

---
title: Is College Worth It?
published: true
description: It's really easy to overlook things while we are in the heat of battle, this is why I would like to bring this question to you and read your thoughts.
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/m4n2auxeynkxouysh9ep.jpeg
---

<center>_Cover image by [Jesse Orrico](https://unsplash.com/@jessedo81)_</center>

---

It's quite a heated topic, I know. But I've personally struggled to keep up my motivation to go to class and I'm guilty of charge of thinking that college can be a total waste of money and time.

I know some jobs require a candidate to have a degree or it may prevent someone from getting a promotion in some companies, but at the same time, I also agree with the following opinion:

> _"If a company cares more about a degree than your skills, maybe you shouldn't be there at all"._

I would love to _read_ your thoughts on this 🤓
Please stop hack "chcp 65001"
Tags: windows
Published: 2018-11-15 02:04:53

---
title: Please stop hack "chcp 65001"
published: true
description: chcp 65001 is not good solution for displaying UTF-8 on Windows console.
tags: windows
---

On GitHub, there are [many codes](https://github.com/search?q=%22chcp+65001%22&type=Code) using `chcp 65001`. This is hack to display UTF-8 on Windows command prompt. Probably, this hack may works well on non multi-byte locales. But this doesn't work correctly on multi-byte locales. For example, jq used this hack. https://github.com/stedolan/jq/pull/824

This hack break Windows command prompt on multi-byte users.

![](https://thepracticaldev.s3.amazonaws.com/i/y306umvrwreva53p7zlh.gif)

You can see the font is changed and not restored.

On East Asian locale, figure of backslash is not same on non East Asian locale. On non East Asian locale, backslash is displayed like below.

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

But on East Asian locale, backslash are displayed like following.

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

FYI, Most of Windows users normally uses non UTF-8 codepage. For example, japanese use codepage 932.

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

I wrote a patch to fixed this. https://github.com/stedolan/jq/issues/1121

Furthermore, curl used this hack. https://github.com/curl/curl/issues/3008

This also break cmd.exe.

![](https://thepracticaldev.s3.amazonaws.com/i/tw37aeqtojiqlud4ym4d.gif)

I wrote a patch similar above again. https://github.com/curl/curl/pull/3212

As I wrote on the description of this PR, when changing codepage on Windows console modify font to suitable possibly. And restoring codepage also set suitable font. So original font is not restored correctly. To write UTF-8 without changing console codepage, you should use Wide String APIs.

Please stop to use hack `chcp 65001`.

# P.S.

If you want to run batch file written in UTF-8, you should run with below to avoid breaking command prompt:

```
start /wait /min foo.bat
```
Quick tip: Sharing JetBrains code style throughout the repository
Tags: phpstorm, jetbrains, codestyle, repository
Published: 2018-11-15 01:46:32

---
title: Quick tip: Sharing JetBrains code style throughout the repository
published: true
description: JetBrains says what you could commit to your repository, but depending on settings the code style will never reach there.
tags: phpstorm, jetbrains, code style, repository
---

This is a quick one. There's [an article from JetBrains explaining how to properly include the `.idea` folder in the project's repository](https://intellij-support.jetbrains.com/hc/en-us/articles/206544839). However, I was never able to understand how to include the Code Style there. On three different projects, we ended up sharing the Code Style export through Slack... lol

However, if you simply copy the style from the IDE into the Project itself, it will start showing properly on the `.idea` folder. The problem is that this option is not really obvious, and there's little clue on why this single setting is not included on the said folder, while other parts of the project settings are clearly marked as "shared/project exclusive".

![Copy style into JetBrains project](https://thepracticaldev.s3.amazonaws.com/i/toolzap5m4b2ktakd961.png)

This has been tested on PHPStorm, but I'm pretty sure it will work on PyCharm, IntelliJ, WebStorm or whatever else flavor of a JetBrains IDE you use!


Have fun coding.
Using AJAX in Conjunction with MongoDB
Tags: mongodb, mongoose, ajax
Published: 2018-11-15 01:05:02

---
title: Using AJAX in Conjunction with MongoDB
published: true
description: 
tags: MongoDB, Mongoose, AJAX
---
Hello fellow Javascript coders,

In this article, we will be discussing how to implement AJAX calls into your full-stack web application that incorporates a MongoDB database. 

First of all, AJAX is a method in jQuery that allows a program to send and receive data from a server (i.e. MongoDB) simultaneously without even refreshing the page. Thus, AJAX is very important for implementing applications with buttons or input from the user since it can be used in functions that are responsible for rendering text or data to the page. 

Next, let's implement AJAX into an application. We need to require all of the relevant packages in the server.js or a differently named file that connects the mongoose database to your api and html routes. The file should look similar to this:

`const express = require('express');`
`const bodyParser = require('body-parser');`
`const mongoose = require('mongoose');`

`const PORT = process.env.PORT || 3000; // any port number is acceptable`

`// Initialize Express `
`const app = express();`

`// Use body-parser for handling form submissions`
`app.use(bodyParser.urlencoded({ extended: true }));`
`// Use express.static to serve the public folder as a static directory`
`app.use(express.static('public'));`

`mongoose.connect('mongodb://localhost/[name of application database]', { useNewUrlParser: true });`

`// Routes`
`// API Routes (require from routes folder and pass in Express app)`
`require('./routes/api-routes')(app);`
`// HTML Routes (require from routes folder and pass in Express app)`
`require('./routes/html-routes')(app);`

`// Start the server`
`app.listen(PORT, function() {`
`  console.log(``App running on port ${PORT}``);`
`});`

Now, the preliminary packages are required if they weren't already. Next in a different js file, you can create functions that accesses your mongoose routes such as GET, POST, or DELETE using AJAX. Here is an example of how to formulate a render function that gets data from a mongoose database and displays it to the page: 

`const render = function () {`
      `$.ajax({ url: '/[put your route here]', method: 'GET' })`
          `.then(function (data) {`
              `let htmlstr = '';`
              `data.forEach(element => {`
                `htmlstr += ``<h1 class="content">${element.content}</h1>``;`
              `});`
              `$('#addStr').html(htmlstr);`
          `})`    
          `.catch(function (err) {`
              `console.log(err);`
          `});`
  `}`

In this function, the AJAX call is using the databases GET routes and, for each data entry, it creates an html h1 element with the contents of the entry and adds it to an empty div.
Calculating the Best SIP Date with Highest Returns
Tags: python, dataanalysis, mutualfunds
Published: 2018-11-15 01:04:25

---
title: Calculating the Best SIP Date with Highest Returns
published: true
description: This is a simple analysis to find out which SIP date had yielded highest returns for Parag Parikh Long Term Equity Fund – Direct Plan – Growth. The standard SIP dates considered are 1st, 5th, 10th, 15th, 20th and 25th of calendar month. The following analysis is illustrated using python programming language. 
tags: python, data analysis, mutual funds
---

This is a simple analysis to find out which SIP date had yielded highest returns for Parag Parikh Long Term Equity Fund – Direct Plan – Growth. The standard SIP dates considered are 1st, 5th, 10th, 15th, 20th and 25th of calendar month. The following analysis is illustrated using python programming language. Read more http://bit.ly/2FlcobV