Computer Science Canada

microsoft

Author:  bugzpodder [ Wed Nov 17, 2004 11:22 pm ]
Post subject:  microsoft

It doesnt happen everyday when microsoft suddenly emails you about wanting to get an interview without having to ask for one. and i just had one of those days... I will see how things play out tomorrow

Author:  Martin [ Thu Nov 18, 2004 1:28 am ]
Post subject: 

Congratulations. I have an interview tomorrow too, with Four Season Hotels and Resorts.

Author:  zomg [ Thu Nov 18, 2004 7:35 am ]
Post subject: 

they just asked out of the blue?

thats awsome and slightly weird

if u get the job send us a copy of windows longhorn lol Laughing

congrats!

Author:  bugzpodder [ Thu Nov 18, 2004 9:26 am ]
Post subject: 

i'll see if they ask any interesting questions and post it here

Author:  Andy [ Thu Nov 18, 2004 10:35 am ]
Post subject: 

wheres the interview at

Author:  bugzpodder [ Thu Nov 18, 2004 1:00 pm ]
Post subject: 

skool

Author:  wtd [ Thu Nov 18, 2004 2:15 pm ]
Post subject: 

Microsoft has invested heavily in the University of Waterloo, and is known to recruit heavily there.

Good luck selling your soul. Wink

Author:  josh [ Thu Nov 18, 2004 2:22 pm ]
Post subject: 

congrats man, give us the dirt on longhorn!!!!!

Author:  Amailer [ Thu Nov 18, 2004 3:14 pm ]
Post subject: 

wtd wrote:
Microsoft has invested heavily in the University of Waterloo, and is known to recruit heavily there.

Good luck selling your soul. Wink


strange, when PATCHU or w/e his name is (the guy who created MSN +) he said something to that effect "selling his soul when he goes to paris for his interview with M$" apprently M$ was trying to get a deal with him Razz iunno but cool Smile

Author:  bugzpodder [ Thu Nov 18, 2004 4:33 pm ]
Post subject: 

the interview mainly consists of the question: If you have an array of size N, and each element is between 1 and N-1... return a duplicate element

Author:  Andy [ Thu Nov 18, 2004 5:59 pm ]
Post subject: 

any duplicate element?

Author:  bugzpodder [ Thu Nov 18, 2004 6:22 pm ]
Post subject: 

yes

Author:  Andy [ Thu Nov 18, 2004 6:23 pm ]
Post subject: 

o.. thats not hard...

Author:  bugzpodder [ Thu Nov 18, 2004 6:29 pm ]
Post subject: 

Take N=2^32-1
if you find a solution that takes O(1) space and O(N) complexity, give me a howl

Author:  Dan [ Fri Nov 19, 2004 1:23 am ]
Post subject: 

wtd wrote:

Good luck selling your soul. Wink


No kidding i whould work at micdonals b4 i worked for M$. I mean just for what they where/are planing in longhorn u should be scared to even talk to them.

Author:  Martin [ Fri Nov 19, 2004 3:26 am ]
Post subject: 

I'd just quick sort it...

Author:  josh [ Fri Nov 19, 2004 7:51 am ]
Post subject: 

hey a job is still a job, and even if M$ is the devil I would rather get a job with them than with MacDonalds.

I am sure a job at M$ opens up many more opportuneties in the future.

(unless your part of the team whose sole purpose is to filter Mr. Gats's inbox so he doesn' get spam, I read about there really is such a team)

Author:  zomg [ Fri Nov 19, 2004 7:58 am ]
Post subject: 

Hacker Dan wrote:

No kidding i whould work at micdonals b4 i worked for M$. I mean just for what they where/are planing in longhorn u should be scared to even talk to them.



wat are they planning with longhorn thats scary?

i mean, ya M$ really wouldnt be my first choice of employment but ryrstic light is right ajob is a job

Author:  Martin [ Fri Nov 19, 2004 2:35 pm ]
Post subject: 

Microsoft is rated as THE best company to work for. They provide their employees with very competitive salaries, an excellent work environment, and complete health coverage. You've got cancer and need a $500,000 operation? No problem.

Author:  wtd [ Fri Nov 19, 2004 3:09 pm ]
Post subject: 

shadow master wrote:
Hacker Dan wrote:

No kidding i whould work at micdonals b4 i worked for M$. I mean just for what they where/are planing in longhorn u should be scared to even talk to them.



wat are they planning with longhorn thats scary?


The really scary thing about what they're planning for Longhorn is that they haven't planned much of anything. The organization of the project has been abysmal. First they scrapped the key feature, a new database-based filesystem, then they announced the key graphical advances of Longhorn would be ported to Windows XP, and now it's rumored that they've essentially scrapped all of the work and begun a more modest Windows XP refresh based on Windows Server 2003.

If they manage to ship anything more than Windows XP SE I'll be truly impressed.

Author:  Martin [ Fri Nov 19, 2004 3:10 pm ]
Post subject: 

One thing that I heard about it was that it was going to use a hardware accelerated GUI, through DirectX.

Author:  wtd [ Fri Nov 19, 2004 3:14 pm ]
Post subject: 

martin wrote:
One thing that I heard about it was that it was going to use a hardware accelerated GUI, through DirectX.


Yes, but they're being held back by backwards compatibility. Consider the task of hardware accelerating some DOS app that 5 people in the middle of nowhere still use.

Besides, they're extremely late to that game. See Apple's work on Quartz Extreme. Microsoft talks about having a hardwareaccelerated GUI "real soon now", while another company has been out there doing it for awhile now. Smile

Author:  rizzix [ Fri Nov 19, 2004 3:43 pm ]
Post subject: 

oh microsoft did plan out thier longhorn release.. it simply failed Laughing

Author:  Dan [ Fri Nov 19, 2004 4:03 pm ]
Post subject: 

martin wrote:
Microsoft is rated as THE best company to work for. They provide their employees with very competitive salaries, an excellent work environment, and complete health coverage. You've got cancer and need a $500,000 operation? No problem.


It is about morals man, not about the health plan


wtd wrote:

The really scary thing about what they're planning for Longhorn is that they haven't planned much of anything. The organization of the project has been abysmal. First they scrapped the key feature, a new database-based filesystem, then they announced the key graphical advances of Longhorn would be ported to Windows XP, and now it's rumored that they've essentially scrapped all of the work and begun a more modest Windows XP refresh based on Windows Server 2003.

If they manage to ship anything more than Windows XP SE I'll be truly impressed.


I was talking more about the new secure OS stuff they will be adding to keep and eye on the users. It is like spy ware to the max, you can say good by to personal pericacy.

Author:  Tony [ Fri Nov 19, 2004 4:40 pm ]
Post subject: 

Hacker Dan wrote:
you can say good by to personal pericacy.

hey, it's all cool as long as I still have my privacy Wink

Author:  zomg [ Fri Nov 19, 2004 4:44 pm ]
Post subject: 

NOOOOOOOOOOOOOOOOOOOOOOOOOOO
not pericacy

wait a minute... isnt that what they said about XP

that poepl are constantly being tracked by M$ through windows


but if this is seriuos i might have to go legit ...for a while

Author:  Tony [ Fri Nov 19, 2004 4:57 pm ]
Post subject: 

shadow master wrote:
being tracked by M$ through windows


yes, windows... windows into your soul! Twisted Evil

Author:  Dan [ Fri Nov 19, 2004 5:45 pm ]
Post subject: 

tony wrote:
Hacker Dan wrote:
you can say good by to personal pericacy.

hey, it's all cool as long as I still have my privacy Wink


yes we all know dan can not spell, any how there realy are going to mess with poleops privacy in longhorn, some orgations got the docs on it under the fredom of inromation act or somting. Check up on it, it is scray stuff.

Any how i will stay in my linux world with out the masive secuity holes, virus and evil orgations ploting to go big brother on you.

Author:  josh [ Fri Nov 19, 2004 6:47 pm ]
Post subject: 

well at least being a microsoft employee you get treated well, check this article out:

http://www.cnn.com/2004/TECH/internet/11/18/gates.spam.ap/index.html

now is what I call a waste of resources.

not sure if u will get treated like this guy though... Very Happy

Author:  wtd [ Fri Nov 19, 2004 6:56 pm ]
Post subject: 

A gilded cage is still a cage. I know I wouldn't feel comfortable at Microsoft. The company has a serious case of NIH (not invented here) syndrome which blinds them to good ideas that come from others.

Author:  bugzpodder [ Fri Nov 19, 2004 8:11 pm ]
Post subject: 

I am happy as long as i get paid a decent amount while doing something I like. besides, you can also move up the ladder...

martin wrote:
I'd just quick sort it...

quick sort takes N^2 worst case, NlogN on average for time, and O(logN) of stack space. If you switch to introsort/heapsort, you still take O(NlogN) worst time... if you use bucket sort you take O(N) time and O(N) space.

you need an algorithm that takes O(N) worst case and O(1) space.

Author:  josh [ Fri Nov 19, 2004 8:28 pm ]
Post subject: 

bugzpodder wrote:
I am happy as long as i get paid a decent amount while doing something I like. besides, you can also move up the ladder...

martin wrote:
I'd just quick sort it...

quick sort takes N^2 worst case, NlogN on average for time, and O(logN) of stack space. If you switch to introsort/heapsort, you still take O(NlogN) worst time... if you use bucket sort you take O(N) time and O(N) space.

you need an algorithm that takes O(N) worst case and O(1) space.


who in that what now??? Question Confused Confused

Author:  bugzpodder [ Tue Dec 20, 2005 12:39 am ]
Post subject: 

went through two more microsoft interviews. (and one more coming up onsite in Redmond Smile)
Interview 1
1. Write the regular expression that recognize for complex numbers. stuff like 1. and .1 are allowed
2. Write a parser than parses a string into a real number
Interview 2
Write a function that takes an average of a bunch of numbers

Author:  Martin [ Tue Dec 20, 2005 12:58 am ]
Post subject: 

Regular expression like ...

[0-9].*\.[0-9].*(+|-)[0-9].*\.[0-9.*].*i

Author:  rizzix [ Tue Dec 20, 2005 1:22 am ]
Post subject: 

uh martin i think u meant.. this..

[0-9]*\.[0-9]*(+|-)[0-9]*\.[0-9]*i

even better written as this..

\d*\.\d*(+|-)\d*\.\d*i


but yet it's incorrect... u see that says it can match ".+.i" you soo do not want that happening.. or is that acceptable?

Author:  Martin [ Tue Dec 20, 2005 2:58 am ]
Post subject: 

Oh. Yeah. Fucked that one up big time.

This won't handle -i.

Hmm. Assuming you can't have .i :
((\-?[0-9][0-9]*(\.[0-9][0-9]*)?(+|-))|(\-?\.[0-9][0-9]*(+|-)))?[0-9]*(\.[0-9][0-9]*)i

Author:  rizzix [ Fri Dec 23, 2005 3:28 pm ]
Post subject: 

hmm here;s a pretty strict one:

^(\-(?=(\d|\.)))?(\d+\.\d*)?(\d*\.\d+)?((\+|\-)(?=(\d|i|\.)))?(\d*i(?!\.))?(\d*\.\d+i)?$

handles -i Wink


ran it across this:
code:
13.0+
13.0-
123.0+i
1.00-
12.9+.
12.1+2i
12.11+2i
12.1+22
12.1+2.3i
12.11+2.2
12.1+22.1
-12.1+12
-12.1+2.3i
-12.11+2.2i
-12.1+22.1i
2.1
3
-
3.
.3
.3+
3.s
a.3
3.3.3.
3.3.3
.-.
-3
-2i
.1+.1i
0i
-i
2.+i
2.+.i
.i


it filtered out this:
code:
123.0+i
12.1+2i
12.11+2i
12.1+2.3i
-12.1+2.3i
-12.11+2.2i
-12.1+22.1i
2.1
3
3.
.3
-3
-2i
.1+.1i
0i
-i
2.+i

Author:  wtd [ Fri Dec 23, 2005 4:28 pm ]
Post subject: 

All of this goes to show... regular expressions are not the panacea they're made out to be for parsing.

Author:  rizzix [ Fri Dec 23, 2005 4:32 pm ]
Post subject: 

i'd split the string down into two.. separated by the +/- symbol.. then matched both of them separately.. it would have worked out cleaner.

Author:  Martin [ Sat Dec 24, 2005 5:27 am ]
Post subject: 

wtd wrote:
All of this goes to show... regular expressions are not the panacea they're made out to be for parsing.


But in the eyes of the young ones, they make you look like a programming god.

Author:  Cervantes [ Sat Dec 24, 2005 8:37 am ]
Post subject: 

Martin wrote:
But in the eyes of the young ones, they make you look like a programming god.

Ha HAA!
Hikaru79 wrote:

Holy mother of God. I'm oddly reminded of the bash.org quote that goes:
Quote:

[02:18:04] s7ank: i want to be one of those guys that types "s/j&jd//.^$ueu*///djsls/sm." and it's a perl script that turns dog crap into gold.


Author:  rizzix [ Mon Dec 26, 2005 2:20 am ]
Post subject: 

everytime i see that quote.. i feel obliged to ellaborate.. (the mess)
rizzix wrote:
^(\-(?=(\d|\.)))?(\d+\.\d*)?(\d*\.\d+)?((\+|\-)(?=(\d|i|\.)))?(\d*i(?!\.))?(\d*\.\d+i)?$


The following are matched for 0 or 1 occurrences..

(\-(?=(\d|\.)))? match a - (negative sign) if only the next character is a digit or a . (dot)

(\d+\.\d*)? match 1 or more digits, a . (dot) and zero or more digits

(\d*\.\d+)? match 0 or more digits, a . (dot) and one or more digits

(note conditional regex would have simplified the obove two into 1 regex pattern. but i avoided it cuz conditional regex (aka (?(test) ifTrue | ifFalse)) usually makes it harder to read and it requires you to remember the group numbers.. which i'm obviously ignoring here.)

((\+|\-)(?=(\d|i|\.)))? match a + (plus) or a - (minus) sign if the next char is either a digit, a . (dot) or 'i'.

(\d*i(?!\.))? match 0 or more digits and 'i', if the next char is not a . (dot)

(\d*\.\d+i)? match 0 or more digits, a . (dot) and one or more digits followed by the char 'i'

Author:  wtd [ Mon Dec 26, 2005 2:32 am ]
Post subject: 

The "x" modifier and inline comments are nice. Smile

code:
/
  ^
 
  (\-(?=(\d|\.)))? # Match a negative sign only if the next character
                   # is a digit or a dot.
                   
  (\d+\.\d*)?      # Match 1 or more digits, a . (dot) and zero or
                   # more digits.

  (\d*\.\d+)?      # Match 0 or more digits, a . (dot) and one or
                   # more digits.
 
  ((\+|\-)
   (?=(\d|i|\.)))? # Match a + (plus) or a - (minus) sign if the next
                   # char is either a digit, a . (dot) or 'i'.

  (\d*i(?!\.))?    # Match 0 or more digits and a char 'i' if the
                   # next char is not a . (dot).

  (\d*\.\d+i)?     # Match 0 or more digits a . (dot) and one or more
                   #digits followed by the char 'i'.

  $
/x

Author:  rizzix [ Mon Dec 26, 2005 2:35 am ]
Post subject: 

yes. but that makes it perl specific. i was going with perl compatible. Wink

edit.. yea there's always the (?# )... but it soo useless.. unless u put the respective (?# ) in a different string, and concatenate the various strings. Wiat.. useless..

oh.. It's (?# ) right... ack regex is too big for my puny head.

Author:  wtd [ Mon Dec 26, 2005 3:10 pm ]
Post subject: 

rizzix wrote:
yes. but that makes it perl specific. i was going with perl compatible. Wink


I actually wrote that in Ruby.

Does Java support an "insignificant whitespace" mode?

Author:  Naveg [ Mon Dec 26, 2005 11:48 pm ]
Post subject: 

Whitespace in Java is always insignificant is it not?

I feel like i just missed something...

Author:  wtd [ Tue Dec 27, 2005 12:01 am ]
Post subject: 

Naveg wrote:
Whitespace in Java is always insignificant is it not?

I feel like i just missed something...


Inside regular expressions.

Author:  rizzix [ Tue Dec 27, 2005 2:32 am ]
Post subject: 

Naveg wrote:
Whitespace in Java is always insignificant is it not?

I feel like i just missed something...


not completely... consider
Java:
public<>static<>void<>main(..
where <> represents one or more whitespaces.. Here the whitespace is absolutely necessary!

Author:  rizzix [ Tue Dec 27, 2005 2:36 am ]
Post subject: 

wtd wrote:
Does Java support an "insignificant whitespace" mode?


No.. Since there's no _need_ for it. String concatenation can give you a similar (and in this case, cleaner) effect.

Author:  wtd [ Tue Dec 27, 2005 5:25 am ]
Post subject: 

What's your opinion on regex interpolation?

code:
>> foo = /foo/i
=> /foo/i
>> bar = /#{foo}bar/
=> /(?i-mx:foo)bar/


Imagine the potential for creating "sub-patterns" and giving them meaningful names, then including them in larger, more complex regular expressions.

Of course, Perl6 regexes will change everything...

Author:  codemage [ Wed Jan 11, 2006 9:58 am ]
Post subject: 

If you haven't read MicroSerfs by Douglas Coupland, you might find it interesting. (It's a short read).

In brief, it's a cynical look at a bunch of young employees who work at MS & the psychology of the workplace there. It gives you a pretty good feel for the atmosphere at the Redmond campus.

Author:  md [ Wed Jan 11, 2006 12:18 pm ]
Post subject: 

codemage wrote:
If you haven't read MicroSerfs by Douglas Coupland, you might find it interesting. (It's a short read).

In brief, it's a cynical look at a bunch of young employees who work at MS & the psychology of the workplace there. It gives you a pretty good feel for the atmosphere at the Redmond campus.

Good book, but why are youi posting it in this thread?


: