1,633 reputation
56
bio website sivut.koti.soon.fi/~terop
location Finland
age 40
visits member for 3 years, 8 months
seen yesterday

Feb
28
comment Polymorphism Question
that's why the prototype needs to be present in the base class and all Triangle functions need to have the same prototype as the functions in the base class.
Feb
28
comment Bad sign if nobody can comprehend one's code?
Programmers need to actually design their code. Most of the time clear nice code is the best alternative, but there are also situations where cryptic code is better -- for example if the logic is important and you don't want people to modify it unnecessarily; cryptic code might prevent unwanted modifications to the code. It's also better for job security....
Feb
27
comment Polymorphism Question
Your example is almost exactly valid polymorphism example, except that Rectangle and Triangle are missing constructors with additional parameters.
Feb
27
answered Polymorphism Question
Feb
26
comment An embedded C developer wishing to interface some code with a web page
cgi scripts can run any C code in the web server, and then its just matter of passing the data to correct place.
Feb
22
answered How to refactor my project to have less mutable objects?
Oct
9
answered How to abide the “allocate in caller” rule when the size is computed in the callee?
Oct
8
comment Does C++ abuse the stack?
c++ stack usage could be calculated on compile-time, except for recursive functions.
Oct
3
comment Is it possible to antialias existing lines, circles, text, etc. of a single color?
good plan is to render to (larger) bitmap, and then blit to screen and use multiple pixels of large bitmap to generate single pixel on output bitmap.
Sep
16
comment Are Git branches, in fact, “homeomorphic endofunctors mapping submanifolds of a Hilbert space”?
Sounds like someone tried to read a math book, but failed.
Aug
30
awarded  Yearling
Aug
2
comment How modularized should my interfaces be?
No the real problem is that to call enqueue, you must first check if the operation is allowed. Now If you have algorithm void algo(queue<int> &q); then that algo is NOT asking permission to call enqueue, and thus the algo would not work for bounded_queue. Thus the empty() and full() needs to be in original queue interface.
Aug
2
comment How modularized should my interfaces be?
They should be in same interface. Reason: full() is a condition whether you're allowed to call enqueue(), and empty() is a condition whether you're allowed to call dequeue(). Thus they should be in same interface.
Jul
15
answered Programming with emacs instead of a debugger-integrated IDE
Jul
6
comment Screen out software engineers with poor communication skills?
@michaelT: Well, the outsourced folks from india managed to write good enough design documents, and they definitely didn't have perfect english language skills. I wouldnt show the docs to paying clients, but they managed to communicate the information programmers need to understand the code.
Jul
4
revised How many mistakes does a good software developer make?
added 4 characters in body
Jul
4
comment How many mistakes does a good software developer make?
randomA: You're right about this. Relying on language features you don't know well, or if the requirements have unknown parts is a big red flag for writing correct code. Good plan is to use your free time to experimentation of different primitives, so that you don't need to do guesswork while writing the code.
Jul
4
revised How many mistakes does a good software developer make?
added 161 characters in body
Jul
4
answered How many mistakes does a good software developer make?
Jun
5
comment Is there a Design Pattern for preventing dangling references?
easy way to avoid the problem is by collecting all deletes to same place in the code, thus deletions happen in large groups. ownership of the object need not be in the handle...