Bits and Pieces

Bits and Pieces

Tools and Code by Avner Shahar-Kashtan

Home Archive Categories Tags Blog Tools & Projects About Me RSS
  • When Not-True Doesn’t Equal False

    2016-02-21 Avner Shahar-Kashtan Miscellaneous Debris
    There is a strangely common, reoccurring bug I’ve seen return, again and again, in most projects I’ve worked on in recent years. I call it the “Not True != False” bug, and it crops up, usually, when passing query parameters to a search …
  • Snippet of the Day: AsSingleton

    2015-11-26 Avner Shahar-Kashtan Miscellaneous Debris
    מכירים את זה שאתם צריכים להעביר ערך בודד לפונקציה שמצפה לקבל מערך או רשימה? נמאס לכם לכתוב כל פעם var myList = new List<MyClass> { myObject }; רק בשביל לקבל רשימה בת איבר אחד? אל דאגה, שוועתכם נשמעה! אני פותח את פינת ה-Snippet of the …
  • איך לשמור על אותיות גדולות וקטנות בעולם עוין

    2015-11-24 Avner Shahar-Kashtan Miscellaneous Debris
    כמתכנת C#, אני רגיל לחשיבות של case sensitivity - משתנים בשם test ו-TEST הם שונים ונפרדים. גם ב-XML וב-JSON, שני הפורמטים הנפוצים לתעבורת מידע, נהוג להקפיד על case sensitivity בשמות של השדות/אלמנטים. ולרוב זה לא בעיה - אתה שומר עם case …
  • Building a Nullable ComboBox

    2014-08-04 Avner Shahar-Kashtan Miscellaneous Debris
    I like WPF. It has a bit of a learning curve, but once you get over it, you have an extremely extensible UI model that you can tweak very deeply. Unfortunately, this mindset made Microsoft leave many of the built-in controls with some …
  • Attaching on Startup

    2014-01-23 Avner Shahar-Kashtan Miscellaneous Debris
    Here’s a neat trick I stumbled onto that can make life a lot easier – in our development workstations, certainly, and even in a pinch on staging and testing machines: How many times have you wished you could attach to a process immediately …
  • Quick and Dirty Code Timing

    2013-10-30 Avner Shahar-Kashtan Bits and Pieces, Miscellaneous Debris
    When looking to optimize our code, the first and best advice we should keep in mind is this: Measure. Don’t optimize before you know what takes time, and then only optimize where it makes sense. Measuring can be done in many ways. Using …
  • Not-So-Lazy Static Constructors in C# 4.0

    2013-02-25 Avner Shahar-Kashtan Miscellaneous Debris
    A coworker pointed me towards an interesting blog post by John Skeet about the changed behavior of static constructors in C# 4.0 (yes, I know, it’s been a few years now, but I never ran into it). It seems that C# 4.0 now tries to be lazier …
  • Not-So-Lazy Static Constructors in C# 4.0

    2013-02-25 Avner Shahar-Kashtan Miscellaneous Debris
    A coworker pointed me towards an interesting blog post by John Skeet about the changed behavior of static constructors in C# 4.0 (yes, I know, it’s been a few years now, but I never ran into it). It seems that C# 4.0 now tries to be lazier …
  • Attaching on Startup

    2013-01-30 Avner Shahar-Kashtan Miscellaneous Debris
    Here’s a neat trick I stumbled onto that can make life a lot easier – in our development workstations, certainly, and even in a pinch on staging and testing machines: How many times have you wished you could attach to a process immediately …
  • האם עוד צריך את VB.NET לתכנת מול אופיס?

    2013-01-29 Avner Shahar-Kashtan Miscellaneous Debris
    עברו כמה שנים מאז שעבדתי עם Visual Basic.NET, והייתי בטוח שבימינו, ב-2013, נגמרו כבר הויכוחים של “איזו שפה יותר טובה”. שתיהן שפות עם יכולות דומות, והבחירה ביניהן היא בעיקר העדפה סגנונית. אבל מידי פעם אני עדיין רואה בפורומים או ב-Stack …
  • האם עוד צריך את VB.NET לתכנת מול אופיס?

    2013-01-29 Avner Shahar-Kashtan Miscellaneous Debris
    עברו כמה שנים מאז שעבדתי עם Visual Basic.NET, והייתי בטוח שבימינו, ב-2013, נגמרו כבר הויכוחים של “איזו שפה יותר טובה”. שתיהן שפות עם יכולות דומות, והבחירה ביניהן היא בעיקר העדפה סגנונית. אבל מידי פעם אני עדיין רואה בפורומים או ב-Stack …
  • Surviving the Enterprise Application

    2013-01-01 Avner Shahar-Kashtan Miscellaneous Debris
    Many of us have worked on this sort of application: “The Monster”, “The Big One”, “The Behemoth”, or simply “The Enterprise Application”. You know the kind I mean: it’s a mess of dozens of projects and solutions. It requires setting up …
  • Remote Debugging through fire, snow or fog

    2012-07-19 Avner Shahar-Kashtan Miscellaneous Debris
    Remote Debugging in Visual Studio is a wonderful feature, especially during the later stages of testing and deployment, and even (if all else fails) when in production, but getting it to work is rarely smooth. Everything is fine if both the …
  • Remote Debugging through fire, snow or fog

    2012-07-19 Avner Shahar-Kashtan Miscellaneous Debris
    Remote Debugging in Visual Studio is a wonderful feature, especially during the later stages of testing and deployment, and even (if all else fails) when in production, but getting it to work is rarely smooth. Everything is fine if both the …
  • ArcGIS–Getting the Legend Labels out

    2012-03-27 Avner Shahar-Kashtan Miscellaneous Debris
    Working with ESRI’s ArcGIS package, especially the WPF API, can be confusing. There’s the REST API, the SOAP APIs, and the WPF classes themselves, which expose some web service calls and information, but not everything. With all that, it …
  • ArcGIS–Getting the Legend Labels out

    2012-03-26 Avner Shahar-Kashtan Miscellaneous Debris
    Working with ESRI’s ArcGIS package, especially the WPF API, can be confusing. There’s the REST API, the SOAP APIs, and the WPF classes themselves, which expose some web service calls and information, but not everything. With all that, it …
  • The Case of the Unexpected Expected Exception

    2012-03-01 Avner Shahar-Kashtan Miscellaneous Debris
    “NUnit is being problematic again”, they told me when I came to visit the project. “When running unattended it’s not catching assertions properly and the test is coming up green, but when stepping through in the debugger, it works fine.”. …
  • The Case of the Expected Unexpected Exception

    2012-03-01 Avner Shahar-Kashtan Miscellaneous Debris
    “NUnit is being problematic again”, they told me when I came to visit the project. “When running unattended it’s not catching assertions properly and the test is coming up green, but when stepping through in the debugger, it works fine.”. …
  • Open Source Vigilantes?

    2012-02-26 Avner Shahar-Kashtan Bits and Pieces
    <Placeholder for StackOverflow Weekday counter>
  • Open Source Vigilantes?

    2012-02-26 Avner Shahar-Kashtan Miscellaneous Debris
1 / 10
Older →

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