Java Web Weekly, Issue 114 – Java网络周刊》第114期

最后修改: 2016年 3月 4日

中文/混合/英文(键盘快捷键:t)

At the very beginning of last year, I decided to track my reading habits and share the best stuff here, on Baeldung. Haven’t missed a review since.

去年年初,我决定跟踪我的阅读习惯,并在这里分享最好的东西,在Baeldung上。从那时起,我没有错过任何一篇评论。

Here we go…

我们来了……

1. Spring and Java

1.Spring和Java

>> Writing Unit Tests With Spock Framework: Introduction to Specifications, Part Three [petrikainulainen.net]

This article continues to explore testing with Spock, this time with a close look at specifications.

本文继续探讨用Spock进行测试,这次是对规范的仔细研究。

>> Parallel execution of blocking tasks with RxJava and Completable [solidsoft.wordpress.com]

>> 用RxJava和Completable并行执行阻塞任务 [solidsoft.wordpress.com]

RxJava is definitely a powerful tool and quite a nice API. Here’s a practical writeup showing some real-world scenarios of how to use it.

RxJava绝对是一个强大的工具和相当不错的API。这里有一篇实用的文章,展示了一些如何使用它的真实场景。

>> Oracle’s OpenJDK Cleanup of “Unsafe” Implementation [infoq.com]

>> Oracle的OpenJDK清理 “不安全 “实现 [infoq.com]

A short update on what’s happening with Unsafe in Java 9.

关于Java9中的Unsafe的简短更新。

>> How to Support Java 6, 8, 9 in a Single API [jooq.org]

Very interesting approach to supporting multiple Java versions in a public API. If you’re building or maintaining a public API – definitely worth checking out.

对于在公共API中支持多个Java版本的方法非常有趣。如果你正在构建或维护一个公共API–绝对值得一看。

And, as a side-note – if you’re into marketing – this is a nice piece of being smart about the way you produce content that supports your product.

而且,作为一个旁注–如果你是搞营销的–这是对你生产支持你的产品的内容的方式很聪明的一块。

>> How to combine the Hibernate assigned generator with a sequence or an identity column [vladmihalcea.com]

The identity of an entity is a lot more complex than just slapping an @Id on and call it a day.

实体的身份要比打上一个@Id就可以了的复杂得多。

Also worth reading:

也值得一读。

Webinars and presentations:

网络研讨会和演讲。

Time to upgrade:

是时候升级了。

2. Technical

2.技术

>> Sensible mutation testing: don’t go on a killing spree [codecentric.de]

Mutation testing makes the bogus metric that is code coverage slightly less bogus. It looks easy enough to set up, so I’ll definitely give this one a try.

突变测试使代码覆盖率这个虚假的指标稍微不那么虚假。它看起来很容易设置,所以我一定会试一试。

>> How Not To Write Golden Master Tests [thecodewhisperer.com]

Like always, a solid deep-dive into the intricacies of getting to a well tested, easy to change system.

像往常一样,对错综复杂的问题进行了扎实的深入研究,以获得一个经过良好测试、易于改变的系统。

>> How to Detect and Analyze DDoS Attacks Using Log Analysis [loggly.com]

>> 如何使用日志分析检测和分析DDoS攻击 [loggly.com]

An interesting and certainly helpful look at how DDoS attacks work, how targets are usually picked and what you can do about it.

一个有趣的,当然也是很有帮助的展望DDoS攻击是如何工作的,目标通常是如何被选中的,以及你可以做些什么。

Hint – good logging can help see the pattern early. Reacting to it – well, that’s not as easy as just knowing it’s happening.

提示–良好的记录可以帮助尽早看到这种模式。对它作出反应–嗯,这不像仅仅知道它的发生那么容易。

>> Should we use a coding standard? [devblog.avdi.org]

I’ve been in my fair share of coding standard discussions (let’s call them “discussions”) where I was trying to convince someone of something. It’s never fun and almost always unproductive – so I tend to approach this problem different now (hint – I’m a lot more flexible than in my early days).

我曾经参加过我的编码标准讨论(让我们称它们为 “讨论”),我试图说服某人的东西。这从来都不好玩,而且几乎总是没有结果–所以我现在倾向于以不同的方式来处理这个问题(提示–我比早期的时候灵活了很多)。

This writeup goes over some of that process and makes some really good points you can pick up and use when your team is pulling the trigger on a coding standard.

这篇文章介绍了这个过程的一些情况,并提出了一些非常好的观点,当你的团队要在编码标准上扣动扳机时,你可以拿起并使用

Also worth reading:

也值得一读。

3. Musings

3.思索

>> The Majestic Monolith [m.signalvnoise.com]

Monoliths have a bad rap. It’s really important to understand though where monolith makes more sense and what kind of system really does need a microservice architecture.

单片机有一个不好的说法。但是,了解哪些地方的单片机更有意义,哪些系统真正需要微服务架构,这一点非常重要。

That early decision has the clear potential of saving you many months of extra development work to get to where you need to be.

这一早期决定显然有可能为你节省许多个月的额外开发工作,以达到你需要达到的目标。

>> Prerequisites for Effective Code Review [daedtech.com]

Attempts of reviewing code are legion. Positive, useful code review cultures geared towards learning are few and far between.

审查代码的尝试很多。积极的、面向学习的有用的代码审查文化是少之又少的。

And that’s definitely because the practice does require a few things to be in place in order to work well – not the least of which is some level of emotional maturity.

这肯定是因为这种做法确实需要一些东西到位,才能很好地发挥作用–其中最重要的是某种程度的情感成熟度。

>> My next bet: VR is going to take off in the next 3 years… [lemire.me] and

>> Lost my bet: the PC isn’t dead… yet [lemire.me]

A couple of fun reads about how fast the general tech industry is moving forward.

有几篇关于一般科技行业如何快速发展的有趣读物。

>> How to Deploy Software [zachholman.com]

This isn’t a post, it’s a small book 🙂

这不是一个帖子,是一本小书 🙂

It’s also an intelligent, clearly written writeup on what it takes to put your work out there and do it well.

这也是一篇聪明的、写得很清楚的文章,讲述了把你的工作放在那里并做好它所需要的东西。

Well worth reading if only to get rid of “deployment stress” (real medical condition) and 10x your chill factor when going to production.

如果只是为了摆脱 “部署压力”(真正的医疗条件)和在去生产时10倍于你的寒意因素,那就非常值得一读。

>> InfrastructureAsCode [martinfowler.com]

A well known practice in the DevOps world, and hopefully outside of it as well.

在DevOps世界中,这是一个众所周知的做法,希望在它之外也是如此。

I’m expecting this article to keep growing like the previous series here, following the super interesting Evolving Publication concept.

我期待这篇文章能像这里以前的系列文章一样不断发展,遵循超级有趣的不断发展的出版物概念。

Also worth reading:

也值得一读。

4. Comics

4.漫画

And my favorite Dilberts of the week:

还有本周我最喜欢的Dilberts。

>> Stop everything you’re doing and build robots [dilbert.com]

>> We need to act more like a start-up [dilbert.com]

>> Studies show married people are happier [dilbert.com]

 

5. Pick of the Week

5 本周精选

>> A Big Little Idea Called Legibility [ribbonfarm.com]