Skip to content

Instantly share code, notes, and snippets.

View IvanDyachenko's full-sized avatar
🕯️
cursed days

Ivan Dyachenko IvanDyachenko

🕯️
cursed days
View GitHub Profile

Greasing the Skids: Building Remote Teams

In the wake of the virus that-must-not-be-named (which most people misname anyway), it seems like everyone and their cat has posted some sort of opinion or how-to on making remote work, work. This is a good thing! Working remotely, particularly full-time, is hard! I've done it for my entire career (aside from an odd 14 month office period in the middle that we shall not speak of), but more relevantly, for the past two years I've been responsible for building, managing, and enabling an entirely remote team, distributed across nine timezones. Remote teams don't just happen by installing Slack and telling everyone to work on their couch: they require a lot of effort to do correctly and efficiently. But, done right, it can be a massive multiplier on your team efficiency and flexibility.

Here's how we do it. I'm going to attempt to structure this post more towards management than engineering, and so I apologize in advance if I assume terminology or knowledge which

@mtsokol
mtsokol / KafkaInZioQueuesFibers.scala
Last active August 29, 2021 14:23
Build your own Kafka in ZIO - Queues & Fibers
import zio._
import zio.random._
import zio.console._
import zio.duration._
object Main extends App {
override def run(args: List[String]) = program.exitCode
sealed trait Diagnostic
@jdegoes
jdegoes / zio-test.scala
Last active January 6, 2023 14:08
Simple example of testing with ZIO environment
object test {
import scalaz.zio._
type UserID = String
case class UserProfile(name: String)
// The database module:
trait Database {
val database: Database.Service
@ubourdon
ubourdon / zio.scala
Last active July 24, 2021 19:20
utils function for navigate between scala Future, scalaz Task and scalaz ZIO
package service.utils
import scalaz.{-\/, \/, \/-}
import scalaz.zio.{DefaultRuntime, IO, ZIO}
import play.api.libs.concurrent.Execution.Implicits
import scalaz.concurrent.{Task => ZTask}
import scala.concurrent.{ExecutionContext, Future}
package object zio {
@igor-ramazanov
igor-ramazanov / free-monads-kv-store.scala
Last active September 19, 2018 11:11
An example how to compile a higher-level language into a lower-level one with parameterised argument types in Free monads way
package io.github.themirrortruth
object KVStore {
def main(args: Array[String]): Unit = {
import cats.free.Free
import cats.{Id, ~>}
//Strict language for working with abstract key-value stores defined as Algebraic Data Type (ADT)
sealed trait KVStoreApi[Key, Value, Result]
extends Product

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

self: super:
{
# Install overlay:
# $ mkdir -p ~/.config/nixpkgs/overlays
# $ curl https://gist.githubusercontent.com/LnL7/570349866bb69467d0caf5cb175faa74/raw/3f3d53fe8e8713ee321ee894ecf76edbcb0b3711/lnl-overlay.nix -o ~/.config/nixpkgs/overlays/lnl.nix
userPackages = super.userPackages or {} // {
# Example:
hello = self.hello;

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@jkpl
jkpl / article.org
Last active November 9, 2022 18:46
Enforcing invariants in Scala datatypes

Enforcing invariants in Scala datatypes

Scala provides many tools to help us build programs with less runtime errors. Instead of relying on nulls, the recommended practice is to use the Option type. Instead of throwing exceptions, Try and Either types are used for representing potential error scenarios. What’s common with these features is that they’re used for capturing runtime features in the type system, thus lifting the runtime scenario handling to the compilation phase: your program doesn’t compile until you’ve explicitly handled nulls, exceptions, and other runtime features in your code.

In his “Strategic Scala Style” blog post series,