咖啡拿铁



咖啡拿铁

首先国庆节要到了,先提前祝大家节日快乐,当然在放假的时候适当的学一下知识也是必要的。

1.背景

在我们的业务需求中通常有需要一些唯一的ID,来记录我们某个数据的标识:

  • 某个用户的ID

  • 某个订单的单号

  • 某个信息的ID

通常我们会调研各种各样的生成策略,根据不同的业务,采取最合适的策略,下面我会讨论一下各种策略/算法,以及他们的一些优劣点。


Read full article from 咖啡拿铁


ChangbaDev



ChangbaDev

目前,全新的异步任务服务每天高效稳定的为唱吧提供数亿次的调用。服务器团队用全新的方式重新定义了异步任务实现方式,以为云计算而生的NSQ、成熟的PHP执行者PHP-FPM、自主开发的中间件NSQProxy以及admin管理后台共同组成了异步任务的队列服务。


Read full article from ChangbaDev


都督来说



都督来说

最近网络上突然出现一篇文章质疑腾讯现在2018年的技术建设,我读过文章里面的内容对比我所知道的内幕,我是不认同的,可我是无法直接反驳,因为我也不清楚腾讯现在的技术平台,但我可以讲一下9年前腾讯的技术基础,用9年前的情况对比文章里面现在提到的情况,能作比对的解的地方,我不觉得该文章仅仅是偏颇,而是作者对腾讯了解不足够多。我做不到像作者那样站在那样的高度去评价腾讯,文中提到的、我不了解的情况我也无法发表看法,我也考究不了该文作者写这些内容的时从何处获取的信息。因此本文也不可能全面的介绍腾讯的技术架构,原因是我虽然在腾讯工作的时间比较长,但仅在腾讯的一个部门的不同技术岗位上工作过。


Read full article from 都督来说


加米谷大数据



加米谷大数据

为每个DataTable创建一个与之对应的IndexTable,通过各种途径,保证IndexTable Region与DataTable Region一一对应,并且存储在同一个RegionServer上,存储结构如图所示。最终要实现的效果是,每个IndexTable Region是对应的DataTable Region的局部索引,使用索引进行查询时,将对每个IndexTable Region进行检索,找出所有符合条件的DataTable RowKey,再根据DataTable RowKey到对应的DataTable Region中读取相应DataTable Row。


Read full article from 加米谷大数据


记一次服务器CPU占用率达到100%的解决过程 - 蕉下客 - CSDN博客



记一次服务器CPU占用率达到100%的解决过程 - 蕉下客 - CSDN博客

我们看这个,这个是我们项目组一个同学的本地机器,他3.21号部署上项目就中断连接了,网络中心的日志记录3.24号cpu飙升,那么问题来了,现在怎么还有他的磁盘???带着这个问题,我百度了一下,没找到答案,联想刚才【百度知道】的答案,我做了以下猜想:

【上次部署完程序本地机器上的磁盘没关闭,等于服务器通道和本地的通道一直连着,但是本地又关机了,所以服务器就一直尝试连接,这就导致系统taskeng.exe这个进程一直循环运行,所以CPU就上去了】


Read full article from 记一次服务器CPU占用率达到100%的解决过程 - 蕉下客 - CSDN博客


你假笨



你假笨

最初操作系统是32位的,当然现在有不少已经转到64位上了,那个时候的时间也是用32为来表示的,那么能表示的最大值是2^32-1=2147483647,而这个值算下来2147483647/(365 * 24 * 60 * 60)=68.1年,而当时unix操作系统最早由KenThompsonDennis RitchieDouglas McIlroy于1969年在AT&T的贝尔实验室开发,为了让这个32位能全部利用起来,就用来存个相对1970年1月1日的时间了(那个时候unix的计算机估计才慢慢生产),这样一来,当时间达到68.1年的时候,对应的时间是2038年1月19日3时14分7秒,到这天的凌晨3时14分8秒就会出现溢出情况了,时间会变成1901年12月13日20时45分52秒,或许大家听过以前的千年虫问题吧,如果2038年大家还在32位上玩,那估计会很糟糕了,所以大家尽快到64位上来玩吧


Read full article from 你假笨


你假笨



你假笨

因为GC或者内存dump,都必须对内存做一个遍历,因此必须先暂停这些Java线程,防止在遍历内存里的对象的时候进行内存分配,但是每个线程分配内存其实都是优先走tlab(每个线程独有的一块在eden里的小内存块)的,为了能快速遍历对象,而不存在不连续的内存,于是JVM会对tlab做一个填充,填充的正好是int数组对象(从上面代码得知),将剩下的没被分配的tlab内存给填满了,因此在系统运行过程中其实可能伴随着很多无用的对象产生,哈哈,看到这里你是不是豁然开朗?


Read full article from 你假笨


ConcurrentHashMap isn't always enough - DZone



ConcurrentHashMap isn't always enough - DZone

The atomicity of  computeIfAbsent(..) assures that only one new  Object will be created and put into theMap, and it'll be the exact same instance of  Object that will be returned to all threads calling the  getOrCreate function.
Here, not only the code is correct, it's also cleaner and much shorter.

The point of this example was to introduce a common pitfall of blindly relying on  ConcurrentHashMap as a majical synchronzed datastructure which is threadsafe and therefore should solve all our concurrency issues regarding multiple threads working on a shared Map.  ConcurrentHashMap is, indeed, threadsafe. But it only means that all read/write operations on such map are internally synchronized. And sometimes it's just not enough for our concurrent environment needs, and we have to use some special treatment which will guarantee atomic execution. A good practice will be to use one of the atomic methods implemented by ConcurrentHashMap, i.e:  computeIfAbsent(..),  putIfAbsent(..), etc.


Read full article from ConcurrentHashMap isn't always enough - DZone


☆HashMap多线程并发问题分析 - 陶邦仁的个人空间 - 开源中国



☆HashMap多线程并发问题分析 - 陶邦仁的个人空间 - 开源中国

##并发问题的症状## ###多线程put后可能导致get死循环### 从前我们的Java代码因为一些原因使用了HashMap这个东西,但是当时的程序是单线程的,一切都没有问题。后来,我们的程序性能有问题,所以需要变成多线程的,于是,变成多线程后到了线上,发现程序经常占了100%的CPU,查看堆栈,你会发现程序都Hang在了HashMap.get()这个方法上了,重启程序后问题消失。但是过段时间又会来。而且,这个问题在测试环境里可能很难重现。


Read full article from ☆HashMap多线程并发问题分析 - 陶邦仁的个人空间 - 开源中国


你假笨



你假笨

前两天给openjdk gc-dev的email list提交了一个问题,主要是针对Full GC之后,GC日志里Metaspace的大小在GC前后都一直不变的问题,我在邮件里大概也提了下如何修复该问题,以及猜测了下为什么会有这个问题,内容比较简单,就不翻译啦,直接把邮件贴出来,PerfMa在后面会提交越来越多的patch给官方吧,虽然不一定每个patch都会被官方所接受,不过也希望为社区的发展贡献一份我们的力量。


Read full article from 你假笨


如何实现海量数据下有序漏斗秒查



如何实现海量数据下有序漏斗秒查

近期易观公司举办了一个OLAP大赛,我们队伍非常幸运地获得了第一名,成为本次比赛最大黑马。此篇文章主要是从技术角度,来分享一下我们是如何解决有序漏斗秒查问题的


Read full article from 如何实现海量数据下有序漏斗秒查


Michael Feathers希望消除错误能驱动设计



Michael Feathers希望消除错误能驱动设计

Michael Feathers因其著作《高效操作遗留代码》(Working Effectively With Legacy Code)一书而广为人知。他发现错误中存在着一些值得关注之处,但他也承认大部分开发人员并未投入时间去关注这些错误。在他看来,很多错误解决机制就是采取某种程度上的放弃。在 Explore DDD 2018大会上,Feathers做了主题演讲,探讨消除错误如何驱动软件系统的设计。

针对领域驱动设计(DDD)大会的主题,Feathers在演讲一开始就给出了对"领域"(Domain)的五种定义。他在这些定义中发现了一个共性,即领域就是一种范围,一些领域是随意构造的,也有一些是人们创造的。正因为领域是随意构造的,因此人们可以重新塑造和扩展领域。虽然人们可以直接使用DDD模拟并适应不断变化的业务流程,但为了更好地应对乃至消除错误,Feathers建议应对领域做尽可能类似的更改。


Read full article from Michael Feathers希望消除错误能驱动设计


Big Data Counting: How to count a billion distinct objects using only 1.5KB of Memory - High Scalability -



Big Data Counting: How to count a billion distinct objects using only 1.5KB of Memory - High Scalability -

In the equation m is the size of the bitmap and Vn is the ratio of empty bits over the size of the map. The important thing to note is that the size of the original bitmap can be much smaller than the expected max cardinality. How much smaller depends on how much error you can tolerate in the result. Because the size of the bitmap, m, is smaller than the total number of distinct elements, there will be collisions. These collisions are required to be space-efficient but also result in the error found in the estimation. So by controlling the size of the original map we can estimate the number of collisions and therefore the amount of error we will see in the end result.


Read full article from Big Data Counting: How to count a billion distinct objects using only 1.5KB of Memory - High Scalability -


In 2015, they evaluated Apache Solr and Elasticsearch and decided to build their... | Hacker News



In 2015, they evaluated Apache Solr and Elasticsearch and decided to build their... | Hacker News

In 2015, they evaluated Apache Solr and Elasticsearch and decided to build their own (Firefly). They said, other solutions did not scale. So, instead of contributing to scaling (like Apple and Bloomberg and Cloudera did), they went the other way. Now, they seem to be doing it again (at least they are using Tika).

In a meanwhile, Solr implemented most of the features they are describing in their architecture document.


Read full article from In 2015, they evaluated Apache Solr and Elasticsearch and decided to build their... | Hacker News


加米谷大数据



加米谷大数据

为每个DataTable创建一个与之对应的IndexTable,通过各种途径,保证IndexTable Region与DataTable Region一一对应,并且存储在同一个RegionServer上,存储结构如图所示。最终要实现的效果是,每个IndexTable Region是对应的DataTable Region的局部索引,使用索引进行查询时,将对每个IndexTable Region进行检索,找出所有符合条件的DataTable RowKey,再根据DataTable RowKey到对应的DataTable Region中读取相应DataTable Row。


Read full article from 加米谷大数据


Hollis



Hollis

中秋节,为了感谢朋友们一直支持,给大家送几个福利。分别是技术书籍、极客时间阅码、星球限时折扣等。


Read full article from Hollis


Hollis



Hollis

在Oracle官网中,进入下载页面,第一个可供下载的JDK版本已经提换成了Java SE 11 (LTS),这里的LTS表示Long-Term-Support。


Read full article from Hollis


量子位



量子位

2016年年底,当在NIPS 2016做主题为《使用深度学习开发人工智能应用的基本要点》的tutorial演讲后,吴老师首次对外介绍了这本书,适合于对AI产品设计理念及策略感兴趣的读者,施工中,预计2017年暑假完工。

和吴恩达其他课类型不同,这本书并不属于教材型读物,更偏向于实战经验技巧的汇总,共分成57个小节,每节从示例入手,推荐干货技巧。

不过,可能是因为之后吴恩达从百度离职,随后集齐Deeplearning.ai、Landing.ai和AI Fund三大创业项目耽误了点时间,所以这本《Machine Learning Yearning》已经延期了一年多还没完成。

在知乎问题"如何评价吴恩达的新书Machine Learning Yearning"问题下,"写得真好"、"蛮多干货"、"内容精悍"等都是网友对这本手稿的评价。

但最高额的点赞量还是来自网友@勃失败的简短评价,他开玩笑说吴恩达老师竟然选择免费下载而不开Live,是不是亏大了~

所以,不要错过这套口碑大赞且免费的新书手稿啊喂↓↓↓


Read full article from 量子位


Introducing the Go Race Detector - The Go Blog



Introducing the Go Race Detector - The Go Blog

Race conditions are among the most insidious and elusive programming errors. They typically cause erratic and mysterious failures, often long after the code has been deployed to production. While Go's concurrency mechanisms make it easy to write clean concurrent code, they don't prevent race conditions. Care, diligence, and testing are required. And tools can help.

We're happy to announce that Go 1.1 includes a race detector, a new tool for finding race conditions in Go code. It is currently available for Linux, OS X, and Windows systems with 64-bit x86 processors.

The race detector is based on the C/C++ ThreadSanitizer runtime library, which has been used to detect many errors in Google's internal code base and in Chromium. The technology was integrated with Go in September 2012; since then it has detected 42 races in the standard library. It is now part of our continuous build process, where it continues to catch race conditions as they arise.


Read full article from Introducing the Go Race Detector - The Go Blog


编程语言的4大问题



编程语言的4大问题

协作问题

软件开发的最大的问题是缺乏对业务的直接负责。理想情况下,整体(一个bounded context)有一个团队负责,然后他们可以把责任再分解给底层团队,就像结构化编程所许诺的那样。然而在这个微服务满天飞的世界里,职责是非常碎片化地从一个团队和其他N个其他团队之间踢来踢去。这给业务负责人带来了很大的沟通负担。更为严重的是这导致了没有团队对最终结果负责。


Read full article from 编程语言的4大问题


Here are some amazing advantages of Go that you don’t hear much about



Here are some amazing advantages of Go that you don't hear much about

This article is not about the main selling points of Go that you usually see.

Instead, I would like to present to you some rather small but still significant features that you only get to know after you've decided to give Go a try.

These are amazing features that are not laid out on the surface, but they can save you weeks or months of work. They can also make software development more enjoyable.

Don't worry if Go is something new for you. This article does not require any prior experience with the language. I have included a few extra links at the bottom, in case you would like to learn a bit more.


Read full article from Here are some amazing advantages of Go that you don't hear much about


你没听说过的 Go 语言惊人优点



你没听说过的 Go 语言惊人优点

根据 Google 趋势,Go 语言非常流行。

这篇文章不会讨论一些你经常看到的 Go 语言的主要特性。

相反,我想向您介绍一些相当小众但仍然很重要的功能。只有在您决定尝试 Go 语言后,您才会知道这些功能。

这些都是表面上没有体现出来的惊人特性,但它们可以为您节省数周或数月的工作量。而且这些特性还可以使软件开发更加愉快。

阅读本文不需要任何语言经验,所以不必担心你还不了解 Go 语言。如果你想了解更多,可以看看我在底部列出的一些额外的链接。


Read full article from 你没听说过的 Go 语言惊人优点


10 Tips for using the Eclipse Memory Analyzer – EclipseSource



10 Tips for using the Eclipse Memory Analyzer – EclipseSource

Analyzing and understanding the memory use of an application is challenging. A subtle logic error can result in listeners never being disposed, ultimately leading to the dreaded OutOfMemory error. Even if your application is properly disposing of all unused objects, it may still be requiring 10 or 100 times more memory than necessary.

Lucky for us, the Eclipse Memory Analyzer (MAT) can help provide details of an application's memory use. The tool is useful for both tracking memory leaks and for periodically reviewing the state of your system. In this tutorial I'll outline 10 tips to help you use the MAT more effectively. If you're a Java developer, the Eclipse Memory Analyzer Tool  should certainly be in your debugging toolbox.


Read full article from 10 Tips for using the Eclipse Memory Analyzer – EclipseSource


(译)关于使用Eclipse Memory Analyzer的10点小技巧 - 简书



(译)关于使用Eclipse Memory Analyzer的10点小技巧 - 简书

分析和理解应用的内存使用情况是开发过程中一项不小的挑战。一个微小的逻辑错误可能会导致监听器没法被释放回收,最终导致可怕的内存溢出问题。甚至有时你已经释放了所有空对象,但是你的应用却多消耗了十倍甚至百倍的内存导致效率很低。

幸运的是,Eclipse Memory Analyzer(MAT)能给我提供应用的内存使用情况的详细信息帮助我们进行内存分析。这款工具不仅能有效的追踪内存泄漏,还能周期性的审查系统的状态。在本课程我将列出10条小技巧帮助你更高效的使用MAT。如果你是一名Java开发者,Eclipse Memory Analyzer Tool是你调试工具箱里必不可少的。


Read full article from (译)关于使用Eclipse Memory Analyzer的10点小技巧 - 简书


Rohan Dhapodkar: Extract system properties from heap dump using Visual VM OQLand JavaScript



Rohan Dhapodkar: Extract system properties from heap dump using Visual VM OQLand JavaScript

Extract system properties from heap dump using Visual VM OQLand JavaScript

VisualVM is one of the great tool but still it's not popular in Java community.

One of the interesting feature of VisualVM is traversing heap dump. VisualVM supports OQL syntax similar to eclipse MAT. But java script support along with OQL sytax make it different.

Do you want to print system properties from heap dump? System Properties are internally maintained as hash Map. It's probably difficult to traverse such hash map using normal OQL syntax. But using VisualVM OQL syntax along with java script it's possible.

Load heap dump in visualVM and copy paste below javascript syntax into VisualVM -> HeapDump -> OQL Console (tab).

Read full article from Rohan Dhapodkar: Extract system properties from heap dump using Visual VM OQLand JavaScript


java - Find contents of key value pair in a jvm heap dump? - Stack Overflow



java - Find contents of key value pair in a jvm heap dump? - Stack Overflow

I would suggest that you look at using the Eclipse Memory Analyzer. This gives you a graphical overview where you can easily drill down into the map in question. That said, if it is really 1.2GB in size… that is a lot of drilling down!

If you really want to use OQL, then the online help is a good resource. Using OQL, if the value that you select returns a string, it will be printed, for example:

select file.path.toString() from java.io.File file


Read full article from java - Find contents of key value pair in a jvm heap dump? - Stack Overflow


git - Reset local repository branch to be just like remote repository HEAD - Stack Overflow



git - Reset local repository branch to be just like remote repository HEAD - Stack Overflow

Setting your branch to exactly match the remote branch can be done in two steps:

git fetch origin  git reset --hard origin/master  

If you want to save your current branch's state before doing this (just in case), you can do:

git commit -a -m "Saving my work, just in case"  git branch my-saved-work  

Now your work is saved on the branch "my-saved-work" in case you decide you want it back (or want to look at it later or diff it against your updated branch).

Note that the first example assumes that the remote repo's name is "origin" and that the branch named "master" in the remote repo matches the currently checked-out branch in your local repo.

BTW, this situation that you're in looks an awful lot like a common case where a push has been done into the currently checked out branch of a non-bare repository. Did you recently push into your local repo? If not, then no worries -- something else must have caused these files to unexpectedly end up modified. Otherwise, you should be aware that it's not recommended to push into a non-bare repository (and not into the currently checked-out branch, in particular).


Read full article from git - Reset local repository branch to be just like remote repository HEAD - Stack Overflow


跪求不要 git push -f - 简书



跪求不要 git push -f - 简书

看到一则新闻,美国某程序员枪击同事案件,很多网友猜测出了各种激怒码农同事的办法

9月19日,一名程序员在美国某办公楼向4名同事开枪,导致一人情况危机,两人伤情严重,一人被子弹擦伤。目前,凶手已死,身份被警方查明。
目前,码农持枪杀人的动机仍然是个谜。有人猜测道:"同事不写注释,不遵循驼峰命名,括号换行,最主要还天天 git push -f 等因素" 激怒了这名行凶者。

正常的流程是要在自己的本地解决掉所有的 merge conflict 之后才能 push 到 remote 的。鲁莽的 push -f 确实很容易激怒别人,同时也会很大风险把别人有价值的 commit 都覆盖清空了。

push -f 自然是能不用就不用,但也有一种清空是整个team决定要清一些 commit 把 master 分支回退到某个点上去,自然就想到了 push -f 会是一种非常便捷的做法了。那能不能更优雅的去实现我们的回退操作呢,因为最佳实践原则上 git 历史记录不应该被覆盖的。


Read full article from 跪求不要 git push -f - 简书


How to view Safari cookies



How to view Safari cookies

It's easy enough to view a list of sites that have cookies in Safari, but if you want to actually see the cookie and parameters used by a particular site, you'll need to dive a bit deeper into the interface.

In a nutshell:

  • Navigate to a web site.
  • Select Show Web Inspector from the Develop menu (follow the headline link for instructions on turning on that menu if it doesn't appear for you).
  • Click the Storage tab in the web pane that appears.
  • Click the Cookies item on the left side.

Worth taking a minute to give this a try. Kind of fascinating.


Read full article from How to view Safari cookies


OSX Yosemite and the 8-year-old Bash



OSX Yosemite and the 8-year-old Bash

Over a decade ago, I traded my bag-of-hurt dualboot setup with Windows XP and Linux for something 'better'. I got a nice 12" milk-white iBook G4 with Mac OSX 10.3. It offered me considerably lower performance than my old laptop, but that would be offset by the giant leap in productivity I expected to see from not having to deal with my previous annoyances. Annoyances like all kinds of things in Linux that didn't work properly (Linux on the desktop was pretty crappy back in 2003), or just using Windows in general.

In short, Linux was broken all the time, and Windows didn't offer me the tools and the workflow that I wanted. OSX fixed both. It 'just worked', and gave me all the tools I wanted… and twice the battery life. I just wanted a proper *NIX desktop. All the CLI tools that I need, a nice GUI, and Microsoft Office because I had to.


Read full article from OSX Yosemite and the 8-year-old Bash


后端技术小黑屋



后端技术小黑屋

一个使用机器学习算法的框架,在特征处理模块,往往需要对原始特征进行特征交叉。对于简单的单值特征来说,只需要将需要交叉的特征组合起来即可;但是对于多值特征之间的交叉,则需要穷举多值特征每一个值的组合。例如,如果一个包含2个值的特征和一个包含3个值的特征组合,那么将会产生出6个组合。

一般的,我们可以把这些多值特征描述为

vector<vector<Feature>>

那么给定这样的一个数据结构,如何输出所有的特征组合呢?


直观想法,这好像是直接遍历就可以解决,但是稍微细想一下,简单的N重for循环,无法解决这个问题。

在纸上画了一会儿之后,突然发现,这不就是一个输出全排列的问题吗?

把问题抽象出来之后,我先是按照手工枚举全排列的思路,写了一个非递归的循环版本,但是可读性不好。然后又实现了一个可读性更好的递归版本。


上面这个问题,只是一个引子。

我相信,程序员在大学毕业找工作的时候,一定刷过各种各样的算法题、数据结构题,什么贪心算法、动态规划、快排、二分查找,现在算法工程师们还要手推SVM、反向传播算法等等,面试时也是历尽千辛万苦;然而工作后却发现,正是应了题目那句话:面试造核弹,工作拧螺丝。


Read full article from 后端技术小黑屋


Go 中如何准确地判断和识别各种网络错误 | 行思錄 | Travel Coder



Go 中如何准确地判断和识别各种网络错误 | 行思錄 | Travel Coder

Go 自带的网络标准库可能让很多第一次使用它的人感慨,这个库让网络编程的门槛低到了令人发指的地步。然而,封装层次与开发人员的可控性往往是矛盾的。Go 的网络库封装程度算是一个不错的折衷,绝大部分时候,我们只需要调用 Dial, Read, Write Close 几个基本操作就可以了。

但是,网络是复杂的。我们有时候需要细致的处理网络中的各种错误,根据不同的错误进行不同的处理。比如我们遇到一个网络错误时,需要区分这个错误是因为无法解析 host ip, 还是 TCP 无法建立连接,亦或是读写超时。一开始的时候,我们的写法可能是这样的:


Read full article from Go 中如何准确地判断和识别各种网络错误 | 行思錄 | Travel Coder


Java HTTP 组件库选型看这篇就够了 | 行思錄 | Travel Coder



Java HTTP 组件库选型看这篇就够了 | 行思錄 | Travel Coder

OkHttp 接口设计友好,支持 HTTP/2,并且在弱网和无网环境下有自动检测和恢复机制,因此,是当前 Android APP 开发中使用最广泛的 HTTP clilent lib 之一。

另一方面,OkHttp 提供的接口与 Java 9 中 HttpClint 接口比较类似 (严格讲,应该是 Java 9 借鉴了 OkHttp 等开源库的接口设计?),因此,对于喜欢减少依赖,钟情于原生标准库的开发者来说,在 Java 11 中,从 OkHttp 切换到标准库是相对容易的。因此,以 OkHttp 为代表的 http 库以后的使用场景可能会被蚕食一部分。


Read full article from Java HTTP 组件库选型看这篇就够了 | 行思錄 | Travel Coder


刘主任



刘主任

2016年,一直连年亏损,被外界认为是谷歌赔钱货的英国AI初创公司DeepMind,在巨大的营收压力下,又使出了那招屡试不爽的营销法宝——挑战人类。这一次,它挑战的是韩国围棋九段棋手李世石,这意味着,人类职业围棋的最高水平,将再一次面临机器的碾压。


这场比赛阿尔法狗机器人以4:1的成绩战胜了李世石的同时,还达到了下面几个效果:第一,让全世界都知道了阿尔法狗;第二,全民讨论AI的同时,很多人由此坚信人工智能已经发展到无所不能的地步;第三,间接催化了中国创投圈下一年的风口。


虽然这个比赛很快招致韩国专家田石镇的批评,认为这场比赛不公平,"阿尔法围棋"动用数百台电脑对李世石的行棋进行实时运算后再下子的方式,并不是按已获取的信息行招,而是先看对方的招数并对其进行缜密分析后拆招,这并非真正意义上的人工智能。


Read full article from 刘主任


写出优质Java代码的4个技巧 - 茶轴的青春 - 博客园



写出优质Java代码的4个技巧 - 茶轴的青春 - 博客园

我们平时的编程任务不外乎就是将相同的技术套件应用到不同的项目中去,对于大多数情况来说,这些技术都是可以满足目标的。然而,有的项目可能需要用到一些特别的技术,因此工程师们得深入研究,去寻找那些最简单但最有效的方法。本文我们将介绍一些有助于解决常见问题的通用设计策略和目标实现技术,即:


Read full article from 写出优质Java代码的4个技巧 - 茶轴的青春 - 博客园


Fear of Decoupling - DZone Java



Fear of Decoupling - DZone Java

Objects talk to each other via their methods. In mainstream programming languages, like Java or C#, an object may have a unique set of methods together, with some methods it is forced to have because it implements certain types, also known as interfaces. My experience of speaking with many programmers tells me that most of us are pretty scared of objects that implement too many interface methods. We don't want to deal with them since they are polymorphic and, because of that, unreliable. It's a fair fear. Let's try to analyze where it comes from.


Read full article from Fear of Decoupling - DZone Java


Does Amazon S3 support symlinks? - Stack Overflow



Does Amazon S3 support symlinks? - Stack Overflow

S3 does not support the notion of a symlink, where one object key is treated as an alias for a different object key. (You've probably heard this before: S3 is not a filesystem. It's an object store).

If you are using the static web site hosting feature, there is a partial emulation of this capability, with object-level redirects:

http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html

This causes requests for "object-a" to be greeted with a 301 Moved Permanently response, with the URL for "object-b" in the Location: header, which serves a similar purpose, but is of course still quite different. It only works if the request arrives at the website endpoint (not the REST endpoint).

If you use a reverse proxy (haproxy, nginx, etc.) in EC2 to handle incoming requests and forward them to the bucket, then of course you have the option at the proxy layer of rewriting the request URL before forwarding to S3, so you could translate the incoming request path to whatever you needed to present to S3. How practical this is depends on your application and motivation, but this is one of the strategies I use to modify where, in a particular bucket, an object appears, compared to where it is actually stored, allowing me to rewrite paths based on other attributes in the request.


Read full article from Does Amazon S3 support symlinks? - Stack Overflow


如何阅读源代码 - 专注Golang,Python和后端技术



如何阅读源代码 - 专注Golang,Python和后端技术

今天我们来简单的谈谈应该如何去阅读源代码。阅读源代码是每个程序员都要做的事情,毕竟成为master的先前一步, 就是 follow the master

学会如何使用

要想知道一个东西怎么实现的,我们首先要有一个大概的认知,例如,是什么,大概是怎么用的。所以我们需要先去熟悉这个项目,通常 我们可以这样做:

  • 读文档

阅读已有的,优秀的文档,可以加快了解整个项目的使用,坑和架构,这样可以快速建立起自己对该项目的认知。

  • 写demo

如果阅读的是一个库的代码呢?我们可以引用这个库,写一些简单的demo,这也是为了加快我们建立对项目的认知。

  • 熟悉如何使用

接下来要做的事情就是多写demo,多使用,当使用该项目到达一定程度的时候,就可以开始阅读源代码,而阅读源代码本身又可以促进 对项目的熟悉程度。但是,在什么时候应当开始阅读源代码,因人而异,并没有一个通用的度,而且会因为自身经验的积累而变化。 我个人建议当可以写出demo并且知道demo的每一行都在做什么的时候,就可以开始一边阅读源代码了,如果发现看不懂,则可以继续加深 对项目使用的熟悉程度,然后再次尝试。

通常注意,项目越大,开始阅读源代码所面临的难度其实会越高,一定要有信心。

接下来我们主要聊聊一些常用的阅读源代码的技巧。

从main函数入手

你的程序是怎么运行的?一定是从某个入口点(entrypoint)开始执行。例如 Python 可能是 if __name__ == "__main__" 或者 python 后面接的那个脚本名,例如 Go 通常是 main 函数,C亦然。如果是阅读一个已有的项目而非库,那么我们可以从入口函数开始跟踪代码, 看具体都做了一些什么,如果是一个库,那么我们可以从我们的demo的入口处开始跟踪源代码。

但是注意,从上而下和从下而上这两种阅读源代码的方法论,并没有哪一种更好,从上而下是从概貌到细节,从下而上是从实现细节到 概况。通常来说,都是结合两者,但是我个人通常以自上而下为主,了解了概貌之后,才会去了解具体的实现。


Read full article from 如何阅读源代码 - 专注Golang,Python和后端技术


Hard isn't Valuable: Looking back on Fineo



Hard isn't Valuable: Looking back on Fineo

I've decided its time to wrap up Fineo. I took a shot for a while (nearly two years!), but I'm way past my original time deadline to get traction and well out of (allocated) money. I've spent the last few weeks writing up some of the interesting architecture/design work I did, so at least there is some decent record. At the same time, I've been reading a bunch to understand where and how I went awry.

Emotional Impact

Quiting Fineo felt a bit like getting broken up with as a teenager. Spending an inordinate amount of time together, Fineo became a large part of my identity (not a good idea). Once its over, it then still takes a while to really accept that it happened - its over; the necessary obsessing over (and over and over) what happened, why it didn't work out, etc. At the end of it, it wasn't necessarily something I regret doing, but it's taken a bit of time to get used to the idea that I'm not going to be working on this thing that was a huge part of my life for nearly two years.

It's been an emotional roller coaster, not to sound too cliché, filled with stress, depression, flow and yes, a couple wins. At the same time, its been a great pressure to expand my comfort zone and learn oodles of things I didn't even consider before. I've said for a while that even if Fineo failed (predestination?), it would still have been worthwhile.


Read full article from Hard isn't Valuable: Looking back on Fineo


Interlude: Self-Improving Architecture and Design



Interlude: Self-Improving Architecture and Design

A short break from the Fineo architecture. Recently get for the thinking about self-improving systems. Specifically, I liked the idea of a self-improving system where the actors in and around the system are incentivized to continually improve the system. This makes sense in context of a business or company, but can this be extending to a software code base? I want architecture of the system to dictate the lowest cost/lowest energy action to take within the system is also the best choice for the system.


Read full article from Interlude: Self-Improving Architecture and Design


Useful JVM Flags - Part 8 (GC Logging) - codecentric AG Blog



Useful JVM Flags - Part 8 (GC Logging) - codecentric AG Blog

The last part of this series is about garbage collection logging and associated flags. The GC log is a highly important tool for revealing potential improvements to the heap and GC configuration or the object allocation pattern of the application. For each GC happening, the GC log provides exact data about its results and duration.

-XX:+PrintGC

The flag -XX:+PrintGC (or the alias -verbose:gc) activates the "simple" GC logging mode, which prints a line for every young generation GC and every full GC. Here is an example:

[GC 246656K->243120K(376320K), 0,0929090 secs]
[Full GC 243120K->241951K(629760K), 1,5589690 secs]

A line begins (in red) with the GC type, either "GC" or "Full GC". Then follows (in blue) the occupied heap memory before and after the GC, respectively (separated by an arrow), and the current capacity of the heap (in parentheses). The line concludes with the duration of the GC (real time in seconds).


Read full article from Useful JVM Flags - Part 8 (GC Logging) - codecentric AG Blog


linux - how to merge 2 big files - Stack Overflow



linux - how to merge 2 big files - Stack Overflow

Can we make this better than doubling the size of both files?

Yes, we can use the append (>>) operation instead.

cat file2 >> file1  

That will still result in using all the space of consumed by file2 twice over until we can delete it.


Read full article from linux - how to merge 2 big files - Stack Overflow


Spatial Search with Solr | T/DG Blog - Digital Thoughts



Spatial Search with Solr | T/DG Blog - Digital Thoughts

Solr supports location data for use in spatial/geospatial searches. Using spatial search, you can:


  • Index points or other shapes
  • Filter search results by a bounding box or circle or by other shapes
  • Sort or boost scoring by distance between points, or relative area between rectangles


Following field types are available for spatial search:

  • LatLonType – Better for distance sorting/boosting
  • SpatialRecursivePrefixTreeFieldType (RPT for short) – Fast filter performance


RPT offers more features than LatLonType and fast filter performance, although LatLonType is more appropriate when efficient distance sorting/boosting is desired. They can both be used simultaneously for what each does best – LatLonType for sorting/boosting, RPT for filtering.


Read full article from Spatial Search with Solr | T/DG Blog - Digital Thoughts


How do I prevent my verbose:gc log being overwritten when the application restarts? - IBM on troubleshooting Java applications Blog



How do I prevent my verbose:gc log being overwritten when the application restarts? - IBM on troubleshooting Java applications Blog


Read full article from How do I prevent my verbose:gc log being overwritten when the application restarts? - IBM on troubleshooting Java applications Blog


java - GC log rotation data lose on application restart - Stack Overflow



java - GC log rotation data lose on application restart - Stack Overflow

I use this jvm option in order to create gc logs and enable rolling:

$ java -Xloggc:gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5  XX:GCLogFileSize=128K

However, I have a problem when I restart my application. After a restart, the first log file gc.log.0 is overwritten and the data of that file is not rolled to gc.log.1 and hence lost.

I'm wondering if I'm right and if there's a solution for this.


Read full article from java - GC log rotation data lose on application restart - Stack Overflow


并发模型比较 - Present Day, Present Time



并发模型比较 - Present Day, Present Time

Golang 的特色之一就是 goroutine ,使得程序员进行并发编程更加方便,适合用来进行服务器编程。作为后端开发工程师,有必要了解并发编程面临的场景和常见的解决方案。一般情况下,是怎样做高并发的编程呢?有那些经典的模型呢?


一切始于 C10k

C10k 就是 Client 10000,单机服务器同时服务1万个客户端。当然,现在的业务面临的是 C100k、C1000k 了。早期的服务器是基于进程/线程模型,每新来一个连接,就分配一个进程(线程)去处理这个连接。而进程(线程)在操作系统中,占有一定的资源。由于硬件的限制,进程(线程)的创建是有瓶颈的。另外进程(线程)的上下文切换也有成本:每次调度器调度线程,操作系统都要把线程的各种必要的信息,如程序计数器、堆栈、寄存器、状态等保存起来。

CPU 运算远远快于 I/O 操作。一般而言,常见的互联网应用(比如 Web)都是 I/O 密集型而非计算密集型。I/O 密集型是指,计算机 CPU 大量的时间都花在等待数据的输入输出,而不是计算。当 CPU 大部分时间都在等待 I/O 的时候,大部分计算资源都被浪费掉了。

显然,简单粗暴地开一个进程/线程去 handle 一个连接是不够的。为了达到高并发,应该好好考虑一下 I/O 策略。同样的硬件条件下,不同的设计产生的效果差别也会很大。在讨论几种 I/O 模型之前,先介绍一下同步/异步、阻塞/非阻塞的概念,以及操作系统的知识。


Read full article from 并发模型比较 - Present Day, Present Time


承香墨影



承香墨影

有多少人开始写公众号了?又有多少人坚持下来了?

年初是一个立 Flag 的好日子,多少人看到自媒体的红利,立的新年 Flag 是运营好一个公众号。能坚持写到现在的人,应该还能坚持写很久,可大多数还是坚持了一段时间就放弃了。

写作很辛苦吗?写作其实是一种对思维的刻意练习,本质上它是一种对思维的磨砺方式,在自我锻炼的前期,它确实很辛苦,需要坚持做一些刻意的训练,来养成写作的习惯。


Read full article from 承香墨影


承香墨影



承香墨影

近日,国外安全研究人员 Sabri Haddouche 发推表示,只要 15 行代码,就可以让一台 iPhone 崩溃重启。


Read full article from 承香墨影


Converting Medium Posts to Markdown for Your Blog – Towards Data Science



Converting Medium Posts to Markdown for Your Blog – Towards Data Science

If like me, you got your start blogging on Medium, but also want to build your own website to display your articles, you'll need a way to move articles from Medium to the Markdown language. Markdown is a lightweight language meant to be converted into HTML for the web, and there are several tools that allow you to go from existing Medium articles to Markdown for a blog.


Read full article from Converting Medium Posts to Markdown for Your Blog – Towards Data Science


如何面试-作为面试官得到的经验 - 专注Golang,Python和后端技术



如何面试-作为面试官得到的经验 - 专注Golang,Python和后端技术

  • 社会很残酷,学历是一块敲门砖,尽管个人认为学历不是硬性要求,但是现实就是如果用合格人选处以其学历等级的人数, 学历越高,合格的几率越高,因此很多HR为了节省时间,往往是要求本科以上

  • 请好好的写简历,简历就是你的门面,试想,在一堆排版乱七八糟的简历中,有一份简洁大方的简历,是不是特别吸引眼球呢? 另外,自己的简历都排版马马虎虎,让别人怎么敢相信干活的时候不会马马虎虎草草了事呢?

  • 找工作其实是平等的,面试官问你,你也可以问面试官,这一点我个人需要反省,因为没有想到这一点,之前的面试都没有加上一句 "你有什么想问我的吗?"

  • 面试官做的事情其实是给自己或者自己的手下找队友,所以心目中选择的顺序肯定是:比我强的 > 跟我相当的 > 暂时弱但是有潜力的

  • 还是那句话,找工作其实是平等的,所以没有必要好像要求着面试官一样,尤其是IT,好的公司应该是凭技术吃饭,而不是凭政治

  • 简历上一定要有吸引别人的亮点,如果到目前为止,自己的简历上没有出名的大学,也没有出名的大公司,那么请为之努力,亦或者, 在Github或者你的博客上展现你的能力,总之要有地方能吸引HR约你面试

  • 如果不是长得非常帅气或者漂亮,可以考虑不要贴照片上去

  • 自我评价不要写 本人非常刻苦,责任心十分强,愿意为公司效力,十分勤奋等等,甚至可以不要写自我评价,用能力说话,能力强 的人,责任心通常不会差,背后自然也是付出过努力的(或者有与之相当的天分)

  • 简历传达的,应该是你想展示给公司或者是HR看到的,最重要的那些东西。所以无关紧要的东西可以不用写。例如:喜欢运动,爱打 羽毛球。如果你的能力不过关,羽毛球打的厉害,也不会录用,毕竟我们要找的是队友,不是羽毛球陪练不是吗?

  • 跳槽不要太频繁,频率不应该超过一年一次。很多大公司其实并不是那么缺人,如果两个人能力相当,HR肯定会优先选择稳定的那个。

  • 对于还在读书的学生,有以下几点建议:

    • 毕业后能去大公司就去大公司,会有品牌效应加持,大公司无论是从并发,技术积累,品牌等各个方面,都远超创业公司
    • 在学校不要虚度光阴,不要等到大四甚至毕业了才开始想工作的事情
  • 毕业后不要怠慢,IT行业发展迅速,一旦你觉得够了,用不了多久,你就会被很多人超越。如逆水行舟,不进则退。我们这行的人, 要时刻保持这可跳槽性,这样才能常年立于不败之地

  • 深度应当优先于广度,什么都懂一点,什么都只懂一点没有意义。工作几年之后,能甩开别人的地方,就是你知道而别人不知道的地方, 例如你精通Nginx的配置,使用,调优和源码,而别人只会照着网上抄配置,这就是差距。你熟知所用语言的标准库,标准库里提供的 数据结构是如何实现的,时间复杂度是多少,就比知道标准库里所有函数更有用。后者可以通过搜索引擎搜到,也就意味着这样的知识 获得起来更加廉价。在一般的时候,深度优先或者广度优先可能看不出优劣,但是总会有几个关键的时间点,会体现出深度的价值

  • 面试过程中,一定要把你最强最深的地方展示给面试官看。我面试最后一般会问"有什么是你特别擅长但是我一个都没有问到的地方吗?" 如果面试官没有给你这样的机会,请一定要把面试官引导到你的强处。之前听闻有个同事面试的时候是这样跟面试官说的"你说的我都不会, 我来告诉你我会什么"

  • 简历不要"美化"的过头了,如果面试下来发现简历只是"看起来"挺厉害,但实际上。。。只是浪费大家的时间而已,看起来厉害的简历, 背后请一定要有与之匹配的实力

  • 简历上应当要有数字来说明,数字会比一堆的文字更有说服力,例如:完成了xxx系统,接口平均响应时间在1ms,99%分位值不超过 2ms。对比起"完成了xxx系统,提供了高性能的接口"是不是更震撼,也更加明了呢?

  • 不要轻易写精通。每次我看到写精通的人,我就抱着很高的期望去面试,想看看是否真的精通了,但是结果往往不得人心,有一位面试者 写了精通Python和数据库,可是metaclass不知道,数据库怎么调优也不知道。这样真的精通了吗?

  • 找工作其实有点依靠缘分和运气,没成功也不要灰心。

  • 你的简历就像人生路,如果可以,请尽可能越走越好。

  • 在国内,做技术的到最后还是得转管理才行啊。这大概是本人最深的体悟了吧。社会真的很残酷。不过转管理也不意味着要抛弃技术。


Read full article from 如何面试-作为面试官得到的经验 - 专注Golang,Python和后端技术


10 Common Software Architectural Patterns in a nutshell



10 Common Software Architectural Patterns in a nutshell

Ever wondered how large enterprise scale systems are designed? Before major software development starts, we have to choose a suitable architecture that will provide us with the desired functionality and quality attributes. Hence, we should understand different architectures, before applying them to our design.


Read full article from 10 Common Software Architectural Patterns in a nutshell


Mac - Mac boots to a black screen with cursor - Spiceworks



Mac - Mac boots to a black screen with cursor - Spiceworks

Hold the power button for 10~ seconds until the Mac powers off.

Step 2: Boot to Single User mode

Hold "command (⌘) + S" while powering on the Mac until you see a black screen with white text, at which point you can release the keys.

Wait for the command prompt ( :/ root# ) before moving to the next step.


Read full article from Mac - Mac boots to a black screen with cursor - Spiceworks


海量育儿资料(超过1万G)(学习教材、中外绘本、英文动画...) - 简书



海量育儿资料(超过1万G)(学习教材、中外绘本、英文动画...) - 简书

1、请到电脑上复制链接进行下载。

2、输入密码错误,是输入法问题,请切换到英文输入,密码都是小写,不要有空格

3、如链接失效,请不要着急,每周末我们会巡检一遍链接。

4、永久有效,建议自己注册一个百度云盘,转存到自己注册的云盘。


Read full article from 海量育儿资料(超过1万G)(学习教材、中外绘本、英文动画...) - 简书


14 Classic Toddler Songs, With Lyrics



14 Classic Toddler Songs, With Lyrics

If You're Happy and You Know It

If you're happy and you know it clap your hands (clap clap)

If you're happy and you know it clap your hands (clap clap)

If you're happy and you know it and you really want to show it

If you're happy and you know it clap your hands (clap clap)

Repeat verse with these options:

If you're mad and you know it stomp your feet (stomp stomp)

If you're sad and you know it shed a tear (rub eyes, make "boo hoo" sounds)

If you're happy and you know it jump for joy (jump up) or shout hurray ("Hurray!")

This song lets toddlers really express themselves, as loudly as they want! Plus it teaches about feelings, and appropriate responses, because I think we'd all rather our angry toddlers learned to stomp their feet instead of, say, biting us.

London Bridge

London bridge is falling down

Falling down

Falling down

London bridge is falling down

My fair lady

Take the key and lock her up

Lock her up, lock her up

Take the key and lock her up


Read full article from 14 Classic Toddler Songs, With Lyrics


Running Dropwizard as a Guava Service » Blake Smith



Running Dropwizard as a Guava Service » Blake Smith

There are many things to like about the Dropwizard Framework, but if you're like me, you might want to "own your main" function. A normal Dropwizard application gives you a run hook as part of its Application parent class, but in the end your code is still subservient to the Dropwizard framework code.

One pattern that is very good for organizing small logical services in your application is to use Guava's Services to break your application into service level groupings (And avoid the drinking the microservice kool-aid prematurely). Guava services give you a common operational interface to coordinate all your in-process logical components. In this model, the Dropwizard web server is no more important than my periodic polling service, or my separated RPC service, and so on. I'd like my Dropwizard web stack to be a peer to the other services that I'm running inside my application. It only takes two steps to make this work.


Read full article from Running Dropwizard as a Guava Service » Blake Smith


The probability of data loss in large clusters — Martin Kleppmann’s blog



The probability of data loss in large clusters — Martin Kleppmann's blog

Many distributed storage systems (e.g. Cassandra, Riak, HDFS, MongoDB, Kafka, …) use replication to make data durable. They are typically deployed in a "Just a Bunch of Disks" (JBOD) configuration – that is, without RAID to handle disk failure. If one of the disks on a node dies, that disk's data is simply lost. To avoid losing data permanently, the database system keeps a copy (replica) of the data on some other disks on other nodes.

The most common replication factor is 3 – that is, the database keeps copies of every piece of data on three separate disks attached to three different computers. The reasoning goes something like this: disks only die once in a while, so if a disk dies, you have a bit of time to replace it, and then you still have two copies from which you can restore the data onto the new disk. The risk that a second disk dies before you restore the data is quite low, and the risk that all three disks die at the same time is so tiny that you're more likely to get hit by an asteroid.


Read full article from The probability of data loss in large clusters — Martin Kleppmann's blog


Consul vs. Istio - Consul by HashiCorp



Consul vs. Istio - Consul by HashiCorp

Istio is an open platform to connect, manage, and secure microservices.

To enable the full functionality of Istio, multiple services must be deployed. For the control plane: Pilot, Mixer, and Citadel must be deployed and for the data plane an Envoy sidecar is deployed. Additionally, Istio requires a 3rd party service catalog from Kubernetes, Consul, Eureka, or others. Finally, Istio requires an external system for storing state, typically etcd. At a minimum, three Istio-dedicated services along with at least one separate distributed system (in addition to Istio) must be configured to use the full functionality of Istio.

Istio provides layer 7 features for path-based routing, traffic shaping, load balancing, and telemetry. Access control policies can be configured targeting both layer 7 and layer 4 properties to control access, routing, and more based on service identity.


Read full article from Consul vs. Istio - Consul by HashiCorp


Sam Newman Principles Of Microservices



Sam Newman Principles Of Microservices

This talk is distillation of what makes microservices different from normal services. While this talk can serve as an introduction to microservices the real goal is to help tease out the key areas of what is a very broard topic.

There has been lots of buzz around Microservices over the last year, but there has often been a lack of clarity as to what Microservices are, or how to implement them well. I've been working to distill down the principles of Microservices to help ensure that we don't just end up repeating the mistakes we made during the last 20 years of service oriented architecture. I'll talk about what they are, the benefits and downsides, and the core principles to stick to do to them well.


Read full article from Sam Newman Principles Of Microservices


Why 95 Percent of Software Engineers Lose Nothing By Unionizing – Michael O. Church



Why 95 Percent of Software Engineers Lose Nothing By Unionizing – Michael O. Church

I can't give a simple answer to this. There are advantages and disadvantages to enrolling in a collective bargaining arrangement. If the disadvantages didn't exist, or weren't considerable in some situations, everyone would unionize. So, we need to take both sides seriously.

The upshots of collective bargaining are: better compensation on average, better job security, better working conditions, and more protection against managerial adversity. There are a lot of improvements to employment that can only be made with collective negotiation. An individual employee who requested guaranteed severance, the right to appeal performance reviews, transparency in reference-checking and internal transfer, and waiving of onerous (and effectively nonconsensual) but common terms in contracts– e.g., mandatory arbitration provisions, non-competition and non-solicitation agreements, anti-moonlighting provisions– would be laughed out of the building. No individual can negotiate against these terms– it is, for example, embarrassing for an individual to discuss what rights she has if a manager gives a negative performance review– but unions can.


Read full article from Why 95 Percent of Software Engineers Lose Nothing By Unionizing – Michael O. Church


Great programming books for developers that I still recommend in 2018



Great programming books for developers that I still recommend in 2018

This is the best book I have read on Usability. Steve Krug takes you through many annoying and irritating situations while dealing with the web. He illustrates the users' frustration in a way which makes you feel compassion. There is a lot to learn from this book. It is also a great entry level book for User experience. Even though the book focuses on web, it can still be used for general purpose User experience.


Read full article from Great programming books for developers that I still recommend in 2018


How to make time to repay your technical debt - Small Business Programming



How to make time to repay your technical debt - Small Business Programming

Some of the simplest things have the best payback. Let's look at a few ideas:

  • establish a shared sense of urgency. Figure out why you–as a team–want to become more efficient. Talk about it often. Write it on a white board for everyone to see.
  • brainstorm initiatives with your team, rank them by likely payback, and work from the top of the list
  • do your refactoring/efficiency stories at the beginning of each sprint (if you leave them to the end of your sprint you'll be much less likely to have time for them)
  • adopt some kind of agile process with short iterations (SCRUM, KANBAN, etc.)
  • manage your code with a VCS like GIT or Subversion
  • everyone on your team uses the best IDE money can buy on a fast computer with ample screen real estate
  • decide how the code in your project will be formatted, setup your IDE to format your code to the project standard with a pre-commit hook and never format your code by hand again (you can use a language standard instead of arguing about your code formatting – for example PHP has PSR-1 and PSR-2, Python as PEP 8)

Read full article from How to make time to repay your technical debt - Small Business Programming


Books I read in 2017 - Small Business Programming



Books I read in 2017 - Small Business Programming

In this post, I'm going to share some of the books I read this year. In the nonfiction realm, some of them are very much on point for software developers. Others are just good books that let you know what's going on in the world.

In fiction, I'm drawn to technology-driven Sci-Fi. I found some great reads this year. I also listed some books at the bottom of this post that weren't that good. I think it's just as important to tell you about the good books as the not so good books.


Read full article from Books I read in 2017 - Small Business Programming


Is Uncle Bob serious? - Small Business Programming



Is Uncle Bob serious? - Small Business Programming

Better tools have helped me become a better programmer

Later I moved to Eclipse and thought I was stupid for not doing this sooner. Eclipse caught all kinds of errors I missed with the basic text editor. It just highlighted them like a misspelled word in a word processor–brilliant.

A couple of years later I adopted Subversion as my VCS and I thought I was stupid for not doing this sooner. I could see all the history for my project, I could make changes and revert them. It was awesome.


Read full article from Is Uncle Bob serious? - Small Business Programming


pholser/junit-quickcheck: Property-based testing, JUnit-style



pholser/junit-quickcheck: Property-based testing, JUnit-style

junit-quickcheck is a library that supports writing and running property-based tests in JUnit, inspired by QuickCheck for Haskell.

Property-based tests capture characteristics, or "properties", of the output of code that should be true given arbitrary inputs that meet certain criteria. For example, imagine a function that produces a list of the prime factors of a positive integer n greater than 1. Regardless of the specific value of n, the function must give a list whose members are all primes, must equal n when all multiplied together, and must be different from the factorization of a positive integer m greater than 1 and not equal to n.

Rather than testing such properties for all possible inputs, junit-quickcheck and other QuickCheck kin generate some number of random inputs, and verify that the properties hold at least for the generated inputs. This gives us some reasonable assurance over time that the properties hold true for any valid inputs.


Read full article from pholser/junit-quickcheck: Property-based testing, JUnit-style


Are you working on the most important thing? - Small Business Programming



Are you working on the most important thing? - Small Business Programming

Is it possible that you've undervalued or overlooked stories in your backlog that will return thousands of dollars on every hour of your effort? Are you sure you're working on the most important thing?

That's exactly what happened to me. I'd been ignoring a bunch of "low priority" stories until I discovered that a similar story returned well over $15K per hour of my time.

In this post, I'm going to tell you what happened, how you can find those kind of stories in your own backlog, and how you can make sure you're working on the most important thing.


Read full article from Are you working on the most important thing? - Small Business Programming


个体软件过程(Personal Software Process,PSP)【转贴】 - 一杯啤酒喜相逢,但愿共醉,互诉往事 - ITeye博客



个体软件过程(Personal Software Process,PSP)【转贴】 - 一杯啤酒喜相逢,但愿共醉,互诉往事 - ITeye博客

      最近公司要培训一些关于个人软件开发过程中的一些知识,所以我特地提前找了一些相关的资料,整理一下,以后会继续更新!

       个体软件过程(Personal Software Process,PSP)是一个过程描述、测度和方法的结构化集合,能够帮助软件工程师改善其个人性能。它提供了表格、脚本和标准,以帮助软件工程师估算和计划其工作。它显示了如何定义过程及如何测量其质量和生产率。

        PSP由五级组成,每一级都试图指出过程缺陷并提供解决方法。五级分别为PSP0, PSP1, PSP2, PSP3 and TSP[35],每个都包括几个单独的步骤。这个专题主张把个体过程并入后CASE系统中,并试图证明它的可用性。

制定计划:

对以前做完一个同等规模(代码行等)的软件功能,得最大,最小,平均时间进行记录,以便评估在新任务中的最大,最小,平均时间进行记录。

时间管理:

记录时间利用的效能。计划:日期 开始时间 结束时间 中断时间 净时间活动 备注 C U

了解计划存在哪些问题,下一步干什么

 过程管理:

首先定义测量方法。规定了测量方法后,就必须收集和分析数据。如果需要作些改进,接下来就要分析工作过程,看看什么地方需要改进。最后要想真正的改进,必须切实做出改进。


Read full article from 个体软件过程(Personal Software Process,PSP)【转贴】 - 一杯啤酒喜相逢,但愿共醉,互诉往事 - ITeye博客


《zero to one》读书笔记 - 简书



《zero to one》读书笔记 - 简书

《zero to one》这段时间被各种渠道推荐了好多次,所以很认真的开始读,读到一半的时候得知中信出版社刚译制完成了中文版:《从0到1:开启商业与未来的秘密》,不过确实是好书,这次中文版出版之快,可见互联网人对知识产权方面的理解,是有异于传统行业的,书的主干整理自Peter的课程笔记,所以相对简略易读,观点清晰,围绕观点阐述,像TED的15分钟视频一样的高效

Peter在书里面提到的很多东西让我惊异,比如对于罗尔斯和诺齐克对立的分析,显然Peter是一位自由主义背景的新保守主义者,网上说他还是一位同性恋基督徒,在哲学、历史、经济、人类学和文学方面涉猎广泛,比如说他对于中国人是绝对的悲观主义者的定义,比如他提出的创新型垄断的必须性等等,都给我很多延展阅读的启发

在书中提到两个不错的面试问题:"What important truth do very few people agree with you on?" "what valuable company is nobody building?",可以用来判断人的独立思考性和合作精神,确实是有深度的,需要有一定的积淀的人才可以回到好这两个问题

股价、油价、汇率等等,都是在人的"期望"这个判定调节下的市场行为,一家好的公司亦然,好的公司经营和管理者,需要有能力给所有人一个好的发展预期,正式这样的预期,很大的程度上推进着公司的加速度发展,好的公司文化就应当是可以产生那种正向预期的文化


Read full article from 《zero to one》读书笔记 - 简书


Labels

Algorithm (219) Lucene (130) LeetCode (97) Database (36) Data Structure (33) text mining (28) Solr (27) java (27) Mathematical Algorithm (26) Difficult Algorithm (25) Logic Thinking (23) Puzzles (23) Bit Algorithms (22) Math (21) List (20) Dynamic Programming (19) Linux (19) Tree (18) Machine Learning (15) EPI (11) Queue (11) Smart Algorithm (11) Operating System (9) Java Basic (8) Recursive Algorithm (8) Stack (8) Eclipse (7) Scala (7) Tika (7) J2EE (6) Monitoring (6) Trie (6) Concurrency (5) Geometry Algorithm (5) Greedy Algorithm (5) Mahout (5) MySQL (5) xpost (5) C (4) Interview (4) Vi (4) regular expression (4) to-do (4) C++ (3) Chrome (3) Divide and Conquer (3) Graph Algorithm (3) Permutation (3) Powershell (3) Random (3) Segment Tree (3) UIMA (3) Union-Find (3) Video (3) Virtualization (3) Windows (3) XML (3) Advanced Data Structure (2) Android (2) Bash (2) Classic Algorithm (2) Debugging (2) Design Pattern (2) Google (2) Hadoop (2) Java Collections (2) Markov Chains (2) Probabilities (2) Shell (2) Site (2) Web Development (2) Workplace (2) angularjs (2) .Net (1) Amazon Interview (1) Android Studio (1) Array (1) Boilerpipe (1) Book Notes (1) ChromeOS (1) Chromebook (1) Codility (1) Desgin (1) Design (1) Divide and Conqure (1) GAE (1) Google Interview (1) Great Stuff (1) Hash (1) High Tech Companies (1) Improving (1) LifeTips (1) Maven (1) Network (1) Performance (1) Programming (1) Resources (1) Sampling (1) Sed (1) Smart Thinking (1) Sort (1) Spark (1) Stanford NLP (1) System Design (1) Trove (1) VIP (1) tools (1)

Popular Posts