{"id":14382,"date":"2010-01-07T05:51:54","date_gmt":"2010-01-07T05:51:54","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2010\/01\/07\/tb-pb\/"},"modified":"2019-02-18T13:06:02","modified_gmt":"2019-02-18T20:06:02","slug":"tb-pb-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/tb-pb-2\/","title":{"rendered":"TB &#038; PB"},"content":{"rendered":"<p>\u201cTo ship is the choose.\u201d&#160; That is the sad reality behind a number of the things that we regretted about V1.&#160; When we first started the project (a LONG time ago) we knew that we wanted to close the semantic gap between what admins thought and what they had to type.&#160; Imagine that you wanted to find all the processes that had greater than 15MB of workingset.&#160; Who the heck could type in the following:<\/p>\n<p><font color=\"#000080\" size=\"2\" face=\"Courier New\"><strong>PS&gt;&#160; Get-Process |where {$_.Workingset \u2013ge ?????}<\/strong><\/font><\/p>\n<p>What?&#160; You didn\u2019t know that 15MB was 15728640 bytes?&#160; Yes you should have written:<\/p>\n<p><font color=\"#000080\" size=\"2\" face=\"Cordia New\"><strong>PS&gt;&#160; Get-Process |where {$_.Workingset \u2013ge 1572850}<\/strong><\/font><\/p>\n<p>Wait \u2013 is that right?&#160; <\/p>\n<p>NO!&#160; As I typed it in, I made a mistake.&#160; I thought I would leave it in to make the point.&#160; If you came across this line in a script would&#160; you have caught the mistake?&#160; I doubt it.&#160; Ok Ok \u2013 so&#160; you\u2019re a genius \u2013 I asked the question wrong.&#160; Would the person in the next office have caught the mistake?&#160; Right &#8211; \u201cno way!\u201d<\/p>\n<p>&#160;<\/p>\n<p>That is why we added shortcuts KB, MB, and GB<\/p>\n<p><font color=\"#000080\" size=\"2\" face=\"Courier New\"><strong>PS&gt; 1kb       <br \/>1024        <br \/>PS&gt; 1mb        <br \/>1048576        <br \/>PS&gt; 1gb        <br \/>1073741824        <br \/>PS&gt; 15mb        <br \/>15728640        <br \/>PS&gt; 1kb+2mb+3gb        <br \/>3223323648<\/strong><\/font><\/p>\n<p>This then allows you to type things like:<\/p>\n<p><strong><font color=\"#000080\" size=\"2\" face=\"Courier New\">PS&gt;&#160; Get-Process |where {$_.Workingset \u2013ge 15mb}<\/font><\/strong><\/p>\n<p>Sadly we did this so early on that we thought GB was going to be enough.&#160; It wasn\u2019t that long before we realized our mistake in not including TB and PB but at that point, we were up to our necks in feature prioritization and this never became higher priority than something else.&#160; <\/p>\n<p>With V2, we decided to remedy this situation and we now support TB and PB.<\/p>\n<p><font color=\"#000080\" size=\"2\" face=\"Courier New\"><strong>PS&gt; 1tb       <br \/>1099511627776        <br \/>PS&gt; 1pb        <br \/>1125899906842624        <br \/>PS&gt; 1kb+2mb+3gb+4tb+5pb        <br \/>5633900804047872<\/strong><\/font><\/p>\n<p>(Want to double check our math?&#160; \ud83d\ude42 )<\/p>\n<p>To me, the interesting part of this story is the way we got this into V2.&#160; The fact of the matter is that if we had done feature prioritization, I doubt very much that we would have included this change.&#160; What happened was that a number of us were embarrassed by this mistake and just decided to do the right thing and fix it.&#160;&#160; In retrospect, I think it was exactly the right thing to do.&#160; The lesson here is that you have processes and you have judgment and that success is all about finding the right balance between these two.<\/p>\n<p>Experiment!&#160; Enjoy!&#160; Engage! <\/p>\n<p>Jeffrey Snover [MSFT]   <br \/>Distinguished Engineer    <br \/>Visit the Windows PowerShell Team blog at:&#160;&#160;&#160; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a>    <br \/>Visit the Windows PowerShell ScriptCenter at:&#160; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cTo ship is the choose.\u201d&#160; That is the sad reality behind a number of the things that we regretted about V1.&#160; When we first started the project (a LONG time ago) we knew that we wanted to close the semantic gap between what admins thought and what they had to type.&#160; Imagine that you wanted [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14382","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>\u201cTo ship is the choose.\u201d&#160; That is the sad reality behind a number of the things that we regretted about V1.&#160; When we first started the project (a LONG time ago) we knew that we wanted to close the semantic gap between what admins thought and what they had to type.&#160; Imagine that you wanted [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/14382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=14382"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/14382\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=14382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=14382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=14382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}