philosophy

Design Pattern Orthogonality

Reading up on design patterns, and have found that there are 23(?) some-odd patterns that have been defined. I've seen a bit of overlap in a few (ie. builder and decorator) that would suggest either a. I don't fully understand the given patterns, and the differences between them b. Some of the design features of a few patterns overl...

When should I ask myself if my method is thread-safe or not?

Hi, When should I take it into consideration whether my method is thread-safe or not? thanks, kalem keki ...

Can a program output a copy of itself

I think this might be a classic question but I am not aware of an answer. Can a program output a copy of itself, and, if so, is there a short program that does this? I do not accept the "empty program" as an answer, and I do not accept programs that have access to there own source code. Rather, I am thinking something like this: int ma...

What is ExtJS philosophy? Single page application?

I need to write my next project using ExtJs. It's a nice Javascript lib but I don't fully understand the idea behind it. Take the docs page for example: http://www.extjs.com/deploy/dev/docs/ Am I supposed to write my web applications with extjs like that? One page that should never be refreshed, and everything getting done by AJAX? How...

Flexibility or Consistency, which is Correct for a good programming language?

Hi All: Recently I'm pondering the characteristics of a good programming language. It's true that "There are a thousand Hamlets in a thousand people's eyes", like simplification, explicitness, readability and more. But I'm wondering a good programming language should be consistent, which means everyone will write the same(at least very...

What is the reason for not allowing in C++ a default value for a variable to be a non-static method or member of a class ?

I wanted to know why the default value for a variable for a method of a class, cannot be a non-static method or member of the same class. Is there a reason for that ? Could not the compiler provide to the method the position in the class of the non-static default value ? I tried to google quickly for an answer but I could not come up w...

Philosophical Design Questions for OOP-Tetris

You are writing a Tetris program in Java. How would you set up your class design with regards to the following aspects? Piece class: Have one Piece class, with an internal array which determines the shape of the piece, versus having seven Piece classes, one for each of the pieces. They are all subclasses of one generic Piece class. Pie...

Modeling Existential Facts in a Relational Database

I need a way to represent existential relations in a database. For instance I have a bio-historical table (i.e. a family tree) that stores a parent id and a child id which are foreign keys to a people table. This table is used to describe arbitrary family relationships. Thus I’d like to be able to say that X and Y are siblings without ha...

Books about the philosophy of software development

The first time I read The Mythical Man Month, I found the book utterly boring, a waste of my time, and thought it was written by some management guru that never wrote a line of code. A few years later, I realized Fred Brooks won the Turing award. Some years after that, after a few large development projects, I started understanding wha...

Paranoid attitude: What's your degree about web security concerns?

Hello, this question can be associated to a subjective question, but this is not a really one. When you develop a website, there is several points you must know: XSS attacks, SQL injection, etc. It can be very very difficult (and take a long time to code) to secure all potential attacks. I always try to secure my application but I don...

Examples of relations between philosophical concepts and development paradigms

During your development experiences have you found any relation between philosophical concepts and development paradigms? Although, there is no hard reciprocity, I think that learning about those relations gives clarity on methodologies/paradigms/process understanding. Or at least should be inspirational. I've found some examples: He...

What is so special about Lisp?

Possible Duplicate: Whats so great about Lisp? What is it that makes Lisp so special? Why is it repeatedly held up as an example of what a programming language should be? I've got a pretty deep CS background here, if you need to get technical, by all means do so. Still, I think what I'm asking is how does working with Lis...

A class subclass of itself. Why mutual subclassing is forbidden ?

Complex question I assume, but studying OWL opened a new perspective to live, the universe and everything. I'm going philosophical here. I am trying to achieve a class C which is subclass of B which in turn is subclass of C. Just for fun, you know... So here it is >>> class A(object): pass ... >>> class B(A): pass ... >>> class C(B)...

Using email instead of login name in django

Hi all, Firstly, this is not the question how to authenticate on email/password pair, but rather how to produce logical, and if you like, beautiful data structure. I want to use emails as user names in a given django project. However, I am unable to re-use fields provided by auth.User model for at least two reasons: auth.User.usernam...

Java language philosophy question

Why was java defined such that methods may take as input multiple parameters, but may only return a single object (or void)? Did it make the language somehow easier to implement or use? ...

Do I need to auto-login after account activation?

This is the standard scenario: User registers on the site User receives an account activation email, clicks link to activate Web site notifies the user that account is activated Now there are at least two pathways: User is taken to the login screen and asked to enter login details User is automatically logged in and taken to a welc...

How to make efficient code emerge through unit testing ?

Hi, I participate in a TDD Coding Dojo, where we try to practice pure TDD on simple problems. It occured to me however that the code which emerges from the unit tests isn't the most efficient. Now this is fine most of the time, but what if the code usage grows so that efficiency becomes a problem. I love the way the code emerges fro...

What does it mean that "Lisp can be written in itself?"

Paul Graham wrote that "The unusual thing about Lisp-- in fact, the defining quality of Lisp-- is that it can be written in itself." But that doesn't seem the least bit unusual or definitive to me. ISTM that a programming language is defined by two things: Its compiler or interpreter, which defines the syntax and the semantics for the ...

Is this overly clever or unsafe?

I was working on some code recently and decided to work on my operator overloading in c++, because I've never really implemented it before. So I overloaded the comparison operators for my matrix class using a compare function that returned 0 if LHS was less than RHS, 1 if LHS was greater than RHS and 2 if they were equal. Then I exploite...

using PHP for "Fluid" design(using viewport resolution)

I need some opinions on using PHP to make completely "scalable" websites.. For instance, using viewport resolution and resizing images, applying dynamic css styles..... In my mind doing this just add's to the complexity and should not be done, it should be fixed or fluid using strictly css and no server-side languages to generate layouts...