12 ms·
“I wrote FAT on an airplane, for heaven's sake”
- fmax30 13y agoAm i not getting something i thought that fat was created by Marc Macdonald? http://en.wikipedia.org/wiki/File_Allocation_Table#Original_8-bit_FAT http://en.wikipedia.org/wiki/File_Allocation_Table#Original_...
- auctiontheory 13y agoWas it one of those planes that flies for six months?
- mathattack 13y agoMaybe a fine line between "writing" and "designing" and "prototyping". :-)
- nknighthb 13y agoThe initial 8-bit version of FAT (which I personally do not know the history of, but Wikipedia suggests Gates is probably taking more credit for than deserved) and its rough successor, FAT12, are very simple structures. Weird products of their time and place, but simple nonetheless. Coming up with the blueprint for such on a flight of at few hours seems quite reasonable for someone with the requisite knowledge.
- samspenc 13y agoAnd they got a patent for it? :D
- asveikau 13y agoIANAL and I haven't read up on everything, but I thought it was just the long filename support that was patented. My understanding is that if you just support 8.3 names it's unencumbered. Edit with further detail: The thing that's unique about LFN are the rename and delete behaviors. Lots of filesystems support more than 8.3 or multiple names for files (hardlinks) but I don't think any of them have alternate names for files that "stick" when you move them into another dir, or that behave somewhat cleanly when a non-LFN-aware OS does so.
- Guvante 13y agoHe was talking about FAT8 not FAT32.
- deleted 13y ago[deleted]
- Theriac25 13y agoIt took me a while to realize that it didn't mean writing code that ran aboard an airplane, but code that was written while on an airplane. Somehow the latter didn't even cross my mind as something that could be considered impressive.
- danso 13y agoSo the FAT story may be an exaggeration, but does Brandon Eich's Javascript-in-10-days (http://www.quora.com/JavaScript/In-which-10-days-of-May-did-Brendan-Eich-write-JavaScript-Mocha-in-1995 http://www.quora.com/JavaScript/In-which-10-days-of-May-did-...) still count as a "STFU-I'm-the-boss" feat?
- YooLi 13y agoSo that explains it... ;)
- simplekoala 13y agoYou have a typo: Brandon Eich -> Brendan Eich. Not nitpicking, am compelled to point out since it is a name.
- troyk 13y agoI'm old enough to know he didn't carry a computer on the plane....
- nknighthb 13y agoBut too young to know writing code and speccing data structures on paper (and/or napkins...) was quite common before airplane-friendly computers were available? (And for a long time after, really; ubiquitous ownership of laptops is a quite recent thing).
- DerpDerpDerp 13y agoI still prefer to write on paper on planes.
- sgt 13y agoMe too - although if it's code, then it's going to more like pseudo code or simply "concepts" and ideas.
- bluedino 13y agoFrom this Woz quote it was pretty common: "I wrote all my code on paper in hexadecimal. I couldn't afford an assembler to translate my programs into hexadecimal bytes, I did it myself. Even my BASIC interpreter is all hand written. I'd type 4K into the Apple I and ][ in about an hour. I, and many others too I think, could sit down and start typing hexadecimal in for a SMALL program to solve something that occured or something that somebody else wanted. I'd do this all the time for demos. I certainly don't remember which hexadecimal codes are which 6502 instructions any longer, but it was a part of life back then."
- simula67 13y agoPossibly stupid question : Why did he not write the assembler himself ?
- 13y ago
- mrmaddog 13y agoI think the real lesson here is that every time you add a feature, you are adding development overhead to every other feature, leading to exponential development time. I'm sure if segment tuning was one of the first thing to go into windows, it would have been much simpler to implement. However, at later stages in the development you have to account for how different, already-written applications are loading their memory, and thus the feature needs handle far more edge cases than it would have if this was an earlier-implemented feature. I'm not saying the overall time to develop segment-tuning would be shorter, in the long run had it been developed first, but the perception of development-time for this feature would be shorter (since any segment tuning edge cases that you ran into while writing an application would be considered part of the app's development time, not segment-tuning's development time). I'm sure that if Mr. Gates had implemented FAT at a later date, he would have needed a much longer plane ride.
- DenisM 13y agoAnother possible conclusion from your analysis is that a proper architectural separation of concerns (which could allow one to bang out code like he's still on that plane) has not been practiced in Windows, and by the time Bill was offered the opportunity to code something in Windows it was already hopelessly entangled.
- mrmaddog 13y agoNot exactly. I am a huge fan of code modularization, but what modularization offers you is the ability to decrease the exponent (i.e. to be devTime^1.01 instead of devTime^2). Some features though (including segment tuning, from the sound of it), will touch a ton of other features regardless of how well you modularize your code. I work at a networking company (Arista), and a lot of the interesting problems come from this sort of interaction. Our entire OS was built so an agent would be resilient to changes in another agent, and this modularization means there is very little "spaghetti code". However, when you are building a feature (say, a new routing protocol), you have to be extremely conscious of how it interacts with everything else: various reliability features (i.e. Stateful switchovers), configuration features (saved configs, public APIs), resource contention (TCAM utilization), etc. etc. If that new routing protocol was the first thing we implemented on our switch, it would be a complete breeze. In the context of other features though, this becomes a more intensive project (though in codebases without proper modularization you'd find this task "herculean" as opposed to "intensive").
- mtkd 13y agoIf he'd kept one foot in the codebase - he might not have made so much money - but his software legacy might have turned out differently.
- angersock 13y agoI'm not sure that Microsoft's is a bad legacy. They did a whole hell of a lot to put programming and office tools in the hands of normal people.
- gxs 13y agoI agree. Regardless of what they've done, they largely accomplished their vision. Their vision was to put a PC in every home. They started with such a lofty goal and delivered. The first thing I ever learned on a pc was typing a: <return> to load a floppy on MS DOS. It seems this is largely their problem today - they no longer have a lofty goal to focus their energy on. Most companies have one. Google - organize the world's information etc. etc.
- tmister 13y agoGates is one of those rare people who is at a time a good developer, good manager and a cunning businessman. I started to appreciate him after watching Triumph of the Nerds documentary series. I literally loled for 5 minutes after watching Gates in an event parodying IBM which was organised by Jobs http://youtu.be/riyAe4BKAng?t=20m1s http://youtu.be/riyAe4BKAng?t=20m1s.
- dirkk0 13y agoThank you for the link. I didn't know Jobs and Gates where fighting IBM together back then.
- 3327 13y agoTLDR : Bill gates is a Hoss.
- sliverstorm 13y agoWatching them so young is such a trip! Thanks for the link!
- hackula1 13y agoWow, Larry Ellison predicts mobile web at 47:00.
- BenderV 13y agoMore Chromebook than Mobile Web.
- sarreph 13y agoSo that's why everyone uses NTFS...
- mattstreet 13y agoext3/4
- sliverstorm 13y agoFAT8 was written in 1977. Nobody is using any filesystem written in 1977 these days.
- Zardoz84 13y agoEXT4 fs and other fs , NTFS is a little pony if you go to servers world
- count 13y agoNTFS is way more sophisticated than ext2/3/4. ZFS is probably got it beat, but it's actually a pretty great filesystem. Don't confuse 'windows' with 'NTFS'.
- Aldo_MX 13y agoTo be honest I can't afford to commute and do nothing, I have to plan new features for my products, redesign existing ones, or at least read a tech book/article, otherwise I feel really frustrated because I dislike to stay still. The best ideas I have ever had happened during my commute, so I feel familiar with the "I wrote FAT on an airplane" statement.
- Pxtl 13y agoThis is why I'm envious of cities with real transit. Driving sucks.
- virtualwhys 13y agoFrom 12BitSlab in article's comments > I don't mind if billg gets a little arrogant at times. One merely has to look at how he wrote the ROM code for the Altair to realize his abilities. > Also, ALL of the concepts embodied in modern tablets and smartphones were "invented" by billg when he wrote the code for the Tandy 100. Things like "instant on", data stored in non-volitile memory, small productivity apps, continue from the same point after power down, etc. Persoannly, I put billg in the Top 5 of all-time CS people who contributed to computing. This is an interesting claim, I was always under the impression that while Gates could code, he wasn't at all a CS giant.
- anologwintermut 13y agoHe had the fastest algorithm for pancake sorting for a long time. Not the coolest thing, but still pretty impressive and not just can code. http://www.npr.org/templates/story/story.php?storyId=92236781 http://www.npr.org/templates/story/story.php?storyId=9223678...
- cpr 13y agoWhen I was an undergrad (a year ahead of Gates, 72-76), Harvard had only "intro to programming" undergrad courses, so those of us CS (well, applied math) majors who arrived at college already competent at programming pretty much just took all grad CS courses for 4 years. The faculty were enlightened enough not to care that we weren't grad students. Gates was certainly one of the brighter undergrads in those courses. I don't know if that makes him a "CS giant," but he was no slouch.
- virtualwhys 13y agoAwesome story, thanks. While you guys were coding away at Harvard, I was not yet able to properly focus my mind, and so took to running around the streets of Cambridge(port) in diapers instead ;-) p.s. from the above one can assume I was either born in '72 or was taking far too much acid for my own good.
- Tloewald 13y agoYou should look at the 16-bit VM Woz wrote for the Apple ][ http://www.6502.org/source/interpreters/sweet16.htm http://www.6502.org/source/interpreters/sweet16.htm Anyway, Engelbart, et al, had figured out all this stuff 10 years earlier.
- ChikkaChiChi 13y agoBill Gates complains that people aren't doing real programming and people berate him to shut him up. Steve Jobs throws the first iPod into a fish tank and he's revered as a God. I guess it's no wonder why the mainstream of Apple and Microsoft is what it is.
- eksith 13y agoIsn't this basically Bill Gates exemplifying the "Rockstar Programmer" persona? "I did X in Y time so why don't you follow my lead" may have been a motivational tactic at the time, but it did backfire. I'm forced to wonder if this is how the motif began.
- delucain 13y ago"Tony Stark was able to build [a miniaturized arc reactor] in a CAVE! With a box of scraps!"
- korethr 13y agoI'm sorry, sir. I'm not Tony Stark.
- consultant23522 13y agoI had a manager that would repeatedly use this type of remark. We had this particular application that on one could touch without breaking something. It was always a mess. He would often remark "I wrote the whole thing over a weekend, why can't you guys make a tiny little change without breaking it?" One day I finally got fed up with him and replied "Because it's the quality of work you'd expect from an entire application written over a weekend."
- ryandrake 13y agoI once worked with a founder who would always pull that kind of garbage: "I wrote [simple software with no dependencies or integration requirements] in [N] days! Why is it taking you guys [M] months to write [complex software relying on several 1st and 3rd party libraries, a component that needs to work within a large, old legacy system]? Good on the develop manager!
- mkramlich 13y agoAlso I've generally found it's easier to develop starting with a blank directory tree (no code), than to inherit a legacy codebase, have to make the sometimes grueling time/energy/focus/trial-and-error investment needed to come up to speed on it, understanding-wise, at the fine-grained level of detail you need to code confidently, then, figure out how to make a positive change that doesn't make some other thing worse. (And it's harder if no automated tests or documented manual test plan.) I call it OPC for Other People's Code. One of the anti-patterns of software engineering. It's distinct from NIH (Not Invented Here), which is another anti-pattern.
- vinceguidry 13y agoOf course it's always easier. The question is, can the business afford to wait while you greenfield another app? Usually it can't. That's why refactoring. First step is fixing the development environment / build process and getting a staging server up. It will inevitably be broken / nonexistent, with frequent edits directly to production necessary. The last guy will have internalized a great deal of operational workarounds that you'll need to rediscover then codify into the app. Next you write tests. There will be none. Once you have a workflow that is decent, you can start to identify the worst offenders. All the while, you'll be having to change the codebase to meet project requirements, this will give you a good idea of where the really bad shit is. Unit test all of it, and if you're feeling froggy, write some integration tests. Once you get to this phase, you should be unit testing your project work. Only after those two are completed can you start refactoring. Treat it like TDD. Keep an eye on larger goals like 12 factor conformance. It may look pie-in-the sky at first, but it will give you ideas on what to focus on. Main advantage of refactoring over ground-up re-writing is, you don't have to sell it to your boss. You just do it, in and around normal project work. The biggest hurdle is the first step. It's scary to fuck with deployment. The approach I've come up with is to fork the codebase and rebuild the tooling on top of that, deploying first to staging, then to production, alongside the current working copies. Once you're satisfied flip the switch. You may have to flip it back, but at least it will be easy and instantaneous. These lessons are from my ongoing project to modernize an ancient Rails 2.3.5 website running on Debian Lenny. Linode doesn't even offer that OS anymore, I had to cannibalize a server with an EOL app on it for a staging environment. I can't use Vagrant because there aren't any Lenny boxes. It's long, arduous and slow. I fucking love it.
- yOutely 13y agoSkip to the last 2 paragraphs of this article. The rest is filler.
- chubbard 13y agoWhen he says "He wrote FAT on an airplane" he means with pencil and paper since FAT is so old that there were no laptops to do that on. Which maybe he figured out all of the specs, but he didn't put code down and debug it. Of course in those days writing it on paper was quite common before people typed it into the computer. And that is quite impressive in and of itself. Most of the time people treated that activity as if they were coding so they were very precise. Now a days we're fast, but we aren't as precise.
- marssaxman 13y agoYou can write code on paper and debug it in your head, running a simulator of the target environment in your brain. There is no "as if"; this was actually coding. Coding is something you do in your brain, not in an editor.
- teawrecks 13y agoAm I the only one who didn't interpret the quote as him showing off? If I used that line, it would be a way of telling them that the problem of segment tuning is an artificial limitation imposed by a format that hasn't gotten enough attention. "I wrote FAT on an airplane" would be my way of saying, "don't come up with better ways to work around my half-assed implementation. spend time improving the implementation so segment tuning isn't even something you have to worry about."
- IgorPartola 13y agoFAT and segment loading have nothing to do with each other. Gates was just bragging about having written something complex in a short period of time.
- simula67 13y agoStill, he may have been pushing his team to do better.
- nicholassmith 13y agoYou can read it a couple of ways, you can take it as Gates showing off that he did something hard quickly, which is certainly valid, or you can take it as Gates saying 'stop fiddling whilst Rome burns and get it done'. You can hammer out complex ideas quickly and lose your life twiddling the details, or just do it and move on. Or more likely he was being a bit of a jerk.
- chris_wot 13y agoSo he got out a notepad and pen, then wrote the word "FAT"... whilst on a plane. Awesome!
- graycat 13y agoAbout "optimization", Gates likely had a point. That problem of assigning code blocks (subroutines/functions) to memory segments does suggest a significant role for optimization. What is optimization? For a very sparse description, for the set R of real numbers, positive integers m and n, functions f: R^n --> R and g: R^n --> R^m, find x in R^n to solve minimize f(x) subject to g(x) >= 0 So, set up a mathematical description of the problem based mostly just on the 'cost' function f, that is, what want to minimize, and 'constraints' g that keep the solution 'feasible', that is, realistic for the real problem. Then look for a solution x. Yes, easily enough such problems can be in NP-complete and still difficult otherwise. Likely what Gates wanted was function f to be the execution time and function g to force honoring the 64KB limit per segment, etc. Then a big question would be, assuming what software to have its segments assigned? So, for an answer, just take some Windows and/or Office code and get the total execution time on a typical workload. Might also want to be sure that on any of several workloads, the optimal solution was no worse than some factor p in R of the best solution just for that workload. Then keep lowering p until the f(x) starts to rise significantly and come up with a curve of f(x) as a function of p. Present the curve to Gates and have him pick a point. Gee, should we rule out having the same subroutine/function in more than one segment? Hmm .... Just where Gates learned about optimization would be a question, but he had a point.