Then, as others have pointed out, your school doesn't sound very good.
Of course there is nothing about CS that can't be learned from reading or by experimentation. This is true of any discipline. Note that I avoid referring to books, because the most cutting edge stuff exists only in journals and proceedings, not books. But this can be said about any subject. If you're really so smart and disciplined you are able to learn everything you'd get out of a CS degree on your own, quicker, and without any formal guidance, then maybe you are right, maybe you shouldn't attend University. But I doubt that is the case. As people point out every time something like this comes up on Slashdot, there's a lot more to a University education than just knowledge of CS (or whatever your major is).
In addition to giving you some knowledge of CS, a degree should allow you to broaden your intellectual horizons a bit. You should graduate with improved problem solving skills. Hopefuly, you will also improve in areas like social skills. You will almost certainly improve your ability to communicate with others about your discipline. This isn't an easy skill to develop through books, and shouldn't be underestimated. You may think there's no big deal in being asked to prove result after result in your math and CS theory courses, but this not only stresses and hones your problem solving skills, but also your ability to communicate. Would you have the discipline to develop and write out proofs to results on your own when reading a book? Even if you did, who is going to be reading your proof and giving you feedback on your ability to communicate your ideas?
In addition to the less tangible things mentioned above, there are plenty of very tangible and practical things you can learn in a CS program. A top-notch CS graduate should be capable of designing a programming language, writing a compiler for said language, writing an operating system, writing a DBMS, or just about anything else. They should be capable of doing work which is high quality and state of the art. They should have enough software engineering knowledge to be able to handle the design, implementation, testing, etc. of all sizes of projects. They should be able to recognize when a problem cannot be solved efficiently and (usually) come up with an efficient approximation heuristic. They should be able to prove that their code is correct. They should be able to provide asymptotic performance bounds for their algorithms, and prove them. They should know how to solve mathematical problems using numerical techniques. I could go on.
Once again, I ask, do you really have the discipline to learn all these things on your own? As sure as it is possible, it is just as sure that there would be gaps left when you learn this way. And you'd still need to invest so much time that why not just spend that time working towards a degree, which represents so much more than just knowledge of your field?
Good luck trying to explain this to the Slashdot crowd.:)
It's a shame that most University computer science programs don't have a mandatory lower year introductory course on programming languages. Waterloo is supposed to be an okay CS school and I didn't learn anything about programming languages until I took an optional 4th year course (that almost nobody takes).
Err... I certainly hope you are just writing these programs for fun, and that someone is not actually paying you to waste time needlessly minimizing executable size.
I think a few responders are missing the original poster's point. Judging by the fact his email address is the fixed-point ('Y') combinator in lambda calculus notation, I assume he is a fan of functional languages. I think the point had nothing to do with things like namespaces and such. Those are implementation details that have nothing to do with the overall paradigm. You can have namespaces in a non-OO, OO, functional, logic programming or any other type of language.
In many ways I agree. Not too many programmers even know that there are other types of perfectly useful paradigms besides procedural and OO. I didn't fully appreciate this until I took a 4th year programming languages course. The theory behind some of these other paradigms is rather fundamental in nature. The pure simplicity and elegance of the lambda calculus makes it something that I think everyone should know before they consider themselves an excellent programmer. Believe it or not, this type of knowledge will be good to know in practice, especially if you're ever working on a compiler or interpreter, or designing or choosing a language for some particular application. If you are ever working on some kind of meta-language type construct to facilitate your work, you may find it invaluable to know about things like closures and such. Even for very routine tasks in an imperative or OO language, simply knowing something what higher order functions ARE and how you can implement them may make your designs easier to create and understand.
That said, in the real world you'll probably rarely use a functional language. But they are out there. Lisp-like functional languages are not uncommon as extension languages in large applications. And something like Prolog can be useful for quickly prototyping certain things. To limit yourself to OO and procedural paradigms is short-sighted I think, especially to think that one is a silver bullet. The paradigm really has little to do with the language too. There are languages like OCAML and that make it easy to program in either OO, functional, or imperative style. To say that one paradigm is best for scripting, and one is best for large applications is also limiting, I think. OO tends to work well in large applications, but there's no reason you couldn't mix it with a functional style, or use an imperative (procedural) extension language to develop certain parts, if appropriate.
I think the moral of the story is that it's good to learn and be familiar with as many different styles and languages as possible. Be familiar with the theory behind all of them as well.
What is your problem? Seriously, I am not sure where all of the contempt and vitriol comes from.
First, I was not talking about overlapped I/O(otherwise known as asynchronous or non-blocking I/O in most circles). You've completely misinterpreted my original post. See below.
Second, fibers in NT/2000 are NOT coroutines. They are similar, but they are not the same thing. You could probably turn them into true coroutines wiith a global variable and some preprocessor magic, but I haven't tried. I also know notihng about your specific scenario, I am just going by what you posted - namely, that you wanted to implement a FSM without explicitly maintaining state. That is exactly one of the problems coroutines were invented to solve. In practice you don't see them often, which is mainly because most programmers simply don't know a lot about concurrent programming. Few schools have entire courses on the subject like UW does. There are always other solutions to the problem you mentioned - e.g. using certain OO design patterns - which are often sufficient.
Since you apparently aren't interested in having a civilized conversation in this forum, I invite you to email me. Maybe things will work better through that medium. I can even give you examples of specific products I've worked on in the industry where coroutines were used. In fact, consider that a challenge. I kind of doubt you will take me up on this, as looking at your posting history shows you to be somewhat of a troll.
Maybe you should read more carefully before you are so quick resort to insults next time. That doesn't make for a good impression.
I am pretty sure I know exactly what your point was. An explicitly implemented state machine (so I said finite automaton - sue me) is indeed usually an ugly design. I make no bones about that. My point is that coroutines were invented to solve exactly this problem. You do not need the added complexity of threads. Simple coroutines also have the advantage of being easy to simulate, without the need for a true threading system. For example, using macros or function objects in C/C++. Coroutines also would normally be implemented at user-level so you also avoid polluting the kernel's scheduler with a bunch of threads that behave as one thread.
Maybe you should learn a little more about concurrent programming instead of preaching about it here if you don't know what coroutines are.
Check out Peter Buhr's excellent book (I don't think it's ever actually been published, but it's used in the undergraduate "Control Structures" course at Waterloo):
It approaches the subject from a more theoretical rather than applied point of view, but if you understand all of the concepts in this book you will have a better working knowledge of concurent programming than 99% of the programmers in the industry!
Unless you have multi-processor hardware, threads don't increase the raw processing power you have to work with. If you have multiprocessor hardward, you don't more threads than the number of processor to take full advantage of the CPU.
Strictly speaking, you are right - multiple threads doesn't increase the maximum capabilities of your computer. However, I hope you realize that in practice having multiple threads is absolutely essential to get the best performance. Without multiple threads, the only way the second sentence above holds true is if you have complete control of the hardware at the lowest level - your application is the OS - or your application NEVER has any processing it could easily do while blocked waiting for I/O operations to complete, or is completely CPU intensive and never blocks in the first place. For typical applications, though, especially anything interactive, it is simply IMPOSSIBLE to achieve the same kind of throughput with a single threaded architecture as what you would get with an appropriately designed multithreaded one.
I do agree with you that a lot of developers often use threads as if they are each going to be executed on their own CPU. Of course this is wrong. The previous poster's example of using synchronized threads to implement a finite automaton with implicit state management was particularly apalling. All that is needed for that is single threaded coroutines. Introducing the non-determinism of multiple threads is a recipe for disaster if you don't know what you're doing. One synchronization bug that never shows up on your single CPU development box is all it takes.
Anyway, I see what you're getting at, but your comment that you never need more than single thread for a single CPU is misleading, as it isn't true in many cases. In your own example, you are using multiple threads (with good reason) on what is presumably a single CPU.
This is absolutely true. If you have ever taken a macroeconomics course, you have heard of the term "competitive advantage". That is exactly how companies like Red Hat survive. It is essentially trade. This does not apply to individual, hobbyist computer users, because as a hobbyist you are not trying to make money -- spending a lot of your spare time on a problem does not reduce your income, because that time would not have generated income for you anyway.
From a brief look at the web page, this sounds awfully similar to Microsoft's Intentional Programming project, only less general, and less sophisticated (IP is designed to be able to represent many existing languages, with their differing semantics). They don't make any mention of IP in their FAQ though. Could someone who knows more about Eidola expound on the similarities and contrasts of these two projects?
Actually, it is the opposite. The Earth's rotation is slowing down. This is a known fact, and it is due to the tidal forces caused by the moon. Due to the Earth's rotation, the tidle buldge caused by the moon actually is ahead of the moon's orbit, and therefore a small component the moon's gravity acting on the earth pulls this tidal bulge back in the direction opposite the Earth's orbit. Conversely, the Earth's gravity is pulling the moon ahead in its orbit, causing the moon's orbit to drift outward. Eventually, we will lose the moon. This particular effect is has been measured with lasers (no, not giant "la-sers" on the moon, just ordinary ones here on Earth).
They are able to prove that days have been getting progressively longer through the fossil records. The rate is something like a few seconds per century or so. I do not know exactly how they can determine this by looking at fossils though. Perhaps they are able to determine the average amount of sunlight the animal was exposed to or something. I believe the solar eclipse records also confirm this.
Eventually the Earth's rotation would slow down to the point that it is no longer rotating with respect to the moon, so the moon's orbit would be synchronized with the Earth's rotation and the moon would only be visible from one side of the Earth. The Earth would still rotate with respect to the sun, but the days will be much longer, something like 50 times (IIRC) as long as they currently are. But this won't happen until something like 50 billion years in the future, by which point the Earth will have been consumed by the Sun anyway.
What do you mean "why restrain yourself to the common denominator"? I use vi (actually, vim) because I'm way more efficient in it, it's as simple as that. Emacs with vi key bindings would probably work just as well, but why bother loading that huge beast when I probably won't need most of it's features anyway? True, for large projects where you have to deal with other people's crappy code, it's good to have more of an IDE-like environment where you can view class hierarchies and such. But for me, the most important thing is to have vi-style key bindings wherever possible. That way I gain maximum efficiency.
Your paltry tuition fees only cover a fraction of your own education. They most certainly do not pay for any research that gets done!
Re:Haven't they heard of C# yet?
on
KBasic
·
· Score: 2
Umm... C# is definitely not meant as a replacement for C++. Even many of the new features in DevStudio (or.net or whatever it's being called now) are written in C++. On the other hand, the VB team at Microsoft is hardly doing anything and is underfunded. Seems like a sure sign to me.
Haven't they heard of C# yet?
on
KBasic
·
· Score: 2
I assume the goal of this project is to provide a tool similar to Microsoft's Visual Basic for Linux. Any other reason would not make sense. While it's certainly a good idea to attract developers from MS platforms, I don't think this is a very good idea now. 5 years ago, maybe, but it seems pretty clear to me that with the introduction of C#, Microsoft is intent on phasing out Visual Basic in the near future. They may not come out and say it directly, but it's pretty obvious that this is what will happen. Consider that VB7 will execute on the same runtime platform as C#, and share all of the libraries, including system libraries, GUI libraries (WFC), etc. and be able to seamlessly integrate with C# code. Moreover, most of these libraries were written in C#, not VB. Microsoft has overhauled the VB language to make it compatible with their new platform, making it pretty clear that VB will be a second-class citizen next to C#, which was designed as the central language for the new platform. If developers can use C#, a very Java-like language which is much nicer to use, to write programs for the Windows platform every bit as easily and quickly as if they were using VB, who on earth would want to use VB? Probably just people who ONLY know VB. Well, all the best developers will all be using C#, so the VB code-monkeys will eventually be forced to make the switch.
Re:NBC's coverage sucks!
on
IT Olympics
·
· Score: 2
The difference in ratings between 1992 and 1996 can be mostly attributed to the time difference, and the fact the 1996 games were held in the US. At prime time in the US, it's the middle of the night in Barcelona.
I also used to stay up late running a BBS, hacking, engaging in drawn-out philosophical discussions with friends, reading, and such in high school. In fact, I was probably much like you. I had started my own business in high school, and likely could have continued that full-time, or perhaps gotten a job as a programmer. I had a lot of contempt for higher education, and, like you, thought that since I was smart and motivated enough to learn a lot on my own, it would be a waste of money to attend University. Yet I chose to go that route anyway, did very well in first year, and have now become very academics-oriented, a side of me I did not know existed. I am now very happy with the path I chose for myself, and realize how completely misinformed I was previously. To think that I might have drudged through life, never knowing what I was missing out on makes me appreciate this experience much more.
It disappoints me to read these comments on Slashdot along the lines of "I'm smart, so I don't need a University education", or "a lot of University graduates are stupid, therefore a degree is useless", etc. In my experience, this notion is incredibly wrong. I think if you are smart, that's all the more reason to get a degree! It's not about learning to code, it's not about getting a piece of paper. Higher education is about enlightenment, appreciation, and thinking. If you are smart, you'll be a better thinkiner, and be able to better appreciate the field you are studying, leading to enlightenment. I think it's a crime to be too stubborn to take advantage of one's intellectual ability in this way -- you are cheating yourself. A large portion of the most brilliant people on this planet are to be found in academia. I have had the good fortune, through attending a well-respected institution, of being exposed to some of the most brilliant minds in mathematics and computer science. I sincerely doubt that there are many people that smart in the "real world", as such a truly bright individual would simply not be able to find satisfaction in an ordinary line of work. So this begs the question: if academia is good enough for them, why isn't it good enough for you?
Regrettably, I find it difficult to put into words precisely what I am getting out of my University education. I KNOW that when I graduate, my academic accomplishments will be meaningless and insignificant to anyone else in the real world. But I take great pride and interest in them anyway. I don't feel this is born out of any psychological need to justify my chosen path. I actually disliked my first two years of University, and thought it was largely a waste of time (except for the social aspects). Had I not attained top grades, I may even have dropped out. But now I've become more comfortable with the academic life, and am beginning to find the experience more enjoyable and more rewarding as I study my field in greater depth. In fact, I wish I didn't have to stop soon in order to graduate. But when I do graduate, I know that the PROCESS of getting a degree will have made me a better person -- I already see that.
P.S. if you go into mechanical or computer engineering, as I believe you said in another message in this thread, you likely will not experience what I'm talking about. At least at my University, the engineering programs tend to be too practical, and in particular, lacking in intellectual content. You will study a broad range of subjects, but never in much depth. In my opinion, to truly get the most out of a University education, one must study some kind of art, such as philosophy or mathematics (which I would consider more of an art than a science, and computer science is essentially a branch of mathematics). I know several extremely intelligent people who have started in engineering programs, and virtually all of them have hated it. Some are struggling through and not getting much out of their university experience, whereas others have transferred to other programs and begun to enjoy it more. Engineering programs are great if you want to get a job or learn practical things, and you certainly do learn interesting things, but they are definitely not for everyone, particularly those looking to be challenged intellectually.
To return to your point, I did not get any offers of entrance scholarships either. MIT was certainly not an option. Yet I managed to put together pretty decent grades in high school, and be admitted to a University that is highly respected in its own right. Since then, I have been awarded a couple of upper year scholarships, which I didn't need because co-op jobs covered all my expenses anyway. Seriously, it sounds like you're just looking for excuses. There ARE options other than Harvard you realize, and if you have the skills to get a decent tech job right out of high school, then you certainly have the means to cover all of your school-related expenses by working during the summers. The bottom line, is that it's worth it. I would have made hundreds of thousands of dollars by now had I not attended University, but I have no regrets.
Most colleges have huge computer labs with a variety of machines. I find it hard to believe that a few of these machines can't be made available to TA's for the purposes of grading projects.
So you're saying the TA's should go to the extra work of having students specify the platform they used, sorting assignments by platform, and testing the code MANUALLY on all the types of machine used? Then what happens if the code fails to compile because the student had a slightly different environment (which could be something as simple as different paths, environment variables, etc.)? Since you've obviously completely failed to comprehend what I'm talking about, let me use a SPECIFIC example then. What if the student used Visual C++ 5.0, and the computer labs only have version 6.0 installed? Is the TA supposed to MANUALLY load the project and figure out what needs to be done to convert the project? And is he supposed to repeat this MANUALLY for HUNDREDS of assignments? How exactly do you propose to handle such situations?
Impossible? Do you honestly believe that? Have you tried? That's the reason why I posted this question. If it's so impossible (read: "highly improbable") then why is that, and what might be taken to make the improbable, possible?
Yes, I do honestly believe that. If you want to disprove my claim, then I would be happy to hear you describe how you would develop a course, with automated marking of assignments, while allowing students to use any platform and environment they choose. If your marking scripts use g++ and GNU make on Linux, then explain how you would allow students to use MS Visual C++ or Borland C++Builder without making any changes to fit the platform you run your scripts on, or testing their code on your platform. Now describe how you would extend this to work for arbitrary compilers and types of makefiles.
No matter what you come up with, I will be able to find SOME incompatibility between environments that you haven't considered that would cause a program to work on one system but fail on your marking scripts.
I think you're completely missing the point of these laws. This has NOTHING to do with forcing manufacturers to provide warranties! If they are anything like the lemon laws for vehicles, the purpose is to protect consumers from products that simply aren't what the consumer paid for. From the article:
Similar to automobile lemon laws, this bill will provide legal recourse for warranty abuses and ineffective repairs.
"Right now, PC consumers have little or no recourse when manufacturers refuse to back up their products and warranties."
Have you ever bought a car? If so you should be well aware of what the purpose of lemon laws are. ALL new cars are bought under warranty. So why do lemon laws exist for cars? Becuase it has not been uncommon for dealers and manufacturers to screw the consumer by failing to honour warranties. Or, in some cases, the quality is so poor that the same repairs need to be done over and over. The car ends up spending more time in the shop than on the road, and when the warranty expires the owner is left with a very expensive pile of metal, rubber, and plastic. Some good buying with a warranty does in those cases.
Computers are not as complicated to fix as cars, so you and I don't need this kind of protection (but I think it would be nice to have anyway). But for the average user who doesn't know much about computers, this is long overdue. Warranties only protect the consumer from the EXPENSE of fixing problems. They don't protect consumers from products that are such poor quality that the manufacturer can't/doesn't fix properly, or from abuse of the warranty.
I apologize for misinterpreting your commentary, although judging by some of the other comments in this thread, I don't think I'm the only one who thought it was motivated by an over-zealousness to advocate Linux.
Sure if you go to class and you want an easy time staying with the professor, then use the same environment that he is using, but ANSI C++ is ANSI C++ and if the professor is not teaching to the standard then that is a problem. ANSI C++ code should compile fine on any compiler from Solaris to BSD to Windows and Macintosh...
Not necessarily. The ANSI/ISO standard for C++ has been a moving target for years, and there is still a lack of standardization amongst compilers. Of course, it's getting better, and most code should compile and run the same using any modern compiler. But in every C++ compiler I've used for a reasonable period of time, I've still encountered many quirks. I speak from experience. I have even run into problems between different versions of gcc when submitting code for an assignment. Secondly, the submittor nowhere said his professor isn't teaching according to the C++ standard.
Also, if you really think telling students "you can use any environment you want, just make sure the code is ISO-compliant" is at all a feasible alternative to telling them "make sure your code compiles and runs using CodeWarrior for Windows", then you've obviously never taught or TA'ed a course before! The less explicit you are, the more students you're going to have screwing up somehow, and complaining that "it worked fine on my system". Moreover, there are things to consider outside of the language itself, such as what kind of project management to use (i.e. makefiles), libraries, etc.
Why not give students the tools and knowledge they need to work under any environment?
The choice of language is irrelevant. I would expect any half-decent honours CS program to introduce students to an imperative language, an OO language, and a functional language within the first two years. The purpose is to introduce students to these different styles of programming. Which specific languages are used hardly matters. Most likely they are using Java because it is more appealing to students, simpler than C++ (and therefore easier to teach), and appeals more to the companies that are contributing funding to the university.
University is not about "learning C". In a CS major program, there probably will be courses where you use C (for example, in a course on operating systems). But you absolutely should not be taking a university level course because you want to learn C. In fact, I highly doubt that any respectable university would even offer a course on C or assembly. They will offer courses like "Introduction to Programming", which is entirely different from "Introduction to C". If you just want to learn a specific language, either take a community college course, or buy a book and learn it on your own. Any student in an honours CS program at University should have no trouble learning new languages on their own.
Does the school have Windows machines with Code Warrior on them that you can use to compile your assignments? If so, I don't understand what the big deal is. I don't think it's unreasonable to expect the TA's not to want to bother fudging around with code to get it to compile on the platform they're using. If they don't provide the environment on machines at school, and expect you to go out and purchase your own box which runs Windows, then maybe I'd complain. (Although apparently many schools in the US expect students to purchase their own computers and do everything at home; here, the labs on campus provide all the facilities you need for your courses. In this case you may have no choice, but see the texbook analogy below.) But otherwise, who cares?
Most CS courses here are the same way. If your code doesn't compile on the platform being used (often g++ on Unix), tough. Sometimes the software needed isn't available on Windows, so students who use Windows at home have no choice but to use the school's Unix facilities. And even if you're using Linux, your code is not guaranteed to compile on their system - differences between gcc versions, etc. may cause problems. If your code doesn't compile, tough - it fails the automated testing, and you lose a bunch of marks. Presumably if there's a problem the TA's are nice enough to try and fix code that doesn't work, and/or assign some marks, but I don't see what's wrong with expecting students to test their code on the school's systems before submitting it.
This is no different than being forced to do assignment questions out of a $100 textbook, even if you really don't need the textbook to learn the course material. This happens ALL THE TIME. You most likely buy the textbook anyway, and use it, but you can also just find a copy in a library or borrow from a friend. Likewise, in this case, if you don't want to buy Windows, you can either find a public workstation (presumably your University has some), or find a friend who runs Windows and compile on their system. How hard is that?
Ok, I'm on a bit of a roll here now. I'll probably get moderated down for this, but I don't even understand why Slashdot would post this question. Actually, the question is a good one; he merely is asking a technical question. It's Cliff's attempt to turn it the discussion into something political with his commentary that's stupid. Oh, poor Linux user! The horror of having to use Windows for 2 minutes to verify that the code compiles and runs on it (assuming they're not using features or libraries specific to CodeWarrior, which for an entry-level C++ course I would assume they're not)! I know we're Linux zealots, but why can't some people in this community just accept the fact that NOT EVERYONE USES LINUX, and there are going to be occasions when you're FORCED TO USE WINDOWS (or Macs, or...) For god's sake, stop WHINING and being offended and deal with it!
Re:C++ as a teaching language/programming obscure?
on
Who's Afraid Of C++?
·
· Score: 1
I agree that starting off with OO concepts is not necessarily a bad idea. You certainly don't have to be a good C programmer to become a good C++ programmer and OO designer. However, one thing to keep in mind is that OO analysis and programming are completely different things. You can perform OO analysis without writing a line of code. Also keep in mind that OO programming is essentially the same thing as imperative (and/or functional) programming, but with a certain prescribed approach to solving the problem. I think I perhaps the term OO programming is a misnomer, becuase OO more than anything is just a method of modelling (i.e. problem solving). I have seen countless programs written in C++ using classes and inheritance that are in no way whatsoever object oriented.
Therefore, I think it's pretty essentially to learn about the basics of control flow, variables, and simple data structures before one begins to learn about OO concepts. But I think we essentially agree: I definitely don't think it's necessary to learn about registers or pointers to learn about OO programming. In fact, my school (UWaterloo) is now teaching the introductory programming courses (and most of the second year CS curriculum) in Java. The funny thing is that after teaching the basics, they teach the students about pointers and ADT's... in Java. Of course, it's easy to simulate pointers without actually having them as a language feature, and that's what they do, but I just find the irony amusing.
Then, as others have pointed out, your school doesn't sound very good.
Of course there is nothing about CS that can't be learned from reading or by experimentation. This is true of any discipline. Note that I avoid referring to books, because the most cutting edge stuff exists only in journals and proceedings, not books. But this can be said about any subject. If you're really so smart and disciplined you are able to learn everything you'd get out of a CS degree on your own, quicker, and without any formal guidance, then maybe you are right, maybe you shouldn't attend University. But I doubt that is the case. As people point out every time something like this comes up on Slashdot, there's a lot more to a University education than just knowledge of CS (or whatever your major is).
In addition to giving you some knowledge of CS, a degree should allow you to broaden your intellectual horizons a bit. You should graduate with improved problem solving skills. Hopefuly, you will also improve in areas like social skills. You will almost certainly improve your ability to communicate with others about your discipline. This isn't an easy skill to develop through books, and shouldn't be underestimated. You may think there's no big deal in being asked to prove result after result in your math and CS theory courses, but this not only stresses and hones your problem solving skills, but also your ability to communicate. Would you have the discipline to develop and write out proofs to results on your own when reading a book? Even if you did, who is going to be reading your proof and giving you feedback on your ability to communicate your ideas?
In addition to the less tangible things mentioned above, there are plenty of very tangible and practical things you can learn in a CS program. A top-notch CS graduate should be capable of designing a programming language, writing a compiler for said language, writing an operating system, writing a DBMS, or just about anything else. They should be capable of doing work which is high quality and state of the art. They should have enough software engineering knowledge to be able to handle the design, implementation, testing, etc. of all sizes of projects. They should be able to recognize when a problem cannot be solved efficiently and (usually) come up with an efficient approximation heuristic. They should be able to prove that their code is correct. They should be able to provide asymptotic performance bounds for their algorithms, and prove them. They should know how to solve mathematical problems using numerical techniques. I could go on.
Once again, I ask, do you really have the discipline to learn all these things on your own? As sure as it is possible, it is just as sure that there would be gaps left when you learn this way. And you'd still need to invest so much time that why not just spend that time working towards a degree, which represents so much more than just knowledge of your field?
Good luck trying to explain this to the Slashdot crowd. :)
It's a shame that most University computer science programs don't have a mandatory lower year introductory course on programming languages. Waterloo is supposed to be an okay CS school and I didn't learn anything about programming languages until I took an optional 4th year course (that almost nobody takes).
Err... I certainly hope you are just writing these programs for fun, and that someone is not actually paying you to waste time needlessly minimizing executable size.
In many ways I agree. Not too many programmers even know that there are other types of perfectly useful paradigms besides procedural and OO. I didn't fully appreciate this until I took a 4th year programming languages course. The theory behind some of these other paradigms is rather fundamental in nature. The pure simplicity and elegance of the lambda calculus makes it something that I think everyone should know before they consider themselves an excellent programmer. Believe it or not, this type of knowledge will be good to know in practice, especially if you're ever working on a compiler or interpreter, or designing or choosing a language for some particular application. If you are ever working on some kind of meta-language type construct to facilitate your work, you may find it invaluable to know about things like closures and such. Even for very routine tasks in an imperative or OO language, simply knowing something what higher order functions ARE and how you can implement them may make your designs easier to create and understand.
That said, in the real world you'll probably rarely use a functional language. But they are out there. Lisp-like functional languages are not uncommon as extension languages in large applications. And something like Prolog can be useful for quickly prototyping certain things. To limit yourself to OO and procedural paradigms is short-sighted I think, especially to think that one is a silver bullet. The paradigm really has little to do with the language too. There are languages like OCAML and that make it easy to program in either OO, functional, or imperative style. To say that one paradigm is best for scripting, and one is best for large applications is also limiting, I think. OO tends to work well in large applications, but there's no reason you couldn't mix it with a functional style, or use an imperative (procedural) extension language to develop certain parts, if appropriate.
I think the moral of the story is that it's good to learn and be familiar with as many different styles and languages as possible. Be familiar with the theory behind all of them as well.
What is your problem? Seriously, I am not sure where all of the contempt and vitriol comes from.
First, I was not talking about overlapped I/O(otherwise known as asynchronous or non-blocking I/O in most circles). You've completely misinterpreted my original post. See below.
Second, fibers in NT/2000 are NOT coroutines. They are similar, but they are not the same thing. You could probably turn them into true coroutines wiith a global variable and some preprocessor magic, but I haven't tried. I also know notihng about your specific scenario, I am just going by what you posted - namely, that you wanted to implement a FSM without explicitly maintaining state. That is exactly one of the problems coroutines were invented to solve. In practice you don't see them often, which is mainly because most programmers simply don't know a lot about concurrent programming. Few schools have entire courses on the subject like UW does. There are always other solutions to the problem you mentioned - e.g. using certain OO design patterns - which are often sufficient.
Since you apparently aren't interested in having a civilized conversation in this forum, I invite you to email me. Maybe things will work better through that medium. I can even give you examples of specific products I've worked on in the industry where coroutines were used. In fact, consider that a challenge. I kind of doubt you will take me up on this, as looking at your posting history shows you to be somewhat of a troll.
Maybe you should read more carefully before you are so quick resort to insults next time. That doesn't make for a good impression.
I am pretty sure I know exactly what your point was. An explicitly implemented state machine (so I said finite automaton - sue me) is indeed usually an ugly design. I make no bones about that. My point is that coroutines were invented to solve exactly this problem. You do not need the added complexity of threads. Simple coroutines also have the advantage of being easy to simulate, without the need for a true threading system. For example, using macros or function objects in C/C++. Coroutines also would normally be implemented at user-level so you also avoid polluting the kernel's scheduler with a bunch of threads that behave as one thread.
Maybe you should learn a little more about concurrent programming instead of preaching about it here if you don't know what coroutines are.
ftp://plg.uwaterloo.ca/pub/uSystem/uC++book.ps.gz
It approaches the subject from a more theoretical rather than applied point of view, but if you understand all of the concepts in this book you will have a better working knowledge of concurent programming than 99% of the programmers in the industry!
Strictly speaking, you are right - multiple threads doesn't increase the maximum capabilities of your computer. However, I hope you realize that in practice having multiple threads is absolutely essential to get the best performance. Without multiple threads, the only way the second sentence above holds true is if you have complete control of the hardware at the lowest level - your application is the OS - or your application NEVER has any processing it could easily do while blocked waiting for I/O operations to complete, or is completely CPU intensive and never blocks in the first place. For typical applications, though, especially anything interactive, it is simply IMPOSSIBLE to achieve the same kind of throughput with a single threaded architecture as what you would get with an appropriately designed multithreaded one.
I do agree with you that a lot of developers often use threads as if they are each going to be executed on their own CPU. Of course this is wrong. The previous poster's example of using synchronized threads to implement a finite automaton with implicit state management was particularly apalling. All that is needed for that is single threaded coroutines. Introducing the non-determinism of multiple threads is a recipe for disaster if you don't know what you're doing. One synchronization bug that never shows up on your single CPU development box is all it takes.
Anyway, I see what you're getting at, but your comment that you never need more than single thread for a single CPU is misleading, as it isn't true in many cases. In your own example, you are using multiple threads (with good reason) on what is presumably a single CPU.
This is absolutely true. If you have ever taken a macroeconomics course, you have heard of the term "competitive advantage". That is exactly how companies like Red Hat survive. It is essentially trade. This does not apply to individual, hobbyist computer users, because as a hobbyist you are not trying to make money -- spending a lot of your spare time on a problem does not reduce your income, because that time would not have generated income for you anyway.
From a brief look at the web page, this sounds awfully similar to Microsoft's Intentional Programming project, only less general, and less sophisticated (IP is designed to be able to represent many existing languages, with their differing semantics). They don't make any mention of IP in their FAQ though. Could someone who knows more about Eidola expound on the similarities and contrasts of these two projects?
Actually, it is the opposite. The Earth's rotation is slowing down. This is a known fact, and it is due to the tidal forces caused by the moon. Due to the Earth's rotation, the tidle buldge caused by the moon actually is ahead of the moon's orbit, and therefore a small component the moon's gravity acting on the earth pulls this tidal bulge back in the direction opposite the Earth's orbit. Conversely, the Earth's gravity is pulling the moon ahead in its orbit, causing the moon's orbit to drift outward. Eventually, we will lose the moon. This particular effect is has been measured with lasers (no, not giant "la-sers" on the moon, just ordinary ones here on Earth).
They are able to prove that days have been getting progressively longer through the fossil records. The rate is something like a few seconds per century or so. I do not know exactly how they can determine this by looking at fossils though. Perhaps they are able to determine the average amount of sunlight the animal was exposed to or something. I believe the solar eclipse records also confirm this.
Eventually the Earth's rotation would slow down to the point that it is no longer rotating with respect to the moon, so the moon's orbit would be synchronized with the Earth's rotation and the moon would only be visible from one side of the Earth. The Earth would still rotate with respect to the sun, but the days will be much longer, something like 50 times (IIRC) as long as they currently are. But this won't happen until something like 50 billion years in the future, by which point the Earth will have been consumed by the Sun anyway.
Up up down down left right left right B A select start
What do you mean "why restrain yourself to the common denominator"? I use vi (actually, vim) because I'm way more efficient in it, it's as simple as that. Emacs with vi key bindings would probably work just as well, but why bother loading that huge beast when I probably won't need most of it's features anyway? True, for large projects where you have to deal with other people's crappy code, it's good to have more of an IDE-like environment where you can view class hierarchies and such. But for me, the most important thing is to have vi-style key bindings wherever possible. That way I gain maximum efficiency.
Your paltry tuition fees only cover a fraction of your own education. They most certainly do not pay for any research that gets done!
Umm ... C# is definitely not meant as a replacement for C++. Even many of the new features in DevStudio (or .net or whatever it's being called now) are written in C++. On the other hand, the VB team at Microsoft is hardly doing anything and is underfunded. Seems like a sure sign to me.
I assume the goal of this project is to provide a tool similar to Microsoft's Visual Basic for Linux. Any other reason would not make sense. While it's certainly a good idea to attract developers from MS platforms, I don't think this is a very good idea now. 5 years ago, maybe, but it seems pretty clear to me that with the introduction of C#, Microsoft is intent on phasing out Visual Basic in the near future. They may not come out and say it directly, but it's pretty obvious that this is what will happen. Consider that VB7 will execute on the same runtime platform as C#, and share all of the libraries, including system libraries, GUI libraries (WFC), etc. and be able to seamlessly integrate with C# code. Moreover, most of these libraries were written in C#, not VB. Microsoft has overhauled the VB language to make it compatible with their new platform, making it pretty clear that VB will be a second-class citizen next to C#, which was designed as the central language for the new platform. If developers can use C#, a very Java-like language which is much nicer to use, to write programs for the Windows platform every bit as easily and quickly as if they were using VB, who on earth would want to use VB? Probably just people who ONLY know VB. Well, all the best developers will all be using C#, so the VB code-monkeys will eventually be forced to make the switch.
The difference in ratings between 1992 and 1996 can be mostly attributed to the time difference, and the fact the 1996 games were held in the US. At prime time in the US, it's the middle of the night in Barcelona.
Umm ... correction: the union of two infinite sets is always infinite, regardless of whether or not they are countable.
I also used to stay up late running a BBS, hacking, engaging in drawn-out philosophical discussions with friends, reading, and such in high school. In fact, I was probably much like you. I had started my own business in high school, and likely could have continued that full-time, or perhaps gotten a job as a programmer. I had a lot of contempt for higher education, and, like you, thought that since I was smart and motivated enough to learn a lot on my own, it would be a waste of money to attend University. Yet I chose to go that route anyway, did very well in first year, and have now become very academics-oriented, a side of me I did not know existed. I am now very happy with the path I chose for myself, and realize how completely misinformed I was previously. To think that I might have drudged through life, never knowing what I was missing out on makes me appreciate this experience much more.
It disappoints me to read these comments on Slashdot along the lines of "I'm smart, so I don't need a University education", or "a lot of University graduates are stupid, therefore a degree is useless", etc. In my experience, this notion is incredibly wrong. I think if you are smart, that's all the more reason to get a degree! It's not about learning to code, it's not about getting a piece of paper. Higher education is about enlightenment, appreciation, and thinking. If you are smart, you'll be a better thinkiner, and be able to better appreciate the field you are studying, leading to enlightenment. I think it's a crime to be too stubborn to take advantage of one's intellectual ability in this way -- you are cheating yourself. A large portion of the most brilliant people on this planet are to be found in academia. I have had the good fortune, through attending a well-respected institution, of being exposed to some of the most brilliant minds in mathematics and computer science. I sincerely doubt that there are many people that smart in the "real world", as such a truly bright individual would simply not be able to find satisfaction in an ordinary line of work. So this begs the question: if academia is good enough for them, why isn't it good enough for you?
Regrettably, I find it difficult to put into words precisely what I am getting out of my University education. I KNOW that when I graduate, my academic accomplishments will be meaningless and insignificant to anyone else in the real world. But I take great pride and interest in them anyway. I don't feel this is born out of any psychological need to justify my chosen path. I actually disliked my first two years of University, and thought it was largely a waste of time (except for the social aspects). Had I not attained top grades, I may even have dropped out. But now I've become more comfortable with the academic life, and am beginning to find the experience more enjoyable and more rewarding as I study my field in greater depth. In fact, I wish I didn't have to stop soon in order to graduate. But when I do graduate, I know that the PROCESS of getting a degree will have made me a better person -- I already see that.
P.S. if you go into mechanical or computer engineering, as I believe you said in another message in this thread, you likely will not experience what I'm talking about. At least at my University, the engineering programs tend to be too practical, and in particular, lacking in intellectual content. You will study a broad range of subjects, but never in much depth. In my opinion, to truly get the most out of a University education, one must study some kind of art, such as philosophy or mathematics (which I would consider more of an art than a science, and computer science is essentially a branch of mathematics). I know several extremely intelligent people who have started in engineering programs, and virtually all of them have hated it. Some are struggling through and not getting much out of their university experience, whereas others have transferred to other programs and begun to enjoy it more. Engineering programs are great if you want to get a job or learn practical things, and you certainly do learn interesting things, but they are definitely not for everyone, particularly those looking to be challenged intellectually.
To return to your point, I did not get any offers of entrance scholarships either. MIT was certainly not an option. Yet I managed to put together pretty decent grades in high school, and be admitted to a University that is highly respected in its own right. Since then, I have been awarded a couple of upper year scholarships, which I didn't need because co-op jobs covered all my expenses anyway. Seriously, it sounds like you're just looking for excuses. There ARE options other than Harvard you realize, and if you have the skills to get a decent tech job right out of high school, then you certainly have the means to cover all of your school-related expenses by working during the summers. The bottom line, is that it's worth it. I would have made hundreds of thousands of dollars by now had I not attended University, but I have no regrets.
So you're saying the TA's should go to the extra work of having students specify the platform they used, sorting assignments by platform, and testing the code MANUALLY on all the types of machine used? Then what happens if the code fails to compile because the student had a slightly different environment (which could be something as simple as different paths, environment variables, etc.)? Since you've obviously completely failed to comprehend what I'm talking about, let me use a SPECIFIC example then. What if the student used Visual C++ 5.0, and the computer labs only have version 6.0 installed? Is the TA supposed to MANUALLY load the project and figure out what needs to be done to convert the project? And is he supposed to repeat this MANUALLY for HUNDREDS of assignments? How exactly do you propose to handle such situations?
Impossible? Do you honestly believe that? Have you tried? That's the reason why I posted this question. If it's so impossible (read: "highly improbable") then why is that, and what might be taken to make the improbable, possible?
Yes, I do honestly believe that. If you want to disprove my claim, then I would be happy to hear you describe how you would develop a course, with automated marking of assignments, while allowing students to use any platform and environment they choose. If your marking scripts use g++ and GNU make on Linux, then explain how you would allow students to use MS Visual C++ or Borland C++Builder without making any changes to fit the platform you run your scripts on, or testing their code on your platform. Now describe how you would extend this to work for arbitrary compilers and types of makefiles.
No matter what you come up with, I will be able to find SOME incompatibility between environments that you haven't considered that would cause a program to work on one system but fail on your marking scripts.
Similar to automobile lemon laws, this bill will provide legal recourse for warranty abuses and ineffective repairs.
"Right now, PC consumers have little or no recourse when manufacturers refuse to back up their products and warranties."
Have you ever bought a car? If so you should be well aware of what the purpose of lemon laws are. ALL new cars are bought under warranty. So why do lemon laws exist for cars? Becuase it has not been uncommon for dealers and manufacturers to screw the consumer by failing to honour warranties. Or, in some cases, the quality is so poor that the same repairs need to be done over and over. The car ends up spending more time in the shop than on the road, and when the warranty expires the owner is left with a very expensive pile of metal, rubber, and plastic. Some good buying with a warranty does in those cases.
Computers are not as complicated to fix as cars, so you and I don't need this kind of protection (but I think it would be nice to have anyway). But for the average user who doesn't know much about computers, this is long overdue. Warranties only protect the consumer from the EXPENSE of fixing problems. They don't protect consumers from products that are such poor quality that the manufacturer can't/doesn't fix properly, or from abuse of the warranty.
Sure if you go to class and you want an easy time staying with the professor, then use the same environment that he is using, but ANSI C++ is ANSI C++ and if the professor is not teaching to the standard then that is a problem. ANSI C++ code should compile fine on any compiler from Solaris to BSD to Windows and Macintosh ...
Not necessarily. The ANSI/ISO standard for C++ has been a moving target for years, and there is still a lack of standardization amongst compilers. Of course, it's getting better, and most code should compile and run the same using any modern compiler. But in every C++ compiler I've used for a reasonable period of time, I've still encountered many quirks. I speak from experience. I have even run into problems between different versions of gcc when submitting code for an assignment. Secondly, the submittor nowhere said his professor isn't teaching according to the C++ standard.
Also, if you really think telling students "you can use any environment you want, just make sure the code is ISO-compliant" is at all a feasible alternative to telling them "make sure your code compiles and runs using CodeWarrior for Windows", then you've obviously never taught or TA'ed a course before! The less explicit you are, the more students you're going to have screwing up somehow, and complaining that "it worked fine on my system". Moreover, there are things to consider outside of the language itself, such as what kind of project management to use (i.e. makefiles), libraries, etc.
Why not give students the tools and knowledge they need to work under any environment?
Because that's impossible!
The choice of language is irrelevant. I would expect any half-decent honours CS program to introduce students to an imperative language, an OO language, and a functional language within the first two years. The purpose is to introduce students to these different styles of programming. Which specific languages are used hardly matters. Most likely they are using Java because it is more appealing to students, simpler than C++ (and therefore easier to teach), and appeals more to the companies that are contributing funding to the university.
University is not about "learning C". In a CS major program, there probably will be courses where you use C (for example, in a course on operating systems). But you absolutely should not be taking a university level course because you want to learn C. In fact, I highly doubt that any respectable university would even offer a course on C or assembly. They will offer courses like "Introduction to Programming", which is entirely different from "Introduction to C". If you just want to learn a specific language, either take a community college course, or buy a book and learn it on your own. Any student in an honours CS program at University should have no trouble learning new languages on their own.
Does the school have Windows machines with Code Warrior on them that you can use to compile your assignments? If so, I don't understand what the big deal is. I don't think it's unreasonable to expect the TA's not to want to bother fudging around with code to get it to compile on the platform they're using. If they don't provide the environment on machines at school, and expect you to go out and purchase your own box which runs Windows, then maybe I'd complain. (Although apparently many schools in the US expect students to purchase their own computers and do everything at home; here, the labs on campus provide all the facilities you need for your courses. In this case you may have no choice, but see the texbook analogy below.) But otherwise, who cares?
Most CS courses here are the same way. If your code doesn't compile on the platform being used (often g++ on Unix), tough. Sometimes the software needed isn't available on Windows, so students who use Windows at home have no choice but to use the school's Unix facilities. And even if you're using Linux, your code is not guaranteed to compile on their system - differences between gcc versions, etc. may cause problems. If your code doesn't compile, tough - it fails the automated testing, and you lose a bunch of marks. Presumably if there's a problem the TA's are nice enough to try and fix code that doesn't work, and/or assign some marks, but I don't see what's wrong with expecting students to test their code on the school's systems before submitting it.
This is no different than being forced to do assignment questions out of a $100 textbook, even if you really don't need the textbook to learn the course material. This happens ALL THE TIME. You most likely buy the textbook anyway, and use it, but you can also just find a copy in a library or borrow from a friend. Likewise, in this case, if you don't want to buy Windows, you can either find a public workstation (presumably your University has some), or find a friend who runs Windows and compile on their system. How hard is that?
Ok, I'm on a bit of a roll here now. I'll probably get moderated down for this, but I don't even understand why Slashdot would post this question. Actually, the question is a good one; he merely is asking a technical question. It's Cliff's attempt to turn it the discussion into something political with his commentary that's stupid. Oh, poor Linux user! The horror of having to use Windows for 2 minutes to verify that the code compiles and runs on it (assuming they're not using features or libraries specific to CodeWarrior, which for an entry-level C++ course I would assume they're not)! I know we're Linux zealots, but why can't some people in this community just accept the fact that NOT EVERYONE USES LINUX, and there are going to be occasions when you're FORCED TO USE WINDOWS (or Macs, or...) For god's sake, stop WHINING and being offended and deal with it!
Therefore, I think it's pretty essentially to learn about the basics of control flow, variables, and simple data structures before one begins to learn about OO concepts. But I think we essentially agree: I definitely don't think it's necessary to learn about registers or pointers to learn about OO programming. In fact, my school (UWaterloo) is now teaching the introductory programming courses (and most of the second year CS curriculum) in Java. The funny thing is that after teaching the basics, they teach the students about pointers and ADT's... in Java. Of course, it's easy to simulate pointers without actually having them as a language feature, and that's what they do, but I just find the irony amusing.