Thoughts about multiple screen interfaces.

by Andy Masters 25. October 2011 20:22

I went to the .net User's group meeting today, where the discussion was about MVC.

Afterwards I had a chat with a few folks about how Microsoft was doing with Windows 8 (after trying the developer preview).

My thoughts:

  1. There seems to be a disconnect between Metro style apps and 'Standard' Windows 
    • Why do they need to be 'baked' into the OS - couldn't we get something just as rich over the web?
  2. MS is betting heavily on the future of PC input being "Touch".
Now the "Touch" interface thing got us talking about how we could see it working in the future:

You could have 2 screens (they are getting cheaper all the time):
  1. one for (horizontal) for navigation/display/input  (replacing keyboard and mouse)
  2. another (vertical) for display.
 The idea being that it's a lot less strain to drive things horizontallly. Additionally, with 2 screens, your hands aren't going to constantly be obscuring the areas of interest.

A really cool thing would be if the input screen was flexible. This would mean when keyboard input was required, a keyboard imprint could be raised from behind the screen, to create a keyboard with tactile feedback from the screen.


Another similar idea exists for the eBook format. Here you could have a book shaped device with 2 screens, one each side. To go to the next page, you turn it around, (right edge first). Previous page, turn around (left edge first). The 'next' page could be pre-rendered as soon as you turn (effectively double-buffering), this means the page turn speed is a quick as you can turn the device. I think this would be quite a natural way of reading, with NO buttons or pressing of anything.

Tags:

Ideas

Sound not working on my PC

by Andy Masters 7. October 2011 19:14

 

I've got Cambridge Sound works analog speakers (DT2200) 5.1 system from about 2001 still going strong (about the only thing about my PC that hasn't changed). The mini speakers and subwoofer are really great, I use 3 of them L,R,C and don't bother with rear speakers as it's quite a lot of wires.

Anyway, just now the sound stopped working. I've just spent an hour trying to workout why. I went through all the obvious stuff like 

 

  • do the speakers have power
  • are all the cables plugged in
  • check the volume isn't muted
  • check the volume settings aren't too low

 

Then I tried a few more esoteric solutions:

 

  • Windows 7: Troubleshoot audio playback wizard
  • Updating my Realtek Audio drivers
  • Swapping out audio cables and speakers

 

No luck. Just as I was about to give up, I realised:

The volume control dial on my speakers also has an adjustment for Front/Rear speaker balance. A certain small child had obviously 'played' with this while I was away, and adjusted it so that the balance was 100% rear speakers (which aren't plugged in).

So my suggestion to Microsoft is they add a step to their troubleshooting wizard:

- Have you checked that small children haven't fiddled with the front/rear speaker balance setting

Anyway, I thought I'd post this in case it helps anyone else with the same problem.

 

Tags:

Ideas

Factorial Bug Hunt

by Andy Masters 25. March 2011 16:06

I was playing around with TDD again. It highlighted to me just how bad a very simple and correct looking function can be.

In maths, Factorial(n) is written n!, so Factorial(10) is the same as 10!.

1! =1
2! =1*2=2
3! =1*2*3=6
n! = n * n-1 * n-2 * ... * 1

I wrote this function without TDD to calculate the nth Factorial number recursively:


public static long FactorialRecursive(int index)
{
   if (index==1)
   {
      return 1;
   }
   return index * FactorialRecursive(--index);
}

I then rewrote the function using TDD. I discovered 4 quite serious bugs in the above code, see if you can find them (answers in my next post, although I expect there will be others that I've missed too). I also tried a radically different approach to writing the function, how would you write it?

 

The benefit of unit-testing is that seemingly correct code should get smoked out.

The benefit of TDD is you get a better design, and just enough tests to prove it is correct.

 

 

Tags:

Development | Ideas | Testing

Amazon EC2 - Short Term Use Tip

by Andy Masters 11. November 2010 07:37

I just recently left one of my EC2 compute instances running for a week without meaning to - this gave me an extra $20 bill. Not the biggest in the world, but still annoying if you don't need to pay for it.

For my automated build server, I only need EC2 instances a couple of hours at a time never more than a day. So as a precaution:

  1. add a scheduled task running daily to automatically shut it down at 3am. (The command 'shutdown /s' can be run to achieve this on a Windows Server 2008 box)
This way, if I forget to shut down an instance it won't run for more than 24 hours before it shuts itself down :)

Tags:

Development | Ideas

Version Control your CV!

by Andy Masters 3. November 2010 08:51

I've just been updating my CV with my latest experience. I noticed that I've got a lot of different versions of it kicking around at different dates and basically all these files were becoming a bit of a pain. 

I've been using Mercurial (and FogCreek's Kiln offering hosted Mercurial) for Version Control lately (on personal and work projects) and it struck me as a good idea to put my CV into it's own mini repository. Having a local copy cloned to the cloud means it's backed up too.

I've got a plain text version which allows me to see the changes between versions.

Tags: , ,

Ideas

E.on in the doghouse for Data Overkill

by Andy Masters 30. September 2010 08:37

I just recently received a free home energy monitor pack from E.on. This is a great deal, they send you a free box with a transmitter that attaches to your mains fuse box and a wireless monitor device that you put somewhere handy in your house. This lets you easily see at a glance how many watts you are using at any one time and how many KwH you have consumed in the past day / week / month.

So great, we can all use these boxes to monitor how much energy we are using and can find easy ways to cut down and save the planet. 

The wireless monitor box comes with a USB lead and cd to install PC based client software. This is to enable you to download data from the wireless monitor/collector via USB into your PC, enabling you to do more sophisticated analysis of your energy usage. 

The downside is that each client install requires a SQL Server 2005 Express install. This is in my opinion slightly overkill for logging a bit of data about your energy usage!

 

 

 

Tags:

Chess: Blackpool 2007 Best Game Prize

by Andy Masters 8. September 2010 07:20

Here is a game that I played back in 2007 and won the best game prize of the tournament.

After mishandling the opening as black, I managed to gain the initiative with my 14th move. Black's 18th move wins the game with an unexpected move.

Game:

Get Microsoft Silverlight

Tags:

Chess

Multi-boot - moving the mbr records.

by Andy Masters 5. September 2010 23:36

What seems like a long time ago in a galaxy far away, I was using Vista as my main OS. Along came Windows 7 and I did an 'upgrade' to my Vista install onto a new drive.

This gave me

C: - Vista (2x150GB drives in RAID1)
D: - Data
E: - DVD
F: - Windows 7 (Shiny 64GB SSD)

This gave me a multiboot system - At each boot, I would be prompted whether to run Vista or Windows 7 (I changed the default to be Win 7, timeout to 3 seconds). Everything was fine and the world kept spinning.

(Side note) In this setup, booting to Windows 7 gives you the rather strange experience of having F: rather than C: as your main system partition. Apart from being slightly disconcerting, I don't see anything bad about this - note to self: whenever developing software, don't assume the existence of a C: drive!

After experiencing the wonderfulness of Windows 7 I quickly realised that I wouldn't be needing to use Vista anymore - I migrated all my data off of the Vista drives. I was about to reformat them but as a precaution decided to check that I could still boot to Windows 7 without the Vista drives plugged in (I disconnected C: partition drives' SATA cables from the motherboard).

Unfortunately I was met with "BOOTMGR is missing" during the boot sequence. 

The MBR records are held on the old Vista partition.

Power off, and Replace the Sata cables -> everything works okay again

After reading various forums, I removed the SATA cables and tried booting the Windows 7 x64 Recovery CD to run the fix startup issues option.

This rather unhelpfully informed me "This version of System Recovery Options is not compatible with the version of Windows you are trying to repair". (something to do with starting with Vista?)

Eventually I tracked down the tool - EasyBCD 2.0 this allows you to edit and migrate your MBR records. The option you want is

  • BCD Backup/Repair
    • Change Boot drive
This lets you migrate the MBR records from the old HDD to the new one. After doing this I disconnected the Vista partition drives and booted straight to Windows 7. I was then free to do what I wanted with the old Vista drives - (I reformatted the array to RAID 0 to act as a swap file and hot system backup drive).

EasyBCD is great! It even lets you clean up your boot menu after ( to remove the option to boot to Vista).


 

Tags: , , , ,

hardware

More Test Data Generation Tips

by Andy Masters 14. June 2010 20:28

Selecting random rows from existing databases:

NewID() generates a GUID which can then be used to sort the rows into a random order

SELECT
 TOP n
 <query>
 ORDER BY NEWID()

You can use this technique to generate whatever you like names, addresses or ref codes. If you do it once per column, you have pseudo random dta i.e. you won't be using a whole specific row from the database.


Excel: To generate test data in excel with a particular frequency distribution:

Say you want to generate random ISO 4217 'currency codes' but 80% of the time you want GBP, 10% USD and 10% JPY.

Create a range of data on a separate tab (call it DataDistribution) as follows
A1:A10 number 1-10
B2:B8 'GBP'
B9 'USD'
B10 'JPY'

Then to generate a random value according to the required frequency distribution, you can use the following function:

=VLOOKUP(RANDBETWEEN(1,10),DataDistribution!A1:A10,1,FALSE)

You can amend the size of the vlookup array to meet the needs of your frequency distribution - have 100 rows if you want percentages.

Warning - be careful using spreadsheets with formulas that use random data for input data. Excel will recalculate the formulas when the file is opened or when you edit the spreadsheet. To overcome this, copy and paste your data using the 'paste special\values' option.

Tags: , , ,

Testing

Wordblaster now available to download

by Andy Masters 10. June 2010 08:56
I've finally managed to dig out the install for this C# word game that I wrote back in 2003. It's now available on my downloads section for everyone to enjoy.
  • Wordblaster 

    Word Blaster Screenshot

  • Tags:

    C# | Games | Downloads

    Powered by BlogEngine.NET 1.5.0.7
    Theme by Mads Kristensen