Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

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!!!

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.