Fun With XNA

Wednesday, June 29, 2011

I recently played with XNA. There is a game that I have developed many times, on the Commodore 64 as a kid, on the Commodore Amiga, later on Windows 9X with MFC, after that in .NET and Windows Forms, and now with XNA. The development experience in XNA was the best, and I can run my game on the phone, on Windows and on my XBOX. The goal of the game is to have higher score . Each player moves only in a specific direction (vertical or horizontal). In each turn a player move the...
one comment

Tech Ed Atlanta 2011

Wednesday, May 18, 2011

Now, after Shy & I have delivered the Cost Oriented Development lecture, I can relax and post a little bit about this conference. Tech Ed 2011 is a really BIG conference. The Georgia World Conference Center is huge, and even thousands of attendees can not fill it. The Expo is twice larger than it was in the last LA PDC and you can see that companies that present here invest a lot. The audience is a mixture of IT professionals and developers. CloudValue, the CodeValue subsidiary company has a booth. We present our new cost online service tracking tool...

C# – Copying a structure to byte array as is, and back

Wednesday, March 16, 2011

A customer asked me today how he can serialize a structure to a byte array for sending to hardware controller. The controller requires that the structure will be sent as is, with no padding or packing. As long as he sure (we dealing with unsafe code) that the data is correct and the size if fine, he can do the following:using System;using System.Collections.Generic;using System.Linq;using System.Net.Sockets;using System.Text;using System.Runtime.InteropServices; namespace ConsoleApplication20{        internal struct MyStruct    {        public byte c;        public int a;        public ushort b;    }    class Program    {        static unsafe void Main(string args)        {            var s = new MyStruct { c = 1, a = 7, b = 15 };             int length = Marshal.SizeOf(s);            // or this            int size = sizeof(MyStruct);             var b = new byte;            Marshal.Copy(new IntPtr(&s), b, 0, size);            //And back...            var r = new MyStruct();            Marshal.Copy(b, 0, new IntPtr(&r), size);        }    }}   Don't forget to compile with /unsafe flag.
tags: ,
one comment

Cloudoscope™ – the first Cloud Cost Profiler™

Sunday, November 28, 2010

As you probably know, we have established a new company, and as we said, we aimed to deliver cutting edge products and services to the developers' community. I am proud to announce our vision, methodology and tools that help you developing applications wisely in the era of cloud. There are many reasons to move to the cloud, for example, this is taken from the Windows Azure site: "Efficiency: Windows Azure improves productivity and increases operational efficiency by lowering up-front capital costs. Customers and partners can realize a reduction in Total Cost of Operations of some workloads by up to 30 –...