Scott Hanselman

The DebuggerDisplayAttribute in Visual Studio 2005 and IFormattable

February 05, 2005 Comment on this post [5] Posted in ASP.NET | Ruby | Bugs
Sponsored By

I didn't realize this when I did my generic IFormattableObject implementation last week, but this week finds me writing a chapter on Debugging for an ASP.NET 2.0 book.

I was checking out the DebuggerDisplayAttribute and realized that it uses a similar format string style as my stuff. (Of course, my stuff isn't new, languages like Ruby and others have done it for years).

Anyway, the point was that I had been wondering if my idea "fit" into the world of .NET, but the syntax of this DebuggerDisplay attribute left me feeling more justified for my work. It's interesting though, that they are offering this attribute, when I always used ToString to do the same basic thing in the debugger. So, in a Whidbey world of DebuggerDisplayAttribute, what's ToString() for? I guess just Console.WriteLine(myObject)?

UPDATE: The "TracePoint" syntax in the VS 2005 Debugger is the same.
For example: {i.FirstName} Function: $FUNCTION, Thread: $TID $TNAME
prints out the variable i's property FirstName as well as some psuedo-variables like the current function, the Thread ID and Thread Name

Syntax Description
[DebuggerDisplay(
  "{_forename} {_surname}")]
Uses the private _forename and _surname members
[DebuggerDisplay(
  "Employee- {ToString()}")]
The ToString method is called to provide the textual representation to be displayed as the value of the object
[DebuggerDisplay("Employee
  ( {Forename} {(_wizard) ?
  \"Is a Wizard\" : \"Is 
  \"Is not a Wizard\" } )")]
An expression is evaluated in order to provide a differing representation to the user based on the value of a flag

Now playing: Kevin Lyttle - Turn Me On

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

TestDriven.NET Keyboard Bindings for Visual Studio.NET

February 02, 2005 Comment on this post [4] Posted in Bugs | Tools
Sponsored By

I've been meaning to do this for months, and Gordon reminds me to. If you are a TDD person and you use Test Driven.NET, nothing has changed your development life in the last year than right-click "Run Tests."  I was always irritated by the mouse action, and never got around to assigning keys. Now I've assigned Ctrl-Alt-F5 to "TestDriven.NET.Debugger." That along will save me at least 10 minutes of mousing in a development day.  I've also added Shift-Ctrl-T (Test) to compliment Shift-Ctrl-B (Build).

TestDriven.NET Keyboard Bindings -I did a little exploring today and discovered that you can assign keystrokes to these commands. Under Tools | Options, Keyboard, the commands you're looking for are:

TestDriven.NET.Client - The equivalent of the run test cases menu option, this will run test cases on whatever the active window is.
TestDriven.NET.Debugger - This is the same as the run in debbuger option, it will run the code in the active window in the debugger.
TestDriven.NET.Solution - This will run all the test cases in the current solution
The 80/20 Solution - TestDriven.NET Keyboard Bindings

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Explaining the Ethiopic Numbering System and a tiny lesson on Amharic

February 02, 2005 Comment on this post [7] Posted in ASP.NET | Speaking | Nant | Africa
Sponsored By

Fantastic stuff from Michael Kaplan today, he did me a favor and dissected the Ethiopic numbering system. He points us to two good sites on Ethiopic Numerals. One at Geez.org and one at the venerable AbyssiniaCyberGateway.

You can test your browser's support for the Fidel here. Personally, I use the GF Zemen Unicode font (TrueType) as it appears to be the most complete with 608 glyphs.

For example, the number 2345 is represented by

2,345 = (20 + 3)*100^1 + (40 + 5)*100^0
      = 20 3 100 40 5
      = TWENTY THREE HUNDRED FORTY FIVE
      =
1373 136b 137b 1375 136d 
      = ፳፫፻፵፭

There's a lot of rich Ethiopian culture in the states. There are more Ethiopians in Washington D.C. than anywhere else outside of Addis Ababa. The NW, where I live, experienced an influx of Ethiopians and Eritreans during the 80s. There are many thousands in both Portland and Seattle.

I'd posted previously touting Word's support for Amharic. I went to junior college with a number of Ethiopians and picked up a colloquial chunk of Ethiopian Amharic, the language of the Amhara people.  It's a fantasticly interesting language to learn. Here's a few interesting bits.

  • Ethiopians and call themselves "'Abesha" or "Habesha" with a soft h. One would ask a person if they are Ethiopian by saying "Habeshane?" (Male) or "Habeshanesh?" (Female) or "Hebeshanot?" (Elder).
  • The Fidel is the Ethiopian alphabet - however, not that Amharic isn't strictly an alphabet, it's a syllabary. I have a number of Amharic dictionaries, as well as a number of "Fidel" hanging in my house.
  • Very roughly, Ge'ez is to Amharic as Latin is to English. If you go to an Ethiopian Orthodox church or read an older bible, they will use Ge'ez.
  • The syllabary uses a consonant root then modifies it with a vowel addition. This might make more sense looking at the SERA Syllabary for the Fidel. The root is on the far left as a GIF and is modified as we move to the right.
  • English speakers learn our A,B,Cs, but Amharic/Fidel learners sing "Ha, Hu, Hi, He, HE, h, ho" and do each consonant with each vowel as if they were doing a traversal of a grid.
  • Amharic is an "afro-semetic" language, which feels slightly like Hebrew with some Arabic twists.
  • A graphic illustrating the history of the written language is found here. Note the slighly Coptic pictographic look of the Old-North Semitic that morphs into a more structured, but still pictographic Old Abyssinian. However, you can see elements of current Ethiopic (Ge'ez) in all of them. The letters each take up one row in this graphic.
  • There isn't an explicit word for "No" - instead there are "negations" that indicate what you just said "isn't so." If you ask an Amharic-speaking Ethiopian what the word for "No" is, they will likely say "Aye" which is short for "Ayedellum" which means "It isn't so." So, it wasn't good (t'iru) you might says "t'iru ayedellum" indicating "good it was not."
  • The negation isn't added until the very end of a sentence, where verbs are typically added as well. That means you may be a while into a sentence before the "no" comes along.
  • "Amharigna k'wank'wa ba'tam aschaGari' nowe" = "Amharic language very difficult [it] is" versus "Amharigna k'wank'wa ba'tam aschaGari' ayedellum" = "Amharic language very difficult [it] is NOT"
  • There are a number of 'official' and quasi-official transliteratons to English lettering, most use ' to indicate glottal or aspirated tones. Meaning T and T' are different, with the latter being more explosive.
  • Some details on the UNICODE representation of Ge'ez are here in PDF.
  • COOL: You can GOOGLE in Amharic or Tigrigna (the language of the Tigre [teg-gray], or Eritrea)
  • You can learn lots about Amharic or Tigrinya with software this company or use the Lonely Planet phrasebook. Don't even try to pronounce it without a native (or a pompous white guy). They also have a rocking sweet Fidel-"Matrix" Screen Saver.
  • Supposedly the news of Christ's birth didn't reach Ethiopia for seven years, so their calendar is different. Today is the 24th of T'er 1997. They have 12 months of 30 days and 1 small 13th month that everyone takes as vacation of 5 days.

Wow, that was a lot of info that just came pouring out. Well, I've got more in my head so if you ever want to hear about it, come find me.

- ሰካት (s'ka't ~ Scott)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

How to speed up FireFox - like it could get any faster

February 01, 2005 Comment on this post [3] Posted in Musings
Sponsored By

Great tips on how to Speed Up FireFox, via Larkware. Personally, I used these in my user.js edited with ChromEdit. It feels about 30-40% faster now.

user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("content.notify.backoffcount", 5);
user_pref("plugin.expose_full_path", true);
user_pref("ui.submenuDelay", 0);

user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("browser.cache.memory.capacity", 65536);

Now playing: Chaka Demus & Pliers - Murder She Wrote

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Now THERE'S a Training Session I'd like to take...

February 01, 2005 Comment on this post [2] Posted in ASP.NET
Sponsored By

This looks hot...a little something JasonW at DM is cooking up. Guerilla .NET 2.0 in London. Here's his outline:

  • The CLR, how it works, and what's new for v2.0
  • Garbage collector stuff inclduing the good, bad, and ugly of new stuff like HandleCollector and GC.AddMemoryPressure
  • C# type system stuff including Generics and Nullable
  • Fun with delegates including where Anon delegates actually make sense, including the Async Delegate Two-Step
  • Windows Forms.  Ian will give that talk, need I say more?
  • ADO.NET 2.0. Richard Blewett will be there and my guess is we'll have to chase him off the stage with a stick
  • The aforementioned new async coverage.  Two lectures worth of material.
  • Deployment, Deployment, Deployment. Fusion. ClickOnce. CAS.
  • Umanaged code Interop. The lab for this one is really cool - you'll have to see it to believe it.
  • "Old school" Networking. We'll actually talk less about remothing than we've done in the past, but more about sockets and MSMQ. 
  • HTTP - I wrote a brand new two-lecture look at "modern" HTTP programming starting with HttpListener and going all the way through ASP.NET and, of course, the much-hyped WebServices.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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