RSS feed [root] /design /weblog



title search:


Thu May 23 22:45:24 HKT 2019


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

Tue Mar 18 01:25:24 HKT 2008 From /weblog/design/exception

Handle exception at event

To prevent no one notice there is problem

What the code is trying to do is make sure is that any exception thrown is brought to the attention of the user. I’ve been looking at a few approaches to help catch and handle these exceptions without the developer having to explicitly catch them at the UI level.
You can create your own EventQueue, and have it catch uncaught exceptions when dispatching methods[..]2004/07/21/catching-uncaught-exceptions/

(google search) (amazon search)

Fri Dec 14 12:03:17 HKT 2007 From /weblog/design


Show a design of how to write a map that store data at disk and do sorting -

User friendly sort , "100" should be sort after "10" -

(google search) (amazon search)

Wed Dec 12 18:38:08 HKT 2007 From /weblog/design


2007 summary, include discussion about distributed, dsl, arhitecture, XP, ... and many others -

(google search) (amazon search)

Tue Dec 11 17:50:05 HKT 2007 From /weblog/design


Discussion about search and replace for a lot of files -

(google search) (amazon search)

Thu Dec 06 16:34:42 HKT 2007 From /weblog/design


TDD reporting system

Only introduce framework when it is needed -
Process of improving -
Introduce reflection -

(google search) (amazon search)

Sat Dec 01 16:18:17 HKT 2007 From /weblog/design

convention over configuration

Make it is easier for user to working with your API / framework -[..]uration&sourceid=opera&ie=utf-8&oe=utf-8

(google search) (amazon search)

Wed Nov 21 14:20:13 HKT 2007 From /weblog/design


Try not to have boolean at the interface -[..]Ruiz/entry/boolean_arguments_can_be_evil

(google search) (amazon search)

Tue Nov 13 16:06:21 HKT 2007 From /weblog/design/concurrency


A few example of writing non-blocking thread safe method, mostly using the concept of Idempotency[..]readerwriter-in-java-in-nonblocking.html[..]works/java/library/j-jtp04186/index.html

Not exactly related, some project about non-blocking IO

(google search) (amazon search)

Sun Nov 11 23:32:58 HKT 2007 From /weblog/design/interview

Martin Fowler interview

The discussion of "Flexibility and Complexity" and "Flexible versus Reusable" answer my long question of how to have flexibility code with simple design.

Another interview -

(google search) (amazon search)

Sun Nov 11 23:30:06 HKT 2007 From /weblog/design

starting point

Where do you start your design? UI? flow? Data? This is a very interesting discussion about this

I think most likely start with UI is better, because it probably representing domain closer

(google search) (amazon search)

Fri Nov 09 19:06:25 HKT 2007 From /weblog/design


some common pitfall of code reuse -

(google search) (amazon search)

Thu Sep 13 02:01:25 HKT 2007 From /weblog/design/concurrency

Transactional memory

Someone say the basic idea behind transactional memory is that memory is shared by all the threads in a read-only manner. Threads modify data by "committing" objects to shared memory. If a thread commits on top of a dirty object then it has to "rollback" and retry.[..]007/2007-08-13_transactional_memory.html

(google search) (amazon search)

Fri Aug 24 13:33:09 HKT 2007 From /weblog/design


Discussion of dynamic and static typing:[..]orks/java/library/j-cb05236.html?ca=drs-

There are always arguement of having compilataion checking is good (safe) or bad (tedious), here is an example showing compilation checking is good -

Another discussion -[..]gly-typed-languages-considered-dangerous

Reference information of types -

(google search) (amazon search)

Wed Aug 22 00:57:24 HKT 2007 From /weblog/design/pattern


Survey about how people feel about design pattern -

(google search) (amazon search)

Fri Aug 10 01:59:30 HKT 2007 From /weblog/design/interview

Erich Gamma

Erich Gamma: A pattern is always a problem-solution pair that can be applied in a particular context. Although the solutions might look similar in different patterns, the problems they are solving are different. In fact from ten thousand meters most patterns solve a problem by adding a level of indirection. What is interesting is how this indirection comes about and in particular why it needs to happen.
Therefore if you just look at the solution to the problem, it isn't that enlightening and everything starts to look the same. When we wrote design patterns we often had this feeling??hey all started to look like the Strategy pattern.

(google search) (amazon search)

Thu Aug 02 00:30:11 HKT 2007 From /weblog/design

flow condition

i wonder if it makes sense to refactor from this:

public void someMethod(SomeClass someObject) {
if(someObject != null){
do something ...
to this:
public void someMethod(SomeClass someObject) {
if(someObject == null) return;
do something ...

The other discussion about flow control presentation -

(google search) (amazon search)

Thu Jul 12 19:35:52 HKT 2007 From /weblog/design/IoC

spring discussion

Discuss the problem of using springs framework, it mainly complaint about the complication of spring, I will think people know what they are using, if it is too complex, just pick other

Another discussion complaint about spring -[..]_id=46041&asrc=EM_NLN_1757981&uid=703565

Some counter opinions to those complaints -

(google search) (amazon search)

Thu Jul 12 16:20:21 HKT 2007 From /weblog/design/exception

anti-pattern of exception

Mostly agree, however, why do we need NoSuchMethodException? Why we don't just don't implement that method? If this is required by the interface, why we implement an interface but not complete the contact?[..]/06/exception-handling-antipatterns.html[..]06/exception-handling-anti-patterns.html

(google search) (amazon search)

Thu Jul 12 14:24:34 HKT 2007 From /weblog/design

Object attributes

About getter and setter -

Discussion of hashcode and equal of collections -[..]11/why-no-equals-and-gethashcode-in.html

A blog discuss the problem of getter / setter -[..]rise?entry=the_case_against_the_property

(google search) (amazon search)

Thu Jun 14 01:14:39 HKT 2007 From /weblog/design/exception

check or uncheck

Checked or unchecked? Not sure, seen all exception is unchecked are ok for me

To summarize Java orthodoxy: checked exceptions should be the norm. Runtime exceptions indicateprogramming errors.
I used to subscribe to this view. However, after writing and working with thousands of catch blocks, I've come to the conclusion that this appealing theory doesn't always work in practice. I'm not alone. Since developing my own ideas on the subject, I've noticed that Bruce Eckel, author of the classic book Thinking in Java, has also changed his mind. Eckel now advocates the use of runtime exceptions as the norm, and wonders whether checked exceptions should be dropped from Java as a failed experiment

Other discussion of checked or unchecked -[..]2007/05/removing-java-checked-exceptions

(google search) (amazon search)

Thu May 03 15:09:00 HKT 2007 From /weblog/design


An useful discussion about that balancing config and coding

(google search) (amazon search)

Sun Apr 15 19:26:55 HKT 2007 From /weblog/design/interview

Interview of Netbean developers

Interview of netbean developers, I feel this is a lot more promotion than sharing of technology. However, these still valuable -[..]ree_interviews_with_language_programmers

(google search) (amazon search)

Thu Mar 01 15:26:27 HKT 2007 From /weblog/design

How to format parameter

Some will think boolean is ugly as parameter, I think if there is more than one boolean in parameter list -

(google search) (amazon search)