Wednesday, November 22, 2006

.NET & Office Interop

Everyone knows what a pain it is to configure it correctly. Numerous articles try to lay out the possible solutions, workarounds,

Here's what worked for me (it it ever gets there), on a Win XP Pro, Visual Studio 2003, ASP.NET 1.1 configuration:

  1. Install Office Interop DLLs
  2. Add the PIA DLLs to the VS Solution
  3. Add ASP.NET to the Administrators group?
    or
  4. Create a user with Admininstrator permissions (at least Debugger group or Power User)?
  5. Impersonate the user in Web.Config
  6. Give permissions to the directories to be read and written by the application (in my case read the template directory and write in the directory where the word document is created)
  7. Give permissions in the the registry to the user to the Software Office key (http://support.microsoft.com/kb/236592)
  8. Modify COM permissions, allowing the user to launch and activate components (http://support.microsoft.com/kb/288366/)
  9. Modify Microsoft Word Component in COM+ so the user impersonates it (http://forums.asp.net/1091578/ShowPost.aspx)
  10. Reinstall ASP.NET (aspnet_regiis -i, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=363330&SiteID=1)
  11. Reboot the machine
  12. Cross your fingers

Considerations:

Errors:

Running Visual Studio 2003 in Vista

Apparently, the best option to run Visual Studio 2003 inside Vista is by using Virtual PC. And the new version of Virtual PC (2007, still in Beta), is the best choice in terms of speed:

http://codebetter.com/blogs/peter.van.ooijen/archive/2006/11/10/Vista_2C00_-Visual-studio-2003_2C00_-Virtual-PC-2007-_2800_and-the-right-hardware_2900_-.aspx

Monday, November 20, 2006

Does Microsoft Certification Matter?

A while ago, I found the following discussion about certification in http://www.theserverside.net/news/thread.tss?thread_id=32963.

In my opinion, Certification does matter. Of course it doesn't replace real world experience in projects, and it doesn't assure the quality of the certified people. But it does validate some basic knowledge, and gives some new insights in some aspects that aren't often used in a day to day basis.

Another aspect is the recognition/valuation of the certification: as more people get certified and the certification spreads, the less value the certification has (even because some tricks used in the exams are widely known)

Microsoft acknowledges this situation, and launched a new generation of certifications (http://www.microsoft.com/learning/mcp/newgen/), topped by the MCA for the top Architects.

Update: A new article (http://www.infoworld.com/article/06/11/17/47OPanalysts_1.html), questions the value of certifications, as average pay for IT certifications dropped 2% between 1/Jul and 1/Oct.

Thursday, November 16, 2006

Enterprise Platforms

Thinking about Enterprise Platforms, I realized what a great platform SQL is. Despite all the hype around other servers, more aligned with the SOA and Web 2.0 trends, SQL Server has become a true Enterprise Platform.

It's a great data storage server, and has been constantly gaining ground on the so called big DB Servers (Oracle and IBM DB2), with features like Online Index Rebuild, Table Partitioning, Mirroring, and Snapshot Isolation. On the performance side, it swept the top TPC performance benchmarks.

But that's the beginning of the story. With SQL 2005, it gained:
  • Message Queuing with Service Broker;
  • bundled Reporting Services (not only the generation but also the delivery);
  • Notification Services (and a new mail API);
  • CLR integration (v2.0), and if the .NET Framework 3.0 is included, we even get Communications, Workflow and Presentation Foundation for free;
  • Analysis Services for BI;
  • A true Enterprise ETL tool/environment with Integration Services;

And it’s not just targeting the enterprise, with the Express edition available for free (http://msdn.microsoft.com/vstudio/express/sql/download/), everyone can have a top performing Database server (limited to 4 GB DB, 1 GB of RAM and 1 CPU) with Management Studio Express, Reporting Services and Full-Text Search.

Wednesday, November 15, 2006

ASP.NET Web Application Projects
(For internal use&search)

http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx (HomePage)
http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/WAP.asp (Introduction)
http://webproject.scottgu.com/ (Scott Guthrie)
http://webproject.scottgu.com/CSharp/Default.aspx (Tutorial C#)
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx
(Migration)
http://weblogs.asp.net/scottgu/archive/2006/05/08/445742.aspx
(Release)
http://forums.asp.net/thread/1279716.aspx
(FAQ and Known Issues)

SQL Unused Space problem with heaps
SQL overallocates space in heap tables, and doesn't reuses the space.
http://support.microsoft.com/default.aspx/kb/924947
Operação
(for internal use&search)

SQL Misc articles
(for internal use&search)

.NET
(for internal use&search)


Tuesday, November 14, 2006

Generic SQL Articles
(For internal use&search)

URL
Notes

SQL Performance articles
(For internal use&search)

TechEd 2006 and 2005 Comparison

In retrospect, and evaluating TechEd 2006 Barcelona, I must say that it was a great event with great speakers, with the high level of quality expected from Microsoft.
But, comparing to Amesterdam 2005, there are some details that were worse:
  • The corridors and stairs were very narrow (at least for the amount of people present);
  • The CommNet had very few computers available;
  • No VOIP phones (that was a major loss!);
  • Some sessions filled up very easily while others were less than half (the full sessions should all have a repetition);
  • The week pass from Amesterdam was downgraded to a 10 trips ticket (to visit the city, or even, have dinner, one would have to count the tickets very closely);
  • There was no major announcement or new (much of the content was based on the TechEd USA);

Monday, November 13, 2006

TechEd 2006 End

TechEd 2006 is officially over (from last friday, that is), and I'm back to work. Just a recap of the final days:

  • Day Four, the final day, was a bit weak. It's understandable that, with the speakers tight schedules, most are already on their way home. So I was looking forward to Ingo Rammer's presentation about Optimizing Performance and Scalability as the high point of the day. But, the presentation was very much like last's year, so I switched to SharePoint Server 2007 Search. The latter suffered from the toy example syndrome. It was easy to follow, but very limited, and looked like the most part was getting around some limitations of the API or model.

    Next, I attended MSF v4.0 Core by Rafal Lucawiecki. Very good and informative. With the upgrade to MSF 4, and the additions of MSF for agile and CMMI in VSTS, MSF has become more than a Framework. The Core, is the Discipline, from which the families derive (Application Development, Infrastructure Deployment and possibly Consulting and Operations Management - MOF in the future). In it, there's only high level models, with the Team Model revolving around Advocacyand Architecture becoming a phase in the development life cycle.
    The Process Model, introduces Governance and Enactement, catering for various types of projects event small teams, and allowing the start of each phase before the end of the previous one. At Core Discipline, the Project Management Discipline recommended is the PMI BOK. At methodology level, there's support for Agile SD and CMMI PI activities and work streams.
    To Rafal, the best invention in Software Engineering in the last 20 years, was the "Daily Build", because with it, there is no integration (rephrasing, it's done on a daily basis, so it's easier, cheaper, more predictable, and garantees a working product very early on).

    Then there was a session about SQL 2005 Cache Sync/Query notification in Depth by Bob Beauchmin. To sum it up in one sentence:
    "The feature is only useful in very specific scenarios, the drop-down combo box with few items rarely updated."
    Outside that, the feature doesn't scale, or can't be used. The bulk of the session was spent analyzing the limitations imposed on queries, the inner workings of the feature and its integration with ASP.NET Cache. Not very useful.

    The final session of TechEd, and because there were two portuguese fellows in the draw, was Iron Architect Finals. This was a contest to define the architecture to build up communities around TechEd, linking to the feedback system. Out of the 5 chosen proposals, 2 were from portuguese people. :)
    The jury was composed by Andrew Cheeseman, Ron Jacobs, Beat Schwegler,
    Jürgen Pfeifer (MCA), and clearly favoured "Jota"s ideas. From a presentation point of view, the prize would go to the belgian as he was all around at ease. From a pleasing the jury point of view the prize would go the finn/dannish "alpha geek" guy that presented last and tried to score points by pleasing the jury. But judging only the ideas (tag clouds to categorize sessions and attendees), forgetting the nervous presentation, "Jota" was better. And so, congratulations to "Jota", and I expect that he may become the first portuguese MCA.

  • Day three, was very varied. To start off, I watched an indepth look at Linq for SQL (that's the current name of DLinq), and it was astonishing. Very easy and very powerful, and overall very well thought out solution. Even the corner cases of ORM tools were covered: identity mapping, lazy loading, optimistic concurrency, paging, batch commands, you name it.

    Then another cool session about Iron Python, and it's fit within .NET. The demos were very impressive (animating Merlin, converting from Ink to text, synthetizing speech, using WPF, with every demo below 5 lines), and there is now support for Iron Python in ASP.NET (not MS PSS support, but community support) and the tools are being extended to support Python (Intelli sense wasn't prime time yet) and other scripting languages.

    After that, I attended a real world usage example of WPF in the Zurich Airport Monitoring system. Very impressive the animation capabilities of WPF. In less than 15 minutes there was a button animated to follow a path (later replaced by an airplane) in the map that represents the airport. From there on, it was just a matter of refinement and linking the actions on event handlers with code from the Expression Designer, to get a fully animated monitoring system (with tracks sensing the number of planes and glowing in red), with zoom, panning, tags on airplanes.

    The presentation of Team System adoption best practices focused on advanced customizations and extensibility possibilities, and that didn't please some of the crowd in the room that were expecting the basics (how to organize SS, work items, ...). But the customizations were very useful (capture the screen and pre-fill a bug with that attachment, to save testers some keystrokes; changing the type of the description field to HTML; searching all pending check-ins from all users; and because of the annoyance from some people in the audience, information about licensing conditions, the reports generated, the off-line scenario).

    Last, Friz Onion compaired the differences between the Web site model and Web Application Project, the strengths and weaknesses of each, with a clear win for Web Application Projects. Very detailed knowledge of the inner workings of ASP.NET, the compilation mechanism and the class model relationships.

Thursday, November 09, 2006

TechEd 2006 Start

The first two days of TechEd 2006 Barcelona are over.

  • In Day two, I focused more on .NET, and enjoyed very much the presentation on C# 3.0 (or is it 3.5?) and the innovations brought by Linq, Lambda expressions, Extension methods. To me, Linq raises the abstraction level of the language, giving first class support for queries in .NET. With it, it's possible to very easily query a DB (in a strongly typed fashion), join with a XML source or any other that implements the interfaces (Vista search is expected in the future).

    Also very good were the sessions about debugging outside VS 2005 and the tools available(Ingo Rammer is a very good presenter and his demos are really on topic, not some toy example, that doesn't hold a connection with reality).

    Not so good were the presentations about Using VS Team System - nothing new, just a rehash of last year's examples, and very "toyish" and about Windows Vista - Catherine Heller, knows the subject, but the notion that to get the Vista native feel in the Open File Dialog one has to tinker with COM+ and it's inner stuff, makes me want to run away from it. Another annoyance comes with the security increase of Vista. From now on, applications can't programmatically determine if a user is an administrator (the security token is stripped from that info). And to run with ellevated privilleges, guess what, it's necessary to invoke a process and the user has to confirm it. I can see, what's coming, every user pressing the yes button every time that annoyance pops up. Even debugging with VS2005, has to be run with ellevated privileges.

    When does MS gets the balance between security and usability right? Why doesn't Vista Home ship with a VM to surf the Net and read mail? And to try out the installation of applications, what best than installing in a VM, and after evaluating or testing, throw it away (if it's a virus or trojan), or installing in the main OS?

  • From the first day, the highlights for me were the sessions by Kimberly Tripp. She really knows what she talks about, and makes it sound easy, explaining stuff in non technical ways. On the downside was the session on VSTO SE (Second edition). Basically it was explained that the missing stuff in VSTO 2005 have made it in the 2nd edition, and some stuff that has to be done to get around Word and Office quirks (mainly about closing windows events).

    The keynote, was divided in two parts. The first part, was about education, and was in a partenalist tone, ending up with a presentation of 10 year old girl from India that has been certified in C#. The second part was more in the spirit of TechEd, and had some cool demos with SharePoint, Excel, Workflow, Expression Designer and Visual Studio.

Monday, November 06, 2006

HR and Interviewing

The IT job market is on the rise again. It’s been ramping up for some time, but the clear sign, is the “movement” on the companies, people leaving and new people getting in, and the blogoshpere with articles about interviews.
Employers can no longer be laxist about the employees, or they will leave. And everyone wants to find the best people.

To Joel Spolsky, from the famous Joel on Software, hiring is about getting the best people. Period. As the gap between excellent and average programmers is 10x, it pays up to find the best. The best people, are not only very smart but people that gets things done (pragmatic). And that’s what his company tries to do. They interview by phone, and the smartest are flown to New York, with everything paid, for a personal interview.
(http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html)

To Mini (from Mini-Microsoft fame), the solution to overcome the peak in the competition for talents between employers, that leads to hiring of not so good programmers, would be to create a Microsoft Academy, to teach the main technologies used inside MS. That way, people with potential and motivated would graduate and be ready to integrate the team that best fits them, while other people would wash-out (the course would be very hard and intense).
Even to switch groups inside Microsoft, people could get the training and skills from the courses teached, giving microsofties a real chance to control their careers, and Microsoft a chance to internally reorganize, getting people in their correct positions and motivated.
(http://minimsft.blogspot.com/2006/11/microsoft-academy.html)

On the employers side, HR is getting even harder.
As the demand goes up, so goes the salary. And with big payments, everyone tries their hardest to make the cut. Embelishing the resumé, or even outright lying! To counter that, employers are paying detectives to investigate references, neighbours and past employers to check CVs, references and even neighbours.
(http://www.simple-talk.com/opinion/opinion-pieces/the-cv-detectives/)

To end up, here are some links related to interviewing for DBA, questions:
http://www.sqlservercentral.com/columnists/sjones/2686.asp (interview questions)
http://www.geekinterview.com/articles/sql-interview-questions-with-answers.html
TechEd 2006 Barcelona Session Schedule

It's the final countdowns to TechEd 2006 in Barcelona. Right now, I'm packing up, because tomorrow I'm flying to Barcelona. The conferences only start on Tuesday, but from my company we're going the day before.

My tentative schedule, is somewhat like this (arranged by timeslot, and inside timeslot sorted by preference):

Tue Nov 7 11:30 - 12:45
DEV230 Developing Rich Web Applications with ASP.NET AJAX
DEV201 Introduction to the .NET Framework 3.0

Tue Nov 7 14:15 - 15:30
SQL408 SQL Server 2005: Advanced Indexing Strategies
ARC207 Introduction to Agile Methodologies and Concepts
DEV225 Windows Presentation Foundation (WPF): Introduction

Tue Nov 7 16:00 - 17:15
SQL409 SQL Server 2005: Advanced Indexing Strategies : Part 2
DEV347 ASP.NET AJAX Tips and Tricks
DEV223 Visual Studio: The .NET Language Integrated Query (LINQ) Framework Overview
ARC305 Connected Systems - Part 2: Communication, Flow, Rules and Logic

Tue Nov 7 17:45 - 19:00
OFF303 Visual Studio Tools for Office (VSTO) - Cypress and ORCAS
ARCWD03 Understanding Service Modeling Language (SML): The SML and Platform
DEV221 A Lap Around the New Enhancements for Web Developers in Visual Studio Orcas
DEV203 ADO.NET - Present and Future

Wed Nov 8 09:00 - 10:15
DEVWD15 Hardcore .NET Production Debugging
DEV349 ASP.NET: Developing Data-Driven Web Applications with .NET Language Integrated Query (DLINQ)
DEV323 C# 3.0: Future Directions in Language Innovation from Anders Hejlsberg
SQL402 Implementing the Service-Oriented Database Architecture (SODA) with SQL Server

Wed Nov 8 10:45 - 12:00
DEVWD03 Alternative .NET Debugging Facilities
SQL312 T-SQL Querying : Tips and Techniques
DEV217 Introducing Visual Studio (VS) 2005 Team Edition for Database Professionals
ARC304 Connected Systems - Part 3: Data and Transaction Management

Wed Nov 8 13:30 - 14:45
DEVWD12 Explore C# 3.0 with Anders Hejlsberg
DEV305 Garbage Collection - How to Make it Work for You
ARC301 Connected Systems - Part 4: Presentation and Interactivity
DEV002 DEMO: 10 Undiscovered features of ASP.NET 2.0

Wed Nov 8 15:15 - 16:30
DEV219 Using the Essential Unified Process with Visual Studio Team System (VSTS)
DEV315 Scalability, Reliability and Maintainability of Internet Information Services (IIS)-hosted Workflows
ARCWD02 Enterprise Library for .NET Framework 3.0
DEVWD28 Exploring New Functionality in Internet Explorer (IE) 7

Wed Nov 8 17:00 - 18:15
DEV317 Integrating the Visual Studio (VS) Team Edition for Database Professional into your Software Development Lifecycle
DEV325 Windows Vista: Tips & Tricks for Targeting Key Native Application Program Interfaces (APIs) from Managed Code
ARC201 Patterns and Anti-Patterns for Service-Oriented Architectures (SOA)
DEVWD18 Why is Essential Unified Process (EssUp) a Next Generation Process?
Cheeseman?

Thu Nov 9 09:00 - 10:15
DEV306 Using the .NET Language Integrated Query Framework with Relational Data
DEV345 Asynchronous ASP.NET Programming
DEV321 Delving into Visual Studio 2005 Team Edition for Software Developers
ARC307 Adding Value to Message-based SOAs with Workflow
Vista?

Thu Nov 9 10:45 - 12:00
DEV206 Common Language Runtime (CLR): IronPython and .NET Scripting Languages
DEV229 ASP.NET: End-to-End - Building a Complete Web Application using ASP.NET 2.0, Visual Studio 2005, and Internet Information Services (IIS) 7 (Part 1)
SQL403 Understanding Interactions of Transactions, Batches, Nested Procedures, MARS (Multiple Active Result Sets), and SQLCLR (Common Language Runtime) in SQL Server 2005
DEV308 Proven Practices for Implementing Services
ARC302 Connected Systems - Part 5: Identity and Access Management

Thu Nov 9 13:30 - 14:45
DEV227 Windows Presentation Foundation (WPF) in the Real World: Zürich Airport Monitoring System
DEVWD27 "Scripting ASP.NET AJAX": Deep Dive into ASP.NET AJAX, Scripting & Debugging
ARC205 Connected Systems - Part 6: The Future of the Microsoft Application Server Platform
SQL406 Developing SQL Server 2005 Analysis Services Powered Applications

Thu Nov 9 15:45 - 17:00
DEV243 Implementing Continuous Integration: With and Without Team System
DEVWD17 Team System Adoption Best Practices
DEV359 .NET Hidden Treasures
SQLWD04 The Query Governor: SQL CLR in Action

Thu Nov 9 17:30 - 18:45
DEV322 Unit Testing Best Practices With Visual Studio 2005 Team System
DEVWD24 Converting Existing ASP.NET Applications to Visual Studio 2005 Web Application Projects
SQL301 Coding SQL Server 2005: Plan Guides and Plan Forcing
ARC309 Security is a Feature - Best Practices for Designing Secure Distributed .NET Applications

Fri Nov 10 09:00 - 10:15
DEV403 Optimizing Performance and Scalability of Distributed .NET Applications
DEV360 Windows Powershell - Building Next Generation Command Line And GUI Applications On Windows
DEV338 Windows Vista for Managed Developers: Beyond NetFx3
DEVWD14 Test Driven Development: Myths and Misconceptions
DEV346 Attack and Defense: Securing ASP.NET 2.0 Applications

Fri Nov 10 10:45 - 12:00
ARC209 Microsoft Solutions Framework 4.0 Core and its Family
DEV405 BizTalk Server 2006 - Internals
SQLWD06 Best Practices for architecting Reporting Services Report Models for Ad-hoc Reporting
DEV218 Developing and Designing Standard Based Web Applications with Expression Web Designer

Fri Nov 10 13:30 - 14:45
SQL404 SQL Server 2005 Cache Sync/Query Notifications in Depth
DEV411 AJAX Patterns with the Microsoft AJAX Library
DEV004 DEMO: Technology in Action! Building a Distributed Solution with .NET Framework 3.0
SQLWD01 SQL Server Integration Services (SSIS) – The Top 10 Tips
ARC206 Abstract Concepts: Architecting Applications for a Service-Oriented World

Fri Nov 10 15:15 - 16:30
DEV319 Visual Studio 2005 – Advanced Data Access Techniques
DEV358 New Cryptography: Algorithms, APIs and Architecture
DEV366 Boost Your Data-Driven Application Development Using SQL Server Centric .NET Code Generator [OlyMars Refresh]
DEVWD25 IIS 6.0 Programming Interfaces and Architectural Drill Down


Planning to learn some interesting stuff, either new or very specialized. From my schedule, it's obvious that my main interests are Architecture, SQL, Development.