The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @SwiftOnSecurity: To be fair, anyone who's tried to use VMware's website would probably rather see it deleted 29 minutes ago
    • RT @mmeeuw: “Je mag Joost Eerdmans niet vergelijken Anton Mussert en JoostAnnabel21 niet met de NSB, daar kunnen ze niet tegen, dan worden… 30 minutes ago
    • RT @roosvonk: Omdat enkele fabrieken van Tatasteel zo verouderd zijn dat ze extra veel vervuilen, hoeven ze niet te voldoen aan de strenge… 35 minutes ago
    • RT @zaagvis: Mijn moestuin is een kilometer van huis en ja ik ga altijd met de auto omdat ik zoveel mee moet slepen, nu dacht ik, als ik ee… 36 minutes ago
    • @Suuzer83 War heftig. Ik duim dat het stopt en wns je veel sterkte. 🤗 39 minutes ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,733 other followers

Archive for June 17th, 2014

Thanks Jaykul for explaining me a custom PowerShell script that acts like DU (DiskUsage).

Posted by jpluimers on 2014/06/17

Thanks Joel Bennett (aka Jaykul) from Huddled Masses for answering my Stack Overflow question PowerShell Get-DiskUsage CmdLet: how to list from a different drive/directory?

In addition to answering it, he also added a complete new and lighter implementation of that script explaining why it was lighter and what idioms to follow in PowerShell.

After reading his aswer, I was even more aware of these two things than I was before:

  • I should emphasize the importance of the object pipeline even more than I already did.
  • You should try to cut down on the dynamically instantiated objects. Like any language with heavy objects, they provide the huge benefit of fast development, but also an inherent cost.

I wasn’t aware you can put your own crafted objects into the pipeline in a very easy way. But you can: Read the rest of this entry »

Posted in Development, PowerShell, Scripting, Software Development | 1 Comment »

 
%d bloggers like this: