Bits and Pieces

Bits and Pieces

Tools and Code by Avner Shahar-Kashtan

Home Archive Categories Tags Blog Tools & Projects About Me RSS
  • When is a dash not a dash?

    2006-01-17 Avner Shahar-Kashtan Miscellaneous Debris
    An interesting an unusually frustrating pitfall that I've stumbled into a few times: Many times when we're preparing for deployment of a software product, we find ourselves preparing a Word document with the steps for installation. In the …
  • Macro Origins

    2006-01-11 Avner Shahar-Kashtan Miscellaneous Debris
    I've been wondering about the origin and etymology of the term "macro" as it is used in programming. The general use for it is to mean something large - the opposite of "micro" - but it didn't seem to fit for the concept it's used for. …
  • Visual Studio 2005, WinForms designer and the DataDirectory.

    2005-12-25 Avner Shahar-Kashtan Miscellaneous Debris
    Why, oh why must the simplest things be plagued with the most annoying problems? Finally gotten around to messing with Visual Studio 2005, I started a long-overdue project I promised someone. A very simple affair - MDB database, WinForms …
  • Impersonation and EFS

    2005-12-01 Avner Shahar-Kashtan Miscellaneous Debris
    A quick reminder, after having spent too much time on it this morning: When impersonating a client context (in this case through SSPI over Remoting), not only can you not access external network resources, you also can't access files and …
  • Outlook Miscellany: Erasing a name from the Autocomplete Cache

    2005-11-14 Avner Shahar-Kashtan Miscellaneous Debris
    The drop-down list of names that Outlook gives us to auto-complete a name or address being written is stored in a file called .NK2 in our Application DataMicrosoftOutlook directory. This file is stored in a proprietary binary format, and …
  • Disposable Unimpersonation

    2005-11-10 Avner Shahar-Kashtan Miscellaneous Debris
    A while ago, I discussed the possibility of using RevertToSelf() to avoid Double Hop problems. I suggested this pattern can be wrapped inside a class implementing IDisposable to easily use it. This is the implementation of this …
  • Control.DefaultValue isn't.

    2005-11-06 Avner Shahar-Kashtan Miscellaneous Debris
    Here is a common source of confusion and frustration that's been experienced by most people developing a custom control in .NET - in WinForms,WebForms, Sharepoint and whatnot. One of the designer attributes you can put on a control's …
  • Recycling Application Pools in IIS 6.0

    2005-10-09 Avner Shahar-Kashtan Miscellaneous Debris
    A quick tip for those of us fond of iisreset. Restarting IIS takes quite a while. Sometimes 15-20 seconds, when my w3wp.exe processes are particularly unruly. In many cases, though, a full iisreset is unnecessary. Since IIS 6.0 expanded its …
  • Over-Abstraction? A debate.

    2005-10-06 Avner Shahar-Kashtan Miscellaneous Debris
    I've been having an argument with a co-worker of mine about the KeyboardHook code I recently published here. His claim - by exposing a KeyboardHook object and letting users add Filters for specific keystrokes, I am exposing too much of my …
  • By Hook or by Crook

    2005-10-06 Avner Shahar-Kashtan Miscellaneous Debris
    While trying to implement custom shortcut keys in Outlook, I came across an old column by Dino Esposito on implementing custom Windows hooks in .NET. At first I wanted to use it as reference and inspiration only, and only when I finished …
  • Debug Timing (and a little design pattern, to boot)

    2005-09-28 Avner Shahar-Kashtan Miscellaneous Debris
    In almost every bit of code I write that's actually destined to go into a real system, I find myself start to look for places to optimize code. But having read the writings of Rico Mariani, I am weary of premature optimizations. So what do …
  • I pity the fool who messes with CTRL-SHIFT-T.

    2005-08-22 Avner Shahar-Kashtan Miscellaneous Debris
    The Visual Studio IDE, among its myriad options and combinations and features and so forth, has a trio of rather odd key combinations: CTRL-T - Interchanges the current letter and the one after it. CTRL-SHIFT-T - Same thing, only for the …
  • DatePicker Blues.

    2005-08-09 Avner Shahar-Kashtan Miscellaneous Debris
    I'm really surprised at how hard it is to find a good DateTimePicker control that meets all our requirements: 1) Must suppost null dates, like the Due Date datepicker in Outlook tasks. 2) Must be an ActiveX, and supported inside both .NET …
  • Debugging HTML that is rendered at runtime.

    2005-08-02 Avner Shahar-Kashtan Miscellaneous Debris
    A little tip when we're generating HTML content on-the-fly using client-side code, whether HTC behaviours or javascript: As we all know, when we try to View Source on such a page, the HTML we see is the base HTML that was received from the …
  • VB.NET and Enums

    2005-07-22 Avner Shahar-Kashtan Miscellaneous Debris
    I've run into several problems with the way the VB.NET compiler handles enums. I've described one here, a while ago. In a nutshell, an enum exposed by SPS was based on the non-CLSCompliant UInt32 datatype, and VB.NET was choking on it …
  • Top 5 Web Service Mistakes

    2005-06-01 Avner Shahar-Kashtan Miscellaneous Debris
    Paul Ballard on common Web Service mistakes. I try to avoid posting link-only entries since I try to not feel totally useless in my own blog, but this is a really good article that has good points for consideration when building a Web …
  • CAML still has its humps.

    2005-05-31 Avner Shahar-Kashtan Miscellaneous Debris
    The last few days I found myself wrestling quite a bit with CAML. The basic idea was to replace the standard "Create New Document" button in a document library with some logic - if no document template is specified for the doclib, replace …
  • NT Networks, Delegation, Kerberos and Impersonation.

    2005-05-04 Avner Shahar-Kashtan Miscellaneous Debris
    The issue of delegation of permissions over a network is one of the most confusing issues people run into, it seems. I don't think I've been to a project that involves web pages or services in some form that didn't run into it - people …
  • Automatic population of web-parts in a New Web Part Page.

    2005-05-02 Avner Shahar-Kashtan Miscellaneous Debris
    When a new sharepoint is created, the default page is automatically populated with several default web-parts as described in the ONET.XML and the section. This is (relatively) well documented and clear. However, if I create a new Web Part …
  • The Good, the Bad and the DataViewWebPart

    2005-05-01 Avner Shahar-Kashtan Miscellaneous Debris
    Been wrestling lately with Sharepoint's DataViewWebPart (DVWP, from now on). I'm still pretty ambivalent about it. Pros: Easy to set up - just add a list as a web-part, open it in Frontpage, right-click and Convert to XSLT. Very …
← Newer
7 / 10
Older →

Bits and Pieces — Tools and Code by Avner Shahar-Kashtan