teleren/devto huggingface dataset:
Kuala Lumpur, Malaysia 🇲🇾
Tags: cdn, edge, pop
Published: 2018-05-15 01:36:36

---
title: Kuala Lumpur, Malaysia 🇲🇾
published: true
description: Commons Host Little Lamb Mk I server deployment in Kuala Lumpur, Malaysia
tags: cdn, edge, pop
---

This weekend a Commons Host Little Lamb Mk I server was deployed in Kuala Lumpur (KL), to better serve Internet users across Malaysia. This is the third Commons Host point of presence (PoP) overall, and the first located outside my home town of Singapore.

![Telekom Tower](https://thepracticaldev.s3.amazonaws.com/i/5ya1mdsp8jmsshxlc68o.jpg)
Photo: Telekom Building in Kuala Lumpur, Malaysia (attributed to [ReaperSpectre on Wikimapia](http://wikimapia.org/28233/Menara-TM#/photo/1742434))

Like most Asian cities, Kuala Lumpur offers several fibre ISPs serving residential and SME business customers at quite reasonable prices. Deploying low-cost CDN edge servers on commodity fibre connections is a novel alternative to expensive, or non-existent, enterprise-grade datacentres in many parts of the world.

The KL deployment started at 7 AM with a 4 hour motorcycle ride from Singapore to hand-deliver the tiny server. This was an unintentional vibration test for Little Lamb. Fortunately she is entirely solid state hardware and passed with flying colours.

![Seb passed out on couch with supportive friends](https://thepracticaldev.s3.amazonaws.com/i/lq6wzynjy93qj0wbz7xf.jpg)
Photo: Seb passed out on couch immediately following successful CDN edge server deployment. Thanks to wonderful friends for the support.

Automation of the deployment process [using Ansible](https://gitlab.com/commonshost/ansible/issues) is a work in progress. It took a few hours to manually set up the server. The GeoDNS configuration, using [Constellix](https://constellix.com), now routes all traffic from visitors in Malaysia to the Kuala Lumpur PoP, with the two pre-existing Singapore PoPs as failover. Late Sunday evening the job was finished. Thanks to the company of good friends who morally and physically supported me.

![Photo: Seb presenting a brown bag lunch session at NEXT Academy Kuala Lumpur](https://thepracticaldev.s3.amazonaws.com/i/r1hz4u3ltds983735prz.jpg)

On Monday, at [NEXT Academy Kuala Lumpur](https://www.nextacademy.com), I gave a two minute *brown bag lunch* talk followed by audience Q&A. Lots of great questions from sharp students, mentors, and instructors alike. Both about technical aspects as well as the sustainable business model of a Free and Open Source Software (FOSS) project.

May the lessons learned during this deployment help roll out many more deployments around the world.
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2018-05-21 13:13:42

---
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
---

#1. Think 💡

Using `else if` as an example, Fabio reminds us that we should always try to understand why 'rules' or 'best practices' are the way they are. You might not discover the implicit behavior surrounding your code until you really start asking why things behave the way they do.

{% link https://dev.to/genta/theres-no-else-if-in-js--24f9 %}

#2. Wisdom Gained

A summarized retro on all the interviews taken during a quest to find a new job. Great advice for both those looking to get hired and those doing the hiring. 

{% link https://dev.to/wweihs/developer-interview-bloopers-8hd %}

#3. A frustrating story

Do you feel valued by your company? An example of conflict between a developer and employer.

{% link https://dev.to/spirodonfl/let-me-do-my-damn-job-or-do-it-yourself-28j6 %}

#4. "Enjoying something that hurts you" 

^ that's a direct quote from Batuhan, who is developing his own operating system. The article shares a bit more about what he's building, and the comments tell you why. 

{% link https://dev.to/btaskaya/writing-an-os-from-scratch-2i5e %}

#5. Practice Practice Practice

Tips on cultivating your problem solving skills!

{% link https://dev.to/richardreeze/how-to-think-like-a-programmerlessons-in-problem-solving-5096 %}

#6. Let's do this!

A thorough guide on how to generate an actionable plan for any web app idea. From defining goals to creating steps to sketching out mind maps. 

{% link https://dev.to/nickjj/how-to-start-and-finish-any-web-app-project-3bad %}

#7. A potentially unpopular opinion

Why one may think Java is easier to work with than Node, demonstrated with a single page application.

{% link https://dev.to/grahamcox82/nodejs-has-a-higher-cognitive-load-than-java-2hi6 %}

_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!_
Always use `/` as directory separator in php
Tags: php, windows
Published: 2018-05-21 13:06:51

---
title: Always use `/` as directory separator in php
published: true
description: Why you should always use `/` as directory separator in php and avoid using the constant `DIRECTORY_SEPARATOR` most of the time.
tags: #php, #windows
cover_image: https://thepracticaldev.s3.amazonaws.com/i/c11zi1vt178auxh8vaw1.jpg
---
as a long time windows user and php developer, i can only say: **do not use `DIRECTORY_SEPARATOR`**! it has no real benefit but really can break things.

use `/`. it is the better choice nearly every time.

![yes it break things!](https://i2.imgflip.com/2ap1k1.jpg)

if you use `DIRECTORY_SEPARATOR`, which resolves to `\` on windows, things tend to break. For example:`\` gets converted to `%5C` in urls.
```
http://example.com/media/cache/resolve/my_thumb/d/0/1%5Cfilename.jpg
```
if `DIRECTORY_SEPARATOR` is used, it easily happens that the (relative) path, which will contain a backslash on windows, is passed to something which should be a url. assuming that most of the php developers are using linux or mac (i personally don't know many people who develop php on windows), they don't notice that in a windows environment a backslash is passed to the url and gets escaped as `%5C` which leads to urls like in the example above.

windows and php on windows are capable of opening files with the path `foo/bar\example/test.txt` 
so `DIRECTORY_SEPARATOR` is of no real use except for easily detecting windows or for example if you export a path for a file list where a windows user would be confused to see `/` instead of `\`

```
λ cat ./foo/bar\example/test.txt
mycontent
```
(yes `cat` exists on windows)

```
notepad ./foo/bar\example/test.txt
```
also opens the file

`foo.php`:
```
<?php
$content = file_get_contents('foo/bar\example/test.txt');
var_dump($content);
```
```
λ php foo.php
C:\test\foo.php:5:
string(9) "mycontent"
```

even that works:
```
<?php
$content = file_get_contents('c:/foo/bar\example/test.txt');
var_dump($content);
```


- cat for windows is shipped with git for windows https://git-scm.com/download/win
- the `λ` comes from the shell i use. http://cmder.net/
- meme linked from https://imgflip.com/
- cover image by wezlo https://www.pexels.com/photo/caution-dead-end-post-safety-237189/ https://pixabay.com/en/sign-street-dead-end-1749093/
Simple technical questions
Tags: c, algorithms, career, interviewing
Published: 2018-05-21 13:04:06

---
title: Simple technical questions
description: Simple technical questions show how deep you are understanding the code you write.
published: true
tags: C#, algorithms, career, interviewing
---

Simple technical questions that show how deep you are understanding the code you write.

I always believe in nontraditional ways of finding talented people to join my team.ِ Also, I follow some tricks of mine when I involve in an interview to pick the team I am going to join.

One way of interviewing candidates is to ask simple technical questions that have philosophic answers. Even, if the candidate answers the question correctly, I ask him why this natively got existed. This way I make sure that developer understands well the code he choose to write. I always believe that everything on this universe has a philosophy and a rule of bring it to the reality.

A C# example of such questions is:

What is the difference between each line of code below in terms of performance and execution time?

            var i = 7;
            int j = 8;
            var x = new int[] { 9 };
            object y = new int[] { 10 };
            int[] z = new int[] { 11 };

            Console.WriteLine("i " + i);
            Console.WriteLine("j " + j);
            Console.WriteLine("x " + x[0]);
            Console.WriteLine((y as int[])[0]);
            Console.WriteLine(z[0]);


The candidate needs to explain the differences here, which one is better and how compiler executes them. Hypothetically, all of them should give the same result, but which one developer would use in his code. Here, he should understand var, object and explicit typed array declaration.

Another example is to give him an array of 10 elements with one element repeated. The job is to find the repeated element with only one loop. For instance, 

    var arr = new int[] {1, 4, 8, 30, 4, 77, 5, 0, 10, 9}

He needs to find (4) with only one loop.

Such simple questions does not measure his competence regarding C# as a programming language as I am not convinced to stick to specific language. They measure his talent, how he thinks and how well he plays with the programming language.
How many hours do you normally work per week?
Tags: time, hours, discuss
Published: 2018-05-21 05:17:44

---
title: How many hours do you normally work per week?
published: true
description: 
tags: time, hours, discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mofdeqeqwlla7r4kz1za.jpg
---
Kiểm tra Python 2 hay Python 3
Tags: python2, python3
Published: 2018-05-21 05:14:14

---
title: Kiểm tra Python 2 hay Python 3
published: true
description: Khác biệt giữa Python 2 và Python 3 tạo ra khá nhiều khó khăn cho lập trình viên khi viết script để có thể chạy được trên cả 2 môi trường. Một ví dụ thường gặp đó là sự khác biệt giữa việc sử dụng các hàm `raw_input()` và `input()` trên Python 2 và Python 3.
tags: python 2, python 3
---

Khác biệt giữa Python 2 và Python 3 tạo ra khá nhiều khó khăn cho lập trình viên khi viết script để có thể chạy được trên cả 2 môi trường. Một ví dụ thường gặp đó là sự khác biệt giữa việc sử dụng các hàm `raw_input()` và `input()` trên Python 2 và Python 3.

Để tránh việc phải sửa lại code khi thay đổi môi trường chạy cũng như cho phép script sau khi viết có thể chạy được trên nhiều máy khác nhau, một cách thường được sử dụng đó là kiểm tra phiên bản Python đang chạy sau đó sử dụng thư viện hoặc lệnh tương ứng. Việc kiểm tra này có thể được thực hiện thông qua thư viện cung cấp sẵn sys của Python, bạn chỉ việc kiểm tra giá trị của `sys.version_info` với `tuple (3, 0)`

Đầu tiên, import thư viện sys:

`import sys`
Sau đó kiểm tra giá trị của tuple sys.version_info. Ví dụ sau import thư viện base64 tùy theo phiên bản của Python:

```
if (sys.version_info > (3, 0)):
    # Python 3
    import base64
    return base64.b64encode(data).decode()
else:
    # Python 2
    return data.encode("base64")
```
Chi tiết bạn có thể tham khảo: [Python version_info](https://docs.python.org/2/library/sys.html#sys.version_info)

Tham khảo [**Python cơ bản thường được sử dụng trong công việc**](https://topdev.vn/blog/python-co-ban-thuong-su-dung-trong-cong-viec/).

Nguồn: cuccode.com
Tác giả: dangsonbk
What should I be doing as a backend Django developer?
Tags: django, backend, python
Published: 2018-05-21 05:13:22

---
title: What should I be doing as a backend Django developer?
published: true
description: 
tags: Django, Backend, Python
---

I am working as a backend Django developer for the past year (10 months or so), and mostly specialize in using the django-rest-framework to provide api endpoints for the frontend. My HTML/CSS skills suck, while I'm an absolute newbie in Javascript. I have worked with celery (for async tasks), have meddled around with a bit of logging using elastic, while I haven't worked with some of the advanced stuff like caching (I should be working on redis-caching soon), django-channels etc.
Currently I'm in a bit of a slump on what I should be learning next or how I should proceed in the near future (1-2 months). I have quite a bit of free time now (most of which I waste -_-) and would like to ask what should I be trying to learn, or if there are any books which I should read to broaden my experiences.
Books I've read on django/development in general:
1. Tangoing with django
2. Two scoops of django
3. Lightweight django
4. Test driven development with python - O'reilly

Any thoughts will be appreciated :)
How do I find out the salary range for an international remote job?
Tags: discuss, salary, international, remote
Published: 2018-05-21 04:32:27

---
title: How do I find out the salary range for an international remote job?
published: true
description: 
tags: discuss, salary, international, remote
cover_image: https://thepracticaldev.s3.amazonaws.com/i/p19es3tkidh6aii57pr8.jpg
---

I'm considering applying for a remote job at a company based in Toronto (I live in West Virginia, USA).  However, it looks like Toronto salaries are a lot lower than anywhere in the US.  Should I ask up front about the salary range, so I don't end up going through their whole interview process only to get a lowball offer?  

Would a Canadian company hiring US workers usually offer health insurance?

Should I expect to negotiate in Canadian dollars?  Would my salary in USD fluctuate as currencies shift in relative price?
General Data Protection Regulation
Tags: gdpr, legal, engineering
Published: 2019-07-05 03:32:32

---
title: General Data Protection Regulation
published: true
tags: gdpr, legal, engineering
canonical_url: https://tryexceptpass.org/article/gdpr/
cover_image: https://tryexceptpass.org/images/gdpr.jpg
---

Ying Li’s PyCon2018 keynote discussed the importance of writing secure software, and the responsibility that we, as developers, have in keeping users safe. While watching, it occurred to me that I haven’t written about the new European Union laws that stem from the General Data Protection Regulation (GDPR) that goes into effect this month.I was involved in several conversations on this topic lately, so here’s some information on the rules, their implications and responses from businesses, and the reactions as the rest of the world tries to implement similar systems.

[Read on ...](https://tryexceptpass.org/article/gdpr/)
How to improve web performance By using(Preload, Preconnect, Prefetch)
Tags: webdev, webperf, javascript, google
Published: 2018-05-21 03:57:17

---
title: How to improve web performance By using(Preload, Preconnect, Prefetch)
published: true
description: How to improve web performance 
tags: webdev,webperf,javascript,google
cover_image: https://cdn.pixabay.com/photo/2018/03/20/22/04/camera-3244872_960_720.jpg
---


Today I'm showing the simple techniques to make your site loads fast.

First, we need to know what is Preload, Preconnect, and Prefetch.


**Preload:** When we use preload in link tag it makes early fetch request to get the resource. Mostly used to fetch high priority resource that is used in the current route.

**Preconnect:** It resolves the DNS and TCP handshaking.

**DNS-Preconnect**: It only resolves the DNS.

**Prefetch:**It helps to fetch the resources and place it in the cache.
 whenever the resources might need it will take it from the cache instead of making another request.

I think you can get a doubt what is a difference between preload and prefetch. preload is used for the high priority resources and prefetch is used for the low priority resources.


Now let's see a live example of [Vuejs](vuejs.org) website.

By default vuejs website not using any of these above.

Let's check the web performance of vue site using chrome audits.

![vuejs](https://thepracticaldev.s3.amazonaws.com/i/fsvx74sjpuv6sjmwmgck.png)
 
Have you seen 43% is the performance on my machine?


## After I'm using the Preconnect and Preload.

Now the Performance is 78%.
 
![vuejs](https://thepracticaldev.s3.amazonaws.com/i/y51dck7n70dob2bt1bot.png)

Here is the [example](https://deploy-preview-1618--vuejs.netlify.com/)you can check it on your own machine.






### Now let's see which top sites are using these above Resource hints.

## Amazon

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


## Github
![github](https://thepracticaldev.s3.amazonaws.com/i/8alvmkooag9ruwzbckmj.png)

## Netflix
![netflix](https://thepracticaldev.s3.amazonaws.com/i/t028wgb2dbqm6dk5gd5d.png)





If you have any doubts feel free to ask.


Checkout --> [Best Programming Laptops](https://reactgo.com/best-programming-laptops/)
How do you get good at technical skill that you do not get to use in office ?  
Tags: discuss
Published: 2018-05-21 00:54:19

---
title: How do you get good at technical skill that you do not get to use in office ?  
published: true
description: How do you get good at technical skill that you do not get to use in office.
tags: discuss 
---

Say you are front end developer and do not get to work on server side technologies for what ever reason. But you find yourself inclined towards server side technologies like nginx, sharding, docker etc. How do you get good hands-on/experience/knowledge for future ?

What are platforms on internet that people use practically for this purpose ?

Thanks
Why is the name of the language, 'Clojure'?
Tags: clojure, jvm, lisp, java
Published: 2018-10-06 22:15:18

---
title: Why is the name of the language, 'Clojure'?
published: true
tags: clojure, jvm, lisp, java 
canonical_url: https://avelino.run/why-is-the-name-of-the-language-clojure/
cover_image: https://avelino.run/sit-history.jpg
---


Many who did not seek the **"history"** thinks:

**`Did you pick the name based on starting with the word "closure" and replacing the "s" with "j" for Java? It seems pretty likely, but it would be nice to have that confirmed.`**

[Rich Hickey](https://twitter.com/richhickey)'s response (creator of the **Clojure**):

**`The name was chosen to be unique. I wanted to involve c (c#), l (lisp) and j (java). Once I came up with Clojure, given the pun on closure, the available domains and vast emptiness of the googlespace, it was an easy decision.`**

We have strong influence of **Lisp**, **C#** and **Java** languages, well-consolidated languages what trans security for you to use in your projects!

[(Understand more about!)](https://groups.google.com/forum/#!msg/clojure/4uDxeOS8pwY/UHiYp7p1a3YJ)


## Learn Clojure links

- [Clojure by example](https://kimh.github.io/clojure-by-example/)
- [Clojure from the ground up](https://aphyr.com/tags/Clojure-from-the-ground-up)
- [Brave Clojure](https://www.braveclojure.com/) - become a better programmer
- [Programming Clojure](https://pragprog.com/titles/shcloj/programming-clojure)
- [Clojure Cheatsheet](https://clojure.org/api/cheatsheet)
- [Clojure Guides](https://clojure.org/guides/getting_started) - getting started
- [About more LISP History (pt-BR sorry)](http://avelino.run/historia-do-lisp-abra-os-olhos-para-programacao-funcional/)
DEV3L README.md
Tags: dev3l, intro
Published: 2018-03-28 16:23:01

---
title: DEV3L README.md
published: true
description: A brief professional introduction.
tags: dev3l, intro
---

> Software engineer of ten plus years, craftsman, XP advocate, budding agile technical coach, product management/owner curious, believer in growth mindset, multiplier, servant leader, and fierce learner.

---

I grew up in the world that existed before the modern internet.
I am a millennial snowflake. I think different.
I have a tattoo on my left shoulder that spells my last name in binary.

In 2003, I started my engineering career at the University of Akron in Ohio. Prior to college, I had created some static HTML sites using AngelFire... blinking text, marquee scrollers, cliche under construction signs, and frames were in! 

In parallel, I enlisted into the Ohio Army National Guard, a weekend warrior, right out of high school. I served six years as a 68W (Combat Medic). In that time I helped with several state side relief efforts, and was fortunate to not been deployed over seas. The Army paid for college, gifted me discipline, and let me play with cool toys *(automatic grenade launcher, M19, and explosives anyone?)*.

I had great mentors who instilled in me excellent habits. In my first professional role, I was told "You will always be sinking faster than you can swim". At the time, I did not understand. Fast forward to today, my first bit of advice to *anyone* I mentor is, "Software engineering is like, learning to drink out of full blast fire hydrant pointed at your face". We get paid to learn. We get paid to be frustrated.

In my career, I worked with local government entities, insurance companies, and manufacturing companies. As a result, I refuse to be in ANY position that is considered a cost center for the business. My last three ventures have been at SaaS startups. The personal growth one must sustain in order to survive in this kind of environment is intoxicating. It has positioned me to begin a new venture with two of the most talented individuals I have ever met, #Skiplist!

I have a passion for craftsmanship. Mastery is my purpose. The [ModernAgile](http://modernagile.org/) principles guide me. Most of my nerd heroes are Agile Manifesto signatories. I sharpen every day, you should too! I enjoy mentoring and help as many [starfish](https://starfishproject.com/the-parable/) as possible. 

The only thing to supercede my career in importance is my family. I have three beautiful healthy children. My wife gets me. Without her, none of this is possible.
Tech “explained” Like you’re Five!
Tags: awesome, eli5, technology, education
Published: 2018-05-20 23:06:27

---
title: Tech “explained” Like you’re Five!
published: true
description: 👶 Tech "explained" Like you're Five! [https://git.io/eli5](https://git.io/eli5)
tags: awesome,eli5,technology,education
---
Going through my Product Hunt feed, I came across a comic that explained [how HTTPS works](https://www.producthunt.com/posts/how-https-works-2)!
Inspired by [Brad Hodson](https://www.producthunt.com/@bradleyhodson)'s comment:
> Great for non-tech people, appeals to kids if they need to learn about HTTPS. Something like this should exist for a lot of topics!

I went ahead and created [https://git.io/eli5](https://git.io/eli5) to curate similar resources. Contributions are very welcome!! :D
Explain what a monoid is Like I'm Five
Tags: explainlikeimfive, functional
Published: 2018-05-20 18:32:16

---
title: Explain what a monoid is Like I'm Five
published: true
tags: explainlikeimfive,fp
---

I purchased and I've started reading [Functional Light Javascript](https://github.com/getify/Functional-Light-JS). So far, a good read. I was just wondering if some of you awesome folks on dev.to could take a stab as well at explaining what a monoid is in simple terms.