- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
No that was probably the best thing that could have happened to him. Sometimes it's hard to actually leave a bad situation (job, marriage, whatever) and the extra bump is a blessing.
Admin
That is about how much I make although I am not an "awesome programmer".
Admin
I saw a CAPTCHA today, and it read "MORON." I thought of you.
Admin
QFT. The simple fact is that the degree indicates a higher likelihood that the candidate has a good grounding in computational theory and understands the high-level concepts.
Admin
No english speaker would know what preterit or past perfect means.
Admin
I did come across one application with client-side state, though, and I suspect it represented what in those days would have been called a "pattern." There was a single, four-character, hidden field in the top right-hand corner of the screen which was unique to each form -- and, of course, since a 3270 terminal was pretty much hardwired, impossible to hack without some fairly sophisticated equipment.
At the time, I thought this was pretty fucking stupid.
And then I discovered cookies ...
Admin
Indeed, it's a no-brainer.
I'm using Visual Studio right now to port a rather large Unix system to W2K Server 2003. Apart from the usual niggling inconsistencies, which I remember as having been in the VS gene-pool for about the last ten years, it now has one more craptastic feature:
The goddamn GUI crashes. Repeatedly. This pile of dung is just not scalable to real projects.
Of course, when it crashes, it eats everything you've done for the last few hours. I believe 1970s IDEs like emacs have a feature to ameliorate this: it's called "auto-save." In fact, now that I come to think of it, I seem to recall Word providing a similar service. Not Visual Studio, oh no.
On at least one occasion, VS2005 had the good grace to crash whilst "saving" the actual solution file. Result: one completely unusable solution file. Luckily I am minded to litter my enormous hard disk with tarred and zipped (what I'd like to do to Ballmer) files.
And to add insult to injury, when it crashes, it springs back to life ... leaving some manky bit of non-GUI "servlet" process behind. Which locks half of the files. And requires me to log out (not that I'd ever be doing anything else useful on the server, of course) in order to wipe its little bottie clean.
This is the best IDE you've ever seen or used?
I think you're using the wrong goggles.
Admin
First of all, if they can do better than "n log n," then I've got a job making quantum computers out of squeegee bottles for them.
Secondly, you're cheating. Yes, you can dump the list into an array and sort it there, followed by re-linking it, but that's not really what you're asking, and I'm pretty sure that anybody coming to the question as posed, and able to provide that answer in less than ten seconds, would be a psychotic lunatic...
Admin
I meant the minimal answer to the "how long does it take to sort" question that I'd accept is something like "sorting a list? Oh, that's n log n, everyone knows that."
There are better answers, like "well, assuming merge-sort or heap-sort, it's n log n." Or "radix sort allows order-n, but that's making some assumptions about the input data." Or "quicksort does n log n in the average case, but n^2 in the worst case." Or "quicksort used to be considered n^2 in the worst case but we can get worst case of n log n by spending extra time choosing our pivot."
I don't necessarily expect people without degrees to know big-O notation, and I'll still hire them if they have other skills and the ability to learn.
Admin
Perhaps he was looking for more depth? Personally, I'd prattle on about how nlogn doesn't capture things like sorting 100G of data in 1G of memory and how some things work best when the working set is smaller than the l2 cache, but that's just me.
Admin
Admin
Why did you bother going to school?
"n log n" isn't minutia you memorize in school. It's something you should just know. Like fire is hot.
Like I said, I don't expect people who haven't gone through degree programs to know big-O notation, and I'll still make offers if they're good. They occasionally write n^2 loops but we can deal with that. I don't hold what they were never taught against them.
And they didn't waste their parents tuition money, either.
Admin
You forgot how long it takes to do one of the most common operations done in code right after the test? If you don't know how fast the basic algorithms run in big O notation, you'll can't figure out how fast your algorithm runs, or whether a sample big O value is good or not. That's not minutia; that's inability to use a powerful tool.
Admin
I started attending college when I was 37. I was a single father raising two teenage children who lived with me. Their mother did not pay child support, and my parents did not pay tuition. I qualified for pell grants, and I earned scholarships, and I worked nights stocking a grocery store to see my way through.
Admin
And they had an OS. 3400032007013600032007024902402511131963600102
Admin
Admin
If you don't know C or assembler, you're not a coder, you're a script kiddie.
Admin
Paul Simon: "...but I'll repeat myself, at the risk of being crude..."
If he wants a hire who can quote "n log n" on demand, then he will eventually find him. If, however, he wants a high-powered coder who consistently cranks out what the project requires, and if he uses that question to weed out all comers, he will reject the best candidates. How sad for him.Admin
I'd expect someone with a CS degree and pursuing development work to know of big O notation, but I quite frankly wouldn't expect someone to know all the sort algorithms and the Big O notation of each. I would like him or her to know that you can get a generalized sort in O(n log n), and at least one algorithm for doing that, but I wouldn't necessarily expect them to recall the full gamut of algorithms presented in class.
While I don't entirely dismiss the argument that we should know all the sort algorithms and their Big O's--given that they were a major topic of our schooling--the fact of the matter is that developers in many areas shouldn't be spending much time on sorting anymore. While sorting remains a common operation in software, a strong developer should realize that common operations should be handled by common code, rather than being implemented ad-hoc.
To be fair, in some specialties the ability to recognize that a given data stream meets the requirements for an O(n) is extremely useful. However, in other areas such situations are sufficiently rare, sufficiently unreliable, sufficiently unimportant, or some combination of these that it makes sense to simply apply a good generalized sort.
For developers working in the later specialties (in particular, those dealing with business data), it makes good sense for them to implement a good sort algorithm once. In a situation like this, the developer's memory is better occupied with information relevant to the problems he or she will need to deal with regularly, rather than with sorting, which he or she will deal with once.
While I certainly think seasoning is a good think in the development field, I think slapping any arbitrary time on what it takes to become a "senior" developer is silly. Frankly, the arguments I've seen that one has "seen it all" or "done it all" over the course of ten years only serve to underline this fact. If you think you've seen and done it all, you think you'll never see or need to do anything new. What use would there be for a senior developer if all he's prime for is doing what he's already done? Either he or she has already written the software you need, or he's no longer a senior developer when something he hasn't done arrives.
None if this is meant to disparage the position of senior developers or those who hold it. My point is that the role by its nature is going to require those performing it to step outside their comfort zones--"cowboying", as it were.
Admin
Sounds like a little software company I use to work for, I will call them Littl Box Software. This is an e-mail that a fellow co worker (_anya) and I put together.
“The idea is make a modified Jenga block set and create a game based off our little software company.
We could have generic categories, some specific categories, label some of the extra pieces "upgrades"(need tons of upgrade blocks in all kinds of shapes that never really fit), "fixes", "patches", "tax updates", "custom reports", "consulting fees", etc.
The instructions for the game will not come with the game, you will find out that there are instructions after about the 50th call then you will have to request the instructions be snail mailed to you. The instructions will consist of an incomplete document riddled with mistakes, mis-spellings, grammatical errors, and pages marked "This Page Intentionally Left Blank", etc.
For custom Crystal Report Blocks; you will have to wait a period of no less than 6 months, but up to 2 years, if still not complete, wait longer! Whereas you will be charged, $250 for the license fee to use these report blocks you will not have. For an additional $700, we will provide training for creating your own custom report blocks by an unlicensed, uncertified, improperly trained professional online.
This training is on a version not supported by the manufacturer and there is no cd or book that comes with it. Upon upgrading to version 11, another fee will be involved to be determined at a later date.
The box you will receive will contain very old looking warped blocks that don’t seem to work well with other blocks, these are custom made by the owner and there is no way to play the game without them because they create the foundation and it would hurt his pride if we removed them.
If you are a female you already have lost because how could the simple minds of a female ever understand the complexities of block staking.
If for some reason you can not get the game to work you can wait 6 months and the owner will call you and explain to you how stupid you are for not being able to work this very simple design. He will show you how easy it is virtually while never stopping to give you time to understand the very simple instructions that will take 72 hours to explain. Would be 48 but he has to get some drinking time with his block builders in sometime, but don’t worry he will have one of his staff take over at 4:50 pm on Friday without leaving them any kinds of instructions on what you have spoken about.
But wait, order now and receive our custom, opaque, Tell-All Instruction Ball™ (magic 8 ball) used by our highly skilled technical support staff. This will provided you with answers in a timely manner without spending time frustrated or on hold.
The Tell-All Instruction Ball™ includes such exciting options as; "restart", "upgrade", and "rebuild". Shaking the Tell-All Instruction Ball™ will not provide you with better answers so please be gentle with it.
The only known side effect of this game is Tourettes Syndrome. Please be advised.
Thank you and have a great day!
Your local, but difficult to get a hold of, support staff! If we are a little grumpy understand our checks bounced again and we don’t feel like helping you at the moment."
…. We were very frustrated this day but this is not even half of the problems we had there, we left out requiring our customers to buy not exactly legal software, and so much more but I am sure I have given enough away.
Admin
Assholes...
That is one of the fundamental problems with our industry...
Any asshole who can write a macro can call himself or herself a programmer...
Admin
Those are skills you need in the field, obviously, and your school might have a clinic one evening to teach you this stuff. But the professors should know that tools come and go. (AFAIK, if you ever wanted to learn C at MIT -- even when it was the most popular language in the "real world" -- you had to take classes outside of the EECS department, or attend a student-run seminar.)
You have 1000 rows in your database. How long is it going to take for it to sort them? What if you have 10k rows? 100k?
I've said a few times that lots of people without degrees have very good careers. You can probably get by without it, but it's a shame that you're missing such a fundamental piece of knowledge.
That was a low-blow on my part and I apologize. Being a good father is vastly more important than big-O notation.But I think back to one of my first real-world projects. It was your basic three-tier architecture, and we noticed that the UI was opening more and more connections to the core. We asked the person writing the UI (who was a decade or two older, and who was supposedly teaching CS at the local community college) if the number of connections was bounded. He blinked a few times and said "yes." We tried again and asked "will the number of connection be below some constant? Because we're seeing 30 right now."
"Yeah, it won't be much more than that."
"Okay, so, like... no more than 50?"
"Yeah. Well, unless the user opens this page of the UI."
"Okay, so, then... no more than 70?"
"Yeah. Well, unless the user does this..."
"Can you say it'll be less than 100?"
"Maybe. I dunno."
All he needed to know was what "constant time" or "constant space" was. But he didn't. And his code reflected it.
Admin
Yeah, I wasn't looking for in-depth knowledge of all the different sorts. There were so many, but knowing that the best you can do in general is O(n log n) is a big takeaway.
Certainly it's very rare to have to write your own sort functions, although when I'm learning a new language I always try implementing quicksort. My implementation usually isn't as fast, which is a good lesson about trying to reinvent wheels.
Imagine trying to find out if a big list has any repeats. (I realize most libraries implement this for you, I'm using it as an example.) Without big-O, someone could easily do this:
You don't need to be able to write out a proof of that routine to know what's wrong with it.
Admin
This is a ridiculous statement. I no longer program in C or assembler, though I have done both, extensively. I am yet to be convinced that these are even necessary skills on a small footprint, real time (and I mean real time, not bleeding "real time Java" or MS eVC3) system.
We could argue all day about the relative "un-script-kiddiness" of C++, Java, VB.Net and C# -- in relative order of birth -- or even of Perl, Python, Ruby ... drones on and on ... but what's the point? Script kiddies, by definition, play with broken bits of javascript and PHP4 and the like that they've snarfed off the web, and then made them worse by ill-judged and ignorant decisions.
You want a real language test for "script kiddies?"
Try Lisp.
Admin
Comply with all requirements at work, but do the minimum (within ethical reason) to get it to pass the tests to "go into production." Do not burn out.
Take the real requirements off to one side and build the proper version yourself. Including documentation, test scripts, and everything. (You might have to blag licenses, I guess.)
Wait six months until the original abortion falls apart at the seams and somebody walks up to you and says something like (and I know it's not on-line Jenga, but you get the point):
Her: "I've tried pressing F6 to delete this configuration entry, but it's still there." Me: "That's because F6 doesn't do anything." Her: "Then how do I delete this configuration entry?" Me: "Look, I've got another screen over here. Want to try pressing F6?" Her: "OK. Wow, it works. And I like the way the columns have re-sorted themselves!" Me: "Great! Why don't you tell your boss about it?"
And this is how the Muff-Dive application came into being. Well, I'm not necessarily proud of it, but if you'd had to spend six months of your spare time at work rewriting an application and being forced by company policy to give it a four-letter acronym, then you'd probably pick MFDV as well.
Customer Support is great, in my opinion. And the best thing about them is that, in half-way reasonable circumstances, they rely on customer support themselves.
Otherwise they're screwed.
It's only the idiots around you in the technical and management arena that you need to worry about.
Admin
No, wait, define "fundamental."
Hang on a sec: you've already defined "Asshole."
Admin
Actually, I have confidence in this Garret guy, let me tell you anybody that has enough drive to jump in and learn has potential. Hell that's exactly how I started and I am now a Director of Development.
Admin
I know people may not trust that I'm the guy that submitted this story... that's for you to decide...
However, decide for yourself. I have posted what I ACTUALLY submitted on an anonymous blog, so people can see the real story!
http://evenworsethanfailure.blogspot.com/
I think that after seeing how things are twisted by the site authors, I will simply stop coming to this site... the stories here are not real... they are dramatically changed by the site authors to make them nothing more than fiction.
Captcha: craaazy
Youbetcha.
Admin
Who hasn't had a boss like that.
Admin
Wow.. I knew this site changed things around but I didn't think it was THAT much changed around. Just wow. I'll view anything I read here with a grain of salt from now on.
Admin
Provided v is constant, radix sort is O(n).
So, about those squeegee bottles... :p
Admin
Admin
In Dorothy Parker terms, you have so far covered the gamut from 1 to less than 100.
If I can try to summarise FredSaw's position, he appears to me to be entirely correct in stating that "someone else has done this before you." Pick the correct fucking algorithm, or library, or whatever. Not a good interview question, especially when you get the basics wrong.
Try again.It's a list.
Lists are not amenable to quickies, radices, bubblies, or whatever. You can dump them into a more sortable "container" (whatever), but they don't sort too well.
I am actually pathetic enough to think about this, and I can imagine a requirement to dump a list into an array and sort it via some variety of pivot. It's pretty contrived, though. If you want to sort it, use an array in the first place. Or a hash-table.
Sorting a list is just so not "n log n".
Sorry.
Interesting that you would fail somebody from MIT for failing to answer a stupid question, but you'd accept that from somebody who went to Podunk Community College, though.
What did you say your company name was? Times are difficult. I need to find a stock I can short.
Heh. That's so, so, far beyond this guy, Franz.Want to tell him about Knuth?
Admin
Huh? So... you're upset that you were painted as a programming amateur? The stories are the same, except Alex's is entertaining and yours reads like a disgruntled employee.
In your blog, you claim to be "very well-versed in PHP and MySQL", yet only said you had "some PHP experience" in your story. A big difference there.
What I can't figure out is how could such an experienced expert take a job for 22k?
Admin
Now go and make your momma proud.
Get a real job before you're thirty, and over the hill.
Admin
Can you do a radix sort on a list?
How often, in real terms, can you assume that v is constant?
And how would you answer anon fred's hypothetical question in an interview?
We're two-thirds of the way there. You've got the radix sort, I've got the squeegee bottles...
... All we need now is the quantum computer.
And we'll be rich! Rich, I tell you!
Well, maybe not so rich as the Belgian royal family, but that was just nasty.
We'll be rich in a good way, and I love you.
Admin
No offense, but this stuff is pretty much leaving Big O in the dust.
Admin
I lol'd when I saw this! The next time someone asks how long a report is going to take to generate, Ill be sure to tell them "O(n log n) if were lucky but it may just take O(n^2) since I didn't write the database" rather than my usual "About 30 minutes because our servers are busy fossilizing"
While I get your point, haven't we LARGELY moved on from this? Realistically, just what percentage of coders are having to write their own sorting methods (I differentiate of course between "having" and "do")? Personally I haven't HAD to write one in...10 years?
My point being, yes understanding algorithmic complexity IS essential in some roles, but for the most part performance has LONG since slipped from our fingers (for the common good IMO) whether it be to the STL, .Net or any number of third party apps/libs (and yes while OS might afford the luxury of access how often do we realistically have time to fix those problems). I cant help but think we might be largely better off if universities actually taught software "development" as well as "engineering" since I consider both to be equally valid but totally different disciplines (of course the CS majors will spit on the engineering majors who will then have the developers to spit on....much as it is now even though each bring their own bundle of tricks to the table).
What do I know though. As I once said, I cant even implement a linked list off the top of my head...(beware)
Admin
In day job I think I've never had to write own sort algo. But, surprisingly enough, I have had to write sorting algo in my "hobby" code. I'm coding C64 game (old habits die hard) and needed to sort sprites for sprite multiplexer. So I ended up writing some kind of insertion sort for it in 6502 asm :)
Admin
Admin
Visual Studio is only free if you use the crap "lite" version, or some of the really old "embedded" versions. The "lite" version is great if you're a student, or working on a hobby, but most "real" development requires a for pay version.
http://www.amazon.com/Microsoft-Visual-Studio-Standard-2005/dp/B000BT8TRQ
Admin
I'd sort of be lying if I'd say it like that though. In the spur of the moment I'd probably stick to mentioning QuickSort as being O(n log n).
Admin
My original point was that, strictly speaking, sorting a list is not O(n log n). Sure, you can transform the list. Sure, you can transform the sort back into a list. It just ain't O(n log n), though.
Now, this doesn't matter when you're dealing with a linked list of ten million or so thingies, and it doesn't matter if you have an infinite amount of memory (preferably RAM) into which you transform those thingies, purely in order to hit the celestial management goal of O(n log n).
It certainly matters if you don't have the memory.
It even (potentially) matters if you're dealing with a smaller data set, say n = 1000.
In this case, you're paying for O(n log n), plus a Kn conversion to an array (or whatever) and a Kn conversion back again. You can ameliorate this expense by allocating the array in one huge block, but you can't get away from the initial item-by-item copy -- without dicking around with pointers -- and you certainly can't get away from resuscitating a list from the sorted array.
Yes, you can write a big, spiffy, wrapper around an STL list (or non-C++ equivalent), and you can re-use the original list, since you know the sorted result will be the same size. However, this will blow up. Almost certainly.
The simple solution is to go back to the design, and replace "list" with "vector."
And, if you choose to go with a list in the full knowledge that you can always transform it into an array and back again, then that's fine. Until you have to push a new item at the front or back and sort it again. Repeatedly. I don't deal with abstractions; I deal with the real world, and collections of 1000-odd objects are quite typical. Pick the wrong data structure, and you're fucked.
But, as I say, we both seem to agree on the basics here.
Much though I hate to disparage Fred Saw, I have to say that it is definitely important that anyone you employ knows about this stuff. Fred has a list of five technologies (for want of a better word, and I'm not beating on MS here) that save him from thinking about n log n.
But do they?
How do you know?
And I'm still fascinated by the idea that whoever it was would require a (hugely) different standard of algorithmic theory from an MIT graduate rather than a street-sweeper with a junior college qualification in Access. Did he have a really bad time at MIT? This is just bizarre.
OK, I kinda forgot the radix sort thing. But I think the principle still stands.
Admin
I had a boss like this at a pizza place. These people have no souls. Empirically, even.
Admin
I expect people to live up to their opportunities.
It's much more likely that you'll find your MIT graduate is too heavy on theory and insufficient on practice, though.
Admin
PUBLISH THE COMPANY'S NAME!! PUBLISH THE COMPANY'S NAME!! PUBLISH THE COMPANY'S NAME!!
And shop them to Microsludge while yer about it!!
Admin
Ya know, I'd love to "come out" and identify myself, the company name, location, etc... but seriously when the guy canned me, he gave me a letter that pretty much threatened legal action if I did anything to him or his company... you know, your standard "thank you for bringing my company out of severe debt" type of goodbye... sigh
The guy was, and probably still is, a litigious bastard... I'd rather not risk that.
http://evenworsethanfailure.blogspot.com/2007/11/worsethanfailurecom-got-it-all-wrong.html
Admin
This may be the most insightful "X type of people" philosophy I've ever seen. Is it original? It sounds vaguely familiar to me.
Admin
This is the best comment of all. It's not about skill, knowledge or talent but really all about formal communications, especially with bosses that are not educated as programmers.
All requests are should be documented from him/her and not verbally issued. An uneducated boss can't dispute this and an educated one should be doing this because there are/will always be others that will be on the "team" and it's won't become personal and egotistical as it did in the story.
Admin
My answer would be:
When the computer thingy is finished.
Seriously. In an age of frameworks and toolsets how many times are there opportunities to write yet another sort routine? And with wide possible variances in terms of available memory, disk thrashing, the size of datasets and the actual implementation of sorting in the framework or toolset. Really is there any way to really know?
And just how useful is N log N? Any more useful than my answer? Not really.