teleren/devto huggingface dataset:
Android or iOS App Development – What comes First for You?
Tags: blog, androidorios, iosappdevelopment
Published: 2018-05-10 10:26:00

---
title: Android or iOS App Development – What comes First for You?
published: true
tags: Blog,Android or iOS,iOS App Development
canonical_url: 
---
![](https://www.itfirms.co/wp-content/uploads/2018/05/iOS-Android-What-comes-First-for-You.jpg)
The first step is always the most difficult one. It takes time to get familiar with any new technology, and mobile application development is no exception. Expect it to take some time to learn, depending on how well you understand basic development principles. Android and iOS both have different complexities and standards. Here we have mentioned some points that will help you decide which one you should be picking as your first choice. [https://www.itfirms.co/android-or-ios-app-development-what-comes-first-for-you/](https://www.itfirms.co/android-or-ios-app-development-what-comes-first-for-you/)
Are interruptions really worse for programmers than for other knowledge workers?
Tags: discuss
Published: 2018-05-04 12:20:47

---
title: Are interruptions really worse for programmers than for other knowledge workers?
published: true
tags: discuss
---

![A cartoon with the first set of images showing a programmer's thought process across levels of abstraction, going rom a single if statement to how the components of the system fit together. The last pane shows him being interrupted, and that entire mental model collapsing.](https://heeris.id.au/trinkets/ProgrammerInterrupted.png)

This is quite a popular cartoon. I posted this in a [comment](https://dev.to/_bigblind/comment/662) on [why programmers wear headphones](https://dev.to/andrewlucker/why-do-programmers-wear-headphones-for-the-same-reason-that-you-cantjuggle) a year ago, and it has received 63 ❤s.

But I think we like this idea because it makes us feel special, and I don't believe we're as special as we think we are. A talk I found on YouTube some time ago has convinced me that a lot of interruption aversion we feel is caused by not breaking our work into small enough chunks.

This in turn is caused by not understanding the scope of what we're doing. Very often we just dig in, thinking it'll be a small change. An hour later we're left with 10 uncommitted files with changes all over the project. 

I'm not denying that you have to keep a lot in your head when programming. A change in one place does have effects on other parts of the system, requiring a fairly complex mental model. But I do think that you can improve your resilience to interruptions if you:

  1. Come up with a solution to a problem before you start writing code, and think about which parts of the system that solution will impact.
  2. Divide the solution you came up with into small chunks, so you can take them one at a time.

This is currently a "Do as I say, not as I do" story. It's something I'm trying to improve on, but with time, we can get there.

If you want to hear a much better explanation than I just gave, check out the YouTube video I mentioned:

{% youtube i08A2uTDoa8 %}

Was this as convincing to you as it was to me? Are there other ways we can be more resilient to interruptions?
Create RazorPage apps using .NET Core CLI
Tags: aspnetcore, web, opensource
Published: 2018-05-03 21:06:28

---
title: Create RazorPage apps using .NET Core CLI
published: true
description: Create Razor Page and additional pages quick and easy using the .NET Core CLI. 
tags: #aspnetcore #web #opensource
---

See full post at [tattoocoder.com](https://tattoocoder.com/creating-razorpage-apps-using-the-cli/)

While I was creating a recent test application with [Razor Pages](https://docs.microsoft.com/aspnet/core/mvc/razor-pages/?view=aspnetcore-2.1&tabs=netcore-cli&WT.mc_id=blog-twitter-shboyer), I found myself clicking the "new file" button in VS Code too many times when I wanted to add a new Page. 

![vscode new file](https://tattoocoder.com/content/images/2018/05/Screen-Shot-2018-05-03-at-4.08.47-PM.png)

I really love the .NET CLI and with every release, there seems to be something I discover that has been added to either the core functionality or the templates. Running `dotnet new` this time around I fell upon the `page` template...

![what is this?](https://tattoocoder.com/content/images/2018/05/what.gif)

[Razor Pages](https://docs.microsoft.com/aspnet/core/mvc/razor-pages/?view=aspnetcore-2.1&tabs=netcore-cli&WT.mc_id=blog-twitter-shboyer) is a super easy way to get going on web app and now adding the additional pages too using the CLI is just as easy. Looking forward to some of the other scaffolding pieces making it into the CLI as well as the previous `yo aspnet` functionality I helped build back in the beta days.
Disk Space Debugging Checklist
Tags: linux, debug, devops, bash
Published: 2018-05-04 11:01:17

---
title: Disk Space Debugging Checklist
published: true
description: Checklist for debugging disk issues on Linux servers
tags: linux,debug,devops,bash
---

Many times, smoothly running processes stop working mysteriously. You open the logs and see what is happening, only to find that even the logs have stopped updating. But the process itself is running. You SSH to the server and type cd TAB. Bash weeps "Unable to create temporary file". The machine is out of disk space...

Here is a checklist to make disk space debugging easier, using standard Linux utilities so you can get started without having to install anything extra:

1. **`df -h`** command gives you an overview in a readable format about the number of disks mounted and their total and available capacities.
2. To get an idea of which folders/directories are eating up the maximum space, try out **`du -ch / | sort -h | tail -n 30`**. This gives you the 30 most space consuming directories. If you already know which directories generate maximum disk output e.g logs and temp files, you can replace the '/' with your directory (DIR) and run the command as **`du -ch DIR | sort -h | tail -n 30`**
3. Now that we have identified the directories with maximum space consumed, we may need to delete some files and get our process going again. The **`rm`** command is your friend here. You can delete old logs and temporary files to free up space.
4. Many times, the culprit is a single large file which is already in use by a program e.g `catalina.out` by Apache Tomcat. If you want to free up space without shutting down the process, the **`truncate`** command will help you out. Example: **`truncate -s0 BIG_LOG.log`**. This will truncate the file to 0 bytes and still allow the other process to use it without issues (standard Unix permissions apply)
5. Sometimes, you delete files and still, the space does not seem to be recovered. This can be because some process is still holding on to the file descriptor of the deleted file. Once these processes are stopped, the space will be recovered. The **`lsof`** command will help you out here. It stands for *list open files*. You can find out which processes are using deleted files as follows: `lsof | grep deleted | grep OLD_FILENAME`. The lsof command gives you the process name and the process id so you can run `kill` on the process. If you do not know the name of the deleted file, you can still run `lsof | grep deleted` and see the output to check for any familiar file / process.


Finally, keep in mind that disk space is one of the metrics you should monitor on your server. This checklist must be used in a pinch. If you find yourself constantly having disk space issues, the solution is to set up periodic deletion/rotation of old log files, alerts when the disk space reaches a particular threshold or to increase the disk size if your processes require a lot of disk space e.g Kafka, MySQL and other databases.

Let me know if there are some other tools I am missing out on and your experiences dealing with disk space issues!
Do you use analytics tools for your personal blogs and if yes, which ones?
Tags: discuss, analytics, blog
Published: 2018-05-04 10:37:31

---
title: Do you use analytics tools for your personal blogs and if yes, which ones?
published: true
description: 
tags: discuss, analytics, blog
---
I am more than eager to move away from using Google Analytics for my [personal blog](http://www.preslav.me/). Not only because of the impending GDPR complications this might bring, but also ideologically, to stop providing a search giant with data for free. In case you are interested, Jesse Squires has laid out his reasons to do it on [his blog](https://www.jessesquires.com/blog/removing-google-analytics-too/), and I pretty much stand by all of them.

I am trying a tool called Matomo (formerly known as Piwik), because it comes with a self-hosted version, and offers a no-cookie version, plus an opt-out popup. The one disadvantage is that it offers you way too much data right off the bat. Of course, everything is customisable, but to be honest, I don't really need much more data than some daily user count/read-time stats. Plus, the less data gets collected from my readers, the better I'd feel.

So here is my question to you? Are you using anlaytics for your personal blogs? If yes, I'd love to know what.
Pusher Contest Idea: JavaScript Game (2)
Tags: pushercontest, javascript
Published: 2018-05-04 08:18:50

---
title: Pusher Contest Idea: JavaScript Game (2)
published: true
description: 
tags: pushercontest, javascript
series: [pusher contest]
---

[As I wrote](https://dev.to/kayis/pusher-contenst-idea-a-javascript-game-12j0), I had the idea to build a _battle royal clicker_.

## Game Design

So lets line out what that could look like.

### Core

- every player will be a _company_
- every _company_ will get start _capital_
- the _companies_ get laid out in a circle, so you can see all at once
- every click on a company will write an _invoice_ to it
- every _invoice_ will cost the _invoiced_ company money
- every _invoice_ will earn the _invoicing_ company money
- if a _company_ has no _capital_ left, it will go _bankrupt_ and lose the game
- last _company_ left will win

This should fuse the _clicker_ genre nicely with a _battle royal_ goal.

### Considerations

- Pusher _Sandbox_ plan only allows 200k events per day
  - merge multiple clicks in one event, maybe 10 or 20 clicks _write_ one invoice
- Pushers _Sandbox_ plan only allows 100 connections max
  - 20 players per game would allow for 5 parallel games

### Nice to Have

- _taxes_
  - pulled from every company in a specific interval
- _power-ups_
  - will show up (tax break, stocks rising) and/or could be bought (better tech, premium products)

This would make the game more fun and taxes could maybe simulate the _eye of the storm_ people know from other battle royal games like _PUBG_ and _Fortnite_.

If you have some additional ideas (preferably some that reduce complexity, let me hear xD)
รวบรวมศัพท์เกี่ยวกับโลกของ Ethereum
Tags: ethereum
Published: 2018-05-04 07:58:05

---
title: รวบรวมศัพท์เกี่ยวกับโลกของ Ethereum
published: true
description: 
tags: Ethereum
---

สวัสดีครับ สำหรับอันนี้จะเป็นบทความที่เอาไว้อธิบายคำศัพท์แต่ละคำ ที่เป็นคำศัพท์เฉพาะในโลกของ Ethereum รวมไว้ให้อ่านได้ง่าย ๆ เอาไว้ใช้คู่กับบทความถัด ๆ ไปของผมนะครับ ซึ่งในแต่ละคนผมว่ามันจะเข้าใจกันในหลาย ๆ รูปแบบหรือเอาไปเทียบกับอะไรหลาย ๆ อย่าง เพราะฉะนั้นนบอกไว้ก่อนเลยว่าอันนี้มันเป็นความเข้าใจและเปรียบเทียบในแบบของผมอีกทีอาจจะไม่ตรงกับคนอื่นนะครับ ซึ่งถ้าตรงไหนผิดนี่บอกผมได้เลยครับ หรือถ้าอันไหนอ่านแล้วงงก็บอกได้ครับ จะได้แก้ครับผม

ผมจะคอยมาอัปเดตที่นี่เรื่อย ๆ เวลาเจอศัพท์อะไรใหม่นะครับ

##Ethereum
เป็น blockchain ตัวหนึ่งที่ทำหน้าที่อารมณ์เหมือนเป็น คอมพิวเตอร์ที่คนทั้งโลกสามารถมาใช้ได้ ใครจะเขียนโปรแกรม (โปรแกรมในที่นี้คือ Smart Contract นั่นเอง) ขึ้นไปรันบนนี้ก็ได้ ถ้าสำหรับคนสายคอมพิวเตอร์จะมองเป็นเซิฟเวอร์ตัวนึงก็ได้ครับ

##Blockchain
สำหรับ blockchain คืออะไรยังไงนี่ ค่อนข้างจะยาว (มาก) เพราะฉะนั้นแนะนำให้ไปอ่านของพี่หนูเนย หรือลองเล่น “What is blockchain?” ของทาง Loom Network ก็ได้ครับ

##Smart Contract
อันนี้ตามชื่อเลยครับ Contract แปลว่าสัญญา มารวมกับคำว่า Smart ก็คือเป็น สัญญาที่เจ๋งกว่าสัญญาธรรมดานั่นเอง คืออะไรที่ปกติเราต้องทำข้อตกลงกัน ไม่ว่าจะเป็น การทำสัญญาขอยืมหนังสือเพื่อนเอย ซื้อบ้านเอย หรือแม้กระทั่งเลือกตั้ง (Oops!) หรือจะมองเป็นเซิฟเวอร์ก็ได้ครับ (เกม, คาสิโน, หรือแม้แต่ Exchange)

##Solidity
เป็นภาษาที่ใช้ในการเขียน Smart Contract บน Ethereum มีรูปแบบคล้าย ๆ ภาษา javascript แต่โดยส่วนตัวรู้สึกว่าอันนี้เขียนมาได้ดีกว่ามาก ๆ ไม่ว่าจะเป็น require(), modifier อะไรงี้เจ๋งมาก ๆ ครับ ทำให้ Code Clean ขึ้นเยอะมาก ๆ ครับ ต้องกราบขอบพระคุณ Gavin Wood กับ Ethereum team ที่ทำให้ภาษานี้ออกมา

##Transaction
การส่ง Ether หรือ Token และแม้แต่การ Call function ใน Smart Contract ต่าง ๆ บน Ethereum จะทำให้เกิดรายการว่าเออใครทำอะไร สำหรับหรือไม่ กำลังประมวลผลอยู่รึเปล่า? มี error หรือไม่ เสมอ ซึ่งโดยปกติแล้วเราจะสามารถตรวจสอบ Transaction ที่เราทำได้เสมอ โดยหลัก ๆ แล้วจะใช้เว็บที่ชื่อว่า https://etherscan.io/ สำหรับการเช็ครายการ

##Transaction costs / Fee
การทำ Transaction ที่จะต้องมีการบันทึกข้อมูลลงใน block เช่นการ Call function ที่ต้องมีการประมวลผล หรือ การส่งเงิน Ether หรือ token จะต้องมีการจ่ายเงินให้กับ Ethereum network ซึ่งเราจะเรียกมันว่าค่า Transaction costs / Fee

##Gas
ต่อเนื่องจาก transaction costs ข้างบน ตัว Ethereum จะเก็บค่า transaction costs ด้วยสิ่งที่เรียกว่า Gas มีหน่วยเป็น Wei ซึ่งเป็นหน่วยที่เล็กที่สุดในโลกของ Ethereum นะครับ ซึ่ง Wei กับ Ether เนี่ยสามารถเปลี่ยนกลับไปกลับได้ เราสามารถลองการเทียบหน่วยได้ที่ https://etherconverter.online/ ครับผม

##Gas Limit
คือตัวเลขที่กำหนดว่า transaction นี้ จะกิน Gas ไม่เกินเท่าไหร่ เกิดขึ้นมาเพื่อเอาไว้ป้องกันพวก Code ที่บัค ๆ ไม่ให้กินเงินของเราไปจนหมดนั่นเอง ลองคิดว่าดูว่าถ้าเกิดเราไปเจอ Loop ที่ไม่มีวันจบเข้าเนี่ย แล้วไม่มีตัวที่คอยกันไว้ ค่า Gas ได้ดูดตังเราหมดกระเป๋าแน่นอน

##แหล่งอ้างอิง
What is blockchain? — https://delegatecall.com/what-is-blockchain/#/splashcreen

Blockchain คืออะไร? อธิบายแบบละเอียด แต่เข้าใจง่าย(มั้ง) — https://nuuneoi.com/blog/blog.php?read_id=900

Ethereum Frontier Guide — https://ethereum.gitbooks.io/frontier-guide/content/index.html
[Entry] Button Push
Tags: pushercontest
Published: 2018-05-04 06:22:12

---
title: [Entry] Button Push
published: true
description: An app/hack submitted to the first-ever DEV Community contest. 
tags: pushercontest
---

# What I built

I built a small app/game called "Button Push". What Button Push is a collaborative clicking race. The game itself is a big button with a counter with the objective to be the user to make the counter reach 100. The catch being, using Pusher, every user playing the game is racing on the same button! And you're also not allowed to press the button twice in a row.

## Demo Link

Play it now! ~~ https://me.nektro.net/apps/button_push/

## Link to Code

The front-end is on GitHub! ~~  https://github.com/Nektro/me.nektro.net/tree/master/src/apps/button_push

# How I built it

- The front-end for the app is hosted on my personal website which is hosted on Netlify as pushed from a public GitHub repository.
- The back-end is run through One.com which is where I own the domain through.
- The game is built using Vanilla JS and PHP

# Additional Resources/Info 

- Pusher was extremely easy to set up and I already have ideas on how I want to integrate them into other projects of mine!
- @zmarkan was a pleasure to speak to and answered the few questions I had and was an overall big help
- Thanks DEV for putting this contest on!
- Comments and criticism welcome :D
Why do I even get follows?
Published: 2018-05-04 00:01:01

---
title: Why do I even get follows?
published: true
description: The source of my follows is a bit of a mystery.
tags: 
---

I get a really steady stream of follows.  All I've ever done is comment on articles here or there.

Why did you follow me, if you did?  Some of them make sense, because they happened after specific interactions here.

It isn't that I mind; eventually I'll have content to share and drive you away with... but I don't make posts yet.  Is there a bug in the "you might also be interested in..." recommendations?

*Update*: [A comment by Peter](https://dev.to/peter/comment/389i) offers a good explanation, if you have this question about your own followers.
Adding Salt to Hashing: A Better Way to Store Passwords
Tags: hashing, cryptography, passwords, cybersecurity
Published: 2018-05-03 19:09:10

---
title: Adding Salt to Hashing: A Better Way to Store Passwords
published: true
description: Learn why you should salt your passwords
tags: #hashing #cryptography #passwords #cybersecurity
canonical_url: https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/
---

A salt is added to the hashing process to force their uniqueness, increase their complexity without increasing user requirements, and to mitigate password attacks like rainbow tables

[Read on #️⃣](https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/?utm_source=dev&utm_medium=sc&utm_campaign=dasec_salting)

![Adding Salt to Hashing: A Better Way to Store Passwords](https://thepracticaldev.s3.amazonaws.com/i/4vzea80stkvs6q2fawnf.png)
Learning Generative Art; day 4 "Flower on a Lofty Height" 🌻
Tags: beginners, art, graffiti, showdev
Published: 2018-05-03 16:04:40

---
title: Learning Generative Art; day 4 "Flower on a Lofty Height" 🌻
published: true
description: I drew an image expressing a flower with p5
tags: beginners,art,graffiti,showdev
---

Continuation of [My first step in learning Generative Art](https://dev.to/ohbarye/my-first-step-in-learning-generative-art-3674).

## "Flower on a Lofty Height"

![blue](https://thepracticaldev.s3.amazonaws.com/i/j3tjpk231kdsk0icf1yk.png)
![yellow](https://thepracticaldev.s3.amazonaws.com/i/4twrtrj47b3jtyl33i0b.png)

I drew an image expressing a flower on a lofty height; I wonder if there is a flower that varies its color during one day.


```js
function setup() {
  createCanvas(800, 700);
  // background(48);
  petals();
  stalk();
}

function petals() {
  // noStroke();

  for (var i = 0; i < 200; i++) {
    var r = random(600);
    // fill(color(random(200, 255), random(200, 255), random(255), 78)) // yellow
    fill(color(random(255), random(200, 210), random(200, 255), 78)) // blue

    beginShape();
    curveVertex(0, 0);
    curveVertex(400, 350);
    curveVertex(random(400), random(600));
    curveVertex(random(400), random(400));
    endShape();
  }
}

function stalk() {
  for (var i = 0; i < 30; i++) {
    fill(color(144, random(200, 255), 144, 60));
    beginShape();
    curveVertex(400, i);
    curveVertex(400, 350);
    curveVertex(800, 700);
    curveVertex(random(500), random(700));
    endShape();
  }
}
```

## TIL 📝

`curveVertex` function can draw a complex curve. It's still difficult for me to master. However, such a curve is necessary to draw any kinds of stuff in nature.

---

I started publishing my artworks on a cool hosting web service, [OpenProcessing](https://www.openprocessing.org/user/128456) as well.
Stop un-tagged instances
Tags: gitlab, autoscale, aws, bash
Published: 2019-03-22 15:56:45

---
title: Stop un-tagged instances
published: true
tags: gitlab,autoscale,aws,bash
canonical_url: https://deeb.me/20180503/stop-un-tagged-instances
---

After setting up a bastion and getting GitLab runner to autoscale on EC2 spot instances, I noticed that some instances are being started but left un-tagged and probably unused. Those seem to slip through the cracks somehow .. I’m still investigating why that’s happening.  
Meanwhile, to avoid paying for those instances, I set up a cron to check for non tagged instances on EC2 and terminate them.

Here’s my bash code using aws-cli

```
#!/bin/bash INSTANCES=$(aws ec2 describe-instances \ --filters "Name=key-name,Values=runner-\*" \ "Name=instance-state-name,Values=running" \ --query 'Reservations[].Instances[?!not\_null(Tags[?Key == `Name`].Value)] | [].[InstanceId]' \ --output text) if [-n "$INSTANCES"]; then aws ec2 terminate-instances --instance-ids $INSTANCES fi
```

This looks for running instances, with the _Key Name_ `runner-*` and where the _tag_ `Name` is not not\_null (so null!)

It’s working so far. Will keep on looking for a more permanent solution.

35.5138298  
24.01803670000004
Pusher Contest Idea: a JavaScript Game
Tags: pushercontest, javascript
Published: 2018-05-03 15:32:20

---
title: Pusher Contest Idea: a JavaScript Game
published: true
description: 
tags: pushercontest, javascript
series: [pusher contest]
---

As you may read, the first [dev.to contest](https://dev.to/devteam/first-ever-dev-contest-build-a-realtime-app-with-pusher-4nhp) is going on this month and as an avid dev.to blogger I thought, maybe I should throw in an idea. I don't know if I find the time to implement it, while I have no project this month I'm going to a festival and doing the third and hardest AWS Associate certification.

## What

So I thought about what to do?

Something useful? Meh...

Something innovative? Muh...

Something entertaining? Probably!

People like entertainment!

You are people, I am people, so everyone would be happy.

But!

It's not even a full month time!

So I need a simple game...

I read everyone loves clickers, which probably has the simplest gameplay of them all. You click and life gets better.

Also, because this is a Pusher contenst, it has to be multiplayer.

So what type of multiplayer games are __in__ right now?

Yes you thought right: Battle Roayle

So yes, a battle roayle style clicker game.

## How

Hosting the client on [Amazon S3](https://aws.amazon.com/de/s3/).

Pushers [private channels](https://pusher.com/docs/client_api_guide/client_public_channels) & [client events](https://pusher.com/docs/client_api_guide/client_events#trigger-events) could distribute the clicks to all participants.

Pushers [web hooks](https://pusher.com/docs/webhooks#client_events) could be used together with [AWS Lambda](https://aws.amazon.com/de/lambda/features/) & [AWS API Gateway](https://aws.amazon.com/de/api-gateway/) to track the clicks server side.

[AWS DynamoDB](https://aws.amazon.com/de/dynamodb/) could track the clicks for every game, ElastiCache would also be worth checking out, but I guess Lambda, API Gateway and DynamoDB would be the fastest to be set up with [AWS SAM](https://github.com/awslabs/serverless-application-model).

[AWS Step Functions](https://aws.amazon.com/de/step-functions/) could handle the game state. If I understood it correctly it's basically a state machine that triggers specific Lambda functions for every state it enters. These functions could publish game events via HTTP to the Pusher API. Like game start, game end, player out, etc.

## Problems

The Lambda functions could be too slow because of cold-starts.

And messing around with game state in a serverless environment could become quite cumbersome, I never used AWS Step Functions, haha.

The game could be boring, lol

## Conclusion

Nice idea, a path that could lead to a solution and maybe enough time to design and implement it.

Lets see...
Evergreen skills to use throughout your career?
Tags: discuss, career
Published: 2018-05-03 14:59:55

---
title: Evergreen skills to use throughout your career?
published: true
description: What are the skills that'd last throughout your career?
tags: discuss, career
cover_image: https://images.unsplash.com/photo-1473448912268-2022ce9509d8?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=f78b533b7bac6a79b4c694bac28bdb2f&dpr=1&auto=format&fit=crop&w=1000&q=80&cs=tinysrgb
---

Technologies change everyday.
Web is fast changing.
From static HTML, Dynamic websites and to WebAssemblies.
And You see a bunch of new JavaScript libraries released everday.

_It's hard to keep up and skillsets change every few years._

But I see developers using vi/emacs/make/gcc skills for decades.

🤔**What are the evergreen skills you can invest in (or learning now)❓** 


_____

** Update on 12/14/2018 **
Check out this great post by [Alex Fawkes](https://dev.to/alexfawkes), in which he discusses the topic more in depth.


{% link checkgit/software-development-some-things-never-change-1lk5 %}