Thursday, 26 April 2007
Monday, 23 April 2007
Like most students I crave the latest gadget, the definitive upgrade to which I can dedicate the next few months figuring out how to use. Well after using a WM5(Windows Mobile) device now for a while I thought I should give a short ‘day in the life of...’ to talk about how really amazing these devices are and how they aren’t just a fancy electronic diary but an integral part of anyone’s life who is fortunate to own one.
The day of course starts as most students wish to continue, asleep in bed. However I get woken up by the sound of ‘Sometimes I dream about cheese’; a witty game quote that’s now my ringtone and alarm. The initial thing I do is check my plan for the day using the calendar program, all lectures and appointments appear onscreen. I move onto checking my various email accounts using the built in Pocket Outlook; however usually by now I get an alarm kindly mentioning I have 15 minutes left to get to my lecture.
Going into my lectures I feel lighter; unlike the other students I don’t need any printed out slides, note paper or even pens. I just take out my WM, simply use the built in Wi-Fi combined with Pocket IE to download the lecture slides and view them in Pocket PowerPoint, taking notes is easy and I use Word for this task. No keyboard is required although a virtual one can be displayed on screen; I just use the character recognition and write on the screen. This function is great at making others want their own WM device!
A few lectures, phone calls and texts later I return home, plug it into my Windows Vista PC and use Windows Mobile Device Center to synchronise all my documents I edited throughout the day, meaning I never lose anything and they are always accessible to me and always up to date.
Now really this could just be called a glorified phone; however using Visual Studio you can extend its functions to anything you can think of by programming new features. I myself enjoy writing games but also mess around with applications to help streamline my life even more. If you can’t or don’t want to write programs yourself you can simply search around and there are 1000’s of free applications online to try.
If by now you’re as interested as I am, I suggest checking out the Windows Mobile website, you will be able to find out some really cool stuff and learn how you can get your very own Windows Mobile Device.
Friday, 20 April 2007
So what can you make using Silverlight, well a lot of things! But I will mention some of the demo’s as examples; reading stuff on screen isn’t that interesting, it’s never as good as a book where you can turn a page. Well now you can, grab the edge corners and slowly turn the page right before your eyes. Well if reading isn’t for you how about organising your media collection or what about a cool interactive game. The list goes on.
Now this sounds great doesn’t it, rich interactive applications that are cross platform between Windows and Mac and it’s only a 2MB download that works on the majority of major browsers.
I guess there is one downside for Microsoft Silverlight, and it’s a rather major one at that... It’s not out yet! It’s only at a CTP (Community Technology Preview) level at the moment. Don’t worry; I guess Microsoft has lots of Code Monkey’s typing away trying to complete it soon.
I guess now’s the time to suggest visiting the site so you can find out more about it, there are currently a few things available Demos, SDK, Wallpapers. Your epic journey to click on the link below won’t be in vain. I strongly suggest you check it out.
Wednesday, 18 April 2007
The description for the article is:
How Windows Mobile devices can help free up your time and increase your productivity, plus... they are awesome!
Wouldn't it be great to check your emails on the go, make notes during lectures and to have a music player all in one device? Well this is possible with a Windows Mobile 5 device, which is available on a range of stylish PDA's or smart phones. Connected to Windows Vista using the new Windows Mobile Device Centre this creates a perfect partnership in which you can sync all your important data, web favourites and emails to make sure you don't miss out on any important task or appointment. Don't worry if you’re still using Windows XP you can still connect to your Windows Mobile with ActiveSync. With miniature versions of the Microsoft Office applications you can have your desktop on the move, this coupled with Outlook Mobile and other available Windows Mobile applications will improve your productivity and make college and University a lot less confusing. Many times have I been saved by my Windows Mobile device! Developing on the Windows Mobile Platform is easy; all that is required is a copy of Visual Studio 2005 and the Windows Mobile 5 SDK (System Development Kit) which is available from (http://www.microsoft.com/downloads/details.aspx?FamilyID=83a52af2-f524-4ec5-9155-717cbe5d25ed&DisplayLang=en). Once installed you can use either C#, Visual Basic.Net or VC++ to create managed or native applications with ease that can be developed, debugged and tested using the built in PC based emulator or using the Windows Mobile device connected to your PC. If developing isn’t for you, then you can access lots of cool free content from the official Windows Mobile site such as free games and programs, of course another great resource is Mobile2Market which helps developers bring their programs to market, however anyone can look around at http://www.microsoft.com/windowsmobile/catalog/cataloghome.aspx Even after all this it gets better, soon to be released is Windows Mobile 6 which adds even more features and abilities such as more Windows Live features, better office support and a great new look. If you want to learn more about Windows Mobile why not visit http://www.microsoft.com/windowsmobile/default.mspx and have a look around.
Well I just had to, how could I be a nerd without mentioning this topic. Now you will get people camped out on both sides saying theirs is better, but have they ever just stepped back and looked at what’s good and bad about their operating system. So to start off with here are a few of the Pro's and Con's of each operating system. Now for the Linux side of things I am basing my answers around Ubuntu as that’s the one I use and have more experience in, also it seems the most common amongst the people I chat to.
Windows (Vista Ultimate)
Lots of games
Most applications are designed for it
Easy to use
Not many driver issues
Can play most video formats
Viruses & Spyware
Now the turn for Linux:
Linux (Ubuntu 6.10)
Applications easy to download and manage
Virtually No Viruses or Spyware
More and more common programs are now available
Very few new games are available
Drivers not available for all hardware
Less user friendly
Now really, even with whatever people say with the pros and cons of Windows the 3 Con's for Linux is basically what kills it for an everyday person. An average person, not nerd or computer scientist, an AVERAGE person wants above all else user friendliness. Now for an average person I am using my parents for an example.
For example if a driver isn't available for Linux by default, most people say search the internet, chat on forums and get advice. Now for example my parents have no idea what a forum is and so if it doesn't work, it’s useless. They would give up and go back to Windows.
Although most parents don't want to say it but computers are usually for their children to play games on, I doubt I know of anyone that doesn't use their home computers for gaming. So if you can't play for example the copy of Supreme Commander that you just went to PC World for, you will be pretty annoyed and probably go back to Windows where it will work.
Now of course the greatest Pro for Linux, its FREE. The operating system is free and most of the major software for it is free eg. Firefox, OpenOffice etc. Which I think was why when talking about it with my parents they got interested. £350 for Vista Ultimate and another £350 for Office or £0 for Ubuntu and OpenOffice. Hmm, which is cheaper for an average family? Of course not all the software is as good as the Windows counterpart, but it’s free. What do people expect?
Ok Windows, it’s easy to use. It’s shiny and I can play games on it. But once you installed it you have to go and buy everything else, or after buying a PC with it preinstalled it’s got loads of software from companies that isn't needed. It would be better if they just came with Vista and Office preinstalled, once again ease of use!
It does of course depend on which version of Linux you go for, there are lots to choose from, and I currently suggest Ubuntu. Now most of the problems about Linux are slowly disappearing, the new version of Ubuntu will be out soon and has greatly improved its usability which is awesome. So regrettably in the long run I would have to say that for an average family Linux is slowly becoming ever more a real life consideration.
Don't worry Microsoft, I love you really.
Tuesday, 17 April 2007
Well if you do not know what an IT Box is, its a PC based games station normally found in pubs, it contains a variety of games that you can win for cash prizes. Now some of these games are based answering questions but some are based on skill, therefore they are open to outside help in the form of a computer program to help win money.
Of course this isn't allowed but its just a proof of concept.
This game is a bit like hangman, you pick a category and you have to guess the word choosen by picking letters. Therefore to solve this all you require is a program to do the following:
- Store a list of possible solutions, most can be downloaded as lists from Wikipedia based on the categories eg. elements, countries
- After entering the length of the word and letters in and not in the word use statistical analysis to show possible answers and which letters to use.
Well its a simple game of pool, point and shot. Therefore to make a tool, take a picture using a camera thats part of the smartphone and then after selecting the positions of the balls, or just write a subroutine to find the ball positions. Work out the best possible shot to score. Hopefully the 'physics' in the game would be close enough to use this solution.
These programs can be made on Windows Mobile devices, but of course you shouldn't... naughty you for thinking you could!
Monday, 16 April 2007
So I thought about it and went about getting everything ready. After downloading a few things, such as the shiny new Windows Mobile 6 SDK with the PPC emulator 2. Shame really that I am only developing the program for WM5. Though I wouldn't mind having a shiny new Windows Mobile 6 device *hint* *hint*.
GDI has never really been that fast, even on a modern PC. Show just think what its like on my 200mhz Pocket PC Phone. So when I was looking into doing some of the coding for the graphics filters I thought there must be a better way. Below for example is a piece of code to inverse the colours on a bitmap using GDI.
private void Inverse(Bitmap bmp)
//Declare a colour to store the colour in each pixel
//Iterate through each pixel
for (int y = 0; y < bmp.Height; y++)
for (int x = 0; x < bmp.Width; x++)
//Get the colour of the pixel
c = bmp.GetPixel(x,y);
//Set the colour of the inverted pixel
bmp.SetPixel(x, y, Color.FromArgb(255 - c.R, 255 - c.G, 255 - c.B));
Ok, so its quite fast for small images. But for my image editing programming program I want it to be editing sizes of 1000x1000 or more and at this size it takes a rather long time. So looking around MSDN I stumbled upon using Unsafe bitmaps, in which you can access the byte array of the image directly thus equalling awesome speed. Ok takes more coding but hell is it fast! Below is the new version of the inverse function.
private void Inverse(Bitmap bmp)
//Specify Pixel format
PixelFormat pxf = PixelFormat.Format24bppRgb;
//Create region of the bitmap to lock
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
//Lock original bitmap
BitmapData bmpData = bmp.LockBits(rect, ImageLockMode.ReadWrite, pxf);
//Get address of the first line of the image
IntPtr ptr = bmpData.Scan0;
//Declare array to hold the bytes of the bitmap
int numBytes = bmp.Width * bmp.Height * 3;
byte rgbValues = new byte[numBytes];
// Copy the RGB values into the array.
Marshal.Copy(ptr, rgbValues, 0, numBytes);
for (int counter = 0; counter < rgbValues.Length; counter += 3)
//Store the new colour
rgbValues[counter] = 255 - rgbValues[counter];
rgbValues[counter + 1] = 255 - rgbValues[counter + 1];
rgbValues[counter + 2] = 255 - rgbValues[counter + 2];
// Copy the RGB values back to the bitmap
Marshal.Copy(rgbValues, 0, ptr, numBytes);
// Unlock the bits.
Though now extra using statements have to be included, such as System.Drawing.Imaging and System.Runtime.InteropServices.
I hope you found this little snippet interesting, I will post more about the paint program soon, don't worry. Its currently got quite a lot of cool features, hopefully in the next couple of days there will be a download link also.