JS Blog Software development, entertainment, lifestyle.

CategoryCoding

New React Context API

N

I like new react API for creating and using context. It feels right. One thing I immediately tried to do was creating a helper which simplifies consuming multiple contexts. Because they create context hell. When you component uses more than one context and because of a children as a function pattern (which is basically the same as render props pattern where component’s children function is...

Goroutines don’t panic if channel they write to is gone

G

Couple of months ago I wrote an article about error handling in concurrent Go programs. One concern I had about it was if other goroutines would panic if some goroutine produces an error value which causes return from function when the channel is iterated with range construct. So I made another program that mimics scenario. It spawns couple of goroutines, each taking a second more to complete...

My experiences using Anko library (Android Kotlin)

M

I’ve been using Anko library from the start of my Kotlin journey and my experiences with it are mostly positive. According to its Github readme page, Anko is ...a Kotlin library which makes Android application development faster and easier. It makes your code clean and easy to read, and lets you forget about rough edges of the Android SDK for Java. Anko consists of several parts: - Anko...

Error handling in concurrent programs in Golang

E

Error handling in concurrent programs in Go consists of little more work than if err != nil { return err } because the return value doesn’t reach intended receiver (for example in parent function where function was fired as a goroutine using go keyword). Just as we use channel for sending resulting data, we must also use channel for sending error. And we can do this using single channel of...

Libraries over frameworks

L

Lately (in term of years) I noticed I prefer using libraries over frameworks. Or in other words I like to use packages that each do their one thing well rather than one package with all batteries included. I recognize both libraries and frameworks have their pros and cons. You can see my preference for libraries if you are reading my blog where I write a lot about web development, specifically...

JS Blog Software development, entertainment, lifestyle.

About me

Jernej Sila portrait
Hi, I'm Jernej, a software engineer from Slovenia. Welcome to my personal blog. For more about me, my work and hobbies, please visit my profile page.

Categories

Archives