Saturday, October 07, 2006

A good source tree

A good source tree:
  • Has a root-level README file.
  • Contains all compile-time dependencies.
    • With versions noted.
    • With originations and licenses noted.
    • With transitive dependencies noted.
  • Can be compiled and linked easily.
    • With one command.
    • Without a network connection.
  • Can be unit + integration tested easily.
    • With one command.
    • Without a network connection.

Tuesday, October 03, 2006

Hardly coding

URGENT ASSISTANCE!!!

HELP I CAN"T COMPILE>>> ERROR!!

[checkstyle] C:\work\mptstore\trunk\src\java\org\nsdl\mptstore\query\
provider\TriplePatternSQLProvider.java:35:45: '3' is a magic number.

I EVEN TRIED INSTRUCTIONS ON HOW TO PROGRAMMER??

http://secretgeek.net/howtobeaprogrammer.asp

SO I SERCH GOOGLE LIKE A GOOD PROGRAMMER AND FOUND THE ANSER:

http://www.youtube.com/watch?v=yPzAjiLr5Zw

BUT HOW TO I PASTE VIDEO I"M USING ECLIPSE??

THANK YOU!!!

Wednesday, August 02, 2006

Reducing Firefox Memory Consumption

Firefox uses incredible amounts of memory. Some of this is caused by various undiagnosed memory leaks. Looking around on the net, I found a few things that can help, short of restarting all the time:

  1. Make sure you have the latest version (currently 1.5.0.5)

  2. Enter about:config in the address bar.

  3. Right click, add Boolean: config.trim_on_minimize (true)

  4. Right click, add Integer: browser.cache.memory.capacity (32768)

  5. Restart Firefox.

  6. If things get sluggish, minimize the window and restore it.



Using a tool like CachemanXP can quickly show how well the "trim_on_minimize" setting is working.

Tuesday, June 27, 2006

DTP Model

The X/Open DTP Model is a widely-supported standard that defines components and interfaces useful for dealing with distributed transactions.

In this model, the application uses a transaction manager to help carry out a global transaction. The app communicates with the transaction manager via the TX interface, which provides the transaction semantics (begin/commit/rollback/etc).

Each data store involved in a global transaction is exposed to the transaction manager as a resource manager. The communication takes place over the XA interface, which defines functions for lower-level transaction semantics. The transaction manager uses the XA interface to carry out two-phase commits, and the resource manager uses it to dynamically enlist specific resources in the transaction.

References:
Nuts and Bolts of Transaction Processing, by Subbu Allamaraju, subbu.org
Global Transactions - X/Open XA - Resource Managers, by Donald A. Marsh, Jr., Aurora Information Systems, Inc.

Saturday, May 06, 2006

Java coding style

Here's the style I prefer these days.
package org.example.myproject;

import java.io.IOException;
import java.util.Map;

import org.apache.log4j.Logger;

import org.example.myproject.util.MyUtil;

/**
* This class does several things.
*
* @author name@domain.com
*/
public class MyClass {

public static final String PUB = "a";

private static final String PRIV = "b";

private String _name;

private String _description;

/**
* Construct a new MyClass.
*/
public MyClass(String name, String description) {
_name = name;
_description = description;
}

}


Thursday, May 04, 2006

Writing a search engine

I just remembered this story...

Back in '96, I was part of a small team working on the HP support website. We had just started to look at incorporating a search engine and had hired Verity to integrate their search software with our site.

One afternoon, Jim, the project manager for search, invited a few of us to attend a Verity training session. I was really curious about how these search engine things worked, so I was happy to attend.

Derrick, the consultant, had given us a nice introduction to inverted indexes and stopwords, and I was intrigued. Ten minutes in, I stopped listening and started typing. Shortly afterward, Jim noticed I wasn't being as attentive as the others. He came over and asked me what I was up to.

"Oh, I'm writing a search engine in Perl"

Poor Jim.