La Vita è Bella

Wednesday, April 05, 2006

What about a Error Code Management System?

UPDATED: about the name, according to wine (Wine Is Not an Emulator), I think we can call it sine (Sine Is Not an Error), or even cosine (COSine Is Not an Error). In fact, in Chinese, "cosine" is pronounced as "yuxian", which is very similar to my name "yuxuan" :P

Microsoft had maintained a huge KB of error codes, so if you met some error, you can always look it up in the MSDN by its error code.

For any project, it's important to keep your error codes unambiguous. If -1 means "no such file" in function A, but means "MySQL connection timeout" in function B, that's nightmare.

So what about a Error Code Management System? It maintain the whole error code database, automatically generate the error code header, and automatically generate the document.

It's supposed to be a simple PHP script, use MySQL as database back end, and support cvs/svn commit.

The work process is supposed to be like this:

  1. A programmer need to define a new error code.
  2. He opens the System, input number, macro name, description, etc.
  3. The System checks if the number is already taken. If not, accept the error code.
  4. Add it into database.
  5. Generate new header file, commit it.
  6. Generate the document. Or it may be another system, just read descriptions from database.

As usual, a project name is needed. :P



tags: , ,

18:44:28 by fishy - thought - Permanent Link

2 comments - no trackbacks yet - karma: 44 [+/-]

Tuesday, December 27, 2005

Why we should use open source

The project I'm working on used a 3rd party component, and it's not open source.

QA had found a defect today: in some case my program will hang for a long time. So I added many debug log into the position that may hang, but didn't find the defect.

So I can only add debug log between nearly every statements, and finally, I've found the hung statement: a function to dump some data onto hard disc, from the 3rd party component.

Sometimes, this statement will hang for 5 minutes (no more, no less, just 5 minutes), and then return SUCCESS.

I don't know why it hangs, there's enough spaces, and it has the privilege to write. It seems that 5 minutes is a time-out, but after 5 minutes, it return SUCCESS!

If I have the source of the 3rd party component, maybe I can fix it. But now, I can only leave this defect there, to wait the stupid 5 minutes.

We need open source, seriously.



tags:

00:10:21 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 6 [+/-]

Tuesday, December 13, 2005

Proposol for Thishit

I've bought a Treo 650 half a month ago (photo), but there's no free good-to-use Jabber clients (Chatopus is more or less good, but not perfect, and it's a shareware with $16.95). So I think maybe I can develop a open-source Jabber client for PalmOS.

I'll call it "Thishit" :) , and planning to implement the following features:

  1. Text chat, of course
  2. Gtalk support
  3. Good transports support
  4. Other services support (JUD, conference, etc.)
  5. Message history with offline reading and/or exporting to memo
  6. i18n support
  7. Multi accounts at the same time
  8. SSL support
  9. Background running
  10. Customizable status message
  11. Smileys support, if possible
  12. Avater support, if possible


tags: , , ,

22:54:29 by fishy - thought - Permanent Link

1 comment - no trackbacks yet - karma: 10 [+/-]

Tuesday, August 09, 2005

The power of stdin & stdout

I think we should develop softwares using stdin and stdout for input and output. With stdin and stdout, we'll get the following benefits:

  1. It's easy to port onto other platforms.
  2. It's easy to make GUI shells, and they are absolutely native!
  3. It's easy to make a automatically test and log the test input & outputs.
  4. It's easy to integrate various programs together.

Any more? To be continued :)



tags: , ,

23:58:00 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 6 [+/-]

Friday, July 22, 2005

Brilliant software names

I've just read cathayan's introduction for moving local emails into GMail. In which he'd introduced a software to do that job: gExodus.

The name "gExodus" is brilliant. Under the leadership of Moses, the Hebrew slaves departe from Egypt, this is the Exodus. So our emails can also departe from local mbox, to GMail :)

Another brilliant name is the code-name of Borland Delphi 8: Octane. Octane is the "perfect" organic compound with eight carbons. But unfortunately, Delphi 8 is not perfect :)

Anyway, it's hard to find such a brilliant name for a unnative English speaker, just like me. I'm looking for a name for the next-next version of WinPNP, any good suggestion?



tags: , , ,

00:46:00 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 32 [+/-]

Friday, June 03, 2005

GTK & expat notes

I've just finished my senior project, which is a GTK program to display line chart, pie chart and some raw datas collected from a system status collector. It's part of the SkyEye project. It reads data from a XML document, so it's also used expat as XML parser.

The main reason I chose GTK and expat is that they are both written in plain C and can be used in a plain C program. I don't like C++ much.

Here's some notes.(I'm using GTK 1.x, not GTK 2)



tags: , , ,

22:19:00 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 10 [+/-]

Monday, May 02, 2005

P2P TVs in China

How do you watch TVs(for example, to watch a UEFA Champions League game) if you don't have a TV set? We have the Internet, so it's time for P2P TVs.

BitTorrent is such a revolution. Following its success, there's more and more P2P applications using its algorithm. P2P TVs is such a application: a source server to encode TV signal into some stream media, and all peers to broadcast it.

The first P2P TV I ever know is GridMedia, which is the official partner of CCTV now. But it wasn't a very successful solution. It's buggy, not so stable, and the TV programs are not so well.

In my opinion, the first successful one is CoolStreaming(no website now, cause it's watched by Hong Kong copyright bureau), the related thesis was accepted by IEEE INFOCOM 2005. It's stable, straight, & cross-platform(written in Python).

The best one today may be feidian(which means "boiling point" in Chinese). It's stable(maybe not so stable, but active), fast, optimized for cernet users, and there's a Mac version(not the latest version).

The biggest problem P2P TVs must face is the copyright(maybe the best solution is associate with TV stations). After fixing the problem, it will be a revolution!



tags: , , , , ,

11:07:00 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 12 [+/-]

Tuesday, February 22, 2005

Just remember a program I've wrote

I've wrote a PHP program to verify proxy servers in a MySQL db. It use wget to direct download a webpage, and then use the proxy to download the webpage, and diff them.

So I need 2 temp filename for the 2 downloaded file, I forgot the function &tmpfile&, so I generate 2 random numbers, and use the md5 hashs of the numbers as the filename...



tags: , ,

12:08:00 by fishy - thought - Permanent Link

no comments yet - no trackbacks yet - karma: 15 [+/-]

May the Force be with you. RAmen