Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Design Patterns by the Gang Of Four (Score 1) 247

Well, I'd argue that a library that needs a single global init call is itself a poorly implemented singleton with all the associated problems. It is unfortunately a common occurrence and wrapping it in a singleton class is a way to deal with it. But in my opinion that is making the best of a bad situation rather than a pattern that I'd recommend if you have anything to say about the library interface.

I have seen a lot of singleton use in C++ unrelated to libraries and most of those uses became problematic at some point. In C++ in particular, the fact that with a singleton you can't control the moment it destructs can be a problem if the destructor needs to do more than free memory.

Comment My favorites (Score 2) 247

Computer Architecture: A Quantitative Approach by Hennessy & Patterson
Helps you understand what goes on inside a computer at the hardware and OS level, as well as illustrating how you can reason about the performance of a system before you actually build it.
Computer Graphics: Principles and Practice by Foley & van Dam
A good starting point for learning about computer graphics. Not all of it is still relevant, but even if you skip the chapters about vector displays and user interfaces there is still plenty of useful material in there.
Programming: The Derivation of Algorithms by Kaldewaij
Teaches a way of constructing algorithms that are provably correct. Although I rarely follow this approach to the letter (it is very time consuming), elements of it are extremely valuable in everyday programming. For example, thinking in terms of preconditions, postconditions and invariants (design by contract) helps in designing good interfaces, finding bugs, placing useful asserts etc. Even just thinking to yourself "could I prove this program?" without actually doing it is useful, since if the answer is negative, the program is too complex and probably incorrect.

Comment Re:Design Patterns by the Gang Of Four (Score 1) 247

If you don't read the book until you have lots of experience, you will probably have reinvented most patterns, but using different names for them which will only confuse other people reading your code. Overuse of design patterns may be a necessary developmental phase ;)

By the way, while it is in the GoF book, I'd argue that Singleton is actually an anti-pattern.

Comment Re:The flaw in the Fermi Paradox (Score 1) 608

Analog broadcast radio would be relatively easy to pick up on a faraway planet and identify as a signal. But how much longer will we be using that? If all communication is compressed and/or encrypted digital point-to-point, if something leaks into space at all it will look like a weak noise. I think that if the radio search picks something up, it would be because an alien civilization is deliberately sending out a signal to be noticed, not because we picked up their normal means of communication.

Comment Re:Just more bullshit (Score 4, Insightful) 410

I don't think asymmetric bandwidth is the problem: even with user-generated content, there will be more downloads than uploads: you post on a forum, multiple people read it, you share a photo, multiple people see it. Unless you advocate everyone to run home servers or a massive switch from client-server to peer-to-peer, having asymmetric bandwidth is not a bad idea.

One problem is that the big ISPs don't want to be in the business of moving network packets; they want to be in the content business, because they see more potential profit there. They see the internet as a way of delivering that content: like you said, as a broadcast medium.

Another problem is closed services. For example, every social network has their own private/instance message system, instead of using standard protocols like IMAP and XMPP. This means you have to use the same service as your friends to be able to communicate with them. So even for non-broadcast use, power is becoming concentrated. The internet is moving further and further away from its decentralized roots.

Comment Re:Good fast lane does not imply bad slow lane (Score 2) 410

If you pay attention to recent events, you'll see what happens in practice:

  • Netflix subscribers complain high resolution streams don't play well.
  • Comcast refuses to do anything about that problem unless they're paid by Netflix.
  • After some protest, Netflix caves in and pays Comcast.
  • Soon after, high resolution streams play fine.
  • Netflix announces they will raise their subscription rates.

So in the end, Netflix subscribers end up paying more and Comcast receives more money.

And switching from Netflix to a smaller content provider has the problem that "smaller" doesn't just mean they have fewer subscribers, it means they have fewer content to choose from as well.

Comment Re:"beofuels from corn" is not just stupid (Score 1) 159

How much of the total plant bio-mass are you processing to start with when you are dealing with corn? 2%? 3%?

This research was about making biofuel from cellulose, which means that stems, leaves etc are used as well. But apparently even that is not sustainable because corn takes a lot of its carbon from the soil instead of from the air.

Comment Re:Here's a trick: Don't live in the U.S. (Score 1) 390

The main VAT rate went up from 17.5% to 21% iirc, but food falls under a special VAT rate of 6% that has stayed at the same level afaik. There is a new "packaging tax" which was supposedly introduced to discourage unnecessary packaging material, but I don't think it actually changed anything except the price.

We had something like 5% inflation for several years in a row around 2000. Many people blame this price increase on the switch to the Euro in 2002, but there were significant price increases in the years before that as well. I don't know the reasons behind those increases. In the years after, we had a "supermarket war" where the supermarkets lowered their prices one after another to attract more customers, which has reduced their profit margins significantly. So that's probably not where the high cost is either.

Even so, there are plenty of tasty dishes you can make from cheap ingredients like carrots, onions and cabbage. Meat is the most expensive ingredient, but you need hardly any meat at all from a nutricional point of view (provided you get sufficient proteins from other sources), so if we're talking about starving students then meat is optional.

Comment Re:Here's a trick: Don't live in the U.S. (Score 2) 390

Food is not that expensive in Europe, if you buy in-season vegetables and cook them yourself. Driving a car is expensive, but in many countries you can get by without a car. Typically people get their first car when they get their first full-time job. If you're studying in Europe, drive a car and don't have enough money to eat properly, I'd say you made the wrong budget choices.

When I was a student (in the Netherlands in the late 90's), housing was the largest expense. Second was the tuition costs. Food was third, but a lot below housing and tuition. Books were expensive a piece, but fortunately our university didn't require a lot of books to be bought: they tried to use books efficiently (only require a book if a lot of chapters were used; use the same book for multiple courses if possible) and offered a lot of their own material at duplication price (about 1/5th to 1/10th the price of an academic book). Looking at my bookshelf I count 14 books from my studies and I think I sold one, so 15 books for a master's degree.

Comment Re:here's the data (Score 1) 103

The problem with SC2 is that it is actually a sport: if you don't practice regularly, your performance drops a lot. You can have a great strategy, but if you get supply blocked in the first 5 minutes because of an execution flaw or you neglect your base when you're attacking the opponent mid-game, the strategy may not matter. I play the game from time to time, but in bursts of a few weeks of playing several times a week followed by months of not playing at all.

Another factor that makes the game less attractive to players over 30 is that it is quite intense: you need to keep focused throughout the entire match. It is probably not the most attractive choice of game after you come back home from a day at the office. It is also not something you can play just before going to bed.

Comment Re:I went to see WATCH_DOGS at PAX East (Score 1) 43

Give a discount on a digital download. Generate unique discount codes (random numbers) and allow each number to be used only once by keeping track of which numbers have been used.

Alternatively, accept the fact that the code will be shared and make it a small discount and/or only valid on launch day, to stimulate impulse buys. People will feel they got a good deal by outsmarting your system, while it was calculated from the start.

Comment Re:I on the other hand... (Score 1) 165

The computer lab in my primary school ran on C64s and I own a working MSX (home computer from the same era as the C64). I know how fast they boot. I haven't booted a Raspberry Pi yet, but I have run and built several embedded Linux systems. I'm sure booting Raspbian into X11 will take a while, but if you build a dedicated image for running a single emulator it could boot very quickly.

I'm not comparing a full XFCE/X11/GNU/Linux stack to a dedicated emulation OS, I'm comparing the Linux kernel plus a boot script to a dedicated emulation OS. Sure a dedicated OS could be more efficient, but then you'd want support for HDMI, composite video, audio, SD card, file systems, USB mass storage, USB keyboards and game controllers etc. and when all that is implemented and working reliably you've spent at least months and probably years in development. That's a lot of effort to go from a 3 second boot time to 500 ms. And then you find out that the real limit to boot time is how long it takes for your TV to switch to the right HDMI input...

Besides, you could cheat: screenshot the C64 title screen and display that as a splash screen. That's what iOS apps do to make it feel as if they launch instantly. Then run the first second or so of emulation in fast forward mode to compensate for the time the kernel took to initialize.

Comment Re:Hearthstone is good. (Score 3, Interesting) 181

I'm enjoying Hearthstone as well.

Something some players may not realize is that when you're playing other humans in a ranked system, if you win half your matches, you're doing OK. You can win more if you're new or if you're improving rapidly, but then your ranking gets adjusted and you'll face tougher opponents.

It's a collectable card game, so having more cards will give you more options. If you want to be able to compete with people who have been playing for months on your first day, you'd have to spend a lot of money. But you wouldn't be able to build a good deck out of those purchased cards with so little experience, so it's a rather pointless criticism. If you play now and then for a few weeks you'll get a decent set of cards and you'll learn how to use them. And every level of rarity has good cards, you don't need a lot of rare cards to make a good deck.

Reading the forum posts about Gelbin Mekkatorque (a promo card given to people who purchased something during beta) was hilarious. Some people complained that handing out a promo card like that was pay2win. Others complained that the card was seriously underpowered and they felt ripped off. So in the end it shows that you simply cannot make everyone happy. (In my opinion, the card is way too random to be used in a competitive deck, but it is quite funny.)

Slashdot Top Deals

The Tao is like a glob pattern: used but never used up. It is like the extern void: filled with infinite possibilities.

Working...