Archive

Archive for the ‘Uncategorized’ Category

comiXology Promo: Download all of the comics

April 12th, 2013 Oren No comments

While sitting in a particularly long meeting today I happened to receive an email from comiXology inviting me to claim my “over 700 free comics”. While this is an extremely cool promotion it is somewhat limited in that to get all of the comics (I read a lot and I also don’t have time to sift through all of the comics to find the ones that I want) you have to click “Buy” on each one.

So, what does a developer stuck in a meeting do when struck with such a problem? 30 minutes later we have the solution to both problems – https://github.com/nachmore/grab-comixology

Grab the download, run the app, stick in your promo url and your password and watch the browser (IE) come to life in front of you and add all 723 comics to your cart. All you have to do then is check out! You can find the complete FAQ here.

Have fun reading!

Categories: Uncategorized Tags:

Last Minute Perf Video for Mango

July 10th, 2012 Oren No comments

I had the opportunity to join Microsoft Research and this year’s Interns at a recent XAPfest event (a regular internal Windows Phone development event) and give a performance talk for Mango / Tango (i.e. WP 7.x) – here’s hoping it’s the last one before we move on to Windows Phone 8!

To check it (and my bad hair day) skip to 1:23:30 at http://research.microsoft.com/apps/video/default.aspx?id=168593&l=i or listen from the start if you’re new to Windows Phone development in general for a great overview from Shawn Henry.

Categories: Uncategorized Tags:

WP Emulator Crashing on Windows 8? Here’s a Fix

June 25th, 2012 Oren No comments

Don’t you just hate it when you upgrade to a new OS (even when it’s a beta) and everything works amazingly well, except for that one critical bit of infrastructure that just fails? That’s kind of how you might be feeling if you boot up your brand spanking new Windows 8 install, install VS 2010 and the WP 7.1 SDK, followed by the 7.1.1. update to get the emulator and Tango support, boot up your project – hit F5… drum roll… emulator crashes. Sigh.

Luckily, there’s an easy fix!

Rename all of the *.dess files under %systemdrive%\programdata\Microsoft\XDE and restart the emulator, and all should be good.

What’s going on?

For some reason the saved state of the emulator is getting corrupted, by renaming these files (which could probably be safely deleted) you’re forcing the emulator to recreate them (shutdown may be a little slower the first time you close the emulator).

Categories: Uncategorized Tags:

Got Phantom Menus? RefreshScreen is here to help

November 8th, 2011 Oren No comments

The fact that my (fully updated)  video card will occasionally blue screen my screen after playing Flash videos aside, my next biggest video card related gripe is floating phantom menus:

Floating Phantom Menus

You know the ones – those ones that stick around, in front of everything, after you click on a random menu item. They only seem to go away when you restart your system or force a screen resolution change. Since that involves multiple clicks and a dialog I’ve written a tiny, one line, screen refresher. Run it to exorcise those menus!

Note: Unfortunately this doesn’t solve the actual problem that causes this, so you’ll probably get more phantoms afterwards.

Grab the EXE

Grab the Project (VS2010, C++)

P.S. For reference, all the code does is call ChangeDisplaySettings with (NULL, 0) in order to refresh the screen settings from the registry.

Categories: Uncategorized Tags:

WP7 Marketplace Tip #4: Include Contact info in your next app update

January 11th, 2011 Oren No comments

Summary

Make sure that you include the app name, version and technical support contact info within your app (or your next update)

The Fine Print

Section 5.6 says:

An application must include the application name, version information, and technical support contact information that are easily discoverable.

But my app was approved without this?

This was a late introduction into the certification guide (a couple of weeks before launch) so it hasn’t been enforced up till now. That said, it’s now been long enough since release for everyone to be able to have time to add the information so expect to see apps failing if you forget to include this information.

How do I do this?

Well, that’s the easy part, simply include an About page or Contact Us page. For contact you can send them to a forum link:

WebBrowserTask browser = new WebBrowserTask();
browser.URL = "http://somepublisher/forum";
browser.Show();

Or an email address:

EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.To = "Publisher <feedback@publisher.com>";
emailComposeTask.Subject = "Feedback About [Some App]";
emailComposeTask.Body = "";
emailComposeTask.Show();

When using tasks don’t forget to wrap it in a try/catch statement.

Categories: Uncategorized Tags:

Debugging Silverlight in Firefox 3.6.4 (and newer)

June 29th, 2010 Oren No comments

While they chug along to Firefox 4, Mozilla just released Firefox 3.6.4 (and quickly followed up with 3.6.6) on the world, sporting a new feature – plugin isolation. By isolating plugins to a different process, Firefox catches up to Chrome in stability, by ensuring that a rogue plugin that crashes does not bring down the whole browser, instead you get the sad face informing you that something has happened. This is a great end-user feature which will increase the general reliability of a user’s browsing experience – but we aren’t just users, are we?

Firefox will shut down a plugin when it is deemed to be either dead, or frozen. Unfortunately frozen is the state that the plugin will enter when you try to debug it (say, through Visual Studio), causing Firefox to kill the plugin and continue on its merry way. There have a been a number of proposed solutions, mainly around disabling the plugin container for Silverlight (see this forum post). Unfortunately, while this works for debugging, this is not a real user situation that you are debugging (since you’re no longer locked in the container, which is the expected state for any user running your app). In order to get Firefox to still run Silverlight in the container, but not kill it when it detects a Freeze, do the following:

  1. type about:config
  2. find dom.ipc.plugins.timeoutSecs (you can start typing it in the filter)
  3. change the value to -1

This effectively cancels the timeout so that even though the plugin is no longer responding to Firefox’s NSAPI messages, it will not be killed.

Happy bug hunting!

Categories: Uncategorized Tags:

Disable IE8 Process Per Tab (or: make profiling in IE8 easy)

April 29th, 2010 Oren 2 comments

Internet Explorer 8 ships with a feature to increase reliability by spreading tabs across multiple processes, unfortunately if you want to profile (or debug) a plugin (Silverlight, Flash etc) then you need to know the correct process ID (PID) to profile, as the normal PID will usually be of the iexplore.exe container, as opposed to the tab that you want to target.

To make things easy, you can disable per-tab processes by modifying the following key\value:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth

This vale may not exist, so go ahead and create it as a DWORD with a value of 0. To restore normal IE8 operations (I personally run with it constantly disabled and haven’t seen much of an adverse affect, but on lower powered machines or if you’re not constantly profiling) just delete TabProcGrowth.

You can also automate this by adding it to a .reg file or by using the following command line commands (in a batch file etc):

Disable TabProcGrowth

reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" /v TabProcGrowth /t REG_DWORD /d 0 /f

Back to default

reg delete "HKCU\Software\Microsoft\Internet Explorer\Main" /v TabProcGrowth /f
29/4/2010 Edit: Fixed registry key as per comment from Rick (Thanks!)
Categories: Uncategorized Tags:

Restart / Shutdown Windows 7 from a Remote Desktop Session

April 13th, 2010 Oren 2 comments

I’m constantly machine hopping at work, using remote desktop to administer or actually work on a remote machine. This usually means that every now and then I need to restart the machine, an option which is conspicuously missing from the Start menu – so here are a couple of options I usually use:

1. Run “shutdown -r -t 0″ (this basically requests a restart within time “0″, ie immediately). Luckily this doesn’t require elevation so runs smoothly. See “shutdown /?” for more options (including shutdown).

2. Click on the taskbar (away from a running app) and hit “Alt + F4″ and you’ll get a dialogue asking you what you want the machine to do – one of the options is restart!

Hit Alt+F4 on the taskbar of a remote session, and this is what you'll see

Rodney points out in the comments below that:

Alternatively, you could try “shutdown -i” for an easy to use GUI to shutdown, restart, etc a bunch of machines, remotely.

Thanks for the tip!

Categories: Uncategorized Tags:

IE9: 2D Graphics Acceleration King?

April 8th, 2010 Oren 2 comments

The IE9 preview has been out for a while (if you haven’t checked it out, then do so here – it’s a quick install that will sit side by side with your existing browsers, including IE8) and as the “wild story” dust settles serious posts are starting to emerge about the future of IE and browsers in general.

Yesterday a post on the IE blog compared IE9′s 2D rendering example (“Flying Images“) with other major (released) browsers including Chrome 4.1, Safari 4.0.5 and Firefox 3.6. Unfortunately (as pointed out by this slashdot story) the IE blog have chosen to compare a pre release of IE9 with a release of everything else, skipping (for example) Firefox’s nightly versions which already include 2D acceleration.

Sidetrack – Pet Peeve: Along with recent trends to create infographics for everything, more and more sites display pretty graphs showing different measurements and statistics, without showing – in a reproducible way – how they got to them. Kudos to the IE blog for stating that they used xperf, now if only they’d show which perf counters and settings they were hitting…

With a distinct lack of time ahead and no time to properly reproduce the results in xperf, I’ve decided to quickly reproduce the test on my hardware, relying on the software FPS counter (which in the end is king, since that’s what the user is going to see on their screen) and the trusty old “CPU Usage History” counters in Task Manager. I did start using xperf and Windows’ “Performance Monitor”, but the numbers are essentially the same and less confusing.

System Specs: My dev machine (at work) is a relatively souped up machine – Intel Core i7 @ 2.67GHz, 6GB of memory running Windows 7 Enterprise 64-bit.

CPU Usage at Test Start

IE9 Preview

IE9 clocks in with 63 FPS and an extremely low CPU usage. During the test I can see activities on 3 of the 8 virtual cores peaking at around the 20% of each. Average CPU during the test is a flat 3%.

IE9 Doing the Rounds

Low CPU Usage Across all cores

Firefox 20100408 3.7a5pre

Firefox nightly, with 2D acceleration enabled, clocks in at 48 FPS with a little more activity on the CPU (a fluctuating 9-10% with activity on 4 cores peaking at around 30%).

Firefox Nightly Gets Into the Fray

Respectably low CPU usage for Firefox

Chrome 4.1.249.1045 (42898)

Chrome clocks in at 2 FPS with a flat 12% CPU usage caused by heavy usage of one core peaking at just over 80%.

Chrome valiantly tries to keep up

One Core To Rule Them All...

Summary

All in all the behaviour of these browsers on my machine indicates that the IE blog was spot on with their general analysis that hardware acceleration is the way of the future. Chrome’s reliance on one CPU core to achieve rendering in this scenario doesn’t get it very far whereas Firefox and IE9, when taking full advantage of the hardware capabilities of the host cruise through this example with flying colours.

Time will tell how many applications will actually come to rely on this type of hardware acceleration for good performance, but with the rise of Canvas based applications who knows what we may be playing in-browser next?

Categories: Uncategorized Tags:

Office Labs Whoops…

March 23rd, 2010 Oren No comments

Looks like it’s back to Google Apps…

Categories: Uncategorized Tags: