teleren/devto huggingface dataset:
#TeachingKotlin Part 3 - Caveats coming from Java
Tags: kotlin, android
Published: 2019-12-16 18:26:09

When you start migrating your Java code to Kotlin, you will encounter multiple subtle changes that might catch you off guard. I'll document some of these gotchas that I and other people I follow have found and written about.

## Splitting strings

Java's `java.lang.String#split` [method](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-) takes a `String` as it's first argument and creates a `Regex` out of it before attempting to split. Kotlin, however, has two variants of this method. One takes a `String` and uses it as a plaintext delimiter, and the other takes a `Regex` behaving like the Java method we mentioned earlier. Code that was directly converted from Java to Kotlin will fail to accommodate this difference, so be on the lookout.

{% twitter 1202077283579826176 %}

## Runtime asserts

Square's [Jesse Wilson](https://twitter.com/jessewilson) found through an [OkHttp bug](https://github.com/square/okhttp/issues/5586) that Kotlin's `assert` function differs from Java's in a very critical way - the asserted expression is *always* executed. He's written about it on his blog which you can check out for a proper write up: [Kotlin’s Assert Is Not Like Java’s Assert](https://publicobject.com/2019/11/18/kotlins-assert-is-not-like-javas-assert/).

TL; DR Java's `assert` checks the `java.lang.Class#desiredAssertionStatus` method **before** executing the expression, but Kotlin does it **after** which results in unnecessary, potentially significant overhead.

```java
// Good :)
@Override void flush() {
  if (Http2Stream.class.desiredAssertionStatus()) {
    if (!Thread.holdsLock(Http2Stream.this) == false) {
      throw new AssertionError();
    }
  }
  ...
}
```

```kotlin
// Bad :(
override fun flush() {
  if (!Thread.holdsLock(this@Http2Stream) == false) {
    if (Http2Stream::class.java.desiredAssertionStatus()) {
      throw AssertionError()
    }
  }
  ...
}
```

## Binary incompatibility challenges

[Jake Wharton](https://twitter.com/JakeWharton) wrote in his usual in-depth detail about how the Kotlin `data` class modifier makes it a challenge to modify public API without breaking source and binary compatibility. Kotlin's sweet language features that provide things like default values in constructors and destructuring components become the very thing that inhibits binary compatibility.

Take about 10 minutes out and give Jake's article a read: [Public API challenges in Kotlin](https://jakewharton.com/public-api-challenges-in-kotlin/).

## Summary

While migrating from Java to Kotlin is great, there are many subtle differences between the languages that can blindside you and must be taken into account. It's more than likely that these problems may never affect you, but it's probably helpful to know what's up when they do :)
Mastering the Merge Sort Algorithm
Tags: algorithms, mergesort, python
Published: 2019-12-28 15:01:05

---
title: Mastering the Merge Sort Algorithm
published: true
date: 2019-12-16 18:00:19 UTC
tags: Algorithms,algorithms,Merge Sort,Python
canonical_url: 
---

It is often necessary in computer programming to put a collection of items in an order. To do this, a computer must rearrange values in...

The post [Mastering the Merge Sort Algorithm](https://jaeheonshim.com/mastering-the-merge-sort-algorithm/) appeared first on [Coding with Jaeheon Shim](https://jaeheonshim.com).
Installing Arch Linux, the scripted way.
Tags: archlinux, script, automation, install
Published: 2019-12-16 17:36:43

As a proud user of Arch and taking pride in saying, "I use Arch, btw", I often found myself recommending it to my friends and colleagues. However many found the setting up of Arch Linux time consuming and confusing. At times they resorted back to me to help them install Arch on their computers. I always enjoyed the command line however it becomes rather boring when you find yourself doing the same task again and again. Some time later I found myself installing my system time and time again as I kept switching workstations between my internships and jobs. 

So I finally decided to script my configuration to automate the task. I proudly present to you my highly opinionated Arch Install Scripts: https://github.com/krushndayshmookh/krushn-arch

The usage is pretty simple. Just boot into the live Arch Linux ISO, clone the repository and run the `install.sh` inside it.

Arch does not come with `git` preinstalled so you will have to install it with `sudo pacman -S git`

Here are the complete instructions for those looking to install Arch Linux with KDE.

1. Download the latest Arch Linux ISO from https://www.archlinux.org/download/

2. Flash it to a USB drive using a tool of your choice. I recommend [Etcher](https://www.balena.io/etcher/) if you're on Linux and [Rufus](https://rufus.ie/) on Windows.

3. Boot using the USB drive

4. Run the following commands on the terminal:

```bash

sudo pacman -Sy

sudo pacman -S git

git clone https://github.com/krushndayshmookh/krushn-arch --depth=1

cd krushn-arch

# please edit the hostname and username in the post-install.sh 

./install.sh

```

That's it! The script should now setup your new Arch system for you. Just keep an eye for the prompts that pop up.

Hope you enjoy using Arch Linux!
My First Blog Post 
Published: 2019-12-16 16:59:54

Hello there! I’m excited to be a new member of the DEV community and would like to celebrate by contributing my first blog post. I am currently attending Flatiron School in Seattle and loving it. I’ll take opportunity to share how I got here and why I made the decision to pursue a career in software development. 

If you were to tell me ten years ago I would be back in school learning to be a software developer, I would have thought you were crazy. It’s not that I don’t enjoy learning new things, I do. My surprise, and probable disappointment, would have come from the combination of vowing never to go back to school and an unwavering desire to endlessly tour the world in the greatest band ever known to man, Lanford Black. Unfortunately, unless you are my mom or one her friends, it’s likely you’re wondering “Who the hell is Lanford Black?”. This fact is a major contribution as to why I’m here today. 

My 20’s were largely spent bouncing around from job to job, balancing taking time off work for tour and making enough money to pay for recording and daily expenses. It’s not the easiest way of living, but when you have a passion for something, it’s all worth it. Sadly, Lanford Black never became what I imagined, but I never gave up on the dream. I joined another band and we started gaining a little traction, even getting radio play in various cities across the U.S. As I got older, I put off the some of the personal responsibilities that typically go along with it, i.e., getting health insurance, maintaining a savings account, and general consideration of my future well-being. I was wholly satisfied with my path and embraced the minimalist lifestyle. Much to my surprise, however, that all changed the day I met a wonderful person named Lauren. 

It’s amazing how quickly priorities and perspectives can shift when you are no longer just worrying about yourself. I’m not saying I used to be selfish, but I really only had myself and the success of the band to consider. Suddenly, I wanted to provide a stable and comfortable future. The dream of “making it big” dwindled to an afterthought as the reality of financial
stability reared its ugly head. I wasn’t alone anymore and I was all the better for it. It was time for me to find a job that provided a good income.

I began the search for a new career and didn’t really know where to start. I had a difficult time deciding what would keep me happy and satisfy my sense of creativity. Fortunately, I had a conversation with a friend of mine who was a software developer. He convinced me to look into coding and I decided to give it a shot. I learned a bit on my own and it kept my interest going. I decided to take the next step and began looking for coding bootcamps. There were a lot of different options and after some research, I thought Flatiron would be the best choice for me going forward. So far, I am extremely happy with my decision to pursue software development and am eager to learn more. I can’t wait to see what will come from completing this bootcamp and am happy I found something beyond music that I am passionate about.
Artificial intelligence, data science, and big data in 2019: what really mattered
Tags: ai, datanews, featured, insights
Published: 2019-12-19 15:22:03

---
title: Artificial intelligence, data science, and big data in 2019: what really mattered
published: true
date: 2019-12-16 16:47:41 UTC
tags: Artificial Intellige,Data News,Featured,Insights
canonical_url: https://hub.packtpub.com/artificial-intelligence-data-science-and-big-data-in-2019-what-really-mattered/
---

The techlash hasn’t died down – it’s just become normalized. Barely a day passes without a new scandal emerging, from questionable surveillance to racist AI algorithms. But it hasn’t all been bad: while negatives get a lot of attention (and so they should – the consequences of tech can be lethal, both societally and literally), […]

The post [Artificial intelligence, data science, and big data in 2019: what really mattered](https://hub.packtpub.com/artificial-intelligence-data-science-and-big-data-in-2019-what-really-mattered/) appeared first on [Packt Hub](https://hub.packtpub.com).
Devart Excel Add-ins 2.2 Now Support BigCommerce API v3
Tags: bigcommerce, database, api, excel
Published: 2019-12-16 16:24:35

---
title: Devart Excel Add-ins 2.2 Now Support BigCommerce API v3
published: true
description: Devart announced the release of Excel Add-ins with support for BigCommerce API v3 and improvements for Zendesk.
tags: BigCommerce, database, API, excel
---

*Devart announced the release of Excel Add-ins with support for BigCommerce API v3 and improvements for Zendesk.*

Devart, a recognized vendor of cloud and database data management software and developer tools, introduced the new version of [Excel Add-ins 2.2](https://www.devart.com/excel-addins/) with support for BigCommerce API v3. The vendor promptly updated the solution so that users benefit from the improved API v3 performance and better data organization. Also, useful enhancements were introduced for [Excel Add-in for Zendesk](https://www.devart.com/excel-addins/zendesk.html).

The new version of Excel Add-in for BigCommerce allows users to select the BigCommerce API version to use when working with BigCommerce data. However, the lists of objects and their structure is different for different API versions. The main differences are connected with objects, storing data about products, their variants, options, prices, brands, etc. Some objects that are not supported in BigCommerce API v3 can be accessed via API v2 regardless of API version selected.

The new API v3 connections use OAuth authentication (using Store Credentials) and require a different set of connection parameters than API v2 connections. Users can obtain the required connection parameters when creating a BigCommerce API account.

Learn more about recent release at the official Devart blog - https://blog.devart.com/bigcommerce-api-v3-support-in-excel-add-ins-2-2.html

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
A workflow for writing with linters
Tags: linters, writing, vscode, productivity
Published: 2019-12-16 16:21:52

---
layout: post
title: A workflow for writing with linters
published: true
tags: "linters, writing, vscode, productivity"
---
I recently wrote about [using linters to check my writing](https://dev.to/pabloest/how-i-use-linters-to-check-my-writing-5ci8), primarily using a tool called [textlint](https://textlint.github.io/). This post describes how I tweaked my workflow to run text snippets through textlint using Visual Studio Code.

Although textlint is accessible through the command line, I’ve found its Visual Studio Code integration to be pretty smooth, so how I consume textlint’s output. To process my text through Visual Studio Code, I configured an extension and configured an Alfred snippet to help me to do this easily.

### Advanced New File extension
The extension [Advanced New File](https://marketplace.visualstudio.com/items?itemName=dkundel.vscode-new-file) is described as, “an easier way of creating a new file inside a project.” You can specify the name of the file on creation and if you define a path that doesn't exist yet the folders will be created.

To trigger this extension I added this keyboard shortcut to `keybindings.json`:
```
  {
    "key": "cmd+n",
    "command": "newFile.createNewFile"
  }
```
I often use small text snippet files and it’s handy to sync them via Dropbox. Here’s how I configured the extension to create new files in Dropbox by default:
```
"newFile.defaultBaseFileName": "newFile",
"newFile.relativeTo": "root", // "root" or "project"
"newFile.defaultFileExtension": ".txt",
"newFile.rootDirectory": "~/Dropbox/snippets",
"newFile.showPathRelativeTo": "root", // "project" or "none"
"newFile.expandBraces": false,
```

### Automating filenames using Alfred
Instead of having to manually type in a new filename, I use [Alfred’s Snippets](https://www.alfredapp.com/help/features/snippets/). Snippets auto-expand short keystroke combinations into longer text. The classic example is address expansion: instead of manually typing your postal address, enter a keyword like `!address` and the text is automatically replaced by your complete postal address.

Snippets can also use dynamic placeholders, like `{date}` or `{clipboard}`. When creating a new file, I use the `{date}` placeholder by typing in `[date]`and Alfred automatically replaces this with the current date in the format I define in Alfred’s preferences. From inside VS Code, the workflow looks like this:

![New file with date as filename](http://www.pabloestrada.us/images/2019/new-file-with-date.gif)

Using these extensions and shortcuts, it’s super fast to create a new text file and name it accordingly. When I write in these files, textlint and other extensions for writing check my work on the fly.
Search for volunteers to create a private H1Z1 Just Survive server
Tags: mysql, server, emulator, h1z1
Published: 2019-12-16 16:20:18

Search for volunteers to create a private H1Z1 Just Survive server to replay the game.

Next language:
- C #
- C ++
- JAVA
- PHP
- MYSQL

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

The project will take as long as it takes, but I'm looking for some people ready to create an emulator server for the game with Multi player for fans of the game.

Everyone and welcome, have and there to do something pretty for everyone's taste! And in a good mood!


Link Discord Server: https://discord.gg/k7WuKfm | Admin #Zovix


Regards, Zovix - Tournament Games
Your opinion matters: help us improve the CEF Context Broker
Tags: survey, realtime, data, standards
Published: 2019-12-16 16:19:28

At the Connecting Europe Facility, we strive to offer public administrations and businesses across Europe the open and reusable digital solutions that fit their needs. To that end, we are assessing the Context Broker’s market position and its services. As part of the developer community, your views are of particular interest to us. We’ve prepared a survey that should take no longer than 10-15mins to complete. Your answers will be strictly anonymous, unless you choose to share your details with us. Please answer the survey by 31 December 2019. 
 
To the survey: https://ec.europa.eu/eusurvey/runner/CEFContextBrokerSurvey
 
Thank you very much for your time, The CEF Context Broker team.  

Want to learn more? Visit us on CEF Digital: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/CEF+Digital+Home

Discover the CEF Context Broker and its services: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/Context+Broker
5 Xcode 10 to 11 Tips
Tags: podcast
Published: 2019-12-16 16:12:48

As I moved from Xcode 10 to 11, there were a few things that caught me out. Then I thought, I should share these with others who might find the same.

[Podcast episode link](https://anchor.fm/compileswift/episodes/5-Tips-for-moving-from-Xcode-10-to-11-e9i6vd)

*The Show Notes*

Video version: [YouTube](https://youtu.be/PxBZmzqaEpg)

1. Where did code signing go?
2. File History Inspector
3. Certificates, Identifiers & Profiles
4. Swift Package Manager
5. Watch out for dark mode!

Git Tower application: [https://git-tower.com](https://git-tower.com)
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-12-16 15:27:21

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️

#1. JS is COOL

Lydia shares a visual overview of the JS engine - if you've ever wondered how human-friendly JS code can turn into something machines understanding, this post is for you!

{% link https://dev.to/lydiahallie/javascript-visualized-the-javascript-engine-4cdf %}

#2. Black Window

Andreas explains nine commands that you should only execute with extreme caution. 

{% link https://dev.to/devmount/9-evil-bash-commands-explained-4k5e %}

#3. A Masterpiece

Beautus shares a turning point in their relationship with C# and .NET, technologies they used to hate but now have appreciation for.

{% link https://dev.to/sduduzog/c-and-net-core-appreciation-post-the-most-beautiful-piece-of-code-i-have-ever-seen-this-month-49gf %}

#4. Lessons Learned

Advice from Periklis, a 30 year-old software developer. 

{% link https://dev.to/perigk/30-tips-for-software-engineering-careers-after-30-years-of-life-5ddf %}

#5. The Good Fight 

Victoria explains how attackers can 'get in the front door' and what areas frontend developers should be aware of in terms of security. 

{% link https://dev.to/victoria/security-for-the-front-end-developer-544l %}

#6. Lean on Me

Caitlyn explains the importance of helping out junior devs and offers various tips for how to be supportive. 

{% link https://dev.to/thecaitcode/how-to-support-the-junior-dev-on-your-team-23ik %}

#7. Blog Blog Blog

Emma has over 12,500+ DEV followers -- these are their seven tips for growing a successful blog. 

{% link https://dev.to/emmawedekind/i-built-a-successful-blog-in-one-year-and-you-can-too-7-tips-for-enhancing-readership-5f8b %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
Software Testing Career
Tags: testing, career
Published: 2019-12-16 15:23:13

# Background

I work in Quality Assurance, my heart is in programming. I didn't really view testing as a career path, I think outside of game development this is probably true for most people. 

With a little reflection, I want to make an argument for this career path if you find programming fun. 

# The Good

I find QA provides an interesting opportunity for problem solving. It is a profession where gathering information is your most valuable asset. You get to work with some smart developers and learn from them. 

How can you build out a test sequence which reproduces an issue seen only in production? How can you get closer to production?

Are you curious about performance techniques? Ask the developers about how they addressed the problem. Is UI development pretty cool, ask the dev about all the callbacks and flow of the program. Is SQL the sniz, yep there are questions to ask there too. So much to learn.

You also get to use all that programming skill to make testing easier. You can build multitheaded solutions, micro services, data transformation, OS scripts, site scraper, statistics/graphs. There are so many things software can do to help you test you won't have time to cover it all. 

# The Bad

You don't spend your entire day programming (programmers don't do that either). 

There may be some software solution to help test, but it won't be worth the effort, so manually verifying will happen frequently. 

# The Challenge

Expectations of testers can easily become script executors and designers. People think your day job is writing down what you do, reporting on it and doing it again the next deployment. 

Being able to define the best test strategy will be hard with little product experience and the experienced testers driving you down a different testing path than what interests you (this is not that their approach would be wrong, just not the one I'm advertising to you) 

You may not have an opportunity to work on issue reproduction, many times this falls on the dev. If you do take on the task one benefit to this expectation is if you are struggling to reproduce you can send it off to the devs.
About James McEnerney
Published: 2019-12-16 14:53:00


James McEnerney of Kansas City was not only an outstanding Financial Advisor, he was an exceptional leader. James McEnerney loved the business but especially loved to coach FA's and see them succeed. 

James McEnerney of Kansas City was an innovator and a great teammate. James McEnerney helped to introduce the Supernova Model to Districts all over the country. James McEnerney gave personal testimonials as to the benefits that this best practice model brought to his team. 

James McEnerney of Kansas City was able to not only simplify his practice by reducing his client list to under 200, but he was able to double his business in 12 months. James McEnerney was a great Supernova Pioneer. James McEnerney of Kansas City is honest and insightful. 

James McEnerney is a deeply devoted family man, whose character and loyalty are unwavering at home and in business. James McEnerney has a permanent seat on a personal board of trustees. James McEnerney of Kansas City is just a good, All-Around person that has High Integrity and Core Values!