Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

190 Neutral

About Matei

  • Rank
  1. Bah, the problem is that those designers want 24-bit colour. Render your graphics in 8-bit, compress them as GIF and you have no problem.
  2. Actually 0 = 2^32 (on a 32-bit machine): int main() { int i, n = 1; for(i=0; i<32; i++) n *= 2; printf("2^32 = %d\n", n); }
  3. Matei

    Noah's Ark Found?

    Quote:Original post by Machaira I never said they were "consciously doing something bad". Yes you did. You said "resist". Resist is defined as "to strive to fend off the action of something", which is a conscious, intentional activity. Furthermore, resisting the ultimate (and sole?) source of good in the universe is clearly not a good thing. In other words, other people are doing this fundamentally bad thing by resisting, and you are one of those who doesn't.
  4. Matei

    Noah's Ark Found?

    Quote:Original post by Machaira The fact that God has shown it to be true. Can you please explain this in layman terms? So far your argument seems to be that those who don't believe the same things you do are "resisting" the drawing. This is an awesome argument - accuse other people of consciously doing something bad that makes it impossible for them to understand you.
  5. The "hurting the economy" argument misses a couple of fairly important points: 1) What is the purpose of a strong economy? We're not just trying to improve it just to get a high score on some list. The purpose of improving the economy is ultimately to improve our quality of life - which is the purpose of having a country in the first place. Pollution unquestionably lowers quality of life. Furthermore, it's very hard to reverse - we can't just decide 10 years from now "ooh, I need that air pollution cleaned out from my back yard, I'll pay someone $100 to do it" the same way we can pay to fix other problems. In other words, the free market solution - wait until people demand it, then provide it - is extremely inefficient and perhaps technologically impossible too. Pollution is a long-term problem, and it's much more efficient to address it now than later. 2) Quality of life aside, pollution destroys other resources and can lead to an overall loss that is more harmful to the economy than a slight increase in the price of power. It destroys forests and crops, and it also harms people, one of our most important resources. When someone is ill or dead, they're not working. When consumers are spending their money on cancer treatment, they're not spending on other things that could improve the economy more. Again, I haven't even mentioned global warming. It's fairly clear that an increase in sea levels would be devastating to pretty much any piece of the economy that happens near a shoreline, and an increase in violent weather phenomena is not particularly beneficial either. With this in mind, remember that we're arguing not over reworking some giant chunk of the economy, but over installing better filters and alternative power sources (e.g. nuclear or hydroelectric). A fixed cost, which translates to a small increase in the price of power. Saying that this could destroy the economy is absolute nonsense. The main thing it does harm is the pocketbooks of a few coal/oil companies that would now be forced to upgrade their operations or innovate.
  6. I live in Canada in an area with many immigrants, and interracial couples are very common. Coming from where I do, I honestly can't see how one could find it creepy. Maybe it's less common in your area, but it's certainly not a reason to be concerned or ashamed. There's nothing biologically wrong with "mixing up" the gene pool either (if that was a concern). First of all, despite differences in appearance, humans everywhere are genetically very similar because we're a young species, so it's not like you risk having an offspring with genetic problems. Second, creating new combinations of genes is the whole point of evolution.
  7. Matei

    Mexico invades U.S

    I don't understand why people consider immigration a bad thing for the economy. If immigrants are being hired, it means that some employer thinks they're worth hiring. That means that employer will be able to offer you cheaper products and services. When you're walking down the street and you see a sale in a store, you don't ask "what about the other stores who don't want to lower their prices"; you're just happy that there is a sale and you buy stuff. How come when there's a price reduction on labour it becomes a bad thing? And if the immigrants compete with Americans, so what? Any Americans who really want to do those jobs can offer to work for the same rate and still make a living (since obviously the immigrants are making a living), it's not like they'll starve, and any Americans not happy with the lower wages have an incentive to look for training for a more "skilled" job, which is good for the economy. Also, remember that the money the immigrants are paid doesn't disappear into a black hole; with it they buy American products, and unless you're in an industry competing directly against them it's likely that the demand for whatever product you help make is unaffected. It's true that it would be good from an administrative and tax point of view if more immigrants were legally registered, but that is an issue with the immigration process; as long as they are working they are clearly worth having here, since someone thinks it worthwhile to hire them.
  8. Matei

    Slobodan Milosevic dieded...

    Quote:the answer is the same as to the question: when was the last time people seriously had to compete for resources? What do you mean? Virtually no previous war was a fight for resources. They were fights out of greed and hate, because attacking an enemy you consider inhuman is easy and getting other people to fight them for you is even easier. What resources exchanged hands in WW2? Almost its participants came out more prosperous than they went in. What resources did the Roman, Ottoman, French or British empires "seriously" have to compete for? How come today we support 10 times the population we had a few hundred years ago, using the same resources that people "fought for"? Quote:what if there isnt much to trade left? I'm not sure what exactly you mean by this - there are 2 ways to interpret it. First of all, if you mean natural resources could run out - that's probably not going to happen; oil and coal might run out, but there are substitutes which are too expensive to use now but could be used eventually; it's also possible that we'll hurt the environment enough to make survival difficult, but it's unlikely for that to be permanent, and clearly that's unlike any war that has happened before in any country. Second, you could mean "what if some countries have nothing left to trade because others are better at producing stuff than them". In this situation, it's still advantageous for both parties to trade - it's called comparative advantage. Essentially, each country should be producing the one thing it produces best (which exists even if it produces everything worse than some other country), and then they should trade these things, since this way overall output is maximized. It's partly the reason why peoples' jobs are so specialized: With their education, any lawyer could probably do amazingly well as a secretary, better than anyone they could hire; yet lawyers still hire secretaries since they can do even better by spending their effort on other tasks, which nobody else can do as well as them. (Don't ask me what those are). Quote:Seriously, though, just becasue your fancy-assed developed country is enjoying a few decades of relative peace doesn't mean that we can stop caring about war-crimes. Have you taken a look at Africa or the Middle East lately? Let's see you "establish an interdependence (trade, the union, etc) and fight the "age-old" nationalistic conflicts for a while" in those regions. They fight their age-old nationalistic conflicts with Kalashnikovs and car bombs, and if they can't afford those, they use machetes. There cannot be peace everywhere, all the time. We cannot enforce peace, as the US is slowly learning. But we can work toward order, and we can hate evil. Sorry if I wasn't clear, this was exactly my point, that you shouldn't not care about these because "wars will always happen", that you should try to work towards order. I was taking it a little further - you can achieve peace if what you're looking to achieve is genuinely peace and not subservience. It's been done in exactly the places I mentioned, such as Europe, where people fought their conflicts quite happily with swords and guns for centuries before. The UN has been doing it in a number of places quite recently. It's also been done in the US after WW2: read some anti-Japanese or anti-German propaganda from WW2, it's amazing how hateful it was, yet (hopefully) we don't feel that way about Japanese or German people today.
  9. Matei

    Slobodan Milosevic dieded...

    Quote:War is an inevitable aspect of human civilization, and we have just enough enlightened self interest to realize that we can't prevent it, but that we can make rules that lessen its inevitable impact on our lives. This attitude annoys me to no end. Since WW2, when was the last time a Western European country was in a large war? Remember that these guys were at each other all throughout the middle ages. When was the last time Canada or Australia were in a large war? Since the Civil War, when was the last time two American states were at war with each other? Preventing war is very easy, you just establish an interdependence (trade, the union, etc) and fight the "age-old" nationalistic conflicts for a while until people realize they don't mean anything. There are no Huns or Goths today who might come in and wreak havoc without you ever knowing they existed. Building an international community in which war is impossible has been the whole point of post-WW2 foreign policy for the most highly developed nations, except in a few cases where self-interest sometimes still took precedence. If you don't make an effort though, you won't get anywhere.
  10. Matei

    14th March...Pi Day

    At my university (Waterloo), the math students' society gives out free pie on Pi day. It's great.
  11. Matei


    Quote:Original post by Witchcraven Why is there something rather than nothing? Because if there was nothing, you wouldn't be here to ask that question.
  12. Matei

    ASM Adventure (Chapter 1: "Goodbye World")

    You're almost completely wrong about programming being about memorization. Once you understand the basic concepts of programming - what a variable is, what a function is, what an object is, etc - all libraries for doing specific tasks work within the same framework, and to learn how to do a new task you just need to search the documentation for some examples. Just as a random example, I needed to know how to download a file from an URL in Java (e.g. to download the latest contents of http://gamedev.net). I Google for java read url and voila, the first hit shows me how to get an input stream and a text reader from an URL. Now I had used input streams before, but if I hadn't and I wanted to know how to do something like read the contents byte by byte I could google InputStream and see what functions it has. If I had a smart IDE it would even show me all the functions in the InputStream object when I type "." after it. The point is that every line of code in that example involves either creating a new object or calling a function of an object, and the only thing I had to learn is what specific objects to create for this particular task (an URL object) and what methods to call on it (openStream()). I don't need to know anything about how the web works or how Java's particular networking libraries work (and some pretty complex things do go on to bring your web pages to you). If you want to learn useful programming quickly, I strongly suggest getting a beginners' book in C++, Java or C# and just reading through it. What's the worst that can happen? Your brain won't burn out, you can always go back to assembly. (In fact learning assembly is good anyway for any programmer). For Java there's also The Java Tutorial online, which is very well-written; I don't know any similar online tutorials for C++ or C#. Out of these three languages, Java hides the most from you and is also the most long-winded to program in, and C++ requires the most understanding of how the machine works and is the most likely to confuse you when you do anything wrong. I think there are two reasons a lot of people have trouble learning programming, other than simply lack of interest (creating cool stuff out of pure logic all day? nope, not for me!). Firstly, a lot of programming is taught by examples, but to create something new yourself you have to put in time to understand the concepts, and many people who try to learn programming focus on how to get a particular thing on the screen instead of what each line of the program means and why it does what it does. (The concepts I'm talking about are things like variables, functions, objects, etc). Secondly, programming does involve a lot of logic problems (some small ones and some big ones too). First, there's debugging. You'll run into this whenever you try to write a nontrivial program and it doesn't work: you now have to figure out why it's not working, and this is a process of elimination and deduction (what could cause this particular error? out of these possible causes, could it be this one? etc). Hint: put lots of print statements in your code so you can log what's going on and figure out where a problem happens, and learn to use a debugger to step through code. Every programmer runs into hard-to-track bugs once in a while, but when you're starting out and you don't have a firm grasp of the concepts it can seem overwhelming, especially if you were never one to like logic and you can't quickly jump to the possible causes from the problem. Second, there's design problems - how do I come up with an algorithm that does this particular thing, given that I know how to do these smaller things? How do I make sure I can add in these features later? Luckily most things you do might not involve very heavy algorithm design (though that's fun) but there's still some logic required there. The really heavy design comes in when you're making a big application (which shouldn't fall apart under its own weight because you've stuck together random hacks without any plan) or when you're doing anything that needs to be efficient (e.g. a game) or any complex calculations (simulating physics vs. displaying a message box).
  13. Your eyes have a very small field of view for clear vision and they move around quickly as you examine different parts of the image. So you don't need to worry about making the image less clear away from the center, since it will look equally clear everywhere in real life. It's true though that you can't see colours as well in the dark. If it's really dark you also start to see "noise", which might be possible to simulate with some post-processing effects.
  14. Matei

    Creating a video in IE...?

    Just be advised, ActiveX is pretty outdated and almost nobody develops actively in it anymore. What exactly are you trying to learn here? If you're trying to learn about video and networking, just write a standalone server and client application (like your own RealPlayer.. though hopefully less annoying). If you're trying to learn about ActiveX and writing plugins for IE, why do you want to do that? Those API's aren't particularly outstanding examples of software engineering (i.e. you won't learn much that you can apply anywhere else) and they're becoming less and less relevant. One possibility is that you're learning stuff through an older Windows programming book, because these tend to have lots of ActiveX examples - keep in mind that you can do way more interesting things in C++ than Windows applications and ActiveX controls. Also, if you want to develop Windows applications as a job, learn .NET and C# (it's really not that different than C++).
  15. Matei


    You can use an anonymous namespace to avoid bloating the global namespace. The anonymous namespace is only visible in that cpp file: namespace { struct Foo {...}; } void fkn() { vector<Foo> v; ... }
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!