What you also have to consider is the power expended over time, as well as the total work done.
While Ep = mgh (for small h, relative to the gravitational field),
Ek = mv^2/2.
As an object free-falls it gains velocity, and at the end of it's fall, all the energy is kinetic, or lost to friction. Ignoring friction, Ek(final)=Ep(initial), and so,
mgh = mv^2/2, or v(final)=sqrt(2gh).
An object in free-fall accelerates, and thus loses potential engergy, and gains kinetic energy.
Now, in an atmosphere, an interesting thing happens: the falling object encounters friction with the atmosphere, and the force of friction grows with the velocity of the falling object. At some point, this equals the force of gravity, and all further potential energy, is converted into friction, with the object falling at the terminal velocity. This is about 130 mph (~200kph) for a free-falling skydiver, IIRC. It's a bit of a simplification because terminal velocity is reached asymptotocally. But, the thing to note is that, at terminal velocity, no more work is converted from potential to kinetic energy in the falling object any more -- it has been extracted. An escapement mechamism serves to regulate this extraction, much like the friction of the atmosphere.
Given an object falling at terminal velocity v, in a potential field g, it passes through a height h in time h/v. The work done is mgh, in time h/v, and thus the power extracted is mgh/(h/v) = mgv.
An escapement driven by a falling object is simple, because the driving field is constant. However, an escapement driven by a spring is more interesting (like a mechanical watch), because the spring tension is a function of the square of it's displacement. Getting a watch to not run fast, when fully wound, or slow, when almost run down is an interesting exercise in mechanical engineering.
HUGE SECURITY HOLE. Which is probably why they only allow GSM-over-IP traffic over the encrypted tunnel. You don't want any sort of data being passed through your core, when you can just get by with the voice data.
Huh?
As far as I can tell, my data sessions are also are carried through the UMA VPN tunnel.
What I wanted was a means to connect to a local web server -- as long as the client browser in the phone was careful about how it interpreted content received, that should be fine. A bit of Java and Flash support could have made the phone a great universal remote control. But, going to t-mobile's servers and back to mine would probably add too much latency.
I'm about as weak as a guy can be: I can barely bench 100 lbs, squat and deadlift 150, and military press maybe 90. Girls in the gym press more than I do!
But, I can sure as hell lift 50 lbs four feet (as in put my groceries on the counter from the floor). And, there's no reason this can't be designed to use five independent weights.
I'd be more concerned that the contraption were a bit top-heavy.
If the price were right, I'd buy a bunch, though I'd like it to have a mechanism where I can turn off the light mid-fall, and stop the weights until I want to turn it on again.
UMA basically sets up an IPSec VPN to carry the VoIP traffic. If the wireless router hasn't firewalled the ports, you're golden.
Now, what I really wish is that I could use the unencrypted network the phone connects to to run it's UMA/VPN tunnel to browse, etc. It's silly to connect to the web server I have running at home, connected to my wireless router, from my phone via t-mobile's VPN. Waste of their traffic load, to boot.
But, your interview style appears to dismiss skills that are crucial to the development of solid software, and worse, your approach seems to dismiss those who have those very skills!
I'm currently struggling with someone else's code where little attention was paid to multiple uses of an object -- what should be re-initialization is one-shot initialization in a constructor. Yet, the class permits, and the greater design requires, calling various methods more than once that require this reinitialization. Never mind the static globals that should be instance variables, or that they're used before being properly set.
Clearly, this was coded to the point where it "works once", but with little regard to what the actual requirements were. Perhaps they were not stated well. But, and this is where an experienced software engineer will shine, it is little extra effort to make the code restartable, and resasonable to expect that this would be a desireable attribute, even if not explicitly required: it's something one can expect to be needed eventually, and it comes at little development cost (just moving initialization code around).
Instead, it was not done right, and when restartability was tested, it didn't work, requiring days of debugging to find out why, all the while, someone swearing up and down, that "yes, it was tested - you are using it wrong."
Well, in the end, the code does not lie.
But, an experienced and skilled software engineer would not have made that fundemental error.
I think that I get a much better view of the developers deeper understanding by looking at their code and talking to them.
I mean, anyone can make a bubble sort, just not under those circumstances.
It is a quite simple algorithm, it is just that doing it during an interview makes the applicant unnecessarily nervous, making mistake that he/she never would in a real work situation.
And yet, you can't remember how. Yes, people might make mistakes under pressure, but the kind of mistakes they make, or whether they make them at all speaks volumes. I made syntax errors in my code snippet. I know the compiler will catch them. I care more about the use of a double loop and the understanding that this implies O(n^2) performance.
It is a trivial algorithm, and if a candidate really wasn't into sorting, but was enthusiastic about the differences between intrinsic and extrinsic data structures, and wanted to discuss them, I'd be happy to let them change the subject: it takes courage to admit ignorance, and I'm willing to listen when a candidate goes out on a limb and tries to drive the interview. But, at the end of the day, asking a candidate to code a short sort routine is the "$50 question to get warmed up." It isn't an interview-killer, but if the candidate can't do it, they'd better have something else to impress me with. I've found it works well as a filter.
Perhaps you find my interview style too brutal. (Another favorite question is to ask the candidate what their favorite part of TAOCP is, or if they have a different favorite work (I rather like Alexandrescu's "Modern C++ Design".)) But, I've been on the receiving end of brutal interviews as well (think three interviewers, asking a common question, and two of them disagreeing with eachother about the merits of the solution -- the point being to examine multiple solutions all of which satisfy some, but not all, interviewers, and to speak to the merits and disadvantages of all), and they do serve to filter out those that "can" from those that "wanna". I rather like the brutal interviews because they suggest that, if hired, I won't be working with idiots.
Geniuses can appear as complete idiots in the wrong context.
Yes, but a genius will recognize when s/he is out of context, and raise the point. It might simply be that the candidate is suited for a different job: systems administrators do well to be scripting gurus, for example, but script kiddies can't write code in any serious language.
There's a flip side: a candidate might know more about a subject than the interviewer. I once was asked to describe the difference between a spinlock, mutex, and semaphore. Well, from a theoretical basis, a mutex is a semaphore with a resource count of one, and a spinlock polls on a resource with a fundemental atomic "try and lock" operation. Unfortunately, the interviewer forgot to mention that they were interested in the limitations of "spinlock", "mutex", and "semaphore" in a WinNT environment as they relate to synchronization primitives intra-process, inter-process, and inter-processor. Further, the interviewer apparently did not know that other, more general, interpretations existed. I did not get the job, and I hope they found the WinNT monkey they needed.
OTOH, I totally missed the efficient manner in which set bits could be counted in an interview, and thought I would not get hired... until I realized the solution in the cab on the way to the airport, and called back the interviewer, leaving a message as to the solution. My interest (i.e. stubbornness) in the problem, even thinking that I'd not get the job, got me hired.
It is not delta force types who can solve simple problem while under fire i am looking for.
Well, if the problem is simple, they are not "under fire".
One can abstract up design to the "30,000 foot" level all one wants, but bugs usually crop up in the most trivial of places, and an understanding of fundemental algorithms helps greatly instead of thr
I only demonstrates that the developer can make a fairly basic algorithm. Who cares
If one has not mastered the basics, one can not develop a deep understanding of how things work, and therefore can't be confident in the quality and reliability of what one produces.
It's the difference between deep understanding and shallow understanding.
Who you gonna call when that third-party sort routine is either buggy, or does not exist for the platform of your chosing? Are you going to stall a project for days before you can license one when you need it? Or, are you so confident that you'll have all your requirements known up-front? No, you'll hack a bubblesort (personally I prefer heapsort over quicksort), noting the performance effect, and unblock yourself, until you can fix it properly, if need be.
And performance always matters when you scale up. Do you want to get 15% more TPS out of each server, and charge the client 15% more, or sell the client 15% more servers at the same profit margin? Do not confuse performance metrics with diminishing returns.
Yes, a software engineer has to have many skills, not the least of which is knowing how to compromise beteen conflicting constraints. But, at the end of the day, I wanna see them show me that they can code.
As for code developed on one's "leasure time", that usually belongs to one's current employer anyway.
Tell me, how do you count the number of bits set in a 32-bit word? Do you shift, mask, and add to a running counter 31 times, or do you mask 10 times, shift five times, and add five times, in place? Do you shift in a loop, or unroll it? Which code impacts your processor cache the least? It's a simple thing, but can account for a 33% improvement in performance in a very fundemental operation in some applications (20 ops vs 32+). 33% is nothing to sneeze at, when it means you can save $1 on your CPU or on your power budget in a cell phone.
I know, you can "subcontract it out". How can you tell if the subcontracter you hire is any good?
Methinks Donald Knuth would be saddened at the state of the art in software development these days. People used to care about this stuff, and be very efficient about it in the process.
I already responded in general to this, but the more I read what the parent wrote, the more I think it is exemplary of the type of blase incompetence seen in the field, among those who have not risen to the state of the art by understanding the work of those who have come before them, but rather, who plod along, putting togeth "bits that seem to fit".
That's a harsh criticism, and deserves a point by point analasys. So, here goes:
Well, I haven't written a sort algorithm since I went to university, which is something like 13 years ago. Why would I?
Perhaps you need one in a pinch on some small embedded system? Even if not, you should understand the different ways that data can be sorted so you can pick the appropriate implementation for the job.
I haven't used Big O-notation since then either, since most do not understand it.
This is the "I'm surrounded by ignorami, and therefore I can be ignorant myself" line of reasoning. It is important to understand the performance (in terms of memory use and CPU-cycles) of one's code, and Big-O notation is a convenient, universally accepted way of doing so. Learn (and teach) the lingua franca of computer science and algorithm analysis.
And it is not very often it is either practically applicable or economically viable to put that much effort into detailed code optimization.
This misses the point entirely! No, it is not. But, it is vital to understand the performance of one's code, how it can be optimized, the cost of that optimization, and then weighing it against the expected benefits. The parent effectively argues, "it's hard to optimize, so we shouldn't bother." At the same time, the parent likes pre-canned routines (so s/he does not have to code their own sort, for example), which reduce the implementatio-effort of some optimizations, making them trivial.
I would probably not be able to even make a correct bubble sort algoritm on the first try using pseudocode without the possibility of trying out my code, and I would probably not get the notation right either.
A bubble sort is the most trivial sort there is:
int x[MAX_LENGTH];
unsigned int length; ...
for (unsigned int i = 0; i < (length - 1); i++)
for (unsigned int j = i + 1; j < length; j++)
if (x[i] > x[j]) {
int temp = x[i];
x[i] = x[j];
x[j] = temp;
}
}
This is a trivial bubble sort, of order O(n^2), and sorts integers in an array of maximum length MAX_LENGTH in non-descending order. It's quick, dirty, trivial, and generally learned at the age of 12.
Frankly, you wouldn't get penalized much for a syntax typo, as you would for an algorithmic one. The compiler catches syntax typos. Oh, and there is a boundary condition bug in the above code sample. Know what it is? I'd expect a candidate to code something like that, explain the performance AND, most importantly volunteer the boundary condition bug without having to be prompted. Such boundary condition bugs account for 95% of coding errors. We might know that length can never be zero, and so dismiss that, but it is important to catch things like that.
I'd rather look at some code that the applicant has written and thinks reflects his/her development style and then discuss it and related stuff in general.
And, where would you find this code? Most programming is "work for hire". Others own the code one writes. Unless it is GPL, or one is othewise free to share it. Far better to have the candidate write some code and talk about it.
It is quite easy to weed out the ones that only regard programming as a job and are unwilling to learn. The best of the rest are which I try to find.
"Best" is a vague term. Best, in what manner? Someone that knows Win32 cold? MFC? Socket coding? Corba? ATL? At the end of the day, the candidate will have to come up to speed on your dev team's existing idioms and designs, over and above the fram
Actually, the candidate was a recent CS graduate, with a Bachelor degree, so testing whether he has an understanding of fundemental algorithms and data structures was quite relevent to the job at hand: writing efficient code for an embedded processor with limited memory.
The sad part was that all the candidates were recent CS grads, and no others could code a simple bubble sort.
And, FWIW, I've met physicists who could do better. I remember physics students in dire need for a cross-assembler for some 6809-controlled equipment of theirs. While "we" in the computer science department had native 6809 boxes running Flex and a native assembler, the physics department was nowhere lucky enough to have "their own" development systems. I ended up writing a cross-assembler in CDC 6600 Pascal for them, so they could use it on the mainframe and download S1S9 data right to their PROM burners...
Ah! Those were the days.
While it is true that one can delegate implementation details to the workings of high-level libraries and compilers (who knows how a vtable is used to support run-time polymorphism? anyone?), all too often bugs appear because of either improper implementation at the delegated level, or a mis-understanding of it's limitations (this is thread-safe, right?).
Therefore a fundemental understanding of the basics (sorting, linked lists, doubly-linked lists, trees, boundary conditions, etc.) goes a very long way toward demonstrating how well a candidate can cope with "non-obvious" problems that will invariably arise.
And, in this biz one is always on the learning curve. Just recently I ran into some NDAddRef vs. AddRef code and was wondering, "WTF?". Sure, I knew all about component factories, and the code was clearly moddled on old Microsoft COM ideas, but ND? Non-delegating. Used to provide run-time support for delegating IUnknown methods to containing or aggregating objects that offer interfaces different from the contained object.
Now, personally, I think that delegating IUnknown::QueryInterface to containing objects stinks about as much as upcasting does, and the run-time typesafety offered is just RTTI in sheep's clothing, and tends to promote yet more open- rather than closed-coding styles, but sometimes one is stuck making lemonade out of lemons.
The important thing is how long it takes me to grok the difference between delegated and undelegated versions of IUnknown. Someone who does not get the basics would be staring at that code and wondering "why?" for days instead of minutes.
So, know the fundementals. You never know when you'll run into someone else's mistake, and at what level that mistake exists.
I'd wager, based on the "programmer" job candidates I've interviewed over the years, that the average/.er couldn't bubble sort themselves out of a paper bag.
Over some 20 years, I met one, count 'em one candidate who correctly coded a Shell sort without blinking in an interview.
My question is basic, "Code a routine to sort a set of objects of any type of your chosing, based on a means of ordering them (comparison function). Use the language of your choice. The routine should be correct, and you be able to describe it's worst-case performance in O(n) notation. It need not be the most effective way of doing it."
Unfortunately, the candidate above made the fatal interview mistake of expounding on his personal school project "FTP server with dynamically loadable file-type handlers, based on requested file extensions" (to dynamically generate content based on extension), as a "servlet-supporting FTP server" to a different interviewer -- with a marketing backround -- who, for some reason, was trying to conduct a technical interview, when he should have been getting a feel for the candidates business sense.
This other interviewer dismissed the candidate as a fraud because "everyone knows" that web servers use servlets and ftp servers "don't".
Sadly, we had a policy where every interviewer had to "green light" a candidate for them to be hired.
And, I agree that a big, honkin' server spitting out content (wirelessly!) is a great idea -- my first thoughts were for a diskless set top box. But, then I realized that there are times when I want to take my content with me somewhere, and having it (or some of it) in that very box would be convenient -- hence the desire for a big disk there (500 GB is nite, 1TB will be better!)
Yes, external disks and remotely served content and alleviate this, but I'd rather take one box with me rather than two, and not have great demands on the setup where I'm taking it: i.e. they have a TV, or monitor, and speakers, or stereo receiver. Requiring someone else to have something I can plug my drive in is a bit of a greater requirement.
What's all that stuff about NVidia video drivers? Are proprietary drivers required? If so, ewww:-(
Surely, DRI will be required.
I realized that the "big honkin; server's" best role is TV capture: one or more capture cards in one or more MythTv backends, all co-located with cable and/or HD antenna and/or analog or MPEG2 satellite feeds.
Haven't tried running apache on it yet, or servelets, but native building isn't THAT much of a pain... yeah, it takes a couple of hours to build ALL of xorg 7.3, but it is bearable and makes turning around small changes easier.
I would think it could do the job of a light server if it isn't rendering HD video.
You could always buy a board to play with for around $350 plus the cost of a RAM stick: my setup is expensive only because of the DVDROM, big hard disk, and fancy case.
Right now, I've trimmed my install down to under 500 MB with the intention of loading it as one HUGE initramfs, with 500 MB of free RAM (well, 384k since 128k is the video arpeture). I haven't added Myth on top of that, or apache, but those are next steps.
Basically, I moved a bunch of stuff (man pages, code needed to build, other docs, obsoleted DSL stuff (like X11R6) to the hard disk in removed, build, test, extra directories, and made symlinks from the appropriate points in the root fs to them. So, I can make bits come and go with approriate mounts.
I also stripped a lot of the binaries to save some space, with the originals symlinked from a../bin.nostrip or../lib.nostrip directory to the hard disk.
Really, it runs fine from local disk, but I want to play with the option of running out of flash or ram as well.
It could easily be a net-bootable thin client, accessing content remotely, too. However, I found the idea of content on an internal drive that permits me to take the unit to a different home and hook it up for demos or entertainment very useful. Technically that doesn't make it silent, but if retrieving content remotely, the drive can always be spun down.
The appleTV is limited to 160GB hard disk (can it be expanded easily, or is it limited to a 2-1/2" drive?), and can only render 720p.(Though, I will be the first to admit that I am not going to get into the 720p/1080i battle here since the future is all 1080p or better anyway. Still, anything that can do 1080i can usually do 720p).
But, I'm curious, has anyone tried to get beyond these limits (and the DRM associated with Apple), with a linux installation? If so, it might be viable.
Geez, the Osborne I did something similar: 24x80 text screen with something like 52 characters wide displayable at once.
And, let's not forget virtual displays in X bigger than the physical display (as others have noted).
Not a bad idea, but already done. And, there are times when I'd just plain prefer the physical and logical screen resolution to match, say when I've maximized an input window for data entry.
Now, this won't come cheap: $350 for the mobo, $80 for the RAM, $250 for the hard disk, $150 for the DVD-ROM, and $150 for the case, give and take. Budget $1000.
EPIA 800 MhZ Nehemiah core on a nano_ITX mobo with 1 GB RAM, 500 GB 3-1/2" drive, and slot-loading DVD ROM in a Silverstone LC08 case.
Add an 802.11n USB dongle out the back (or traditional wired 100 Mb/s Ethernet), and you're golden.
Linux 2.6.23, alsa, xorg 7.1 with DRI, openchrome, xine --with-xvmc, and mythtv and you can render 1080i at anywhere from 40% (most streams) to (rarely) 95% (some particularly badly coded ones with lost of motion).
I just finished natively building (i.e. compiling from the sources themselves on the box itself) this starting from a stock Damn Small Linux install.
I'm trying to pare it down so it runs completely out of 512 MB RAM disk.
What's really sad is that there was a routing technology that could EASILY handle petabits of traffic, fully optically, developed by Chiaro, around 2000-2003. Hundreds of 10Gig and OC192 input lines.
Of course, timing is everything, the internet's growth rate was overestimated, and the telecom bust hit.
ONE of these routers could handle much of the North American traffic of the day.
I wonder, though, how this will effect me.
I have TWC "Business Class" cable internet service, can open any ports I want, nothing blocked, and I pay US$125/month for 10 Mb/s down, 1 Mb/s up. Makes downloading ISOs a breeze. Ironically, it was the only way I could get a static IP address in San Diego, which is what I wanted it for, not the extra download speed.
folks: people could die without these radioisotopes. additionally, the safety issue is probably something extremely circumspect
People in other countries could die, or at least more than in Canada, where the delay to get treatment far exceds the half-life of these elements.
Why Canada should care so much about others above it's own citizens boggles my mind. Would the U.S. expose it's citizens to these risks for foreigners? No. Would any other nation? No. Let them build their own damn reactor. This isn't selfish. "Selfish" is not sharing when doing so comes at little risk or cost.
When I lived there, I, as a citizen, had to wait to see a doctor. My young son, an American, just went to the head of the line, and I paid for him. See, citizens can't pay even if they want to, because it's "not fair" for those that can't afford it. Foreigners must, but boy, get first crack.
6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
If you receive it with an offer to provide source, you can redistribute it non-commercially with a copy of that same offer.
This actually caused headaches for us in a commercial venture: we wanted to distribute source, on demand only, to those we distributed object code to. But, we didn't want that right to be transferable -- we didn't want to sell 100 object copies, but provide an unlimited number of source copies. So, we ended up providing source, with object.
There are both potential civil and criminal penalties for copyright infringement, particularly if it is *willfull*. In any case, conspiring to comit a crime (which is what he might be doing in this case), is criminal.
To me, this sounds like the OP is a quite young programmer who is looking for a chance to lead a moral crusade rather than get the job done. In my experience I avoid taking on employees like that because they seem more focused on making sure everyone else follows their ethics than in doing a good job on the task at hand.
Or perhaps someone who knows that withholding knowledge of a crime makes one an accessory after the fact. Copyright infringement is criminal.
In fact, a perfectly good excuse for firing him or her would be that they engaged in criminal behavior on company time to the potential detriment of the company if they co-conspired to hide the potential infringement.
He (or she) should get an independent legal opinion on his (or her) own time and expense, and act accordingly. Most likely he will be advised to report his concern in writing, and then let it go.
There may very well be good reasons why the code can be legitimately used (e.g. permission was already obtained). But, in a shop with many people looking at code, and some new ones, it makes sense to mark such code as "used with permission" to some degree to avoid such misunderstandings in the future.
While Ep = mgh (for small h, relative to the gravitational field),
Ek = mv^2/2.
As an object free-falls it gains velocity, and at the end of it's fall, all the energy is kinetic, or lost to friction. Ignoring friction, Ek(final)=Ep(initial), and so,
mgh = mv^2/2, or v(final)=sqrt(2gh).
An object in free-fall accelerates, and thus loses potential engergy, and gains kinetic energy.
Now, in an atmosphere, an interesting thing happens: the falling object encounters friction with the atmosphere, and the force of friction grows with the velocity of the falling object. At some point, this equals the force of gravity, and all further potential energy, is converted into friction, with the object falling at the terminal velocity. This is about 130 mph (~200kph) for a free-falling skydiver, IIRC. It's a bit of a simplification because terminal velocity is reached asymptotocally. But, the thing to note is that, at terminal velocity, no more work is converted from potential to kinetic energy in the falling object any more -- it has been extracted. An escapement mechamism serves to regulate this extraction, much like the friction of the atmosphere.
Given an object falling at terminal velocity v, in a potential field g, it passes through a height h in time h/v. The work done is mgh, in time h/v, and thus the power extracted is mgh /(h/v) = mgv.
An escapement driven by a falling object is simple, because the driving field is constant. However, an escapement driven by a spring is more interesting (like a mechanical watch), because the spring tension is a function of the square of it's displacement. Getting a watch to not run fast, when fully wound, or slow, when almost run down is an interesting exercise in mechanical engineering.
Huh?
As far as I can tell, my data sessions are also are carried through the UMA VPN tunnel.
What I wanted was a means to connect to a local web server -- as long as the client browser in the phone was careful about how it interpreted content received, that should be fine. A bit of Java and Flash support could have made the phone a great universal remote control. But, going to t-mobile's servers and back to mine would probably add too much latency.
I'm about as weak as a guy can be: I can barely bench 100 lbs, squat and deadlift 150, and military press maybe 90. Girls in the gym press more than I do!
But, I can sure as hell lift 50 lbs four feet (as in put my groceries on the counter from the floor). And, there's no reason this can't be designed to use five independent weights.
I'd be more concerned that the contraption were a bit top-heavy.
If the price were right, I'd buy a bunch, though I'd like it to have a mechanism where I can turn off the light mid-fall, and stop the weights until I want to turn it on again.
UMA basically sets up an IPSec VPN to carry the VoIP traffic. If the wireless router hasn't firewalled the ports, you're golden.
Now, what I really wish is that I could use the unencrypted network the phone connects to to run it's UMA/VPN tunnel to browse, etc. It's silly to connect to the web server I have running at home, connected to my wireless router, from my phone via t-mobile's VPN. Waste of their traffic load, to boot.
No.
But, your interview style appears to dismiss skills that are crucial to the development of solid software, and worse, your approach seems to dismiss those who have those very skills!
I'm currently struggling with someone else's code where little attention was paid to multiple uses of an object -- what should be re-initialization is one-shot initialization in a constructor. Yet, the class permits, and the greater design requires, calling various methods more than once that require this reinitialization. Never mind the static globals that should be instance variables, or that they're used before being properly set.
Clearly, this was coded to the point where it "works once", but with little regard to what the actual requirements were. Perhaps they were not stated well. But, and this is where an experienced software engineer will shine, it is little extra effort to make the code restartable, and resasonable to expect that this would be a desireable attribute, even if not explicitly required: it's something one can expect to be needed eventually, and it comes at little development cost (just moving initialization code around).
Instead, it was not done right, and when restartability was tested, it didn't work, requiring days of debugging to find out why, all the while, someone swearing up and down, that "yes, it was tested - you are using it wrong."
Well, in the end, the code does not lie.
But, an experienced and skilled software engineer would not have made that fundemental error.
And yet, you can't remember how. Yes, people might make mistakes under pressure, but the kind of mistakes they make, or whether they make them at all speaks volumes. I made syntax errors in my code snippet. I know the compiler will catch them. I care more about the use of a double loop and the understanding that this implies O(n^2) performance.
It is a trivial algorithm, and if a candidate really wasn't into sorting, but was enthusiastic about the differences between intrinsic and extrinsic data structures, and wanted to discuss them, I'd be happy to let them change the subject: it takes courage to admit ignorance, and I'm willing to listen when a candidate goes out on a limb and tries to drive the interview. But, at the end of the day, asking a candidate to code a short sort routine is the "$50 question to get warmed up." It isn't an interview-killer, but if the candidate can't do it, they'd better have something else to impress me with. I've found it works well as a filter.
Perhaps you find my interview style too brutal. (Another favorite question is to ask the candidate what their favorite part of TAOCP is, or if they have a different favorite work (I rather like Alexandrescu's "Modern C++ Design".)) But, I've been on the receiving end of brutal interviews as well (think three interviewers, asking a common question, and two of them disagreeing with eachother about the merits of the solution -- the point being to examine multiple solutions all of which satisfy some, but not all, interviewers, and to speak to the merits and disadvantages of all), and they do serve to filter out those that "can" from those that "wanna". I rather like the brutal interviews because they suggest that, if hired, I won't be working with idiots.
Geniuses can appear as complete idiots in the wrong context.
Yes, but a genius will recognize when s/he is out of context, and raise the point. It might simply be that the candidate is suited for a different job: systems administrators do well to be scripting gurus, for example, but script kiddies can't write code in any serious language.
There's a flip side: a candidate might know more about a subject than the interviewer. I once was asked to describe the difference between a spinlock, mutex, and semaphore. Well, from a theoretical basis, a mutex is a semaphore with a resource count of one, and a spinlock polls on a resource with a fundemental atomic "try and lock" operation. Unfortunately, the interviewer forgot to mention that they were interested in the limitations of "spinlock", "mutex", and "semaphore" in a WinNT environment as they relate to synchronization primitives intra-process, inter-process, and inter-processor. Further, the interviewer apparently did not know that other, more general, interpretations existed. I did not get the job, and I hope they found the WinNT monkey they needed.
OTOH, I totally missed the efficient manner in which set bits could be counted in an interview, and thought I would not get hired... until I realized the solution in the cab on the way to the airport, and called back the interviewer, leaving a message as to the solution. My interest (i.e. stubbornness) in the problem, even thinking that I'd not get the job, got me hired.
It is not delta force types who can solve simple problem while under fire i am looking for.
Well, if the problem is simple, they are not "under fire".
One can abstract up design to the "30,000 foot" level all one wants, but bugs usually crop up in the most trivial of places, and an understanding of fundemental algorithms helps greatly instead of thr
If one has not mastered the basics, one can not develop a deep understanding of how things work, and therefore can't be confident in the quality and reliability of what one produces.
It's the difference between deep understanding and shallow understanding.
Who you gonna call when that third-party sort routine is either buggy, or does not exist for the platform of your chosing? Are you going to stall a project for days before you can license one when you need it? Or, are you so confident that you'll have all your requirements known up-front? No, you'll hack a bubblesort (personally I prefer heapsort over quicksort), noting the performance effect, and unblock yourself, until you can fix it properly, if need be.
And performance always matters when you scale up. Do you want to get 15% more TPS out of each server, and charge the client 15% more, or sell the client 15% more servers at the same profit margin? Do not confuse performance metrics with diminishing returns.
Yes, a software engineer has to have many skills, not the least of which is knowing how to compromise beteen conflicting constraints. But, at the end of the day, I wanna see them show me that they can code.
As for code developed on one's "leasure time", that usually belongs to one's current employer anyway.
Tell me, how do you count the number of bits set in a 32-bit word? Do you shift, mask, and add to a running counter 31 times, or do you mask 10 times, shift five times, and add five times, in place? Do you shift in a loop, or unroll it? Which code impacts your processor cache the least? It's a simple thing, but can account for a 33% improvement in performance in a very fundemental operation in some applications (20 ops vs 32+). 33% is nothing to sneeze at, when it means you can save $1 on your CPU or on your power budget in a cell phone.
I know, you can "subcontract it out". How can you tell if the subcontracter you hire is any good?
Methinks Donald Knuth would be saddened at the state of the art in software development these days. People used to care about this stuff, and be very efficient about it in the process.
That's a harsh criticism, and deserves a point by point analasys. So, here goes:
Well, I haven't written a sort algorithm since I went to university, which is something like 13 years ago. Why would I?
Perhaps you need one in a pinch on some small embedded system? Even if not, you should understand the different ways that data can be sorted so you can pick the appropriate implementation for the job.
I haven't used Big O-notation since then either, since most do not understand it.
This is the "I'm surrounded by ignorami, and therefore I can be ignorant myself" line of reasoning. It is important to understand the performance (in terms of memory use and CPU-cycles) of one's code, and Big-O notation is a convenient, universally accepted way of doing so. Learn (and teach) the lingua franca of computer science and algorithm analysis.
And it is not very often it is either practically applicable or economically viable to put that much effort into detailed code optimization.
This misses the point entirely! No, it is not. But, it is vital to understand the performance of one's code, how it can be optimized, the cost of that optimization, and then weighing it against the expected benefits. The parent effectively argues, "it's hard to optimize, so we shouldn't bother." At the same time, the parent likes pre-canned routines (so s/he does not have to code their own sort, for example), which reduce the implementatio-effort of some optimizations, making them trivial.
I would probably not be able to even make a correct bubble sort algoritm on the first try using pseudocode without the possibility of trying out my code, and I would probably not get the notation right either.
A bubble sort is the most trivial sort there is:
int x[MAX_LENGTH];
...
unsigned int length;
for (unsigned int i = 0; i < (length - 1); i++)
for (unsigned int j = i + 1; j < length; j++)
if (x[i] > x[j]) {
int temp = x[i];
x[i] = x[j];
x[j] = temp;
}
}
This is a trivial bubble sort, of order O(n^2), and sorts integers in an array of maximum length MAX_LENGTH in non-descending order. It's quick, dirty, trivial, and generally learned at the age of 12.
Frankly, you wouldn't get penalized much for a syntax typo, as you would for an algorithmic one. The compiler catches syntax typos. Oh, and there is a boundary condition bug in the above code sample. Know what it is? I'd expect a candidate to code something like that, explain the performance AND, most importantly volunteer the boundary condition bug without having to be prompted. Such boundary condition bugs account for 95% of coding errors. We might know that length can never be zero, and so dismiss that, but it is important to catch things like that.
I'd rather look at some code that the applicant has written and thinks reflects his/her development style and then discuss it and related stuff in general.
And, where would you find this code? Most programming is "work for hire". Others own the code one writes. Unless it is GPL, or one is othewise free to share it. Far better to have the candidate write some code and talk about it.
It is quite easy to weed out the ones that only regard programming as a job and are unwilling to learn. The best of the rest are which I try to find.
"Best" is a vague term. Best, in what manner? Someone that knows Win32 cold? MFC? Socket coding? Corba? ATL? At the end of the day, the candidate will have to come up to speed on your dev team's existing idioms and designs, over and above the fram
The sad part was that all the candidates were recent CS grads, and no others could code a simple bubble sort.
And, FWIW, I've met physicists who could do better. I remember physics students in dire need for a cross-assembler for some 6809-controlled equipment of theirs. While "we" in the computer science department had native 6809 boxes running Flex and a native assembler, the physics department was nowhere lucky enough to have "their own" development systems. I ended up writing a cross-assembler in CDC 6600 Pascal for them, so they could use it on the mainframe and download S1S9 data right to their PROM burners...
Ah! Those were the days.
While it is true that one can delegate implementation details to the workings of high-level libraries and compilers (who knows how a vtable is used to support run-time polymorphism? anyone?), all too often bugs appear because of either improper implementation at the delegated level, or a mis-understanding of it's limitations (this is thread-safe, right?).
Therefore a fundemental understanding of the basics (sorting, linked lists, doubly-linked lists, trees, boundary conditions, etc.) goes a very long way toward demonstrating how well a candidate can cope with "non-obvious" problems that will invariably arise.
And, in this biz one is always on the learning curve. Just recently I ran into some NDAddRef vs. AddRef code and was wondering, "WTF?". Sure, I knew all about component factories, and the code was clearly moddled on old Microsoft COM ideas, but ND? Non-delegating. Used to provide run-time support for delegating IUnknown methods to containing or aggregating objects that offer interfaces different from the contained object.
Now, personally, I think that delegating IUnknown::QueryInterface to containing objects stinks about as much as upcasting does, and the run-time typesafety offered is just RTTI in sheep's clothing, and tends to promote yet more open- rather than closed-coding styles, but sometimes one is stuck making lemonade out of lemons.
The important thing is how long it takes me to grok the difference between delegated and undelegated versions of IUnknown. Someone who does not get the basics would be staring at that code and wondering "why?" for days instead of minutes.
So, know the fundementals. You never know when you'll run into someone else's mistake, and at what level that mistake exists.
Over some 20 years, I met one, count 'em one candidate who correctly coded a Shell sort without blinking in an interview.
My question is basic, "Code a routine to sort a set of objects of any type of your chosing, based on a means of ordering them (comparison function). Use the language of your choice. The routine should be correct, and you be able to describe it's worst-case performance in O(n) notation. It need not be the most effective way of doing it."
Unfortunately, the candidate above made the fatal interview mistake of expounding on his personal school project "FTP server with dynamically loadable file-type handlers, based on requested file extensions" (to dynamically generate content based on extension), as a "servlet-supporting FTP server" to a different interviewer -- with a marketing backround -- who, for some reason, was trying to conduct a technical interview, when he should have been getting a feel for the candidates business sense.
This other interviewer dismissed the candidate as a fraud because "everyone knows" that web servers use servlets and ftp servers "don't".
Sadly, we had a policy where every interviewer had to "green light" a candidate for them to be hired.
And people wonder why so much software is crap.
And, I agree that a big, honkin' server spitting out content (wirelessly!) is a great idea -- my first thoughts were for a diskless set top box. But, then I realized that there are times when I want to take my content with me somewhere, and having it (or some of it) in that very box would be convenient -- hence the desire for a big disk there (500 GB is nite, 1TB will be better!)
Yes, external disks and remotely served content and alleviate this, but I'd rather take one box with me rather than two, and not have great demands on the setup where I'm taking it: i.e. they have a TV, or monitor, and speakers, or stereo receiver. Requiring someone else to have something I can plug my drive in is a bit of a greater requirement.
What's all that stuff about NVidia video drivers? Are proprietary drivers required? If so, ewww :-(
Surely, DRI will be required.
I realized that the "big honkin; server's" best role is TV capture: one or more capture cards in one or more MythTv backends, all co-located with cable and/or HD antenna and/or analog or MPEG2 satellite feeds.
I would think it could do the job of a light server if it isn't rendering HD video.
You could always buy a board to play with for around $350 plus the cost of a RAM stick: my setup is expensive only because of the DVDROM, big hard disk, and fancy case.
Right now, I've trimmed my install down to under 500 MB with the intention of loading it as one HUGE initramfs, with 500 MB of free RAM (well, 384k since 128k is the video arpeture). I haven't added Myth on top of that, or apache, but those are next steps.
Basically, I moved a bunch of stuff (man pages, code needed to build, other docs, obsoleted DSL stuff (like X11R6) to the hard disk in removed, build, test, extra directories, and made symlinks from the appropriate points in the root fs to them. So, I can make bits come and go with approriate mounts.
I also stripped a lot of the binaries to save some space, with the originals symlinked from a ../bin.nostrip or ../lib.nostrip directory to the hard disk.
Really, it runs fine from local disk, but I want to play with the option of running out of flash or ram as well.
It could easily be a net-bootable thin client, accessing content remotely, too. However, I found the idea of content on an internal drive that permits me to take the unit to a different home and hook it up for demos or entertainment very useful. Technically that doesn't make it silent, but if retrieving content remotely, the drive can always be spun down.
The appleTV is limited to 160GB hard disk (can it be expanded easily, or is it limited to a 2-1/2" drive?), and can only render 720p.(Though, I will be the first to admit that I am not going to get into the 720p/1080i battle here since the future is all 1080p or better anyway. Still, anything that can do 1080i can usually do 720p).
But, I'm curious, has anyone tried to get beyond these limits (and the DRM associated with Apple), with a linux installation? If so, it might be viable.
Geez, the Osborne I did something similar: 24x80 text screen with something like 52 characters wide displayable at once.
And, let's not forget virtual displays in X bigger than the physical display (as others have noted).
Not a bad idea, but already done. And, there are times when I'd just plain prefer the physical and logical screen resolution to match, say when I've maximized an input window for data entry.
Hard Drive DVD ROM Case
Other software:
0. Install DSL to hard disk, reboot, and configure
1. Upgrade (Apps->Tools) to gnu utils
2. Install gcc
3. Install zile (MyDSL) for editing convenience
4. Other software (for building natively and installation):
http://www.kernel.org/pub/linux/kernel/v2.7/linux-2.6.23.tar.bz2
ftp://alpha.gnu.org/gnu/grub/grub-1.95.tar.gz
ftp://ftp.gnu.org/gnu/bison/bison-2.4.tar.bz2
ftp://ftp.gnu.org/gnu/m4/m4-1.4.tar.bz2
http://www.oberhumer.com/opensource/lzo/download/lzo-2.02.tar.gz
http://www.zlib.net/zlib-1.2.3.tar.gz
http://www/perl.com/CPAN/src/perl-5.8.8.tar.bz2
http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2
http://ftp.gnu.org/gnu/libtool/libtool-1.5.24.tar.gz
http://xorg.freedesktop.org/archive/X11R3/src/everything/index.html
`grep bz2 index.html | sed s/^.*\.bz2\"\>// | sed s/\<.*// | sed s,^,http://xorg.freedesktop.org/archive/X11R7.3/src/everything/,`
http://gitweb.freedesktop.org?p=xorg/util/modular.git;a=blob_plain;f=build-from-tarballs.sh
http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz
http://downloads.sourceforge.net/libpng/libpng-1.2.24.tar.gz
http://www.fontconfig.org/release/fontconfig-2.5.0.tar.gz
http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.bz2
http://xcb.freedesktop.org/dist/libxcb-1.1.tar.bz2
ftp://xmlsort.org/libxslt/libxslt-1.1.22.tar.gz
ftp://xmlsort.org/libxslt/libxml2-2.6.30.tar.gz
http://xcb.freedesktop.org/dist/xcb-proto-1.1.tar.bz2
http://www.paldo.org/paldo/sources/pthread-stubs/libpthread-stubs-0.1.tar.bz2
http://www.paldo.org/paldo/sources/xau/libXau-1.0.3.tar.bz2
http://www.paldo.org/paldo/sources/xproto/xproto-7.0.11.tar.bz2
Oh, did I mention, there is no fan?
Now, this won't come cheap: $350 for the mobo, $80 for the RAM, $250 for the hard disk, $150 for the DVD-ROM, and $150 for the case, give and take. Budget $1000.
EPIA 800 MhZ Nehemiah core on a nano_ITX mobo with 1 GB RAM, 500 GB 3-1/2" drive, and slot-loading DVD ROM in a Silverstone LC08 case.
Add an 802.11n USB dongle out the back (or traditional wired 100 Mb/s Ethernet), and you're golden.
Linux 2.6.23, alsa, xorg 7.1 with DRI, openchrome, xine --with-xvmc, and mythtv and you can render 1080i at anywhere from 40% (most streams) to (rarely) 95% (some particularly badly coded ones with lost of motion).
I just finished natively building (i.e. compiling from the sources themselves on the box itself) this starting from a stock Damn Small Linux install.
I'm trying to pare it down so it runs completely out of 512 MB RAM disk.
What's really sad is that there was a routing technology that could EASILY handle petabits of traffic, fully optically, developed by Chiaro, around 2000-2003. Hundreds of 10Gig and OC192 input lines.
Of course, timing is everything, the internet's growth rate was overestimated, and the telecom bust hit.
ONE of these routers could handle much of the North American traffic of the day.
I wonder, though, how this will effect me.
I have TWC "Business Class" cable internet service, can open any ports I want, nothing blocked, and I pay US$125/month for 10 Mb/s down, 1 Mb/s up. Makes downloading ISOs a breeze. Ironically, it was the only way I could get a static IP address in San Diego, which is what I wanted it for, not the extra download speed.
I think the expression "hoist by his [i.e. Sony's] own petard" comes to mind.
People in other countries could die, or at least more than in Canada, where the delay to get treatment far exceds the half-life of these elements.
Why Canada should care so much about others above it's own citizens boggles my mind. Would the U.S. expose it's citizens to these risks for foreigners? No. Would any other nation? No. Let them build their own damn reactor. This isn't selfish. "Selfish" is not sharing when doing so comes at little risk or cost.
When I lived there, I, as a citizen, had to wait to see a doctor. My young son, an American, just went to the head of the line, and I paid for him. See, citizens can't pay even if they want to, because it's "not fair" for those that can't afford it. Foreigners must, but boy, get first crack.
A CDC Phoenix by any chance?
I had a 10 Mb CDC Hawk hooked up to an Alpha Micro computer c. 1982
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
If you receive it with an offer to provide source, you can redistribute it non-commercially with a copy of that same offer.
This actually caused headaches for us in a commercial venture: we wanted to distribute source, on demand only, to those we distributed object code to. But, we didn't want that right to be transferable -- we didn't want to sell 100 object copies, but provide an unlimited number of source copies. So, we ended up providing source, with object.
That exemption is only available for non-commercial distribution.
There are both potential civil and criminal penalties for copyright infringement, particularly if it is *willfull*. In any case, conspiring to comit a crime (which is what he might be doing in this case), is criminal.
To me, this sounds like the OP is a quite young programmer who is looking for a chance to lead a moral crusade rather than get the job done. In my experience I avoid taking on employees like that because they seem more focused on making sure everyone else follows their ethics than in doing a good job on the task at hand.
Or perhaps someone who knows that withholding knowledge of a crime makes one an accessory after the fact. Copyright infringement is criminal.
In fact, a perfectly good excuse for firing him or her would be that they engaged in criminal behavior on company time to the potential detriment of the company if they co-conspired to hide the potential infringement.
He (or she) should get an independent legal opinion on his (or her) own time and expense, and act accordingly. Most likely he will be advised to report his concern in writing, and then let it go.
There may very well be good reasons why the code can be legitimately used (e.g. permission was already obtained). But, in a shop with many people looking at code, and some new ones, it makes sense to mark such code as "used with permission" to some degree to avoid such misunderstandings in the future.