simplicity

Should you avoid object inheritence when persisting to an RDBMS solution

While looking at this question: Why all the Active Record hate? I found myself thinking of a general theme that ActiveRecord pattern is good when you have little or no inheritence in your objects, and DataMapper, while more complex, works much better if you do. Given that its never possible to perfectly match objects to relational datab...

What XNA based 3D terrain and physics libraries exist?

I'm planning on creating a game that contains a landscape with objects on it. The landscape will be defined using a heightfield, and the objects will move about on top of, and fly over the terrain. If you've ever played the old games Marble Madness and Virus/Zarch, that's the kind of complexity and style I'm trying to create. I've seen ...

2d graphics effects 101: throwing something

I have a page in my desktop app, and I've implemented simple grab-and-pan. It works great. When you are panning in this way and you are release, the page stops dead where you dropped it. I'd like it to continue slightly with some momentum, and stop eventually. Rather like the 'throw' in the iPhone UI, I guess. I'm not really chasing...

Why do people use Java?

I've become very curious lately, what is it about Java that made it so popular? I've avoided learning it in detail because it seems like a very poor language at a very basic level. A good language should make simple operations simple (not too much boilerplate to do something simple and common like loop over a collection, create a helpe...

Is Rails a Black Box?

I've been doing some simple rails Apps lately. I know ruby quite well, but when I started doing things "the rails way" I noticed that some things were done "just because" and It's hard for a (rails) newbie to know what does the code do. Has rails missed the point and turned into some kind of 4th generation language? I mean, you HAVE to ...

What is "Simple"?

I've been thinking about the definition of "simple" for a while now, spurred by things like "Real Simple" magazine, which is essentially a vehicle for advertisements for more stuff to buy that clutter up your life. Some people see doodads, like remote controls, as simplifying your life, while others see the remote control as something ...

SQLAlchemy is convoluted?

This may seems rather argumentative, but I just went through SQLAlchemy's ORM tutorial and ended up with the following code: from sqlalchemy import create_engine from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker eng...

What's a programming example of: "If you hear hooves, think horses not zebras"?

In medical school they teach students: "If you hear hooves, think horses not zebras". In other words, look first at the simplest explanation for a problem. What's a programming example of this? ...

What code could be used as a string aggregator for Sybase? (Like Oracle's stragg)

In my travels in Oracle, the 'stragg' function, or 'String Aggregator' was life-saving when I had to create dynamic SQL queries on the fly. You can read up about it here: http://www.oratechinfo.co.uk/delimited_lists_to_collections.html The basic use of it was: select stragg(fruit) from food; fruit ----------- apple,pear,banana,strawb...