Java on Docker will no longer suck: improvements coming in Java 10



Java on Docker will no longer suck: improvements coming in Java 10

Docker has been a really popular technology over the last few years and it's easy to see why. Containerising JVM-based applications offers consistent environments for development and deployment and proper isolation between applications when deployed. Unfortunately the JVM doesn't currently make running inside of a Linux container the easiest of affairs. Java 9 & 10 finally bring a host of much needed improvements, here are our top three.


Read full article from Java on Docker will no longer suck: improvements coming in Java 10


Google Cloud Platform - The Good, Bad, and Ugly (It's Mostly Good) - Deps



Google Cloud Platform - The Good, Bad, and Ugly (It's Mostly Good) - Deps

Deps is a private, hosted, Maven repository. While building it I had a critical decision to make - Where to host it? I evaluated many different hosting services but decided on Google Cloud Platform (GCP). I've been using it in pre-production and then production for over a year and a half now. I haven't seen too many experience reports on Google Cloud, so I wanted to share how I've found it, what went well, and what still needs improving. I've split my thoughts below into good, meh, bad, ugly, and opportunities for improvement. I have compared and contrasted with Amazon Web Services (AWS), the other hosting provider that I have the most experience with, and GCP's biggest competitor.

A note up front, these are solely my experiences, and it's quite possible that I've misunderstood or misrepresented things here. If I've made any mistakes, let me know so I can correct them. I only talk about services that I have experience using. There are a bunch of really good looking services like Google Kubernetes Engine, Google App Engine, and BigQuery, but I haven't used them enough (or at all) to be able to give a review on them.


Read full article from Google Cloud Platform - The Good, Bad, and Ugly (It's Mostly Good) - Deps


6 Git Aha Moments | Henrik Warne's blog



6 Git Aha Moments | Henrik Warne's blog

5. You can start over if a merge fails. When I used svn, I often used –dry-run to see what would happen if I did a certain operation (but without actually doing it). In git, I took me a while to realize that the same functionality exists, but it is not defined explicitly. For example, if I merge some changes, and I mess up resolving the merge conflicts, I can simply go back one step and do it again. As long as I did not push to the server, it is no problem to go back by doing a "git reset –hard HEAD~". Now I can simply do the merge again, and hopefully resolve the conflicts correctly this time. It is very liberating to know that almost anything I do with git can be easily reverted, undone or redone.


Read full article from 6 Git Aha Moments | Henrik Warne's blog


If you're not writing tests first you're missing out



If you're not writing tests first you're missing out

Most of us developers write unit tests. Only a percentage though writes them before the production code, before the code they're meant to test.

If you are not writing tests first you are missing out on a number of benefits.

Prevent false positives

If you write your tests after the production code is completed you will only see them pass. If they pass on the first run, how do you know they would fail if the code was wrong?

When writing tests before implementation you start with a failing test, and then you write just enough code to make it pass. This gives you confidence in the ability of your test to fail if the behaviour it's asserting will change in the future.


Read full article from If you're not writing tests first you're missing out


高效开发运维



高效开发运维

在构建 Docker 容器时,应该尽量想办法获得体积更小的镜像,因为传输和部署体积较小的镜像速度更快。

在构建 Docker 容器时,应该尽量想办法获得体积更小的镜像,因为传输和部署体积较小的镜像速度更快。

RUN语句总是会创建一个新层,而且在生成镜像之前还需要使用很多中间文件,在这种情况下,该如何获得体积更小的镜像呢?


Read full article from 高效开发运维


JWT究竟是什么呢? | KiwenLau



JWT究竟是什么呢? | KiwenLau

JWT(JSON Web Token)究竟是什么呢?它有什么用?这篇文章将为你揭开谜底。

首先,我们不妨看一下IETF(Internet Engineering Task Force)对JWT的权威定义

JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.

啊!什么鬼?! 水平有限,这样的定义我就不翻译了…

简单地说,JWT是一个字符串,我们在发起网络请求时,将其放在header或者url中,这样可以保证传递的数据被篡改时能被我们发现,保证安全性。

示例xxxxx.yyyyy.zzzzz即为JWT:

http://www.example.com/private/?token=xxxxx.yyyyy.zzzzz

小伙伴应该注意到了,JWT由3部分组成,使用两个点区分。如下:

header.payload.signature


Read full article from JWT究竟是什么呢? | KiwenLau


web学习社



web学习社

对于开发者来说,"设计模式"这个概念肯定不陌生,它是经过分类的、代码设计经验的总结,能将编写代码进行工程化,从而提升开发效率。
简单地理解,它就是"代码模板"。

设计模式 + 代码逻辑 => 清晰高效的程序

"写作模式"这个叫法也借鉴于此,是我针对一些热门技术文章的写作方式进行的总结,能帮我们快速地构思出结构清晰的文章。


Read full article from web学习社


AtomicReference, a sometimes easier alternative to synchronized blocks



AtomicReference, a sometimes easier alternative to synchronized blocks

Brian Goetz lists AtomicReference in his the book Java Concurrency in Practice in the in the section advanced topics. Yet we will see that AtomicReference are, for specific use cases, easier to use than synchronized blocks. And the new JDK 8 getAndUpdate and updateAndGet methods make AtomicReference, even more, easier to use.


Read full article from AtomicReference, a sometimes easier alternative to synchronized blocks


Either Bugs or Pull Requests ... or You Are Out



Either Bugs or Pull Requests ... or You Are Out

There is only one metric on our projects, which separates good programmers from bad ones: the amount of money they are making. You can make money contributing to the project either by 1) reporting bugs (when you see problems) or 2) submitting pull requests (when you don't see problems).


Read full article from Either Bugs or Pull Requests ... or You Are Out


Where are unsaved files stored - support - Atom Discussion



Where are unsaved files stored - support - Atom Discussion

They're stored in one of two places:

The old way was to store them in ~/.atom/storage but we recently redid how package data was serialized on exit for performance reasons, so now things should be stored in IndexedDB. You may still have an ~/.atom/storage directory if you've been using Atom for a while even though new stuff should end up in IndexedDB.


Read full article from Where are unsaved files stored - support - Atom Discussion


Searching in forks - User Documentation



Searching in forks - User Documentation

To show forks in repository search results, add fork:true or fork:only to your query.

Forks are only indexed for code search when they have more stars than the parent repository. You will not be able to search the code in a fork that has less stars than its parent. To show forks with more stars than the parent repository in code search results, add fork:true or fork:only to your query.


Read full article from Searching in forks - User Documentation


java - Apache HttpClient Interim Error: NoHttpResponseException - Stack Overflow



java - Apache HttpClient Interim Error: NoHttpResponseException - Stack Overflow

Most likely persistent connections that are kept alive by the connection manager become stale. That is, the target server shuts down the connection on its end without HttpClient being able to react to that event, while the connection is being idle, thus rendering the connection half-closed or 'stale'. Usually this is not a problem. HttpClient employs several techniques to verify connection validity upon its lease from the pool. Even if the stale connection check is disabled and a stale connection is used to transmit a request message the request execution usually fails in the write operation with SocketException and gets automatically retried. However under some circumstances the write operation can terminate without an exception and the subsequent read operation returns -1 (end of stream). In this case HttpClient has no other choice but to assume the request succeeded but the server failed to respond most likely due to an unexpected error on the server side.


Read full article from java - Apache HttpClient Interim Error: NoHttpResponseException - Stack Overflow


Service mesh data plane vs. control plane – Envoy Proxy



Service mesh data plane vs. control plane – Envoy Proxy

As the idea of the "service mesh" has become increasingly popular over the last two years and as the number of entrants into the space has swelled, I have seen a commensurate increase in confusion among the overall tech community around how to compare and contrast the different players.


Read full article from Service mesh data plane vs. control plane – Envoy Proxy


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