Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- API docs



  Java SynchronizedList and Iterator

While reading some material about concurrency, I come up with some writing about using SynchronizedList wrap about normal List to enable synchronization.   But one interesting thing is http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29   It says     It is imperative that the user manually synchronize on the returned list when iterating over it:     1   List list = Collections.synchronizedList(new A...

       2015-12-03 03:04:08

  ConcurrentHashMap vs Collections.synchronizedMap()

ConcurrentHashMap and Collections.synchronizedMap() both provide thread-safe operations of collections of data. They are used in multithreaded programs to provide both thread safety and performance improvements. In many cases, we can use either of them. But the realization of thread safety is different for these two implementations. ConcurrentHashMap will create an HashEntry[] array internally to store the elements passed in from a Map, while Collections.synchronizedMap() will return a Synchroni...

   ConcurrentHashMap,Collections.synchronizedMap     2014-09-18 05:04:59

  Google releases Analytics real time API

According to Tech Crunch, Google finally released its Analytics real time API. Although this feature was launched two years ago, there was no convenient way for webmasters to adjust the data so that they can be viewed properly. Now developers can use the API to get what they want and utilize these data to do what they want to. Developers need to apply for using the API now. Once you get access to this API, then you can search your own real time data and utilize these data as you want to. For ex...

   Google Analytics,API,Real time     2013-08-02 00:05:56

  Designing Great API Docs

Writing documentation is one of those things that is dreaded by many developers. It takes a lot of effort and time to get right. And too often, people take shortcuts. This is sad, because well designed documentation is the key to getting people excited about your project, whether it's open source or a developer focused product. In fact, I argue that the most important piece of UX for a developer product isn't the homepage or the sign up process or the SDK download. It's the API documentati...

   API docs,Design API docs,Advice     2012-03-09 23:15:00

  Basic Mistakes Developers Make When Creating APIs

Today, there are many tools that developers can use to create an API, meaning that some of them can come up with an API within a matter of minutes. However, there is a vast difference between just creating an API and building one that meets all your expectations, is reliable and secure. Some developers create APIs that work well but forget some basic things that, within no time, bring a lot of issues to the API users. In this article, we are going to talk about the basic mistakes that developers...

   API,API DESIGN,RESTFUL API     2020-08-19 07:54:03

  The several flavors of random in Java

Random number generation is one of most basic features in any programming language. The basic utilization is always the same: generate a random number between 0 and 1. With such a simple resource at hand we sometimes overlook some interesting features. What do we learn from the books? The most obvious and maybe intuitive way to generate random numbers in Java is simply calling: java.lang.Math.random() Random generation is in the Math utility class with abs, pow, floor...

   Java,Random,Thread,Math,Type     2012-03-22 14:17:44

  5 Mistakes Developers Should Avoid before Launching Their API

Time is money in the API industry, and everyone wants to be timely for the API’s milestone event: its eventual launch. Delays in this event can be very costly, so the sooner the API can be integrated, the better. Many developers start their work knowing quite well that the clock is ticking. But prioritizing a quick launch—at the cost of everything else—can do a lot of damage in the long run. A rushed launch may result in unstable integration, a host of errors and bugs, lower en...

   TIPS,API DESIGN     2020-05-18 07:08:22

  Different types of keystore in Java -- DKS

Domain KeyStore(DKS) is a keystore of keystore. It abstracts a collection of keystores that are presented as a single logical keystore. Itself is actually not a keystore. This new keystore type is introduced in Java 8. There is a new class DomainLoadStoreParameter which closely relates to DKS. To load different keystores into the single logical keystore, some configuration is needed. Here is the format of the configuration for grouping different keystores. domain [ ...] { keystore [ ....

   Java,keystore,DKS,tutorial     2015-01-20 02:27:27

  Access control in Java -- Permission check order

Previously we showed you how to turn on SecurityManager in Java. After SecurityManager is turned on, a series of permission checks will be applied on the code you are calling in your application to protect some resources against malicious access such as files, sockets etc. To perform these permission checks, a set of Permissions will be created and checked using the AccessController. The AccessController has three purposes : To decide whether an access to a critical system resource is to be all...

   JAVA,SECURITY,ACCESSCONTROLLER     2016-03-07 04:17:40

  Arrays.equals() vs MessageDigest.isEqual()

Both Arrays.equals() and MessageDigest.isEqual() are used to compare the equality of two arrays. They can be interchangeably in many cases. However, they do have some differences which lead to different use cases in real applications. One difference is that the arrays passed to MessageDigest.isEqual() cannot be null while it's ok for Arrays.equals(). The one major difference between these two methods is that Arrays.equals() is not time-constant while MessageDigest.isEqual() is time-constant. Thi...

   Arrays.equal(),MessageDigest.isEqual(),Java,Security     2015-05-14 22:03:29