Today's lesson: don't do phone interviews when suffering from insomnia
-
Although I have accepted a position I don't start for a week or so. I had applied for a federal programming job and had a phone interview this morning. however, for the last two nights I have had terrible insomnia...not like my normal wake up five times a night, but wake up at least every 15 minutes and sometimes every five minutes. I'm so drained. So on the phone this morning I was completely stumped by these two questions: 1. When would you use a heap versus a stack? 2. When wouldn't you use OO programming? Now, i've been thinking on the second one and I had oo programming shoved down my throat in college except for FORTRAN (we used 77 in college) that I can't really think of a reason why not to use it. Can someone help me out? Not that I'm expecting a second round, but if I keep thinking about it it's just another thing to keep me up tonight.
leckey wrote:
I can't really think of a reason why not to use it.
It's not a question i'd answer that way. In absolute terms, i mean. At their lowest level, the object-oriented-ness of the software we write is entirely in how we perceive them - the processors they run on have little notion of objects. At a very high level - let's say a UML representation of your software - the objects are explicit, and fundamental to that representation... but so are the ways in which they interact. In between the two, in that wonderful area where so many of us spend our hours, we have these "languages" that let us intermingle those two portions: the "has a/is a" OO constructs and the "uses/does" procedural actions. Where exactly you stand in that range at any given point in time depends a lot on what you're trying to accomplish. For all the hype surrounding OO in the last twenty-some years, there are a fair number of things that are just plain easier to understand and represent as a sequence of actions rather than as the interactions of objects. See also: Execution in the Kingdom of Nouns[^]
---- Scripts i’ve known... CPhog 1.8.2 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
-
leckey wrote:
2. When wouldn't you use OO programming?
Other than bootstrap code, embedded systems, drivers, and the likes: You might want to use functional programming instead in cases where you have a massively parallel architecture. The reason for this is that state is only in the context of arguments and return values. You don't have to worry about race conditions, locking, deadlocks, etc. Even in that case you're still probably going to pass around objects but they will generally be immutable, and the focus will be on the functions, not the objects.
I understood
fantasista
-
I actually love the documentation process. My dad worked for The Man for over 25 years. The great thing is the benefits. When he got kicked in the eye by a horse he had to go to three hospitals and ended up with three surgeons. Total bill: over $300,000. We paid about $2000 out of pocket. Plus all those holidays! :badger:
Do you like getting reprimanded if your timesheet is submitted a couple hours late? How about being told that you can't fix a bug, or can't do something a better way? The emphasis is on everything that has absolutely nothing to do with getting the "product" out the door. It's about following very misguided, but well-meaning, set of rules, regulations, and policies that dictate a lot of what you cannot do and/or how you can't to do it (notice I didn't say "can do"!) Myself being one of those people who is very customer focused and busts his ass to keep the customer up and running with as few problems as possible, getting that job done is priority #1. I found it to be an excersize in total frustration and utter futility. I actually came within a hair of losing my job because I figured out how to fix a problem, in 1 hour, that Network Operations couldn't find a solution for in 7 months! If you like being surround by, or more importantly, working for people who are so over promoted beyond their abilities, that's the place for you! Not me...
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Although I have accepted a position I don't start for a week or so. I had applied for a federal programming job and had a phone interview this morning. however, for the last two nights I have had terrible insomnia...not like my normal wake up five times a night, but wake up at least every 15 minutes and sometimes every five minutes. I'm so drained. So on the phone this morning I was completely stumped by these two questions: 1. When would you use a heap versus a stack? 2. When wouldn't you use OO programming? Now, i've been thinking on the second one and I had oo programming shoved down my throat in college except for FORTRAN (we used 77 in college) that I can't really think of a reason why not to use it. Can someone help me out? Not that I'm expecting a second round, but if I keep thinking about it it's just another thing to keep me up tonight.
When I'm using C :P
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Although I have accepted a position I don't start for a week or so. I had applied for a federal programming job and had a phone interview this morning. however, for the last two nights I have had terrible insomnia...not like my normal wake up five times a night, but wake up at least every 15 minutes and sometimes every five minutes. I'm so drained. So on the phone this morning I was completely stumped by these two questions: 1. When would you use a heap versus a stack? 2. When wouldn't you use OO programming? Now, i've been thinking on the second one and I had oo programming shoved down my throat in college except for FORTRAN (we used 77 in college) that I can't really think of a reason why not to use it. Can someone help me out? Not that I'm expecting a second round, but if I keep thinking about it it's just another thing to keep me up tonight.
Another case is when you are doing RPC. DCOM and Corba proved that maintaning object state on the server is the ideal way to get horrible performance. Stateless message passing is a better way to go for anything where you know you are going to have high latency.
-
You seem... bitter about something.
---- Scripts i’ve known... CPhog 1.8.2 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
Shog9 wrote:
You seem... bitter about something.
or everything...
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
leckey wrote:
I had applied for a federal programming job
Why? You think you will get the job because it says "women and minorities are encouraged to apply"? *puts on asbestos flame suit*
*Opens the flap at the back of the suit and drops in a firecracker* :-D If you think you need discrimination to compete...
-
leckey wrote:
When wouldn't you use OO programming?
For bootstrap code. For embedded systems with limited memory.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
Or just where you not need it :) Basically everywhere on the functional/scripting level.
**
xacc.ide-0.2.0.57 - now with C# 2.0 parser and seamless VS2005 solution support!
**
-
Although I have accepted a position I don't start for a week or so. I had applied for a federal programming job and had a phone interview this morning. however, for the last two nights I have had terrible insomnia...not like my normal wake up five times a night, but wake up at least every 15 minutes and sometimes every five minutes. I'm so drained. So on the phone this morning I was completely stumped by these two questions: 1. When would you use a heap versus a stack? 2. When wouldn't you use OO programming? Now, i've been thinking on the second one and I had oo programming shoved down my throat in college except for FORTRAN (we used 77 in college) that I can't really think of a reason why not to use it. Can someone help me out? Not that I'm expecting a second round, but if I keep thinking about it it's just another thing to keep me up tonight.
1. When would you use a heap versus a stack? When you are about to overflow the stack. (And stack buffer over/under writes are very hard to pick up compared to heap over/under writes) 2. When wouldn't you use OO programming? Process controll software. Maths, and calculation software. Device drivers. ie, any environment where there arent any viable objects (as in entities that are self standing). Re insomnia, dont worry, just lie there with your eyes closed, in a meditative state. You will still be refreshed physically in the morning.
Truth is the subjection of reality to an individuals perception
-
When I'm using C :P
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I'll disagree with a number of the posts on this topic. One of the first projects where I did any OO design was done in C for real time control of a robotic palletizing system. It went into production in 1992 on 2 386sx16s with 1MB of memory for each cell, and a 386dx33 with 4MB for the overall controller. It is still in use today on the same hardware, with the software still only using a fraction of the memory and processing power available to it. We developed standard interfaces for the PLC communication, digital I/O, etc so that we could build additional iterations of the system and plug different hardware into the same control logic as needed. We also wrote a custom object request broker to glue everything together. It included the ability to tell an object to persist its state to the filesystem and then restart, enabling hot patching of the system.
-
*Opens the flap at the back of the suit and drops in a firecracker* :-D If you think you need discrimination to compete...
Trollslayer wrote:
If you think you need discrimination to compete...
:laugh:
Jeremy Falcon A multithreaded, OpenGL-enabled application.[^]
-
leckey wrote:
I had applied for a federal programming job
Why? You think you will get the job because it says "women and minorities are encouraged to apply"? *puts on asbestos flame suit*
Score: 1.0 (3 votes). wrote:
Why? You think you will get the job because it says "women and minorities are encouraged to apply"?
You better enjoy that computer you're sitting in front of, because at this rate it'll be the only thing you ever have in life.
Jeremy Falcon A multithreaded, OpenGL-enabled application.[^]
-
I'll disagree with a number of the posts on this topic. One of the first projects where I did any OO design was done in C for real time control of a robotic palletizing system. It went into production in 1992 on 2 386sx16s with 1MB of memory for each cell, and a 386dx33 with 4MB for the overall controller. It is still in use today on the same hardware, with the software still only using a fraction of the memory and processing power available to it. We developed standard interfaces for the PLC communication, digital I/O, etc so that we could build additional iterations of the system and plug different hardware into the same control logic as needed. We also wrote a custom object request broker to glue everything together. It included the ability to tell an object to persist its state to the filesystem and then restart, enabling hot patching of the system.
*grin* I was making a joke, but you plainly can only *simulate* OO in C.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog