teleren/devto huggingface dataset:
Why I have chosen to join the ClassicPress project
Tags: development, opensource, wordpress
Published: 2018-09-28 17:52:01

---
title: Why I have chosen to join the ClassicPress project
published: true
tags: Development,Open Source,Wordpress
canonical_url: https://daniele.tech/2018/09/why-i-chosen-to-join-the-classicpress-project/
---

This article is to be understood and considered as my personal opinion. Take a coffe, a candy or a pizza because this article is very long! 

The post [Why I have chosen to join the ClassicPress project](https://daniele.tech/2018/09/why-i-chosen-to-join-the-classicpress-project/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
how to get the contents of a table row 
Tags: javascript, dataid, tr, table
Published: 2018-09-28 11:20:41

---
title: how to get the contents of a table row 
published: true
description: Here i am going to explain how to get the contents of a table row and how can we get data_id value in javascript
tags: javascript,data_id,tr,table
---




#snippet to get tr DATA value

#snippet to get td value

    html +=
     ` <tr data-id=’JavaScript’>
     <td>1</td>
     <td>2</td>
     <td>3</td>
     <td>4</td>
     <td>5</td>
     </tr> `
     document.getElementById(‘tablebody’).innerHTML = html;

‘#example’).find(‘tr’).click(function() {

 console.log(‘===========’, $(this).attr(“data-id”)); // get tr data value
 console.log(‘===========’, $(this).data(‘id’));
 console.log(‘===========’, $(this).find(‘td:eq(1)’).text()) // get 1st td value 

});
I am Software Engineer and former Director of Engineering, Ask Me Anything!
Tags: ama
Published: 2018-09-28 11:08:45

---
title: I am Software Engineer and former Director of Engineering, Ask Me Anything!
published: true
tags: ama
---

Hi, I'm Allan. I been working as a professional software engineer for 10+ years, I have worked as a freelancer, Director of engineering for a team of 40+ developers and I'm currently the CTO of a small startup up. 

I'm happy to answer any questions about the industry, hiring and career path development. 

Cheers!
Soul in the Machine – Building with Integrity
Tags: ethics, machinelearning
Published: 2019-06-28 12:43:05

---
title: Soul in the Machine – Building with Integrity
published: true
tags: Ethics,Machine Learning
canonical_url: https://jasonstcyr.com/2018/09/28/soul-in-the-machine-building-with-integrity/
---

This is Part 2 in the Soul in the Machine series. In the Soul in the Machine series, I will be delving into our collective responsibility to ensure that computing systems are treating users fairly and responsibly. Specifically, I will be raising the ethical questions around current trends such as data privacy regulations and machine … [Continue reading Soul in the Machine – Building with Integrity →](https://jasonstcyr.com/2018/09/28/soul-in-the-machine-building-with-integrity/)
Go To Previous Git Branch Or Previous Directory via Terminal #OneDevMinute
Tags: onedevminute, git, shell
Published: 2018-09-28 10:35:03

---
title: Go To Previous Git Branch Or Previous Directory via Terminal #OneDevMinute
published: true
description: "Go To Previous Git Branch Or Previous Directory via Terminal #OneDevMinute — Easy naigation back and forth with a shell tip in git branches and normal directories."
tags: onedevminute, git, shell
---

Yet Another #OneDevMinute where you'll learn about how easy it is to access the previous git branch, and then again do the same with normal directories in your terminal. 

Seriously, if you are working in two different directories or in two different git branches, then moving back and forth again and again can be pretty cumbersome. This tip sets you up with `cd -` or `git checkout -`. Watch the video to learn more.

```sh
git checkout other-branch
git checkout yet-another-branch
git checkout - # Takes you back in the other-branch
git checkout - # Takes you back in the yet-other-branch

cd dir1
cd dir2
cd - # Takes you back in the dir1
cd - # Takes you back in the dir2
```

- 📺 1080p on https://Youtu.be/UoECcEzda1Y
- 👨‍💻 Code Gist: https://Ahmda.ws/2NJ7k4K
- 📨 Newsletter + site coming soon


> P.S. If you like my work, feel free to share it, like it. I am quite active on twitter you can find me cracking silly jokes there, maybe [follow me on Twitter](https://twitter.com/MrAhmadAwais) to connect and [subscribe to my YouTube channel →](https://YouTube/AhmadAwais)
> Peace! ✌️

🗣️ Comment below if you didn't get something.
What are your goals as a developer?
Tags: discuss, productivity
Published: 2018-09-28 10:03:59

---
title: What are your goals as a developer?
published: true
tags: discuss, productivity
---
Earlier this year, I publicly committed to the #100DaysOfCode challenge on twitter. I discovered two things:
* setting goals can really boost your productivity as a developer
* publicly committing to them gives you some accountability and pushes you to deliver

I'm looking to set some long term goals now. I realised I'm being sidetracked by all the different technologies coming out and I really want to settle down and focus on one thing. I believe setting a definite goal will help me achieve that. I know goals are personal and unique, but I'm sure I can get some inspiration from someone. 

What are your goals as a developer and why?
Review. Do you find it helpful? objectInterface
Tags: javascript, discuss, opensource
Published: 2018-09-28 09:40:24

---
title: Review. Do you find it helpful? objectInterface
published: true
description: Interface for building an object by configuration
tags: javascript, discuss, opensource
---

One time I’ve found difficult to find out what data we should send to a server for that or this request. We have not had a docs, so a good solution was to move required keys to an interface and each time you call it you have correct structured data.

I will appreciate any thoughts and feedbacks.
Thanks!

https://github.com/shystruk/famulus/blob/master/objectInterface.js

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/yy3m4su73ppf21oqdy1c.png)
Data validation mistakes made by beginners
Tags: devtips, discuss
Published: 2018-09-28 08:29:07

---
title: Data validation mistakes made by beginners
published: true
description: 
tags: devtips, discuss
---

Let's start simple. You have a method that, sometimes, when called with certain arguments or at certain times it might fail. How do we tell that to the user? What about to the programmer using that method?

Here are 4 guidelines that will help your team validate data in a consistent manner without running into some trivial issues:

* Treat validation errors first

This ties in with the other article I posted:
{% link https://dev.to/codevault/invert-your-ifs-2m0g %}

* Do not let your methods fail silently

This is when you don't let the caller of your method know if the method failed and did absolutely nothing.

* Return a proper error

Return 0 when your method fails and it is called `getIndexOf...` is a really bad idea.

* Do not validate for developer errors

Validating if your constants are actually defined (in an interpreted environment) using if statements is simply a waste of time and these problems should be **solved** and not **validated**.

The caller nor the user can help you solve this issue.

These are simple rules, but they can affect your project in the long run if you don't apply them from the start. Check out this video I created explaining more in-depth about this subject:

{% youtube gKS3yEjEbJI %}

What do you think? Was this better presented than the post before, or was it worse? Did you get something out of this?

Also, for the guys (or gals) that previously suggested to add more content on the article itself, is this good enough? I have also posted on my blog but the content is quite large and wouldn't really fit in here that well.
Browser Based Cyber Threats
Tags: browsers, security, privacy, cyberattacks
Published: 2018-09-28 08:25:24

---
title: "Browser Based Cyber Threats"
published: true
description: "Is your browser hacking you? It may be easier than what yout think!!!"
tags: "browsers,security,privacy,cyberattacks"
---

After reading [this article](https://www.lastline.com/blog/browser-based-cyberthreats/) I think I should drop it here in order to raise awareness among us developers, because from my experience I know that a lot of them are not aware that when they browse into a website they can be hacked while passively browsing the content of it, even when the site looks perfectly normal and behaves normal.

##### Quoting the article:

> As an example of how a browser-based attack works, consider a scenario where a Windows user visits a seemingly benign but now malicious website, possibly one he or she has visited before, or as the result of an enticing email. As soon as a connection occurs, the user’s browser begins interacting with the site. Assuming the system is using JavaScript, which according to research firms like Web Technology Surveys, 94% of all websites do and over 90% of browsers have it enabled, the browser will immediately download and start executing JavaScript files from the malicious website.

Several techniques that use javascript can be used, like in the [British Airways](https://www.wired.com/story/british-airways-hack-details/) or [TicketMaster](https://www.riskiq.com/blog/labs/magecart-ticketmaster-breach/) hacks from the well known cyber Criminals *MageCart*.

But javascript is not the only vector used for browser attacks, Flash or PDF's can also be used to exploit your browser vulnerabilities.

So all this types of browser attacks will be used to exfiltrate data as you type it, like credentials to login into your bank account or to permanently infect your computer with malware or ransomware.

So we must suspect when a page takes to much time to load or keeps having the spinner active in your tab and hit F12 to look what is doing.

I use [9.9.9.9](https://www.quad9.net/) in conjunction with [Steven Black Hosts File](https://github.com/StevenBlack/hosts) to resolve DNS in order to protect me from sites that are considered dangerous (I will do an article later on this setup). Another alternatives exist for the same but they require active software running on my network and I am not feeling confident in allowing it. I also use Firefox with tracking protection always enabled.

Oh did I mentioned you that now the page load time of the pages I visited are much more faster and free of tracking and ads???
[DevOps case study] Punchh achieved zero-touch CI/CD and DevOps as-code in less than a month.
Tags: ci, cd, devops
Published: 2018-09-28 08:11:02

---
title: [DevOps case study] Punchh achieved zero-touch CI/CD and DevOps as-code in less than a month.
published: true
description: The digital marketing products company was struggling with their DevOps, and finally Shippable helped them scale and achieve zero-touch automation (CI/CD and DevOps)
tags: ci, cd, DevOps, 
---

Do you know most companies adopt hashtag#DevOps in an ad-hoc fashion, without a clear roadmap or strategic plan? 
We recently came across a digital marketing platform company, Punchh, which was struggling because of this.

In the words of Punchh CTO Aditya Sanghi: “We lacked a clear CI/CD strategy and our automation was too people-dependent and custom. As a result, onboarding new customers or making changes to existing services required a lot of custom work and our environments and configs were prone to drifts. We needed a way to keep up with a rapidly growing customer base without burning out the team.”

Aditya started looking for a CI/CD platform that would provide them with zero-touch automation and economies of scale as they accelerated their growth.

With Shippable, he found a team that took the approach of “solving the problem together” as opposed to just “selling a platform.” The result? Zero-touch automation across all services and customer deployments in less than one month, while shrinking automation codebase by 80% and increasing deployment speed by 5x.

###Results
With Shippable, the Punchh team achieved [zero-touch automation](https://www.shippable.com/how-punchh-scaled-devops.html) with a streamlined toolchain in less than 1 month. Some highlights of the new CI/CD automation workflows are:

1. Customer on-boarding takes less than one day, during which the Punchh team team can bring up a brand new instance of their service. This was reduced from 2-3 weeks of effort.
2. Deployment reliability has gone up 80 %, and time spent in debugging release issues has reduced by 4x.
3. Automation code reuse has gone from ~10% to 95%.
4. Adding new workflows or changing existing ones takes less than half a day, down from 2-3 weeks.
5. Ramp up time for new developers has gone from months to less than 1 week.
6. Docker build performance has improved 400%, from 120 mins/day to 30 mins/day.

![DevOps Results](https://thepracticaldev.s3.amazonaws.com/i/frdigfdhzffu2nxw2eb5.jpg)

The complete case study is [here](http://bit.ly/PunchhCaseStudy)

How are you doing DevOps at your organization? 
Do you have a systematic road-map and a startegic plan?
Is it really important to save django's migrations in a version control system ?
Tags: help
Published: 2018-09-28 05:23:21

---
title: Is it really important to save django's migrations in a version control system ?
published: true
tags: help 
---

Hi mates, i am working with my team ( we are 4 in total) on a django project and any developer could make a modification on a model and then generate his migrations but sometimes it is really difficult to deploy the app after merge (even for tests), some reasons are : ***XXX_migration_XXX has been applied before his dependency XXX_migration_XXX***, this is because of inconsistency between the differents Databases and the different migrations.

So i started to think that to avoid this kind of situation we should stop versionning the migrations. What do you think ? Did you sometimes fall in this kind a mess with migrations, (spaghetti migrations ;-) )?

PS : Sorry about my english
Getting qmux to use browser and Node WebSocket
Tags: typescript, node, websocket, devlog
Published: 2018-09-28 05:10:13

---
title: Getting qmux to use browser and Node WebSocket
published: true
description: We implemented two WebSocket session transports for qmux, one for Node and one for the browser. Then spent time figuring out how to compile and package up for each environment. End result, nice clean project structure and demos!
tags: typescript, node, websocket, devlog
---

Today we came back to qmux: a protocol, C library, and native JavaScript library for multiplexed streams. I wanted to finish up the JavaScript library, which needed a WebSocket session transport that works for Node and the browser.

The session transport was not that hard to get working. I had planned to use a different Node WebSocket library than I did, but it worked out pretty well. The browser version was nearly identical since their APIs were so close.

The real trick came when figuring out how to compile and package this up for both Node and the browser. TypeScript added an extra layer of configuration. I used to write libraries that would work for both browser and Node by exposing the API differently depending on whether a browser was detected. This project is slightly more complex because it has internal requirements and TypeScript has its own import/export stuff. 

I ended up using the core qmux file, and then a file for Node and a file for the browser. For Node we point at the Node file as the index for the package. For the browser we use [Browserify](http://browserify.org/) and [Uglify](https://github.com/mishoo/UglifyJS2) to make a standalone, miniaturized JavaScript file to include in pages. This also forced me to clean up the project directory structure a bit. 

I thought it was interesting Browserify only wanted to export the last of multiple input files, so I re-exported the core types in the browser-specific entry script. And since we use Node's Buffer class quite a bit, I ended up also packaging in a tiny Buffer implementation made for the browser. I re-export this as well since we expect users to use it. 

I think next on "q" project series, we'll try to get qrpc working in the browser. Then we'll be cooking. I'm also exploring how to get qmux and qrpc to work in a JXA environment.

{% youtube EI3-KWngQf0 %}
Things to consider while asking for advice
Tags: career, advice
Published: 2018-09-28 02:48:32

---
title: Things to consider while asking for advice
published: true
description: 
tags: career,advice
---
This is a comment I posted earlier on [this discussion](https://dev.to/svemaraju/askdev-how-to-approach-people-online-for-asking-career-related-advice-4lal). Wanted to share it with the wider community.

***

I frequently receive cold emails for some advice. I love helping people but its only possible to do so if -

-  The ask is **highly specific** - The help needs to be very specific request. Which means no "meeting for coffee", no "general discussion", no "pick your brains about an idea i have", nothing vague.

- The ask has **high context** - The context has to be explained upfront and has to be specific too. The answer that is right for person X is not right for person Y. Hence the answer to most questions is always in the territory of "it depends on the situation". Describe your situation and the answer becomes useful for you.

- The ask has **high relevance** - Do your research on the person before sending an email. Don't ask a software engineer about hardware problems. Don't ask a highly technical person management questions and vice versa. The question needs to be relevant to the experience of the person who is asked the question. If you can't figure out if its relevant - ask them that if the question is relevant to their experience.

Examples - 
- A good ask - “I know you have built analytics systems before. I am currently building one for my project which needs to ingest 10 GB / day and in 6 months scale to 1 TB / day. We are currently using Azure and are open to using tools from Java and Python. How do I design it so that it scales well?" 

- A bad ask - "I loved your post about X. Can we connect to discuss more of it?"

- A good ask - "I am currently struggling with React JS and building apps in which use redux. Can you help me understand it? I will need 45 mins of active discussion to give you context."

- A bad ask - "I need help on what to do with my career."

- A good ask - "I am not sure what I want to do next. I am a fresh graduate with no professional experience and I am currently thinking AI/ML vs Blockchain. Money is tight and I really need to figure this out in a month or so."
NodeJS vs. Python 3 Performance
Tags: python, node, javascript
Published: 2019-04-25 06:47:20

---
title: NodeJS vs. Python 3 Performance
published: true
tags: [python, nodejs, javascript]
canonical_url: https://warrenwong.org/nodejs-vs-python-3-performance/
---

_Originally published at [warrenwong.org](https://warrenwong.org/nodejs-vs-python-3-performance)._

While trying to become more Pythonic in my coding, I have been going over some of my Project Euler toy problems. It's mostly fun and cathartic, but I did notice something fairly interesting.

On [problem 7](https://projecteuler.net/problem=7%22) of Project Euler, the solution seems fairly simple to implement. My implementation for both is rather similar (no real obvious way to make it utilize some of the newer features of JavaScript or Python 3 that I can see). My assumptions was that it would take about the same amount of time to run.

NodeJS implementation:

```javascript
const isPrime = n => {
  for (let i = 2; i < n; i++) {
    if (n % i === 0) {
      return false;
    }
  }
  return true;
};

const getPrime = n => {
  let count = 0;
  let num = 2;
  while (n > count) {
    if (isPrime(num)) {
      count += 1;
    }
    num += 1;
  }
  return num - 1;
};
```

Python implementation:

```python
def is_prime(n):
  for i in range(2, n):
    if (n % i == 0):
      return False
  return True

def get_prime(n):
  count = 0
  num = 2
  while n > count:
    if is_prime(num):
      count += 1
    num += 1
  return num - 1
```

I mean, it's fairly simple and straight-forward. The time complexity of both should be exactly the same, but I couldn't believe the difference. I ran it several times with the Unix `time` utility and I consistently got sub 2 seconds for the NodeJS implementation and over 25 seconds for Python 3.

[<picture>
        <source srcset="/static/af3c756f3d840c52adcf81530af30691/293eb/nodejs-vs-python-3.webp 175w,
/static/af3c756f3d840c52adcf81530af30691/68ba6/nodejs-vs-python-3.webp 350w,
/static/af3c756f3d840c52adcf81530af30691/59594/nodejs-vs-python-3.webp 631w" sizes="(max-width: 631px) 100vw, 631px" type="image/webp"></source>
        <source srcset="/static/af3c756f3d840c52adcf81530af30691/71c04/nodejs-vs-python-3.png 175w,
/static/af3c756f3d840c52adcf81530af30691/852b6/nodejs-vs-python-3.png 350w,
/static/af3c756f3d840c52adcf81530af30691/100d0/nodejs-vs-python-3.png 631w" sizes="(max-width: 631px) 100vw, 631px" type="image/png"></source>
        <img style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;box-shadow:inset 0px 0px 0px 400px #607d8b;" src="https://warrenwong.org/static/af3c756f3d840c52adcf81530af30691/100d0/nodejs-vs-python-3.png" alt="nodejs vs python 3" title="">
      </picture>](/static/af3c756f3d840c52adcf81530af30691/100d0/nodejs-vs-python-3.png)

It's actually incredibly alarming for me to see the difference since I would think the performance would be fairly similar. Since I was curious, seems like [other](https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/node-python3.html) more "formal" benchmarks also confirm this.

Well color me surprised.
ZeitのNowにデプロイするファイルを指定する時の注意
Tags: now, node, nuxt
Published: 2018-09-27 23:19:59

---
title: ZeitのNowにデプロイするファイルを指定する時の注意
published: true
description: 
tags: now,node,nuxt
canonical_url: https://crieit.net/posts/Zeit-Now
---

Zeitの[Now](https://zeit.co/now)にNuxt.jsのアプリケーションをデプロイする場合、公式のマニュアルにもあるようにnowコマンドで簡単にデプロイすることができる。ただ、うまくいかないパターンがあった。

[Now Deployment - Nuxt.js](https://nuxtjs.org/faq/now-deployment/)

## 症状

デプロイ後確認してみると、作成したアプリケーションではなく、Nuxtをインストールした時の状態の画面が表示されてしまっていた。

## 原因

.gitignoreで指定したファイルは通常Nowにデプロイされる際には無視されるのだが、設定することで強制的にアップすることができる。具体的には now.json というファイルに files という設定を行うことで可能。

```json
{
  "files": {
    "secret.js"
  }
}
```

恐らく、これによりこのファイルしかアップロードされなくなってしまったのではないかという気がした。package.jsonは恐らく重要なので勝手にアップされ、Nuxtがデフォルトの状態でインストールされて表示されていたのではないだろうか。

## 対処方法

filesにすべてのフォルダとファイルを指定することで解決した。（不要なものもあるかもしれない）

```json
{
  "files": {
    "assets",
    "components",
    "layouts",
    "middleware",
    "pages",
    "plugins",
    "static",
    "store",
    "secret.js",
    "nuxt.config.js",
    "yarn.lock"
  }
}
```