<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrew Orlowski &#187; programming</title>
	<atom:link href="http://andreworlowski.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://andreworlowski.com</link>
	<description>Andrew Orlowski&#039;s Writing and Talks</description>
	<lastBuildDate>Mon, 19 Dec 2011 09:43:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Verity Stob &#8211; programming&#039;s funniest memoir</title>
		<link>http://andreworlowski.com/2005/02/04/verity-stob-programmings-funniest-memoir/</link>
		<comments>http://andreworlowski.com/2005/02/04/verity-stob-programmings-funniest-memoir/#comments</comments>
		<pubDate>Fri, 04 Feb 2005 21:47:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stories]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[satire]]></category>
		<category><![CDATA[Verity Stob]]></category>

		<guid isPermaLink="false">http://andreworlowski.com/?p=1073</guid>
		<description><![CDATA[As anyone who&#8217;s ever done it professionally knows, programming computers isn&#8217;t as glamorous as they make out in the movies. Take for example, Independence Day, where the hero lashes together a program in 30 minutes and conjures up a piece of code that saves the world. Have you ever seen anyone do in that real life? [...]]]></description>
			<content:encoded><![CDATA[<p>As anyone who&#8217;s ever done it professionally knows, programming computers isn&#8217;t as glamorous as they make out in the movies. Take for example, <em>Independence Day</em>, where the hero lashes together a program in 30 minutes and conjures up a piece of code that saves the world. Have you ever seen anyone do in that real life? And did you bill them for the full hour?</p>
<p>Or take another glamorous example of the mercurial codesmith-as-shamen. In Po Bronson&#8217;s <em>Nudist On The Late Shift</em> - one of many books of the dot.com era that tried to persuade us work was simply another form of leisure, the eponymous hero is a programmer so dedicated to his task that he forgets to put his clothes on. And he&#8217;s so vital to the organization, no one minds.</p>
<p>But if this was really happening &#8211; what would you think? You&#8217;d ask yourself, what would drive a man to toil over a computer, in a deserted building, stark naked? Just what would possess a man to lose his dignity like that? The lonely soul must have been tearing his heart out. About, what exactly?<br />
<span id="more-1073"></span><br />
Well, what was probably going through the mind of the nudist at that very moment can be found on page 203 of this marvelous book, by Verity Stob. He was probably thinking something like this.</p>
<blockquote><p>Once upon a time there were three special COM string types: BSTR, _bstr_t and CComBST. BSTR was the most straightforward: it was a typedef for a pointer to a wchar_t, and w_char_t was a typedef_ of a 16-bit Unicode character. Therefore BSTR was a Unicode equivalent of LPSTR [which is what Microsoft called strings in Win32].Ha! Got you there. BSTR was no simple null-terminated string; rather it had a secret length count and extra null terminator, and was allocated and freed with special functions. One was not supposed to know the format of its contents, and it was not obvious how you were supposed to make conversions to /proper/ strings. [Which in any case, would break the 'make no assumptions about content' rule].</p>
<p>But why manipulate BSTRs as pointers? The answer was &#8220;Yes, of course it was a natural for a class&#8221;, which was two were supplied, &#8220;A _bstr_t object,&#8221; said MSDN in its _bstr_t page, &#8220;encapsulates the BSTR data type,&#8221; whereas the entry for CCombSTR began &#8220;the CComBSTR class is a wrapper for BSTRs&#8221;.</p>
<p>Both ignore Bruce McKinney&#8217;s MSDN-bundled, and therefore officially sanctioned 1996 article &#8220;Strings the OLE Way&#8221; where he proposed a BSTR wrapping class of its own, called ermmm, String.</p></blockquote>
<p>Well, when run time error hilarity ensues, do you wonder why a programmer would rip his clothes off &#8211; wouldn&#8217;t you?</p>
<p>Here then is the grim reality of the code face, once the marketeers and consultants have taken their colored UML diagrams down and departed. Somebody has to keep our machines running.</p>
<p>For 17 years a mysterious English lady called Verity Stob has been chronicling the dilemmas of people who do on a monthly basis &#8211; with amazing felicity, wit and patience, and here are her columns in one place for the first time, in a real paper book.</p>
<p>Verity Stob is to computer programming what the BOFH is to network administration. Both are so acutely well observed, and so well written, that like The Office, enjoying them causes anguish as well as giggles. Both are consistently funny, truthful and inventive not just occasionally, but year in and year out.</p>
<p>But there, the similarities end. Verity Stob&#8217;s humor is in the stoic British tradition of a Tony Hancock, fiercely moral but utterly non-judgemental. (With only one exception). Faced with libraries, languages, frameworks and tools that don&#8217;t make sense, often accompanied (as we see above) by documentation that doesn&#8217;t exist or really shouldn&#8217;t have in the first place.</p>
<p>Systems programming has its own folklore, in the Jargon File. But for Windows programming &#8211; the grim toil undertaken by the rest of the programming world? Verity Stob is its Queen and its chronicler.</p>
<p>There are great flights of fancy, such as Brunel applying for a C++ job, or a sentient Google cluster, or a superdense history of computing &#8211; the funniest ever written. Or her Beaufort Scale of PC Decay, which is so well observed that anyone who&#8217;s used a post-Windows 3.0 PC will recognize each stage.</p>
<blockquote><p>Cruft Force 1: &#8220;New&#8221; &#8230; &#8220;The mouse does the poltergeist trick where, with the actual mouse stationary, it drifts three inches due east and then stops. For no reason at all&#8230;&#8221;&#8230; Cruft Force 3: &#8220;Lived In&#8221; &#8230; &#8220;One time in seven when the user starts word or other Office 2000 app, instead of running it pretends it is installing itself for the first time and starts a setup program&#8221; &#8230;</p>
<p>&#8230; Cruft Force 8: &#8220;Decrepit&#8221;: &#8220;&#8230;The SETI screensaver overnight creates 312 copies of itself in an impressively expanded system tray that fills half the screen&#8221;&#8230;</p></blockquote>
<p>We recommended this to Apple to use instead of their silly &#8220;Twitch Over From Windows&#8221; campaign, but really it should be etched onto the side of space probes to warn advanced extra-terrestial civilizations that if they get any closer to Earth, they face asymmetric warfare.</p>
<p>Stob saves plenty of scorn for middle management and the schemes they introduce to justify their positions.</p>
<p>Especially memorable is the &#8220;code review&#8221; &#8211; a fad in the early 1990s, where Verity is upbraided for failing to record the return value of a printf() statement, but flirts her way out of trouble. And any Microsoft Certified Professional will recognize the BSY or &#8220;Bill Says Yup!&#8221; examination. Or level 2, BSYI, the &#8220;Bill Says Yes Indeedy&#8221; exam. The ISO 9000 program gets repeated attention, too.</p>
<p>Verity&#8217;s BFG is the literary parody, and we&#8217;ve praised the History of the Borlandites epic here before, faithly capturing the rhythms of the King James I Bible. There are many more here, but the pomes are probably the best. These are incredibly hard to do well. Auden&#8217;s Night Mail is note-perfect, and you can imagine Verity&#8217;s excitement when she discovered that Longfellow&#8217;s Song of Haiwatha borrowed its meter from the Finnish national epic Kaleva.</p>
<p>Finnish, you say? Away she goes.</p>
<blockquote><p>In a city called Helsinki <br />
Capital of icy Finland <br />
Where the days are dark in winter <br />
Where the nights are bright in summer <br />
Where no mother&#8217;s son drops litter <br />
(Finns are very down on litter) <br />
Dwelt a Swedish-speaking youngster <br />
By the name of Linus Torvalds <br />
&#8220;Linus&#8221; being Shulz for blanket <br />
&#8220;Torvalds&#8221; simply meaning Torvalds</p></blockquote>
<p>Although Verity says she wants to rebuff, in advance, any suggestions that the collected columns resemble a social history of computing, it&#8217;s still an amazing potted history of man&#8217;s inhumanity to man in the name of programming. If the lady could curate a computer museum, what a place it would be. And section two, &#8220;1995-1999: The Rasp of The Modem&#8221;, could give it its name. Modern historians forget what a gruesome task programming the x86 segmented architecture using MS-DOS interrupts really was. And then how good that suddenly looked when Microsoft introduced OLE and COM. Stob finds an article in the Microsoft-published Developer Network magazine (MSDN) that begins, &#8220;I love COM. COM is good. Like a fine pilsner or ale, COM never disappoints. In fact, the more I look at COM, the more I like it.”</p>
<p>(And <a href="http://www.microsoft.com/msj/0697/atl.aspx" target="_blank">here it is</a>. And look, the lunatic who wrote it is still <a href="http://www.theregister.co.uk/2004/07/19/microsoft_blog_hoax_backfire/">causing</a> <a href="http://www.microsoftmonitor.com/archives/003371.html">mayhem</a> - only he now works for Microsoft!)</p>
<p>Years later, after Microsoft discontinues OLE and COM, Verity finally encounters an example that works.</p>
<blockquote><p>&#8220;I for one still feel a thrill of excitement and surprise when Word does what I asked it to, often followed by a second thrill, of a different kind, when it abruptly stops doing so.For a long time the big problem with Automation, in my opinion, was the lack of robust and realistic examples showing what it could do—especially where Outlook was concerned. Happily this shortcoming has in recent times been addressed, and addressed in spades.</p>
<p>Of all the script viruses, “I Love You” is still my preferred source of useful snippets for manipulating the Outlook address book, even if its author does insist on spelling mail “male.” By the way, ILY also contains some good stuff demonstrating the VB file system object &#8211; I would lobby for its inclusion in MSDN, but I suppose it is too late now.</p></blockquote>
<p>Lovely. And true.</p>
<p>About Verity herself, little is known &#8211; except that she has an older sister, Parity Stob. But this might well the funniest book written about computing, and you should treat yourselves without delay.</p>
]]></content:encoded>
			<wfw:commentRss>http://andreworlowski.com/2005/02/04/verity-stob-programmings-funniest-memoir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Cell chip &#8211; what it is, and why you should care</title>
		<link>http://andreworlowski.com/2005/02/01/the-cell-chip-what-it-is-and-why-you-should-care/</link>
		<comments>http://andreworlowski.com/2005/02/01/the-cell-chip-what-it-is-and-why-you-should-care/#comments</comments>
		<pubDate>Wed, 02 Feb 2005 03:07:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stories]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://andreworlowski.com/?p=1076</guid>
		<description><![CDATA[Part 1: A look at how it works No chip in years has caused as much excitement as the Cell processor developed by IBM, Sony and Toshiba. It promises to be the most important microprocessor of the decade, with potentially enormous repercussions for how the industry computes, and how the rest of us use digital [...]]]></description>
			<content:encoded><![CDATA[<h3>Part 1: A look at how it works</h3>
<p>No chip in years has caused as much excitement as the Cell processor developed by IBM, Sony and Toshiba. It promises to be the most important microprocessor of the decade, with potentially enormous repercussions for how the industry computes, and how the rest of us use digital media. It will power the PlayStation 3 and technical and commercial computing.</p>
<p>Technical details of Cell will be disclosed at the International Solid State Circuits Conference in San Francisco next week, and in anticipation we&#8217;ll look first at how the Cell works and then tomorrow at what it means to the industry and consumers.<br />
<span id="more-1076"></span><br />
Excitement about Cell has already led to some wild and poorly informed speculation, as Ars Technica&#8217;s Jon Stokes <a href="http://arstechnica.com/news.ars/post/20050124-4551.html">rued</a> last week. But earlier in the month, Microprocessor Report&#8217;s Tom Halfhill published an investigation into a detailed patent filed in 2001, and published by the USPTO in October, and he was kind enough to discuss it with us. We&#8217;ll refer to it as the &#8217;734 patent.</p>
<h3>Inside Cell</h3>
<p>The ambitious scale of the project is one of the most remarkable aspects of Cell.</p>
<p>&#8220;It isn&#8217;t just a single microprocessor or even a family of processors,&#8221; writes Tom. &#8220;It&#8217;s a top-to-bottom architecture for a broad range of computing systems, from servers and workstations at the high-end to game consoles, PDAs, digital TVs, and other consumer electronics at the low end&#8221;.</p>
<p>How does it look?</p>
<p>The &#8216;cell&#8217; which gives the chip its name doesn&#8217;t refer to the hardware, but to a virtual clump of software which roams the system looking for computing resources. The patent refers to a &#8220;cell object&#8221; &#8211; program and data &#8211; and it can even roam across LANs or WANs, to find another Cell-based device.</p>
<p>A Cell chip consists of one or more independent execution units, and a program can commandeer as many of these as resources allow to create a temporary execution pipeline, each with its own register file and banks of RAM. These pipelines are dynamically configurable and can lock out other processes from grabbing their hardware resources. &#8220;The Cell architecture introduces a whole new meaning to the term &#8216;self-modifying code&#8217;,&#8221; notes Tom drily.</p>
<p>The &#8217;734 patent calls the basic hardware unit a PE, or &#8216;processor element&#8217;. Rather confusingly, a PE consists of a &#8216;processor unit&#8217; or PU, and an array of attached, er, processing units or APUs. The patent, Tom notes, says that the &#8220;preferred&#8221; PE configuration is eight APUs. The &#8220;preferred embodiment&#8221; of an APU is 128kb of SRAM, 128 x 128-bit registers, four integer units and four floating point units. Some of these may be specialized for tasks such as shading.</p>
<p>Inside each software cell are &#8216;apulets&#8217;. These aren&#8217;t necessarily self-contained programs, stress MPR, but seem more like serialized objects. Amongst the many mysteries yet to be revealed about software cells is how the chip schedules such tasks, not just amongst onboard PEs but also amongst other Cells.</p>
<p>&#8220;Imagine an apulet running on your PDA that depends on a result coming from another apulet running on a computer in Norway,&#8221; writes Tom. The Cell processor must make its best guess, based on network latencies, how to distribute the workload. The designers have set themselves an awesome challenge.</p>
<p>Halfhill also notes that the Cell&#8217;s architecture is more flexible than Java&#8217;s sandboxes, because a software cell can encapsulate several processes, or part of a single process. There&#8217;s no evidence, he points out, that Cell implements JVMs in hardware: it&#8217;s much more subtle than that. For security purposes, Cell&#8217;s hardware restrictions may prove to be the most controversial aspect of the chip.</p>
<p>Some interesting design decisions have been made in creating the memory architecture -</p>
<p>&#8220;It’s hard to avoid the conclusion that Cell processors will have an extraordinarily secure but cumbersome memory model. For each main-memory access, the processor would have to consult four lookup tables&#8230; Three of those tables are in DRAM, which implies slow off-chip memory references; the other table is in the DMA controller’s SRAM. In some cases, the delays caused by the table lookups might eat more clock cycles than reading or writing the actual data. The patent hints that some keys might unlock multiple memory locations or sandboxes, perhaps granting blanket permission for a rapid series of accesses, within certain bounds.&#8221;</p>
<h3>Global security</h3>
<p>The Cell architecture isn&#8217;t just a blueprint for a new kind of chip, but for a massively distributed global computing network. Each Cell is given a GUID, a global identifier. Your PlayStation may be hosting processes that began life on a Cell on another side of the world. Remember that the architecture enables a strict, lock-down machine to be built, with access to memory tightly controlled. Since DRM is predicated on controlling uniquely-identified media to run, or not run, on a specifically-authorized piece of hardware, this allows system designers much more scope in building systems which can both restrict and track the content they play.</p>
<p>There may be more benign uses: Cell clearly makes a very sophisticated building block for distributed grid computing too. &#8220;A hypothetical Cell processor with eight of these APUs could achieve 32 BOPS and 32 gigaFLOPS at only 250MHz,&#8221; writes Tom. Or a teraflop at 1Ghz. This is an order of magnitude higher than today&#8217;s workstations in what could be a low cost, low power machine. If Cell fulfills its promise, Intel is facing its greatest challenge since the turn of the 1990s, when RISC processors seemed to be extending an unbeatable performance lead, and when Microsoft was porting Windows NT to every RISC platform it could: MIPS, Alpha and PowerPC. But the remarkable P6 core (which first appeared in the Pentium Pro) saw the performance gap narrow, and the alliances arrayed against Intel stumbled and fragmented.</p>
<p>This time, Cell is aimed at a different market, one that Wintel has failed to conquer &#8211; the living room.</p>
]]></content:encoded>
			<wfw:commentRss>http://andreworlowski.com/2005/02/01/the-cell-chip-what-it-is-and-why-you-should-care/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

