Showing posts with label microsoft. Show all posts
Showing posts with label microsoft. Show all posts

Sunday, June 17, 2007

My recent frustration + another Live Search vs. Google face-off

Well there are some big changes in my life recently. Some of the brothers and sisters in Montreal have been notified already and let me just say that for the next month I will be concentrating on my thesis and not much else. My mind sometimes still wanders off to the la-la-land to reminisced about the lost chances and past sweet memory, so the only way out is sidetrack myself with some works. Unfortunately, I have reached a bottleneck in the thesis project: one of the tools (FINT) that I relied on (but unfortunately not written by me) does not scale well on large test subjects. Before I left for the Ephesus retreat during the weekend I left two machines on to test 3 reasonably big software projects (> 100,000 LOC). I was hoping that after the weekend I would be able to obtain some decent data. When I returned on Monday the machines were still running at full capacity. I waited one more day, hoping that I could eventually obtain the result. Well Monday was a bad day already, but to add insults to injury, McGill shut down the power supply on Monday night. When I came in on Tuesday all the machines were dead. For the past two days I was putting some final efforts to obtain the result from the large projects (azureus and soot) but if the machine is still running tomorrow, then it is time to think of an easier approach so I can actually start analyzing the data.

Honestly I am feeling lost... don't know what I'm fighting or what is the purpose of going to the lab each day. To take my mind off things, I decided to pick up the Python Challenge again. Since I feel my own reluctance to touch the Java language and the Eclipse project maybe python can get me started again.

I'm now reworking all the challenged and I remember reaching level 5. Today I was reworking a piece of code that uses pickle. However, the code needs to open a file and I want to catch the IOError exception better this time. Unlike Java SDK, python lacks a central/organized library for documentation so I decided to search it with both Microsoft's live search and Google.

Although my friends have been telling me recently that I am slowly being converted into a MS-philic and an invisible evangelist of MS technology, I have one recommendation for those friends of mine (probably 0) who want an alternative and free themselves from the Google-centric life:

Forget about it. Google has won. Now move on.

Why?

Round 1: "python errror"... well I unintentionally misspell the word. But it reveals the AI prowess of Google search.

From live search

From Google.image

image

Who won: Google

Why: Google is smart enough to detect my mistake. Live search is stupid and it just retrieves whatever I typed. It shows the vast amount of data that Google possesses and the prowess of the internal inference engine that detects wrong words and correct word. It is especially cunning since IOError is syntactically not an correct English word. It is just a name. But Google knows that most people would have typed IOError and thus when you misspell the word it is able to correct you. Its data IS the dictionary.

Round 2: "Python IOError" and "python IOError library". Well now I want to check if given the correct directives the search engines, it actually returns what I want.

From live search: Well it returns some posts from the python news group (right?). I don't know... it looks garbage to me so I didn't bother to find out.

image

From Google: Right on! It pinpoints to exactly where I need to go.

image

Give you one more chance Microsoft! Let's try a more precise "python IOError exceptions"

This time Live is more promising. Although the first two options are not optimal the third and the fourth ones lead to the right direction. However, you need to take some points off since it still thinks IOError is a misspell.

image

Google: result is less relevant this time. Honestly I tend to skip links that direct to email exchanges or usernet posts since they tend to be unstructured and not authentic enough.

image

Who won: Google

Why: Google is able to point me to the right direction given a small part of information while live needs more help. Just as an aside, it kind of shows the philosophical difference between two companies.

Google: less is better

Microsoft: more is better

However, both are still better that ask.

image

Hey, where is the Algorithm?

P.S. If you still keep track of techcrunch (which I kinda picked up again since I temporarily lost my purpose and now try to sober up and work again), you might have come across with a rumor that MS is sending a team of rockstar developers led by Sanaz Ahari to rebuild the live search engine. I saw Sanaz's video from Scoble show, and I have been using both start.com and personalized live (another confusing misnomer from MS) as my RSS feed reader. Hopefully they can produce something decent cuz I'm now sticking with google. (searching for "techcrunch live search sanaz" for the link proves me right again (sigh~) )

Wednesday, April 04, 2007

Brain Teaser: Solve This Math Word Puzzle

I came across this piece of puzzle today and then I decided to abandon my project and write a solution for it:

Each letter stands for a 1-digit number. No two letters may stand for the same number. Find a value for each letter from the following set: 0, 1, 4, 5, 6, 7, 8, 9.


'' ASK

+ GAVE

-------

' USED

The answer can be found here.

The concept is simple but the code is more verbose than what I thought... here is my python solution. Can anyone achieve one that is less verbose?



def permutation(num_list):

if (len(num_list) == 1 or len(num_list) == 0):
return [num_list];
permutation_list = [];

for i in range(len(num_list)):
list_copy = num_list * 1 # deep copy
item = list_copy.pop(i)
one_less_perm_list = permutation(list_copy)
for j in range(len(one_less_perm_list)):
permutation_list.append([item]+ one_less_perm_list[j])
return permutation_list


def solve_puzzle():

combination = permutation([0, 1, 4, 5, 6, 7, 8, 9])
var_list = ['A', 'S', 'K', 'G', 'V', 'E', 'D', 'U']

for i in range(len(combination)):
assignment = combination[i]
set_of_answer = dict([(var_list[j], assignment[j]) for j in range(len(var_list))])
if set_of_answer['G'] + 1 != set_of_answer['U']:
continue
if (set_of_answer['A']*2)%10 != set_of_answer['S'] and (set_of_answer['A']*2)%10 != set_of_answer['S']-1 :
continue
if set_of_answer['K']==0 or set_of_answer['E']==0:
continue
ret = set_of_answer['K'] + set_of_answer['E']
if (ret%10 != set_of_answer['D']):
continue

carryover = ret/10
ret = set_of_answer['S'] + set_of_answer['V'] + carryover
if (ret%10 != set_of_answer['E']):
continue

carryover = ret/10
ret = set_of_answer['A']*2 + carryover
if (ret%10 != set_of_answer['S']):
continue
print set_of_answer

print solve_puzzle()





But amazingly the PowerShell solution is so elegant! Too bad that it's not yet available to Vista and...wouldn't be open-sourced to Unix. Or else we can get ride of Bash or C-shell! Guess that this day won't come in near future...

Monday, March 26, 2007

Can Codeplex make your code prettier too?

Disclaimer: the following is a part of comments that I posted on Josh Ledgard's new post Google makes your code prettier.  Since I have some pretty bad experience with posting long replies on MSDN site now I always save a copy.  I thought that since I haven't updated my site for a while, I will also post a part of my response here.

I took notice of Google Code a lot earlier than Codeplex because of its Summer of Code project. It is obvious that Google is very good at garnering the attention of (young) developers and keeping its reputation as the coolest place for developers.  For instance, on reddit the prettifier got 259 points.

Instead the last entry of FoxPro got released on CodePlex, got almost no attention.  (P.S. I always think that MS should release VB6, the latest obsolete/non .NET version of VB to codeplex.  VB6 is a lot more popular than FoxPro...)

It is not a popularity contest, but in general Google Code is the place where cool ideas come up.  Even if I have a cool .NET project I want to publish SourceForge is probably a better place for now.  Codeplex only hosts MS-sponsored project and is a PR machine.  That's the impression I get, is that true?

Below is my comments on Josh's blog

1. what makes google code more popular than codeplex besides publicity? well first of all they did a fine job at publishing their ideas. second, googlers are allowed to devote some of their own time into their own interesting projects. I guess it's not possible in MS but, I am sure you guys have written a lot of cool (little) tools that won't monetize but will be very useful. So maybe it's time to encourage Softie to publish their ideas (esp the ideas/prototype that aren't funded) into codeplex.

An open source playground where Softies (some of the smartest and most experienced coders in the world) publish their own cool gadget will get a lot of attention.

2. Re-amp the interface of codeplex: now it is a bit lame. The search bar should be in the middle, and i still prefer a directory of project types instead of popular tags. Popular tags should go to the right side (much like channel 9 where it lists the videos based on popularity).

3. What is the goal of codeplex? A place where "ideas" converge or a place where "Microsoft-published" ideas converge? If it's the latter then codeplex must expand to allow Java/Firefox plugins/eclipse plug-in to get hosted.

4. One thing that Google Code does better is to designate a person (not a no-name PR announcement) to introduce a cool idea in code.google.com. Too bad they haven't done it for their Open Source projects. But this is an opportunity for codeplex. Codeplex really needs a host who can communicate important ideas to the community. It's most vital for important projects like IronPython to garner attention!

5. although the MSDN website is very overloaded, it saddens me to not able to find a (obseravable link between msdn and codeplex. That really signifies the "importance" of codeplex within MS' priority list. If MSDN is the focal point of Windows developer, then it should be an entry point to codeplex, no?

Update: the comments never made it to Josh's blog.  It keeps rejecting them and I guess my voice wouldn't be heard :P

Thursday, March 01, 2007

Doing charity using your IM

I don't know how many are still reading my blog, but today you can doing charity with no cost if you are a Windows Messenger owner!

Check the link for details!

Monday, February 12, 2007

Google Founders' Awards... another Googlegate?

Disclaimer: This is a response that I gave to Dare Obasanjo's post about the his view of the Google Founders' Awards. Dare is an engineer at Microsoft and he maintains one of the most educating and entertaining blog. Highly recommended.

While there are always people who will exploit the system for their own greeds, the idea is actually pretty neat. You award the people (and hopefully engineer) who create a successfully product with a large sum of money, just as the way you would buy from a start-up company. The amount is of course considerably less, but that is compensated by the job security the company has already guaranteed. Not a bad idea.

I don't know all of those who actually won the award but it has been given to some brilliant engineer (i.e. Niniane Wang, a formerly Softie herself). And it also gives you the impression that the company is willing to share its wealth with the employer.

One of the reason there are so much grief in MSFT is that the executives got the perks while the engineers are not earning their due. I don't know how much of it is true, but after reading a bit of Mini you get the sense that employees are treated better at Google. That's how you generate the morale in the team.

And I don't know how you compare it with the notorious Ship'it award at MSFT. But while the GFA certainly sounds better, I believe the GFA also carries some monetary values while the Ship It is just a trophy. Which one would you choose? Go figure....