# Saturday, 04 August 2012

So there I was writing my first application for Windows 8, I had to call a web service sitting on a server which had to be connected through HTTPS, but because it wasn't a production server the certificate was self signed and thus is considered to be an invalid cert. No biggie I thought, with all my years of .Net experience I knew that all I had to do was fiddle with the System.Net.ServicePointManager.ServerCertificateValidationCallback method, as mentioned here.

Imagine my surprise when I realized that the class doesn't exists when you're writing a .Net app for the Windows Runtime!

Trying to look for other solutions also came up empty, it was then which I realized that what I needed to do was to allow the application to get a certificate which ISN'T invalid. What I needed was a web proxy which could give the impression that the remote certificate was actually valid.

What I needed... was Fiddler!

So first download Fiddler4 (Because Windows 8 comes with .Net 4.0) from the download page.

After installation and running the program enter Fiddler Options by selecting Tools->Fiddler Options from the menu bar.

image

After which head into the HTTPS tab and check Decrypt HTTPS Traffic

image

You'll be warned that you're about to install a wild card certificate on your system. Shown below is one of the many warning screens, you'll have to answer YES to ALL of them.

image

After the certificate is installed, look back at the options window and check Ignore Certificate Errors. This will make Fiddler not complain about any invalid certs.

image

Fiddler is a web proxy, which basically means it sits between your machine and the internet so you can monitor the web traffic your PC is making as long as the program is setup to use the system proxy. If you don't know what this implies then just keep Fiddler on only when you're doing development, and turn it off once you're done.

For more information about using Fiddler to assist in Windows 8 development out this post.


Saturday, 04 August 2012 15:51:14 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Thursday, 02 August 2012

One of the most talked about yet not so consumer oriented feature of Windows 8 is Windows To Go which is the ability to run Windows 8 from a USB drive instead of installing it onto a fixed hard drive. And of course everyone wanted to cool looking thumbdrive!

There are no shortage of instructions on how to make a Windows To Go drive. Here's 2 of them

  • Link 1 (Requires downloading of the Windows Automated Installation Kit)
  • Link 2 (Requires an already running Windows 8 installation)

So of course I decided to try and make one myself then! Here's what I found out after tons of sweat and disappointment.

Your USB thumbdrive probably ain't gonna work!

I have a wide range of USB drives ranging from so called super fast speeds, to petit drives that hides itself from the user.

DSC01282

They all failed miserably at running Windows 8! How do you know if your thumbdrive can't run Windows 8?

First of all, when you try to image it following the instructions on the links above it'll take a LOOOOOOOOONG time to image. Basically if the imaging process takes longer than 60 mins (don't read the estimated time from the imaging program) Your thumbdrive is probably not going to work too well. If you actually decide to press on after the installation and actually boot into Windows 8, the first boot is gonna take more than 30 mins to finish the initial setup. If that STILL doesn't deter you from attempting to use Window 8 on your thumbdrive and you actually make it into Windows 8, disk access would be so slow that the user experience is totally unbearable at all!

A Hard Disk Works Best!

DSC01285

The one thing that worked the few times I tried it? A simple USB hard drive. I suppose that since it's on USB, disk access would be slower than on a normal SATA channel, but performance generally feels... normal when I was using a hard drive as the source.

USB 3.0 Might Not Make A Difference

What about USB3.0? That question might have crossed your mind when you were reading the paragraph above. That was what I thought so too! Until I found out that my motherboard's USB 3.0 ports CANNOT be used as a boot drive, I *think* it's because they're basically sitting on a different channel or something like that. While it didn't work for me I suppose there's probably some motherboards out there which CAN boot from their USB 3.0 ports.

In conclusion, does that mean that as long as we use an external HDD we can run Windows To Go probably then? Well...

This probably isn't how to install Windows To Go in the release version of Windows 8

If you go back to the Microsoft page about Windows To Go which I linked at the start, it mentions that a Windows To Go system

  • Disables sleep and hibernate
  • Disabled internal hard drives of the computer it is booting on
  • etc. etc.

This does NOT happen with the install method I link to above, also during my various attempts in getting Windows To Go to work. There was ONE instance which after I booted into Window, a message actually popped up informing me that I was using Windows To Go mode. This has NEVER happened again.

So be warned that all the instructions online probably aren't creating a Windows To Go drive the way Microsoft is talking about.

If you STILL want to proceed...

While it's great that a simple USB hard drive would work, you might want something small and more compact to move around with compared to a hard disk. If that's the case you might want to try and look for the Pen Drive USB 3.0 External SSD

DSC01284

It's a small, thin solid state drive which seems to be capable of running Windows 8 properly.

26th August 2012 : Update #1


Thursday, 02 August 2012 00:00:03 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Saturday, 28 July 2012

Just watched the epic Batman : The Dark Knight Rises movie this morning while it’s a great show to watch I can’t help but rant about a few glaring problems in the movie. Obviously if you haven’t watched the movie yet, you need to stop reading now cause it’s gonna be filled with spoilers!

*SPOILER SPACE*

*SPOILER SPACE*

*SPOILER SPACE*

*SPOILER SPACE*

*SPOILER SPACE*

Bruce Wayne has been broken after years of being the Batman. In the movie you keep hearing Bruce Wayne’s friends talk about how being the Batman has broken him through the years. But here’s the problem, unless I’m missing something, they also mentioned that the night of Harvey Dent’s murder was the last time Batman was in action. And he wasn’t a wreck then was he? My wife’s opinion? Maybe he fell down that large flights of stairs in his mansion!

Bruce Wayne knocks up with a woman with ZERO character development. And the audience is NOT supposed to think she’s evil? Especially after how Bruce Wayne keeps saying how much he trusts her? Her being Talia was a surprise (and them shacking up is probably just for the fans) her backstabbing the Batman? Not so much.

Incompetent police tactics. Throughout the movie this happens all the time.

ALL active police were sent down the sewers, ALL of them, down a sewer, WITHOUT a proper means of maintaining radio contact. Even when Gordon has already seen that there's at least a small platoon of armed thugs down there!

What was Gotham's finest plan for assaulting a dug in building where the thugs were armed with automatic weapons AND a couple of light tanks? An single column infantry charge straight down the wide open street straight at the building. If the Batman didn't take out the Thumblers first how stupid would that action be?

But did that accomplish much? They just keep standing out in the open street shooting people, forget about looking for cover! But then again I guess they weren't too scared about the capability of the thugs because.

Incomptent thug tactics: Seriously... how is the audience supposed to believe that a whole column of police officers can gather on the main street in front of the enemy base through the night and NOT have any one of the perimeter guards notice when his taking a smoking break or something?

Pet peeve: Why wasn't Blake's real name Terry?

Bonus Point Of Useless Knowledge

I'll now spoil every movie that you're going to see from this point on. After you read the next paragraph and do what's mentioned on it, you'll never be able to watch a movie the same way again and most likely lose all sense of suspense in certain movies. So go away if you don't want that to happen, but if you want to see how deep the rabbit hole goes...

*dramatic pause*

Look up the term Chekhov's Gun on the internet. Examples

  • Fusion core
  • Flooding capability of the reactor
  • Lack of auto pilot

Saturday, 28 July 2012 22:56:33 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Tuesday, 24 July 2012

As I was surfing around the web using my Windows 8 machine, I noticed a few problems with some of my websites. After poking around a bit I realized that the symptoms I was seeing were pretty much the same as the iOS Safari WebView problem I discovered previously. And sure enough... it's the browser capability files again. More info available on Scott Hanselman's blog.

You really should go and read up on the post, but in summary. If you run a ASP.Net webserver, you really should install these patches like RIGHT NOW so that users on IE10 will not experience any problems.

They should be up on Windows Update, but better safe than sorry.

If you don't have control of the server and can only upload files to your web application's folder, download this file from Scott's site. In the zip you'll find a projects/net[version] folder, along with some *.browser files. Copy the appropriate file to an app_browser folder in the root of your website and you'll be fine. Note that ASP.Net 3.0/3.5 is consider to be running on ASP.Net 2.0.


Tuesday, 24 July 2012 22:46:45 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Monday, 09 July 2012

I took WZ to see the Dinosaur Live exhibit at the National Science Center. Taking my Sony A550 with me since I knew the exhibit would be in a dark area and thinking I had a better chance with better shooting control than the Sony NEX. And I learnt a few things doing so.

Autofocus doesn't work well in the dark

DSC01211

To the camera, it's pretty much pitch black in the exhibit. Autofocus couldn't pick out any details at all, and the fact that I was using the F20 which doesn't strobe as a focus assist light didn't help. The solution would be to switch to manual focus, or as I figured out after a while, use a flash light to help your camera focus (I used my HTC Radar's flashlight for this)

Shutter priority is a better choice in the dark

One of the first things the Semi Pro taught me when I first got my camera was that it'd be easier for me if I just used aperture priority in my shots, since usually when you're shooting with people you'd probably care more about the depth of field. And that has worked pretty well for me. But in a dark area, it's more important to control how long the lens is opened so you can control the lighting effect.

Fire the flash in rear sync mode.

 DSC01223

Not really a new thing I learnt this time around, but just as a reminder from last time. If you want to take photos which shows the ambience of weird colored lighting in the environment, set you flash to fire in rear sync mode.

Remind your wife that it takes time to setup the camera to take nice photos when you don't have practice.

DSC01230

The night before I say my wife down and told her "Honey, I'm going to take the DSLR tomorrow when we go see the exhibit, it's probably gonna be in a dark area and I'm gonna need some time to tweak the camera and learn what's the best way to shot a picture in there. So it doesn't help if you keep complaining about why I'm taking so long for a shot."

Yes, I'll probably get killed if my wife reads this, hence WZ's expression is highly suitable for this tip. And if you don't understand what's the big deal about something like this, you're not married then are you? :P


Monday, 09 July 2012 00:10:28 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  |