The Baeldung Weekly Review 20 – Baeldung周报》20

最后修改: 2014年 5月 23日

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

1. Java and Spring

1.Java和Spring

>> Java 8 Friday: API Designers, be Careful

API design has always been one of the more difficult and forward thinking design exercises – that’s why the elegant Java Collections API is nothing short of spectacular. Java 8 has changed API design for good – and it looks like jOOQ making full use of the new functionality in the JLS. Nice work and a useful read, even if you haven’t yet jumped on the Java 8 bandwagon.

API设计一直是比较困难和具有前瞻性的设计工作之一–这就是为什么优雅的Java集合API是非常壮观的。Java 8彻底改变了API的设计 – 看起来jOOQ充分利用了JLS的新功能。干得好,即使你还没有加入到Java 8的行列中,也是一个有用的读物。

>> Java 8 Friday: Better Exceptions

I caught this one JIT and postponed the publishing of the review a bit to read through it. It details a hypothetical Java 8 enabled JUnit API for checking exceptions – would be a nice addition to the library.

我发现了这个JIT,并推迟了发表评论的时间来阅读它。它详细介绍了一个用于检查异常的假想的Java 8 enabled JUnit API–这将是对库的一个很好的补充。

>> Spice up your test code with custom assertions

Custom assertions are the next logical step forward – albeit a compromise between readability and to much code to maintain, and definitely worth taking a look at.

自定义断言是下一个合乎逻辑的步骤–尽管是在可读性和需要维护的大量代码之间的妥协,但绝对值得一看。

>> Writing Clean Tests – Beware of Magic

“Clean code is easy to read” – I’m sure you’d agree. However, even though this is an oh so simple statement, it has far reaching implications. This article takes a good look at magic numbers, constants and good test design – a good addition to the series.

“干净的代码容易阅读” – 我相信你会同意。然而,尽管这只是一个简单的说法,但它却有着深远的影响。这篇文章对神奇的数字、常量和良好的测试设计进行了很好的分析–是对该系列的良好补充。

>> Integration Tests for External Services

Integration testing has an extremely high impact on developer sleep – that is – it lets you sleep at night. So you could make the case that this article will help you sleep better – jump on over and read the thing – it’s quick and useful.

集成测试对开发人员的睡眠有极高的影响–也就是说–它让你在晚上睡觉。因此,你可以说这篇文章会帮助你睡得更好–跳过去读一读这篇文章–它既快又有用。

>> Step filtering: Skip certain packages while debugging in Eclipse

Very short post about filtering out packages when debugging in Eclipse. If you have ever stepped through a deep call stack with 10 proxies patting each other on the back – then this is a useful hack to cut out the noise.

关于在Eclipse中调试时过滤掉软件包的非常简短的帖子。如果你曾经穿过一个有10个代理互相拍打的深层调用堆栈–那么这就是一个有用的黑客,可以切断噪音

>> SpringOne2GX 2013 Replay: Virtualizing and Tuning Large Scale Java Platforms

Haven’t had the time to look at this one (it’s on my view list for this weekend) but it looked quite interesting.

还没有时间看这个(它在我本周末的浏览清单上),但它看起来相当有趣。

Let’s end the section with a slew of Spring releases that have seen the light of day this week:

让我们以本周见光的一系列Spring发行的产品来结束本节。

I don’t think the Spring team likes to sleep.

我认为Spring的团队不喜欢睡觉。

2. Technical

2.技术

>> The simple scalability equation

Good reminder of basic queuing theory, with an eye how it applies to a connection pool. Read it with pen and paper (yeah, paper).

很好地提醒了基本队列理论,并注意到它如何应用于连接池。用笔和纸(是的,纸)来阅读它。

>> mapping the api landscape

An interesting analogy between the self driving car and your REST API – both need metadata and lots of it.

在自动驾驶汽车和你的REST API之间有一个有趣的类比–两者都需要元数据和大量的元数据。

3. Musings

3.思索

>> How TDD Affects My Designs

A look into how TDD actually affects design, and how, ultimately – TDD is just a tool that you leverage, and you shouldn’t let it replace your good judgement.

看看TDD实际上是如何影响设计的,以及最终–TDD只是你利用的一个工具,你不应该让它取代你的良好判断。

For me, this article is so much useful than the usual high level spiel about TDD driving design. Does it? Sure – but that’s far to abstract to use when you start coding. Looking at exactly how TDD may affect your designs and the nuanced decisions and considerations you have to make while shaping your code – now that’s useful.

对我来说,这篇文章比通常的关于TDD驱动设计的高谈阔论有用多了。是这样吗?当然–但是当你开始编码的时候,这就太抽象了。准确地看一下TDD如何影响你的设计以及你在塑造你的代码时必须做出的细微的决定和考虑–现在这很有用。

Also – very nice to see that I’m not crazy for using events and that TDD may indeed lead to an emphasis on events in your design, like it does for me.

另外–非常高兴看到我并不为使用事件而疯狂,而且TDD确实可能导致在你的设计中强调事件,就像它对我一样。

>> Algorithmic Music Influenced by Tweets

Fun experiment in machine learning and sound – this is a cool app that actually makes musing out of your own twitter stream. For me – the sentiment analysis part is especially interesting.

机器学习和声音方面的有趣实验–这是一个很酷的应用程序,它实际上是在你自己的twitter流中进行思考。对我来说–情感分析的部分特别有趣。

>> How to Use a Code Review to Execute Someone’s Soul

I’ve been in my fair share of grueling code reviews – so it’s not that hard to identify with the story here. It is worth pointing out that, while it may read negative, it’s just a good chance to grow up a bit and make the next code review count.

我也曾参加过令人沮丧的代码审查–所以要认同这里的故事并不难。值得指出的是,虽然它可能读起来很消极,但这只是一个很好的机会,让我们成长一点,让下一次的代码审查更有意义。

>> Is TDD Dead?

The main page for all the TDD Hangouts that have been making the rounds lately. Video and audio recordings and a link to the next scheduled one.

最近,所有的TDD Hangouts的主页面都在循环播放。视频和音频记录以及下一次预定的链接。