Ancient artists used a technique called stippling - in which pictures are created by painting or carving a series of tiny dots - to produce drawings on cave walls and utensils thousands of years ago.
Wow, think of what you could do with this! You could print grayscale images using only one color of ink, or color images using only three or four! No longer would we be limited to viewing images on expensive computer and television screens. We could actually print the images on a super-thin sheet of cloth or wood. We could call this new device "paper".
Hmm... true... it would certainly be considerably more difficult. So, perhaps there would be less piracy... I bet it won't take long for various piracy groups to form. In computer gaming, you've got people who will crack the copy protection on any new game usually before it is even released... they actually hex edit the executables to do this. It always amazes me that people with such skills can't find anything better to do with it... though I suppose it's hard to get a job when your first language is 1337 speak.:)
But, you're right, it will definately be harder, and there will be less piracy than there is today. And I'm not going to say that that, in itself, is a bad thing... I just worry, because I know these guys would like to eliminate all piracy, and the only conceivable ways to do so scare me.
Alas, the information economy does not fit well into the goods-and-services capitalist system... but as yet I haven't been able to think of anything better.::shrug::
Still... the signal has to be decoded somewhere. Sure, once it becomes analog it loses some quality, but not enough that most people would care. You'd probably lose more quality because the dumbass who encoded the thing used Billy Bob's Super-Fast MP3 Encoder than from the digital->analog->digital conversion. With the right equipment (not that expensive) it wouldn't even be noticeable.
Also, I don't think it would take an insane hacker to tap the analog signal in the speaker. I think it would be very difficult to construct the speakers such that the wires between the decoder and the speaker surface are completely inaccessible. You'd have to use materials which were non-ideal as far as sound quality... Think of how many people out there have mod chips in their playstations. Tapping the speaker with the right device couldn't be more difficult than that. It only takes one person to make the initial illegal copy, and you can consider the data compromized.
I bet it will cost the RIAA, the electronics industry, and consumers in general a whole lot more money to put DRM in every speaker than anyone would gain out of it.
Are they going to encrypt the signal going to my stereo? How about from their to the speakers? How about the output from the speakers? Are they going to encrypt that, to make sure I can't record it? That would sure solve all our problems -- the RIAA would die pretty damned quick selling white noise. So, it has to decrypt somewhere, and all the hackers have to do is tap in after that point. Taking apart a speaker and hooking it directly to a microphone isn't really all that hard and wouldn't hurt the sound quality that much, as long as you know what you are doing. Are they going to ban microphones? Are they going to make home movies illegal, because they can't be destinguished from stolen copyrighted content? (That's why they tried to use watermarks, BTW -- to distinguish their content from casual user creations.)
Besides, the key will get leaked. You can't sell millions of copies of a secret and not expect someone to find it.
I'm not saying that I want for it to be easy to copy stuff illegally... all I am saying is that it is physically impossible to prevent it unless you somehow prevent users from viewing user-created content. I'd like to think that our government isn't stupid enough to allow that.
Huh? Your arguments show a clear lack of understanding of OOP concepts. I really think you should learn how OOP works a little better before you write it off. I strongly recommend these books:
Large Scale C++ Software Design by John Lakos (It's really more of an OOP in general book, not so C++-specific. This book changed the way I look at programming, and IMO it should be required reading for anyone who wants to call themselves a coder.)
Design Patterns by Gamma et al.
Effective C++ and More Effective C++ by Scott Meyers
Seriously, if you know how to use OOP, it will make you more productive while making your code cleaner, more modular, more reusable, more maintainable, and more robust.
I had a lengthy rebuttal to your post written, but it occured to me that there wasn't really much to argue, and I was just saying the same thing over and over. You didn't really point out any advantages of C. You only point out what you don't like about OOP. Most of the things you point out are common newbie complaints. Most of your arguments are just plain not true, and there's not much to argue. OOP is not something you can learn and understand overnight. It took me a few years of practice to become as good as I am at it, but now I can lay out object designs in my head and handle all the little details you complain about without any trouble at all. It's worth it, trust me.
And yes, OOP can be done in C, but as your little code sample clearly shows, it ends up looking pretty ugly, and it takes a lot of extra typing. Clean, concise code is important. If your code becomes unreadable and difficult to maintain, it will just be thrown out and rewritten eventually, wasting your time and the maintainer's. Besides, what do you gain out of all that extra work?
It's like that old saying... "If all you have is a hammer, everything looks like a nail." Yeah, you can use that hammer to pound in a screw, but it would probably be a good idea for you to learn how to use a screwdriver.
I have a very hard time coding in C. It's not that I don't know the language. I can write anything in C, and write it well. But it takes so much work! Writing C code which is clean, modular, reusable, robust, and maintainable is a pain, if not a flat out contradiction in terms. If forced to use C, I would basically end up emulating all of the features of C++ using macros and redundant code.
As a matter of fact, one of my favorite programming techniques is impossible in C. I like to use reference counted smart pointers to handle memory management automatically. However, in C, there is no way to automate that -- you would have to manually call some sort of functions which increment and decrement the reference count, which defeats most of the purpose.
If I were writing an operating system, I would probably choose C. But a desktop environment? A game? I've worked on my own game engine (see my homepage), and the thought of trying to do it all in C makes me cringe. You might not agree, but I think you just don't know what you are missing.
I am actually now designing my own programming language. In my language, I have been able to write an IRC-like client/server chat program in 161 lines of code, and it would perform better than any but the most thoughfully designed C programs. Sure, you could write it in C, but why? Why spend days writing and debugging something that would take hours in another language?
Woohoo, I'm all psyched up to work on my compiler now. Time for a coding binge! Thanks!:)
The most amusing spam I ever received (names withheld to protect the innocent):
Date: Sun, 19 May 2002 23:03:19 -0600 (MDT) To: [30 addresses at my ISP] From: [Probably fake return address] Subject: Government Alien technology needed! 7132
If you are a time traveler or alien and or in procession of alien or government technology I need your help! My case is truly genuine! I seek to work with someone who is of a kind nature, someone I can call my savior as well as a friend.
My life has been severely tampered with and cursed by evil beings!! I have suffered tremendously and am now dying!
I need to be able to:
Travel back in time.
Rewind my life including my age back to 4. I am in great danger and need this immediately! I want to work with you in any way possible.
I am aware of two types of time travel one in physical form and the other in energy form where a snapshot of your brain is taken using either the dimensional warp or the brain snapshot device and then sends your consciousness back through time to part with your younger self. I'm almost certain the dimensional warp would be the safest and best solution. Please explain how safe and what your method involves.
I have a time machine now, but it has limited abilities and is useless without a vortex. If you can provide information on how to create vortex generator or where I can get some of the blue or red glowing moon crystals this would also be helpful. I am however concerned with the high level of radiation these crystals give off, if you could provide a shielding this would be helpful. I believe the vortex would have to be east-west polarized, North-south polarized vortexes are used for cross-dimensional time travel only. Also, I know about the three dimension 4 bit (CODE) our universe is written in. If you are one of the very few beings who can edit this code, or know the passwords which can be spoken over a vortex, please reply!
If you have this technology and can help me please send me a (SEPARATE) email to: [withheld]@aol.com
I think the tags would be placed such that they were difficult to remove without tearing open the packaging. Besides, it would be no more of a problem than it is now (with the magnetic, non-identifying security tags).
As for taping an RFID tag to someone, that would have absolutely no effect, since each tag is unique to the individual item purchased, not to the type of item. So, tags attached to previously bought items would have no effect. The only way you could do this would be to rip open an item in the store, find the tag, and attach that to a person... but it would have about the same effect as simply tossing the item in the person's cart while they weren't looking (which works now). Anyway, an intelligent buyer would look over the list of items (or, at the very least, look at the price total) before swiping their card.
Did I say it would be a good thing? No. I just said it's going to happen. Whether it will be good or bad is something I don't believe we can predict right now.
Of course, your first reaction is undoubtably something like, "I don't want people to know what I look like naked!" And, given the way our society currently functions, that is not surprising. But, if you got used to it, you probably wouldn't even mind so much. It used to be that just seeing a woman's ankles was an invasion of privacy. Now it's no big deal.
I guess my feeling is that, if something you do or something about you is not "wrong" in any way, why should you care to hide it? Because some people will think less of you for it? Seems to me that that's their problem. Of course, in the real world, their problem can become your problem pretty easily...
So, I don't know. But it's just not so simple a question as you think. You are used to privacy now, and you think it's something you want, and you might think this relates to freedom somehow. I just don't believe there is any real, direct conneciton between privacy and freedom... just a preceived one that hasn't been very well thought out.
But, anyway... like I said, it's inevidable. So, better to get used to the idea now.
The way society works right now, you could get your life ruined by having information exposed publicly, yes. Lots of adjustments will clearly have to be made in our society to accomodate free information. Some will be generally preceived as bad while others will be good. Lots of crimes would be completely impossible to get away with if we had free information, after all... but even I am not prepared to say that I think the good stiff outweighs the bad... yet...
The problem is, as I said before, it's going to happen anyway. Thus, I think it would be more productive for us to start thinking about how to accomodate it now rather than just bitch about it until we get there. I believe it is possible to retain personal liberty without privacy.
Lots of the disadvatages of free information would be counteracted by other advatages... for example:
If a company fired an employee for being gay, the company's customers would find out (via free information), and many of them would likely stop purchasing from that company.
If information about the government's actions were as free as any other information, any conspiracies like those of which privacy avocates warn would be immediately exposed.
Millitary secrets would no longer be secrets, but then again, terrorism would be impossible to carry out, and Iraq certainly would have a hard time hiding its weapons.
It's an interesting dilema. I just don't see it so one-sided as the privacy nuts do. I don't believe that a national ID system is going to make a big difference, though. Frankly, it's the news media that is leading the free information "revolution" (if you want to call it that), not the government.
I received a spam once with the subject line "You're a winner!" and no body. No text, no attachments, nothing. Just "You're a winner!" I guess they thought I needed some moral support.::shrug::
Also, 90% of all spam I receive is in Korean. I live in the United States, and have never visited Korea nor spoken Korean. I only know it is Korean because Eudora used to ask me if I wanted to install the Korean language pack whenever I'd get one (I eventually told it to stop asking).
Though nothing beats the spam I received which started with "If you are a time traveler or alien and or in procession of alien or government technology I need your help!" As far as I could tell, it was completely genuine. The guy seriously wanted alient time travel tech. He requested that responses be sent to his AOL e-mail address. Go figure. (The complete text is a page or two long, but it's pretty funny. I'll post it if anyone is curious.)
The government isn't the only one keeping databases.
I'm seeing a future where it's easily possible for anyone to obtain just about any information they want on anyone else -- not necessarily from government databases.
And has that kept the U.S. military from firing people for being gay?
Yes. They got a lot of flak over that, prompting them to change the policy... I don't know the exact policy now, but according to my cousin in the marines, it's somewhere between "don't ask don't tell" and "just don't hit on the other soldiers".
You put your loot in the cart. You walk up to the scanner. You swipe your credit card. You leave. No cashier to deal with. No lines. No need to even remove the items from the cart.
Ah, yes. If we get federal ID cards, the FBI will no doubt use them to track us and blackmail us. Just like the states do now with the state-issue drivers license. Like the other day... I was thinking of voicing my opposition to a certain state policy (which will remain nameless) when I got a call from Gov. Jesse Ventura (I live in Minnesota). He threatened to body-slam me if I didn't shut up. Needless to say, I complied. (Have you seen that guy?)
That was sarcasm, for those who missed it.
Seriously. You're paranoid. If the FBI started blackmailing people, you can bet word would get out real fast. Why? Because eventually they'd get to someone like me, who has nothing to hide. They could publish a complete list of porn sites I've visited in my lifetime for everyone to see. I really couldn't care less. If anything, they'd just be giving me the evidence I needed to charge them with blackmail, and with the publicity the case would get, you can be sure they wouldn't get away with it.
Anyway, the simple fact of the matter is that personal privacy is going away, and there's nothing you can do about it. Hackers like to talk about how information wants to be free... well, that includes private information. In the not so distant future, you keeping your porn collection secret will be about as feasable as the RIAA keeping people from downloading MP3's. I know you don't like that, and I'm not saying I like it either. It's just the way things are gonna be.
But here's the bright side: It applies to the government, too. Everyone will be able to see exactly what the FBI and the CIA and the NSA are up to, and if they do something that would generally be considered "wrong", people will be free to raise a fuss. And they will. Hell, they already do. The US government is terrible at keeping secrets. Want to know all of the US military's secret strategies? You can read them all over at CNN.com!
What we need to be doing is figuring out how to insure that personal liberty remains undamaged when personal privacy is lost. I think our constitution needs another ammendment that says something along the lines of "No law shall be passed which denies an adult individual the right to perform an act which causes no harm to any individual other than the actor." It sounds obvious, but there are so many laws that do just that. Of course, that's not all that needs to be done. Laws preventing the government from strip-searching political activists for no good reason would be helpful as well. (Fortunately, though, our first ammendment already covers the most important rights of all. As long as it stays intact and as well-defended as it is, I don't see 1984 coming true anytime soon.)
I think a 100% open information society could have a lot of advantages. Frankly, most of the time (note I said most, not all), if you are doing something you don't want people to find out about, it's probably something you shouldn't be doing. Either that, or you're just being too sensitive. Maybe it's just me... if someone IM'd me while I was jacking off and said "hey, are you jacking off right now?", I'd respond "yeah, why?".::shrug:: Like I said, I have nothing to hide.
To cover some of your examples in particular:
Companies who fire people for being gay are limiting their own selection of employees and making an unprofitable decision. Besides that, such actions tend to generate lots of negative publicity.
Marriages between people who keep secrets from each other are not real marriages. Yeah, I know I just invalidated most marriages. That's too bad. I can't imagine being happy marired to someone whom I couldn't trust with all my secrets.
Health insurance? That sounds like something that could simply be regulated.
I'd like to hear other examples if you have them.
This post is getting way too long. I could go on forever... ok, wrapping it up...
Again, I'm not saying that I see no problem whatsoever with personal privacy going down the toilet. I'm just saying that it's going to happen anyway, so you might as well get used to it. You can spend your whole life fighting it and lose, or you can find something more productive to do. Your call.
Now, where did I put that flame-resistant suit... I have a feeling I might need it.
If the program is running faster than the graphics card can draw, then it has to be held up somewhere, doesn't it? It happens when you call glFlush() or glFinish() (can't remember which one), which is called by the swap buffer function. If, however, your program is slower than the card, then, yeah, it's a non-issue.
Yes, I'm aware that "perfect competition" does not occur in reality. My point is just that it is not unreasonable or unexpected for Marvel to claim no profits on Spider Man. Most people think that a company won't do something if it doesn't generate a profit, but in reality it happens all the time.
And according to my economics textbook, in perfect competition, no company ever makes a profit. After all, if one company was selling their goods at a price that brought them a profit, than some other company should be able to sell for less, and naturally everyone would buy from the cheaper company.
Well, of course that's all theory and it's hard to apply to practice, especially in the case of intellectual property (which, IMO, really needs a completely different economic system to support it, although I don't pretend to know the solution)... but that's the theory. And if you think about it long enough, it makes sense that no good company would ever actually have "profits", although I'm having trouble coming up with a good way to explain why...
I think the real question here is, first of all, how evil was it for them to even offer a percentage of profits to this guy when they knew full well that "profits" don't really exist, and second, how dumb was this guy to accept a deal based on profits rather than revenue?
Lesson to everyone: When negotiating with big companies, never accept a percentage of profits in return for anything. Always ask for revenue, or a set dollar amount.
I do 3D coding in my spare time, and I can't wait for GL2, for all the same reasons everyone else, plus one: asynchronous operation.
Working with a 3D graphics card is sort of like working with a second processor. Ideally, you would send the hardware a bunch of stuff to draw, and then you would do something else with the CPU (i.e. physics calculations) while you wait for the card to draw it. However, with GL 1.x, there isn't any really good way to do this (as far as I know). Once you queue up everything you want the card to draw for a particular frame of animation, you call your swap buffer function and your program just waits for everything to complete. The CPU just sits and does nothing. The only way to take advantage of the situation would be to use multiple threads, but then you run into thread synchronization issues, race conditions, and other crap you might not want to deal with.
With GL2, you can actually have the graphics card signal you when it's done. This signalling is done through low-level OS events, which are OS-dependent (unfortunately), but this means that you can wait on non-graphics-related events at the same time (networking, input, etc.) and handle them all as they happen. No more polling! This is good! Also, instead of queuing up an entire frame at once and then waiting for that, you can queue up bits and pieces and say "tell me when this piece has been drawn".
I guess this excites me more than most people because I am an extreme supporter of event-driven programming. Threads are inefficient and overrated, IMO; a program should never use more threads than its host has processors. Any operation which forces a thread to wait for something cannot be used in such programming models, which means I have a very hard time using GL 1.x effectively. 2.0 will fix that.:)
Re:Homogeny isn't a bad thing.
on
Windows in 2020
·
· Score: 2
I have indeed heard of CygWin. However, I don't believe it is an adaquate solution. It emulates POSIX calls using Win32, and thus they are often rather slow and inefficient. Besides, POSIX is a rather crappy interface in general IMHO, and I'd like to see OS's that do something new and innovative rather than build to the POSIX standard. Also, CygWin is GPL, so you can only use it in GPL programs, which is unacceptable to me.
Python, Perl, and Tcl are interpreted languages, and Java is semi-interpreted. You couldn't write a 3D game engine in, say, Python (though you could do scripting in Python). In Java it might be possible, but you'd have problems -- like when you try to create an array of 10,000 Vector3's and you end up with an array of 10,000 referenecs to Vector3's and 10,000 separate Vector3 objects all over the place. That's ugly. I'm all for using Java in small applications where efficiency isn't essential, but in some places it just won't do. I'd rather see a cross-platform API for developing C++ apps (something I am currently working on writing, in fact).
Re:Homogeny isn't a bad thing.
on
Windows in 2020
·
· Score: 2
There are no decent portability standards for GUI toolkits. You can't say X, because many people (like myself) don't want to use X!
The "portability standard" you refer to is POSIX. POSIX, IMO, is a rather poorly designed interface. Many of the functions imply slow implementations (like select() -- there is no way to implement select() in a scalable way). And, of course, POSIX has no GUI facilities. I don't think it is reasonable to say that OS's must support POSIX to be "good" OS's. (Win32 has it's own set of problems, of course.)
Re:Homogeny isn't a bad thing.
on
Windows in 2020
·
· Score: 2
Under Windows, you can't use Win32 and POSIX at the same time. So, you can write a GUI program that uses POSIX.
Re:Homogeny isn't a bad thing.
on
Windows in 2020
·
· Score: 5, Interesting
You're right about the blind MS bashing -- it's idiotic. Linux is not better than Windows, and Windows is not better than Linux. It's all a matter of what you want to do, and what your personal preferences are.
Homogeny is bad no matter what system it is. There are a few reasons for this. First of all, all the computers running the same OS are potentially vounerable to the same exploits -- whether than OS be Windows, Linux, BSD, Mac, BeOS, Solaris, IRIX, HP-UX, OS/2... you get the idea.
The reason people tend not to realize, though, is that some people have different preferences! Personally, having used Linux for three years, I have decided that I like Win2k better. I am guessing that many people here would disagree with me on that. I don't care, and neither should they. You want to use Linux, use Linux. Fine with me. But I want to use Win2k.
The thing is, the more people use one system, the harder it is for other people to use other systems. If everyone used Win2k except for Linus Torvalds himself, he'd probably have a hard time finding software to run on Linux. If everyone ran Linux except for Bill Gates, he'd have a tough time finding software that ran on Windows. Homogeneity encourages software developers to write non-portable code.
<tangent><rant>
When you write software that isn't portable, you are limiting you users' freedom of choice of operating system. This is bad, no matter what system you are writing for.
I talked to a guy recently who was writing a free (open source, I think) 3D modeller. He was complaining about getting Direct3D and MFC to work together, so I suggested that he use a cross-platform toolkit and OpenGL. That way, I said, his code would be portable. He told me of his personal distaste for Unix, and that he didn't think there was any value in porting his software to it.
I was shocked. I'm sure many of you were, too. But then, how many of you have written non-portable software for Linux? You probably figured Windows sucks, and there was no reason to support it. If so, you were no better than that guy.
Wonderful platforms like BeOS are suffering because people won't write portable code; there is a serious lack of good software for any OS other than Windows, Mac, and Linux (with a few Unix's managing to get easy ports of the Linux stuff). All because people seem to think that there is no reason to support any platform other than their OS of choice.
Sad, isn't it?
Now, being open source does NOT automatically make your software portable! If you use POSIX system calls all over your code (and I'd hate to see your code if you do), porting the thing to Windows would probably be harder than simply re-writing the damned thing from scratch. You must consider portability from the beginning!
I'm not saying that you should personally port your software to every known OS -- that would be impossible -- but make sure you write it in such a way that it can be easily ported. Use portable libraries, and abstract away any system calls you need to make. Then, port it to as many platforms as you have available. If your software is open source, you can rely on the users of the target OS to port your program, provided that you have written it properly. If your software is closed source, you will probably find that porting to alternative OS's is fairly cheap and, in many cases, well worth the money -- again, if your code was written to be portable. Just, please, don't force your users to use *your* preferred OS! Give them a choice!
Personally, I started out with Debian. However, at the time, I had no clue how the Debian package management system worked. This turned out to be a good thing.
I was on summer vacation in high school with nothing to do for months. So, I was able to download massive documents like the Linux HOWTO's and use them to learn how to do things. I learned how to recompile my kernel within the first few days. I was playing mp3's before I had a GUI. I installed X manually (albeit from binary packages).
It took a few weeks of playing around, but it was fun, and I quickly learned more about Linux that most Linux users ever do. Later, when I switched to Red Hat, it was a piece of cake to use. Later still, I switch distros a few times -- basically, I would stick with a distro until it did something that pissed me off (like Debian automagically upgrading me to versions of my software that didn't work).
I have used Linux for three years. It has been my primary OS for the later two. I was a Linux zealot for the first two (how embarassing!).
I have now decided that I am sick of Linux, and I am in the process of converting over to Win2k. It was fun for awhile, but I've had enough. But, then, that's just me. You may come to a different conclusion.
If you have the free time, I strongly recommend diving into the deep end and doing stuff manually. An easy way to do this is to install a skeleton Debian system and then pretend the package manager doesn't exist.
If you don't have that much free time, though, go for Red Hat. It's easy, and it really isn't as bad as people say it is.
And if you have no time at all, stick with Win2k. Despite what people who have never used it say, it really isn't a bad OS at all.
From the article:
Wow, think of what you could do with this! You could print grayscale images using only one color of ink, or color images using only three or four! No longer would we be limited to viewing images on expensive computer and television screens. We could actually print the images on a super-thin sheet of cloth or wood. We could call this new device "paper".
Ancient artists sure were smart.
Hmm... true... it would certainly be considerably more difficult. So, perhaps there would be less piracy... I bet it won't take long for various piracy groups to form. In computer gaming, you've got people who will crack the copy protection on any new game usually before it is even released... they actually hex edit the executables to do this. It always amazes me that people with such skills can't find anything better to do with it... though I suppose it's hard to get a job when your first language is 1337 speak. :)
::shrug::
But, you're right, it will definately be harder, and there will be less piracy than there is today. And I'm not going to say that that, in itself, is a bad thing... I just worry, because I know these guys would like to eliminate all piracy, and the only conceivable ways to do so scare me.
Alas, the information economy does not fit well into the goods-and-services capitalist system... but as yet I haven't been able to think of anything better.
Still... the signal has to be decoded somewhere. Sure, once it becomes analog it loses some quality, but not enough that most people would care. You'd probably lose more quality because the dumbass who encoded the thing used Billy Bob's Super-Fast MP3 Encoder than from the digital->analog->digital conversion. With the right equipment (not that expensive) it wouldn't even be noticeable.
Also, I don't think it would take an insane hacker to tap the analog signal in the speaker. I think it would be very difficult to construct the speakers such that the wires between the decoder and the speaker surface are completely inaccessible. You'd have to use materials which were non-ideal as far as sound quality... Think of how many people out there have mod chips in their playstations. Tapping the speaker with the right device couldn't be more difficult than that. It only takes one person to make the initial illegal copy, and you can consider the data compromized.
I bet it will cost the RIAA, the electronics industry, and consumers in general a whole lot more money to put DRM in every speaker than anyone would gain out of it.
Are they going to encrypt the signal going to my stereo? How about from their to the speakers? How about the output from the speakers? Are they going to encrypt that, to make sure I can't record it? That would sure solve all our problems -- the RIAA would die pretty damned quick selling white noise. So, it has to decrypt somewhere, and all the hackers have to do is tap in after that point. Taking apart a speaker and hooking it directly to a microphone isn't really all that hard and wouldn't hurt the sound quality that much, as long as you know what you are doing. Are they going to ban microphones? Are they going to make home movies illegal, because they can't be destinguished from stolen copyrighted content? (That's why they tried to use watermarks, BTW -- to distinguish their content from casual user creations.)
Besides, the key will get leaked. You can't sell millions of copies of a secret and not expect someone to find it.
I'm not saying that I want for it to be easy to copy stuff illegally... all I am saying is that it is physically impossible to prevent it unless you somehow prevent users from viewing user-created content. I'd like to think that our government isn't stupid enough to allow that.
- Large Scale C++ Software Design by John Lakos (It's really more of an OOP in general book, not so C++-specific. This book changed the way I look at programming, and IMO it should be required reading for anyone who wants to call themselves a coder.)
- Design Patterns by Gamma et al.
- Effective C++ and More Effective C++ by Scott Meyers
Seriously, if you know how to use OOP, it will make you more productive while making your code cleaner, more modular, more reusable, more maintainable, and more robust.I had a lengthy rebuttal to your post written, but it occured to me that there wasn't really much to argue, and I was just saying the same thing over and over. You didn't really point out any advantages of C. You only point out what you don't like about OOP. Most of the things you point out are common newbie complaints. Most of your arguments are just plain not true, and there's not much to argue. OOP is not something you can learn and understand overnight. It took me a few years of practice to become as good as I am at it, but now I can lay out object designs in my head and handle all the little details you complain about without any trouble at all. It's worth it, trust me.
And yes, OOP can be done in C, but as your little code sample clearly shows, it ends up looking pretty ugly, and it takes a lot of extra typing. Clean, concise code is important. If your code becomes unreadable and difficult to maintain, it will just be thrown out and rewritten eventually, wasting your time and the maintainer's. Besides, what do you gain out of all that extra work?
It's like that old saying... "If all you have is a hammer, everything looks like a nail." Yeah, you can use that hammer to pound in a screw, but it would probably be a good idea for you to learn how to use a screwdriver.
Turn on CNN. They have an update on US military secrets every half hour.
I have a very hard time coding in C. It's not that I don't know the language. I can write anything in C, and write it well. But it takes so much work! Writing C code which is clean, modular, reusable, robust, and maintainable is a pain, if not a flat out contradiction in terms. If forced to use C, I would basically end up emulating all of the features of C++ using macros and redundant code.
:)
As a matter of fact, one of my favorite programming techniques is impossible in C. I like to use reference counted smart pointers to handle memory management automatically. However, in C, there is no way to automate that -- you would have to manually call some sort of functions which increment and decrement the reference count, which defeats most of the purpose.
If I were writing an operating system, I would probably choose C. But a desktop environment? A game? I've worked on my own game engine (see my homepage), and the thought of trying to do it all in C makes me cringe. You might not agree, but I think you just don't know what you are missing.
I am actually now designing my own programming language. In my language, I have been able to write an IRC-like client/server chat program in 161 lines of code, and it would perform better than any but the most thoughfully designed C programs. Sure, you could write it in C, but why? Why spend days writing and debugging something that would take hours in another language?
Woohoo, I'm all psyched up to work on my compiler now. Time for a coding binge! Thanks!
The most amusing spam I ever received (names withheld to protect the innocent):
Date: Sun, 19 May 2002 23:03:19 -0600 (MDT)
To: [30 addresses at my ISP]
From: [Probably fake return address]
Subject: Government Alien technology needed! 7132
If you are a time traveler or alien and or in procession of alien
or government technology I need your help! My case is truly
genuine! I seek to work with someone who is of a kind nature,
someone I can call my savior as well as a friend.
My life has been severely tampered with and cursed by evil beings!!
I have suffered tremendously and am now dying!
I need to be able to:
Travel back in time.
Rewind my life including my age back to 4.
I am in great danger and need this immediately!
I want to work with you in any way possible.
I am aware of two types of time travel one in physical form and
the other in energy form where a snapshot of your brain is taken using
either the dimensional warp or the brain snapshot device and then sends your
consciousness back through time to part with your younger self. I'm almost
certain the dimensional warp would be the safest and best
solution. Please explain how safe and what your method involves.
I have a time machine now, but it has limited abilities and is
useless without a vortex. If you can provide information on how to create vortex generator or where I can get some of the blue or red glowing moon crystals this would also be helpful. I am however concerned with the high level of
radiation these crystals give off, if you could provide a shielding this would be
helpful. I believe the vortex would have to be east-west polarized,
North-south polarized vortexes are used for cross-dimensional time
travel only. Also, I know about the three dimension 4 bit (CODE) our universe is written in. If you are one of the very few beings who can edit this code, or know the passwords which can be spoken over a vortex, please reply!
If you have this technology and can help me please
send me a (SEPARATE) email to: [withheld]@aol.com
Thanks
I think the tags would be placed such that they were difficult to remove without tearing open the packaging. Besides, it would be no more of a problem than it is now (with the magnetic, non-identifying security tags).
As for taping an RFID tag to someone, that would have absolutely no effect, since each tag is unique to the individual item purchased, not to the type of item. So, tags attached to previously bought items would have no effect. The only way you could do this would be to rip open an item in the store, find the tag, and attach that to a person... but it would have about the same effect as simply tossing the item in the person's cart while they weren't looking (which works now). Anyway, an intelligent buyer would look over the list of items (or, at the very least, look at the price total) before swiping their card.
Zero. I have received blank spam of varying sizes in the past, but this one actually had zero bytes in the body.
Did I say it would be a good thing? No. I just said it's going to happen. Whether it will be good or bad is something I don't believe we can predict right now.
Of course, your first reaction is undoubtably something like, "I don't want people to know what I look like naked!" And, given the way our society currently functions, that is not surprising. But, if you got used to it, you probably wouldn't even mind so much. It used to be that just seeing a woman's ankles was an invasion of privacy. Now it's no big deal.
I guess my feeling is that, if something you do or something about you is not "wrong" in any way, why should you care to hide it? Because some people will think less of you for it? Seems to me that that's their problem. Of course, in the real world, their problem can become your problem pretty easily...
So, I don't know. But it's just not so simple a question as you think. You are used to privacy now, and you think it's something you want, and you might think this relates to freedom somehow. I just don't believe there is any real, direct conneciton between privacy and freedom... just a preceived one that hasn't been very well thought out.
But, anyway... like I said, it's inevidable. So, better to get used to the idea now.
The way society works right now, you could get your life ruined by having information exposed publicly, yes. Lots of adjustments will clearly have to be made in our society to accomodate free information. Some will be generally preceived as bad while others will be good. Lots of crimes would be completely impossible to get away with if we had free information, after all... but even I am not prepared to say that I think the good stiff outweighs the bad... yet...
The problem is, as I said before, it's going to happen anyway. Thus, I think it would be more productive for us to start thinking about how to accomodate it now rather than just bitch about it until we get there. I believe it is possible to retain personal liberty without privacy.
Lots of the disadvatages of free information would be counteracted by other advatages... for example:
It's an interesting dilema. I just don't see it so one-sided as the privacy nuts do. I don't believe that a national ID system is going to make a big difference, though. Frankly, it's the news media that is leading the free information "revolution" (if you want to call it that), not the government.
I received a spam once with the subject line "You're a winner!" and no body. No text, no attachments, nothing. Just "You're a winner!" I guess they thought I needed some moral support. ::shrug::
Also, 90% of all spam I receive is in Korean. I live in the United States, and have never visited Korea nor spoken Korean. I only know it is Korean because Eudora used to ask me if I wanted to install the Korean language pack whenever I'd get one (I eventually told it to stop asking).
Though nothing beats the spam I received which started with "If you are a time traveler or alien and or in procession of alien or government technology I need your help!" As far as I could tell, it was completely genuine. The guy seriously wanted alient time travel tech. He requested that responses be sent to his AOL e-mail address. Go figure. (The complete text is a page or two long, but it's pretty funny. I'll post it if anyone is curious.)
The government isn't the only one keeping databases.
I'm seeing a future where it's easily possible for anyone to obtain just about any information they want on anyone else -- not necessarily from government databases.
And has that kept the U.S. military from firing people for being gay?
Yes. They got a lot of flak over that, prompting them to change the policy... I don't know the exact policy now, but according to my cousin in the marines, it's somewhere between "don't ask don't tell" and "just don't hit on the other soldiers".
You put your loot in the cart. You walk up to the scanner. You swipe your credit card. You leave. No cashier to deal with. No lines. No need to even remove the items from the cart.
I love technology.
Ah, yes. If we get federal ID cards, the FBI will no doubt use them to track us and blackmail us. Just like the states do now with the state-issue drivers license. Like the other day... I was thinking of voicing my opposition to a certain state policy (which will remain nameless) when I got a call from Gov. Jesse Ventura (I live in Minnesota). He threatened to body-slam me if I didn't shut up. Needless to say, I complied. (Have you seen that guy?)
::shrug:: Like I said, I have nothing to hide.
That was sarcasm, for those who missed it.
Seriously. You're paranoid. If the FBI started blackmailing people, you can bet word would get out real fast. Why? Because eventually they'd get to someone like me, who has nothing to hide. They could publish a complete list of porn sites I've visited in my lifetime for everyone to see. I really couldn't care less. If anything, they'd just be giving me the evidence I needed to charge them with blackmail, and with the publicity the case would get, you can be sure they wouldn't get away with it.
Anyway, the simple fact of the matter is that personal privacy is going away, and there's nothing you can do about it. Hackers like to talk about how information wants to be free... well, that includes private information. In the not so distant future, you keeping your porn collection secret will be about as feasable as the RIAA keeping people from downloading MP3's. I know you don't like that, and I'm not saying I like it either. It's just the way things are gonna be.
But here's the bright side: It applies to the government, too. Everyone will be able to see exactly what the FBI and the CIA and the NSA are up to, and if they do something that would generally be considered "wrong", people will be free to raise a fuss. And they will. Hell, they already do. The US government is terrible at keeping secrets. Want to know all of the US military's secret strategies? You can read them all over at CNN.com!
What we need to be doing is figuring out how to insure that personal liberty remains undamaged when personal privacy is lost. I think our constitution needs another ammendment that says something along the lines of "No law shall be passed which denies an adult individual the right to perform an act which causes no harm to any individual other than the actor." It sounds obvious, but there are so many laws that do just that. Of course, that's not all that needs to be done. Laws preventing the government from strip-searching political activists for no good reason would be helpful as well. (Fortunately, though, our first ammendment already covers the most important rights of all. As long as it stays intact and as well-defended as it is, I don't see 1984 coming true anytime soon.)
I think a 100% open information society could have a lot of advantages. Frankly, most of the time (note I said most, not all), if you are doing something you don't want people to find out about, it's probably something you shouldn't be doing. Either that, or you're just being too sensitive. Maybe it's just me... if someone IM'd me while I was jacking off and said "hey, are you jacking off right now?", I'd respond "yeah, why?".
To cover some of your examples in particular:
Companies who fire people for being gay are limiting their own selection of employees and making an unprofitable decision. Besides that, such actions tend to generate lots of negative publicity.
Marriages between people who keep secrets from each other are not real marriages. Yeah, I know I just invalidated most marriages. That's too bad. I can't imagine being happy marired to someone whom I couldn't trust with all my secrets.
Health insurance? That sounds like something that could simply be regulated.
I'd like to hear other examples if you have them.
This post is getting way too long. I could go on forever... ok, wrapping it up...
Again, I'm not saying that I see no problem whatsoever with personal privacy going down the toilet. I'm just saying that it's going to happen anyway, so you might as well get used to it. You can spend your whole life fighting it and lose, or you can find something more productive to do. Your call.
Now, where did I put that flame-resistant suit... I have a feeling I might need it.
If the program is running faster than the graphics card can draw, then it has to be held up somewhere, doesn't it? It happens when you call glFlush() or glFinish() (can't remember which one), which is called by the swap buffer function. If, however, your program is slower than the card, then, yeah, it's a non-issue.
Yes, I'm aware that "perfect competition" does not occur in reality. My point is just that it is not unreasonable or unexpected for Marvel to claim no profits on Spider Man. Most people think that a company won't do something if it doesn't generate a profit, but in reality it happens all the time.
And according to my economics textbook, in perfect competition, no company ever makes a profit. After all, if one company was selling their goods at a price that brought them a profit, than some other company should be able to sell for less, and naturally everyone would buy from the cheaper company.
Well, of course that's all theory and it's hard to apply to practice, especially in the case of intellectual property (which, IMO, really needs a completely different economic system to support it, although I don't pretend to know the solution)... but that's the theory. And if you think about it long enough, it makes sense that no good company would ever actually have "profits", although I'm having trouble coming up with a good way to explain why...
I think the real question here is, first of all, how evil was it for them to even offer a percentage of profits to this guy when they knew full well that "profits" don't really exist, and second, how dumb was this guy to accept a deal based on profits rather than revenue?
Lesson to everyone: When negotiating with big companies, never accept a percentage of profits in return for anything. Always ask for revenue, or a set dollar amount.
I do 3D coding in my spare time, and I can't wait for GL2, for all the same reasons everyone else, plus one: asynchronous operation.
:)
Working with a 3D graphics card is sort of like working with a second processor. Ideally, you would send the hardware a bunch of stuff to draw, and then you would do something else with the CPU (i.e. physics calculations) while you wait for the card to draw it. However, with GL 1.x, there isn't any really good way to do this (as far as I know). Once you queue up everything you want the card to draw for a particular frame of animation, you call your swap buffer function and your program just waits for everything to complete. The CPU just sits and does nothing. The only way to take advantage of the situation would be to use multiple threads, but then you run into thread synchronization issues, race conditions, and other crap you might not want to deal with.
With GL2, you can actually have the graphics card signal you when it's done. This signalling is done through low-level OS events, which are OS-dependent (unfortunately), but this means that you can wait on non-graphics-related events at the same time (networking, input, etc.) and handle them all as they happen. No more polling! This is good! Also, instead of queuing up an entire frame at once and then waiting for that, you can queue up bits and pieces and say "tell me when this piece has been drawn".
I guess this excites me more than most people because I am an extreme supporter of event-driven programming. Threads are inefficient and overrated, IMO; a program should never use more threads than its host has processors. Any operation which forces a thread to wait for something cannot be used in such programming models, which means I have a very hard time using GL 1.x effectively. 2.0 will fix that.
Python, Perl, and Tcl are interpreted languages, and Java is semi-interpreted. You couldn't write a 3D game engine in, say, Python (though you could do scripting in Python). In Java it might be possible, but you'd have problems -- like when you try to create an array of 10,000 Vector3's and you end up with an array of 10,000 referenecs to Vector3's and 10,000 separate Vector3 objects all over the place. That's ugly. I'm all for using Java in small applications where efficiency isn't essential, but in some places it just won't do. I'd rather see a cross-platform API for developing C++ apps (something I am currently working on writing, in fact).
The "portability standard" you refer to is POSIX. POSIX, IMO, is a rather poorly designed interface. Many of the functions imply slow implementations (like select() -- there is no way to implement select() in a scalable way). And, of course, POSIX has no GUI facilities. I don't think it is reasonable to say that OS's must support POSIX to be "good" OS's. (Win32 has it's own set of problems, of course.)
Under Windows, you can't use Win32 and POSIX at the same time. So, you can write a GUI program that uses POSIX.
You're right about the blind MS bashing -- it's idiotic. Linux is not better than Windows, and Windows is not better than Linux. It's all a matter of what you want to do, and what your personal preferences are.
Homogeny is bad no matter what system it is. There are a few reasons for this. First of all, all the computers running the same OS are potentially vounerable to the same exploits -- whether than OS be Windows, Linux, BSD, Mac, BeOS, Solaris, IRIX, HP-UX, OS/2... you get the idea.
The reason people tend not to realize, though, is that some people have different preferences! Personally, having used Linux for three years, I have decided that I like Win2k better. I am guessing that many people here would disagree with me on that. I don't care, and neither should they. You want to use Linux, use Linux. Fine with me. But I want to use Win2k.
The thing is, the more people use one system, the harder it is for other people to use other systems. If everyone used Win2k except for Linus Torvalds himself, he'd probably have a hard time finding software to run on Linux. If everyone ran Linux except for Bill Gates, he'd have a tough time finding software that ran on Windows. Homogeneity encourages software developers to write non-portable code.
<tangent><rant>
When you write software that isn't portable, you are limiting you users' freedom of choice of operating system. This is bad, no matter what system you are writing for.
I talked to a guy recently who was writing a free (open source, I think) 3D modeller. He was complaining about getting Direct3D and MFC to work together, so I suggested that he use a cross-platform toolkit and OpenGL. That way, I said, his code would be portable. He told me of his personal distaste for Unix, and that he didn't think there was any value in porting his software to it.
I was shocked. I'm sure many of you were, too. But then, how many of you have written non-portable software for Linux? You probably figured Windows sucks, and there was no reason to support it. If so, you were no better than that guy.
Wonderful platforms like BeOS are suffering because people won't write portable code; there is a serious lack of good software for any OS other than Windows, Mac, and Linux (with a few Unix's managing to get easy ports of the Linux stuff). All because people seem to think that there is no reason to support any platform other than their OS of choice.
Sad, isn't it?
Now, being open source does NOT automatically make your software portable! If you use POSIX system calls all over your code (and I'd hate to see your code if you do), porting the thing to Windows would probably be harder than simply re-writing the damned thing from scratch. You must consider portability from the beginning!
I'm not saying that you should personally port your software to every known OS -- that would be impossible -- but make sure you write it in such a way that it can be easily ported. Use portable libraries, and abstract away any system calls you need to make. Then, port it to as many platforms as you have available. If your software is open source, you can rely on the users of the target OS to port your program, provided that you have written it properly. If your software is closed source, you will probably find that porting to alternative OS's is fairly cheap and, in many cases, well worth the money -- again, if your code was written to be portable. Just, please, don't force your users to use *your* preferred OS! Give them a choice!
</rant></tangent>
I was on summer vacation in high school with nothing to do for months. So, I was able to download massive documents like the Linux HOWTO's and use them to learn how to do things. I learned how to recompile my kernel within the first few days. I was playing mp3's before I had a GUI. I installed X manually (albeit from binary packages).
It took a few weeks of playing around, but it was fun, and I quickly learned more about Linux that most Linux users ever do. Later, when I switched to Red Hat, it was a piece of cake to use. Later still, I switch distros a few times -- basically, I would stick with a distro until it did something that pissed me off (like Debian automagically upgrading me to versions of my software that didn't work).
I have used Linux for three years. It has been my primary OS for the later two. I was a Linux zealot for the first two (how embarassing!).
I have now decided that I am sick of Linux, and I am in the process of converting over to Win2k. It was fun for awhile, but I've had enough. But, then, that's just me. You may come to a different conclusion.
If you have the free time, I strongly recommend diving into the deep end and doing stuff manually. An easy way to do this is to install a skeleton Debian system and then pretend the package manager doesn't exist.
If you don't have that much free time, though, go for Red Hat. It's easy, and it really isn't as bad as people say it is.
And if you have no time at all, stick with Win2k. Despite what people who have never used it say, it really isn't a bad OS at all.