Monday, February 09, 2004

Being a DevDays Blogger without knowing it...

    I was googling for blogs, trying to find some interesting info, when I stumbled on my name in the DevDays bloggers list...(For those that don't know what DevDays are, as it is the case for most people in North Africa, Dev Days are events like our Microsoft OpenDoor - one day event, traveling between cities/states/countries - but specialized on Dev).

    My first reaction was : "How the hell did I get in there, I am not speaking nor attending at any of those - there are none in my region anyway..." I click the link, and see my name among the first ones on the list (it helps having a first name that starts with an A). I go to the home page, and I'm puzzled when I see this :

Welcome to DevDays Bloggers!

The idea behind DevDays Bloggers is to connect all interested in the Microsoft DevDays 2004 events occurring February through April 2004 in 32 cities throughout the United States."

That was before I looked at the site logo :

Well, that looks familiar, doesn't it?

Here is what I am hinting at :

Once again, the US guys just don't notice that there are other people on Earth...

When I try to get back to were my name was listed (not using the back buttons, just to see how visible I was on that site), I can't get to it... There is no menu item to take me there, no link inside any sub category... After spending a couple of minutes on it, I finally use the back button and find that the Url is not linkled to...

[Updated]

So, Those guys were not thinking every PDC guy is a US DevDays guy, but they are using the same app, with the same DataBase... Which is actually a great idea. The only way you find yourself in the part of the app irrelevant to US DevDays is using search engines like google... Sorry for the injustice I was guilty of in my earlier thoughts.


main
2/9/2004 5:57:17 AM UTC  #   

  Sunday, February 08, 2004

What is wrong with Nasa mission to Mars? could it be Java?...

    Thanks to Carl Franklin  (.Net Rocks!), I now know that Nasa has been using Java for their Spirit rover mission to Mars ...

    Having been a J2EE guy until I was hit by the CLR truck (back in the early days of 1st beta), I am not keen on trashing Java (do you easily trash your older loves?), but I just can't fight it...

   Well, the story about the Mars mission goes like this (excerpts from MSNBC):

"NASA hoped communication with the six-wheeled rover would resume Friday morning after two days without receiving any significant data "

"Since Wednesday, its 19th day on Mars, the Spirit has sent back to Earth only meaningless radio noise or simple beeps acknowledging receipt of commands"

"Among the possible causes: a corruption of its software or computer memory. If the software is awry, NASA can fix it from Earth by beaming patches across more than 100 million miles of space or by rebooting the rover’s computer. But if the problem lies with the rover’s hardware, the situation would be far more grave — perhaps beyond repair"

"Preliminary indications suggested the rover’s radio was working, and it continued to generate power from the sun with its solar panels. Spirit’s internal clock also was running and had roused the rover several times on cue."

"Initially, engineers believed bad weather on Earth — a thunderstorm near a Deep Space Network antenna in Australia — had caused the communications glitch. But weather was later discounted as the source"

    Well, sounds like software is the the cause, and it is java stuff ... Could that be the cause? some IIOP ORB not doing it right (sounds like déja vu, doesn't it?)

    You would think they know better, haven't they heard of .Net?

    The credits of the idea of this entry goes to Carl (on IM, here is how he displayed his name : "Carl Franklin - NASA should've used .Net")

 


main
2/8/2004 9:51:11 PM UTC  #   

  Saturday, February 07, 2004

Digital Photography by Microsoft Research ...

Well, I guess I can rely on the first message and share this with you :

________________________________________________________________________

History is being written in a new way. It is being written by people through the big and the small events in their lives. We write history through personal Web sites, discussion boards, and the legacy of photos, taken at moments that are important to us.

Researchers at Microsoft have been working on a wide range of technologies that will help people write their personal histories through digital photography. To tell any history, it's best to start at the beginning, and move forward.

In the beginning, you buy a digital camera, take a quick look at the manual, throw it to the side, and start pushing buttons. Digital photography has made it possible to take an almost endless number of photos. Some of these photos are good; some get deleted before anyone else sees them. Many of them are almost good, with a little tweaking they'd be just fine.

Related Links

Continuous Flash

Image Stacks

WWMX Web site

Shot On Location:
A World-Wide Image Database


Friendly Planet

Adjustable Light
A common problem with digital photography is lighting. Photos turn out either too light or too dark. Since digital cameras allow us to take lots of shots without running out of film, we're willing to throw away a lot of the bad shots. But if you want to take a great picture, it might be nice to be able to control the lighting without purchasing professional lighting equipment.

One of the research projects at Microsoft Research is called Continuous Flash. This technology allows you to take the same picture with flash and without flash and later adjust the balance between light and dark. It's better than contrast filters in photo editing tools, because it considers the reflection characteristics of each object in your picture.

"You can't compensate for having one area underexposed and one area overexposed," said Hugues Hoppe, one of the project researchers. "If an area is underexposed, you can't really get the detail back by increasing brightness, because it wasn't captured in the first place. By having two different images which both have useful information, you can merge them together."

Image Stacks
A similar technology that combines the best of multiple photographs is a project called Image Stacks. Image Stacks aligns multiple images of the same subject, allowing the user to pick and chose the best pieces from each photograph. Researchers Michael Cohen, Steven Drucker and Alex Colburn thought this would come in handy for special events, when you want to get a picture of the entire group that's suitable for framing.

Taking group photographs is difficult, because capturing a single image in which everyone looks good is almost impossible. What usually happens is that in one shot, someone has their eyes closed, but someone else has got the most adorable smile. Check the next shot, everyone has their eyes open, but one person is picking a poppy seed out of their teeth. The third shot, both previous people are behaving, but grandma is yawning, tired of waiting through multiple shots. Which shot do you pick? With Image Stacks, you can easily cut and paste to present everyone's best face. The images are automatically registered into a single composite image.

Print to Digital
Print photos are still around. They're around in shoeboxes. They're shoved under the bed and in the back of closets. Some of us have so many print photos we don't know what to do with them. Neatnik types tediously scan all of their print photos one-by-one, converting them to digital form. But most of us don't want to go to all this trouble.

Cormac Herley, a researcher in the Communications, Collaboration and Signal Processing (CCSP) group, has developed a way to allow people to scan multiple photos at one time. You can put as many photos as will fit on your scanner, and the software will recognize each photo separately. It can 'read' the edges of the photos, even if they're crowded together or tilted. When it converts them to digital photos, it will correct for orientation and position. It's a quick way to get the family memories out of the shoebox and onto your hard drive.

"It's a harder problem than it looks like on the surface. Many scanner makers have tried, but it hasn't worked before," said Herley. "But this really works, it's not just a demo."

Take Out the Red
The Media Computing group at Microsoft Research Asia has developed several cool image editing techniques to help you fix some common problems with any photograph. One of the worst that comes to mind is the glowing red eyes that result from the flash hitting the pupil in just the wrong way. Unless you're way into the vampire look, this just isn't right. The red eye fix, which currently ships in Digital Image Suite and Windows XP Media Center Edition, is one of the best photo retouch features around. All you do is move the 'target' over the red eye, click, and the red is out.

The same group has also developed a quick and effective way to fix the brightness and contrast in a picture. Even if you took a picture that is too dark, you can use the Levels Auto-Fix feature in Digital Image Pro to lighten up your picture.

Organize the Digital Shoebox
The Media Computing group has also made it easy to organize your digital photos using image recognition algorithms. Some people do the same thing they did with the shoebox, and scatter pictures all over their hard drive. Then they can't find the one picture they want to use for their holiday card. The group's algorithms can distinguish between indoor and outdoor shots, shots with people in them and shots without, and city and non-city scenes. Combined with other technologies, such as keyword annotation, it makes it a breeze to find any photo in your collection.

John Platt, a researcher in the CCSP group has developed another way to manage your photos online. His image clustering algorithm helps users find their photos by one of the most prominent markers: events. The software is effective because it doesn't look only at timestamps, which could be misled by a faulty camera clock. Instead, the software looks at photograph order plus color to find pictures taken during one particular event.

"We only compare colors locally in time," said Platt. "So if you have a pumpkin in one shot, and a few months later you wear an orange shirt, later, when you're searching for the day you visited the pumpkin patch, it won't show photographs from when you were wearing the orange shirt."

His algorithm underlies several other technologies designed to help people find their digital photos, including the Microsoft Research Media Browser. The Media Browser, developed by researchers in the Next Media group, takes advantage of the photo recognition research from the Media Computing group, and Platt's algorithms to build a unique visual experience that helps you search for and identify your photos. And it looks darn cool as it works. The interface is an impressive, futuristic presentation of photos that rearrange themselves before your eyes, sliding into place in a typical 2D presentation or a 3D stack.

"The idea behind this is annotation of large collections of photos," said Steven Drucker, the lead researcher on the project. "We know that if you put annotations on photos, that it's much easier to retrieve them. But we also know that it's tedious and difficult to do. We use the advanced techniques that are available, such as face detection and image clustering, to make it easier for you to interact with your photos. We also use a game graphics card for higher visual quality."

Fill It In
Smart Erase is a photo editing tool found in Digital Image Pro and invented by researcher Patrick Perez in Cambridge. The feature allows users to remove objects from a picture. This can come in handy in case you want to remove your ex from the family reunion picture, or you before you lost the 30 pounds.

The algorithm looks at areas of the image to see which patch of texture can be "stolen" to fill in the holes left behind when the unwanted object in the image is removed.

To fill in the hole, Smart Erase does some reasoning about texture. It views the pixels outside the object as potential replacement material. The program has some strategies for knowing exactly where to look to get this material. "The algorithm constantly reviews what pieces it's got and makes comparisons very quickly to come up with the right fit," said Andrew Blake, Senior Researcher in Cambridge.

Blend It
Another photo editing feature from the Cambridge lab, a tool code-named Blender, appeared in Digital Image Pro this year as the "Blending Brush." Blender is a seamless cloning tool that can take the wrinkles out of your face, insert a new object into a scene, and combine parts of one scene with another - all without the usual difficulties and distortions that most photo editing techniques present.

If an object inserted into a new background has complex outlines, standard cloning may not work because of the incompatibility of color and intensity between the background and the new object. And even the best, most careful cutting and pasting often yields poor results because the outlines are fuzzy or jagged. Blender 'blends' pieces of the inserted object and the background together to form a seamless whole.

Cut It Out
Cutting out an image and putting it somewhere else has always held a lot of fascination for photo aficionados. Blake and his team are developing a new algorithm they call GrabCut, that's a 'no-brainer' way to do this important task. Instead of having to carefully trace the outlines of the object you want to cut out, all you have to do is draw a rectangle around the object. The algorithm selects the object and eliminates the old background. You can then paste the cut-out object onto a different background.

Cartoon Wizard
Doesn't everyone want to star in their own anime or Disney cartoon?

Though Microsoft Asia researchers can't get you a Disney contract, they can turn your digital photograph into a cartoon. Their technology, developed in cooperation with MPD Japan, is called the Cartoon Wizard. It is currently offered in the Japanese version of Office 2003. Westerners will have to wait, as the Cartoon Wizard is only trained to work with Asian faces.

Their system is based on statistical learning techniques. The algorithm automatically generates a cartoon from an image using face detection and alignment, and training data generated by studying how a human artist renders a human image into a caricature. The resulting cartoons can be used in e-cards or personalized emoticons for chat programs.

Tell a Photostory
Now that you've stepped through the process of improving and organizing your digital photos, perhaps you'd like to share them. Microsoft Research has developed several ways to do this, in small and large ways.

When researcher Dave Vronay was working on PhotoStory, he wanted to recreate the feeling of a family sitting around an old-fashioned photo album and telling the stories connected to the pictures.

"A picture is not just a description of what is there," he said. "For instance, if you have a picture of a hotel, and you showed it to a friend, you probably wouldn't just say, 'and that's the hotel we stayed at.' You might instead launch into a story about the waiter with purple hair who served you duck soup at the hotel restaurant, even though you didn't have a picture of him. The photo would be a reminder of the stories that surrounded that photo."

With Photostory, you can add images, music, and background narration to tell the stories behind the pictures and send it to the people you'd love to have sitting on the couch next to you while you share your memories.

Share Your Photos with Friends
The Social Computing group is experimenting with an online blog and photo sharing application code-named Wallop, a project designed to help people to connect with those close to them — families and friends, and friends of friends.

The group considers Wallop a "social networking" application that provides a way for small, closely connected groups of people to share personal information and photographs online. The beta testers can send photos to their Wallop interface through email or instant messages to easily update their blog interface.

Share Your Photos with the World
The World Wide Media Exchange (WWMX) offers users from around the world the chance to upload and share their photos with millions. It provides MapPoint maps and TerraServer maps so that you can view your photos by location as well as time.

One of the advantages to this interface is the ability to communicate with people across the world. If you're planning a trip to London, for instance, maybe some nice tourist who has gone before you has posted their pictures of a trip around the city, complete with shots of their favorite tea stops. Then other tourists or locals can jump in and write annotations on the photographs, such as, "don't eat here, the crumpets aren't up to the usual standards."

Some of the contributors to the WWMX have contributed to history by adding photos of 'news' events, such as fires in Southern California and search and rescue operations.

A Visual Journey
David Salesin, a senior researcher in the Document Processing and Understanding group, has inspired many digital projects at Microsoft Research. He is also on the faculty at the University of Washington. Salesin recently became actively involved in a large digital photography project. A very large project. He contributed original digital photographs from his trip to Bhutan to the world's largest published book, a visual journey across the last unspoiled Himalayan kingdom on the planet.

The project was funded by several sources, including the Bill & Melinda Gates Foundation and the iCampus program at Microsoft Research. "Mike's project seemed like an interesting, original take on how we might be able to use technology for education," said Salesin. He helped convince the iCampus funding committee to support the project.

Whether you share your photos with only a few close friends, or the entire world, the latest innovations at Microsoft Research will contribute to the beauty and enjoyment of your digital creations.


main
2/7/2004 11:15:25 PM UTC  #   
Developing styles : the rodeo model ...

   Every once in a while, I feel nostalgia about the good old days of black screen and green text, and more often than not, I would then simply code some console app (I configure my command line console to have green text and full screen), and play around with it until feel some disgust ... Then I forget about it until the next time I am in a melancholy mood ..

   Well, I hadn't felt that way for a while, and here comes a console screen... And I was supposed to find out why the OleDB provider was not working properly ... new terminology (actually it was reminding me of quite old terms. Did I forget what they mean, were they different? who knows ...), anyway, I had to fight my way through jobs and subsystems (With the help of great guys used to woeking on the AS400 but not with the DRDA protocol and jobs ..)

   It did feel great when it started to work, and I got my .Net CMS Templates getting the Data from the AS400, but it still was taking me more than 3 hours to get a page done (with the DataAccess and Buz rules related to the use case) ... Why ? even if I don't count the integrity checks (there were no relations, and the model was not what it was supposed to be, because they had changed with time without any pointers to what the changes were and why), I had to learn that to get the TOP 20 records from a table, you needed to do a "select ... from ... fetch first 20 records only" - up to yesterday, I thought I had a decent grasp of what FETCH was about - and such small things that make you look crazy (starting to talk to the DBMS in natural language is just one of them, believe me) ...

   Well, one bull tamed, and who knows what the next one is going to be ...


main
2/7/2004 9:12:15 PM UTC  #   

  Wednesday, February 04, 2004

Trivia Answer : Memory allocation management in VB.Net

Can memery allocation (non garbage collected) be done with VB .Net ?

Regular answer : No. C# can do unsafe (non garbage collected) code, and VB.Net cannot

Hideous Answer : Well, yes it is far from being Elegant, but as my good friend and impressively clever RD Clemens once told me in the middle of a discussion on .Net vs. COM : "There can be no purity in software development". So here it is :

    There is full set of Memory management APIs (http://msdn.microsoft.com/library/en-us/memory/base/memory_management_reference.asp) that can be used to do memory alocation (both on the heap and on the stack), copy memory, get a handle to allocated memory, ...etc.

    VB can do PInvoke ...

   PInvoking into Kernel32.dll (or Coredll.dll in Windows Mobile) makes VB capable of dealing with such issues... which is only usefull in very special cases (using other APIs accessible through PInvoke and making sure there is no garbage collection on the arguments passed to the native APIs is the only use I ever needed them for - and only because I had to show VB.Net code (besides C# code) in presentations ...).

   It is not very hard to wrap those calls into some Utility class, and then use it for allocating memory and geting the handles to the objects, which can easily make the code somewhat more elegant ...

   Example (MSDN Article by Derek Mitchell) :

http://msdn.microsoft.com/library/en-us/dnnetcomp/html/netcfphoneapi.asp

   Have Fun ...

 


.Net | main | Trivia
2/4/2004 1:39:07 PM UTC  #   

  Saturday, January 31, 2004

Trivia Question : unsafe code in VB.Net ?

Can memery allocation (non garbage collected) be done with VB .Net ?

Use the comments to answer ...


.Net | main | Trivia
1/31/2004 3:00:54 PM UTC  #   

  Friday, January 30, 2004

Its Official, Raise Your Glasses, We’re Gonna Party to Damascus(2)

   I promised I will be telling stories about Cairo, so here it goes ...

    Sleeping by the Pharo's tomb: Patrick, Cigdem, Shiraz and I were down inside the Mycerinus pyramid, and there was a nice guide showing us around the sarcophagus and treasures room. Before going back up, they all tipped the guide (I must confess, I was a bit miserly on that one). The guy was so happy with the tipps, and was telling us if there was anything else he could do for us … Well, Patrick asked if we could sleep by the toumb, and I seconded his joke … off course, everybody laughed and we left. Later on that day, Patrick found out he had made a mistake while tipping the guide, and gave him more than he thought he did. So we figured we had a good start on bribing him into letting us sleep by the tomb … Maybe next time, who knows ?

   Can I have some Hummus please ? on Sunday, Steven was going crazy about Hummus, and not accepting to have been in Cairo for more than 24 hours without having it. The problem is that we were at an Indian Restaurant at the Oberoi hotel in Giza (close to the pyramids). So he kept asking for Hummus, and they kept telling him again and again that this was an Indian Restaurant. Since he wouldn't stop asking for Hummus (which is simply the arabic word for Chick Peas), they brought that bowl with Chick Peas in a sauce ...

    Cigdem’s pyramids : The first day, when we went to the pyramids in Giza, we didn’t really buy any souvenirs (except for the perfumes I will talk about later on). When we (I believe it was Cigdem, Patrick and I) went to Memphis and Sakkara on Tuesday, she needed to get some presents for family and friends, and was looking at pyramids. She finally closed a nice deals on some small pyramids, and since she thought she got a nice deal, she took two sets of three pyramids each. Later on the same day, at Khan El Khalili (After the closing session at MDC), she was thinking she would need more presents, and spontaneously started thinking of getting more pyramids … after strolling about a certain number of shops, she finally found one that had the same pyramids she had bought in the morning, but they wouldn’t sell them to her for the same price. There came Stephen, who started to bargain for her. To make the story short, he started, at one point, to propose a Yukon DVD for the pyramids, and the shop owner refused. Well, it was a great laugh, and Cigdem got her 3 new sets of 3 pyramids each (I joked about her using them as Lego pieces) …

   The American selling souvenirs at Khan El Khalili : this story actually started when Stephen started to bargain for the rest of the gang. At one shop, he started (again) to offer Yukon and Whidbey DVDs for souvenirs, and while squeezing the shop owner so much on the prices, the guy simply told him that he would like to see him selling the stuff and whether he would still be talking about the same prices (I spare you some details that I have to sensor, both to avoid wrath from Steven, and because this blog is not adult only content …). Anyway, here is Steven selling the souvenirs, trying to get the walkers by to buy his stuff, and making the bargaining a blast … one great moment was when another shop owner (or so he said) stopped by, and Steven offered him a Yukon DVD for his entire shop (we never saw the shop or even knew if it existed), and the guy accepted …

   Party to Damascus: Throughout the trip, Steven has been evangelizing … a song. He finally got both me and Goksin singing it with him. So let’s all hum together : Its Official, Raise Your Glasses, We’re Gonna Party to Damascus …

That is just part of the story, and I will probably be blogging about Cairo for quite some time ...


main | Travel
1/30/2004 11:35:58 PM UTC  #   
MDC04 really Rocks ...

   If there is anything all of us speakers at the MDC04 in Cairo agree upon, it is how wonderful the attendees were : very warm, very interesting participation and questions, and an amazing show of appreciation at the closing session. Big thanks to all of them, they really made us all love Egypt even more (if that is possible) than we already did ...


main | speaking
1/30/2004 1:33:20 PM UTC  #   
Mobility session at MDC04

I have promissed to have my slides and demos online by saturday, and since I just got home and haven't had time yet to really package and comment my demos, I am still going to update all the info by tomorrow. For now, here are links to download the slides and the demos "As is" :

http://www.arrabeta.com/malek/Compact%20Framework_final.ppt

http://www.arrabeta.com/malek/Compact%20Framework%20Demos.zip


main | speaking
1/30/2004 1:22:32 PM UTC  #   

  Wednesday, January 28, 2004

Trivia Question Answer

What is the Sphinks looking at (the credits go to my friend Patrick Hynds for thinking of it)

Pizza Hut and KFC ...


main | Travel | Trivia
1/28/2004 9:43:23 PM UTC  #   
Its Official, Raise Your Glasses, We’re Gonna Party to Damascus

MDC04 is over, and it was a great conference, and a very warm atmosphere for all of us speakers.

One great thing about conferences is the get together, and on this one, my good friends Stephen, Cigdem, Goksin and Patrick were here, and I made new Friends ... and that certainly keeps the level of suckiness very low ...

We were a nice gang of RDs and Microsoft People out here in Cairo. Stephen Forte , Patrick Hynds, Goksin Bakir, Cigdem, Lee, Shiraz and I formed a happy gang, that did most of our visiting and shopping together. I have quite a few stories to tell, and I'll catch up with them as soon as I get back home. But to keep suspens high (and to have a chacklist to help me not forget anything), I have stories about sleeping by the Pharo's toumb in the pyramid, the american selling souvenirs in a shop in Khan El Khalili, Cigdem's pyramids, the whidbey barter, partying to damascus, public bargains, and other things as well ...


main | Travel
1/28/2004 1:49:13 PM UTC  #   

  Sunday, January 25, 2004

MDC Office System Sessions (slides attached)

   Today, I did my 3 Office 2003 developer Sessions at MDC, all in a row.  Tomorrow I will be doing a Compact Framework session (I will cover PocketPC and SmartPhone development and I will touch on SPOT).

   This afternoon, I started with Infopath, followed with XML in Word and Excel (including Smart Tag Lists, Smart Docs using the MOSTL XML Lists, and finished with Visual Studio Tools for Office 2003). I have attached the slides (I still will revise then, and pack the demos, then I will post the apdated version) ...

XML in Word and Excel.ppt (805 KB)

Infopath.ppt (1.13 MB)Visual Studio Tools.ppt (1.79 MB)

Visual Studio Tools.ppt (1.79 MB)


main | speaking
1/25/2004 11:44:41 PM UTC  #   
A trivia question

What is the Sphinks looking at (the credits go to my friend Patrick Hynds for thinking of it)


main | Travel | Trivia
1/25/2004 11:13:03 PM UTC  #   
A warm welcome Egyptian style ...

Very simply put, I got to the conference a little bit late (after Billg was already there, although not yet speaking), and was siddered to see lots of people standing at the entrance gates (on the street) and not able to enter. The gates were closed and the guards at the gates didn't understand what being a speaker meant...

I had to stand in the street until the Keynote ended and Bill Gates left before they let us in...

Well, the trip is great, and overall, this really soen't suck ...


main | Travel
1/25/2004 11:03:06 PM UTC  #