Update, slides are here, but they really need to be seen in context of the talk itself: http://phk.freebsd.dk/_downloads/FOSDEM_2014.pdf
I was honored to have lunch yesterday with 15 awesome computer science students from South America. They are here for a Google-run pilot program which brings female students to Google for two months to give them a sense of computer science in a corporate setting and to help foster much-needed diversity in our field. While at Google they've been working on things like building query serving systems on AppEngine to handle searches over Shakespearean texts. We had a great chat about datacenters, neural networks, MapReduce, query serving, probabilistic models for query completion and the upcoming World Cup, among other things.
Thanks for asking me to have lunch with them, !
Long ago, as the design of the Unix file system was being worked out, the entries . and .. appeared, to make navigation easier. I'm not sure but I believe .. went in during the Version 2 rewrite, when the file system became hierarchical (it had a very different structure early on). When one typed ls, however, these files appeared, so either Ken or Dennis added a simple test to the program. It was in assembler then, but the code in question was equivalent to something like this:
if (name == '.') continue;
This statement was a little shorter than what it should have been, which is
if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) continue;
but hey, it was easy.
Two things resulted.
First, a bad precedent was set. A lot of other lazy programmers introduced bugs by making the same simplification. Actual files beginning with periods are often skipped when they should be counted.
Second, and much worse, the idea of a "hidden" or "dot" file was created. As a consequence, more lazy programmers started dropping files into everyone's home directory. I don't have all that much stuff installed on the machine I'm using to type this, but my home directory has about a hundred dot files and I don't even know what most of them are or whether they're still needed. Every file name evaluation that goes through my home directory is slowed down by this accumulated sludge.
I'm pretty sure the concept of a hidden file was an unintended consequence. It was certainly a mistake.
How many bugs and wasted CPU cycles and instances of human frustration (not to mention bad design) have resulted from that one small shortcut about 40 years ago?
Keep that in mind next time you want to cut a corner in your code.
(For those who object that dot files serve a purpose, I don't dispute that but counter that it's the files that serve the purpose, not the convention for their names. They could just as easily be in $HOME/cfg or $HOME/lib, which is what we did in Plan 9, which had no dot files. Lessons can be learned.)
WhatsApp purchase price: $19B (including $3B retention bonuses)
Times I've heard of Twitter before this week: thousands
Times I've heard of WhatsApp before this week: 2
Yet, Twitter is apparently worth 1.5 WhatsApps.
I'm currently writing device driver on Linux . I love compilers , filesystems , object files , memory management on OS and all stuffs related to them.
- Azad University of SavehBS in Software Engineering, 2008 - 2012
- AMNA Network SecuritySenior System Programmer, 2013 - present
- Amn Pardazesh KharazmiSystem progrmmer, 2012 - 2013
- NTL Operating System R&D GroupSelf Employment, 2008 - 2012
Understanding EJB argument passing -- Application Development Trends
ADT is a critical read for corporate AD and IT software management involved in corporate enterprise applications. Covering the latest enterp
Software Transactional Memory: Why Is It Only a Research Toy? - ACM Queue
Software Transactional Memory: Why is it only a Research Toy? The promise of STM may likely be undermined by its overheads and workload appl
Scaling Existing Lock-based Applications with Lock Elision - ACM Queue
Scaling Existing Lock-based Applications with Lock Elision. Lock elision enables existing lock-based programs to achieve the performance ben
Everything you ever wanted to know about C types, Part 1: What's in a type?
This article, first in a four-part series, introduces the basics of the C type system, with an overview of what it means to talk about type