Archive for July, 2007

??

Monday, July 9th, 2007 -- By ET


??????????????599??????????849??????????849?????????299??????????299??????????299?????????????740???????????????????????

?????????,??,?????????,????????????????,???,????,?????.??????,???????????????,?????????599,?24??????718,?????????849,?????????299,??????50??740(699)?.

????19???????????????????,????????????????????,?”????”???,????????,??,??,??????????,??????????????????????.???????????????,???????,????,??????????????.

???????

???????????????????????????,????????,??c???,?????.????????????????????????????,?????????????????????1-5??????c???.

???,????????????????????c??????,??????????????,?3????????,????????????????????????.

?????:?????????.????????????????,?????????????.

???:?????????.

???:?????.?????????????.?????????????????????????,????????????????,?????????????.

???:?????????.??????????,????.

???:?????????.

????:????????????????,?????????????,?????????????????????.

?????????

?,????????????

???????????????????????599??????????????849.

1,????????????599

???????????????????????.?????????.?????57???????????,??????????,??????,??,???????????.?????58~79?.58??70????????,??????????????,???????????????????.71?~79?????????????????.??????,??????,???,????,?????.?????????????????????????,????,??,????????.?????80????,???????,????,???,????????????????,;?????????,????????,????,????.

2,????????????139

???599???849?????.139???????599??,?????599???????.?599?50???????*??.

3,????24?????????718

????????????,?????,???,???,?????,?????????,???????,??????????????,??????.

4,????160??????????821

????????????,???????,????????????????.?????8??,????????,???????????,???????????.

5,?????????37(???”????”)

???50?,????.????????????,??????.????????????????????.

6,??????????25??100,???18??109

??????????????,????,????,??????,?????,?????????.?599?50????,????????100???.??109??????100?,?????.???????849?????.

7,???????????849

?599?849??????????????????.849?30?,??????????????.????????????????,?????”??”??.849?599,139???????????????,??849?????,????????,???????????,???????????.

My Perl IDE

Monday, July 9th, 2007 -- By ET

snap1.jpg

 

I wanted to write “The Best Perl IDE” on the title, but on a second thought, I have decided not. There are so many good ones out there, why would this be the best? Anyway, I think it is the best for me. It is extremely compact, but fits my need. Beauty is simplicity.

It is called SciTe. The one I’m using has only one file. Only 500KB. You can type in the code on the left panel, and the result will be shown on the right panel.

More information can be found here.

SciTE currently is able to syntax style these languages (* denotes support for folding):

  • Ada
  • ANS.1 MIB definition files*
  • APDL
  • Assembler (NASM, MASM)
  • AutoIt*
  • Avenue*
  • Batch files (MS-DOS)
  • Baan*
  • Bash*
  • BlitzBasic*
  • Bullant*
  • C/C++/C#*
  • Clarion*
  • conf (Apache)*
  • CSound*
  • CSS*
  • diff files*
  • E-Script*
  • Eiffel*
  • Erlang*
  • Flagship (Clipper / XBase)*
  • Flash (ActionScript)*
  • Fortran*
  • Forth*
  • Haskell
  • HTML*
  • HTML with embedded JavaScript, VBScript, PHP and ASP*
  • Gui4Cli*
  • IDL – both MSIDL and XPIDL*
  • INI, properties* and similar
  • InnoSetup*
  • Java*
  • JavaScript*
  • LISP*
  • LOT*
  • Lout*
  • Lua*
  • Make
  • Matlab*
  • Metapost
  • MMIXAL
  • MSSQL
  • nnCron
  • NSIS*
  • Objective Caml*
  • Opal
  • Octave*
  • Pascal/Delphi*
  • Perl, most of it except for some ambiguous cases*
  • PostScript*
  • POV-Ray*
  • PowerBasic*
  • PureBasic*
  • Python*
  • Rebol*
  • Ruby*
  • Scheme*
  • scriptol*
  • Specman E*
  • Spice
  • Smalltalk
  • SQL and PLSQL
  • TADS3*
  • TeX and LaTeX
  • Tcl/Tk*
  • VB and VBScript*
  • Verilog*
  • VHDL*
  • XML*
  • YAML*

Mathematics and Poetry

Saturday, July 7th, 2007 -- By ET

… mathematics is very much like poetry … what makes a good poem – a great poem – is that there is a large amount of thought expressed in very few words.
In this sense formulas like

 e^{\pi i}+1=0[/tex] or</p>
<p>\int_{-\infty}^{\infty}{e^{-x^2}dx}=\sqrt{\pi} [/tex]

are poems.

–Lipman Bers

Human Robot

Friday, July 6th, 2007 -- By ET

China is said to have crouching tigers and hidden dragons. This farmer created a human robot. Just wait to watch till the end of the clip. It is really amazing.

YouTube Preview Image

Some comments from YouTube:

” Absolutely genius!”" This clip made me cry, what a genius!!!”

“Someone tell Mr Woo to put his rickshaw robot onto ebay…he’d make a fortune – guaranteed!”

“He should have a grant at MIT……”

“that’s amazing and amusing at the same time. My daughter wants that mini robot rickshaw, let’s help him to sell on ebay so his wife would stop complainning about him”

“Wow… it’s really hard for me to believe that he could make these robots without knowing anything about mechanics/electronics …he probably taught himself through books and stuff. 0__oa”

” wow this man deserves to be hired by a big company. that is how new inovative ideas come from. a man with a dream.”

Course Evaluation

Thursday, July 5th, 2007 -- By ET

The course evaluation is out. I like the fact that the students liked it

I put down the averages and standard deviations for my Section, and compare them with the average scores of the school as well as with those of the University.

My friend Jiayin’s research shows that for high scores, a smaller standard deviation is a good thing. Given that the scores are high in general, many of the small Std. Dev. values show that the students consistently thinks that I am a good professor.

Overall

Mean

Std. Dev.

Section

78.2

19.2

School

73.8

23.6

University

74.5

22.8

Preparation

Mean

Std. Dev.

Section

81.5

18.7

School

76.3

22

University

76.3

21.2

Explaining concepts

Mean

Std. Dev.

Section

73.3

23.6

School

71.6

24.7

University

72.5

23.8

Making the Course interesting

Mean

Std. Dev.

Section

77.7

22.7

School

68.6

26.8

University

69.2

25.8

Enthusiasm

Mean

Std. Dev.

Section

79.9

20.1

School

75.5

22.6

University

75.4

22.2

Encouraging students to participate, to ask questions, to express ideas, etc.

Mean

Std. Dev.

Section

73.8

20.3

School

72

23.7

University

71.8

23.2

Improving your ability to think

Mean

Std. Dev.

Section

67.6

22.0

School

68.3

24.3

University

68.9

23.7

Apparent knowledge of the subject

Mean

Std. Dev.

Section

80.3

18.4

School

79.3

21.1

University

78.9

20.7

Attitude towards students

Mean

Std. Dev.

Section

80.6

18.9

School

76.1

22.1

University

76.3

21.8

Use of English

Mean

Std. Dev.

Section

80.9

17.0

School

74.8

23.6

University

74.2

23.2

Fairness of grading

Mean

Std. Dev.

Section

71.8

19.9

School

69.7

22.4

University

70.8

21.9

Speed in returning graded work

Mean

Std. Dev.

Section

71.4

17.9

School

71.3

22.1

University

71.1

21.8

Availability outside class

Mean

Std. Dev.

Section

74.9

18.4

School

70.4

21.9

University

71.6

21.5

Kind

he is knowledgable

He makes the class very interesting
He encorages interaction in class!!

have good knowledge of the course

really very kind. always willing to help students. try to make the course interesting

use many video clips
conduct surveys to get the opinions of students for improvemnt
polite

He really knows a lot.

He always emphasizes we should have fun in this course, making students more relaxed.

His lessons are interesting. He is capable of obtaining students’ attention.

Nice and enthusiastic

The professor have try very hard to preparing lecture materials. The video show in the lecture is also very interesting.

he is very patient to explain the concepts to us and he tires hard to make the class interesting. very good!

He really tries to make this course fun and easy.

detail explaination

Michael is very willing to help the students and he successefully teach us a lot of things. Also, he is willing to listen to the student’s opinion and continuously improve the quality of education.

He is very interesting

he is nice

willing to help students

He makes the lesson become more interesting and funny

Excellant, very nice and helpful

he is well-prepared and encourage participation. I enjoy the music

he encourages us to think more in-depth for all problems

he makes the class to be fun

very nice

He prepares very good and funny video clips.

Take care of his students

good attitude towards students
good english
interesting materials eg videos

He’s enthusiastic in answering students’ questions, as well as fast respond to students. He always shows us interesting videos and he’s really knowlegable in the area of ISMT101

nice guy

He is patient and well-prepared.

nice, good English, sincere, modest, good attitude

Patient and clear delivery

he is nice and is willling to answer every question we ask.

nice and encourage students to speak ,hv interaction wf students,and interesting content

caring and try to make the lesson more interesting

care about students

his effort in makin the class enjoyable shown

very enthusiastic, prepare a lot before lectures, regular evaluation

willing to teach the students

nice

understand our needs

He is kind and sincere towards students.

he has a nice personality that appeals to the students

ok

welcome students asking him questions

The instructor with good preparation .

passion

very good and fluent english, prepare a lot for class, interesting

funny and nice

Nice to students.

teach with good manners and preparation

Michael is the BEST!!!!

Prof Zhang is a very nice person.

answered mails quickly and in details

very willing to answer student’s question and always encourage studets to ask question !!

He is nice and prepares interesting videos in the class.

English is good and nice to us

Handsome and nice!

he is vy helpful, answer any thing we ask

flexible

makes the course interesting by using videos

he is enthusiastic about the course.
He also give extra information which is useful and interesting.

kind

I like this course very much!!!

Should have less extra credit

Nil; Thanks so much, Prof.

the course is boring.

>< nice teacher

he’s a good teacher with great enthusiasm~

it’s very hard for students who haven’t studied Computer Application/ Computer Studies before. So the course should be made easier.

cover less materials

I may want to take IS as my major in Yr2 mainly due to the influence of Michael~

I enjoy attending the lecture!!!!!
Because you teach really well!!!
making the course very interesting!!!

Enrollment

Thursday, July 5th, 2007 -- By ET

Dr. Percy Dias Just came to my office and told me about the enrollment for IS majors. We had 105 students this year, a big increase from last year’s 40 something. Our total capacity is about 110, so this can’t really get any better. This is excellent news to me and probably so to the other two professors of ISMT101.

Due to enrollment issues, we had various resource problems in the past few years. Without a better mechanism, the government and the school simply allocate resources according to student head counts. Now this issue is gone. James and Percy can have good sleeps, and I shall be foreseeably happily left along to do my research for the next 7 months.

To the students, I guess they are making a good and informed (“informed” because of our hard work in teaching) choice. If you ask me to choose from Accounting, Marketing, IT, Finance, Management and Strategy, Economics to find the most useful major in a business school, I would probably tell you that combining IT and Finance, or IT and Marketing are the best choices.

I really spent huge amount of time on this course and tried to make it useful and fun. I guess the hard work just paid off.

My folder for this course grew to more than 6GB, filled with all sorts of materials I planned to use in classes. Now I can’t even fit everything on a DVD for archiving. Anyway, I enjoyed teaching so far, and the students should have enjoyed my course. That’s all what matters.

Bibtex Entry Extractor/Subsetter

Wednesday, July 4th, 2007 -- By ET

Suppose you have a LaTeX file (e.g. latexfile.tex) with some BibTeX entries (in the form of \citet{zhang2007,dellarocas2006}, etc). Suppose these entries can be found in a huge bibtex file (e.g. references.bib) that includes more than 1000 bibtex entries.

When you are done with the LaTeX file, you want to send out the paper to a journal. One way is to include this “references.bib” file with the latexfile.tex file. However, it is very difficult for the editors of the journal to use your huge file. It would be ideal if there could be a program to extract the right subset of references from the references.bib file and create a specific bibtex file for your article (latexfile.tex).

This is a real issue to me, since my co-author Feng Zhu started to manage all his references in one big file. Of course it is relatively small to carry this file around, however, when I have multiple collaborators, this will be a serious issue. I can not just copy all the references to another co-author, and if all people are doing the same thing, the reference bibtex file would be so large and extremely hard to keep in-sync among collaborators.

So I wrote the following program in PERL. Here is the introduction from the file:

FLIE: EXTRACTBIB.PLaa.gif
(Rename the file to extractbib.pl after downloading)

Version: 1.0

Description:
This program traverses all citations in one latex file (e.g. latexfile.tex), then go to a big bibtex file (e.g. references.bib) and extract only those papers that appear in the latex file, and outputs a new bibtex file (e.g. latexfile.bib) with the subset of papers that appear in the tex file.

One way to use it is to manage all the references in one big file (online, or offline), when a paper is finished, the author can run this program to get a small bibtex file so that this small file can be sent to a journal.

I guess this is often needed, however, I have not found a good solution so far. So here is mine. It is fairly complicated to address different cases. I’ll try to update it when I find a need. If you have any suggestions, please let me know.

Xiaoquan (Michael) Zhang
Assistant Professor, Hong Kong University of Science and Technology
July 04, 2007

zhangxiaoquan (a) gmail.com

Usage: perl extractbib.pl latexfile.tex references.bib [output.bib]
latexfile.tex is the original tex file
references.bib is the bibtex file containing all the references
output.bib contains the subset of references appear in the tex file
(If the output filename “output.bib” is omitted, the program will
generate a bibtex file with name: latexfile.tex)

Download the file (extractbib.pl) Here…
(Rename the file to extractbib.pl after downloading)

P.S.

After posting this, I thought about some ideas to improve this.

  1. The easiest way is to implement a web interface for this program. I can do two possible things:
    1. post two “text areas” for people to copy and paste latex article and the bibtex file. I can return the result to a new text box.
    2. post two tabs for people to “Browse” and upload the files, and return the result to a text box as well as to a link to the bibtex file.
  2. Feng Zhu suggested writing a macro for WinEDT. I can foresee this to be very popular, but I don’t have time for that. Besides, I’m not a big fan of WinEDT. I use Bakoma and LyX more often.

Austin posted the following program that extracts bibtex entries from the aux file. (bibsubset.pl)

Update (2011-01-07):

Vincent Guillet (Vincent.Guillet {a} ias.u-psud.fr) sent me a modified version of my program, I’ve updated the link so it points to the new version now. The three corrections are:
- erase [xx][xxx] after \cite, which makes the code go wrong when } are inside [] like in : \citep[$\d n(a) \propto a^{-3.5}\,\d a$,][]{MRN77}

- allow “^},” in the bib file without signifying the end of the reference

- suppress @ character in bib output file which make my bibtex nervous …


BlogTimer
You are visitor number several since September 1, 2001

Copyright Xiaoquan (Michael) Zhang, 2004-2010. All rights reserved.
All trademarks property of their owners.