Saturday, October 25, 2008

This is another test. This time to see if I can remove the verizon spamsig

Update #1: 11/25/2008
Cool, it worked! The magic to keep off the spam-signature like on my first phone picture post? End the message with #end.

For example, below is the actual, complete text that I entered;

This is another test. This time to see if I can remove the verizon spamsig #end

 

Thanks to  BeyondRed - Remove Verizon Signature for this tip.

BTW, this is my son, hard at work today… Got to love his PJ’s… lol

1025081005-796466

Test post from my new phone. Need to make sure I can post text and pic while at PDC. ;)
The pic is of my home office (you can see my supervisor there looking out the window)

This message was sent using the Picture and Video Messaging service from Verizon Wireless!

To learn how you can snap pictures and capture videos with your wireless phone visit www.verizonwireless.com/picture.

To play video messages sent to email, QuickTime� 6.5 or higher is required. Visit www.apple.com/quicktime/download to download the free player or upgrade your existing QuickTime� Player. Note: During the download process when asked to choose an installation type (Minimum, Recommended or Custom), select Minimum for faster download.

Friday, October 24, 2008

Free WinForm and ASP.Net Chart Controls from Microsoft released (Think “Dundas Charts” but from Microsoft… and free…)

Boon Blog - Microsoft Chart Controls for .NET Framework 3.5 Released!

“This is just a quick post to help spread the word that the Microsoft Chart Controls for .NET Framework 3.5 are now publicly available.  A big congrats to the team!

Here are some useful links

Downloads

1. Microsoft Chart Controls for Microsoft .NET Framework 3.5 – This installs the ASP.NET and Windows Forms Controls.  The assemblies will be installed in the GAC as well as in the “%Program File%\Microsoft Chart Controls\Assemblies” folder.  If you build an application using the controls, your setup and deployment should add MSChart.exe installer as a pre-requisite. 

2. Microsoft Chart Controls for Microsoft .NET Framework 3.5 Language Pack – This installs the language pack for the Chart Controls.  It is available in 23 .NET Framework languages.

3. Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008 – This installs the IntelliSense file in English for the controls and also adds the controls to the toolbox for ASP.NET and Windows Forms.

Where do we find more information?

…”

MSDN Code Gallery - Samples Environment for Microsoft Chart Controls

“The samples environment for Microsoft Chart Controls for .NET Framework contains over 200 samples for both ASP.NET and Windows Forms. The samples cover every major feature in Chart Controls for .NET Framework. They enable you to see the Chart controls in action as well as use the code as templates for your own web and windows applications.

The samples environments each contains a Getting Started section to help you start using the Chart controls quickly. The samples demonstrates how to use the following features in Microsoft Chart Controls for .NET Framework:

  • All supported chart types.
  • Data series, chart areas, axes, legends, labels, titles, and more.
  • Data Binding
  • Data manipulation, such as copying, splitting, merging, alignment, grouping, sorting, searching, filtering, and more.
  • Statistical formulas and financial formulas.
  • Advanced chart appearance, such as 3D, anti-aliasing, lighting, perspective, and more.
  • Chart rendering.
  • Events and Customizations.
  • Interactivity and AJAX.

…”

image

image

Yes, despite the logo (cough… Dundas… cough) this seems to now be a free Microsoft product. As far as I can tell, this very complete graphic package is free, as in free. And we’re talking Ton’s O’ Charts!

 

Note that before running the WinForm sample enviroment, download and install the controls (MSChart.exe) (otherwise “WinFormsChartSamples.exe” will not be happy and will error when you click on an actual chart)

.Net Keystroke Handling Exposed - “Exploring Secrets of .NET Keystroke Handling”

DevX - Exploring Secrets of .NET Keystroke Handling

“Few areas in .NET are seemingly as simple yet deceptively challenging as processing keyboard inputs. This situation is exacerbated because neither the MSDN documentation nor any of the excellent .NET support websites provide comprehensive, practical details about handling keystrokes. Enter Keystroke Sandbox, a small application developed just for this article. Keystroke Sandbox shows you graphically what happens when you press a single key or a combination of keys. Furthermore, it lets you customize its environment at runtime to emulate a variety of the most common Windows Forms application patterns, including both enabling/disabling controls to receive or ignore input as well as simulating consuming keystrokes at different stages and using different controls.

This article covers the different types of keyboard interaction that an application may have. You'll see how you can simplify debugging by observing which methods get invoked on which controls when you press a key. The article concludes with a practical guide for implementing a variety of common key-handling scenarios.

…”

I thought this was a pretty interesting article and while not code heavy, I thought its 14 printed pages had a very nice conceptual depth.

This is one of those articles I KNOW I’m going to be needing over time…

New .Net Logo Day – Catch the wave…

Chris Koenig - New .NET Logos announced today!

“.NET is getting a logo facelift!

NET_h_rgb_2

NET_v_rgb_2

Why change?  The original .NET logo was designed just before Forum 2000. It was designed to be attached to other Microsoft brands as a suffix. The result was a logo that did not stand well on its own and lacked impact.

We needed a logo that was in sync with the key values that we want .NET to stand for: consistency, robustness and great user experiences. We also wanted a logo that conformed to the design principles that are driving Microsoft’s brand identity evolution and is reflected in newer brands such as Silverlight, Surface and more.  Finally, we needed a logo that is more strongly aligned with the portfolio of brands that .NET is most strongly aligned with: Silverlight, Visual Studio and our server products.

Kind of interesting, and pretty exciting!  Expect to see the new logo used a LOT at PDC, and in our future web sites, mails and presentations.”

A logo I’ll be seeing a bunch of next week… :)

Did you know Windows (since Windows Server 2000) comes with a transactional database engine already baked into the OS, which you can use in your applications today, no download required?

Microsoft Windows SDK Blog - ESENT (Extensible Storage Engine) API in the Windows SDK

“I’m not sure how many people know that Windows comes with an embeddable, transactional database engine which is available to developers through the Windows SDK. The ESENT database engine can be used whenever an application wants high-performance, low-overhead storage of structured or semi-structured data. This can range from something as simple as a hash table which is too large to store in memory to a complex application with many tables, columns and indexes. ESENT is used by the Active Directory, Windows Desktop Search, Windows Mail and several other Windows services and a slightly modified version of the code is used by Microsoft Exchange to store all its mailbox data. The ESENT API is available through the SDK and can be used on all versions of Windows from Windows Server 2000 on up.

The significant technical features of ESENT include:

  • ACID transactions with savepoints, lazy commits and robust crash recovery.
  • Snapshot isolation.
  • Record-level locking — multi-versioning provides non-blocking reads.
  • Highly concurrent database access.
  • Flexible meta-data (tens of thousands of columns, tables and indexes are possible).
  • Indexing support for integer, floating point, ASCII, Unicode and binary columns.
  • Sophisticated index types including conditional, tuple and multi-valued.
  • Individual columns can be up to 2GB in size. A database can be up to 16TB in size.
  • Can be configured for high performance or low resource usage.
  • No administration required (even the database cache size can adjust itself automatically).
  • No download. Your application uses the esent.dll which comes with the operating system.

Caveats: ESENT should only be used for applications which have simple, predefined queries; applications that want to do ad-hoc queries should investigate a storage solution that provides a query layer. The database file cannot be shared between multiple processes simultaneously.

…”

Nice. Learn something new every day… 

I’ve done a 10 second search for P/Invoke signatures or a .Net wrapper and found this, “Extensible Storage Engine” (VB.Net) and this, “ESENT Managed Interface” both of which seem to be cool resources for .Net coders wanting to use ESENT.

(via Visual Studio Hacks - Visual Studio Links #81)

Mocking is good thing… when unit testing at least – Intro to Mocking

CodeProject - Introduction to Mocking

“Mocking is an integral part of unit testing. Although you can run your unit tests without use of mocking but it will drastically slow down the executing time of unit tests and also will be dependent on external resources. In this article we will explain mocking and different benefits that we can achieve by introducing mocking in our unit tests.

In this article we introduced the concepts behind Mocking. Mocking helps to improve unit tests by removing the outside dependencies which results in better, faster, independent unit tests.

We hope you liked the article, happy programming!

NOTE: We have also created a screencast on this subject which you can view using the following link: Screencast: Introduction to Mocking

Mocking is something I understand, but not having done it, my level understanding is questionable. On my current project we’re now doing major “automated/integration” testing (with hundreds of individual tests and thousands of data driven tests) but little to no “real unit” testing. Now I’m extremely happy with our testing as it is helping us deliver a MUCH better product and provides an outstanding safety net for code changes but I want to grow toward also doing actual unit testing too.

Hence my interest in mocking…

Thursday, October 23, 2008

EC2 for Windows/SQL Server now in open beta – Windows in the Cloud, today…

Amazon Web Services Blog - Big Day for Amazon EC2: Production, SLA, Windows, and 4 New Capabilities

“…

Here's what's happening today:

  • Amazon EC2 is now in full production. The beta label is gone.
  • There's now an SLA (Service Level Agreement) for EC2.
  • Microsoft Windows is now available in beta form on EC2.
  • Microsoft SQL Server is now available in beta form on EC2.
  • We plan to release an interactive AWS management console.
  • We plan to release new load balancing, automatic scaling, and cloud monitoring services.

Windows Support - Beta level support for Microsoft Windows is now available on EC2, in the form of 32 and 64 bit AMIs, with pricing starting at $0.125 per hour. Microsoft SQL Server is also available in 64 bit form. All of the powerful EC2 features listed above can be used with the new Windows instances and we'll be adding support for DevPay in the near future.

Once launched, the Windows instances can be accessed using the Windows Remote Desktop or the rdesktop client. I've spent some time using Windows on EC2 and it works really well. I used the EC2 command line tools to launch a 32 bit instance, opened up an additional port in the security group, and then logged in to it using Remote Desktop.

…”

Amazon EC2 - Amazon Elastic Compute Cloud (EC2) Running Microsoft Windows Server and SQL Server

“Amazon EC2 running Microsoft Windows Server® 2003 is a fast and dependable environment for deploying applications using the Microsoft Web Platform, including ASP.NET, ASP.NET AJAX, Silverlight™, and Internet Information Server (IIS). Amazon EC2 enables you to run any compatible Windows-based solution on AWS’ high-performance, reliable, cost-effective, cloud computing platform. Common Windows use cases include website and web-service hosting, high-performance computing (HPC) and data processing, media transcoding, distributed testing, ASP.NET application hosting, and any other application requiring Windows software. Amazon EC2 also now supports the SQL Server® Express and SQL Server Standard databases, and makes those offerings available to customers on an hourly basis.

…”

I want to spin up some machines just because I can… ;)

 

Related Past Post XRef:
Amazon EC2 to support Windows and SQL Server (later this fall)…

The most awesome .Net book cover, ever? - Programming F# by Chris Smith

Chris Smith's completely unique view - Due out Next Year – Programming F# by Chris Smith

“I’d like to announce that for the past few months I’ve been secretly working on a book for O’Reilly titled Programming F#. My aim is to provide the one-stop-shop for learning the breadth of the F# language.

Squig_Oreilly_2

…”

Awesome… I’m buying this book just because of this cover (well and I DO want to learn F#… but that’s besides the point ;)

The “Greg’s Cool Thing of the Day” PDC Badge #2

Craig Shoemaker, of Polymorphic Podcast and GetPixel8ed fame, took pity on me and my… um… cough… skillz… at graphic design and came to my rescue with a new “Greg’s Cool Thing of the Day” badge.

GregDuncanBadge

As this made me snort-laugh (I hate when I do that.. ;) I had to have it as one of my badges. So now I’ll have two badges (since I already printed out the other one… :|  ) for you to choose from.

 

Related Past Post XRef:
The “Greg’s Cool Thing of the Day” PDC Badge
“The Devil’s Field Guide to the PDC” – Eight tips toward a better PDC experience

The “Greg’s Cool Thing of the Day” PDC Badge

image

image

As I’ve said for years and as you can tell from above, I’m pretty “graphically challenged” but can I get points for trying at least?

I’ll have a few of these to hand out if you’re interested and you can find me. ;)

Why would you want one? Oh hell, I don’t know, just because? Why did I spend the many many seconds during lunch to craft this excellent PDC badge? Because I could, of course… LOL!

 

For more information on PDC badges, the template to create your own, etc, please see PDC Badges, I've got one already

 

Related Past Post XRef:
“The Devil’s Field Guide to the PDC” – Eight tips toward a better PDC experience

“The Devil’s Field Guide to the PDC” – Eight tips toward a better PDC experience

The Spider King - The Devil’s Field Guide to the PDC

“If you are reading this, you know Microsoft’s Professional Developers Conference is on and is coming up in mere days. I am fortunate enough to be a part of the PDC Core Team; we are responsible for your experience at the event.

I am sure that you have been checking the site, the sessions, the feed and keeping your eye on the blogosphere for scoops and hints of what is to come. There is only one problem; they are not giving you everything you need so I want to provide insider advice on how you can make the most of your trip.

Standing in line is for suckers. I am amazed at how our species constantly finds itself mirroring farm animals like cattle, lined up in single file. Don’t stand in line for anything (except at bars, that is just a fact of life) at the PDC. …

Don’t wear your kilt at the event. Don’t be that guy. Wear it out to the after-parties. If you wear it at the event, you are just that guy.

…”

That last tip had me laughing out loud. This will be my fourth PDC (2001 “The HailStorm, .Net PDC”, 2003 “The Longhorn PDC”, 2005 “The WCF/WF/WPF/VS2005 PDC” and now the “Win7, VSTS2010, .Net 4 PDC” ) and I have to say he’s spot on with the tips. Don’t be that guy!  LOL

Remember, pace yourself. It’s five days (Day 0 through 4, if you’re going to the Pre-con), don’t let you brain fill up on day one. Also realize that by day 4 you will have forgotten that tidbit you wanted to remember on day 1. Make notes. Send yourself emails, don’t even try to remember everything. Store pointers in your head, not the actual content…

And like he says, lines are for suckers. Just say no. Go early or go late… There’s so much to do and see that there’s no excuse to waste time standing in lines.

Also remember, most of the content/sessions will be available for offline/later viewing. So don’t stress if you can’t attend a session. You VERY likely be able to catch it when the video become available.

Above all, don’t stress out if “something” happens. Man, this is LA and it seems there’s ALWAYS something going on. 2001 was just weeks after 9/11. 2003 was the fires. 2005 we had a city wide blackout… 2008? It looks like it might be fires again. Just suck it up and drive on! There’s too much geekness to absorb to let all the external stuff get in the way… ;)

I’ll likely be posting before, during and after, but if I don’t say it later, if you see me (my picture is on the blog main page), say hi (you may even get a “Greg’s Cool Thing of the Day” PDC Badge!  ;)

 

(via Girish Raja's Dynamic(s) Thoughts - Meet me at PDC 2008)

Tuesday, October 21, 2008

Signature/Data Type Conversion P/Invoke Cheat Sheet – aka What do you convert a wChar_t to .Net?

Just code - Tamir Khason - P/Invoke cheat sheet

“I’m working a lot with p/invoke, and know how it’s hard to produce correct signature for unmanaged method. So, today I decided to publish basic cheat sheet for methods, parameters and attributes you should use in order to invoke unmanaged methods from managed code without a lot of problems. We start with data type translations. Here the table to understand it.

Data type from unmanaged signature Data type in managed signature
int int

the same with all other simple types such as double, uint, etc or private objects
void* IntPtr
int* ref int
 

Unmanaged type Managed equivalent
bool bool
char sbyte (signed), byte (unsigned)
wchar_t char
double double
float single
int, long (signed) Int32
int, long (unsigned) UInt32
__int64 (signed) Int64
__int64 UInt64
short (signed) Int16
short (unsigned) UInt16
void void

But not only types are problem in managed/unmanaged transitions. Also structures are aligned differently. For this purpose we can use StructLayout attribute. Even if unmanaged classes are sequential and you used correct managed data types, you can find you with problems in Pack. What “pack” is? Pack is actually slot size in bytes for members of your structure. It can be 0, 1, 2, 4, 8, 16, 32, 64, or 128 and depends on the platform and application setting.

Now you can see, that it is not very complicated to create managed signatures when you have header of unmanaged assemblies. So go ahead and ask, if I missed something.

…” [Post Leach Level: 90%]

I was looking for something like this a while ago… Something to help me translate a third parties DLL/header file into P/Invoke signatures. Just a “data type conversion for work programmers (but not dummy)” and something like this would have really helped then.