Funniest IT Related Boasts You've Heard?
Karma asks: "The other day I saw a Slashdot comment which read, '[Projects] don't start getting interesting until you are dealing with Staff Years to develop them. Anything under that and you can actually keep the full design in your head'. An immodest boast, but not too funny. This made me wonder, in the macho worlds of IT and developers, what are the funniest and silliest boasts or bragging claims you've made, or heard? Tell us how they came back to haunt the overconfident."
Yeah, I can write a raytracer in a single day. /He did. It was a looooong day.
badness 10000
We have a person at our work place that once boasted that he did not have to debug his programs, they just worked. And he was completely serious. Of course what we did not tell him, but we should have, is that we found a bug in his program.
Mid-Eastern Pennsylvania Gaming Convention
Not quite a boast but -- a low-level admin at my wife's old workplace sent out this (paraphrased) email:
"I'm leaving this job to start my own network consulting firm. I'm feeling a lot of emotions right now, and here's a song that really captures them."
And he attaches a 5 meg MP3 file and sends it to hundreds of people, completely sinking their mail server.
What I'm listening to now on Pandora...
Best one I've heard was from a newly-minted and very pro-MS CIO who claimed (right after Win2K first came out) that Active Directory was a much better solution for their company network (thousands of employees and dozens of offices) than the existing Novell Netware/NDS.
They went through half a dozen consulting firms before firing the CIO and everyone else involved in the project...
The Campus network services at a Jr. College I went to a few years ago: "Yes we do know our ass from a router."
This of course was after a quick nmap found everything running telnet. Which was also running without a password. Turn dhcp off on a few of those babies and somone has to work a Looonng night.
There is nothing wrong with being gay. It's getting caught where the trouble lies.
Of course there are disputes as to whether this was actually said or not, or the context...but certainly one of the funniest and most famous tech boasts.
"Good code is self-documenting."
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
(Yeah, I know.. he didn't really say it. It's funny. Laugh.)
"I started using Gentoo on the desktop and now I've rolled it out as a production server using some great technologies: ReiserFS, RAID-5, Gentoo patched kernel, Samba ... you name it."
heard once per interview
I'm not sure I see the reas...oh, waitaminute, I see it! Fortunately code is self documenting obviously implies that you're working on a COBOL system.
Top 12 Things A Klingon Programmer Would Say
12. Specifications are for the weak and timid!
11. This machine is a piece of GAGH! I need dual processors if I am to do battle with this code!
10. You cannot really appreciate Dilbert unless you've read it in the original Klingon.
9. Indentation?! -- I will show you how to indent when I indent your skull!
8. What is this talk of 'release'? Klingons do not make software 'releases'. Our software 'escapes' leaving a bloody trail of designers and quality assurance people in its wake.
7. Klingon function calls do not have 'parameters' -- they have 'arguments' -- and they ALWAYS WIN THEM.
6. Debugging? Klingons do not debug. Our software does not coddle the weak.
5. I have challenged the entire quality assurance team to a Bat-Leth contest. They will not concern us again.
4. A TRUE Klingon Warrior does not comment his code!
3. By filing this SPR you have challenged the honor of my family. Prepare to die!
2. You question the worthiness of my code? I should kill you where you stand!
1. Our users will know fear and cower before our software. Ship it! Ship it, and let them flee like the dogs they are!
The friendliest digital photography forums on the net!
He was right. HE didn't have to debug his programs. He had you for that.
- For the complete works of Shakespeare: cat
I've never missed a cover sheet on my TPS reports!
Direct away from face when opening.
Thats a good one.
The funniest boast I ever heard was a guy at a computer game shop. I was looking at the games and this guy started talking to me. After chatting about games for a bit, he started telling me about how he had obtained the full Windows 2000 source code, made some changes, and compiled a special version that played his games better.
15 years Java experience... when Java's not that old. I've seen a number of cases like those on resumes, using technology for longer than it was around for.
In the case of Java, no, they weren't working for Sun while it was being developed.
-beaker
Life is too short for COBOL
Jamey Kirby
"I've been posting on Slashdot since before there was moderation, or even user accounts. No man, it's true! I even have a low, three-digit UID, to prove it. I swear, man!"
"Flyin' in just a sweet place,
Never been known to fail..."
Must have at least 5 years expirence.
I see that on resumes all the time. So I put them in front of a white board and ask them to show me the code to add an item to a singly linked list, using the language of their choice.
1 out of 15 pass. It's pathetic.
Can you pass this test? Post a link to your resume, we are hiring in the East Bay, California. C#.
The Vulcan computer science directory has determined that the existence of programming bugs is impossible.
It's obvious: I'm a gamer, and I use Linux on the desktop. Saw some clown on the web claiming that crap.
Jesus was all right but his disciples were thick and ordinary. -John Lennon
I overheard a salesdroid touting that their support line offered 24/7 support, Monday-Friday 8am to 8pm.
INsigNIFICANT
I often hear Linux & Unix admins talking about their tremendous uptime. I regard these people as a little unwise and arrogant, more concerned with meaningless bragging numbers instead of focusing on the stability of the system.
Lately, I inherited [1] a surviving dotcom [2] with 20 unix computers. The
Of course, 2 months after the previous Unix admin quits, power goes out on a couple power strips at the AT&T Datacenter [3] and I need to restart the computers.
The OS comes up fine, but the init scripts for the Apache, Java App server, and misc. servers were all hosed, and I had to investigate each one and restart all of the important services on all machines. This turned a 5 minute downtime into a 2 hour downtime... AT 3 IN THE FUCKING MORNING!
Screw your uptime, test your startup scripts. Distaster recovery is more important.
[1] I was hired, then the parent company laid a bunch of people off. Fuck me!
[2] Not surviving any more! Fuck me!
[3] Top of the line reliability, yeah right.
94% of Repubs and 21% of Dems voted to renew the Patriot Act
Higher up boss was complaining why the project wasn't being done the wau he just suddenly came up with.
Low-level boss, who had fought to do it that way for months and was shot down by this higher up boss only to do it the current way, says, "I can't beging to think about doing it the right way until I finish doing it the wrong way... poorly."
Wheeeee
Just trust me it will work.
:-)
Well most of the time I am right anyway
2) We don't need to test it!
3) Requirements? What are those?
4) We're a level 5 organization!
5) We'll save money using window's Outlook
6) Extreme Programming
7) Cleanroom.
Strangely enought, it isn't.
ntoskrnl.exe is.
Kernel32.dll is the user-mode public interface to the basic kernel functionality.
Time flies like an arrow. Fruit flies like a banana.
I guy who just took an SQL intro class blurted out in the middle of a meeting, "Can't you take your system and rewrite it all in [just] SQL so that it is only a few lines?"
And then another time someone claimed that they could make something 1/2 the original code size by rewriting it in Lisp. I gave them a code example to try it on, but they made some vague excuses and changed the subject.
Somewhat related, the C2 wiki has an interesting "alarm-bell phrases" list to help detect when big claims are about to be stated:
http://www.c2.com/cgi/wiki?AlarmBellPhrases
Table-ized A.I.
One manager at my work boasted that his group's code didn't have any bugs in it. Whenever a bug was assigned to his group, he would reassign it elsewhere. Seriously! When challenged on it he would get very insulted.
Then one day a bug he reassigned got fixed. The root cause was code that the manager had written back in that distant two week period when he actually touched code. Rather than tell him who wrote it, the other managers talked about the "really lame" coding error. We he got all righteous about the bug as well, they told him he wrote it.
Don't blame me, I didn't vote for either of them!
macro snobol?
Hahaha. That is the best one yet. Where did you hear that one; from some retard in an interview?
Jamey Kirby
I once heard a guy in an electronics shop talk to a customer about how he was already recieving training about the Pentium 8 processor. This was when the first Pentium CPU's were just available!
Had a pretty hard time not laughing in this guy's face, though I probably should have done so in hindsight.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Of course it was a long day. A day is 86400 seconds, and a short can only hold 65536. Duh.
I was told that I had to set up the server to include the cwd in the path so that students didn't have to always type ./a.out
Later I was asked if I hade done it and the conversation went something like this:
boss: did you get that done?
me: Yep, students group is all set up.
boss: only the students?
me: Well I figured the staff should know to change their own path.
Fastduke
There was a ten year old in my intro to CSE class who'd already written an ada compiler. That'll kill your self-esteem.
... I hacked the school network once. It's not exactly hard. I used a website I wrote in C++. My monitor's way faster than yours and my CPU's made my GeForce.
I had a 13 year old kid tell me "I know everything about computers". I grinned, and sold him a modem for his mom's computer.
I work for a Tin-Pot Telco which looks after a mere 100,000 telephone lines and a few thousand DSL customers.
My Boss is quoted to have said: "What, Why are http://www.cisco.com messing us around? We are their BIGGEST customer!"
You can imagine the looks that such a comment would stir up.
Me: Were are your error handlers? You didn't write a single one...
He: My programs are error free! I don't need no error handler.
Me: *baffled*
itanium will kill the RISC server market.
itanium was the first mass-market 64-bit processor.
64-bit is not required on the desktop.
People are waiting for itanium before they move to 64-bit.
itanium is the fastest processor in the world.
itanium is the industry standard 64-bit architecture.
itanium is an open standard. Other 64-bit processors are proprietary.
Next year, itanium will be the biggest-selling 64-bit processor.
Windows NT is more advanced than UNIX.
Linux can't do everything Windows can.
Windows NT will kill UNIX.
Windows is faster than Linux.
Next year, everyone will be running itanium servers running 64-bit Windows.
Windows NT is portable.
Stick Men
Me (code reviewing): Were are your error handlers? You didn't write any...
He: My programs don't have errors. I don't need no error handlers...
Additional note: He wrote a VB6 app that had to do alot of file access
> 24/7 support, Monday-Friday 8am to 8pm.
There's a legend at Microsoft of an employee who bumped into Bill Gates in the parking lot.
"Going home already?" Asks Bill.
"Sure. I've done my 12 hours."
"Ah, so you only work half-time?"
Had an error when posting it... didn't know it came trough... posted another version
"If you can do it, it ain't braggin"
Why would anyone ever use a linked list?
I use them all the time.
They cause memory fragmentation, screw up your cache
Certainly a disadvantage. But there are ways around memory fragmentation.
dd two pointers of overhead per item (quite possibly in a different memory location from the data),
If the link pointer is part of the data structure, then it's only one extra pointer in the same memory location as the data. If you're using inheritence, an array will need pointers as well.
The main problem with an array is that it is not dynamic. If you wantto remove an item from the middle, you have to copy all the other data backwards, which is a lot slower than simply removing a link. An arbitrary number of items can be added to the end of it which you cannot do with an array. You could use a vector perhaps, but you'll stil have gaps if you delete an item from the middle.
I don't get it, is it supposed to be impossible to game under linux? If the gamer in question is basically just playing the few games that are actually ported to linux, it would not be difficult at all. And for Windows-only games, you can still run the games fine using WineX in many cases. I run Warcraft 3 just perfectly with WineX. I can not tell the difference from playing it under Windows. This is not a boast, I simply used WineX and it worked.
Or was it an attempt at +3 funny?
I know its a stretch for the topic, but:
- it is a boast
- it is IT-related (in a way)
/* MAGIC THEATRE
ENTRANCE NOT FOR EVERYBODY
MADMEN ONLY */
> Why would anyone ever use a linked list?
me@mybox:/usr/src/linux$ find . | xargs grep -Is LIST_HEAD | wc -l
720
-- thalakan
A short can hold values from -32768 to 32767. You meant an unsigned short day.
It's easier than you might think to fall into this kind of trap. If you are strong at writing expressions and flow of control type statements, you may have a much lower defect rate for things like 'off by one' than many programmers. This can lead to an illusion of invincibility.
The problem is that so many bugs come from the interfaces between different program modules and (worse yet) systems.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
I used to be responsible for a number of Shiva LANRover dialin boxes.
When Shiva started to sell their VPN boxes, a guy from Shiva came and presented them to me, my boss and a few others.
The most important feature about the Shiva VPN boxes was that they where the only one in the market that could actually talk to boxes from other vendors...
I worked for a company that had never even considered doing peer review before an Indian (not the Native American type) was overheard bragging about how for the last two years, he had written all of his variable names in Hindi and that they wouldn't dare fire him now. He was half right. They didn't fire him at that point, but for the next six months, he had to go to daily meetings with his three tiers of bosses to show the work he had done in translating the variable names back to English.
Problem solved, right? Not really. While he was translating some files to English, he was also busy translating others to Hindi. Right before he was put back on a project, his new "work" had been discovered because, again, he was overheard bragging about how they would never fire him. This time they cut his pay by $20 an hour for the duration of the repairs, locked him out of the version control software to prevent any more damage, and the day after he finished, there was a total peer review of every file he had ever worked on. Once the day long meeting was over, he was asked to stand up in front of everyone and told by the VP of engineering that he was fired.
The bad thing is that the company still doesn't believe in peer reviews, but it's a good company to work for because it is almost impossible to get fired.
------
There's a fine line between cuddling and holding someone down so they can't get away.
it doesn't mean that they use it.
it just means that AN "EXPERT PROGRAMMER" should be able to do it, would you hire a so called expert programmer if he couldn't do a linked list?
besides.. arrays are neat and all.. if you're not adding stuff afterwards(built in stuff that's essentially linked lists and whatnot count as linked lists too..).
world was created 5 seconds before this post as it is.
I plead the fifth!
"Derp de derp."
> Now tell me, how big should my array be?
You can use paged allocation to grow the array, as you add the items. If you use realloc, there will be no copying involved, as it will simply extend your allocated block. See vector template implementation in http://sourceforge.net/projects/ustl for an example.
Linux contains SCO source code!
"8 months to write an original engine from scratch relying upon unproven technology in a genre which we have no experience and have to radically change? Sure, sign us up."
I don't know how we did it, but we actually did hit that one. Somewhat ironically, at a previous company where the producer said "We can fix these bugs by friday" we were still slaving away 6 months later, trying to get the thing out the door.
The ______ Agenda
> But there are ways around memory fragmentation.
... plus the linking code that you would have to implement all over again. You could make the list template require a 'next' member in the data type, but that might not be acceptable.
Like what?
> If the link pointer is part of the data structure, then
> it's only one extra pointer in the same memory location as the data.
> The main problem with an array is that it is not dynamic.
> If you wantto remove an item from the middle,
> you have to copy all the other data backwards
Yes, that is true. However, most types of data do not require random element removal very often. If you need to add and remove elements in completely random locations and it is your performance bottleneck, then I would concede that you would be better off with a linked list. I would also suggest that you rethink your design. In most cases, however, addition and removal happen much less often than reading, and optimizing for reading will make your code faster. Try it and profile. You might be surprized just how little insert/remove matters.
> An arbitrary number of items can be added to the
> end of it which you cannot do with an array.
You can do paged allocation, which will create less memory fragmentation than a linked list. STL does that for its vector template. If you keep reusing your array for lists of similar length, you gain two more advantages: no memory allocation at all for the steady state condition and very good cache utilization. These are things that are very important if you use this data in a tight loop and you will never be able to get the same performance with a linked list.
I have seen several users do this recently. I wonder if the user accounts created around this time are similar until he got it right.
Ask Slashdot - google for stupid people.
Like what?
Allocate a large chunk of memory, and then allocate link structures from that. Create a linked list of unused structures. When you delete one, add it to the start of the unused list.
I would also suggest that you rethink your design. In most cases, however, addition and removal happen much less often than reading, and optimizing for reading will make your code faster. Try it and profile. You might be surprized just how little insert/remove matters.
But you're assuming that speed matters in this section. The code I'm using a linked list for is not used enough to make such optimisation neccesary. When speed matters, I use an array.
You can do paged allocation, which will create less memory fragmentation than a linked list. STL does that for its vector template.
Are you sure? I'm pretty sure the implementation I use allocates a new chunk of memory and copies.
good work!
-------------------------
A person of moderate zeal
"Yeah, they tell me I've got the best response times in the entire company. Probably helps that some of them are negative -- brings down my average."
No, he didn't invent time travel... he actually got some problems fixed before the helpdesk called him and told him to go over and fix them. So he had dang-near-zero response time on a lot of calls... and yes, some that the central-helpdesk newbies put in as being done before being started, so he had negative times.
Pity the company got hit with fraud charges and I ha... erm, he had to move west...
Well, not in two lines, but it's not too hard:It gets a little more complicated for object arrays (need to use placement new to call constructors), and I have omitted all the obvious accessor functions, but you can see that the code is pretty simple and quite doable on a job interview.
> m_Size = n * sizeof(int);
:) (or at least figured out what the units of the member variables ought to be before writing the code)
Replace with
m_Size = n;
Really should have used the preview button
A guy I knew back in 2000 at college was boasting about his turbo-nutter CD burner he got from his mom. It was supposed to be so fast as to burn a full CD in 30 seconds.
This was the same guy who, back then when CPUs weren't even running on a 133MHz bus yet (i.e. 700MHz days), that his mom had a 1.4GHz system from the government.
Then there was a different guy who in 1996 told me about hacking into a website that controlled some satellite or other and had some NSA guy come onto his computer and tell him off for doing it.
It takes all kinds.
Damien
"You use a Mac? Can that even route TCP/IP?" -- one of the tech leads where I work. Sigh.
"The objective of securing the safety of Americans from crime and terror has been achieved." -- John Ashcroft
"We are going to combine all our databases...", or "We are going to create a datamining database", otherwise known as the "One database project"
At least these people will settle for one database. I have a "Financial Analyst" in my company who wants all data in one table. No I am not kidding. So he can make queries in Access without having to do joins.
And yes I explained the concepts of normalization until I was blue in the face. Regardless, I refuse to accommodate these people.
Some famous quotes:
"If I had created indexes in my Access database, I am sure it would be just as fast as SQL Server."
"Why do you use SQL Server instead of Access?"
"The XXXX program was all me." - Overhead coming from a wannabe PHB about an application I wrote for the company. And at the time I didn't even now who this person was.
"How can I put my Access database on the web?"
Whoa, whoa, whoa, whoa, whoa, whoa, whoa, whoa, whoa, whoa, whoa, whoa. Lois, this isn't my Batman glass. - Peter
> But you're assuming that speed matters in this
> section. The code I'm using a linked list for is
> not used enough to make such optimisation
> neccesary. When speed matters, I use an array.
Ah, but code size matters too. When you don't need to make it fast, make it small (and if you need to make it fast, small is a pretty good idea too). Array code is smaller and easier to debug than linked list code. You also get the advantage of being able to look at the entire array in the debugger (priceless!). This is why I never use anything but arrays and design all my code specifically for arrays: sequential access whenever possible, no random modifications, inserts only at the end, combine any modifications into blocks, etc. This is guaranteed to get you excellent cache usage (or at least, as good as it is going to get) and I have yet to see an application where I couldn't fit such a design.
> I'm pretty sure the implementation I use
> allocates a new chunk of memory and copies.
Yes, that is correct, SGI STL implementation does just that. However, it also doubles the page size every time, so you get log2 allocations for your element adds, while a linked list gives you 2n allocations. It is possible to keep the old block, but you then have to make sure your objects can be bitwise copied (mostly means no pointers to internal variables) because there is no 'renew' and you get to use realloc. See http://sourceforge.net/projects/ustl for an STL implementation that does this.
You could suddenly hit the limit of the contiguous space above your initial allocation and bang your program performance goes out of the window as the realloc does a massive copy of one bit of memory to another... And that's assuming you can get a sufficiently large contiguous block of memory, otherwise, realloc returns NULL and you're totally screwed.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
So we got into his "secure" system by guessing his passwords. Took the most of 30 seconds.
"After I graduate, I'm going to college as a computer engineering major. I'm going to make a computer where the whole Internet is in hardware so it's faster."
"Be Happy or Die." -- AoN
> there may be no copying involved as it will extend your allocated block if possible
In the general case there is no copying involved. Most of the time when you add elements, you add them to one container at a time, so there will (usually) not be any more blocks above the one you got and it will extend indefinitely until you run out of elements. Second: if you do get a copy, you will most likely get it only once, since after that your block will be at the end of the memory space. Third: arrays do not grow indefinitely. Some elements get added, some get removed, and eventually it settles down to some steady state size after which point no memory allocation is going to happen, and steady state performance is more important than startup performance.
> hit the limit of the contiguous space above your initial
> allocation and bang your program performance goes out of the window
If you use a linked list, your performance is not too high to begin with, from two dereferences and two cache misses for every element. As for the copy, a one-time event does not impact performance in any meaningful way; it is the common-case performance that matters.
> assuming you can get a sufficiently large contiguous
> block of memory, otherwise, realloc returns NULL
> and you're totally screwed.
First of all, you are not totally screwed, because you did not assign the return value of realloc directly to your pointer (you didn't, right?). realloc will not touch the original data if it fails reallocation. However, none of this matters on Linux, where realloc never returns NULL. With the "optimistic" memory strategy you get the pointer anyway and then you get killed by the OOM killer. Of course, new does the same thing, so your linked list is no improvement.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
nice LART
Snowden and Manning are heroes.
> Your arrays might do that,
:)
Yes they do. All of them.
> But, unless thats in your specs, if you assume
> your data is going to behave nicely
And what sort of data you have that can not be made to behave nicely? Why don't you tell me what it is, and I'll see if I can figure out how an array can be used for it. Challenges are fun
> all you'll get is a program that doesn't work in corner cases
> when it doesn't. Not smart. Not good programming.
Not quite right: the program will still work in all corner cases, it will just be slower sometimes. But corner cases are, by definition,
rare, and an occasional performance hit might not even be noticable.
> Losing the original data wasn't the problem. The
problem is,
> you've got no place to put the new data, which was the
> reason you did the realloc() in the first place.
This would be true for really large datasets that approach the size of your memory. The swap might save you for a while, but after that you really would have problems. In this case it really would be a bad thing to use an array. In fact, a linked list is a really bad solution here as well. What you need is a tree of some kind, so you can search it in a reasonable time. My machine has 512M of RAM, so by the time you hit this case you'll be working with something like 250M of data, and if it is in a linked list, it will take you hours to find element 31827481 and compare it with element 9481823. With data sets this big, which are frequently modified to boot, you are dealing with a database, not any regular array. So you'll have to write a database engine to get any kind of performance out of it. This is not, of course, what I had in mind; I was talking about mundane containers in the code for sundry data you may need to run it. Usually these are a few megabytes at the most, which is more than manageable.
"Good thing we put the failover server and the offsite backup in Tower Two!"
- Some Dude, 1 WTC, 9/11/01
We once got an application from someone who claimed to know "every programming language" on his resume.
This is why I never use anything but arrays and design all my code specifically for arrays: sequential access whenever possible, no random modifications, inserts only at the end, combine any modifications into blocks, etc. This is guaranteed to get you excellent cache usage (or at least, as good as it is going to get) and I have yet to see an application where I couldn't fit such a design.
The thing I'm currently working on is a forked data structure. A list of elements, each with a data structure representing results for each year for an arbitrary number of years. So item 1 has existed since 1990, so need 14 years worth of data, item 2 has existed since 2001 so only needs 3. Item 3 has existed since 1800 so needs 204 years. I can only conceive of accessing them to add a year, delete the last year, delete the entire list, and display items (usually only looking at one item at a time, so I just iterate through a single list).
I could use vectors perhaps, but they cause a lot of overhead when you use a lot of them for small structures. Arrays will cause all the problems linked lists have, except memory fragmentation will be a bigger problem since we have inconsistently sized fragments. I possibly could create an array per year, and have a 2d array indexed by year and item ID, although I'm not 100% sure if this would work. The linked lists seem to make more sense to me.
In general, I'll use vectors or arrays. In fact, the vector template has meant that I rarely need to use a linked list.
I'll just add that even if you never use them, you should still know they exist and how to use them, especially if you claim to be an "expert" programmer.
I worked as a CNC machinist at a company when the shop leadman, while giving a tour to a prospective customer, announced that "Numetrical Control is our specialty"
Sticks and stones won't break my bones, because I'm only weakly interactive----AI
Now you're just moving the goalposts, adding arbitrarily adding searchability as a criterion in order to make your point. Sometimes you don't need searchability, just sequential access. And thats easy with linked lists, and doesn't have the overhead of building a tree.
If all you want sequential access, and none of the contiguous memory constraints of arrays, linked lists are the solution.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
and I thought ntldr had something to do with the kernal.
Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
The guys at Best Buy are worse. They'll just spout off nonsense
The best example of this was when Best Buy was selling the original blue iMac. I thought I had heard it all until I overheard a sales goon tell a potential customer, "Bill Gates had a virus on his network, the only way he could remove it was by adding an iMac".
Wow.
> You're attempting to solve any non deterministic
> decision problem, and want to save the state of
> some object/variable at each iteration. Now tell
> me, how much space am I going to need?
64K. You don't need to access the values you are storing until you are done, so you should write it to a file instead. Since file writes are expensive, buffer them through a small cache. Because you are probably CPU bound, you should allocate a buffer based on number of units you can process per bandwidth of your hard disk. Then turn on nonblocking IO and start your computation. At convenient stopping points call select to check if you can flush your buffer. If you succeed, clear the buffer and continue. This way you are maxing out both IO and CPU, are not bound by the size of the physical memory, are not a memory hog, and are crash-resistant because you conveniently checkpoint your job to storage. Then, when the job is finished, you can read however many gigabytes of data you just generated.
> How would you proceed if the corner case caused realloc() to return NULL?
In the same way you would proceed if you failed to add an element to your linked list: throw an exception. The exception should then be caught at the computation checkpoint level, the available data should be written to disk and the operation restarted.
> Sometimes you don't need searchability, just sequential access.
> And thats easy with linked lists, and doesn't have the overhead of building a tree.
It is also easy with sliding buffers, where you have no overhead at all. If you have data just pouring in and you can access it sequentially, you should break it up into manageable packets and queue them in a sliding buffer. This way it is really easy to split work between several CPUs. Also, in the common case you would be heavily using the same memory location over and over (good for cache), with never a reallocation and no copying either if you can grain it on packet size.
Andy Tanenbaum
Ok, now I will maybe sound stupid because I'm completely off-track, but I have an example where the best data structure to use would be a linked list.
If I have to get a list of files in a directory, including all the subdirectories. When I start the scan, I have no idea how many files I will have, so I can't alloc an array without either overallocating, or having to realloc several times during the scan.
I don't have to search through the results, I only have to go through it. To reduce the overhead, I could even use a single linked list instead of a double linked list.
Oh well, the structure choice all depends of what you want to do with the results after, but I do think that linked list are useful when you have no idea how many results you'll get and you know you'll have to do a lot of inserts. As long as you browse the structure with First/Next, and not indexes.
perception is reality
> representing results for each year for an
> arbitrary number of years. So item 1 has existed
> since 1990, so need 14 years worth of data, item 2
> has existed since 2001 so only needs 3. Item 3 has
> existed since 1800 so needs 204 years.
I would use the following:Because you have more items than years, the vector overhead (24 bytes in for my implementation) would be a much smaller fraction of the data. The order of item data in the year depends on whether you care more about reading or about adding. For the former, do sorted insertion at the price of a copy, for the latter add them as they come at the price of a linear search instead of binary. The advantage over linked lists is continuity of data for each year; since you probably get yearly data for all items in one batch, adding them all simply consists of a sort and copy into one array. Because yearly blocks are likely to be large, they are good candidates for being in separate files, will compress well ('cause running zlib on a linked list is hard work
> If I have to get a list of files in a directory,
> including all the subdirectories. I don't have to
> search through the results, I only have to go
> through it. To reduce the overhead, I could even
> use a single linked list instead of a double linked list.
Or you could completely eliminate the overhead by not storing the list at all, but by processing it as you read it. Take 'find', for instance: you can execute all your matches and commands on each entry without needing the entire list.
All right, so let's suppose you really do need the entire list. Will I be using a linked list to store the items then? Hell no! Paged allocation is the way to go here. Ok, so what if you need to modify other data while you are reading (like, say, if you are in a multithreaded environment where another thread is allocating memory)? Will I use a linked list then? Not exactly. I'll use a linked list of arrays to do paged allocation. Call it a habit, but my stomach turns at just thinking about allocating memory for a single item. It's just something I never do. Period. It's not a good way to deal with memory. Fragmentation, extra dereferencing, cache misses (two per element in a textbook implementation!), and total lack of access locality (not only is your element not in the cache, but you even lose the prefetch from processing the previous element), make linked lists totally unsuitable for any application. Call me a prude, but it is just something I wouldn't do to my computer.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
> Right. Except because your code needs contiguous
> memory, it throws an exception much earlier than
> the linked lists
If I were actually running out of memory on a regular basis, I would first take a good hard look at the design and reduce memory consumption by any available methods, like sliding buffers or paging out old data to disk. In any case, an out-of-memory condition is a problem for your linked list design just the same except that you might be able to slide by a little longer. The problem is, what if some user has very little memory, like, say 32M? Unless you can actively limit memory consumption of your algorithm, the program will fail whether you use contiguous memory or not.
> That may be an acceptable trade off for better performance BUT IT MAY NOT.
How about a specific example?
That's the first time in a looong time I've seen a UID lower than mine. :)
/. since before moderation and user accounts too.
Yeah, I was slow with registration. I was posting on
retrorocket.o not found, launch anyway?
he'd probably call it a Feature
it's the taking apart that counts
> A sliding buffer is fine, as long as you don't mind losing the early data.
You don't have to lose it. If you need to keep it, you can page it off to disk. Use asynchronous IO and double buffer, like you would for graphics. Fill one buffer while the other one is being written, then swap. Set buffer size to match disk performance. Sure you might block now and then, but really, if you deal with humongous amounts of data and need to keep it ALL, there is just no way to avoid using the disk.
Slashdot: News for Nerds, Stuff That Matters.
> Again, you're making completely unwarranted
> assumptions to steer the answer back to your
> unsupportable over-generalisation.
I can't help making assumptions when you have inadequately specified the problem. If you specify all your requirements I would be much better able to present a design to suit them. One suit does not fit all and different requirements may result in completely different designs.
> How do you know when and how I want the values I'm storing?
How, indeed, if you don't tell me!
> I may need them immediately in some other thread.
Then set up a sliding buffer between the threads. If you need to keep all your data and pipe it between threads, I would create a triple-buffer pipeline: one is being written to, second is being read by the "other thread", the third is being paged out to a file. This way I keep all the data, process it as it comes through, use a minimal amount of memory, which can be user-configurable to run on any machine (try that with your linked list!), can restart the computation if the computer crashes (or the user wants to turn it off for the night, like most normal people do), is limited by disk space (unlike the linked list, which is memory limited) which is always more plentiful than RAM. Another advantage is that because the data is written down as it is generated, the user can run another program to read it and visualize it, possibly adjusting the original computation without having to finish it.
Ah, someone who "Gets it", you looking for a job?
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
if you didn't count the parentheses he might be right.
In theory, one could write a language that was pure parentheses, and if we applied your rule, it would be zero lines of code, which nothing could beat. (For an example of how such a language might look, read about the "Brainfuck" experimental language.)
How much to count different language items can get sticky.
Table-ized A.I.
"and I thought ntldr had something to do with the kernal"
;-)
Not sure if you're serious or not, but I'm trying to avoid getting any real work done, so:
NTLDR is the NT boot loader. It gets loaded by the boot strap in the PBR (partition boot record, AKA boot block). It does things like present the OS choices menu, and load critical NT files using BIOS INT13 calls.
NTDETECT.COM is a low-level hardware detection routine that gets invoked by NTLDR. The details I'm fuzzy on.
NTOSKRNL.EXE contains the NT microkernel and the NT executive. Virtual memory, threads, cache, I/O scheduling, system objects, all that sort of stuff happens here.
HAL.DLL is the Hardware Abstraction Layer (of which there are several choices available). The HAL, in theory, contains the platform-specific parts of the NT core. It was more interesting when NT actually ran on more then Intel hardware. Today, mainly interesting with APM vs ACPI issues (and, I suppose, 64-bit beta releases).
SMSS.EXE is the Session Manager Subsystem. SMSS manages device names and does a lot of initialization and hardware interface work.
LSASS.EXE is the Local Security Authority Subsystem. LSA is responsible for the SAM (Security Account Manager) database, local SIDs and RIDs, and other security-related gunk.
CSRSS.ESE is the Win32 Subsystem (Client/Server Runtime Subsystem). This provides the Windows userland interface and runtime environment. This is what programs see as "Windows".
KERNEL32.DLL contains kernel interface routines, similar to the way glibc on Linux contains interfaces to Linux syscalls.
GDI32.DLL is the user-mode portion of the Graphics Device Interface, which handles low-level drawing primitives (like X11, but without the network bits).
USER32.DLL is the user-mode portion of the Windows GUI (kind of like an X11 toolkit plus a window manager).
WIN32K.SYS is the kernel-mode portion of the Win32 subsystem and libraries (including parts of the GDI and GUI).
WINLOGON.EXE generates the logon dialog box and handles logins, obviously.
EXPLORER.EXE is the current default Windows GUI shell (desktop icons, task bar, file manager).
And finally, SOL.EXE and WINMINE.EXE are the two most important programs on the system, of course.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
"Additional note: He wrote a VB6 app that had to do alot of file access"
;-)
Well, that's one error right there....
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
Not if it involves moving to California (I like CA, I just don't want to move).
Anyway, I see the validity of the question because I end up interviewing a lot of people with "real world" programming experience, often self-taught, or people with math or business degrees who "took some programming classes". Many of these people can be sharp coders, but they often have never taken any formal CS classes in algorithms, data structures, discrete math, etc. It's not uncommon for these people to be able to write thousands of lines of workmanlike code, but get a deer in headlights look when someone starts talking about n-Trees, graph traversals, doubly-linked lists, etc.
I haven't used pointers in so long, I would have to look up some of the syntax (embarassing as that may sound), but I know I could sketch out the algorithms for pointer-based linked lists quickly. I designed an electric tracing module for our product that creates an n-tree of conductor segments that is transformed into a binary tree (child-child-* -> child-sibling) with full parenting with three electical phases represented by different sets of linkages and all stored as a sorted array of structures (where the pointers are actually array indices). To trace up or down a circuit, you can do a binary search for the start segment, then quickly walk the tree up or down by phase. This design made me real appreciative of my algorithms and data structures classes (and the textbooks for them that I still had on my bookshelf).
-- stream of did I lock the front door consciousness
> No, you over generalised the solution, and have
> been continually attempting to weasel your way out
> of it by making specific assumptions that favour you.
The way I see it is: I came up with a good solution and have been continually attempting to figure out why you find it unacceptable. So far I have been unsuccessful, and received nothing but insults for my trouble. Thank you very much!
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
I suppose nobody was bothering to ask how to get programs that aren't called a.out??
Then again, if you can't set the path you'll never notice anyway.
Lost at C:>. Found at C.
Why would anyone ever use a linked list?
You want a specific example? Okay, the kernel process queues. These are linked lists that store information about which process is waiting on what: there's a queue for processes that are waiting for a CPU to become free, a queue for processes that are waiting for activity on a filehandle (for example, all the preforked web servers waiting on the accepting filehandle), etc.
They cause memory fragmentation
You can use a free list of processes, or have the processes in an array and just link them onto the queues as needed without pulling them from the array.
screw up your cache
I have no idea how you come to that conclusion
add two pointers of overhead per item (quite possibly in a different memory location from the data)
The link field is in the process data structure, so it's one pointer per item, and always in the same location as the data.
are slow to access thanks to all that dereferencing
Ah, that's a big deal there. For example, the run queue is a sorted list. You almost always pull elements off from the head. Moreover, you put elements on in the middle, sorting on their PRI.
If the run queue were implemented as an array, you'd have to move stuff on every insert. If you're smart, you're putting the soonest-run process at the end, so you don't have to move everything when you delete. But now you're also having to track the length so you can find the last one, instead of just having a pointer straight to the element you're about to access (ie, the head).
Also, you can move processes between queues quickly. When a SYN comes into your HTTP socket, you can move one of the preforked processes from the accept queue to the run queue by changing a few pointers, instead of having to do laborious copies of array chunks.
In general, arrays are good for indexed access, and changes at the end. But they suck at changes in the middle. They also don't let you walk a list as it's changing, at least, not as easily as a linked list does. Also, linked lists let you very easily move items between multiple lists. There's lots of reasons to go one way or another. You implied that you've read Knuth; I find it surprising that you didn't pick up that there are different structures for different needs.
This is just one example; there's many others. Don't make sweeping assumptions about what the right data structure is in all cases. If the interviewer tells you to write a linked list, then write a linked list; don't argue that no-one would ever use a linked list.
> Given an array of 1000000 large elements
:)
Look who's making assumptions now!
> how would you insert an new element in the middle? > How would you remove an arbitrary element.
For large datasets you should not be using a simple array. The key to performance is narrowing your scope and keeping your elements in a linked list 1000000 links long is not a solution. It is an atrocity. When you have this much data, the rule is to break it up! Put it in a B-tree. Put it in a file and create an index so you would only load what you need. Pipe it through a sliding buffer. But whatever you do, do NOT put it in a linked list! Do NOT keep it all in memory! Not everyone has 4G of RAM. Not everyone likes to see memory hog programs that occupy all the RAM they do not need.
One guy I worked with: "No, I'm not sure what the requirements of this program are, and I don't really know the programming language. I just code until it works."
-- I have monkeys in my pants.
Now Montana had no broadband back then, or not much, so I thought I had him dead to rights when I said, "Mister, there's no way in hell you're downloading [CD-ROM worth of data], that'd take days over dialup..."
But he was ready for me, and he said, "Yeah, it's been going for about a week, and it's one of the reasons I never reboot."
I laughed, of course, chuckling along with him. To this day I have no idea if he was for real or not.
My ex-manager:
"I've written a lot of applications in MS ASP with VBScript."
"I couldn't sleep one night so I wrote (crappy web app with absurdly grandiose name)."
In this world nothing is certain but death, taxes and flawed car analogies.
Didn't Al Gore claim he invented the internet?
Gimme that booze you little pumpkin pie hair cutted freak!
real 0m0.308s
user 0m0.308s
sys 0m0.001s
Timings for linked list:
real 0m12.746s
user 0m12.685s
sys 0m0.006s
Array insertions are 40 TIMES FASTER! The vector class for this implementation uses paged allocation with realloc.
(On 2proc Athlon MP 1GHz, Debian Linux SMP)
With 100000 items:
Timings for array:
real 0m10.701s
user 0m10.691s
sys 0m0.004s
Timings for linked list:
real 6m41.403s
user 6m40.089s
sys 0m0.167s
Conclusion: NEVER USE LINKED LISTS!
> Given an array of 1000000 large elements, how
> would you insert an new element in the middle?
I have written a sample program to test insertion in the middle of an array (paged allocation and copy to shift) as compared to the same operation on a linked list. Arrays win by a factor of 40: here
I was doing support for one of our applications, and the the customer was reporting that our app couldn't start up. The error was unable to resolve host, the name of the database server. Among other suggestions, I said
Normally, our support team reads these and rewrites if necessary. This time, they didn't, they cut & paste.The reply was:
Whoops.dominionrd.blogspot.com - Restaurants on
with 4 employees.
Thanks to both gowan and Chemisor, You have both argued an interesting issue.
The bottom line is that there are some problem domains that linked lists work well for, and some that do not. The interesting thing is that I would probably go and rewrite at least one of my linked list applications and benchmark my results to see if the list is viable, I suspect not.
It is strongly dependant on application domain, some applications run for months and memory fragmentation is an issue and they do run on huge systems with huge amounts of data stored in memory, again it would be interesting to benchmark the results of a change in these cases.
It is always about benchmarking the specific solution one against the other. It is my suspicion that if data addition is major portion of the work and data access is minimal then the linked list would probably win, if access is a major part then arrays would probably win.
Generalisations are generally bad as Gowan has pointed out.
You had a comment recently that got modded up to +5 so I happened to see it. I happened to notice the low UID. Then I happened to notice the obfuscated email address, and idly I typed into google (the right way) for no particular reason. Stumbled across your resume ...
Let me interject: I have no idea why I was wandering down this path. I am not stalking you.
Anyway, saw your resume and there it was: Adams Road, Martinsville, NJ. I grew up in Martinsville. Hmmm, Adams Road sure sounds familiar. I look it up and ...
Dude, you're less than a mile from the house I grew up in. 2221 Brookside Drive. I lived there from ages 5 to 18, climbed those trees, played ball in that back yard, learned to bike on that street (and struggled up Stangle, and hauled ass down Vosseler), painted that garage, played in that brook, built the bestest rope swing ever in those woods, went to those schools (including BRHS East, which doesn't exist anymore apparently) and moved to Atlanta to college and never looked back.
Anyway, very freaky. Half of that town was farmland when I lived there.
One simple rule for its versus it's
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
Comment removed based on user account deletion
> list.cpp, inserting elements into the middle of a
> linked list using the STL list template:
You are not doing the same thing. I did not intend to simulate insertion exactly in the middle. If my insertion point remained the same, I could simply preallocate a hole in the vector and copy the new elements into it. So no, it does not blow a hole in my theory.
> I can look anywhere I like for counter examples,
:) I said that an array was always better than a linked list. I did not say that you should use arrays instead of all other data structures. Of course you would use classes for record data, trees for databases, and may be even *gasp* unions for some overlapping data. My point is simply that linked lists are an inferior construct and should always be replaced with something better, even if it is only a linked list of arrays for paging your element additions. As I said in another post, it makes me extremely uneasy to allocate memory for a single element, no matter what, so even when I use linked structures, they are paged linked structures like the B-tree. "Many at once" philosophy will always do better than "One at a time".
> because you said always. Thats what the arguments
> about, remember?
Do you remember?
When you're talking about arrays, lists, queues, etc. they all have their advantages and disadvantages. You're right that arrays are the most versatile and that you can use them anywhere that you'd use a list. But if you're talking about a relatively small set of data where you won't be searching for items based on their position (i.e. item number 12345) then a list can give you the same functionality and performance.
It might not be to difficult to implement the same functions using arrays, but it's still not as simple as just including a library.
Windows 95's endless installation screen
Firefox &
I interviewed a guy back in '96 I think for a VB job. The company that recommended him even flew him out from his current job in Iowa to NJ to talk to us. I was impressed...his resume was 4 pages long and talked about all the technologies he had worked on. One got the impression that this was a VB/SQL Server guru, who would be everything and more that we needed.
When I met him, he was visibly nervous, and I figured it was just the usual interview stress plus he had just flown in a snowstorm. As we were trying to get out of there ourselves (it turned out to be a *huge* snowstorm), we got down to business, and I asked him a couple of difficult VB questions that would have been winners if he could answer. Well, he couldn't.
Okay, so ask a few easier questions. Nada. I drop it down to *extremely* easy questions (max value of int in VB3, how to do arrays, etc.). Zip. My partner asked a *very* simple sql question ("how do you update a table?") and he came up blank.
Now I'm starting to really *read* his resume, instead of skimming it, and I came upon this little gem: He had put into production some huge program written in VB 4 back in 1995 (not a typo, as it also mentioned being 32-bit). I excused myself for a second, got my beta copy of VB 4 dated 1996 and returned. I dropped the disc on the table and said, in effect, that he had lied on his resume, that there was no way he could have done this and here's the proof.
He was silent and said "Please don't make me go back to Iowa." I then was able to use the famous bartender line of "Well, you don't have to go home, but you can't stay here."
That was the only person I've ever interviewed that had to be escorted out by security.
Even better...
Some years ago, my boss had a meeting with a colleague of mine about a new product. In the end he asked him how much time he needed to develop that. The guy answered "two weeks". It took him a year. We still use the "two weeks" joke to refer to never-ending projects.
Once, I was talking with my boss about how stupid some blue-collar people are when they refuse to use helmets or safety-goggles at work, just to play macho. Then I said a stupid joke about macho IT workers: "True men don't make backups". It was intended to be a joke, but some weeks later we lost our entire codebase because the server disks fried. The server was managed by a different department. The guys that were in charge of nursing it didn't have any backup, in spite of THAT being THEIR job. I think my boss still shivers when he remembers that joke. I'll keep it as a motto, and never trust anyone to backup my work.
I have a lot of trouble with 'off by one' type of errors.
I used to think that I could fix that problem by studyin my code, and developin thinkin skills based on my own workin examples. I did actually think that my programming ability was dependand on that.
And then came Java to my life, and I don't need to increment my iterators.
Now I find that I can write much bigger software modules when I don't have to care about 'off-by-one' errors, and memory management!!!
That is an old issue, if you are a better programmer because you can deal easily with C's arrays, and malloc. I find those things are as useful as knowing x86 ASM. They can give you some power, but the skills required for good software development are much wider, and those are not critical and not even very important.
"We've written a client-server database system" was a MS Access application with the MDB file on a network drive - and they couldn't understand why running the app over the WAN didn't work very well.
"I've done lots of network programming" (meant that the compiler was installed on his PC's hard disk but the source code files were on a shared drive, so everytime he compiled he thought he was doing network programming)
"When you write data to a socket, TCP/IP guarantees the data will be delivered" (hmmm, and they were going to write a global trading system that's now done over $20 trillion of trades).
"We've written the most sophisticated database in existence and so you can't see the source because you'd steal our secrets" (turns out they didn't know what indices were, the whole thing had no indices on any table, and the code was crap, oh, and it was Access 2)
"Our encryption is unbreakable" (data was encoded using the string OVER_THE_TOP_ENCRYPTION which was present as plaintext in the EXE - was later changed to CUSTARDCREAMS, still present as plaintext)
"The performance test of this software running on a 4-CPU Sun machine on a 100BaseT network was invalidated because we detected a rogue packet on the network (was actually a single UDP broadcast packet of about 800 bytes every 15 minutes) and that was chewing up all the cpu time as the network stack thrashed trying to decide what to do with the data because no program was listening to that port" (that from the networking expert of the consultancy department of a global carrier)
"The smartest programmer in the world who we were going to lend you to replace 50 of your crap guys - he won't be coming over because he refuses to fly over water and we've just explained that New York is an ocean away from London" (seems he didn't know that)
"I'm such a great programmer that the code I've written here is unreadable by anyone except me - in fact if you looked at it you'd probably think it's shit code, but in fact it's just that I'm so smart" (erm, well, it was shit, and it didn't work)
Oh there are loads more, but just typing those in has made me depressed.
I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
Back in my script kiddy days I changed all the rules.ini files in C&C red alert so that all allied infantry fired tanya's handguns and their tanks blasted tesla bolts.
Still managed to beat them with the soviets though. Man that game was one sided.
May the Maths Be with you!
"I was downloading mp3s in college in 1995"
"Bullshit, Napster wasn't founded until 1999"
"Gui'fied IRC DCC: in the beginning was the commandline"
{silence}
Riiiiiiiiggggghhhhttt........
Then he followed that up with a - "You'd be surprised at how many people lie their way through that question..."
Needless to say, I refused the job offer...
If you get MSDN, you can compile a special install of any version of Windows- leaving out or including whatever you want.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
I had a similar experience while on holidays in Australia (I was looking to help my friend upgrade her PC). I was asking about if they had any video cards with an NVidia chipset (linux compatability and all), and the salesdrone walked to the shelves, pulls down an ATI Radeon, and says "I think this one should have it."
Yeah... walked out of that store in a hurry, managed not to call the saleperson an idiot to his face.
All I read so far is just child's play. I have been hearing for over three years that I will get a payrise soon before the end of the month.
Most people who boast about how smart they just aren't smart enough to realized that they're not the only smart peopl out there.
I've finally found the off by one erro
It is not that hard, I would have fired him on the spot!
Besides if you did have a source repository with versioning you could figure the original names easily. Or was it a traditional source repository without versioning.
OpenOffice.org has a lot of very old code written in german. I just babblefish the comments and variable names.
Also as pointed out you work through the program logically and rename the variables as you figure out what they do. I had a complete program with variables a b c and d, a was reused for two purposes, I had that worked out in about 2 hours, not hard really.
I think a better test would be:
"write me a linked list"
I know most people would fail this, even if you gave them all afternoon, but syntax errors aside, whatever they turned out would give good insight into their level of competence (or lack of) as a programmer.
http://request-header.info
Comment removed based on user account deletion
VAX DIBOL?
"I don't know, therefore Aliens" Wafflebox1
Who are you?
The new Number Two
Who is Number One?
You are Number Six
I am not a number - I am a free man!
Ha, ha, ha, ha....
Sigs are bad for your health.
When IBM designed the original PC, they used a 8086 (or 8088, I can't exactly remember) CPU, which supported an address space of up to 20 bits. 20 bits allows addressing of up to 1MB of RAM.
The original IBM PC was quite limited - the only storage IO device the BIOS supported was a audio cassette interface. The original BIOS didn't support FDDs or HDDs. To allow for these and other devices to be added, IBM allowed for BIOS extensions to be added, with the installation of more BIOS chips or extension cards in the ISA slots. BIOS extensions have to appear somewhere within the address space of the CPU, yet not within the same region as the system RAM. So they decided on placing that boundary between RAM and ROM Extensions at the 640KB mark.
384KB of address space (1024 - 640) for additional devices probably sounds, and probably ended up being excessive. However, bare in mind that the original IBM PC only came with 16KB of RAM. The size of both the supported RAM, and address space allocated for extention devices, probably sounded so large at the time that these limits were probably assumed to be unreachable. History has shown otherwise, probably because the IBM PC architecture was a success beyond anybody's predictions.
Bill Gates may have made the statement that "640 KB is enough for anybody". If he did, then he would have only been endorsing the 640KB barrier that IBM had decided upon, rather than being responsible for it.
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
Make sure cwd is the last entry in the path. In fact, it is actually better not to have it in there at all. Here is why.
If you put cwd as the first entry in the path, of course the shell will always look in the cwd for the program requested. This can be convenient if the user happens to name their program "ls". The shell will run "local" cwd versions of any and all system binaries.
However, if an attacker executes a bit of social engineering, they can get the user to run a program they don't intend to. That program can do some "interesting" things, like change the users password on them, without them knowing or realising.
Here is an scenario. The attacker walks up to a student not aware of social engineering tricks like this one. "Hi, can you check something for me, I've left a file called foo in /tmp, and I'd like to see if it is still there." The user goes to /tmp, and executes "ls foo", expecting /bin/ls to be executed. However, the attacker has placed an "ls" binary in /tmp, which (a) changes the users password silently to something the attacker knows, and (b) executes the real /bin/ls, giving the appearance that the only thing executed was /bin/ls.
Of course, the student's account has now been compromised. Can you imagine what would happen if that "student" was the root user in the above scenario, and had cwd in the path ?
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
Do you hear a lot of bad luggage combination jokes?
yes, except when there is no space where to extend the block too. Then the whole array is going to be copied. In the worst case, this will be every single time you try this. Also, you need an external counter for your array size. A list is much clearer than your solution. The way you do it, you turn basic assumptions on their head like: arrays have static size. Now, if I ever see a member declared as listXXX or List xxx I know what it *means*.
___
No power in the 'verse can stop me
"There are no significant bugs in our released software that any significant number of users want fixed."
In a world that is Free and Open, who needs Windows and Gates?