What every programmer should know about...
-
Granted, our profession would benefit from increase in standards, but this is simply not realistic: What every programmer should know about memory[^] What Every Computer Scientist Should Know About Floating-Point Arithmetic[^]
There's a major difference between knowing something in and out, and being aware that there are potentially serious pitfalls and knowing when to consult a detailed reference. The former isn't overly realistic if if's something that you're not doing on a regular basis. Not knowing the latter is one of the common sources of wtfware code. Thanks for the memory article. I hadn't seen that one before, and will have to spend some quality time with it.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
They could still read them, reading is not hard.. Of course it's better if they understand it, but if they at least read those documents then even without understanding they should be more aware of possible pitfalls. Being aware of them is more important than knowing how exactly to avoid them - one could always look it up or ask someone else.
Did you even read them yourself? I suspect you did not. Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells? The entire first part (which is substantial) consists of hardware details that are utterly irrelevant to the vast majority of programmers. In fact, only those who write assembly code (or compilers - i.e. programs that write assembly code) could even potentially use detailed knowledge about the internal caching design of modern CPUs. Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
-
harold aptroot wrote:
IMO every programmer should have at least read those documents, and preferably understand most of it
I am pleasantly surprised to see the attitude, but it is just never going to happen :)
-
Christopher Duncan wrote:
people equate programming with putting up a web page
You never miss an opportunity to take a jibe on Web development?:)
Maybe because it's so epically full of failure? :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
When I started coding, back in ancient times, it was more important to understand things like memory (what do you mean 64k segments???). Failure to do so would result in some long and interesting nights with your C debugger. Today, people equate programming with putting up a web page. When your primary tools are papyrus and ink, about the only thing you need to worry about is steering clear of the Pharaoh's daughter.
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Got a career question? Ask the Attack Chihuahua!
Christopher Duncan wrote:
the only thing you need to worry about is steering clear of the Pharaoh's daughter.
Does Doug know about this yet? Someone should really let him know!
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
When I started coding, back in ancient times, it was more important to understand things like memory (what do you mean 64k segments???). Failure to do so would result in some long and interesting nights with your C debugger. Today, people equate programming with putting up a web page. When your primary tools are papyrus and ink, about the only thing you need to worry about is steering clear of the Pharaoh's daughter.
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Got a career question? Ask the Attack Chihuahua!
Yeah, but the fact that programming is becoming easier is a good thing. Maybe not for programemrs' salaries, but for society as a whole... surely a good thing.
-
They could still read them, reading is not hard.. Of course it's better if they understand it, but if they at least read those documents then even without understanding they should be more aware of possible pitfalls. Being aware of them is more important than knowing how exactly to avoid them - one could always look it up or ask someone else.
-
Granted, our profession would benefit from increase in standards, but this is simply not realistic: What every programmer should know about memory[^] What Every Computer Scientist Should Know About Floating-Point Arithmetic[^]
In my university there was a discipline called “Computer Architectures” which covered this subjects and a lot more in very deep basis. In fact this discipline was so hard that eventually some 10-15% of the students from my class failed to take this exam and had been suspended from the university.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
-
Did you even read them yourself? I suspect you did not. Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells? The entire first part (which is substantial) consists of hardware details that are utterly irrelevant to the vast majority of programmers. In fact, only those who write assembly code (or compilers - i.e. programs that write assembly code) could even potentially use detailed knowledge about the internal caching design of modern CPUs. Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
dojohansen wrote:
Did you even read them yourself? I suspect you did not.
Of course I did.
dojohansen wrote:
Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells?
No, they don't need to remember it, but they should know that it works that way (not the exact diagram and figures)
dojohansen wrote:
could even potentially use detailed knowledge about the internal caching design of modern CPUs.
Cache trashing is far to easy to get, for example with naive large-matrix multiplication..
dojohansen wrote:
Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
That is definitely true.
-
Granted, our profession would benefit from increase in standards, but this is simply not realistic: What every programmer should know about memory[^] What Every Computer Scientist Should Know About Floating-Point Arithmetic[^]
I have never heard of the first article but I have read the second article. You should notice that it is not for programmers but for computer scientists. And IMHO it should not be a very difficult reading for any comptuer scientist worth his salt. -Saurabh
-
Did you even read them yourself? I suspect you did not. Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells? The entire first part (which is substantial) consists of hardware details that are utterly irrelevant to the vast majority of programmers. In fact, only those who write assembly code (or compilers - i.e. programs that write assembly code) could even potentially use detailed knowledge about the internal caching design of modern CPUs. Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
Well said.
I didn't get any requirements for the signature
-
Granted, our profession would benefit from increase in standards, but this is simply not realistic: What every programmer should know about memory[^] What Every Computer Scientist Should Know About Floating-Point Arithmetic[^]
Nemanja Trifunovic wrote:
What every programmer should know about memory[^]
does .Net have classes to handle capacitor discharge and DRAM column de-multiplexer control, or do i have to handle this in C++ ?
-
dojohansen wrote:
Did you even read them yourself? I suspect you did not.
Of course I did.
dojohansen wrote:
Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells?
No, they don't need to remember it, but they should know that it works that way (not the exact diagram and figures)
dojohansen wrote:
could even potentially use detailed knowledge about the internal caching design of modern CPUs.
Cache trashing is far to easy to get, for example with naive large-matrix multiplication..
dojohansen wrote:
Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
That is definitely true.
harold aptroot wrote:
No, they don't need to remember it, but they should know that it works that way (not the exact diagram and figures)
Why? Why should programmers have to even know that memory is implemented in transistors? I'm sure the article contains a lot of stuff that is of great use to some programmers. But like the OP, I take issue with the sweeping generalization that every programmer needs to know this. Perhaps I'm too generous in my usage of the term, but based on my sampling of code project articles I should think there are quite a few people out there who consider themselves programmers yet wouldn't know what a NorthBridge is. Personally, I think it is in many cases far better for the compiler to worry about hardware optimizations and for the programmers to worry about maintainable, reuseable code, extensibility, economy, useability, testability, and so on. Again, the priorities are not the same for ALL programmers, but I'd say that the majority of us need not and indeed should not assume anything about the CPU caching or other hardware implementation details when coding.
-
Yeah, but the fact that programming is becoming easier is a good thing. Maybe not for programemrs' salaries, but for society as a whole... surely a good thing.
No, it's not a good thing. VB made programming easier, and it made a lot of people think they were programmers, which gave the programming profession as a whole a black eye. IMHO. Take a look at the questions being asked in the forums, and you'll see what making programming easier leads to. :)
- S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.
-
harold aptroot wrote:
No, they don't need to remember it, but they should know that it works that way (not the exact diagram and figures)
Why? Why should programmers have to even know that memory is implemented in transistors? I'm sure the article contains a lot of stuff that is of great use to some programmers. But like the OP, I take issue with the sweeping generalization that every programmer needs to know this. Perhaps I'm too generous in my usage of the term, but based on my sampling of code project articles I should think there are quite a few people out there who consider themselves programmers yet wouldn't know what a NorthBridge is. Personally, I think it is in many cases far better for the compiler to worry about hardware optimizations and for the programmers to worry about maintainable, reuseable code, extensibility, economy, useability, testability, and so on. Again, the priorities are not the same for ALL programmers, but I'd say that the majority of us need not and indeed should not assume anything about the CPU caching or other hardware implementation details when coding.
Have you ever noticed how the "programmers" who don't know how a computer even works are generally completely clueless when it comes to optimization? And don't tell me that optimization is not important, especially caching optimizations are getting more important by the day due to the growing speed gap between RAM and processors. Other optimizations are still relevant in games and other high-performance software.
-
dojohansen wrote:
Did you even read them yourself? I suspect you did not.
Of course I did.
dojohansen wrote:
Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells?
No, they don't need to remember it, but they should know that it works that way (not the exact diagram and figures)
dojohansen wrote:
could even potentially use detailed knowledge about the internal caching design of modern CPUs.
Cache trashing is far to easy to get, for example with naive large-matrix multiplication..
dojohansen wrote:
Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
That is definitely true.
I'm with you. Given a programmer who doesn't understand these subjects, even if he reads the articles and still doesn't understand them, he is better off than before he read them; now he knows he doesn't understand them. This is part of why I firmly believe that a formal education is required; the students will (should) be exposed to a lot of such information that they won't find on their own or in "Learn C# in 21 days". I also agree that not everyone should be able to give a class on such topics at the drop of a hat.
-
No, it's not a good thing. VB made programming easier, and it made a lot of people think they were programmers, which gave the programming profession as a whole a black eye. IMHO. Take a look at the questions being asked in the forums, and you'll see what making programming easier leads to. :)
- S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.
Well, it's true of anything that as it becomes easier to use some of those who do use them will be less proficient. But in my opinion it's no better blaming VB's possible* ease of use for bad programmers than it is blaming cars that are easy to drive for bad drivers. In both cases there's a grain of truth to it, but it doesn't mean the net effect is bad for everyone overall. Cars that are easy to drive enable a lot of people to get around, and VB perhaps enabled a lot of people to write macros for their spreadsheets. *) I personally find VB close to incomprehensible and think the lack of proper OOP features make it much *harder* to use than "real" programming languages. Let me be clear: I'm not talking about VB.NET here; VB.NET has little except name (for marketing reasons) in common with VB. As for the forums, I think "stupid questions", annoying as they can be, are partly a side effect of something rather beautiful: People all over the world can now take the initiative to learn a great many things, including programming, that were previously not available to so many. A bookstore or even a local library needs to have a certain number of people within a very local market interested in any particular title to be able to stock it. With the web, the playing field gets a bit more even. It's still awfully uneven, especially because of language bias (I'm no native user but was lucky enough to be born somewhere they at least taught me enough English in school that I am not too severely handicapped in this regard - with time I suppose this will be the case everywhere), but way better than it used to be. Lastly, 50 cups of coffee really is too much! Certainly if you (as I suspect) are American (due to American cup sizes, not your inability to cope with vast quantities of caffeine).
-
Maybe because it's so epically full of failure? :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Did you even read them yourself? I suspect you did not. Or do you seriously think that every programmer needs to know the circuit diagram for a 6-transistor SRAM cell? Or the capacitor charge and discharge timing of DRAM cells? The entire first part (which is substantial) consists of hardware details that are utterly irrelevant to the vast majority of programmers. In fact, only those who write assembly code (or compilers - i.e. programs that write assembly code) could even potentially use detailed knowledge about the internal caching design of modern CPUs. Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
dojohansen wrote:
In fact, only those who write assembly code (or compilers - i.e. programs that write assembly code) could even potentially use detailed knowledge about the internal caching design of modern CPUs.
dojohansen wrote:
Given how many programmers fail to grasp, not to mention make good use of, the fundamental concepts of OOP, I can think of a few things I'd recommend studying before this.
Your assumption here is that the fundamental concepts of OOP are somehow more important to producing quality software than a basic understanding of how *RAM works. IMHO, that's a dangerous assumption: just about every program written will make use of one or more types of RAM, with even programs written in the most common high-level languages still affected dramatically by the interactions between processor caches and main memory... OOP, though a common technique and a useful tool, is still considerably less fundamental. The truth of the matter is, many programmers will manage to get away without a basic familiarity with either one.
-
Have you ever noticed how the "programmers" who don't know how a computer even works are generally completely clueless when it comes to optimization? And don't tell me that optimization is not important, especially caching optimizations are getting more important by the day due to the growing speed gap between RAM and processors. Other optimizations are still relevant in games and other high-performance software.
harold aptroot wrote:
Have you ever noticed how the "programmers" who don't know how a computer even works are generally completely clueless when it comes to optimization?
No, to be honest, I haven't. I do remember one instance of the opposite; my best friend at uni (who is now a chip designer) was a highly skilled assembly programmer and he knew a few tricks to minimize the cpu cycles needed to get something done. This mattered when he wrote code for things like 4K demos (where the aim is supposedly to demo what is possible to do with 4K of code, though we all know the true aim is to show how clever the contestants are - which is fine by me), and wasted a lot of time resulting in code noone except him understood in all other instances. In my experience, which is with application programming and mostly managed code, the programmers who are clueless about optimization are those who don't know anything about the *software* at a lower level. People who have never had to allocate and deallocate memory themselves may have a hard time understanding why using a StringBuilder is so much faster than using string, for example. But above all, the problem in my experience has been that performance is not taken into consideration *early* in the process - instead, people try to optimize their way out of problems that shouldn't have existed in the first place. For example, user interfaces designed with the "browse" mentality rather than search, or that fail to restrict the amount of data that can be displayed at once (works fine in dev when you have 10 records, and not so well at the bank which has 50,000 records), cause far more problems than ineffective use of the hardware. I could go on, and I'm sure you could too, but I don't really see the point. We're talking past one another. My main point was and still is that saying every programmer needs to know a lot about hardware implementation details is going much too far. Your main point is, if I can have a shot at describing it, that such things really matter because they sometimes make a huge difference. So in a way it seems to me we're both right and mostly agree, but we're debating different aspects of the same thing.