To Blog or not to Blog? This is my answer! RSS 2.0
 Friday, February 06, 2009

Win 7 thumb Tim Sneath posted quite a valuable collection tips & tricks for the Windows 7 Beta users. Some of these tips existed even before Win 7. Definitely worth checking out.

http://blogs.msdn.com/tims/archive/2009/01/12/the-bumper-list-of-windows-7-secrets.aspx

I am pasting my favorite (keyboard shortcuts, what a surprise!!!) below:

Windows Management. By now, you’ve probably seen that Windows 7 does a lot to make window management easier: you can “dock” a window to the left or right half of the screen by simply dragging it to the edge; similarly, you can drag the window to the top of the screen to maximize it, and double-click the window top / bottom border to maximize it vertically with the same horizontal width. What you might not know is that all these actions are also available with keyboard shortcuts:

  • Win+Left Arrow and Win+Right Arrow dock;
  • Win+Up Arrow and Win+Down Arrow maximizes and restores / minimizes;
  • Win+Shift+Up Arrow and Win+Shift+Down Arrow maximizes and restores the vertical size.

This side-by-side docking feature is particularly invaluable on widescreen monitors – it makes the old Windows way of shift-clicking on two items in the taskbar and then using the context menu to arrange them feel really painful.

Friday, February 06, 2009 4:01:23 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Technical | Windows 7
 Friday, January 16, 2009

I use Visual Studio 2008 in combination with MSTest to do Test Driven Development. One of the most important and frequent tasks when practicing TDD is running your tests. Much has been said about NUnit’s better fit with TDD (in great part due to their standalone test runner that simply re-runs all your tests when the assembly is rebuilt), but it doesn’t have to be as bad as it may be out of the box with only a few tricks and tweaks to Visual Studio.

Firstly, it’s extremely important to know your keyboard shortcuts. It always amazes me when I see developers write a whole bunch of code using both hands on the keyboard and then reach for the mouse to click the green Play button to run it. Ctrl-F5 runs your code, F5 debugs it; it’s that simple. With TDD, however, there is another step between writing and running your code. It is running your tests. Visual Studio’s approach to test management is very QA oriented, but it does have the simpler commands for running tests within the current context as well as ALL tests and they have keyboard shortcuts defined by default. Here they are and they all perform a build first if necessary as well:

Shortcut Command
Ctrl-R A Run all Tests
Ctrl-R T Run Tests in Current Context
Ctrl-R Ctrl-A Debug all Tests
Ctrl-R Ctrl-T Debug Tests in Current Context

Note that these in fact are keystroke macros and mean that you first press Ctrl-R and then press A by itself.

Sometimes, a complete rebuild is required to flush old binary artifacts and this by default requires going into the menus. Ctrl-Shift-B shortcut builds the solution so I find it useful to map Ctrl-Alt-Shift-B to the Rebuild Solution command. You can do this easily from the Tools->Options Menu:

Bind Rebuild Solution Command in Options Dialog
Click to enlarge

Finally, the test-runner window could become cluttered with test results once the number of tests increases significantly. This makes finding the failed test somewhat painful. If you look at the 4 possible Result values for the tests—Pending, In Progress, Failed, and Passed—you may notice that all but Passed have an ‘i’ in them and we only care about tests that don’t pass. So if you filter the Test Result window to only show tests with an ‘i’ in the Result you get a list of all tests in Progress or Pending but which filters out the successful tests and leaves only the Failed ones behind after the test run is done.

image
Click to enlarge

Unfortunately, the filter setting doesn’t stick between VS restarts and you have to repeat the process but it’s quick and simple.

With these settings I find writing and running tests a breeze in Visual Studio.  These suggestions will work in Visual Studio 2005 as well although VS 2005 test runner’s performance issues are a mroe difficult issue to overcome.

Friday, January 16, 2009 2:01:23 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Development | TDD | Technical
 Monday, January 12, 2009

Disclaimer: I work for Microsoft
Disclaimer 2: Parts of the group that I work for are responsible for some components in Windows

I work at a group at Microsoft that is responsible for delivering several components of the next version of Windows, so having heard about and seen glimpses of the new OS I have long planned to try it out and with Windows 7 Beta being made available to the public this week, I decided to give it a shot. Microsoft prides itself of eating its own dogfood (perhaps with varying degrees of success from instance to instance, but nonetheless) and installing Windows 7 Beta can be done over the network boot like you would any other OS you may need for work.

I use a Dell XPS M1330 laptop for work and it’s a great Vista machine that is light weight and has great Dell battery life (I am saying this having experience battery “life” according to HP and Toshiba in the past which primarily involves reviving your battery back to life by plugging it in). The laptop is equipped with 4 Gigs of RAM and a dedicated NVidia 8400M GS video card. To date I was running Server 2008 x64 on it in order to take advantage of some of the server features that aren’t available on Vista but I decided that an excellent way to truly try out Win 7 would be on my day-to-day machine. I have kept it purposely free of development related things in order to keep performance up.

So I opted to burn a bootable image of Win7 and wipe the machine clean with anew install. Win 7 is based on Vista’s sources and at the moment shares the same set of SKUs with its predecessor. I ended up with Win7 Enterprise Edition which as of the Beta build has all the features of Ultimate (Games are included but need to be added post-install through the Programs and Features item in Control Panel). The installation experience was very much like Vista except for some minor changes in theming such as the background of the installer and some window coloring. This is actually a good thing since Vista’s installation process is fast and straightforward. One notable difference was in the portion of the installation that happens upon the first time the system boots up. Win7, having detected my wireless card, prompted me to pick which network to connect to.

Below is a list of my first impressions with the new OS.

Hardware and Software Support

Hardware works. Win7 detected all of the hardware on my system except for the fingerprint reader, driver for which was available from Dell. This is a contrast from Vista x64 install that required me downloading quite a few drivers from Dell. This is expected, however, since the driver model is mostly unchanged from Vista and has been around long enough for the manufacturers to catch up.

Most applications simply work with no issues. So far I haven’t found an application that refused to run with a minor exception of Skype where only the 4.0 Beta would work, but similar issues exist with version 3 on Vista as well. Win 7 is developed with Application Compatibility (AppCompat for short) as one of the top pillars and so far it has been great. Google Chrome runs but the rendering engine doesn’t work so it’s not really usable. Live Mesh has an issue where it keeps turning transparency off on Windows and the taskbar – it’s rather annoying actually…

Windows Experience Index (WEI)

WEI measures performance of 5 key areas of every computer on a uniform scale: Calculations per second (Processor), Memory operations per second (Memory), Desktop Performance for Windows Aero (Graphics), 3D gaming and business graphics performance (Gaming Graphics) and Disk Data Transfer Rate (Primary Hard Disk). In Vista, the rating went from 1.0 (poor) to 5.9 (excellent). In Win 7 the scale can go up to 7.9 to account for newer and faster hardware. Of course having the same hardware as before, my score hasn’t really changed since I’ve had Vista installed. While these scores can be mildly affected by installing newer, updated drivers from hardware manufacturers that squeeze as much performance as possible from your existing hardware, the way to really kick them up a notch is to upgrade the hardware. The overall system score is determined by the lowest number and as such I am limited at 2.9 by the laptop-grade hard-drive that the system came with (and will remain with as well…).

Taskbar Redesign

In my opinion the taskbar is getting it’s first major update in Windows 7 since it was introduced in Windows 95. While it’s not a complete re-imagining of how we use Windows, it’s a different enough take on how the Windows taskbar works.

The quick Launch toolbar has been replaced by an ability to Pin applications to the taskbar. When an application is pinned, it’s icon will always be displayed in the Taskbar

Taskbar buttons are now rearrangeable. It is finally possible to move buttons for various running applications on the taskbar. It’s a small but a very welcome change.

Right clicking on the task bar buttons now brings up a menu of actions that are application specific. Gone is the familiar and standard, yet of limited usefulness Minimize/Maximize/etc. menu. Here’s an example of what right-clicking on Windows Live Messenger brings up.

image

Since the Quick Launch toolbar is gone, the Desktop Preview button is now a tiny bar in the bottom right corner of the screen (given that your taskbar is on the bottom of course). Hovering over the button will make all the windows transparent so you can see the desktop, while clicking on it will hide all the windows and show the desktop.

 

Start Menu updates

The recent applications and recent Items menu has been combined and now an app that has document types associated with it will have an arrow next to it when listed in the Recent Applications view. Clicking the arrow will show recently opened documents.

image  becomes: image

This provides an easy shortcut for a fairly frequent scenario (at least for me) whereas I launch Excel to open a document I recently worked on.

Much like the smart right-click menu on the taskbar, the Start menu also displays available actions for a recent application that is already running.

image

 

Performance

Shutdown/Start-up is faster. Granted I am running on a fresh OS install, but having already installed Office and Visual Studio, the OS still restarts quickly. Time will tell how fast it will remain since typically windows start-up/shut-down performance deteriorates over time.

Wi-Fi seems to work better. At Microsoft, we have to go between buildings all the time and there are several networks using a variety of authentication flavors around. They all require a certificate to be installed on the machine and Win 7 auto-enrolled with the certificate (when I joined the domain) and has been on wireless ever since.

 

Desktop

The Desktop now includes an ability to use Rotating Backgrounds. Small feature, but neat. Makes looking at your desktop more interesting every time.

There is now a quick link to Change the screen resolution which eliminates the need to select Personalize –> Display Settings. Now it’s only a right-click on the Desktop away.

There are now some gesture-driven interaction with windows. Dragging a window to the top edge, will maximize it while dragging it to either side will dock it there. This makes placing two windows side-by-side a breeze. An interesting and rather unconventional feature (at least as far as Windows features go) is the window wipe-away. You can grab a window and shake it from side-to-side and thus “wipe away” all the other windows to leave it as the only one that’s not minimized. Do it again and the rest of the windows come back…

Another noticeable change is the lack of the Windows Sidebar. The gadgets are now free floating and can be set to be on top of other windows. It’s an interesting decision and certainly reclaims the space the sidebar could at times take up on lower resolution monitors, but it does make gadgets useful primarily only when the desktop is visible. Features like wipe-away and Desktop Preview should make taking a glance at the gadgets fairly easy, however.

 

The Beta experience

This being a Beta release of Windows means that bugs may still be present, application issues may come up and features may not have the best polish. To account for all of the above, Win 7 provides a “Send Feedback” on in the title bar of all windows (well, almost all windows). Clicking on the link brings up a really nifty Issue Report tool that allows you to describe your issue in detail as well as record a video reproducing the issue. This makes it easy to submit feedback on anything from bugs to feature suggestions.

 

Final Thoughts

My first impression of Win 7 is definitely positive. The new UI seems fresh and there are some real usability improvements in some of the core Windows interactions. I was rather skeptical at first of the big-button taskbar wondering if it will not let me manage my windows effectively, but so far it has enabled me to do it quite well. For more information, you should look at the Paul Thurrott's Windows Supersite. It provides a good FAQ on this and other versions of Windows as well as some other Microsoft Technologies.

Monday, January 12, 2009 10:11:43 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
General | Technical | Windows 7
 Tuesday, December 04, 2007

imageI just updated my SQL Server Service Manager application. It's designed to manage services that are part of SQL Server 2000 & 2005. It has support for multiple instances on the same machine and allows creation of saved sets of services for quick control. Can be useful to bulk start/stop SQL (when you need memory) or for switching between multiple instances. The newest version adds support for "Pinning Down" services so that the current set is the start-up one. I also updated the UI to look better on Vista (minor sizing).

Version 1.0.0.10 is available as ClickOnce here.

ENJOY.

Tuesday, December 04, 2007 11:29:12 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

 Wednesday, November 07, 2007

I am playing around with the XNA Framework and in the process of writing a game, I need to perform in essence a graph traversal. Given a 3D board (of w x h x d cells), I need to from a starting position and "up" direction to go around the board and figure out all reachable locations. So If you have a cube in space and you start on one of the faces, I need to get all cells on the surface of the cube. It gets a bit more complicated once you throw in rules like "you can't traverse through walls" and "if you reach an edge, you in essence go over it and rotate" (sort of like going around the globe, but around a cube... if that makes sense).

Anyway... I am trying to do as much Test Driven Development as possible and this problem got me thinking. It's nothing new to write some code that will iterate through a graph, keeping track of visited cells and figuring out others, but I was trying to figure out how to do this in a testable manner without exposing all kinds of internals about the traversal class. After all, if it's private, it's an implementation detail. But I needed to say "do one pass and show me the node list" type of thing. So I decided to use .Net 2.0 iterator method instead. It allows you to create a function that returns an IEnumerable<T> and the iterate over the results within a foreach loop. Within the method you can use yield return statements to return values as they are generated and the method execution will continue with IEnumerable<T>.MoveNext() method is called. When there are no more results to return, a yield break statement is used to end the iteration process.

Here's what a method that returns nothing looks like.

        internal IEnumerable<StarLocationInfo> GetStarLocations()
        {
            yield break;
        }

As I progressed through writing various tests, I could simulate conditions such as "when on a plane, return the current position and four children next to it". In the spirit of TDD it could look something like this:

        internal IEnumerable<StarLocationInfo> GetStarLocations()
        {
            yield return new StarLocationInfo(startPosition);
            yield return new StarLocationInfo(startPosition + new Vector3(1, 0, 0));
            yield return new StarLocationInfo(startPosition + new Vector3(0, 1, 0));
            yield return new StarLocationInfo(startPosition + new Vector3(-1, 0, 0));
            yield return new StarLocationInfo(startPosition + new Vector3(0, -1, 0));
            yield break;
        }

So all of this allowed me to write tests like this:

        [Test]
        public void OnPlaneFourChildrenAreReturned()
        {
            GameBoard testBoard = CreatePlane();
            GameBoardStarTraverser traverser = new GameBoardStarTraverser(testBoard, new Vector3(2, 2, 0), new Vector3(0, 0, -1));

            List<StarLocationInfo> expectedList = new List<StarLocationInfo>(5);
            expectedList.Add(new StarLocationInfo(2, 2, 0));
            expectedList.Add(new StarLocationInfo(1, 2, 0));
            expectedList.Add(new StarLocationInfo(3, 2, 0));
            expectedList.Add(new StarLocationInfo(2, 1, 0));
            expectedList.Add(new StarLocationInfo(2, 3, 0));

            RunTraversalAndVerifyExpectations(traverser, expectedList);
        }

where the last function basically runs through the results of traverser.GetStartLocations() with a foreach loop and removes items from the expected list as it gets them from the enumerator. It also makes sure that all of the expected values were recorded.

In the end I ended up with a traversal algorithm that much resembles a typical graph traversal (its breadth first) and all of its details hidden away in a iterative method, yet I can test its behavior by setting the start conditions and essentially inspect its results as they come out. To sum up:

  • I was able to use TDD methods to drive the behavior of the algorithm
  • I kept the details of the implementation hidden, since all it takes to invoke the "traverser" is a single function call.
  • I used a neat feature of .Net 2.0.

Note: this can be done with .Net 1.1 of course, but it's not as neat as one would need to implement both an IEnumerable and IEnumerator interfaces in a couple of classes.

Wednesday, November 07, 2007 9:40:31 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Development | TDD
 Wednesday, September 19, 2007

No I am not having a child!!! I am talking about my "digital" family.

I recently put together a new system for home development and gaming use. here's the quick spec:

  • Intel Core 2 Quad 2.4 GHz Q6600 Processor
  • 4GB Corsair PC6400 RAM (4-4-4-12)
  • EVGA NVIDIA 680i SLI Motherboard
  • 2x Western Digital 320GB SATA/3GBs Hard Drives w/16MB Cache
  • XFX NVIDIA 8600GT 512MB DDR3 RAM Video Card
  • SAMSUNG 16X SATA DVD+/-R/W CD-R/W Drive w/LightScribe
  • ANTEC Sonata III case w/500W power supply

All of this from newegg.com for just about a $1000 after mail in rebates and I am pretty happy with what I ended up with.

The CPU is very impressive. It sports 4 cores with 32KB+32KB L1 Cache and 2 x 2MB L2 Cache on an 1066MHz FSB. The amount of cache is very impressive especially when compared to some of the older Extreme edition processors that still cost more than this CPU. I am running Vista Ultimate x64 and the CPU usage is typically under 15%. The great thing abut this processor is that even if one core spikes up, it only amounts to 25% of the total processing power. I have tried a few games on it so far and even those have not utilized the multiple cores. I can't wait to try something that really pushes the multiple cores on it. I did apparently end up with the older B3 stepping that runs a bit hotter and is harder to overclock, but the newer G0's provide only slight advantage.

My dev box at work has 4GB of RAM and I've always been happy with the speed, so it was a no-brainer for me to go with 4 at home. It's almost strange, however, to have a machine with no server components (no IIS yet, no SQL Server, etc) running on it. It almost feels too fast!!! (ALMOST since there is actually no such thing)

The XFX 8600GT video card was a good balance between price and performance. It sports 512MB of DDR3 RAM and has fulls support for DirectX10 all for a $130. And it came with a copy of Company of Heroes which is a great RTS game.

I am also finally running in RAID. I went with mirroring of the two 320GB drives into a single 320GB partition. Seeing how this purchase was prompted by the recent near-failure of an HD in my laptop (it still doesn't boot, and it's not dead and a whole another story) I got so fed up with loosing data, RAID was an absolute requirement. It's also quite speedy. I guess this is in a way a hybrid raid implementation, but it's not software and is implemented by the motherboard. The SAMSUNG drive adds all the CD/DVD burning capabilities i could ever desire (no thanks to the HD format wars for now...). Note: 100% SATA system here; no IDE!!

All of this is plugged into the EVGA motherboard running the NVIDIA nForce 680i chipset with lots of nice features. My only complaint is lack of one extra set of USB ports. The case has 2 in the front, and the motherboard only has one more plug-in left for the rear expansion slot panel. I guess it was designed for a case with no USB plugs, which I would think leaves out majority of the cases today. It does have 4 more USB ports on the rear panel of the motherboard itself, so I've got plenty, but I ended up with 2 cold ports on the rear expansion slot.

ANTEC is known for having some of the quietest cases around and Sonata III proves to be no exception. The loudest fan in the system is a small fan on the motherboard cooling the NVIDIA chip. The case is very light and had plenty of room for all of the components.

Final Performance Scores:

WEI  

So Vista seems pretty happy. As am I!!! I can now work, develop and play at full speed at home. Once I get to overclocking I'll post the new scores.

Now I just have to figure out how I'm going to solve the problem of running a home server seeing how my server laptop no longer boots.

Wednesday, September 19, 2007 4:18:30 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Technical | Vista
 Wednesday, August 01, 2007

I run Vista Ultimate on a Dimension XPS at home. As good as the machine was 3 years ago when I got it, 1 Gig of RAM is just not cutting it anymore. With another Gig still costing over a $100, I decided to try the poor man's solution. I went out and got a $20 1Gig USB memory stick and plugged it into the PC.

Vista includes a feature called ReadyBoost. There have been plenty of posts about it, but I wanted to point out that it really does work. I was doing some tinkering with the XNA Framework (more on that later) and having a couple of Visual Studio Express instances running along with 3D Studio MAX instance and an IE window or 2 (or 5) was taking its tall on the system.

With the memory stick in and configured to be used for ReadyBoost, the system is SIGNIFICANTLY more responsive. Switching between windows is now practically instantaneous and launching a new IE window doesn't take a good portion of 30 seconds anymore. Another noticable thing is the responsiveness of the system when I sit back down in front of it after not suing it for a day. It's common for the computer to "wake up" for a few minutes when this happens, but ReadyBoost (which is essentially a cache for the swap file) makes that a non-issue.

Eventually I will add another Gig of RAM to that box which will probably reduce the effectiveness of the ReadyBoost cache. It would be interesting to see how much the extra RAM will help vs. ReadyBoost...

Couple of notes about ReadyBoost:

  • External Memory readers are not supported, so you can't plug an SD card into your printer. But a built-in SD reader (as some laptops have now-a-days) can work. The tell tale sign is if your reader comes up as an empty drive in the OS when there is no card in it, it will not work.
  • The memory has to be fast enough. This is arbitrary and most new USB sticks should work, but I have had an older 256MB stick fail to pass the speed test. Here are some more facts...

Overall: ReadyBoost rocks and, unless you have 2+ Gigs of RAM, it is totally worth it.

Technorati Tags: ,
Wednesday, August 01, 2007 1:03:54 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
General | Vista

I am taking a third stab at this whole blogging thing. I am no novice this time around and I think I know what I want out of my blogging setup. The first foray was with .Text a couple years back and was fun but got frustrating since the comments system didn't have built-in Captcha support.

I decided to switch to Windows Live Spaces. That was also fun, but had its drawbacks as well. Eventually, I ran out of image space (which I realized when old posts started showing images from newer ones). Having moved out to Washington state to work for MS, settling in and getting into the thick of things at work took priority over blogging.

Here's the third foray. DasBlog gets contributed to and used by the never sleeping Scott Hanselman, which gives me plenty of confidence that it works well for even high volume blogging.

So I hope third time's the charm....

Wednesday, August 01, 2007 12:15:44 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
General
Categories
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Alexey Kouzmitch
Sign In
Statistics
Total Posts: 9
This Year: 0
This Month: 0
This Week: 0
Comments: 0
Themes
Pick a theme:
All Content © 2010, Alexey Kouzmitch
DasBlog theme 'Business' created by Christoph De Baene (delarou)