My name is Nir and I'm the founder of Nbd-Tech, this blog is about things that interest me, so you can find posts on productivity, running a software company and obscure technological topics.

This blog is also the home of my Weekly Productivity Tip

Productivity Tip – Don’t Read About Productivity

Time spent reading about productivity is not itself productive, long books about becoming more productive and productivity systems that are overly complex are rarely worth it even when the system work because of the time investment needed to learn and maintain the system.

I’ll try to keep post in my productivity tip series as short as possible so they are worth the (short) time it takes to read them.

The importance of running your own spam filter (and other security software)

Security is a tradeoff, there is always a choice between security and usability, a good example for this is spam filtering, almost everyone gets an overwhelming amounts of e-mail spam – fortunately there are a wide range of anti-spam solutions to help you deal with this situation.

For your personal e-mail you probably don’t care too much about an occasional lost e-mail and deleting spam manually is just too annoying – so you’ll probably prefer an aggressive filtering system, at least as long as it doesn’t block any of your friends.

From a business perspective a lost e-mail message can cost you a sale – so you don’t want any real e-mails ever classified as spam, and it’s a good idea to store all the spam messages somewhere you can take a look every once in a while and make sure there aren’t any mis-classified non-spam messages in there.

Anti-spam system maintainers have a different point of view, sometimes, especially for free anti-spam systems, the maintainer considers spam to be one of the worst things that ever happened to man kind and it should be stopped at any cost, some of those systems will gladly blacklist entire countries and will reject anything even remotely suspect, some legitimate messages lost? Just a minor collateral damage in the war against spam.

And if you are an e-mail service provider it’s more important to not let the service be overrun by spam, and if some legitimate messages are lost – well, that may cost someone money, but that someone isn’t you.

The right spam filtering solution depends on your specific situation and is a tradeoff between haw much spam you are willing to receive and how many legitimate messages you are willing to lose – and you should make this tradeoff yourself, based on your needs and not let someone else make it for you.

yaTimer 2.2.1 New Feature - Screen Saver Detection

As I mentioned before yaTimer 2.2.1 adds just one small feature – and this feature is screen saver detection.

If you turn this feature on (from the options window) yaTimer will automatically stop all running timers when the screen saver starts, if you use yaTimer to track time spent on the computer you can turn this on and if you forget to stop the timer when you finish your work it will stop automatically in a few minutes when the screen saver kicks in.

yaTimer 2.2.1 released

After a lot of hard work yaTimer 2.2.1 is finally released.

This is a service update, with just one tiny feature and a lot of bug fixes.

As always you can upgrade you older version for free here.

With this version I also updated my release process and automated some things that I did manually before, this set me back about a week or two for this release but it will speed up future releases.

The plan is to add this new version to the automatic updates system sometime next week.

yaTimer 2.2.1

Today the next version of yaTimer went into the final testing phase, a few more days of intensive testing and the new version will be released.

Version 2.2.1 is a minor service release, it contains a few bug fixes and only one new feature.

Trackbacks are Completely Broken

I turned trackbacks off on this blog today.

I love the concept of trackbacks, every time someone reference a blog post the software automatically creates a link back in the post’s comments.

It makes it easier to follow conversations and it’s a nice way to find more blogs on topic that interest you – it’s really a wonderful idea.

So what’s the problem then? The system is based on trust, the blogging software will blindly add a trackback comment to whoever requests one – even if it’s a spammer.

The moment spammers figured it out it was all over, lately the amount of trackback spam this site gets went up from a few messages every week to a few messages every few hours, in the same time the number of real trackbacks when down to zero.

Just to be fair, I’m not sure it’s possible to create a spammer-proof trackback system, after all the system is supposed to receive automatic messages from site you don’t know about and I don’t know how the blogging software is supposed to know if that site is legitimate or a spam site.

There is a lesson for software developers here, even if your system is really cool and helpful it can’t survive unless it has some way to prevent abuse.

And if you reference a post on this blog, feel free to leave a comment and tell me about it.

Vista style open and save dialogs with WPF (without using the Vista bridge sample)

This is the fourth (and last) part in a series about how to get the latest look and feel for your WPF application, the previous parts are:

In part 3 of this series we’ve set a manifest file and almost solved our problem – we finally got rid of the Windows 2000 style dialogs and moved to XP, but we still haven’t got Vista style file open and save dialogs.

The problem is again backward compatibility, the Windows file dialogs are customizable and when an application customizes a dialog Windows will helpfully use the version of the dialog supported by the application in order not to break the customizations.

You probably didn’t customize the file dialogs but WPF (as well as WinForms) always tell Windows they customized the dialog.

All you have to do now is to bypass the FileOpenDialog and FileSaveDialog completely and use the Windows APIs directly – this is easier than it sounds – you basically have two options, you can find the Vista bridge sample on MSDN, this sample contains all the code needed to use and customize the Vista file dialogs (there is a lot of code there), on the other hand, you can use PInvoke to call the old simple APIs and as long as you don’t try to customize the dialog you will always get the latest version.

Download the code

The zip files contain classes that are mostly a drop in replacements for the WPF classes, the code is straight forward interop code that calls the GetOpenFileName or GetSaveFileName Windows functions, the only tricky part is that those functions sometimes return string with embedded nulls, I’ll explain how to deal with this in a future post.

StartMenuSearch for Windows XP Released (finally)

My second product StartMenuSearch for Windows XP was finally released yesterday – two weeks too late.

Never underestimate how much work it takes to turn a working program into an actual product, also never underestimate how much unexpected work you’ll have to do on other unrelated projects the moment you publish a deadline for a product :-)

yaTimer 2.2 Changelog

Here is the list of all user-visible changes between yaTimer version 2.1 and 2.2:

NEW - Add create from template to toolbar
NEW - Grouping in task list
NEW - Un-pause tasks
FIXED - Comment text truncated on reports
NEW - Weekly project timesheet report
NEW - Weekly client timesheet report
NEW - A new version of all task reports with full comments
NEW - Reset all tasks
FIXED - Time event text unreadable when using XP classic theme
FIXED - Time event show up in wrong order when resetting a running task
NEW - Automatically start yaTimer on login option
FIXED - Bug when manually entering time in the past
FIXED - Make sure the window never starts off-screen
FIXED - Change toolbar style
FIXED - Change on-top button style
NEW - Mark task as non-billable
NEW - Mark task template as non-billable
NEW - filter report by billable status
NEW - Add fixed and per-hour rate to task
NEW - Add fixed and per-hour rate to task template
NEW - Add task creation date to task
NEW - Billing breakdown report
NEW - Add fixed and per-hour rate to task
NEW - Add estimated time to task
FIXED - Use Vista New Common Dialogs
NEW - Bill report
NEW - Add more info to task tooltip
NEW - Grouping in reports
NEW - estimated/actual time report
FIXED - Change task text color to white when task color is dark
FIXED - Change startup message
NEW - help button
FIXED - Tasks will sometimes not show up in weekly report
FIXED - Bug when switching between timer and countdown when task is running
FIXED - When deleting the complete event of a completed task it may become inaccessible
FIXED - Change CSV files from UTF-8 to current code page (Excel can’t read UTF-8 CSV)
FIXED - Bug in options dialog when running from a portable drive

The Application Manifest Needed for XP and Vista Style File Dialogs and Message Boxes with WPF

This is the third post in a series about how to get the latest look and feel for your WPF application, the first part is here and the second is here.

Here is the manifest file needed to get the newer version of the common controls library, just setting this manifest will get us the newer (XP or Vista) look for message boxes and the XP look for the file open and close dialogs – but when running on Vista this will not give us the Vista style open and close dialogs, I’ll show how to fix this in the next part of the series.

IMPORTANT NOTE: This manifest contains Vista security information, it will disable all the Vista compatibility tricks that let software that only runs as admin sort of work as a limited user in Vista, you have to test your software on Vista before releasing it if you use this manifest.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <description>YOUR APPLICATION NAME</description>
  <!-- Identify the application security requirements (Vista): -->
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <!-- Activate Windows Common Controls v6 usage (XP and Vista): -->
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>
</assembly>

Setting the Manifest in Developer Studio 2008

You’re in luck, you can set the manifest from the project properties.

When you run the program under the debugger (F5) you will not see the new style dialogs, to fix this uncheck the “Enable the Visual Studio hosting process” checkbox.

Setting the Manifest in Developer Studio 2005

You can add the following line as a post-build event (project properties -> build events tab):

"C:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" -outputresource:"$(TargetDir)$(TargetName).exe;#1"

For this line to work you have to name your manifest the same as your program exeutable with the additional manifet extention - so if your program is MyApp.exe the manifest has to be MyApp.exe.manifest

Like VS 2008 when you run the program under the debugger (F5) you will not see the new style dialogs, to fix this uncheck the “Enable the Visual Studio hosting process” checkbox.

Setting the Manifest from the Command Line

You can use the mt.exe program that is a part of the Windows SDK, the syntax is:

mt.exe -manifest "FULL PATH OF MANIFEST FILE" -outputresource:"FULL PATH OF EXE FILE;#1"

mt.exe is part of the Windows SDK, you can download the latest version of the SDK from the Microsoft download center.

In the next (and last) part we’ll see how to get the modern open/save dialogs