teleren/devto huggingface dataset:
Friday Blast #79
Tags: fridayblast, links, post
Published: 2019-10-26 18:34:14

---
title: Friday Blast #79
published: true
date: 2019-10-04 07:00:00 UTC
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-79.html
series: "Friday Blast"
---

[Why printk() is so complicated (2019)](https://lwn.net/SubscriberLink/800946/a9ad9aba46f14e78/) - a deeper dive into the `printk` function from the Linux Kernel. Not really familiar with the kernel, except that it exists. But I had no idea something so “basic” as logging can turn into something to big. OTOH, in webapp land, it’s not exactly trivial either to have good high-performance logging.

[Fixed points (2019)](https://www.johndcook.com/blog/2019/10/04/fixed-points/) - a bit about function fixed points. I remember encountering one of the theorems in the article a long time ago in a calculus book.

[HTTP/3 - the past, the present, and the future (2019)](https://blog.cloudflare.com/http3-the-past-present-and-future/) - turns out there’s a 3rd version of the HTTP standard out. It’s actually a simplification of HTTP/2, because it build on stream support in QUIC, so the same mechanism doesn’t have to be reimplemented like with HTTP/2. It’s mostly meant to address “head of line” blocking in case of transport errors by the looks of it. As extra commentary, does it seem to anyone that we’re seeing a lot faster releases of fundamental tech in the last years. From programming languages (JS, Python, C#, Java, etc.), to protocols (HTTP with /2 and /3, TCP with QUIC, various secure DNS variants), to databases (Postgres 12 is out recently)?

[WeWork and counterfit capitalism (2019)](https://mattstoller.substack.com/p/wework-and-counterfeit-capitalism) - I’ve been following the WeWork story these couple of months, since it began to seem _not-so-ordinary_. Turns out it’s a trainwreck of a situation. Their CEO is out because of `$shady` stuff, and the IPO is being withdrawn with a massive hit to the possible valuation. Loads of lessons to learn I’d imagine, but it really does point to how _free_ money is in these situations.

[Software architecture is overrated, clear and simple design is underrated (2019)](https://blog.pragmaticengineer.com/software-architecture-is-overrated/) - a rant against “architects” in the sense of folks making technical decisions without actual real-life involvement with the technology (like in coding, maintenance, operationalization, etc.). The places I’ve worked at and in the circumstances I could influence all had a holistic view of development, in the sense that a developer was responsible for the whole lifecycle of a feature. From design, speaking with stakeholders, coding, writing tests, and ending with releasing in “live” and handling operational behaviour. The difference between more senior and more junior engineers being in the scope of the work involved, rather than in it’s _completeness_. I think this is a good and empowering approach for many/most situations.
Building my smart home
Tags: android, ios, javascript, reactnative
Published: 2019-10-04 06:55:28

I explain experiences, anecdotes about a personal project of how I turned my home into smart and how can I also control the different electronic devices, enter in home by phone with a simple gesture or open the building door using a Siri voice command.

https://medium.com/hackernoon/my-smart-home-2bfc9da635c1
Вставайте, Graph, вас ждут великие дела
Tags: javascript, программирование, кодинг
Published: 2019-10-04 15:22:43

---
title: Вставайте, Graph, вас ждут великие дела
published: true
date: 2019-10-04 06:07:00 UTC
tags: JavaScript,Программирование,Кодинг
canonical_url: https://blog.bitsrc.io/so-what-the-heck-is-graphql-49c27cb83754
---

Базы данных формата GraphQ грозятся потеснить не только своих реляционных предшественников, но и NoSQL-семейство. Объекты современного сложного мира всё труднее вписать в традиционные таблицы или структуры типа "ключ/значение". GraphQL обладает мощным механизмом запросов, что делает такие БД незаменимыми при хранении и обработке гигантских массивов данных, генерируемых, например, соцсетями.
Are you interested in dev friendly workplaces reviews?
Tags: discuss, remote, watercooler, writing
Published: 2019-10-04 06:02:41

As a remote developer I always look for developer friendly places where I can work. 

I tried a lot of coffee shops, tea salon and bakery shops. Sadly they’re not always as good as they look :smiley:

I was wondering if the DEV community would be interested in reading reviews of this kind of places? 

**EDIT: I wrote [a first post](https://dev.to/mindsers/coding-in-peace-with-a-full-belly-at-le-kitchen-cafe-3733) about a cool working space I found in Lyon, France. I hope you'll enjoy it! Tell me what you think about it.**
React hooks... Oops! Part 1 - Introduction
Tags: react, javascript
Published: 2019-10-04 06:02:16


Familiarity makes us feel safe and confident. Yet, what's just familiar isn't exactly equal.

I believe that's the very reason why it's both so tempting and dangerous to start relying on a new tool, regardless how familiar does it seem to be, without first understanding what makes it different from what we already know.

[React hooks](https://en.reactjs.org/docs/hooks-intro.html) are one of these new, shiny tools. Not only they are hip, but also some of them look pretty familiar and easy to use, like [the useState hook](https://en.reactjs.org/docs/hooks-state.html).

But there's a catch to it - they are more of low-level building blocks that enable us to construct our own abstractions than something designed to directly solve everyday problems.

They are intended to be [a way for the community to build and share cohesive fragments of logic](https://twitter.com/dan_abramov/status/1109602809798901760), not a drop-in replacement for effectful methods in classes.

Of course that doesn't mean that the built-in hooks cannot be useful on their own. If using a handful of them actually solves the problem, that's great! But if I learned anything important about hooks, it's that as soon as I get plenty of them in a single component, I should stop and think whether that's the way to go.

More often than not, multiple interconnected hooks are a sign that there's an abstraction waiting to be extracted. Sometimes it may be possible to use an [off-the-shelf hook](https://github.com/rehooks/awesome-react-hooks), and other times, we may need to extract one ourselves.

You known what they say about mistakes. We can learn from them. And I must admit that I learned plenty of lessons that way. In this series, I'm going to tell you about mistakes made when building custom hooks, so that you can avoid them.

Stay tuned for the next post!
Lesser-known android lib which is very helpful.
Tags: android, multiscreen, design
Published: 2019-10-04 05:16:10


In this post, I am going to introduce a very useful lib which is not much popular but at the same time, it’s most important for support multi-screen resolution app development in android.

I come across with that lib when I was looking for a smart and easy solution to provide multi-screen support in android application development.

It is none another than SDP — a scalable size unit.
I found it is very essential to manage different screen resolutions. The cool feature about this lib is easy to use, just add dependency into your project and replace the used of dp to _sdp, as simple as that. Isn’t cool?

How hard it to used in my Application?
Its very easy to used in application, I have ever used that much easy third party libs to application development.

Show me the proof of simplicity.
Why not, we android developer know the use of DP right? SDP use is as simple as used dp, you just need to add prefix _{xx}sdp, i.e _10sdp, isn’t easy? Let me add whole layout code to better understanding.



All right, but where is the gradle details?
Here is the sdp grandle.

dependencies {
  implementation 'com.intuit.sdp:sdp-android:1.0.6'
}


For more detail please check repo. here is the URL
https://github.com/hitesh-dhamshaniya/sdp
Angular 7 with Iframe in IE issue
Tags: angular
Published: 2019-10-04 04:46:03

hi All,

I have developed the Angular app with Angular 7 and i need to open the application in iframe. While calling the application url from iframe it was not working and getting '/' expected error in vendor.js in IE. The same app was works fine in chrome with in iframe. Also the application url works fine in IE. only issue when i open this url through iframe in IE. Please help me to fix it.
Vs code cheat sheet
Tags: beginnerstoprojourney
Published: 2019-10-04 03:13:12

If you are a beginner at coding and want to become a pro then you should know vs code cheat code to enhance your coding skills.As cheat code help you to do coding fastly and it enhances your coding skills.I want you to have these cheat codes at your work space & get used to these cheat codes.Cheat sheets for
[**Windows**](https://www.google.com/url?sa=t&source=web&rct=j&url=https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf&ved=2ahUKEwikp_b2ioDlAhXZfCsKHT8iCYgQFjAAegQIAxAB&usg=AOvVaw3IhUv6JwiLHEL2SrhdVrIp)
[**MacOs**](https://www.google.com/url?sa=t&source=web&rct=j&url=https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf&ved=2ahUKEwjpkZyQjoDlAhVSXn0KHTksBEUQFjAAegQIBBAB&usg=AOvVaw2iWp15mgLBfM5XD5_ldg4W)
A microservice making electorate info more accessible
Tags: microservices, python, flask, etl
Published: 2019-10-04 02:32:17

---
title: A microservice making electorate info more accessible
published: true
description: A microservice tying together KML and GeoJSON with Australian electorate data
tags: microservices, Python, flask, ETL
---

![the results page](https://thepracticaldev.s3.amazonaws.com/i/8yms4l8ktj52iyw40ixe.png)


Over at my [home blog](https://www.jmcpdotcom.com/blog) I've written about a #Python #microservice I created to make the task of finding your Australian electorate more accessible. It covers both Federal divisions and state+territory lower house electorates. I also go into detail about the #ETL process I went through to get the data I needed.

See more (a lot more!) at [A microservice for electorate maps](https://www.jmcpdotcom.com/blog/posts/2019-09-27-microservices-part-1/)

#Flask @googlemaps #webscraping #BeautifulSoup #GeoJSON #KML
Creating a massively big company requires people skill. Top 3 people skills I learned from Steve Jobs
Tags: hiring, interviewing, career
Published: 2019-10-04 02:22:43

---
title: Creating a massively big company requires people skill. Top 3 people skills I learned from Steve Jobs
published: true
description: 
tags: #hiring #interviewing #career
---

Creating or impacting a massively big company requires people skill. Top 3 people skills I learned from Steve Jobs:

1. **On recruiting**: Good people know good people. Get referrals from top talents you know.

2. **On interviewing**: It's less important how much technical skill a candidate has, rather observe his body language and expressions if those reflect his excitement and passion on the topic.

3. **On engaging employees at work**: it's not smart to hire a smart person and dictating what he should be doing. Instead share your vision and mission and let him do his work. He is the best at what he is doing.
Day 1: Javadoc
Tags: java
Published: 2019-10-04 01:53:28

## Intro

I have heard about Javadoc since the first time I touched Java like 5 years ago. But I realized that I still didn't understand what Javadoc is until I wrote this note. At first I thought that Javadoc is a Java documentation that can be printed or exported as PDF. Yeah, a documentation about the program. Automatically generated. Well, I was not 100% wrong. But something that I missed was, how to create or leave a good Javadoc. 

Usually a developer will leave comment and explain briefly about a line of code. Like in Java, we use "//" or "/** */" character to leave a comment. Well, that is not a Javadoc I found recently. It is beyond that. haha sorry for my inexperience :)

## Javadoc

When we call method from other class, there will be a small pop up windows appears explaining what the method is about. That small pop up windows what they call JAVADOC~

![javadoc](https://thepracticaldev.s3.amazonaws.com/i/evu1n1tj8fxlkznhlbet.png)

I really didn't understand until I found my own brief explanation about the method came out. And realized that is the right way to generate/ write comment to become a Javadoc.

## How to write a good Javadoc

Writing documentation is important. Explain about the method/class or anything very briefly. So that, the next programmer who will read your code will understand what you are trying to write.

Above the method, start with /** to open a block comment section. This comment section can apply html and markdown tag. So make it pretty ;)

Always include @param, @return, @throws in the Javadocs. It's important when calling this method, and have no idea how to use the method. 

I learned that a @param has to be followed by explanation about the param itself. for example :
@param  firstNumb the first number
@param  secndNumb the second number

something like that. complete it with noun. for the detail of how to write a good Javadoc, please refer to reference below~

## References

* [Oracle](https://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#styleguide)
Nuster, a cache server based on HAProxy, now supports disk persistence, purging cache files, etc
Tags: showdev, devops, linux
Published: 2019-10-04 01:35:07

---
title: Nuster, a cache server based on HAProxy, now supports disk persistence, purging cache files, etc
published: true
description: 
tags: showdev,devops,opensource,linux
---

nuster v3.1.0.19 released, now supports disk persistence, purging cache files, persistence cache stats

https://github.com/jiangwenyuan/nuster

There are four MODEs.

- off: default, disable disk persistence, data are stored in memory only
- only: save data to disk only, do not store in memory
- sync: save data to memory and disk(kernel), then return to the client
- async: save data to memory and return to the client, cached data will be saved to disk later by the master process

```
global
    master-worker
    nuster cache on data-size 10m dir /tmp/cache
    nuster nosql on data-size 10m dir /tmp/nosql
backend be
    nuster cache on
    nuster rule off   disk off   ttl 1m if { path_beg /disk-off }
    nuster rule only  disk only  ttl 1d if { path_beg /disk-only }
    nuster rule sync  disk sync  ttl 1h if { path_beg /disk-sync }
    nuster rule async disk async ttl 2h if { path_beg /disk-async }
    nuster rule others ttl 100
```
   
1. /disk-offwill be cached only in memory
2. /disk-onlywill be cached only in disk
3. /disk-syncwill be cached in memory and in disk, then return to the client
4. /disk-asyncwill be cached in memory and return to the client, cached data will be saved to disk later
5. other requests will be cached only in memory
Most confusing and hard to understand parts of JavaScript? 
Tags: discuss, webdev, javascript, react
Published: 2019-10-04 01:31:12

What are some the most stressful parts of JavaScript in your opinion especially coming from a different programming language ?

I get to hear these ones from people but some of the most popular ones have been:

- Asynchronous programming   
- Anonymous functions  
- Implicit Coercion   
- `this` keyword

Would like to hear from other you folks!
link
Tags: free
Published: 2019-10-04 01:06:48

https://profiles.wordpress.org/radenrama1991/
https://ello.co/davidvmonroe
https://issuu.com/tabledrive
https://www.thinglink.com/user/1230838376693760007
https://connect.symfony.com/profile/radenrama1991
https://www.kongregate.com/accounts/ForestDriver
https://www.turnkeylinux.org/user/899886
https://www.metal-archives.com/users/radenrama1991
https://www.plurk.com/p/nhs1wy
http://www.23hq.com/ForestDriver/photo/60145338
https://www.youmagine.com/radenrama1991/designs
https://gumroad.com/l/rickandmortyfree
http://myfolio.com/art/gba1uqtb1i
https://www.notion.so/watch-rick-and-morty-season-4-online-free-905e3f9c898d4eb2b388bf1ffabd56a3
https://yelloyello.com/places/watch-rick-and-morty-season-4
https://peatix.com/user/5041040
https://speakerdeck.com/watchrickandmortyseason4
https://cycling74.com/author/5d823b6f2e931822a029f1d5
http://www.cplusplus.com/user/ForestDrive/
http://appsplit.com/users/forestdriver
https://www.vayable.com/users/370508
https://www.viki.com/users/radenrama1991_581/about
https://www.gametracker.com/clan/watchrickandmortyseason4/
https://www.deviantart.com/radenrama1991/journal/rick-and-morty-season-3-episode-1-813788141
https://jaildrive.jimdofree.com/2019/09/15/watch-rick-and-morty-season-3/
https://www.emailmeform.com/builder/form/4m37Prpc9M5JubK
https://gumroad.com/rickandmortyfree
https://css-tricks.com/forums/users/brittanyfrench/
https://www.mojomarketplace.com/user/JuniperDrive-BxqP4R7rRG
http://tsafitri154.cocolog-nifty.com/blog/2019/09/post-a64d05.html
https://rickandmortyfree.peatix.com
https://linktr.ee/tsafitri154
https://twitter.com/WatchMorty
http://brittanyj.eklablog.com/how-to-watch-rick-and-morty-season-4-a170261362
https://www.theodysseyonline.com/user/@stephenwhite
http://uxmag.com/readers/irving-road
https://mymoleskine.moleskine.com/community/artworks/watch-rick-and-morty-season-3/
https://www.intensedebate.com/people/AshaCowell
http://www.cruzroja.es/creforumvolint_en/user/profile/54791.page
http://juniperdrive.brandyourself.com/
https://tsafitri154.micro.blog/2019/09/16/rick-and-morty.html
http://ashaacowell.mywebzz.com/
http://kursyjezykoweonline.pl/forum/in-neque-arcu-vulputate-vitae/302838-rick-and-morty-season-4-release-date
https://issuu.com/watchrickandmortyseason3
https://gust.com/companies/watch-rick-and-morty-season-4-startup
https://www.etsy.com/people/3t5u5gra
http://wolpy.com/tsafitri154/profile
https://coub.com/tsafitri154/
https://sketchfab.com/RickandMortySeason4
https://gitlab.com/tsafitri154
https://imgur.com/a/v50c6fK
https://www.spreaker.com/user/rickandmortyseason4
https://www.patreon.com/user/creators?u=24522412
https://giphy.com/gifs/free-Vd1kKDWbF34nMrhLYu
https://angel.co/juniper-drive
https://www.edocr.com/user/tsafitri154
When should you ask for help?
Tags: discuss, beginners, productivity, career
Published: 2019-10-04 00:55:42

##### One of the biggest challenges I've seen for new developers is knowing when to ask for help. There are two ends of the spectrum: asking for help without first looking for an answer and working for days or weeks on one problem without asking for help. So... when is the best time to ask for help? I'll go over a few steps I like to take before asking someone to help.

## 1. Read the documentation.
Sometimes a framework's or library's documentation is really all you need to solve a problem. 

Many open source projects will have at least some documentation in their `Readme` on their GitHub page. Other projects will have a Storybook or other example code in or linked from their repos.


*The documentation didn't have what I needed or sucks, what do I do next?*

## 2. Google the problem.
Unless you're on the absolute bleeding edge of tech and have an issue, someone has probably encountered the problem you're having before. This one can sometimes replace "Read the documentation" since googling will sometimes take you to the docs.

## 3. Try out some solutions.
You probably found something that *may* be useful in your research. Don't be afraid to try those out! Maybe you'll stumble across the solution on your own and learn something in the process. 

*So I found some stuff, but nothing is exactly what I need...*

## 4. Ask for help.
It's important to not spend too long in the process between the first three steps. How long each of those steps take is dependent on the problem. However, if you're stuck or notice yourself circling back to the same incorrect solutions, ask someone to help! They may have run into that problem before, or at least run into a similar problem, and have some insight on how to fix it.

**Don't be afraid to ask for help if you need it.**


## 5. Write down how you solved this problem. (Optional, but recommended)
When you solve the problem, write out a little blurb or a blog post about your problem and how you fixed it. This way, you'll be able to help your future self if you encounter that problem again or more easily help someone else that runs into that problem.





##### 📣 When do you decide it's the right time to ask for help? Do you have any key indicators that you're stuck? 📣

*Title illustration from [unDraw](https://undraw.co/illustrations).*
Intro to `cacher` that simple cache library
Tags: go
Published: 2019-10-04 00:18:30

---
title: Intro to `cacher` that simple cache library
published: true
description: 
tags: go
---

I created the cache library for the Go language. It's named `cacher`.
GitHub: https://github.com/y-yagi/cacher

`cacher` supports to use a file system to store cache data.

## Why this need?

I create CLI tools often and sometimes want to use cache in that. For example, when the same HTTP API is called many times and the result of API rarely changes.
Normally, using Redis or memcached(or something similar) for the cache. But in the case of CLI, it may not be using those middlewares. So I wanted a cache library that supports to file system.

## How to use

Example:

```go
package main

import (
	"fmt"
	"time"

	"github.com/y-yagi/cacher"
)

func main() {
	// Specify a directory that stores cache data.
	c := cacher.WithFileStore("/tmp/")

	// Arguments are cache key, data and expiry time. If uses `cacher.Forever`, cache never expires.
	c.Write("cache-key", []byte("value"), cacher.Forever)
	value, _ := c.Read("cache-key")
	fmt.Print(string(value))

	c.Write("cache-key2", []byte("value"), 1*time.Second)

	time.Sleep(2 * time.Second)

	// If the cache expired. `Read` returns nil.
	value, _ = c.Read("cache-key2")
	fmt.Print(string(value))
}
```

For more detail, please see the [API doc](https://godoc.org/github.com/y-yagi/cacher).

## How to store data to file?

Go supports multiple formats to store data. This time I use `gob` package. The `gob` package can handle Go data structure as is. A simple example is followed.

```go
package main

import (
	"bytes"
	"encoding/gob"
	"fmt"
	"log"
)

type entry struct {
	Value      []byte
	Expiration int64
}

func main() {
	e := &entry{Value: []byte("value"), Expiration: 0}
	encodedEntry := encode(e)

	fmt.Printf("%#v\n", encodedEntry)

	decodedEntry := decode(encodedEntry)
	fmt.Printf("%#v\n", decodedEntry)
}

func encode(e *entry) []byte {
	buf := bytes.NewBuffer(nil)
	err := gob.NewEncoder(buf).Encode(e)
	if err != nil {
		log.Fatal("encode error:", err)
	}
	return buf.Bytes()
}

func decode(data []byte) *entry {
	var e entry
	buf := bytes.NewBuffer(data)
	err := gob.NewDecoder(buf).Decode(&e)
	if err != nil {
		log.Fatal("decode error:", err)
	}
	return &e
}
```

For more detail, please see the [blog entry](https://blog.golang.org/gobs-of-data) and [API doc](https://golang.org/pkg/encoding/gob/).

## Wrapping up

I introduced my cache library that assumed to using CLI. But may more appropriate approaches/libraries exist I think. If you know something, please tell me. Thanks!
11ty curly braces and nunjucks
Tags: eleventy, 11ty, jamstack, javascript
Published: 2019-10-05 08:20:09

---
title: 11ty curly braces and nunjucks
published: true
date: 2019-10-04 00:00:00 UTC
tags: eleventy, 11ty, jamstack, javascript
canonical_url: 
---

In trying to share posts about using Nunjucks templating engine in 11ty I came unstuck when creating posts with the curly brackets that are used by Nunjucks. I'd either get and error or it would do the substitute.  
I thought using backticks might work but that didn't help. A bit of searching and I found an issue on the Nunjucks repo about the curly brackets. This seems to be the only way to do it and I also found that it was [documented](https://mozilla.github.io/nunjucks/templating.html#raw) as such.

```
{% raw %}
{{ text to escape}}
{% endraw %}
```

This is a bit meta but I had to use the above example to escape the code I was trying to show about how to escape the code I wanted to post about. Read that 3 times to try and understand what I am talking about as I still don't