More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  How Things (Should) WorkPhotosProfileFriendsMore Tools Explore the Spaces community

How Things (Should) Work

The truth is in the code. 10K served.
Windows® Internals: Including Windows Server 2008 and Windows Vista, Fifth Edition (PRO-Developer)
Advanced Windows Debugging (The Addison-Wesley Microsoft Technology Series)
Microsoft Windows Internals (4th Edition): Microsoft Windows Server 2003, Windows XP, and Windows 2000
Windows via C/C++ (Pro - Developer)
Programming WPF
Windows Presentation Foundation Unleashed (WPF) (Unleashed)
Essential Windows Communication Foundation (WCF): For .NET Framework 3.5 (Microsoft .NET Development Series)
MCTS Self-Paced Training Kit (Exam 70-503): Microsoft® .NET Framework 3.5 Windows® Communication Foundation (PRO-Certification)
MCTS Self-Paced Training Kit (Exam 70-502): Microsoft® .NET Framework 3.5 Windows® Presentation Foundation
MCSE Self-Paced Training Kit (Exams 70-290, 70-291, 70-293, 70-294): Microsoft® Windows Server(TM) 2003 Core Requirements, Secon
Debugging Microsoft  .NET 2.0 Applications
Debugging Applications for Microsoft  .NET and Microsoft Windows (Pro-Developer)
Applications = Code + Markup: A Guide to the Microsoft  Windows  Presentation Foundation (Pro - Developer)
Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (Microsoft .NET Development Series)
.NET Framework Standard Library Annotated Reference, Volume 2 :Networking Library, Reflection Library, and XML Library
The Common Language Infrastructure Annotated Standard
8/19/2008

Parlophone @ YouTube

A Parlophone, gravadora de bandas como Radiohead, Cold Play, Blur, The Verve, entre outros firmou parceria com o You Tube.

Já foram disponibilizados mais de 180 vídeo-clipes. Vários deles (se não todos, não fui atrás pra conferir) estão disponíveis em alta-resolução

Simplesmente imperdível!

http://www.youtube.com/parlophone

  

8/17/2008

Growing software keeping things simple

Back in year 2000 I was running my own software development company and had a small kind of ERP system targeted at small companies.

Reading about all the advantages of interfaces such as the ability to switch implementations one for another at any time, I thought: "Wow! That's amazing! I gotta do that!". So I went extracting the interfaces out of each class and making the classes refer to the interface. Soon I realized that in order to be really independent, I had also to change the methods and properties to point to the interfaces so I could change the object being passed to them.

Several weeks later I had it all done and working, but those were several weeks not adding new features. Only refactoring code at a time where we had no refactoring tools like today.

One could argue that I should have done interfaces from start and then I wouldn't have had all that work. OK, I agree. The problem is that all that was new for me. Still, all the work would be compensated by the possibility of switching implementations whenever I needed!!!

The problem is that time never came! OK... To be fair, there were a couple of situations where I benefited from using interfaces. And that only became possible because I got a new insight, a new way of seeing the world - through interfaces. But for the most part, it was an overkill. When modifying a class, instead of having one place to change, now I had two!

It has been attributed to Albert Einstein that “Everything should be made as simple as possible, but no simpler

After so many years of developing software I came to appreciate simple designs.

I think about the ways the code might evolve in the future and instead of putting in things that pave the way to this predicted future, I tend to leave out the things that would otherwise make it more difficult to get there.

The reason for this is that the predicted future may never come to realization. So by putting in stuff now, I would eventually be throwing resources away. Resources that may be needed for something else.

It gets even worse when - driven by real needs - you find yourself having to accommodate changes that go in another direction that eventually are incompatible with what was initially predicted.

All of this has already been explained by people much better with words than I am. Take a look at YAGNI, KISS and DRY.

The bottom line is: Grow you software simple. Only add complexity when really needed. Even then, try to keep it as simple as possible, but no simpler. :)

8/2/2008

Download gratuito de música - Legalizado e com remuneração do artista

Na semana passada eu descobri o Álbum Virtual da Trama.

Eles estão com uma idéia bem legal que é a de todo mês eles definem um orçamento e rateam a grana para os artistas que estão no site baseado no número de downloads.

Na semana passada haviam 3 bandas/artistas:

Cansei de Ser Sexy - Bem legalzinho

Tom Zé - Pura viagem. Provavelmente não escutarei novamente

Macaco Bong - Ainda não escutei.

Os álbuns ficam disponíveis por tempo limitado, então é bom estar checando o site de tempos em tempos para ver o que aparece de novo por lá.

Tem um videozinho lá no YouTube falando do projeto: 

7/23/2008

Preparing for Beta Exam 70-660: TS: Windows® Internals

Microsoft Advanced Windows Debugging and Troubleshooting team disclosed the exam preparation information for 70-660 (71-660 while in beta).

You'll find what you need to know at: http://blogs.msdn.com/ntdebugging/pages/exam-preparation-information-for-exam-71-660.aspx

Since there currently is no prep material, I'll recommend some books that I think will help prepare those who might want to take this exam.

First and foremost is Mark Russinovich's Windows Internals currently in the 4th Edition. The 5th edition should be released later this year.

 

These books will give you the fundamentals of Windows internals.

For get a developer's perspective on Windows internals reach out to Jeffrey Richter's Windows via C/C++.

To get insight into debugging take a loot at John Robbin's Debugging Applications for Microsoft .NET and Microsoft Windows :

  

I've read a few chapters from it - mostly the managed code debugging ones, but there's a lot of information on native debugging.

Although I haven't read Advanced Windows Debugging, is has been highly recommended, so I'll list it here too.

That is a lot of stuff to read and study and it sure is not an exhaustive list. For just one exam! But what did you expected from an exam that caters:

     "Candidates for this exam are typically in the upper echelon of the technical staff at their companies."

So get prepared and good luck!

7/16/2008

Beta Exam 70-660: TS: Windows® Internals

Finally an exam for hardcore debuggers :)

Registration begins: July 17, 2008

Beta exam period runs: July 21, 2008– August 5, 2008

Use the following promotional code when registering at Prometric for the exam: WINT

Source: Windows Internals Beta Exam 70-660 blog post.

7/10/2008

No Commands Available

Depois de refazerem a minha máquina aqui no trabalho, o menu de contexto do Source Control Explorer só trazia "No Commands Available".

Uma rápida procurada no Google e encontrei o post TFS Source Control- No Commands Available « Grant Holliday com a solução.

Sabe-se lá por que o Visual Studio estava configurado para usar o Source Safe. Ao mudar para TFS, tudo passou a funcionar corretamente.

6/25/2008

Atalho de teclado para alterar tamanho de fonte do Visual Studio

Volta e meia durante uma palestra, a gente precisa aumentar o tamanho da fonte para que a audiência possa enxergar o que a gente está escrevendo ou mostrando.

Invariavalmente para fazer isto, todo mundo que eu conheço vai em Tools -> Options -> Fontes, etc...

Hoje encontrei uma dica no blog da Sara Ford mostrando como vincular key bindings a macros.

Com a dica dela você pode apertar CTRL+ALT+SHIFT+Up para aumentar a fonte e CTRL+ALT+SHIFT+Down para diminuí-la.

Esta e outras dicas podem ser encontradas no blog da Sara Ford.

6/18/2008

WCF na Prática

No próximo sábado estarei no 3o União.NET para ministrar a palestra "WCF na Prática".

Apesar do nome da palestra, a idéia é dar uma direção para a escolha das diversas opções suportadas pelo WCF como:

  • Quando usar self-hosting vs. IIS ou WAS
  • Quando usar os bindings NamedPipes vs. TCP/IP vs. WS HTTP
  • Quando usar segurança no transporte vs. quando usar segurança na mensagem
  • Quando configurar no código vs. em arquivos de configuração

e por aí vai...

Se você já está familiarizado com a nova terminologia das certificações da Microsoft, vai ser uma palestra mais para MCPD (decisões técnicas) do que para MCTS (detalhes técnicos).

Inscreva-se em http://www.dotnetraptors.com.br/eventos/uniaodotnet3/default.aspx

6/7/2008

Getting up to speed with Velocity

From the summary:

"Summary: “Velocity” is a distributed in-memory application cache platform for developing scalable, available, and high-performance applications..."

White paper: http://msdn.microsoft.com/en-us/library/cc645013.aspx

Blog: http://blogs.msdn.com/velocity/default.aspx

Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=B24C3708-EEFF-4055-A867-19B5851E7CD2&displaylang=en

Run!

PS.: It sounds like the kind of thing that could be used by some big systems I know. I've heard they have implemented the cache themselves... If only they knew Microsoft was coming with this.

Studying for MCSA/MSCE

I'm a strong believer that the only way to build really good software is knowing your platform.

That's why since from my early days of software development, I've made myself read at least a part of every recommended book about any topic I was interested in.

The the Internet came along and suddenly I was stroke by a tsunami of good and bad information sources.

Searching the Internet after information can be time consuming even with the aid of search engines. There's so much information that it's hard to know the best place to start and keep a track on your progress.

For that matter, I prefer learning through books. Since I started learning .NET, I bought more than 30 books and read at least a part of each of them. Books give you a path to follow and whenever it doesn't give as much as detail as you'd like, you can always resort back to the Internet to gain deeper knowledge on a specific topic this time knowing what to look for.

Recently I noticed a trend in my learning patterns. Whatever problem I had that was development related, I could find something helpful in a couple of minutes because most of the time I knew what to look for.

The same has not been happening with infrastructure related stuff, though. Since I've been working a lot with distributed systems such as web services and web site infra-structure software, I've been spending more time than I would like to troubleshoot things like network connectivity and authentication issues.

For that reason, I decided sometime ago that I would start studying for the MCSA/MCSE certifications. I'm not sure I'll pursue the whole path, but at least I'll try to learn as much as I can about Active Directory, Network topologies, authentication and other stuff that I believe will help me do a better job developing distributed systems.

Late last month I bought MCSE Self-Paced Training Kit (Exams 70-290, 70-291, 70-293, 70-294): Microsoft® Windows Server(TM) 2003 Core Requirements, Second Edition. It hasn't arrived yet, but after I bought it I gained access to MS Press books on Books 24 x 7 from the MVP program. The books I paid almost 150 bucks for are all there! Well at least the printed books are much more portable and I can read them while commuting to and from work.

There's a lot of interesting books on 24 x 7. In the coming months I'll eventually post my findings.

Good reading!

6/6/2008

WCF Security Guide - Beta Release

Com todas as opções oferecidas pelo WCF, as difícil saber se estamos implementando um serviço da melhor forma.
 
 
Versão em PDF disponível no link. Parece promissor.
5/21/2008

Authentication and Access Control Diagnostics 1.0 (x86)

Na semana passada encontrei esta ferramenta bem interessante que nos ajuda no diagnóstico de problemas ligados a autenticação e controle de acesso no IIS 6.0.
 
 
5/16/2008

Acessando Excel Services a partir do SharePoint

Hoje eu tava revisando o código de uma Web Part usada no SharePoint que fazia alguns cálculos usando Excel Services.
Para quem ainda não sabe, o Excel Services expõe a funcionalidade de cálculo do Excel como um Web Service.
 
O projeto tinha uma Web Reference (um proxy) apontando para o Web Service do Excel.
 
O grande lance é que quando você está acessando o Excel Services a partir do SharePoint, não é preciso fazê-lo através do proxy. É possível e recomendável referenciar diretamente o assembly Microsoft.Office.Excel.Server.WebServices.dll.
Alguns dos métodos das classes do assembly têm assinatura direrente do proxy. Nos métodos com os quais tive contato, a diferença consistia do método local ter um parâmetro a mais: out Status[].
 
Como principal benefício, eu destaco o deployment mais simples, já que não é preciso lidar com a configuração do Web Service
 
Maiores informações:
 
5/15/2008

Como obter a senha de IUSR_*

Enquanto eu tentava diagnosticar um bug de autorização no SharePoint, eu acabei modificando a conta usada pelo IIS para representar o usuário anônimo.
Quando eu fui tentar colocar a conta de volta, eu descobri que eu não tinha a senha.
Por sorte, a senha fica armazenada no metabase do IIS 6.0 e com um script simplezinho é possível obtê-lo:
 
Dim IIsObject, SiteObject
Set IIsObject = GetObject ("IIS://localhost/w3svc")

Wscript.Echo Get_IUSR_Password(IIsObject)
Wscript.Echo Get_IWAM_Password(IIsObject)

Function Get_IUSR_Password(IIsObject)
  on error resume Next
  Dim Out
  Out = Out & vbCrLf & "<br>AnonymousUserName = " & IIsObject.Get("AnonymousUserName")
  Out = Out & vbCrLf & "<br>AnonymousUserPass = " & IIsObject.Get("AnonymousUserPass")
  If err=0 Then Out =  vbCrLf & "<br>Path:" & IIsObject.AdsPath & Out 
  Get_IUSR_Password = Out
End Function

Function Get_IWAM_Password(IIsObject)
  on error resume Next
  Dim Out
  Out = Out & vbCrLf & "<br>WAMUserName = " & IIsObject.Get("WAMUserName")
  Out = Out & vbCrLf & "<br>WAMUserPass = " & IIsObject.Get("WAMUserPass")
  If err=0 Then Out =  vbCrLf & "<br>Path:" & IIsObject.AdsPath & Out 
 
  Get_IWAM_Password = Out
End Function
 
Eu soube que tem scripts por aí que setam a bagaça, mas como este aqui resolveu o meu problema, eu nem procurei mais.
 
5/7/2008

SharePoint's disposing problems

After returning from the MVP Summit I joined Microsoft Consulting Services as part of the Green Badge program (vendor).
On my first "real" project here, I had my first experience with Windows SharePoint Services 3.0.
I'm in charge of reviewing part of the code written by a customer's developers for best practices in general and performance in particular.
 
One thing that you should be carefull with is disposing the objects which implement IDisposable.
That is specially important with a couple of SharePoint's classes since they reference unmanaged COM components.
The problem is that (in my opinion) the SharePoint developers didn't do a very good job of implementing the Disposable pattern.
 
There are tons of links out there pointing to problems and workarounds for them. Here's a sample:
 
What makes the case even worse is the fact that:
  • Depending on how you got a reference to an object you should dispose it or not. SPSite should be disposed if you constructed it (new SPSite()). But you should NOT dispose it if you got it from SPControl.GetContextSite().
  • Several classes don't dispose of there containing Disposable objects. SPSite.RootWeb for instance.
I'll eventually blog more about these issues if I get allocated in more SharePoint projects.
4/29/2008

Dança do Sirí na terra do King's Crab

O MVP Summit é a chance de MVPs de todo o mundo interagirem entre si mesmos e os times de produto lá em Redmond.

Mas nem só de conteúdo técnico vivem os MVPs. Na terra do King's Crab, é claro que tinha que ter algum prezepeiro para dançar a dança do sirí - ou como se diz por lá "Crab's Dance" :)

 
4/24/2008

MVP Summit

Na semana passada eu participei do meu primeiro MVP Summit que acontece de tempos em tempos em Seattle e Redmond, WA, USA.

Foi uma boa oportunidade de provar o King's Crab (pata de carangueijo/siri gigante)...

 

... reunir a galera ...

 

... fazer novos amigos ...

 

Tinha até umas gatinhas lá...

 

Como não poderia deixar de ser, até rolou a dança do Crew!

 

 

Estas e mais um monte de fotos em http://alfredmyers.spaces.live.com/photos/cns!19D601BD22E34F6E!697/

 

PS.: O The Spoke está fora do ar novamente. Acho que vou voltar a postar algumas coisas em português aqui.

Certification News

During the week end I learned that I passed the "70-503: Windows Communication Foundation" beta exam. :)

Meanwhile, beta exams are still (through May 4th) available for ADO.NET 3.5 and ASP.NET 3.5.

70-561 – beta code = 561B1

70-562 – beta code = 562B1

Source: http://blogs.msdn.com/gerryo/archive/2008/04/02/asp-net-and-ado-net-beta-exams-extended.aspx and http://blogs.msdn.com/trika/archive/2008/04/18/net-framework-3-5-certifications.aspx

4/4/2008

MVP News

Last Tuesday (April 1st), my MVP award was renewed. Yessss!
Among the benefits of being an MVP are:
  • MSDN Subscription
  • TechEd Subscription
  • MVP Bucks to spend on Microsoft Online Store
  • MVP Global Summit
You can choose to receive media for MSDN or Technet, or you can get both online.
 
Next Friday, I'll be flying to Seattle for my first MVP Global Summit.
I really don't know what to expect. The agenda really didn't catch my eye except for a couple of sessions.
Let's see if I'll find things more interesting once I get there.
 
As a side note, I'll be in New York for a couple of days after the Summit. It'll be my first time there.
The weather is cold this time of the year. I hope I get to see some snow!
 
3/11/2008

IIS 7 for Developers

Next Tuesday (March 18th, 2008), I'll be talking (in Portuguese) about the new features brought by IIS 7 from a developer's perspective.

From Microsoft Events web site:

Idioma(s):
Português.

Produto(s):
Internet Information Server.

Público(s):
Desenvolvedores.

Mercado Relacionado:
Serviços Profissionais.

Duração:
60 Minutos

Data de Início:

terça-feira, 18 de março de 2008 12:00 Brasília

Visão Geral do Evento

Palestrante: Alfred Myers Jr.

O IIS7 é o Web Server mais flexível, extensível e customizável do planeta. Neste webcasts apresentaremos um tour do IIS7 e demonstraremos os grandes benefícios que ele oferece para os desenvolvedores. Aprenda mais sobre o modelo extensível end-to-end no IIS7. Iremos mostrar também o novo configuration system and como este recurso é fácil para construir aplicações, incluindo o IIS configuration através de um simples XCopy. Mostraremos também o suporte dentro do IIS7 para as mais comuns liguagens de programação Web tais como PHP e ASP.NET.

 

https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032357568&EventCategory=4&culture=pt-BR&CountryCode=BR

2/5/2008

Back to Volta

Today I took the afternoon to take another look at Windows Live Labs Volta.

The idea of deferring the application partitioning to the last minute may be good for some types of projects but translating “X” (IL in this case) into JavaScript was something I’ve been wanting since the ASP + VB6 days!

I always thought that writing code in general and data validation code in particular for the server and then for the client was a tedious and error prone task.

At those days I had to write validation code in VB6 for the server and then rewrite it again in JavaScript for the client. Besides being tedious, it is an error prone task because you had two places to maintain the code as validation logic evolved.

Today I decided to test this with some legacy code I have here. I was thinking on getting some document number validation code I have here, but I stumbled across a function that translates currency amounts into their textual equivalents. Not sure how to say this in English, but the idea is to translate “1,234.56” into “Um mil, duzentos e trinta e quarto Reais e cinquenta e seis centavos”. That is “One thousand, two hundred and thirty four Reais and fifty six cents” in Portuguese.

I got this code originally written in Clipper from a magazine back in 1993.

Sometime later I rewrote it in Access Basic 2.0. A couple of years later ported it to Access 97’s VBA and at last VB 6. I have not touched it since 2000.

I ran the project through Visual Studio 2008 VB project Converter, made a couple of tweaks (really!), and added the project to my Volta test solution configured to run in Debug mode and voila! It worked like a breeze!

The important part is that I converted the project to a normal VB Class Library. Not a Volta Class Library. That implicates that I could theoretically use any any library that does not have dependencies on anything not supported by Volta and have it flow as JavaScript to the client side.

That must be what Erik Meijer means when he says "Volta stretches the .NET platform to cover the Cloud.”!!

It is important to notice however, that when you run the code in Debug mode, you are really running the IL version of it. I’m not yet sure how the magic works. Give me time!

As soon I tried to run it in Release mode, the page started complaining about unsupported features such as the Decimal constructor that accepts a Double or somewhere in the VB string helper functions trying to get a CultureInfo.

This is comprehensible since the technology is in its very early stages.

I tried equivalent BCL types and members without using the Visual Basic helper functions, and they worked so as soon as I find more time, I’ll try to fix it. I could simply try to isolate the helper functions giving me trouble and fix those pieces of code, but I’m more inclined to rewrite it in C# since it is not too much code and I have not been programming seriously in VB since 2005.

Anyway I'll decide the route another time.

Stay tuned!

1/13/2008

Volta

I just watched the Channel 9’s two part video with the Volta team and I have to say that it was mind blowing.

Volta has some really interesting ideas on how to simplify the development of distributed applications.

On the second part they get into the details of some of the obstacles they found translating IL into JavaScript such as JavaScript’s lack of a goto statement and how they got around it: using a while loop and a switch statement - a trick much like what C# does to implement “yield return”.

Other interesting thing was how they used exceptions to simulate multi-threading within the browser.

Really cool stuff worth watching!

The link below points to a post on the Volta Team Blog on Microsoft Live Labs which points to the Channel 9 videos. You also be able to get to the rest of the blog from there.

http://labs.live.com/volta/blog/Volta+On+Channel+9.aspx

Enjoy!