Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Tuesday
Aug022011

Optimus Quest 2 July Winner

Optmis Quest2

I’d nearly forgotten about the Optimus Quest 2 that I set way back in June. I’ve got two LG Optimus 7 phones to give away, and they are going to the students who show me the most impressive download stats in Windows Phone Marketplace for their applications. Fortunately Joseph Appleyard hadn’t forgotten, and of the entries I received his was the one with most downloads. Well done Joseph, send me your postal address and I’ll get the phone sent out for you. As you are a registered developer you can then upgrade it to Windows Phone Mango and have all kinds of new fun.

If you want to enter again, I’ve got another phone going on the same basis at the end of August. The only person that can’t win it is Joseph…..

Monday
Aug012011

What’s Wrong with this Picture Answer

image

Why is this stoopid?

There is nothing wrong with letting you run the program from the last successful build. Perhaps you want to quickly show somebody what your program looks like, but you are in the middle of editing it. In this case you just click Yes and that person can see your program running, even though it won’t build at the moment.

The problem for me (as some of you have already spotted) is the nasty “Do not show this dialog again.” check box. If you check that it means that Visual Studio will always run your last successful build without giving you a message. The scenario where this bites you is as follows:

  1. Run program, notice an error.
  2. Edit source code, fix error but forget to type semi-colon, leading to a compilation error.
  3. Run program again to see if error has been fixed. Program fails to compile, so Visual Studio runs the old old version without telling you. The error appears to be still there.
  4. Go nuts trying to find the error that you have already fixed. Every change you make has no effect. Give up programming and become a beekeeper.

An experienced programmer will be looking out for compiler errors and will know that they are running old code. But not everyone will. You can get a similar effect by working on the wrong source file. In that case you got the fix right, but a file somewhere else is being used in the build. If I suspect a “reality fault” like this I do something that is guaranteed to break the build:

wobble;

This should not compile and run. If it does, something else is happening. If you want to put this back to how it should be (in my opinion) you can go to Visual Studio Tools>Options and find the following entry:

image

Change “Launch old version” to “Prompt to launch”.

image

If you want to get rid of the dialog box completely, and never have the program run when it won’t build, change it to “Do not launch”.

I’ve been racking my brains as to why you would want to hide the dialog box and always run the old version. To be honest, I can’t think of a reason why you’d want to do this, and I’d be a bit happier if the folks at Visual Studio hadn’t.

Sunday
Jul312011

Car Wash Therapy Fail

Flowers

Normally when I spend time washing the cars I come up with answers to questions and solutions to problems and stuff. Today all I thought of was:

Nobody ever plays that record from The Ronettes about the man that puts the cables away after a gig. It was called "The Packer of the Leads"

This made a good tweet (at least I thought so), but is absolutely no use for anything else.

Saturday
Jul302011

Foveon Sensor Fun

Thermometer

Ian collects guitars. I seem to collect cameras. I’m playing with a second hand Sigma DP2s that I picked up as a kind of birthday present to myself. This is a neat looking compact that uses a Foveon sensor. This sensor works in a different way to the ones in most cameras which use a “Bayer” design. With this each sensor is covered by a coloured filter that lets the sensor read only that colour. So to get the colour of a particular pixel you need three sensors, for Red, Green and Blue. Actually most cameras use two Green sensors, since that is colour that has the greatest effect on brightness as far as the human eye is concerned.  So that makes four sensors in total.

But anyhoo, this means that to get the colour of a pixel the camera must read the brightness of a bunch of pixels and then combine them using some clever maths. Then the camera does something even cleverer and works out the colour it would be at each of the Red, Green and Blue positions, based on the readings from those around it. This is a bit sneaky, in that it means that your 16 megapixel camera isn’t actually reading 16 million coloured dots. It is actually working a lot fewer colour values and then spreading these back over 16 million points. This can lead to pictuers with artefacts (funny shapes that appear as a result of the averaging process) and noise (because the maths is really only a form of guessing).

The Foveon sensor doesn’t do any of this. It uses a cunning silicon sensor that reads all the colour values at each pixel position. The bad news with a Foveon sensor is that it doesn’t have quite many pixels as most “Bayer” designs, so the ultimate resolution is a bit lower than what you get from other cameras. However, all the dots are “real” dots, and I think this counts for quite a lot in terms of picture quality, as you can see above.

If you want a camera that is quite a challenge to use (the sensor and lenses on the Sigma camera are very good but the electronics and user interface are a bit of a pain when compared to more popular offerings) then you should take a look at the DP1 and DP2 devices. They are also a good way to learn how photography really works, in that to get the best from them you have to take things like exposure and focus very seriously.

You can pick them up second hand from ebay at reasonable prices, and they are great fun to use.

Friday
Jul292011

Setting Ringtones in Windows Phone 7.5

image

When I upgraded my Samsung to the latest version of Mango I lost my beloved custom ringtone. I’d used the Chevron tool to set the ringtone ages ago, and the “undocumented feature” that made it work must have been withdrawn/fixed. Anyhoo, nothing is going to keep me from my precious ringtone, so I set about fixing this.

One of the improvements in Windows Phone Mango is that it lets you set your own ringtones. There is even a sample application here that does this. However,it is a bit too complicated for me. I just have a wma file that I want to make into a ringtone on the phone. That’s what this program does. Just add your wma file in place of Ringtone.wma and build and deploy the program. Run it and press the Set Ringtone button and follow the instructions. If all is well you should get a toast pop up telling you the ringtone has been deployed.  You can then select the ringtone on the phone.

Of course your phone needs to be developer unlocked for this to work. Just one more reason to become a Windows Phone developer.