eagleboost Blog

梦想做大侠

中英文效率比较的一个侧面

——从数字转换的效率和内存开销的角度

  中文和英文作为主流的两种语言,其实有不小的区别。可以比较的点很多,其中一种比较从信息论的角度用香农熵比较科学地给出了数学对比,即中文汉字比英文字母拥有更高的的香农熵,或者说信息容量,信息密度,因此表达同样的信息需要用到的中文字符更少。这比较符合人们的主观感受,比如同一本书的中文版往往比英文版更薄。   一个偶然的机会,我意识到可以从编写计算机程序的角度来做一个定量的比较,具体就是比较中...

ChatGPT-4

ChatGPT-4   之前对ChatGPT进行过两次测试,第一次是刚推出时进行的面试测试,纯粹从语言交流的角度来说其表现可以用惊艳来形容。第二次是用中英文数字转换为主题进行的编程测试,结论是ChatGPT并不真的会写代码。   前几天看了GPT-4 Developer Livestream,对ChatGPT又有了进一步的了解。   在视频的TaxGPT示例中,开发人员把计税的一大段规...

# 0.01粗糙版数字永生

——一ChatGPT功用乱想

0.01粗糙版数字永生   最近ChatGPT开放了API,最新的定价也出来了,据说比以前的版本便宜了挺多。于是写了几段代码试着调用一下。跟网页版类似,提出一个问题(写一段话)就会得到一个回答。然而如果只是这样的话可以说毫无意义,用网页版就得了还写代码干啥?   ChatGPT作为大语言模型,最擅长的是自然语言处理。很多人使用ChatGPT已有的知识来帮助写文章,然后自己修改,或者自己写...

浅谈Mediator/MediatR

Avoid abusing the Mediator pattern

I’ve been interviewing candidates in the past several months. The candidates are from different sources, both internal and external. In general candidates from Investment Banking industr...

避免使用枚举类型 (2) TypeSafeEnum

TypeSafeEnum

1. Benchmark Let’s create some benchmark test codes to compare traditional Enum, EnumBox/EnumParser helper class and TypeSafeEnum from 3 aspect: parsing from string, converting to strin...

避免使用枚举类型 (1) No more Enums

No more Enums

1. The problem As one of the basic data types in a lot of programming language, Enum provides Alias capability for a set of integers with limited number of values, it’s very easy to use...

M-V-VM视图交互简述

Interactions between the View and ViewModel

1. The problem Displaying dialogs/windows is a common scenario in desktop applications. Modal dialogs are used most often, like MessageBox, or more complex ones like Login Dialog that r...

Implicit boxing in System.Array.IndexOf

1. The Problem I was fixing some performance issues for our project last week, and interestingly the profiler shows boxing operation (allocation of char) happened inside a method that c...

Wordpress博客备份

——一个新旧交替的时期

想起来在Wordpress.com还开过一个博客,时间很短,只持续了3个月不到,三篇而已。 回顾了一下时间线,适逢酝酿从旧公司离开,几个月后换了个城市开始新工作的时期。新工作开始后迎来一段全新并极为忙碌的旅程,说好的博客也没有再继续下去。 彼时各方面有些停滞,心境的变化流于表面的大约体现在这几句话了。 以前在CSDN有个Blog,前后两年多写了不少技术文章,至今也有四年多没有更新...

Unity Container (3) Property Container

Advanced Unity Container usages

1. The Problem In the previous post we talked about Reflection.Emit being the best option to implicitly implement the INotifyPropertyChanged interface, with several points that can be i...