teleren/devto huggingface dataset:
Why to never reveal your CTC, compensation (and still get employed)
Tags: growthmindset, negotiation, tech, salary
Published: 2017-11-15 18:42:43

---
title: "Why to never reveal your CTC, compensation (and still get employed)"
published: true
tags: growth-mindset,negotiation,tech,salary
canonical_url: 
---

Anyone in the IT sector will come across their first “What is your CTC” fairly quickly. This is when a potential employer demands to know, basically, what is the minimum you have agreed to work for in the&nbsp;past.

At its core, it’s an absurd and lazy question, saving employers the trouble of really evaluating the candidate’s worth for themselves. When buying groceries, do we ask vegetable sellers what they paid to buy their stock? Yet a lot of people don’t blink when asked basically the same. Note: All people deserve equal&nbsp;respect.

So what do you do if asked? Simply refuse to reveal it. Many will accept that. If a recruiter tells you that revealing your CTC is required, they are most likely lying. There’s also a small chance that the organization isn’t organized well enough to determine a candidate’s worth for themselves.

If the company is good enough and actually a place that will be enjoyable to work at, they will not hold it against you. If you don’t get a callback, consider yourself saved from a disrespectful workplace.

#### Why you should do this and what you can&nbsp;gain

The purpose of asking it is obvious, it’s intended to anchor you close to your previous compensation. Many people even believe they can’t ask more than 30%, 10%, 5% of their previous compensation, depending on who you&nbsp;ask.

I and others have doubled salaries and negotiated substantial increases to their offers. If you put effort into yourself to be twice as good as before, why shouldn’t your compensation reflect&nbsp;that?

> If you put effort into yourself to be twice as good as before, why shouldn’t your compensation reflect&nbsp;that?

There is no limit on what you can ask for, as long as you can back that up with evidence of your value. The vast majority of my many friends and acquaintances in Engineering are criminally undervalued for what their work contributes to their businesses. There’s a good chance you are&nbsp;too.

We, as an industry of professionals, need to take personal responsibilty to clean up the malpractises that are committted because they are tolerated. Do your part to not only improve the state of IT but to be paid fairly for your&nbsp;growth.

For more tips on negotiations and what to do once you’re in the interview, [here’s the best resource](http://stephaniehurlburt.com/blog/2016/7/12/tips-for-negotiation) I’ve ever seen for&nbsp;it.

Comment about your experiences below and feel free to reach out to me on Twitter at [@AniketSMK](https://twitter.com/AniketSMK)
Technology stack for one-page one-function web app?
Tags: discuss, webdev, javascript, java
Published: 2017-11-15 17:37:12

---
title: Technology stack for one-page one-function web app?
published: true
description: 
tags: discuss, webdev, javascript, java
---

*__EDIT:__ Was "Best web app technology stack?", but noticed it was not really what I meant to ask* 

I’m still finishing my article on learning the functional API of Java 8, but I don’t want it to be my only focus. In fact, I want to write about the projects that I’m working at any given point.

My experience in web development has been limited to an HTML/CSS/JavaScript/PHP stack for most part on its pure form. No framework or fancy libraries because that’s how a “real developer” would do it. (I really used to think like that.)

Now it’s time for a change. I want to know what would be good stacks of technologies (framework/libraries/tools/...) to develop one-page one-function web app, such as graph presentation or simple utility tool. Being able to pack the app to be used on any computer would be a plus. About the languages I would use, it could be any of the previous mentioned ones, Java, but it could also be any languages which could be easy to pick if it gives me some advantages.

So what would you pick? It can be your favourite, or simple what you think is interresting. I’ll look into the suggestions, choose some and write about my experience.
I'm the founder & CEO of Codeship, ask me anything!
Tags: ama
Published: 2017-11-15 17:36:37

---
title: I'm the founder & CEO of Codeship, ask me anything!
published: true
description: Feel free to ask me anything about building a developer tool company, all the different aspects of running a startup, culture/leadership, Continuous Integration/Delivery.
tags: ama
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bq1xac4twrgxhfi5t0af.png
---

I'm Mo, one of the founders and the CEO of Codeship. I spend most of my day working with our team on helping our customers ship code more often. Feel free to ask me anything about building a developer tool company, all the different aspects of running a startup, culture/leadership, Continuous Integration/Delivery.

Codeship started out in Austria (where I grew up) and I moved to the US 4-5 years ago. Over time, we transitioned into a remote first company and the majority of our team is working remotely now. It took us a while to figure that out and I'm happy to share as many learnings as you want from our journey.

When I'm not thinking about Codeship, I try to spend as much time as possible outdoors, rock climbing, running, skiing, hiking - you name it. That plus my love for chess and sleeping pretty much makes up my days ;)
How to use <ruby> tag
Tags: html
Published: 2017-11-15 16:26:03

---
title: How to use <ruby> tag
published: true
description: In Japanese it is common usage of ruby
tags: html
---

&lt;ruby&gt; tag? What is that?
If you see it for the first time, you may not know how to use it.


The &lt;ruby&gt; tag is used mainly to indicate how to read kanji.
For example,

    <ruby><rb>花</rb><rp>(</rp><rt>はな</rt><rp>)</rp></ruby> 

<ruby><rb>花</rb><rp>(</rp><rt>はな</rt><rp>)</rp></ruby> 


~~Because the style has been reset in dev.to, it is not displayed in the style that looks good in Japan:)~~
Since Ben responded quickly, it is displayed as expected. Great.


You can apply this to emoji.

For example,

    <ruby><rb>🌼</rb><rp>(</rp><rt>Flower</rt><rp>)</rp></ruby> 

<ruby><rb>🌼</rb><rp>(</rp><rt>Flower</rt><rp>)</rp></ruby> 


It's a nice feeling!

You can play like this.
<ruby><rb>🍺🍕🍺🍕🍺🍕🍺🍕</rb><rp>(</rp><rt>Today is Product Hunt</rt><rp>)</rp></ruby> 


Let's enjoy new expressions with &lt;ruby&gt; tag!
Conway's Game of Life w/ FFmpeg
Tags: ffmpeg, lifegame, animation
Published: 2017-11-15 16:16:00

---
title: Conway's Game of Life w/ FFmpeg
published: true
description: Generate "Conway's Game of Life" animation with FFmpeg
tags: ffmpeg, lifegame, animation
---

You can play ["Conway's Game of Life"](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) with [FFmpeg](https://www.ffmpeg.org/) command line tool. I'm not kidding.

Let's generate GIF animation with worldsize=60x60 generation=500.

```bash
$ ffmpeg -f lavfi -i life=s=60x60 -vframes 500 lifegame.gif
```

![world60x60-500gen-simple](https://camo.qiitausercontent.com/eb6eb367d6c0366643178e211d4e26d6cc9c271a/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f363635372f64336131666432372d643865662d663463342d656339352d3930316662353437653661342e676966)

OK, here is decorated version:

```bash
$ ffmpeg -f lavfi -i life=s=60x60:life_color=00ff00:ratio=.5 \
  -sws_flags neighbor -vf scale=360:360,drawgrid=w=6:h=6 \
  -vframes 500 lifegame.gif 
```

![world60x60-500gen](https://camo.qiitausercontent.com/6460dfb406278f818805744fde2ecefe9203e1e4/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f363635372f64373634383466652d346161612d313763662d353837332d3962313139313763663961612e676966)

Enjoy!
Whoops! Наглядное отображение ошибок в PHP
Tags: php, whoops, errors, pretty
Published: 2018-01-31 14:33:51

---
title: "Whoops! Наглядное отображение ошибок в PHP"
published: true
tags: php, whoops, error, pretty
canonical_url: http://phpprofi.ru/blogs/post/77
---

Когда мы сталкиваемся с ошибками в PHP, каждый раз это,&nbsp;мягко говоря, тихий ужас. А если вы вспомните как вы в первый раз смотрели на это сообщение и пытались понять, что "от вас вообще хотят" и как это чудо читать и понимать, то вы точно со мной согласитесь. Не то&nbsp;чтобы эти сообщения об ошибках не информативны, — нет там достаточно информации, — но читать их практически невозможно. Ну как минимум очень неудобно, а как следствие — долго, что прямо влияет на скорость разработки. Конечно, если у вас стоит и настроен `xDebug`, это немного спасает ситуацию, но не особо.

В довершение&nbsp;к тому, что эти сообщения не читабельны и плохо воспринимаются, добивает то, что на поиск места в коде в вашем любимом IDE уходит достаточно много времени (ну больше, чем хотелось бы). Ну и напоследок, в тот момент, когда вы открыли нужное место в коде, вы тут же поняли, что ошибка явно произошла не здесь, а где-то выше или ниже по стеку. И нужно вновь открывать станицу с ошибкой, изучать сек вызова и вновь искать нужный фрагмент кода. Неприятное и муторное занятие.

И вот тут решить все эти проблемы нам поможет `Whoops`!

![](http://phpprofi.ru//resources/img/blogs/ee7f40e6-9ea8-4827-bc90-eff9bf860dcf.jpeg)

## Что такое Whoops

Читать далее: http://phpprofi.ru/blogs/post/77
Pusher is hiring a Visual Interactive Designer
Tags: hiring
Published: 2017-11-15 15:21:57


## About Us

Why Pusher?
There are more than 20 million developers in the world with millions of soon-to-be developers currently in colleges, universities, coding bootcamps, or teaching themselves how to code via online courses and tutorials. This is your potential audience 🌍 .

We believe that in the next ten years, every company will become a software company, and developers will need great tools to be productive and do their jobs. Pusher acts as a force multiplier to help people build more products and features with less code.

## About The Opportunity

At Pusher, we understand the importance of good design, and using it to make our products more fun to explore, and much easier to use 🙌 . From our marketing site to our product dashboards (and everything in between), you’ll work with cross-functional teams to craft the visual story of Pusher to over 200,000 developers both on and off the web.

You’ll sit in one of our autonomous, cross-functional marketing squads that encompass design, engineering, growth, and data science. There, you’ll help research, design, and develop ideas that help us to connect with our growing audience and turn them into long-term, happy users of our products . You’ll sweat the design and technical details to make things beautiful, simple, and fast.

## Skill & Qualifications

Responsibilities:

As part of a marketing squad, you’ll have broad reach through designing thoughtful, delightful experiences for our visitors and customers. You’ll work on anything from high-impact marketing pages to experimental projects that engage our community.



Example tasks:

Designing and building new projects such as Sessions
Revamping our marketing website and blog
Designing impactful creative for web, email, and events
Designing the new versions of our fan favourite t-shirts
Contributing to our UI component libraries and style guides.


Is this you?

1-3 years creating visual design work and helping to build web experiences
Portfolio featuring a variety of digital design solutions across different mediums
A strong grasp of layout, colour, and typography on and off the web
Awareness of current design trends and how to use them effectively in your work
Experience with design tools such as Sketch, Figma, or similar alternatives
Understanding of web technologies such as HTML, CSS & JavaScript - experience a plus

## How To Apply

https://pusher.workable.com/jobs/597251

_Please feel free to leave questions in the comments section._
DEV、これめっちゃよさげやん
Published: 2017-11-15 15:17:13

---
title: DEV、これめっちゃよさげやん
published: true
description: DEVのよさにふれつつ雑に投稿テスト
tags: 
---
# 雑に投稿してみるやん

速いは正義やん

ローディングの概念を忘れるやん
レイテンシの概念を忘れるやん

## EditorがEditor

plain textな感じがいいやん
published: falseで下書き状態で、trueに書き換えたら公開されるなんて萌えるやん
trueにしたらbackgroundグリーンになるやん、わろてまうやん

## Markdownで書けるやん

- 1
- 2
  - 3

[ ] あれ
[ ] これ
[x] それ

チェックリストは書けないやん

[Twitterのとあるツイート](https://twitter.com/yosuke_furukawa/status/930664396824678400?s=17)から来ました。

https://twitter.com/yosuke_furukawa/status/930664396824678400?s=17
展開される？されないやん

英語がんばろかな？てなるやん
Japanese check
Tags: japanese
Published: 2017-11-15 15:04:07

---
title: Japanese check
published: true
description: 
tags: Japanese 
---

Dev.to is very fast web site, so I’m interesting and started.
I want that this site becomes famous at Japan.
I just test Japanese.

dev.to は とても早いサイトなので日本でも流行ってほしい。
意外と日本語も書けるようだがタイムラインを汚さないためには英語の方がいいかもしれない。
はじめてのdev.to 
Tags: netservice
Published: 2017-11-15 14:58:56

---
title: はじめてのdev.to 
published: true
description: dev.toの速さに感激！やっぱネットサービスにおいて速さは神ですわ 
tags: #NetService 
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/krp89i5f7z04h6l7pyuh.jpg">

#dev.toの速さに感激した！
ということで初回のポスト。
プログラミング関係のこと書かなきゃいけないのかな？ここ
触ってて気持ちいいので、しばらく遊んでみようと思います。
（mediumもこのくらい速くなればいいのに、、、）
摩訶般若波羅蜜多心経
Tags: 摩訶般若波羅蜜多心経
Published: 2017-11-15 14:22:48

---
title: 摩訶般若波羅蜜多心経
published: true
description: 摩訶般若波羅蜜多心経
tags: 摩訶般若波羅蜜多心経
---

観自在菩薩　行深般若波羅蜜多時　照見五蘊皆空　度一切苦厄
舎利子　色不異空　空不異色　色即是空　空即是色　受想行識亦復如是
舎利子　是諸法空相　不生不滅　不垢不浄　不増不減
是故空中 無色　無受想行識　無眼耳鼻舌身意　無色声香味触法
無眼界　乃至無意識界　無無明亦　無無明尽　乃至無老死　亦無老死尽
無苦集滅道　無智亦無得　以無所得故　菩提薩埵　依般若波羅蜜多故
心無罣礙　無罣礙故　無有恐怖　遠離一切顛倒夢想　究竟涅槃
三世諸仏　依般若波羅蜜多故　得阿耨多羅三藐三菩提
故知般若波羅蜜多　是大神呪　是大明呪　是無上呪　是無等等呪
能除一切苦　真実不虚　故説般若波羅蜜多呪　即説呪曰
羯諦　羯諦　波羅羯諦　波羅僧羯諦　菩提薩婆訶
般若心経
Most effective and simplest way to write readable code.
Tags: beginners, readability, refactoring, programming
Published: 2017-11-15 14:22:29

---
title: Most effective and simplest way to write readable code.
published: true
description: 
tags: ["beginners", "readability", "refactoring", "programming"]
---

We already know the way but probably out of laziness we don’t follow it. It’s the most underestimated way of writing clean code and there is a misconception around it as well which is totally not true, I will come to that in a while. So, Its _breaking down code into functions!_

I agree, we do break down code into functions but not as often as needed. Let’s take this snippet below as our example which was literally a state of code in my previous company. Let’s go through each of the points below.

<img src="https://thepracticaldev.s3.amazonaws.com/i/92ikdxyb3siaguo5bpiw.jpg" width="720">

1. It looks like it is restoring some kind of group. Even though its just 2 lines, it make sense to extract a method out of it.
2. Initially this must have started with one flag. Developer might have thought why bother having a separate method for just 1 line of code! Then later another flag was added and then yet another.
3. Seems like we are creating a drawer for a view. Why the heck high level code should care how it is getting initialised?
4. Only after going through 4 lines of code, I am able to understand that we are notifying device information. I know 4 lines aren’t lot but such things can span 10s or even 100s of lines. Better extract out a method.
5. Logging in a reading flow is very unproductive. Get a room!
6. All listeners should be set separately in a method.

After doing some refactoring.

<img src="https://thepracticaldev.s3.amazonaws.com/i/p7ej1npciqjbgcf74xfz.png" width="300">

See how beautiful the high level code looks now. Its easy to scroll through without getting bogged down in unnecessary detail. A well defined method name doesn’t require any comment as well!!

###Tips to follow###
- Don't pollute the reading flow with irky initialisation or complex conditions.
- Define short methods. They are easier to reason, flow is more obvious, scope is shorter, side effects are better visible.
-  Make most read parts of your code declarative.

Its always easy to add two lines in an existing method. But do pay attention if the code above and below the added changes require its own space, if yes, then extract a method out of it. Every set of logic must be bundled properly in a method, that way future contributors will obligingly add changes in there respective methods.

###Conclusion###
Does an increase in the number of methods hurt performance, as many people claim? It’s a misconception and in almost all cases the impact is so negligible that it's not even worth worrying about. If you work on JVM based languages then let me tell you JVM is a wonderful piece of software (it will probably outlast Java!) that has many truly amazing runtime optimizations built-in. So, break it down...

> Code is like humor. When you have to explain it, it’s bad. — Cory House
Small Tips to merge GitHub pull-request into your local repository
Tags: github, git
Published: 2017-11-15 08:57:24

---
title: Small Tips to merge GitHub pull-request into your local repository
published: true
description: PRO tip to merge GitHub pull-request into local repository easily.
tags: github, git
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mdas8tmrscx870dn1a6q.png
---

**PRO tip to merge GitHub pull-request into local repository easily.**

How are you doing checkout GitHub pull-request on local repository? 

```
$ git fetch origin pull/ID/head:BRANCHNAME
```
*ID is pull-request number, BRANCHNAME is name of local branch you will create*

Like this? Would you remember this format in tomorrow? ![thinking](https://practicaldev-herokuapp-com.freetls.fastly.net/assets/emoji/emoji-one-thinking-0764915e60a80115ee69375d403cb7a8d02ec790391a4a9f181bfbd8ba8256dd.png) Maybe I don't.


Thankfully GitHub serve some extra contents with appending file extension into URLs. See [Diff and patch media types](https://developer.github.com/changes/2012-12-10-Diff-and-patch-media-types/). For example, put `.diff` to the end of [pull-request](https://github.com/vim/vim/pull/2070) URL:

```
"https://github.com/vim/vim/pull/2070" + ".diff"
```

[https://github.com/vim/vim/pull/2070.diff](https://github.com/vim/vim/pull/2070.diff)

This request will be redirected to the page of `unified diff`. If put `.patch` to the URL of [pull-request](https://github.com/vim/vim/pull/2070).

```
"https://github.com/vim/vim/pull/2070" + ".patch"
```

[https://github.com/vim/vim/pull/2070.patch](https://github.com/vim/vim/pull/2070.patch)

This will be redirected to the patch file. So you can try to apply the diff like below.

```
$ curl -sL https://github.com/vim/vim/pull/2070.diff | patch -p1
```

Also if you want to merge pull-request into your local repository,

```
$ git checkout -b pr-2070
$ curl -sL https://github.com/vim/vim/pull/2070.patch | git am
```
Do tests and push into master branch.

```
$ git checkout master
$ git merge pr-2070
$ git push origin master
```

Can you see that? It's not difficult at all.
How to build plv8 on Windows
Tags: windows, postgres, v8
Published: 2017-11-15 08:17:36

---
title: How to build plv8 on Windows
published: true
description: 
tags: windows,postgresql,v8
---

This article is obsolete.[Now officially plv8 supports for Windows!](https://github.com/plv8/plv8/pull/272)

# TL;DR;

- https://github.com/plv8/plv8/pull/239


# Let's try


You need following:

- vs2015/vs2017
- Postgres9.6
- git(and patch.exe)
- cmake
- nuget.exe


```shell
$ git clone https://github.com/kjunichi/plv8.git
$ cd plv8
$ git checkout support-msvc
```

you have to patch to PostgreSQL's header file.

```shell
copy "c:\Program Files\PostgreSQL\9.6\include\server\port\atomics\generic-msvc.h" .
set path=%path%;c:\Program Files\Git\usr\bin
patch --binary -p1 generic-msvc.h < generic-msvc.h
```

then,you copy patched generic-msvc.h to PostgreSQL's header file(c:\Program Files\PostgreSQL\9.6\include\server\port\atomics\generic-msvc.h).

```shell
$ bootstrap.bat
$ cmake . -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX="C:\Program Files\PostgreSQL\9.6" -DPOSTGRESQL_VERSION=9.6
$ cmake --build . --config Release --target Package
```

when building is success,you'll get this.

```
plv8-2.1.0-postgresql-9.6-x64.zip
```

Unzip it, and copy to PostgreSQL directories.
Hello, world
Published: 2017-11-15 07:09:49

---
title: Hello, world
published: true
description: 
tags: 
---

```ruby
class Person
  attr_reader :first_name, :last_name

  def initialize(first_name, last_name)
    @first_name = first_name
    @last_name = last_name
  end

  def full_name
    "#{first_name} #{last_name}"
  end

  def say_hello
    puts "hello, world! hello, dev.to! My name is #{full_name}"
  end
end

me = Person.new('Akira', 'Suenami')
me.say_hello
```
Use ndb.tasklet in GAE
Tags: python
Published: 2017-11-15 06:47:40

---
title: "Use ndb.tasklet in GAE"
published: true
description: 
tags: python
---

```python
from time import sleep
from google.appengine.ext import ndb


@ndb.tasklet
def do_some(time):
  yield ndb.sleep(time)
  raise ndb.Return(time)

@ndb.tasklet
def foo():
  a, b = yield (do_some(3), do_some(3))
  raise ndb.Return(a + b)

def main():
  f = foo()
  x = f.get_result()
  print x

main() #Execution time is 3 not 6
```
One Liner Sample
Tags: oneliner, perl
Published: 2017-11-15 06:41:20

---
title: "One Liner Sample"
published: true
description: One Liner Sample (awk, perl)
tags: oneliner,perl
---


- Top IP (awk)
```bash
$ cat logs/access_log  | awk {'print $1'} | sort | uniq -c | sort -nr | head    
```

- Top IP (perl)
```bash
$ cat logs/access_log  | perl -lane 'print $F[0]' | sort | uniq -c | sort -nr | head
```

- Top UserAgent(awk)
```bash
$ cat logs/access_log  | awk -F '"' {'print $6'} | sort | uniq -c | sort -nr | head
```

- Top UserAgent (perl)
```bash
$ cat logs/access_log  | perl -F'"' -lane 'print $F[5]' | sort | uniq -c | sort -nr | head 
```

- minutes access count
```bash
$ cat logs/access_log  | perl -lne 'm{2017:(\d+):(\d+)} and print "$1:$2"' | sort | uniq -c | head
   6559 05:06
   5642 05:07
   5774 05:08
   5592 05:09
   4010 05:10
```

- `%G` format problem
```
$ perl -MTime::Piece -E 'say Time::Piece->strptime("2014-12-30", "%Y-%m-%d")->strftime("%Y")'
2014
$ perl -MTime::Piece -E 'say Time::Piece->strptime("2014-12-30", "%Y-%m-%d")->strftime("%G")'
2015
$ perl -MTime::Piece -E 'say Time::Piece->strptime("2014-12-28", "%Y-%m-%d")->strftime("%G")'
2014
```

- objdump version
```
$ objdump -s peco | perl -lanE 'm{(go/?\d.+)} and say $1' | head -1
go/1.3/libexec
```

- one-liners with Mojo (http://search.cpan.org/dist/Mojolicious/lib/ojo.pm
)
```
$ perl -Mojo -E 'say g("abehiroshi.la.coocan.jp")->dom->at("title")->text' | nkf -w
阿部寛のホームページ

$ perl -Mojo -E 'say g("abehiroshi.la.coocan.jp/top.htm")->dom("td")->[4]->text' | nkf -w
生年月日 1964年6月22日
```




This is first test.

これはテストです🙇