December06

Explorer Search options for file and IE favorites

 

Do you every need to search in Explorer (your Windows Explorer, not the Internet one) for files of a specific size range?  A coworker showed this to me and I wanted to write it down so I don’t forget it!

Search by Size: range

image

That will filter the results to all files within those ranges.  This even works on Server 2008 (I thought it was a Windows 7 only feature at first).

Search in Internet Explorer Favorites

You can also search through your internet bookmarks and favorites by the strange sequence of adding your favorites to the favorites for search.

Step 1

First navigate to your favorites folder in Explorer.  This should be the one under your username, not the one at the top of the Explorer window.

Choose the favorites icon under your username

Select the Favorites item.  You will see your folders and bookmarks on the right side of the screen.

More...

November16

Async Data Flow Block in TPL

Check out the new System.Threading.Tasks.Dataflow.dll for processing blocks of data in an asynchronous manner.  I watched this video on Channel 9 and it blew me away.  I hope this goes into .Net 4.5 by default.

Intro to TPL Dataflow

Very easy to control things like a data pump where you want to process the data as it comes into a queue.  You can even let the ActionBlock run in and just have it call you back when it is done.

 

Sample code

// Setup an action block - nothing is happening here 
// until we post something to this block
var ab = new ActionBlock<int>( i =>
{
// Wait without blocking the thread
await TaskEx.Delay(1000);
Console.WriteLine(i);
}
, new DataFlowBlockOptions(TaskScheduler.Default, 4));


// Now post 10 items to the block
for(int i = 0; i < 10; i++)
{
ab.Post(i);
}

// Tell the action block we are done and it should stop
ab.DeclinePermanently();

// Wait for it to done processing
ab.CompletionTask.Wait();

More information

Visual Studio Aync Website

October19

Windows Runtime Information Links

WINRT (as the Windows Runtime as been dubbed) was announced a while back at BUILD in California.  I was super busy at the time and didn’t get to read or watch any of the sessions online.  Check out the WinRT Wikipedia page for more information.

I have been listening to podcasts and trying to catch up today while I am home sick.  Thought I would put some good links up for others looking to catch up also (and hopefully not while sick).

Dot Net Rocks

If you have never listened to Dot Net Rocks you seriously owe it to yourself to check it out.  I don’t listen to every show.  Grab ones you are interested in from their archive.  I have pointed several junior developers to their shows on specific topics and many have come back to tell me that the podcast was just enough to get them unstuck on some concept or idea.

DNR Show 701 has a really good intro where Carl goes through the WINRT and announcements from BUILD.  Listen to the first 15 minutes for the best information I have found anywhere about WINRT and Windows 8.

DNR Show 705 is an entire show about WINRT and WIN8.  It appears they will be starting a new podcast specifically about tablet development.  Rockford Lhotka and Billy Hollis are the guests on the show and talk about how they view WIN8 from a business and development standpoint.  Good information and will give you some insight into how WIN8 might win over the business segment.

Channel 9

Using the Windows Runtime from C# and Visual Basic BUILD session covering the topic at a high level.

Design Details of the Windows Runtime has a good overview slide from BUILD showing how .Net and WinRT all work through the same stack in Windows 8.

WinRT and .NET in Windows 8 a good blog post about the rumors of .Nets death being greatly exaggerated.

.Net 4.5, Async, WinRT with Bart De Smet is a video podcast talking about some topics for all .Net developers in the coming months and years.  Bart is a seriously smart Microsoft engineer working on all sorts of async technologies.

Application Virtualization is a great podcast talking about how apps could be sandboxed in a future OS.

Going Native 2 talks about using C++ in Windows 8 and how the runtime allows C++ to be a first class citizen of the OS again.  If you extrapolate a little you will also see how it was possible for Javascript to become first class as well.

Metro is coming

Of course building Windows Phone 7 apps I have seen the Metro UI for a while now.  But I am amazed at how many people are now jumping on the Metro theme.

imageOne site that really took the look and feel of Metro and went all out is the AfricanGeek.com site.It is written in Silverlight, but he nailed the whole Windows 8 look and feel for his site.

February02

Almost all back

Almost the entire site came back.  While I had it down I went ahead and updated to Blog Engine.Net 2.0 as well!  And my old theme even worked.  There might be a few things that need to be updated for the theme...  Will track them down over time.  Just happy to have the site back up and running.

 

December10

Silverlight Firestarter Dec 2010

Watching the Silverlight Firestarter event that was hosted here at Microsoft today.

http://www.silverlight.net/news/events/firestarter/ 

Highlights

Silverlight 5 Announced

  • Azure support
  • 64 bit Silverlight client is now available to run within 64 bit Internet Explorer
  • Low latency network applications
  • MVVM improvements, end to end complex types, RIA improvements, also mentioned as ported from WPF

Improved Data Binding and debugging of data binding.  It was mentioned that some of these are from WPF, that is a good cross product migration of tech.  This means you now have breakpoints within XAML files!  You don’t have to do it within just the source, you can set them within the XAML for the binding.  This would be VERY nice if added to ASP.Net as well.  When you have to write code for the data binding inline you can set a breakpoint for the code that gets executed as a part of the bind (and even view exception).

More...

September27

Technical Debt

Not all code that is sloppy or messy is technical debt.  I tend to agree with Martin Fowler in his assessment of technical debt.  When your team is making conscious design decisions for valid reasons (shipping a product, pushing off heavy work for next release, etc) then you are incurring debt.   When you just have a mess of code, it is not technical debt.

Pay it down fast

Technical debt is like a short term high interest loan, you should prioritize paying it off quickly, or the interest quickly overcomes the original principal of the loan.

Remember that whatever you ship to incur that technical debt will still be out there, and have to be supported.  You can’t simply tell all your users to upgrade to 2.0 because 1.0 was full of debt.  In this way technical debt is a long term bond, you can’t simple buy them back.  They take time to mature and be retired.

Learning from your code

Programming is always a journey about learning.  Often after completion of a project I think of better ways it could have been designed, built, etc.  The project could still have been a success, but there were things I would have done differently with the full insight of the completed project. 

This usually happens to me when there was simply not enough time to think through everything up front, or the requirements changed during the course of the development.

Make conscious choices

Bad things happen on projects all the time.  Just make sure you are making the decision to incur technical debt consciously.  Don’t end up in that accidental debt category.

May06

Help on Visual Studio 2010 Help

If you have used VS 2010’s help system you may have that feeling that some changes were not as fully thought as others.  The new HTML Help 3 format may seems like a great idea, it runs as a service like an IIS website that all help instances query through.  No more hitting F1 in three copies of Visual Studio and getting three copies of the complete help loaded into RAM.

But that browser experience for the help system seems missing something to me.  Maybe the index?  Maybe the ability to actually read rather than search?  It seems optimized quite well for searching the help, but not actually following a topic.  You can’t sync the table of contents and see what other articles are in the same section of the help.

I want to cover the built in help, the Help Powertool released by Microsoft, and the H3Viewer application from The Helpware Group that allows local viewing of the html 3 help files (although Microsoft insists on calling them Help 1.0 Files).

F1 Help in VS 2010

Visual Studio 2010 Help Default Here is what I see when I hit F1 in Visual Studio 2010.  You get a system tray icon with the help service running and a browser window.

You have to already opted to install the help locally as a part of the install process, or you only talk to the remote servers at Microsoft. 

There was a bug in the beta versions that if the user selected non local help for the MSDN then ALL help was non local (even if your company put some help locally the users couldn’t see it).  I hope that has been fixed, but have not had time to test it myself again yet.

More...

April02

Compact Framework is finally dead (or is it)

Click image to view originalI think many people know that we used to produce a Compact Framework (CF) provider for VistaDB.  We didn’t do it for VistaDB 4 specifically because of a couple issues that I saw coming, and couldn’t get clear answers from anyone at Microsoft.  I think since the Windows Phone 7 announcement things are finally clearing up, but Microsoft has some confusing terminology.

Compact Framework for Visual Studio 2010

A lot of people noticed this doesn’t exist.  There is no mobile story in the Visual Studio 2010 betas at all.  There were a lot of people saying it would come later, but I had suspicions over a year ago it was going away.  There is no Compact Framework for .Net 4.  But there is a new Visual Studio for Windows Phone as a part of the tools preview.

Silverlight 4 has a compact framework

But Silverlight 4 has a “compact framework” embedded in it.  Not that this is in any way shape or form similar to the actual Compact Framework.  It is a severe subset of what was already a subset of the full .Net framework.  The Silverlight subset of .Net does not include encryption, lots of XML features, ADO.Net, etc.  The Silverlight subset of .Net is really only a few core system libraries that let you write C# / VB.Net code for Silverlight.  You don’t even bind against the desktop runtime, you must target the Silverlight 4 runtime through a special project.  You cannot have a single solution with both Silverlight 4 and .Net 4 as simple output targets (you can do through linking files, etc, but not the same as you could for CF – target).

Windows Phone 7 Silverlight and compact framework

I was recently twit’d a link to a great blog by Abhinaba Basu who works on the NETCF team for Microsoft.  In his posts he discusses the Phone 7 NETCF and how it works to a great amount of detail. 

He states that Windows Phone 7 uses Compact Framework 3.7.  What follows is the summary of his post.

More...

March12

Simple ways to avoid BlogEngine comment spam

Yes, comment spam is everywhere.  Spammers will never stop trying to find new ways to get their silly links into other peoples blogs.  Even though almost every blog puts the nofollow attribute on the comments, spammers still think that their site will be boosted because of the inbound links.

I recently upgraded to BlogEngine 1.6 on this blog and found that we suddenly were being attacked by 250+ spammers a day trying to get their comments on the blog.  But our existing VistaDB Blog (was running 1.5) didn’t have this problem.  What was the difference?  Was it something new in BE 1.6?  Or was it something we had done on the VistaDB blog differently?

It turns out that spammer target a few phrases they know are used by default in certain blog engines.  They already have code in their bots that know how to fill out the forms on these blogs, so they are looking for the default phrases.

Configure Filters Correctly

First thing is the make sure your Akismet is setup correctly and you have a valid key.  One non-obvious thing is that 1.6 of BE introduced a bug that allows for more comment spam to get through because if the last filter says the comment is OK the comment is allowed.

You can change this behavior by simply moving the AkismetFilter to the bottom.  Drop its priority to 2, leave the StopForumSpam at priority 1.

2010-03-10_1345

This is what my settings look like the day I reset the filters and moved their order.

This change alone cut about 60% of the spam that was getting through by simply having Akismet be the last entry.  But you can also do a few more things to through off spammers.

More...