Posts by Year

2024

Back to Top ↑

2023

Let’s try having ChatGPT ask us questions

2 minute read

Recently I listened to a lecture by Xu Hao(徐昊) about how to train ChatGPT to become a domain expert so we can use it to solve various problems in that domain...

Back to Top ↑

2022

Trampoline: Eliminate StackOverlfowError

15 minute read

Are you familiar with this error? do you remember the nightmare when writing recursive methods? In this post, we will talk about a technique to eliminate Sta...

Write Junior Code in Scala

7 minute read

What makes us excited when coding? Refactoring the code, involving new technology, or using a fantastic solution to resolve a hard problem?

Where should we check if the list is empty?

2 minute read

In 2022, I’m back to the Java tech stack(I should be crazy!). There is a poetry in China: “Of Mountain Lu we cannot make out the true face, For we are lost ...

Back to Top ↑

2021

How to build a simple Google proxy?

1 minute read

In China, we can’t use google, lots of people will set up their VPN. But if we only use Google to search, running a VPN instance is too expensive.

Scala3 Implicit

2 minute read

Scala3 did lots of improvement in Implicit, which is the most painful feature in Scala2.

Tagless Final

4 minute read

Tagless Final is a coding pattern in Scala.

Back to Top ↑

2020

Python 工程管理

1 minute read

接触Python也有五六年了,一直都是小打小闹,撑死了也就一个几十行的小脚本。 大型工程也就知道需要一个requirement.txt去管理依赖,从来没有实践过。 前段时间用Python开发了一个图床工具simple-image-tool, 在这里分享一下用到的工程管理工具Poetry(主页很酷炫)

Reader Pattern

5 minute read

We already introduced Reader Monad, It can inject dependency to function by returning a Reader effect.

Reader Monad

10 minute read

Reader Monad is very popular in FP, you can find lots of high quality blogs by Google.

Cake Pattern

8 minute read

Cake Pattern is the inborn Dependency Injection in Scala.

Self-types

5 minute read

In this blog, we will talk about Self-types which is not used very often, but it’s an important concept to understand Cake Pattern, so it’s worth to do a sim...

Awesome Highlighter 0.0.2 发布

less than 1 minute read

Awesome Hightlighter 0.0.2 发布啦,增加了一些新功能,修复了一些bug. 欢迎同学们升级使用!

Doobie Introduction

7 minute read

Database is always a thing for developer to consider, there are lots of tools in other languages. In this blog, Let’s introduce a tool for Scala developer: ...

idea-note 0.0.2

1 minute read

idea-note 0.0.2版本发布,主要完成了Git加密同步和一些代码优化。

Free Monad

14 minute read

When we talk about Free Monad, almost everyone just tell us Free Monad can split the definition and implementation of program which is more flexible and easy...

如何在Vim上把Scala玩的飞起?

less than 1 minute read

这篇博客只适合那些已经入坑Neovim的读者. 对于想入坑的读者,也欢迎尝试入坑,挺过刚开始的各种报错,尝试过各种眼花缭乱的插件,最终化繁为简甚至自写插件,你将看到一片新大陆。

Monad

7 minute read

In this blog we will talk about Monad which is the core concept of FP. We won’t touch any category theory which belong to mathematics. We will try to find ou...

Circe Introduction

5 minute read

In the micro service, we always use RESTFul API as communication protocol which pass data using JSON format. So the mapping between JSON and Data Model is an...

Underscore

2 minute read

In this small blog, we will try to summarize the usage of underscore in Scala.

Algebraic Data Type

5 minute read

In this blog, we will talk about Algebraic Data Type in Scala and try to find out why we need it.

Back to Top ↑

2019

Type Classes

7 minute read

In this blog, we will talk about Type Class in Scala and try to find out why we need this pattern.

What is Effect?

7 minute read

In the world of Functional Programming, we are familiar with the Side-Effect1, but we rarely mentioned Effect. In this blog, we will try to explain it from c...

Review map and flatMap from code

8 minute read

In this blog, we will talk about map and flatMap again. they are the most common monadic operations in functional programming. I don’t want to tell you what’...

OAuth 2.0 Introduction

12 minute read

Recently I read a book Mastering OAuth 2.01, it give me a very clear picture for this protocol. In this blog I want to share the knowledge I learned in this ...

Back to Top ↑

2018

Cognito

less than 1 minute read

## Pain Point

The Vim Commands I Used

6 minute read

Vim is an awesome editor and you can find the Vim simlulator in lots of popular editors(such as Intellij Idea, Atom, Sublime Text). it will make your life mo...

Try Is Not A Monad

1 minute read

In this blog we will talk about scala.util.Try and try to figure out if it is a Monad.

Implicits and Variances

1 minute read

We have talked about Implicits1 and Variances2 detailedly, In this blog we will talk about an edge case when use them together. Implicits ...

Implicits

6 minute read

In this blog, we will talk about the basic knowledge of Implicits in Scala and some common programming situations where you can use Implicits.

The Problem of List Concatenation

4 minute read

In this blog we will talk about the problem of list concatenation and give a rough introduction to Trampoline.1 Steven E. Ganz and Daniel P. ...

How To Set Up A Personal Blog

5 minute read

Blog is a good place to share your knowledge, enhance your skills. It’s pretty cool to have your own blog website.

Pattern Matching

8 minute read

Pattern matching is a powerful tool in Scala. it has a common syntax like

DynamoDB Basic Knowledge

4 minute read

DynamoDB is a no-sql database supplied by AWS, we will talk about some basic knowledge and best practice about it.

kops Introduction

5 minute read

A hello world of kops, you can learn how to use kops and some kubernetes demo

Back to Top ↑

2017

Back to Top ↑

2016

Back to Top ↑