RSS feed [root] /weblog /java




login:

password:

title search:




 


Wed Jun 23 23:53:07 AEST 2021

java



(google search) (amazon search)
second
download zip of files only

Mon Feb 11 14:47:44 AEDT 2013 From /weblog/java/discussion

idea of improving java language


These look interesting, worth to take a look:

1) Auto null checking: http://www.jroller.com[..]ebourne?entry=adding_auto_null_checks_to
I don't think this is a good idea as I don't think there is a way can handle default object reference more generic then NULL. However, I would like to have a way to customize NULL behaviour (or default NULL object). Say, for String, I will think empty string ("") is same as NULL. Thus, I would like to have define something like:

public final class Strinig {
null {
return "";
}
// the rest of string implementation
}

Then the default reference of String, rather than point to NULL, now it point to an empty String.

2) Add closure to Java: http://www.jroller.com[..]ebourne?entry=adding_closures_to_java_or
Not much comment, it is something nice to have but I don't think really add a lot of value, just like java5 foreach loop.

3) Auto casting: http://jroller.com[..]lebourne?entry=adding_auto_casts_to_java
I guess generic already does this?

Of course, there are still some other problem on some people's mind, like:
http://www.onlamp.com/lpt/a/3691
http://nice.sourceforge.net/safety.html

On the other hand, somebody don't like to change java language as it probably make your code less portable. http://www.eclipsezone.com/eclipse/forums/t54318.html

4) Some idea of useful util language - http://closingbraces.net/2007/03/05/strangelets/

5) API for adding feature - http://www.theserverside.com[..]s?track=NL-461&ad=636686&thread_id=49035

A lot more other idea - http://blog.jooq.org/2013/02/04/java-if-this-were-a-better-world/

Drop extends - http://www.javaworld.com[..]at-if-java-8-dropped-extends.html?page=2

(google search) (amazon search)


Sat Jan 05 16:18:39 AEDT 2013 From /weblog/java/performance

synchronization


An example about improving performance by replace synchronized with volatile - http://hg.openjdk.java.net/jdk8/tl/jdk/rev/fecba6a8b78e

Log4j can have deadlock due to performance - http://javaeesupportpatterns.blogspot.com.au[..]09/log4j-thread-deadlock-case-study.html

There is always some cost for synchronization - http://vanillajava.blogspot.com.au[..]-synchronization-be-optimisede-away.html

(google search) (amazon search)


Tue Jan 01 13:18:52 AEDT 2013 From /weblog/java/features

image analysis


Using OpenCV to detect palm - http://www.javaadvent.com[..]d-and-finger-detection-using-javacv.html

(google search) (amazon search)


Wed Dec 26 00:14:19 AEDT 2012 From /weblog/java/discussion

default


Use annotation for default data, rather than hard code it - http://blog.joda.org/2012/12/annotating-jdk-default-data.html

(google search) (amazon search)


Sat Dec 22 18:10:39 AEDT 2012 From /weblog/java/annotation

fundamental


http://www.journaldev.com[..]ion-example-and-parsing-using-reflection

(google search) (amazon search)


Tue Nov 20 02:17:47 AEDT 2012 From /weblog/java/fundamental

equals


Mutable cause issue - http://www.artima.com/lejava/articles/equality.html

Very detail discussion about implementing equals - http://www.angelikalanger.com[..]avaSolutions/SecretsOfEquals/Equals.html http://www.angelikalanger.com[..]aSolutions/SecretsOfEquals/Equals-2.html

Example of implement and TEST equals - http://blog.springfuse.com[..]ng-various-equals-and-hashcode_3597.html

Consistent of equals and compareTo - http://blog.joda.org[..]/pitfalls-of-consistent-with-equals.html

(google search) (amazon search)


Tue Oct 02 22:31:57 AEST 2012 From /weblog/java/string

stringbuffer


In core libraries like StringBuffer we should prefer the lesser evil of code duplication to the loss of performance. - http://old.nabble.com[..]lder%7D-are-inconsistent-td34479926.html

(google search) (amazon search)


Thu Sep 27 00:53:25 AEST 2012 From /weblog/java/features

Unicode


How to Normalize Unicode in java:
http://java.sun.com/javase/6/docs/api/java/text/Normalizer.html
http://unicode.org/faq/normalization.html
http://en.wikipedia.org/wiki/Unicode_normalization

How to use text collator in java - http://errorken.blogspot.com/2011/03/javatextcollator.html

Make the string look like same but not equals - http://vanillajava.blogspot.com.au/2012/09/hidden-code.html

(google search) (amazon search)


Wed Sep 12 00:21:17 AEST 2012 From /weblog/java/hacks

Intrinsics


How JVM optimzate the code by understanding the intentional of programmer - http://bad-concurrency.blogspot.com.au[..]/arithmetic-overflow-and-intrinsics.html

(google search) (amazon search)


Sat Aug 18 11:19:36 AEST 2012 From /weblog/java/features

package


http://www.javacodegeeks.com/2012/05/about-java-packages.html

http://johannesbrodwall.com[..]ames-transformed-my-system-architecture/

(google search) (amazon search)


Fri Jun 08 02:56:58 AEST 2012 From /weblog/java/concurrency

Actor


Collections from IBM - http://www.ibm.com[..]rworks/training/kp/j-kp-actorconcurrency

(google search) (amazon search)


Fri Jun 08 02:50:22 AEST 2012 From /weblog/java/features

preference


A dirty issue from Java Perference API


java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:715)
at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:807)
at com.macquarie.st.adapter.rda.STServer.preparePrefs(STServer.java:501)
at com.macquarie.st.adapter.rda.STServer.start(STServer.java:120)
at com.macquarie.st.commons.core.runtime.STMain.start(STMain.java:170)
at com.macquarie.st.commons.core.runtime.STMain.main(STMain.java:50)

(google search) (amazon search)


Sun May 13 02:21:50 AEST 2012 From /weblog/java/features

maths


Compare between StrictMatch, Math and apache FastMath - http://blog.juma.me.uk[..]rformance-of-fastmath-from-commons-math/

A round bug in Java fixed in Java7, nice reading - http://www.javacodegeeks.com[..]mathround0499999999999999917-rounds.html

(google search) (amazon search)


Thu Apr 19 01:22:31 AEST 2012 From /weblog/java/discussion

tuning


Discussion about reducing latency - http://mechanical-sympathy.blogspot.co.uk[..]n-with-my-channels-nirvana-and-azul.html

(google search) (amazon search)


Fri Mar 02 01:38:45 AEDT 2012 From /weblog/java/fundamental

threaddump


The process of how to solve problem using thread dump is nice - http://www.cubrid.org[..]atform/how-to-analyze-java-thread-dumps/

(google search) (amazon search)


Sat Feb 25 03:23:44 AEDT 2012 From /weblog/java/eclipse

pair


ECF provide some support about this area - http://wiki.eclipse.org/DocShare_Plugin

Saros - http://www.saros-project.org/

(google search) (amazon search)


Tue Feb 21 03:38:28 AEDT 2012 From /weblog/java

tracing


Story of how the trace the bottleneck and how how method inline help - http://www.javacodegeeks.com[..]ava-7-how-to-write-really-fast-java.html

(google search) (amazon search)


Sun Nov 13 05:37:44 AEDT 2011 From /weblog/java/concurrency

Join


Example of Join - http://cnapagoda.blogspot.com/2010/01/thread-join-method.html

(google search) (amazon search)


Sat Nov 12 13:22:50 AEDT 2011 From /weblog/java/features

tools


Trouble shooting guide, introduct few tools help to check issues - http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

(google search) (amazon search)


Sun Oct 30 05:36:47 AEDT 2011 From /weblog/java/hacks

cracking java


"hi there".equals("cheers !") == true
This is because in the JDK 1.3 SUN is caching the hash code so if it once is calculated, it doesn't get recalculated, so if the value field changes, the hashcode stays the same.

http://www.artima.com/forums/flat.jsp?forum=106&thread=4864

How to Modifying an Application without Modifying Its Source Code, with {-Xbootclasspath/p:} - http://www.ddj.com[..]M4OQSNDLPCKH0CJUNN2JVN?_requestid=186396

Override string! - http://www.javacodegeeks.com/2011/10/weird-funny-java.html

(google search) (amazon search)


Sun Oct 30 05:36:23 AEDT 2011 From /weblog/java/fundamental

static


Loading and unloading static fields, unlocd the class - http://www.javacodegeeks.com[..]0/java-secret-loading-and-unloading.html

(google search) (amazon search)


Tue Oct 04 03:14:14 AEDT 2011 From /weblog/java/libraries

ehcache


Cache by size - http://scaleaholic.blogspot.com[..]easy-java-performance-tuning-manage.html

(google search) (amazon search)


Sun Sep 25 11:35:12 AEST 2011 From /weblog/java/concurrency

yield


Yield is not that reliable- http://www.azulsystems.com[..]-pair-of-somebody-elses-concurrency-bugs

(google search) (amazon search)


Mon Sep 19 02:41:52 AEST 2011 From /weblog/java/features

realtime


Develop with real-time Java, Create applications with predictable response times - http://www.ibm.com[..]/training/kp/j-kp-rtj/index.html?ca=drs-

(google search) (amazon search)


Sun Aug 28 21:58:48 AEST 2011 From /weblog/java/concurrency

monitoring


Sample code of try-sync


import sun.misc.*;

import java.lang.reflect.*;

public class MonitorUtils {
private static Unsafe unsafe = getUnsafe();

public static boolean trySynchronize(Object monitor) {
return unsafe.tryMonitorEnter(monitor);
}

public static void unsynchronize(Object monitor) {
unsafe.monitorExit(monitor);
}

private static Unsafe getUnsafe() {
try {
for (Field field : Unsafe.class.getDeclaredFields()) {
if (Modifier.isStatic(field.getModifiers())) {
if (field.getType() == Unsafe.class) {
field.setAccessible(true);
return (Unsafe) field.get(null);
}
}
}
throw new IllegalStateException("Unsafe field not found");
} catch (Exception e) {
throw new IllegalStateException(
"Could not initialize unsafe", e);
}
}
}


http://www.javaspecialists.eu/archive/Issue194.html

(google search) (amazon search)