dotNoted

Icon

Observations of .Net development in the wild

Tip: Instead of using ‘*’, Drag the “Columns” Folder to the Query Editor Surface to List All Columns in SQL Management Studio

Just click and drag it, and a list of columns appears like this:

backup_set_id, first_family_number, first_media_number, filegroup_name, page_size, file_number, backed_up_page_count, file_type, source_file_block_size, file_size, logical_name, physical_drive, physical_name, state, state_desc, create_lsn, drop_lsn, file_guid, read_only_lsn, read_write_lsn, differential_base_lsn, differential_base_guid, backup_size, filegroup_guid, is_readonly, is_present

Filed under: Tools

Please vote for increasing the maximum path length (MAX_PATH) on Connect

Have paths larger than 260 characters? Most of us do these days. It’s scandalous that .Net 2.0 only supports 260 characters. Vote it up here: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=240812

They really do listen to these. Vote a 5 for important!

Filed under: .Net Basics

NYTimes: “Child’s Play donates video games to children suffering from severe illnesses with the help of gamers.”

I _knew_ video games promoted social deviance!

And <gasp> it’s the evil penny-arcaders behind it!

http://www.nytimes.com/2006/12/27/us/27charity.html?_r=1&th&emc=th&oref=slogin (registration needed)

Filed under: Uncategorized

Just enough ASM to get by… (now for you Mac programmers, too!)

In college, I worked through an Assembly programming course. I liked it a lot, I remember, but I got bored realizing the tedium. Plus, it was on 16-bit real mode, and 32-bit was just getting firmly established in the OS (WinNT, Win95*, FreeBSD, Linux) (…after 10 years since the intro of the Intel 386! I still remember going to the library in 5th grade and the sense of awe that came over me as I saw the cover of ‘Byte’ magazine declaring the 25MHz of the newest rev of that awesome chip). Of course, I wanted to use the protected mode instructions, but the department chair frowned on such excursions. God forbid learning take place. College is an institution of administration, after all, and it’s hard to administer the spark of interest, curiosity and independent investigation.

I’ve forgotton much of it. Too bad, now that I need it to trace code execution across native libraries which don’t have symbols (ugh). I just found this helpful guide, though. Still very relavant.

Under the Hood: Matt’s Just Enough Assembly Language to Get By.

* Sure, Windows 3.0 ran in 386 protected mode, but didn’t use pre-emptive multitasking nor a paged, flat 32-bit address model, so was it really making use of Protected mode? Not like we know it today…

Filed under: Code Kaizen

Live search – on the pulse

Apparently, I’m not the only one thinking Live search is getting better. Of course, I wouldn’t admit to influencing Scoble’s opinion, but a careful examination of posting dates might lead you to a certain conclusion… (no doubt the wrong one – yet I’d still relish it).

Filed under: Code Kaizen

There will be a PDC07 – PDC in 2007!

http://msdn.microsoft.com/events/pdc/

Gist: "More Information on PDC 2007 coming soon!"

Filed under: Software Engineering

Thanks for the help!

Trying to find out why an exception is being raised in kernel32.dll… I have to pore through some disassembly code (hint: ignore most of it). The Visual Studio’s Registers window (command: Debug.Registers) is helpful here, to see where we are going to jump to. I was curious about the Effective Address which pops up in the window and needed to refresh my memory on how x86 Assembly represents that… On MSDN:

Effective Address

This group of registers is used for instructions that use the Effective Address mode. If you don’t know what that means, don’t worry about it, or pick up a book on assembly language programming.

Bravo. Very helpful. A book, indeed. Or maybe I shall just not worry while my program throws critical exceptions…

Filed under: Uncategorized

Pseudo-class definitions with C++/CLI macros

.Net generics are great. Of course. Typing them is a pain. Even in C# where the Intellisense is very good, it is tedious to make the type names so long, especially when doing a lot of data type composition, like this (or worse):

Dictionary<int, Dictionary<String, KeyValuePair<MethodInfo, MyCustomMethodAttribute>>>

Grok that. Easy? Now feast your eyes on this:

Dictionary<int, Dictionary<String^, KeyValuePair<MethodInfo^, MyCustomMethodAttribute^>>^>^

In C++/CLI, you need the hats (managed pointers) to refer to reference handles (as opposed to value types like KeyValuePair, which don’t use the hat). It’s easy to get confused (does the hat disappear between the 2nd or 3rd to last right angle bracket?) when coding fast and furious.

In C#, you can subclass a generic type like this:

public class MethodTable : Dictionary<int, Dictionary<String, KeyValuePair<MethodInfo, MyCustomMethodAttribute>>> {}

So, now you can use this class in place of the unwieldy generic type. In C++, you can also do this:

#define MethodTable Dictionary<int, Dictionary<String^, KeyValuePair<MethodInfo^, MyCustomMethodAttribute^>>^>^

This doesn’t define a new type, just gives you some compile time syntax sugar. I prefer the latter, since C++/CLI already creates so many types for IJW, I don’t like to add more.

I can see how C++ macros are easily abused to create whole sub-languages in a program. I’m already going down that path.

Filed under: Uncategorized