Syndication

After 15 years at Sela I decided to take a new path. Sela was a home and family, I enjoyed being part of this family for all those great years. I don't say goodbye, I will continue to give lectures at Sela and jump from time to time. This is the time to thank Dudu, Caro, Ishay and to all other employees or shell I say friends.

Erez and I with another 9 great professionals are establishing a new software company - CodeValue. Our target customers are people like us, professional developers who need to utilize new technologies. Our products are developer tools and software foundation. We think that the infrastructures that we build again and again in each of our projects can be useful products. We want to make them available to all.

As opposed to a startup company, we decided to sell from the very first day, this is one of the reasons why we will continue to lecture, consult and outsource projects. We are a very strong team that can take an idea and make it a reality. Being in the market also means that we know the actual problems, the missing parts, the tools and foundations that are needed. This will continue to guide us in deciding our future products.

I'd like to wish good luck to two dear friends in their new job, Noam King & Sasha Goldshtein, whom I had very good moments together and I hope that we will continue to cooperate.

As a Microsoft MRD and MVP I liked to thanks to the great people at the local branch of Microsoft. Guy, Maor, Eliaz, Elkana, Michal and many others that were there when I needed something (and vice versa) and I'm sure that we will continue to work together in my new way.

If you have any idea, if you want our company to build your project and share the foundation with us (It can cut your expenses), feel free to contact me.

Posted by Alon | 4 comment(s)

Our user group audience is well educated, built form hi-tech personnel. As such we decided that we can bring a lecture which is not directly related to Windows programming, but it is interesting and educational in general. Come to hear Dr' Kobi Scheim lecture about the next generation of the cellular network & phone.

After the lecture that Gadi Meir gave about the need of parallel computing, in the second half of the meeting, I will give a more practical lecture about ConceRT and PPL, the parallel pattern library of Visual Studio 2010. If you are moving to VS 2010 and you want to leverage the power of the modern CPU in C++, this lecture is a must for you.

Hope to see you all.

Registration Link

Alon

Posted by Alon | 1 comment(s)

Recently I have been doing a very sophisticated Silverlight project. In this project there was a need to capture the screen and to save the image in a data base. The known way to capture a screen is to use a WriteableBitmap class instance (See Jeff Prosise blog about this feature that was added in SL 3.0). To capture the screen we use the code from http://stackoverflow.com/questions/1139200/using-fjcore-to-encode-silverlight-writeablebitmap 

The following code is a service that captures the screen image:

 

    public classSnapshotService : ISnapshotService
   
{
        public byte[] Capture()
        {
            var bitmap =  newWriteableBitmap(Application.Current.RootVisual, null);
           
            returnSaveToArray(bitmap);
        }

        private static byte[] SaveToArray(WriteableBitmap bitmap)
        {
            int width = bitmap.PixelWidth;
            int height = bitmap.PixelHeight;

             const int bands = 3;
            var raster = new byte[bands][,];

            //Code From http://stackoverflow.com/questions/1139200/using-fjcore-to-encode-silverlight-writeablebitmap
          
for(int i = 0; i < bands; i++)
            {
                raster[i] = new byte[width, height];
            }


            for(int row = 0; row < height; row++)
            {
                for(int column = 0; column < width; column++)
                {
                    int idx = (width * row) + column;
                    if(idx > 0)
                    {
                        //NOTE: this might fail due to pixels which might be considered as 'not trusted' and
                      
// therefore the access to these pixel will be denied
                        // "WriteableBitmap has protected content. Pixel access is not allowed."
                      
int pixel = bitmap.Pixels[idx];

                        raster[0][column, row] = (byte)(pixel >> 16);
                        raster[1][column, row] = (byte)(pixel >> 8);
                        raster[2][column, row] = (byte)(pixel);
                    }
                }
            }
 
            var model = new ColorModel { colorspace = ColorSpace.RGB };
            var img = new FluxJpeg.Core.Image(model, raster);

            //Encode the Image as a JPEG
           
var stream = new MemoryStream();
            var encoder = new JpegEncoder(img, 60, stream);
            encoder.Encode();

            //Back to the start
           
stream.Seek(0, SeekOrigin.Begin);

            //Get teh Bytes and write them to the stream
           
var binaryData = new Byte[stream.Length];
            stream.Read(binaryData, 0, (int)stream.Length);
            return binaryData;
        }


        public BitmapImage Decode(byte[] image)
        {
            if (image == null) return null;
            var b = new BitmapImage();

            using (var stream = new MemoryStream(image))
            {
                b.SetSource(stream);
                return b;
            }

        }
    }

The main problem with this method is that it is not always work. We use Bing map control and Media Elements in our Visual Tree, This causes the line   int pixel = bitmap.Pixels[idx]; to throw Security exception. The exception is there to protect against violating of Digital Rights (DRM) and it is by design. See this link to read more about the problem. First I thought that the problem comes from the fact that the GIS information and the video stream sources come from a site which is not the same as the Silverlight application site. a Cross-Domain policy file should solve this kind of problems. Cross Domain Policy file should come from the site that contains the elements that get rendered on the visual tree. In this case we cannot control the source site and further investigating proved that cross-domain file is useless for this problem. Since the project was a prototype and we ran out of time a radical solution emerged. I decided to use another known Silverlight application that will run on the client and will take a screen capture of the IE tab from the outside. To capture an IE tab, I had to find the IE tab Windows handle, I played with Spy++, understood the relationship between windows under IE, found out that the Window class of Silverlight is “MicrosoftSilverlight” and created the FindFrameWindow method. The rest is just a Win32 BitBlt and WinForm Bitmap/jpeg support:

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Text;
using System.IO;

namespace G2ScreenCapturer
{
    class Gdi32
    {
        [DllImport("GDI32.dll")]
        public static extern bool BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop);
        [DllImport("GDI32.dll")]
        public static extern IntPtr CreateCompatibleBitmap(IntPtr hdc, int nWidth, int nHeight);
        [DllImport("GDI32.dll")]
        public static extern IntPtr CreateCompatibleDC(IntPtr hdc);
        [DllImport("GDI32.dll")]
        public static extern bool DeleteDC(IntPtr hdc);
        [DllImport("GDI32.dll")]
        public static extern bool DeleteObject(IntPtr hObject);
        [DllImport("GDI32.dll")]
        public static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
        [DllImport("GDI32.dll")]
        public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);
    }

    class User32
    {
        public delegate bool EnumFunc(IntPtr hWnd, uint lParam);

        [DllImport("User32.dll")]
        public static extern IntPtr GetWindowDC(IntPtr hWnd);

        [DllImport("User32.dll")]
        public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDc);

        [DllImport("User32.dll")]
        public static extern bool EnumChildWindows(IntPtr hWndParent, EnumFunc ef, uint lParam);

        [DllImport("User32.dll", CharSet = CharSet.Auto)]
        public static extern int GetClassName(IntPtr hWnd, StringBuilder text, int nMaxCount);

        [DllImport("User32.dll")]
        public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

    }

    class ScreenCapturer
    {
        public static byte [] CaptureScreen()
        {

            var hWndSrc = FindFrameWindow();
            var hdcSrc = User32.GetWindowDC(hWndSrc);
            var hdcDest = Gdi32.CreateCompatibleDC(hdcSrc);
            var hBitmap = Gdi32.CreateCompatibleBitmap(hdcSrc,
                                                       Gdi32.GetDeviceCaps(hdcSrc, 8), Gdi32.GetDeviceCaps(hdcSrc, 10));
            Gdi32.SelectObject(hdcDest, hBitmap);
            Gdi32.BitBlt(hdcDest, 0, 0, Gdi32.GetDeviceCaps(hdcSrc, 8),
                         Gdi32.GetDeviceCaps(hdcSrc, 10), hdcSrc, 0, 0, 0x00CC0020);
            var result = GetImage(hBitmap);
            Cleanup(hdcSrc, hBitmap, hdcSrc, hdcDest);
            return result;
        }

        private static void Cleanup(IntPtr hWndSrc, IntPtr hBitmap, IntPtr hdcSrc, IntPtr hdcDest)
        {
            User32.ReleaseDC(hWndSrc, hdcSrc);
            Gdi32.DeleteDC(hdcDest);
            Gdi32.DeleteObject(hBitmap);
        }

        private static byte [] GetImage(IntPtr hBitmap)
        {
             var capture =
                new Bitmap(Image.FromHbitmap(hBitmap),
                           Image.FromHbitmap(hBitmap).Width,
                           Image.FromHbitmap(hBitmap).Height);

            var temporaryimageFile = Path.GetTempFileName();
            capture.Save(temporaryimageFile, ImageFormat.Jpeg);

            byte[] result;

            using (var file = File.OpenRead(temporaryimageFile))
            {
                result = new byte[file.Length];
                file.Read(result, 0, (int)file.Length);
            }
            File.Delete(temporaryimageFile);
            return result;
        }

        private static IntPtr FindFrameWindow()
        {
            IntPtr frameHWnd = IntPtr.Zero;

            var ieWnd = User32.FindWindow("IEFrame", "Title - Windows Internet Explorer");

            User32.EnumChildWindows(ieWnd, (hWnd, lp) =>
            {
                var text = new StringBuilder(500);
                User32.GetClassName(hWnd, text, text.Capacity);
                if (text.ToString() == "MicrosoftSilverlight")
                {
                    frameHWnd = hWnd;
                    return false;
                }
                return true;
            }, 0);
            return frameHWnd;
        }
    }
}

But this is not the end of the story. I needed to pass the captured data to the Silverlight application. I decided that my WinForm app will host a WCF Silverlight friendly service. To do so, I had to deal again with the cross-domain policy file. Thanks to WCF Rest support I could have add a cross-domain policy to a self-hosted service:

  [ServiceContract(Namespace = "http://localhost:8086/")]
  public interface ICrossDomainService
  {
      [OperationContract, WebGet(UriTemplate = "/crossdomain.xml", BodyStyle = WebMessageBodyStyle.Bare)]
      Stream GetPolicy();
  }

  [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, Namespace = "http://localhost:8086/")]
  public class CrossDomainService : ICrossDomainService
  {

      #region IPolicyRetriever Members

      [OperationBehavior]
      public Stream GetPolicy()
      {

          const string result = @"<?xml version=""1.0""?>

              <!DOCTYPE cross-domain-policy SYSTEM 

                   ""http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"">

              <cross-domain-policy>

                  <allow-access-from domain=""*"" />

                  <allow-http-request-headers-from domain=""*"" headers=""SOAPAction""/>

              </cross-domain-policy>";

          WebOperationContext.Current.OutgoingResponse.ContentType = "application/xml";

          return new MemoryStream(Encoding.UTF8.GetBytes(result));

      }

      #endregion

  }
 

The Capture Service:

   [ServiceContract(Namespace = "http://localhost:8086/CaptureService/")]
   public interface ICaptureService
   {
       [OperationContract]
       byte[] Capture();

   }

   [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, Namespace = "http://localhost:8086/CaptureService/")]
   [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
   class CaptureService : ICaptureService
   {
       private readonly CaptureForm _form;

       public CaptureService(CaptureForm form)
       {
           _form = form;
       }
       [OperationBehavior]
       public byte[] Capture()
       {
           var capture = ScreenCapturer.CaptureScreen();
           return capture;
       }
   }

 

The self-hosting code:

 

       private void StartServiceHost()
       {
           var host = new ServiceHost(new CaptureService(this), new Uri("http://localhost:8086/CaptureService"));
           var httpBindingElement = new HttpTransportBindingElement();
           var binaryMessageEncodeing = new BinaryMessageEncodingBindingElement
                                            {
                                                MaxReadPoolSize = int.MaxValue,
                                                MaxWritePoolSize = int.MaxValue,
                                                MaxSessionSize = int.MaxValue,
                                                ReaderQuotas =
                                                {
                                                    MaxArrayLength = int.MaxValue,
                                                    MaxBytesPerRead = int.MaxValue,
                                                    MaxDepth = int.MaxValue,
                                                    MaxNameTableCharCount = int.MaxValue,
                                                    MaxStringContentLength = int.MaxValue
                                                }
                                            };

           var elementCollection = new BindingElementCollection
                                       {
                                           binaryMessageEncodeing,
                                           httpBindingElement
                                       };

           var binding = new CustomBinding(elementCollection)
                             {
                                 SendTimeout = TimeSpan.FromMinutes(30),
                                 ReceiveTimeout = TimeSpan.FromMinutes(30),
                                 CloseTimeout = TimeSpan.FromMinutes(30),
                                 OpenTimeout = TimeSpan.FromMinutes(30),
                                 Namespace = "http://localhost:8086/CaptureService"
                             };


          host.AddServiceEndpoint(typeof(ICaptureService), binding, "");

           

           var mex = host.Description.Behaviors.Find<ServiceMetadataBehavior>();
           if (mex == null)
           {
               mex = new ServiceMetadataBehavior {
                   HttpGetEnabled = true
                   
               };
               host.Description.Behaviors.Add(mex);
           }
           var debugBevior = host.Description.Behaviors.Find<ServiceDebugBehavior>();
           if (debugBevior != null)
           {
               debugBevior.IncludeExceptionDetailInFaults = true;    
           }
           else
           {
               host.Description.Behaviors.Add(new ServiceDebugBehavior() {IncludeExceptionDetailInFaults = true});
           }
           

           host.AddServiceEndpoint(
              typeof(IMetadataExchange), binding, "MEX");

           //run as admin or:
           //netsh http add urlacl url=http://+:8086/CaptureService user=…
           host.Open();


           var policyHost = new ServiceHost(new CrossDomainService(), new Uri("http://localhost:8086/"));
           
           var webHttpBinding = new WebHttpBinding
           {
               CrossDomainScriptAccessEnabled = true,
               Namespace = "http://localhost:8086/"
           };

           var policyEndPoint = policyHost.AddServiceEndpoint(typeof(ICrossDomainService), webHttpBinding, "");
           policyEndPoint.Behaviors.Add(new WebHttpBehavior());
           
           //run as admin or:
           //netsh http add urlacl url=http://+:8086/ user=…
           policyHost.Open();
       }

Now, in the Silverlight application I try to capture the screen using the “Correct” SIlverlight WriteableBitmap based method. If I catch an exception, I connect to the capture service and get the image from there. Ugly but works!

 

Last but not least, if you need to use WriteableBitmap for other purposes, take a look at this project: WriteableBitmapEx

In the last Dev Academy I have given a lecture in the TDM (R&D Manager) track about Software Porting, The Why, When, and How.  During the lecture I have talked about many different migration scenarios: from VB 6.0 to C#/VB.NET. From VC++ 6.0 to VC 2008/2010, From Unix/Linux to Windows, From old .NET to new .NET etc. I have talked about the porting project, best practices and tools. This is the link to the lecture’s slides. There are many useful links inside it. This is the link to the lecture video recording (sound track in Hebrew).

When we look at the mobile phone market, can we project from it about the future of software? Is Windows 8 going to be a closed system? Will we as developers need to upload all our applications to an App-Store or Marketplaces? Will we have Multitasking?

File:Dynabook.pngLet's look at the iPad, a big iPhone or better a big iPod? Let's say that it will sell more than Windows PC based Tablets. What does it say to Microsoft? Microsoft has pushed the tablet idea since the release of Windows XP tablet edition. Of course the idea about hand-writing recognitions goes back to 1888, and the tablet idea almost as we know it today was invented by Alan Kay, called the Dynabook. But Microsoft believed in it and made it real, and now we may get a large version of Windows Phone 7 instead.

Don't think that I'm not excited by the new Windows Phone 7, I do, but I'm also worry. A managed based platform will be much more stable and the developing tools are great, .NET, Silverlight, XNA. But wait, what about portability? Can we program with the same tools and languages to all platforms. As a C++ MVP I must tell you that history has proved that the main portable language is C and C++. Look at game development for example. You can use standard C++, standard and other libraries that have version for each platform. You can #ifdef and #include your specific platform files to adapt your application. But today I've heard that Apple will not let you build an IPhone app using C++ or even C#. Got the point, totally different code-base to iPad, gPad and mPad. Or do I see an opportunity, a high level compiler from C++ to C#, Objective C and Java?

What about programming for fun? I developed my own applications for my Windows mobile devices, for example I control my home using my phone or my wife's phone. Now I will have to upload my own application to the Phone Marketplace to be able to install it on my wife's phone. Windows Phone 7 is great, but it also marks the death of Windows Mobile, and this came when finally we have great devices such as the HTC Touch-Pro II and the HTC HD II that everyone that uses them says that they are very good and solid phones.

I don’t think that Windows 8 will not have multi-tasking, after all my laptop has 8 logical processors, but I do think that we will be bind to a specific technology more than ever, be it in the small form factor (phones), the PC or the Cloud. If we want to support all platforms, we will have to work much harder, and share our sells with Apple, Goggle and Microsoft. This might be good for small and medium companies, but what about big companies that have their own marketing system, this also means that software may cost more.

תראו את הכתבה הזו:

image

 

דרך אגב זו כנראה הכתבה המקורית:

image

Posted by Alon | 1 comment(s)
תגים:, , ,

One of the new features of VS 2010 is the new Help system. During the MVP Summit we have introduced to the new system which has very good foundation, but the viewer that comes with VS 2010 is lack of many features that we used to have and loved such as the TOC, Index, Synch TOC, etc.

image

 

Fortunately there is a tool (H3Viewer) that provides the missing features:

image

 

In the site you can also find the mshcMigrate tool that enable the migration of old MS Help files to the new platform.

 

Enjoy…

Posted by Alon | 1 comment(s)

In the last Dev Academy I have given a lecture in the TDM (R&D Manager) track about Software Porting, The Why, When, and How.  During the lecture I have talked about many different migration scenarios: from VB 6.0 to C#/VB.NET. From VC++ 6.0 to VC 2008/2010, From Unix/Linux to Windows, From old .NET to new .NET etc. I have talked about the porting project, best practices and tools. This is the link to the lecture’s slides. There are many useful links inside it.

image

Posted by Alon | 3 comment(s)
תגים:, , , , , , ,

גם מדורי מחשבים בעיתונים מתנהגים כמו מדורי פוליטיקה בבואם לבחור כותרת לכתבה.

לדוגמא, הכותרת הבאה:

“אליפות ההאקרים: רק הכרום עוד נותר על רגליו”

ואז בתוך הכתבה:

image

לדעתי גם SkyFire לא נפרץ היות שלא לקח חלק בתחרות…

Posted by Alon | 2 comment(s)
תגים:

Don’t forget to come today to the WPD user group to hear Sasha & Gadi.  Gadi is going to talk about parallel programming and Sasha is going to talk about developing native application with the next version of Visual Studio.  We are lucky to have two very talented lecturers in one evening. 

 

This is the agenda for today:

Agenda

17:00-17:30
Gathering
17:30-17:45
PDC Essentials – Alon Fliess

17:45-19:00
Introduction to the parallel world – Gad J. Meir
19:00-19:15
Break

19:15-20:30
Moving C++ Applications to Visual Studio 2010 – Sasha Goldshtein

Sessions abstracts:

Introduction to the parallel world
The world is moving to multi core architectures. Four core CPUs are cheap and freely available today, cheap eight core CPUs are just around the corners. You can buy hybrid system of up to 256 cores (for the right price) today. The availability of multi core on every desk raises a paradigm shift. The software is expected to use the vast amount of cores properly and wisely. As a direct result, parallel processing area is experiencing a boost. Moving to parallel processing is not a simple process. It is much more difficult than multi-threading and has some unique complication. In this lecture, we will discuss the basic principles and hurdles of parallel processing and the different approaches available today in the market.  Terms like CPU architectures, Threading and Hyper-Threading, NUMA, SSE, Open MP, TBB, Concurrency Runtime, Sync and Async methods of operation and many others, are going to be and explained
.(and placed in the proper context. (Managed code, F# and PLINQ are not the focus of this talk


Moving C++ Applications to Visual Studio 2010
Visual Studio 2010 is “The New 6” – celebrating a release that has significant improvements for native code developers, as well as a partial implementation of the C++0x standard (draft). C++0x is a major upgrade to the C++ language, including first-class functions and closures (as lambdas), automatic type inference, r-value references and many others. While porting Windows applications to Visual Studio 2010, you might also want to consider moving to 64-bit – faster compilers, a better instruction set, a larger address space and many other benefits are a strong incentive to perform the port. In this session, we will discuss the new C++0x features, see some of the neat new things in Visual Studio 2010 for C++ developers, and highlight the major challenges in porting code to 64-bit compilation

We are continuing to create contents that help to explain the new features of Windows 7 to the developers' community. This time we record set of short screen casts that include a presentation and one or two demos. To create those screen casts we have distributed the work between different people at Sela. Each person creates the presentation and the demos. This goes to Redmond for feedbacks. When they approve the content Sasha does the actual recording. So, last Wednesday I had to build the material for the Federated-Search screen cast. I wanted to have a new demo, not to have the same SharePoint demo that we always use when talking about this subject (The SharePoint demo is cool and great, but I wanted to have something cool and new), so I have decided to have a Federated Search sample or the IMDB. Searching for a web-service interface for IMDB, I have found that they don’t expose one; however there are some good wrappers in the web. I spent few hours implementing a movie federated search that gives the titles, cast, directors, writers, etc. with the pictures and links. A good one!

During the day my Home Server started to complain about file-conflicts. File conflict in Windows Home Server is something that might be nothing, or might be everything. One reason to have a file conflict is the case that one or more of the computers at home has an open handle to a file for long time. Having this handle prevents some of the home server house-keeping capabilities. This is the good case. The worst case is that you have a hard-disk failure. And of course this was my case. I have found out that one of the new hard disks that I added to the server a week before is starting to fail. Since all my files are duplicated, I wasn’t afraid. To find the failed disk I had to look for those files that are in conflict. Remember that they are duplicated, which means that they exist on two different hard disks. Having more than one file in conflict makes it easy to find the specific disk (There is also this add-in that can help). To be sure I triggered Check Disk on that disk (You can assign drive letter and use the regular system tools or command line with that disk). Check Disk has found some errors that cannot be fixed! When you can’t fix a drive, removing it became a tedious task. You ask WHS to remove the drive, it calculates the free space that you have on your other drives and if it is enough it starts to move files. The problem is that the disk that you want to remove has some bad-blocks that cause the process to be very long and to fail in the middle. So you try it again and again.

I continue to work on the Federated Search screen cast while trying to remove a 1TB disk from my home server. The time was around 02:00 am when my computer, the one that I was developing the screen cast, got hang. I didn’t know what has happened, but I have told to myself that the since I have compiled the demo, Visual Studio has saved the last version and also the slides were saved (An old habit of pressing Ctrl-S from time to time, and of course PowerPoint auto save…). What I haven't taken into account was that the last backup of my computer was from the day before, and that since the WHS was busy trying to remove a hard disk it had not done any backup this night.  I tried to bring my home computer back to life and what I see is that my raid controller tells me that it cannot build the raid array since it finds only one hard-disk. On my home computer I had a raid 0 configuration of two 512GB hard drives. I did it from performance reason. Having raid-0 means that the MTBF is half, but I didn’t care since my computer has a backup every night.

Now I started to sweat, I tried to bring the dead disk to live, using some magic words, cooling it with condense air spray, reconnecting the power and SATA cables, talked with the disk, talked to god, nothing… no disk.

I went back to my home server and looked at the files that were corrupted. One of them was a .dat file. This was bad. .dat file is a data file that belongs to the computer backup database. If this one belongs to the backup information of my home computer… It was around 3 am, I decided to run ChkDsk again to see if I can fix the .dat corruption since there is no duplication for the computer backup database. (There is an undocumented registry entry that enables duplication of computer backups and I have knew about this flag, but I have decided that this will make a third backup and that it will also consume another TB of disk and make the home server very slow).  ChkDsk for a 1TB disk takes hours. I knew that event if I could restore my home computer, the Federated Search screen cast materials have gone. So I took my laptop and started to develop the Demo and slides again, as long as my memory is fresh…

Since the IMDB service that I was used were a RESTful service, I had to deal with XML extracting. I could use XSLT, but I went with LINQ to XML and heavy work with XPath. The problem with XML is that it takes time to figure the right pattern and location. This is usually a trial and error task, and I knew that even that this is the second time that I am going to implement it, it will take a long time. So I tried to connect to the IMDB service that I’ve used before, but the service was not there. Instead I have found a blog post telling that the service is down due to too many requests. (Might be my fault). I have decided to develop a different demo.  This time I searched for a weather information. Luckily I have found the WeatherBug has a great service interface, both RESTFul and Soap. I have registered to the service and started to read about the API. When you register to WeatherBug, you have to wait about half an hour before you get the access to use the API. I have used this time to check my ChkDsk status. I have found that ChkDsk has found a problem with the .dat file and recovered some bad clusters in it, this gave me some hope, but ChkDsk still had a long time to go, so I’ve got back to my laptop. I have found out that you can search in the WeatherBug database using a city name for any city in the world and using US zip code for any city in the US. So I decided that this will be the search criteria in my Federated Search provider. I have also decided that the result will be all the cities that their name is sound like the search criteria with their current weather condition. If the user will pick one result entry, I will present the forecast of that location. Building this solution was much easier than my lost IMDB Federated Search provider. I have used the SOAP API.

image 

Source code will be given when the screen cats will be published!

Back to my Home Server. The time was 05:00 AM, ChkDsk had not finished yet, I decided to have some sleep.

Thursday, 09:00 am, I woke up, logged into the Home Server console and ask it to remove the disk again.   Than I went to the computer store and bought three new 640GB hard disks, this time I will have Raid-5, I have learned my lesson. I came home to find out that the WHS console failed again to remove the disk, but this time the console itself had an unhandled System.IO exception. I had to restart the server to be able to run the WHS console again. Looking at the files that were left in the failing drive, I have discovered that there were no .dat files there! I connected the three new disks to my home computer and configure them to be part of a raid-5 array. Now I had to wait for the home server to complete its disk removal, so I will be able to restore my home computer. But the WHS console has an unhandled exception again and again. I decided to first recover my home computer and later to continue and remove the hard disk from the server. I have started the WHS recovery disk; I have used the advance file management tool to create the needed partitions (I had three) and started the recovery process. WHS has told me that it is going to take 4 hours; thank god I have a Gigabit Ethernet. Instead of waiting in front of the restore wizard, I took my wife and kids to eat lunch and see a movie. After all it was a vacation day.

When we were back at home, the wizard told me that the restore was done. I reboot my machine, and I’ve got it back! yes, one day is missing and I had to re-built outlook pst file from Sela exchange server (about 5 GB pst file) since Outlook can not use an old pst file for some reason. Maybe the WHS team and Office team need to think about a solution for this problem.

The performance of the new Raid-5 is not bad at all:

HDTune_Benchmark_NVIDIA__RAID5______1.16T

After I had my computer back, I connected to the WHS using its WHS console. This time the console had not got the annoying unhandled exception, but it refuses to remove the disk since it had files that cannot be removed, because of the corruption. I have decided to physically remove the disk from the WHS. But how do I find the specific disk. I had three disks from the same model. What I did is started a new boot-time check disk, and while check disk was working I pooled out the SATA cables one by one of each disk until ChkDsk started to show thousands of errors.

I took the disk and connected it to my home computer using an External SATA. HD Tune Error Scan has found many damaged blocks! This is a new Disk! Only a week in use!

image

One thing nice about Windows 7 is that when HD Tune found the first damaged block, Windows 7 showed this message:

image

 

I have replaced the disk with a new 1TB disk, and now my WHS is happy again:

image

 

image

 

So, who says that life is easy, but I won the war. Of course I have lost one IMDB Federate Search provider in the battle.

Sitting most of the time near to Sasha Goldshtein leave no room for a another good post related to the PDC lectures content. Beside the keynotes most of the lectures that I attend are the FT – Future technology. The main message of the conference is that we are at the beginning stage of evolving from SOA based applications to Cloud based. Be it a global or private Cloud. Combine the server side features of the Cloud such as Hosting, Storage, SQL Server on the Cloud, Virtualization and Management with the new abilities of Silverlight and ASP.NET 4.0, you can see were Microsoft is heading. The ability to run C++ code, use T-SQL as well as hosting PHP and Java on the Cloud means that Microsoft provides the foundation to easily porting applications to the Cloud. As opposed to previous PDC events that used to provide a taste about the technology that will come in three years, this PDC deals with current and next year technology. In one hand it’s a pity, but in the other hand we can start to develop our next applications using the new tools.

Beside the content you can see that in this PDC Microsoft decided not to waste money on less important stuff such as food and the traditional party. Instead I am writing this post on a new multi-touch based Acer laptop that was given to each of the attendees. Those who know me, knows that I have two laptops, think about the security check at the airport – I need to use three trays now!

Posted by Alon | 1 comment(s)

39,000 feet, no Internet, no phones, on the way to PDC 09. I am sitting in the plain with Sela COO, which also happens to be my brother (Nepotism!). This is the first time in this week that we can relax and enjoy the flight, yes it is sound strange but I hope that it will be a looooong flight. This is not my first PDC, actually this is the third time that I attend the conference. However the numbers of attendees from Sela rise exponentially. In 2005 there were two of us (Noam King and myself), last year we were 7 (Joined us Noam Sheffer, Adar Wessely, Sasha Goldshtein, Ariel Ben Horesh, Tomer Shamam) and this year we are 17. (Too long list…). Left at home many other Sela experts that easily could join us (Some of them didn't think about the PDC 9 months ago, Some wanted to attend Mix 10), So there is a good potential for next PDC. This year we also have a booth. Erez (Sela COO), Ishai (VP) and Dudu (CEO) will show to the world the strength of Sela and the Israeli high-tech industry. The PDC event is a milestone for us. It concludes the work that we did in the last year for Microsoft DPE, and it is hopefully a starting point for more projects. Last year, right after the PDC four of us flew to Redmond to start the Windows 7 Training Kit For Developers and WPF labs projects. This year Ishai and Dudu visited Redmond before the PDC. I wonder if the projects that they bring today will be also revealed in a year from now.

A short shopping list of what we achieved between the two PDCs:

  1. We are the major vendor in CWL
  2. We have prepared with Redmond DPE the Windows 7 Metro materials
  3. We have helped with developing the WPF Metro labs
  4. We have delivered Metro courses (Windows 7, WPF, Silverlight, and Azure) around the world: USA, Israel, Hungary, Australia, New-Zealand, India, Sweden, Turkey, and Portugal.
  5. We have developed a demo application called XP2Win7 that demonstrates the new features of Windows Vista and Windows 7
  6. We have prepared the Windows 7 developer launch event
  7. We are recording a video streaming based course on the new features of Windows 7.
  8. We are developing a demo game that shows how to share most of the code between WPF and Silverlight.
  9. We have done some other interesting projects that are still under NDA with Microsoft.
  10. Sasha and I have joined Yochay and Lourance from Redmond DPE and publish the "Introducing to Windows 7 for Developer" book. (Go and buy it!)
  11. We are developing the next WCF 4.0 MOC for Microsoft learning.

One of the nice things about the work that we have done for Microsoft is that many experts had the chance to participate. For example XP2Win7 started with Josh, Sasha Goldshtein, Dima and me, Noam Sheffer, Kosta, Tomer Shamam and Ariel Ben Horesh had joined in the middle and the last milestone was mainly developed by Bnaya , Ram Dayan, and Guy Rozen.

It is very nice and fun to have so many people from Sela. Usually we don't get to see each other very often beside mail and Messenger (@3 AM and weekends – geeks!). We all have demanding projects (and clients).

Beside education and fun we also have two main goals from the conference:

  1. To be ready to the coming SDP and to bring the knowledge right from the source. This is especially important this year because of the fact that there is no Tech-Ed.
  2. To be technology up-to-date. As a consultant and education company we must be one step ahead of the industry. It is a shame that we are the only consultant and training company in Israel that think that even in these hard times it is important to invest in the most important resource of the company (Human Resource).

Do remember that people that couldn't make it to the PDC can still hear about the new technology In the SDP. Those who are in the PDC, come to our booth, you have the chance to draw a 25.5” HP TouchSmart all-in-one computer!

Posted by Alon | 2 comment(s)

Unlike my old Jasjar that I have upgraded several times using baked ROM from XDA, this time I decided not to loose HTC warranty and to do it the right way.  For that I had to have the Windows Mobile 6.5 ROM. Trying to download it from HTC support web site I have found that my device is not built for the US (although I have bought it in the US). I have called the USA HTC support. I provided my serial number and got the origin of my device. It is a Philippine device, the ROM will be there in few days. I waited about a week until Noam Sheffer told me that they have released the ROM for this region. I have downloaded the ROM. To make sure that I will have the Eyron Hebrew support, I have asked them for a WM 6.5 version. They were kind to send me a link to download the Hebrew support file, however they have told me that they don’t know if it will work on the Touch Pro II. Since I am using the Exchange server of Sela to sync my device, the only backup that I needed was to the favorite, pictures, music, video, SMS and such (PIM). The easiest way to have this backup is to install (Thank Noam) the new MyPhone support. After doing all the synchronization and also using another backup application I started the ROM upgrade.

Upgrading the Rom is a process that can turn your device to a brick. According to HTC you have to close any application that runs in your desktop computer. They (and you) don’t want the computer to hang, sleep, re-boot or BSOD while you do the upgrade. My suggestion is to do the upgrade using a laptop or a machine with UPS (which can hold at least 10 minutes).

image

 

 image

image

From this steps I stopped taking screen shots and used my camera instead (for a good reason).

The device started the installation:

image image IMG_5310

There was something like pause or reset in the middle, but everything was O.K:

IMG_5313 

After the last reboot, a Windows Mobile 6.5 setup program has started.

image

After a while a Wizard asked me to setup the device and a tutorial explained how to use the keyboard.

image image image

 

IMG_5323 image

I have also set the Exchange server account and got all my contact, calendar and mail. I have not got the favorite contacts and I have to set them manually again. To get the videos, picture, music and text messages (SMS) I have connected to MyPhone. This time I did not need to install the MyPhone software since it comes with the Windows Mobile 6.5. However it has installed an update before it started the synchronization.

 

image

I have checked the device including the TouchFlow Music tab. It works well. I used to have a problem before with the Music Tab showing “No Music Found”. I have suspected that it is a bug of the Eyron Hebrew Support.

Once I have connected the device to the desktop I have installed the Eyron Hebrew. The installation went very well. But guess what, the Music Tab bug still exists, installing the Hebrew support makes it unusable!

Beside the bug, the Hebrew support is very good. Not everything has been localized but for me it is fine since I use the Hebrew enabled with the English user interface.

So, what is my first impression of Windows Mobile 6.5? It looks good, almost Identical to WM 6.1. There are several good changes in the usability of the device. Many controls are bigger and easier to handle with the fingers. Bear in mined that HTC hides most of the original Microsoft User Interface with the TouchFlow 3D. One can notice the changes in the program (choosing the start) and in the settings tab.

I think that I’m correct when I say that the Asus Eee PC T91MT is the smallest and cheapest multi-touch enabled computer.

ASUS Eee PC T91MT-PU17-WT Tablet White Netbook - 5 Hour Battery Life (Windows 7 Home Premium)ASUS Eee PC T91MT-PU17-WT Tablet White Netbook - 5 Hour Battery Life (Windows 7 Home Premium)

I haven’t got the chance to check it (Probably I will very soon) but to pay about $100-$200 more than equivalent netbook and be able to play with multi-touch and demonstrate the Windows 7 touch capabilities, this is a good deal. The drawbacks: it’s pity that the hard disk is small (32 GB) and also they could have better screen resolution (1024 X 600) and also a better CPU. In a second thought small screen resolution can give better experience with the multi-touch interface because the graphics accelerator and the CPU need to do less work when they need to draw the result image. $532 for a netbook is quiet expensive! $532 for a Windows 7 multi-touch machine is very cheap!

Posted by Alon | with no comments
More Posts Next page »