Wesner Moise

Interview

Wesner Moise's profile photo
Wesner Moise
unread,
Mar 19, 1994, 3:24:20 PM
to

Hello, I am the originator of the thread and have just completed
my interview session at Microsoft. The Microserfs were apparently
impressed with me and called me to offer me a job at Microsoft
the very next day, Friday.

WHAT I DID?
-----------
I had interviewed with two product groups--Microsoft Excel and
Microsoft Project for several hours each. I was actually hoping
to interview with one operating systems and one applications group
instead of two applications group, so I could get my hands on Chicago
and Cairo. I also got a chance to speak to someone from Advance Technologies
about secret new developments at Microsoft--unfortunately, I cannot
reveal the information under penalty of death.

INTERVIEW QUESTIONS
===================
A number of you asked me to mail you replies. Also, some other people
offered my sample questions directly.

====================================================================
Questions That I Received at Microsoft
--------------------------------------
The solutions are in C++, so they may not compile under C.

** Reverse a link list
Easy. Took me less than a minute.
This must be a common problem. Since many people mentioned
this as a typical Microsoft problem.

Node *reverse(Node *list)
{
    Node *newlist=0;
    while(list)
    {
        Node *tmp= list;
        list = list->next;
        tmp->next = newlist;
        newlist = tmp;
    }
    return newlist;
}

** Count the number of bits in an int
This involved a classic trick. I generated to solutions. A
constant time solution using a small table and a bit-hack
solution.

int bitcount(int v)
{
    for(int count=0; v; count++, v &= ~(v-1));
    return count;
}

int table[] = {0,1,1,2,1,2,2,3, 1,2,2,3,2,3,3,4 };
#define bc(x) table[(x)&0xf ] // maps nibbles to number of bits

int bitcount(int v)
{
    // assume 16 bit int
    return bc(x) + bc(x>>4) + bc(x>>8) + bc(x>>12);
}

** Remove all elements with a given value from a list
The interviewer was actually impressed that I used
pointers to pointers, that I coded it in a couple
minutes, and that my code was compact and elegant.
Most interviewers don't use pointers to pointers.

void remove(Node **node, int v)
{
    while (*node) {
        if ((*node)->value = v) {
            Node *tmp = *node;
            *node = (*node)->next;
            free(tmp);
        } else 
            node = &(*node)->next;
    }
}

** Insert a number into a linked list in ascending order
The interviewer was again impressed with my speed. Before I had
written my solution, I had to erase a previous attempt at the same
problem on the board by the interviewee before me. His attempt
was 3 times larger than my solution and contained unnecessary variables
like backptr and did not handle special cases. My code was complete
from the start.

void insert(Node **node, int v)
{
    Node *tmp = (Node *)malloc(sizeof(Node));
    while(*node && (*node)->value>v) node = &(*node)->next;
    tmp->value = v;
    tmp->next = *node;
    *node = tmp;
}

** Write a binary search algorithm.
In a few minutes, I generated this solution. The interviewer was
astonished and said that this problem usually takes the entire
hour for a typical interviewee to answer correctly. In addition,
his/her code is usually incorrect, incomplete, or non-terminating
for some inputs.

int binsearch(int t[], int v, int imin, int imax)
{
    while (imax>=imin)
    {
        int imid = (max+min)/2;
        if (t[imid]==v) return imid;
        if (t[imid]>v) imax=imid-1; else imin=imid+1;
    }
    return -1;
}

** The Macintosh is missing SetPixel. Rewrite it.
Trivial.

void SetPixel(char *base, int rowbytes, int x, int y)
{
    *(base + rowbytes*y + (x>>3)) |= 1 << (7-(x&7));
}

After I solved it in less than a minute, I was told to
write an SetRange that would set whole bytes at a time not bits.
This took me five minutes.

void SetRange(char *base, int rowbytes, int x1, int x2, int y)
{
    char *line = base + rowbytes*y;
    char *b1 = line + (x1>>3);
    char *b2 = line + (x2>>3);

    // unsigned is used to force logical shifts, not arithmetic shifts
    int mask1 = (unsigned)0xff >> (7-(x1&7));
    int mask2 = (unsigned)0xff << (7-(x2&7));
    for (char *i = b1+1; i<b2; i++) *i++ |= 0xff;
    if (b1==b2) *b1 |= mask1 & mask2;
    else { *b1 |= mask1; *b2 |= mask2; }
}

** Rewrite an infix expression in postfix and prefix.
** Benefits of using a hash table

** Suppose that are two jars of liquid, one containing blue liquid
and the other containing red liquid. If you remove a unit of liquid
from the blue jar and place it into the red jar. The remove a unit
from a now impure red jar and place it into the blue jar. Which
jar has more of the liquid of its own color.

Answer: They are both equal. If the jars can hold K units and the
blue jar contains b units of blue, then it contains K-b units of red.
So, the red must contain K-(K-b) units of red or b units of red. QED.

There were many other questions that I cannot remember of hand.
===================================================================

I decided to see how smart the Microsoft employees were, so I asked
them a random question on my mind. How to swap variables using only
one statement and no additional variables. (2 solutions) He was
able to guess that it was an exclusive or trick, but could not
derive it.

SOLUTION 1: a ^= b ^= a ^= b;
SOLUTION 2: a ^= b, b ^= a, a ^= b;

======================================================================

Questions that Other Newsreaders sent me
----------------------------------------

Some silly questions.
--------------------
** Estimate the total amount of astro turf needed to cover all the
baseball diamonds in the country.

** Estimate the total # of gas stations in the country.
1,876,243

** Why is a manhole cover round?
Too Easy.

** How would you make the Windows 3.1 SDK even more cryptic
and unusable?
I would add Hungarian notation. Oh, that has been done
already.

** Design a door lock mechanism for a truck.

Math Questions
--------------
** Derive a closed-form expression for the nth fibonacci number.
I don't know what the answer is. But I do know that
fibonacci sequence f(n) grows like (golden ratio)^n.
I don't think there is a closed form, does anyone?

Programming Questions
---------------------
** Code (in pseudocode) the unix 'tr' function.

** Traverse a binary tree w/o recursion or an explicit stack.
The way to do this is modify the left-right pointers in the
tree structure during the traversal.

** Write some simple string-processing functions for 16-bit international
char sets (trickier than you 1st think)[sic].
Not that tricky. Just use short * instead of char *.

** Reverse the elements in a linked list.
-- I actually received this question. (See above)

** Open a file and read every word that contains an 'a'.

int main()
{
    int count = 0;
    char data[256];
    FILE *f = fopen("file.txt", "r");

    if (f) while (scanf("%s", data)) count += tolower(*data)=='a';
    printf("%d words beginning with a\n", count);
}

** Implement strrev() in C
This handles all special cases (odd,even,zero) elegantly.

char *strrev(char *str)
{
    if (str) {
        char *s=str, *e = s + strlen(s);
        while(s<e) { char tmp=*--e; *e=*s; *s++=tmp; }
    }
    return str;
}

=================================================================

Wesner Moise
(mo...@husc.harvard.edu)
Soon To Be: wes...@microsoft.com



Henry G. Baker's profile photo
Henry G. Baker
unread,
Mar 21, 1994, 12:33:38 AM
to
In article <MOISE.94M...@scws10.harvard.edu> mo...@scws10.harvard.edu (Wesner Moise) writes:
>Hello, I am the originator of the thread and have just completed
>my interview session at Microsoft.
[the following are his Microsoft interview questions]

>** Reverse a link list

(reverse <list>) ; oops, wrong language. :-)

>** Count the number of bits in an int

(logcount <integer>) ; damn that prefix notation! :-)

>** Remove all elements with a given value from a list

(remove <item> <list>) ; stop that!! :-)

>** Insert a number into a linked list in ascending order

>** Write a binary search algorithm.

>** The Macintosh is missing SetPixel. Rewrite it.

>** Rewrite an infix expression in postfix and prefix.
>** Benefits of using a hash table

>There were many other questions that I cannot remember of hand.

>** Derive a closed-form expression for the nth fibonacci number.

Look it up in Knuth, v.I. Fn = (p^n - (1-p)^n)/sqrt(5), where p=(1+sqrt(5))/2.
Or more succinctly, Fn=round((p^n)/sqrt(5)). '^' here means exponentiation.

>** Code (in pseudocode) the unix 'tr' function.
>** Traverse a binary tree w/o recursion or an explicit stack.

>** Write some simple string-processing functions for 16-bit international

>** Open a file and read every word that contains an 'a'.

>** Implement strrev() in C

>Wesner Moise
>(mo...@husc.harvard.edu)

Not to knock your future employer (who dropped out of Harvard, I
understand), but I think that these questions explain a lot about
Microsoft software. People are so busy bit-twiddling and reinventing
the wheel, that they have very little time to worry about important
things, like the overall structure of the system. Why is it that
Windows takes 10-20X more code than that Mac to accomplish the same
task? It isn't the fact that they use three page programs to reverse
lists, but the fact that they don't use an organized system of
standard functions. This explains why it is that an entire shelffull
of documentation still doesn't answer the simplest questions about
Windows.

Given your bent and obvious talent, you should be rewriting the entire
set of Windows libraries, but I bet that that won't happen. (You
notice that they wanted you for the _applications_ groups, not the
group that does the OS itself.) They know that their code is
terrible, the customers know it's terrible, but compatibility requires
that all of these precious flaws be preserved for all posterity.
Microsoft software proves that there's never enough money or time to
do it right the first time, but there's hundreds of times as much
money to make sure it continues to do the wrong thing forever more.
Who said that 100,000 monkeys with typewriters couldn't compose
Shakespeare? :-)

Henry Baker
hba...@netcom.com

Paul Kennedy's profile photo
Paul Kennedy
unread,
Mar 21, 1994, 2:45:52 AM
to
In article 94Mar1...@scws10.harvard.edu, mo...@scws10.harvard.edu (Wesner Moise) writes:
>
>Hello, I am the originator of the thread and have just completed
>my interview session at Microsoft. The Microserfs were apparently
>impressed with me and called me to offer me a job at Microsoft
>the very next day, Friday.
>====================================================================


>Questions That I Received at Microsoft
>--------------------------------------
>

>** Reverse a link list
> Easy. Took me less than a minute.

[ (Good) Code Deleted ... ]

>** Remove all elements with a given value from a list
> The interviewer was actually impressed that I used
> pointers to pointers, that I coded it in a couple
> minutes, and that my code was compact and elegant.
> Most interviewers don't use pointers to pointers.

[ (Good) Code Deleted ... ]

>** Insert a number into a linked list in ascending order
> The interviewer was again impressed with my speed. Before I had
> written my solution, I had to erase a previous attempt at the same
> problem on the board by the interviewee before me. His attempt
> was 3 times larger than my solution and contained unnecessary variables
> like backptr and did not handle special cases. My code was complete
> from the start.

[ (Good) Code Deleted ... ]

>** Write a binary search algorithm.
> In a few minutes, I generated this solution. The interviewer was
> astonished and said that this problem usually takes the entire
> hour for a typical interviewee to answer correctly. In addition,
> his/her code is usually incorrect, incomplete, or non-terminating
> for some inputs.

[ (Good) Code Deleted ... ]

>** The Macintosh is missing SetPixel. Rewrite it.
> Trivial.

>After I solved it in less than a minute, I was told to


>write an SetRange that would set whole bytes at a time not bits.
>This took me five minutes.

[ (Good) Code Deleted ... ]

I'm impressed with your coding, but I think you've still
got to work a little on the humility thing :-)

>Wesner Moise
>(mo...@husc.harvard.edu)
>Soon To Be: wes...@microsoft.com

+-------------------------------------------------------------------+
| Dr Paul Kennedy - Paul.K...@zh014.ubs.ubs.ch ? |
| Union Bank of Switzerland, ~~~ |
| Bahnhofstrasse 45, 8021 Zurich, Switzerland ( . . ) |
+------------------------------------------------------ooO-(_)-Ooo--+

sl...@cc.usu.edu's profile photo
sl...@cc.usu.edu
unread,
Mar 22, 1994, 1:56:09 PM
to
In article <2mn2r...@suntan.hi.com>, rog...@suntan.hi.com (Andrew Rogers) writes:
> In article <1994Mar22.1...@sydrd15.tplrd.tpl.oz.au> char...@tplrd.tpl.oz.au (Charlie Brady) writes:
>>
>>In article <MOISE.94M...@scws10.harvard.edu>, mo...@scws10.harvard.edu \
>>(Wesner Moise) writes:
>> [ a lot about his own self-importance....]
>>
>>Who else spotted a fairly basic mistake in his code?
>
Well its fairly obvious why MS seems to produce such maintainable code. Seems
that they reward fairly cryptic code with logic errors embedded in it. Without
mentioning things like if (a = v) <-- argh, all that unnecessary pointer to
pointer stuff will basiclly doom execution on a RISC machine. I doubt many
compilers can optimize out all those loads.

Dave Dunn


Andrew Rogers's profile photo
Andrew Rogers
unread,
Mar 22, 1994, 3:05:30 PM
to
In article <2mn7km...@suntan.hi.com> rog...@suntan.hi.com (Andrew Rogers) writes:
>And, upon closer inspection, I'm convinced that his "remove()" function is
>compact, elegant, and wrong. (I'll be charitable and dismiss the "=" instead
>of "==" in the comparison as a typo.)
I misread the source - upon closer examination, it looks like it should work
as written (correcting, of course, the "="/"==" typo). My apologies.

Andrew

Anatoly Pritikin's profile photo
Anatoly Pritikin
unread,
Mar 22, 1994, 6:26:03 PM
to
by the way the next code:
int bitcount(int v)
{
    for(int count=0; v; count++, v &= ~(v-1));
    return count;
}

is not going to work. Poor Microsoft, sorry poor we having this kind of the
code in the Microsoft's operating systems.

Huayong Yang's profile photo
Huayong Yang
unread,
Mar 23, 1994, 12:12:37 AM
to
In article <AP.94Mar...@valhalla.eecs.nwu.edu>,
Anatoly Pritikin <a...@eecs.nwu.edu> wrote:
[commenting on the code by someone else:]

>by the way the next code:
>
>int bitcount(int v)
>{
> for(int count=0; v; count++, v &= ~(v-1));
> return count;
>}
I don't understand why he chose v &= ~(v-1), isn't v = v>>1 more
straight forward? Or did I misunderstand the question?

-- Huayong

Dan Pop's profile photo
Dan Pop
unread,
Mar 23, 1994, 4:50:57 AM
to
Well, it will work if you remove the '~' operator. Apparently, its
author has learned it by heart and failed to remember it properly :-)

Dan
--
Dan Pop
CERN, CN Division
Email: dan...@cernapo.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland

Lawrence Kirby's profile photo
Lawrence Kirby
unread,
Mar 23, 1994, 3:54:29 PM
to
In article <2moj45...@twain.ucs.umass.edu>
ya...@titan.ucs.umass.edu "Huayong Yang" writes:
Using v >>= 1 would return the position of the highest order 1 bit in v.
What the original was trying (and failing) to do was count the number of 1
bits. It would have worked with v &= v-1. This expression clears the
lowest order 1 bit in v (although it is safer to perform bit manipulations
on unsigned types).

-----------------------------------------
Lawrence Kirby | fr...@genesis.demon.co.uk
Wilts, England | 7073...@compuserve.com
-----------------------------------------

Matt Beal's profile photo
Matt Beal
unread,
Mar 23, 1994, 4:29:51 PM
to
Anatoly Pritikin (a...@eecs.nwu.edu) wrote:
: by the way the next code:
Maybe I'm just setting myself up for a You're-So-Stupid-Shut-Up-And-Stop-
Posting-Flame, but if I think you could just do:

int bitcount(int v)
{
    return sizeof(v)*8;
}

or even easier:

#define INTSIZE sizeof(int)*8

to find out the number of bits in an integer. Since sizeof returns the size
of the data type in bytes, and 8 bits per byte...voila.

I'm not sure if the latter (sizeof of a basic data type) works on all systems,
or if this is even a desireable (or standard) way of doing things, but it
seems to be a lot better, namely because the preprocessor can resolve the
#define at compile time and not have to generate any code at all.

But then again, maybe I'm wrong :)

-Matt

David M. Kristol's profile photo
David M. Kristol
unread,
Mar 23, 1994, 5:35:26 PM
to
Actually, I think that may be a bug. (Consider what happens if v == 1.)

v &= (v-1) removes the right-most 1-bit. So, the loop only requires as
many iterations as there are 1-bits. Using right shifting, the number
of iterations depends on the position of the highest-order bit,
independent of how many bits are 1.

Right shifting also has the potential flaw that, on a machine that fills
right shifts with the (high-order) sign bit, if the initial value of v
were negative, the loop would never terminate.

Dave Kristol

Huayong Yang's profile photo
Huayong Yang
unread,
Mar 23, 1994, 6:04:01 PM
to
In article <1994Mar23.1...@dxcern.cern.ch>,
Dan Pop <dan...@cernapo.cern.ch> wrote:

>In <2moj45...@twain.ucs.umass.edu> ya...@twain.ucs.umass.edu (Huayong Yang) writes:
>
>>>int bitcount(int v)
>>>{
>>> for(int count=0; v; count++, v &= ~(v-1));
>>> return count;
>>>}
>>
>>I don't understand why he chose v &= ~(v-1), isn't v = v>>1 more
>>straight forward? Or did I misunderstand the question?
>>
>v = v>>1, aka v >>= 1 is completely inappropriate when counting the 1
>bits in the above quoted loop, because it will produce wrong results
>almost always. It will work only for numbers of the form 0...01...1 and
>it will fail for any number containing interspersed 0's and 1's.
>
OK, I misunderstood the "bitcount". Thanks for clarifying this.
v &= v-1 is an elegant way to do this.

-- Huayong

Robert A. Shaw's profile photo
Robert A. Shaw
unread,
Mar 31, 1994, 11:24:01 AM
to
In article <2mn2r...@suntan.hi.com>, rog...@suntan.hi.com (Andrew Rogers) writes:
> In article <1994Mar22.1...@sydrd15.tplrd.tpl.oz.au> char...@tplrd.tpl.oz.au (Charlie Brady) writes:
> >
> >In article <MOISE.94M...@scws10.harvard.edu>, mo...@scws10.harvard.edu \
> >(Wesner Moise) writes:
> > [ a lot about his own self-importance....]
> >
> >Who else spotted a fairly basic mistake in his code?
>
> Well, I noticed a few:
>
> some undeclared variables in the binary search, although those are
> really just a typo
>
> the v &= ~(v-1) expression in the "count the bits" loop never
> terminates for some initial values of v (try 1)
>
> the array lookup solution for "count the bits" assumes that int is
> 16 bits, and will lose badly on a real computer, where it's
> typically 32
>
> Which one did you have in mind?
>
> Andrew
I'm glad I wasn't the only one who noticed the tremendous amount
of self-congratulatory b.s. in Mr. Moise's post. More importantly,
it seems that Mr. Moise and his fellow micro-shit employees are far more
concerned with a bunch of smart-ass bit twiddling tricks than with producing
systems (operating systems, open systems, development environments, middleware,
...) of any value to anyone in the real world. It appears that they are
so self-absorbed in their own cleverness that they can't create anything
worthwhile. So goes micro-shit!
--
Robert Shaw rs...@csci.csc.com

Carl Christensen's profile photo
Carl Christensen
unread,
Mar 31, 1994, 12:12:16 PM
to
: ...) of any value to anyone in the real world. It appears that they are
: so self-absorbed in their own cleverness that they can't create anything
: worthwhile. So goes micro-shit!
Well they get it from their Big Daddy Bill. Did you ever see those
ads for Microsoft that made it seem like they were good just by
nature of the fact that Bill owns a customized Porsche and has gobs
of money? That has to be the worst ad ever, but the
marketing genius probably got promoted for fanning Bill's ego.

--
Carl Christensen /~~\_/~\ ,,, For music fun on MS Win
ca...@legendre.biostat.fccc.edu | #=#==========# | download alcomp11.zip
"Curiouser and curiouser!"- LC \__/~\_/ ``` at a popular FTP site!

Vernon Schryver's profile photo
Vernon Schryver
unread,
Mar 31, 1994, 8:48:39 PM
to
In article <CnJEw...@venus.csci.csc.com> rs...@csci.csc.com (Robert A. Shaw) writes:
> ...
>I'm glad I wasn't the only one who noticed the tremendous amount
>of self-congratulatory b.s. in Mr. Moise's post. More importantly,
>it seems that Mr. Moise and his fellow micro-shit employees are far more
>concerned with a bunch of smart-ass bit twiddling tricks than with producing
>systems (operating systems, open systems, development environments, middleware,
>...) of any value to anyone in the real world. It appears that they are
>so self-absorbed in their own cleverness that they can't create anything
>worthwhile. So goes micro-shit!

I've been watching such comments, and trying to hold my tongue, but enough
is a enough. You guys are being far too hard on Mr. Moise, and missing
the problem with the scenario.

Maybe a "programming test" is necessary if you're hiring people fresh out
of school who have never done anything. If Mr. Moise was such a new-grad,
then I think his reported performance was respectible. His pride in his
answers was reasonable and to be expected from a young person. I have no
doubt that he will eventually learn he has less to brag about than he now
thinks he does, and in the mean time he'll do good stuff. (I'm a ceritifed
old fart with 26 years in the business.)

Programming tests are in general stupid and silly. Programming tests
given to any except the most junior candidates for the lowest entry level
jobs show only that the interviewers, not the candidates, have no clues
about the attributes they are seeking.

You need to discover if the candidate can think, not whether the candidate
can remember the canned answers to the silly programming test questions
that can be completed during a 30-minute to 1 hour interview slot, such
as the examples described from Microsoft.

If you, as an interviewer, cannot tell if a candidate knows the difference
between a pointer and an R-value, a linked list from a hash table, or know
how to swap bits without a "programming test", then you cannot tell with
a programming test. Programming tests are more a test of the interviewer
than the candidate. If you find an outfit that wants to give you a
programming test, and you have demonstratable achievements and references,
and you don't enjoy shooting the breeze with fools, you may as well
politely end the interview immediately and not waste any of your more time.
Programming tests not only show that your prospective managers are idiots,
but because programming tests do not select for the necessary attributes,
they show many of your prospective colleagues are idiots or worse, and at
best people with test passing talents.

I've always tried to get candidates to talk about their previous projects,
to get them to describe their goals, problems and solutions. If they know
what they were trying to do, and if they can answer your pointed questions
about how they solved or intended to solve its problems, then they might
be able to think. Anyone who can think can write code. A tape recorder
cannot think but can pass a programming test. As a check to see that they
are not terminally sloppy or only able to talk, you ask them to bring a
samble of their own code. You also ask them to bring some documentation
to see if they know any English.

It's funny that the big, bloated companies that expect programmers to
produce no more than 300 lines/year also expect candidates to write 100
lines of code to answer programing tests during the course of an interview.
Candidates of such outfits do more coding during their interview than
during their first 3 months of employment. They probably write the
cleanest, most bug-free, most readable code of their entire tenure during
such interviews.


Vernon Schryver v...@rhyolite.com

Andrew Rogers's profile photo
Andrew Rogers
unread,
Apr 1, 1994, 6:32:59 AM
to
In article <CnK51...@calcite.rhyolite.com> v...@calcite.rhyolite.com (Vernon Schryver) writes:
>Programming tests are in general stupid and silly. Programming tests
>given to any except the most junior candidates for the lowest entry level
>jobs show only that the interviewers, not the candidates, have no clues
>about the attributes they are seeking.
About four years ago, I interviewed at a now-defunct company where they
forced me to take one of these dumb programming tests. Needless to say, I
aced all the questions (unlike somebody else I could name, I'm not bragging
or showing off - these were *really* trivial questions about basic C syntax
and semantics), after which the interviewer apologized sheepishly (OK, so
I've never actually seen a sheep apologize) but went on to explain that
they had wasted big bucks on high-priced "consultants" who claimed years of
C development experience but couldn't hack "Hello, world!" without one hand
on K&R, and felt it was necessary to weed out the obvious frauds by asking a
few rudimentary questions.

BTW, candidates who passed would be invited back for a second interview,
where they were expected to give two presentations - one prepared, one
extemporaneous! Has anyone else ever heard of *this*??? Or wonder why the
company's defunct? :-)

Andrew

Ross Williams's profile photo
Ross Williams
unread,
Apr 4, 1994, 10:33:47 PM
to
v...@calcite.rhyolite.com (Vernon Schryver) writes:
>In article <CnJEw...@venus.csci.csc.com> rs...@csci.csc.com (Robert A. Shaw) writes:
>>I'm glad I wasn't the only one who noticed the tremendous amount
>>of self-congratulatory b.s. in Mr. Moise's post. More importantly,

>I've been watching such comments, and trying to hold my tongue, but enough


>is a enough. You guys are being far too hard on Mr. Moise, and missing
>the problem with the scenario.

I agree. In a world where most people undervalue themselves and
thereby do not achieve their potential, a bit of chest puffing is
(usually) at most harmless. I don't understand why people get so upset
about it.


>Programming tests are in general stupid and silly. Programming tests
>given to any except the most junior candidates for the lowest entry level
>jobs show only that the interviewers, not the candidates, have no clues
>about the attributes they are seeking.

(!) I visited Microsoft campus in 1992 and was interviewed for a quasi
research position there. I have a Ph.D. in Computer Science (data
compression), but they still gave me a programming test!!!!!!!
Programming prowess seems to be central to the Microsoft culture. I
think that's basically healthy, but it does cause a tendency towards
hackery rather than software engineering. There were many signs of
this there, the one I particularly remember being the way one guy's
eyes lit up when he talked about debugging :-) :-) :-) But there's
other elements at Microsoft too (it's a big place). For example, Steve
Macguire, an ex-Microsoftie, wrote the book "Writing Solid Code".

Certainly they are looking for programming skills, but deep down, as
far as I could tell, what the Microsoft recruiters are looking for
most is people with the light in their eyes --- people with spark. I
talked to perhaps a dozen different people during my interviewing
round and this theme came up implicitly again and again. I suspect
that the programming test they give is more to determine the
candidate's attitude towards programming than the programming skills
themselves, although they would help too. So, in this regard, Mr Moise
sounds like the perfect Microsoft employee :-)

[BTW: I was not. They liked me, but didn't quite know what to do with
me. I was a bit lukewarm about moving from Australia anyway. So in the
end Microsoft and I drifted apart and I ended up being a consultant to
them instead. But I still have fond memories of my visits to the
beautiful campus there and of the interesting people I met with whom I
still stay in touch.]


>samble of their own code. You also ask them to bring some documentation
>to see if they know any English.

I like Dijkstra's approach. I remember reading a while ago that he
considers that the best signal of a good programmer was a mastery of
the English language. Well, I'd moderate this a bit; the litcrit
section of most English departments probably wouldn't make good
software engineers :-), but a mastery of English and a clear, very
logical mind certainly does help.


>It's funny that the big, bloated companies that expect programmers to
>produce no more than 300 lines/year also expect candidates to write 100

Is productivity THAT low out there!

Ross.

+--------------------------------------------------------------+
| Name : Dr Ross N. Williams |
| Company : RockSoft Pty Ltd (Reg TM Australia, TM USA) |
| Net : ro...@guest.adelaide.edu.au. |
| Fax : +61 8 373-4911 24 hours |
| Phone : +61 8 379-9217 24 hours |
| Snail : 16 Lerwick Avenue, Hazelwood Park 5066, Australia |
| Archive : ftp.adelaide.edu.au/pub/compression and /funnelweb |
+--------------------------------------------------------------+

Lars Wirzenius's profile photo
Lars Wirzenius
unread,
Apr 10, 1994, 12:14:58 PM
to
> >eyes lit up when he talked about debugging :-) :-) :-) But there's
> >other elements at Microsoft too (it's a big place). For example, Steve
> >Macguire, an ex-Microsoftie, wrote the book "Writing Solid Code".
>
> Any idea where I can get a copy of this book? Thanks,
From the bookstore, if there are any good ones in your neighbourhood.

Steve Maguire
Writing Solid Code
Microsoft Press, 1993
ISBN 1-55615-551-4

It's a pretty good book, although slightly oriented towards PC's and Macs
(there are a couple of minor errors concerning the C language that are
-- I assume -- inspired by the operating system features of those machines).
The only major problem I have with it is that in one of the major examples
it assumes that all pointers are of the same size and have the same
internal representation. Specifically, it assumes that realloc can
be re-designed as:

int new_realloc(void **, size_t);

such that instead of

if ((temp = realloc(p, n)) == NULL)
abort();
p = temp;

you would write

if (new_realloc(&p, n) == FAIL)
abort();

The point the book makes about designing better interfaces for functions
is good, it is merely the fact that this cannot be done while strictly
obeying the rules of C that is a problem.

--
Lars.Wi...@helsinki.fi (finger wirz...@klaava.helsinki.fi)
My name is Ozymandias, king of kings/Look on my works, ye Mighty, and despair!

Ross Williams's profile photo
Ross Williams
unread,
Apr 11, 1994, 8:31:10 PM
to
sda...@perception.manawatu.gen.nz (Simon Dawson) writes:
>In <ross.76...@wattle.itd.adelaide.edu.au> ro...@wattle.itd.adelaide.edu.au (Ross Williams) writes:
>>v...@calcite.rhyolite.com (Vernon Schryver) writes:

>>eyes lit up when he talked about debugging :-) :-) :-) But there's
>>other elements at Microsoft too (it's a big place). For example, Steve
>>Macguire, an ex-Microsoftie, wrote the book "Writing Solid Code".

>Any idea where I can get a copy of this book? Thanks,

ISBN: 1-55615-551-4
Publisher: Microsoft Press.

Simon Dawson's profile photo
Simon Dawson
unread,
Apr 8, 1994, 9:08:42 PM
to
In <ross.76...@wattle.itd.adelaide.edu.au> ro...@wattle.itd.adelaide.edu.au (Ross Williams) writes:
>v...@calcite.rhyolite.com (Vernon Schryver) writes:
>eyes lit up when he talked about debugging :-) :-) :-) But there's
>other elements at Microsoft too (it's a big place). For example, Steve
>Macguire, an ex-Microsoftie, wrote the book "Writing Solid Code".

Any idea where I can get a copy of this book? Thanks,


Simon

--

sda...@perception.manawatu.gen.nz (Simon Dawson)
----------------------------------------------------------------
Analysing the past. Creating the future. Controlling the present