Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bzn

Pages: [1]
1
Quote
O(n) is worst-case and O(1) is best case, compared to my own class which is O(1) worst-case and O(1) best case.

Still, you should check with a profiler, if this worst-case O(n) is really a bottleneck and deserves spending so much time on it.

Quote
Readability is not the exclusive criterion, nor should it really be expected in coding

I strongly disagree with you here. Readibilty is a very important criterion for maintainability and thus should be expected in coding. After all, others are supposed to read your code, too.

Quote
I am not sure how exactly my code is not doing what it says. You have a renderer that renders, an image queue that queues images and a imagefile that loads images. How exactly would you make it any more explicit than that?

It's not explicit - that's the problem.
It's implicit, that "Queue = ImageLoader" appends the image to the image queue. After all, it could also prepend or insert in the middle.
The same goes for overloading the ++ and -- operators. They don't have an intuitive meaning for lists and should thus not be overlaoded.

Is there any special reason, why you don't want an STL-like interface?

2
SFML projects / Falling Rocks! (demo inside)
« on: September 09, 2011, 05:41:56 pm »
Love this game! Reached 2100 points in hard mode, after a "almost-hit" combo of 19 or so. :)
It's actually almost too easy to get many points by these combos.

3
Quote
You might argue the latter will grant you more control (granted, writing from scratch will do that for you), but it won't make it more manageable, so maintainability is more difficult.

Actually, I'd argue that the latter is much more readable, because it actually says what it is doing.

To understand your code on the other hand, I'll have to learn your strange overloads, which I've never seen elsewhere.

As everybody else here, I'd say: Use the STL containers and roll your own if, and only if, they are really your bottleneck.

Just my 2 cents...

Pages: [1]