Thursday, June 28, 2007

Wednesday, June 27, 2007

some more interview questions

1. Consider a linked list where every node has one data field and one next field. The next field is used to point to the following node. You get a pointer to a node in such a list. You are required to delete the node. Please describe how you delete such a node. You are not allowed to change the structure of the nodes.

2. Consider a linked list where every node has one data field and one next field. You need to explain what operation do you need to do in order to be able to traverse such a list from head (a pointer to the first node of the list) to tail (a pointer to the last node of the list) and from tail to head. You are not allowed to change the structure of the nodes.

3. Explain the assembler language that you're familiar with and describe the architecture of the processor this assembler is for.

4. Write a Lex program that copies a file, replacing each non-empty sequence of white space by a single blank

5. Write a Lex program that copies a C program, replacing each instance of the keyword float by double

6. Consider the following C code:

int state;
int **transition_table;/* num_states x alphabeth_size*/
.
.
.
state = transition_table[state][input_char++];
Suggest how to optimize this code.

7. Please give an object oriented description of the data structures required for an implementation of a jigsaw-puzzle game.

8. implement int strcmp(const char *s1, const char *s2); and int strncmp(const char *s1, const char *s2, size_t n); in the assembler language that you are familiar with.

9. Write a grammar (e.g., for YACC) for a calculator that supports the four basic arithmetic operations:
-+*/ and using the round brackets ( and ) for priorities.

10. Write a function void fizz_bazz(char* in, char* out, int l, int skew) that receives two strings, an input string and an output string. The memory for both strings is allocated a-priori and the length of both strings is l. You need to implement the function so that the output string will be as follows:
* every character c in the string in should be shifted skew positions upper or further.
* whenever a character in an odd position in the in array is being processed print fizz
* whenever a character in an even position in the in array is being processed print bazz
* whenever a character in a position that is divisible by 3 in the in array is being processed print boo

so for the following contents in the in array
ABxyz
the expected contents in the out array is
NOklm
and the output on the standard output is expected to be
bazzboofizzbazzfizzboobazz

Tuesday, June 26, 2007

Summer!

The kids playing in a small pool last weekend.


Don't waste your time reading EULA

In the coding horror blog (see:http://www.codinghorror.com/blog/archives/000892.html) I read a nice explanation why it does not make sense to waste your time reading EULAs.

Funny, I had a similar discussion at work with a colleague...

Thursday, June 21, 2007

XML generation tools

Motivation:
Given an XML Schema (not a DTD) -- generate XML instances that are valid against the given schema.
This is very useful in creating tests suites, as it allows production of "positive" examples. For negative example generation, I am not familiar with any available tool other than untidy (which can only cause "not well formed" problems but also gives well formed examples by manipulating rules that give different representation to what is syntactically/semantically the same thing, such as adding/removing whitespaces).

Here is a list of available tools for this task:
* oxygen
* xml spy
* XML-XIG: XML Instance Generator (pronounced XML-ZIG)
* Stylus Studio

Anyone aware of alternative (better) tools?

Monday, June 18, 2007

untidy - XML Fuzzer -- in beta 2

Untidy, and XML fuzzer, is now available in beta 2: http://untidy.sourceforge.net/

State Of The Art -- ACLTwiki -- NLP and CL

From the abstract of the page:

``The purpose of this section of the ACL wiki is to be a repository of k-best state-of-the-art results (i.e. methods and software) for various core natural language processing tasks.
As a side effect, this should hopefully evolve into a knowledge base of standard evaluation methods and datasets for various tasks, as well as encourage more effort into reproducibility of results.
This will help newcomers to a field appreciate what has been done so far and what the main tasks are, and will help keep active researchers informed on fields other than their specific research. The next time you'd need a system for PP attachment, or wonder what is the current state of word sense disambiguation, this will be the place to visit.''

What To See -- NLP and CL readings and a useful tool

Here's the abstract of a useful page I found on the web:

``I have a routine problem that sometimes paper titles are not enough to tell me what papers to read in recent conferences, and I often do not have time to read abstracts fully. This collection of scripts is designed to help alleviate the problem. Essentially, what it will do is compare what papers you like to cite with what new papers are citing. High overlap means the paper is probably relevant to you. Sure there are counter-examples, but overall I have found it useful (eg., it has suggested papers to me that are interesting that I would otherwise have missed). Of course, you should also read through titles since that is a somewhat orthogonal source of information. Here is how to use the system. You upload your personal bibtex file and have the system compare it to a known conference index; it will then present a list of papers, sorted by relevance.''

See: http://www.cs.utah.edu/~hal/WhatToSee/

Saturday, June 16, 2007

Dragon Fly

A few pictures of Dragon Flies that I took today in עין חמד ('ein xemed):



Thursday, June 14, 2007

דוד נסים נפטר

Nissim Sarfatyהערב, נפטר דוד-אמי מצד אביה, נסים צרפתי.

דוד נסים היה אדם נפלא: פעלתן, דעתן ואופטימי, עד לכניסתו המצערת למחלקה סיעודית לפני מספר שבועות.

תמיד אזכור את הסבריו המלומדים, את הצהרותיו הבלתי מתפשרות .

הוא היה משתתף בהפגנות, כותב ומגיב באמצעי התקשורת ובפני חברי-כנסת, שרים ורשויות.

איש שיחה מרתק.

ציוני ואוהב הארץ.

אדם נפלא.

הוא יחסר לי מאד.

יהי זכרו ברוך.




A picture of mine made it to the finals in a "funniest picture" contest

A picture of mine made it to the finals in a "funniest picture" contest. Please vote for me :-)

see: http://www.tapuz.co.il/tapuzforum/main/Viewmsg.asp?forum=149&msgid=100439566