
-----------------------------------
bugzpodder
Wed Nov 17, 2004 11:22 pm

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

-----------------------------------
Martin
Thu Nov 18, 2004 1:28 am


-----------------------------------
Congratulations. I have an interview tomorrow too, with Four Season Hotels and Resorts.

-----------------------------------
zomg
Thu Nov 18, 2004 7:35 am


-----------------------------------
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  :lol: 

congrats!

-----------------------------------
bugzpodder
Thu Nov 18, 2004 9:26 am


-----------------------------------
i'll see if they ask any interesting questions and post it here

-----------------------------------
Andy
Thu Nov 18, 2004 10:35 am


-----------------------------------
wheres the interview at

-----------------------------------
bugzpodder
Thu Nov 18, 2004 1:00 pm


-----------------------------------
skool

-----------------------------------
wtd
Thu Nov 18, 2004 2:15 pm


-----------------------------------
Microsoft has invested heavily in the University of Waterloo, and is known to recruit heavily there.

Good luck selling your soul.  ;)

-----------------------------------
josh
Thu Nov 18, 2004 2:22 pm


-----------------------------------
congrats man, give us the dirt on longhorn!!!!!

-----------------------------------
Amailer
Thu Nov 18, 2004 3:14 pm


-----------------------------------
Microsoft has invested heavily in the University of Waterloo, and is known to recruit heavily there.

Good luck selling your soul.  ;)

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 :P iunno but cool :)

-----------------------------------
bugzpodder
Thu Nov 18, 2004 4:33 pm


-----------------------------------
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

-----------------------------------
Andy
Thu Nov 18, 2004 5:59 pm


-----------------------------------
any duplicate element?

-----------------------------------
bugzpodder
Thu Nov 18, 2004 6:22 pm


-----------------------------------
yes

-----------------------------------
Andy
Thu Nov 18, 2004 6:23 pm


-----------------------------------
o.. thats not hard...

-----------------------------------
bugzpodder
Thu Nov 18, 2004 6:29 pm


-----------------------------------
Take N=2^32-1
if you find a solution that takes O(1) space and O(N) complexity, give me a howl

-----------------------------------
Dan
Fri Nov 19, 2004 1:23 am


-----------------------------------

Good luck selling your soul.  ;)

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.

-----------------------------------
Martin
Fri Nov 19, 2004 3:26 am


-----------------------------------
I'd just quick sort it...

-----------------------------------
josh
Fri Nov 19, 2004 7:51 am


-----------------------------------
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)

-----------------------------------
zomg
Fri Nov 19, 2004 7:58 am


-----------------------------------

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

-----------------------------------
Martin
Fri Nov 19, 2004 2:35 pm


-----------------------------------
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.

-----------------------------------
wtd
Fri Nov 19, 2004 3:09 pm


-----------------------------------

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.

-----------------------------------
Martin
Fri Nov 19, 2004 3:10 pm


-----------------------------------
One thing that I heard about it was that it was going to use a hardware accelerated GUI, through DirectX.

-----------------------------------
wtd
Fri Nov 19, 2004 3:14 pm


-----------------------------------
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.  :)

-----------------------------------
rizzix
Fri Nov 19, 2004 3:43 pm


-----------------------------------
oh microsoft did plan out thier longhorn release.. it simply failed  :lol:

-----------------------------------
Dan
Fri Nov 19, 2004 4:03 pm


-----------------------------------
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



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.

-----------------------------------
Tony
Fri Nov 19, 2004 4:40 pm


-----------------------------------
you can say good by to personal pericacy.
hey, it's all cool as long as I still have my privacy :wink:

-----------------------------------
zomg
Fri Nov 19, 2004 4:44 pm


-----------------------------------
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

-----------------------------------
Tony
Fri Nov 19, 2004 4:57 pm


-----------------------------------
being tracked by M$ through windows

yes, windows... windows into your soul! :twisted:

-----------------------------------
Dan
Fri Nov 19, 2004 5:45 pm


-----------------------------------
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.

-----------------------------------
josh
Fri Nov 19, 2004 6:47 pm


-----------------------------------
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... :D

-----------------------------------
wtd
Fri Nov 19, 2004 6:56 pm


-----------------------------------
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.

-----------------------------------
bugzpodder
Fri Nov 19, 2004 8:11 pm


-----------------------------------
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...

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.

-----------------------------------
josh
Fri Nov 19, 2004 8:28 pm


-----------------------------------
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...

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??? :?:  :?  :?

-----------------------------------
bugzpodder
Tue Dec 20, 2005 12:39 am


-----------------------------------
went through two more microsoft interviews.  (and one more coming up onsite in Redmond :))
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

-----------------------------------
Martin
Tue Dec 20, 2005 12:58 am


-----------------------------------
Regular expression like ...

[0-9].*\.[0-9].*(+|-)[0-9].*\.[0-9.*].*i

-----------------------------------
rizzix
Tue Dec 20, 2005 1:22 am


-----------------------------------
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?

-----------------------------------
Martin
Tue Dec 20, 2005 2:58 am


-----------------------------------
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

-----------------------------------
rizzix
Fri Dec 23, 2005 3:28 pm


-----------------------------------
hmm here;s a pretty strict one:

^(\-(?=(\d|\.)))?(\d+\.\d*)?(\d*\.\d+)?((\+|\-)(?=(\d|i|\.)))?(\d*i(?!\.))?(\d*\.\d+i)?$

handles -i ;)


ran it across this: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: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

-----------------------------------
wtd
Fri Dec 23, 2005 4:28 pm


-----------------------------------
All of this goes to show... regular expressions are not the panacea they're made out to be for parsing.

-----------------------------------
rizzix
Fri Dec 23, 2005 4:32 pm


-----------------------------------
i'd split the string down into two.. separated by the +/- symbol.. then matched both of them separately.. it would have worked out cleaner.

-----------------------------------
Martin
Sat Dec 24, 2005 5:27 am


-----------------------------------
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.

-----------------------------------
Cervantes
Sat Dec 24, 2005 8:37 am


-----------------------------------
But in the eyes of the young ones, they make you look like a programming god.
Ha HAA!

Holy mother of God. I'm oddly reminded of the bash.org quote that goes: 




-----------------------------------
rizzix
Mon Dec 26, 2005 2:20 am


-----------------------------------
everytime i see that quote.. i feel obliged to ellaborate.. (the mess)
^(\-(?=(\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'

-----------------------------------
wtd
Mon Dec 26, 2005 2:32 am


-----------------------------------
The "x" modifier and inline comments are nice.  :)

/ 
  ^ 
  
  (\-(?=(\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

-----------------------------------
rizzix
Mon Dec 26, 2005 2:35 am


-----------------------------------
yes. but that makes it perl specific. i was going with perl compatible. ;)

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.

-----------------------------------
wtd
Mon Dec 26, 2005 3:10 pm


-----------------------------------
yes. but that makes it perl specific. i was going with perl compatible. ;)

I actually wrote that in Ruby.

Does Java support an "insignificant whitespace" mode?

-----------------------------------
Naveg
Mon Dec 26, 2005 11:48 pm


-----------------------------------
Whitespace in Java is always insignificant is it not?

I feel like i just missed something...

-----------------------------------
wtd
Tue Dec 27, 2005 12:01 am


-----------------------------------
Whitespace in Java is always insignificant is it not?

I feel like i just missed something...

Inside regular expressions.

-----------------------------------
rizzix
Tue Dec 27, 2005 2:32 am


-----------------------------------
Whitespace in Java is always insignificant is it not?

I feel like i just missed something...

not completely... considerpublicstaticvoidmain(.. where  represents one or more whitespaces.. Here the whitespace is absolutely necessary!

-----------------------------------
rizzix
Tue Dec 27, 2005 2:36 am


-----------------------------------
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.

-----------------------------------
wtd
Tue Dec 27, 2005 5:25 am


-----------------------------------
What's your opinion on regex interpolation?

>> 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...

-----------------------------------
codemage
Wed Jan 11, 2006 9:58 am


-----------------------------------
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.

-----------------------------------
md
Wed Jan 11, 2006 12:18 pm


-----------------------------------
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?
