Slashdot Mirror


User: gavinhall

gavinhall's activity in the archive.

Stories
0
Comments
4,646
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 4,646

  1. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    One last time here - someone born and raised on Object Oriented Programming will not have the same understanding of how to write an efficient prgram as a C programmer will. A C programmer who adopts C++ will write a better program because he understands the framework upon which object-oriented programming is built - a C-like language. It's just a hypothesis, but I see the proof all of the time. C++ programmers won't use a pointer even when it's the best solution. A C programmer that adopts C++ can use the best of both worlds - there's a reason why C++ inherited all of C - the two work nicely together. But I would not under any circumstance introduce someone to programming through C++. BASIC, maybe. C, definitely. C++, no!

  2. Re:Can someone give 1 good reason to use C++ over on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    No. Linus torvalds convinced me a long time ago, in Documentation/CodingStyle.txt (I think that's what it's called.) Read it, and understand where I'm coming from. (To paraphrase) C programmers do not use cute names like this_is_a_temporary_loop_counter. They use i,j,k.

    And if your functions are so big that your declarations aren't near the first use, it's time to split your function. Better yet, instead of saying this myself:

    Everybody on this thread: Drop what you're doing and go read Linus's Documentation/CodingStyle.txt in the kernel source. It explains how to write good C code, and clears up the issues that some C++ programmers here have with C code.

  3. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Geez. I exadurate all of the time. And I wasn't saying it was C++'s fault, just that the language tends to make people allocate more space instead of reusing things. It's a fault of the paradigm that I don't like. I'm much more of a C programmer. Sure, I can write C++ fairly well. (I'm not a C++ language lawyer, nor do I write in it/stay current with it often). But the object-oriented approach tends to lead to sloppy programming if that's all you've ever been exposed to. Does that sound right, or am I still wrong? :-P

  4. Re:Daft! on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    Yes. I have. I know C++, and can code fairly good C++ code. I've used mwcc, g++, and Microsoft's c++ compilers. Despite the optomizer, it just seems wrong to declare another local variable at every block - and wasteful. It doesn't matter if the optomizer coalesces them all - it just seems wrong. Maybe that's because I do most of my coding in C.

    Actually, I'm a complete hypocrite in this discussion. I actually learned to program in BASIC.

  5. Re:Can someone give 1 good reason to use C++ over on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Nggg - don't usually take into account the optomizer. Usually I write my code so that if my optomizer died, my code wouldn't crawl. I don't depend on the optomizer for anything.

  6. Re:Initial steps into programming on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    And the concepts are over 50 years old, and came about in the time of Turing (and even before that!). You want something new, go use a quantum computer. (Good luck doing that without a conventional computer, too.) We're using 30-year old OS's because the concepts of computing haven't changed in 30 years. Electromagnetic computers still work the same way as an old IBM mainframe, Turing-style.

  7. Re:Can someone give 1 good reason to use C++ over on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Hmm - I thought that if you renamed g++ to gcc, it would be the same thing - in fact, gcc takes objective C code too, just translating it to C. On some systems, isn't g++ a symlink to gcc?

  8. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Okay - I'll concede one point: A bunch of experienced C programmers writing C++ code would produce the best program. But a bunch of people who don't understand C writing C++ code is a recipie for disaster, programming-wise. Sure, they may get it done, but will they understand why it takes up 50MB of memory and is slower than a dog?

  9. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    That's why I recommended (either in the parent or below, I forget which) that they all take a discrete math class too. Data structures are also a useful programming concept - but more mathematically than computationally. The most basic computer doesn't deal with data structures, but as soon as you add some complicated items (like a filesystem) it becomes necessary.

    But C++ is a poor language to understand the basics of the computer (memory management, etc.). It's a problem-domain tool.

  10. Re:Can someone give 1 good reason to use C++ over on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    ...which is why you'll see C++ programs that have local variables for each block. I stick to a maximum of three throw-away variables per function (i,j,k) and reuse them. Better planning leads to better programming. C is not a free-form language. And why does the bit-shift operator control output, anyway? Admittedly, printf is a bad analogy. One should always use write(2) if one wants to understand output. Malloc is just fine for me. Free is just fine for me. Both are easy to use. Want a new struct asdf? struct asdf* ptr=malloc(sizeof(struct asdf)); - easy enough.

    And for the STL, glib provides most of the best calls.

  11. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Sure the cooking class will help - but trying to follow proofs will help more. What I meant was that those looking to understand concepts of computing should understand the math that they're built upon, and understand the concept of an algorithm. What good is understanding an object to a programmer if he can't undertand why his program is O(n^2) instead of O(lg n)? It doesn't take a programmer to write a program - but it takes a programmer to write a good program.

  12. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    What I mean is that if all you're focused on is the result, there are ways to get the result. If you want the best result and the best process (and the best quality) as your goal, then a extremely problem-domain tool (like C++, even more like VB or LabView) is not what you're looking for - because those take away control of the process from you. C is a process language - and through the best process, it gives you the best results.

  13. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1

    Posted by 11223:

    Tell me that when your program is leaking memory like a dog because you weren't paying attention to low-level memory access. I don't mean low-low-level, but what's wrong with keeping track of your malloc's and free's? If everybody knew C well, there'd be a lot more good programs. C++ leads to bloat and to doing things the wrong way because it's the easy way. An algorithm that a C++ programmer can write that takes 5 minutes, I can do it in 4 - simply because I'm writing closer to assembly. You want bad programmers or good programmers, or just people interested in the solution (and not how it got done)? VB is a perfect problem-domain solution (see above). C is a perfect language to program in. This book was supposed to teach programming - except it teaches problem-domain problem solving. (Yes, I've seen the book. No, I haven't read it in depth.)

  14. Re:Okey-dokey... on Power Up That iMac · · Score: 1

    Posted by 11223:

    There's something special about a 500mHz G3 - you can run MacOS on it. You can't run MacOS on an Alpha, or an Intel box. A 500mHz G3 is good because it's the fastest avaiable MacOS box, not because it's the fastest available BeOS, BSD, or Linux box. It's not for any of those.

  15. Re:C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    Sorry. Figure of speech.

    For problem-domain problems, one can use a problem-domain language like Labview or Visual Basic. If you want to know how to program the computer, you learn to think like the computer. Nobody seems to get how to think like the computer - they view them as unpredictable or intellegent. C++ doesn't help, by presenting a false image of the computer. (Whaddya mean, computers don't think in objects? I make objects all of the time, says the C++ programmer)

  16. C++ as a teaching language/programming obscure? on Who's Afraid Of C++? · · Score: 1
    Posted by 11223:

    First of all, the main reason people are afraid of computers is that they don't know how they think. If everybody had a basic discrete math class and an introduction to concepts of computing, C++ would be a lot less unfriendly.

    Personally, I think C++ is a bad teaching language because computers don't think in objects. They think in memory locations and in blocks of code - exactly like C, nothing like C++. What people need to learn to do programming is how a computer thinks - and C++ ain't gonna do that, buddy. I think the best introduction to programming I've ever seen is an O'Reilly book called "Practical C Programming" (the Cow book).

  17. Neo-Luddites on Line Slaying: The Final Frontier · · Score: 1

    Posted by 11223:

    I think that Katz needs to read Kurzwiel's "The Age of Spiritual Machines" - in which he explains how the technologists are like the Neo-Luddites, and are just as weary about the application of the technology. Remember, Katz, just because we're Geeks , that doesn't mean that we like all of the new-fangled e-commerce hoopla. Slaying the physical lines? We don't all stay inside all of the time. Often we'd rather go out than shop for something online. While items that were traditionally done through mail and telephone can be replaced with the computer, the computer can't replace a real-life exerience - of standing in line and talking to the chick in front of you.

  18. Reminded... on Software That Can Censor 'Sexual Images.' Or Not. · · Score: 1

    Posted by 11223:

    ...of a dilbert strip (I'm looking for the link) where Dilber invents a device that detects naked bodies and tries it out on a teenager - wanders away and hears the kid's eyes popping (obviously because the device failed and he found it anyway). Besides, the porn industry is smart - they can defeat any kind of protection.

  19. Done already on Unmaintained Free Software Projects · · Score: 1

    Posted by 11223:

    There's already another site on sourceforge that does this - slashdot article here. How is this project different from the UFO project (which looks like the same thing)?

  20. Okey-dokey... on Power Up That iMac · · Score: 1

    Posted by 11223:

    Why would I put Linux on a 500mHz G3 in the first place? Geez. You'd think the world revolves around linux - nope, I'm sticking MacOS X on that sucker. Why not Linux? Any sort of box can run Linux. A 500mHz G3 is good for running MacOS - that's it, running MacOS and heavy-dudy media software. (Or take a PCI 604-based mac and make it a G3 - and run BeOS!). While I respect Linux as a platform, you shouldn't put Linux on everything, because it becomes just another Linux box.

  21. Slashdotting for NetBSD on What Should One Look For in Colocation Services? · · Score: 1

    Posted by 11223:

    The feature you most want to look for in a server is support for NetBSD. Everybody knows that the BSD TCP/IP stack, as featured in Hotmail, Yahoo, and Netcraft, provides the best performance for a site such as an auction site. Some will claim that NT is better, and others will claim that Linux is trendier (and thus better). Don't believe them! We all know that a NetBSD computer on a 10 Megabit pipe is faster than a Linux computer on a 100 Megabit pipe when it comes to heavy, slashdot-quality loads. NetBSD is just a more mature OS.

  22. Re:heh on Beta BeOS R5 OpenGL Benchmarks Smoke Linux and Win · · Score: 1

    Posted by 11223:

    However, BeTips is running Robin Hood with BONE, the BeOS Networking Environment. It's Scot Hacker's personal machine, too. Be, Inc. themselves run FreeBSD.

  23. Re:Be--WHat it takes to compete on Beta BeOS R5 OpenGL Benchmarks Smoke Linux and Win · · Score: 1

    Posted by 11223:

    Joe Unix is already using BeOS, because it provides an honest-to-goodness POSIX environment. The only problem for Joe Unix is that BeOS isn't multiuser like the other Unix-like platforms (such as NetBSD)

  24. Re:Higher Speed through lower Quality on Beta BeOS R5 OpenGL Benchmarks Smoke Linux and Win · · Score: 1

    Posted by 11223:

    Couple of guesses here...
    Scot?
    Eugenia?
    Oliver?
    Can you tell me if I got at least one right?

  25. An un-NetBSD-related comment on Beta BeOS R5 OpenGL Benchmarks Smoke Linux and Win · · Score: 3

    Posted by 11223:

    Because the site is slashdotted, I'll tell you about the other neat issue with BeOS performance. BeTips has been running under BONE (the BeOS Networking Environment) for the past few days, and has seen great performance increases in networking. This machine also serves as Scot Hacker's personal computer and is used for playing MP3's, rendering personalStudio videos, etc. The performance of BONE is in the same league as Linux and NetBSD now, and it's design was modeled on the excellent BSD TCP/IP stack.