The three golden rules to ensure computer security are: do not own a computer; do not power it on; and do not use it.
That's from computer security pioneer Robert Morris, who passed away recently.
The three golden rules to ensure computer security are: do not own a computer; do not power it on; and do not use it.
That's from computer security pioneer Robert Morris, who passed away recently.
A class has many students. A student has many classes. In data modelling, this is a classic example of a many-to-many relationship. Type "Student = Class" into Dubbiya, my nascent browser-based, HTML5-dependent entity-relationship modelling tool, and until today, you got a Student entity, a Class entity, and a line between them.
The problem is, relational databases can't actually have real many-to-many relationships. You need to simulate them using an in-between table. Dubbiya now creates this for you:

This reflects my intention that Dubbiya be a tool for physical data modelling, not logical data modelling.
This is a question whose answer I can't find.
When you put some JavaScript in a web page, you use this syntax:
<script type="text/javascript">
document.write("Hello World!")
</script>
You explicitly state that this is JavaScript.
It's been 16 years since JavaScript was invented. Why have no alternative languages been developed and added to HTML? Clearly HTML allows for the possibility. JavaScript is a language created in ten days, launched without time to go through a "are we really doing this a good way" phase. Hence there are several bad things in JavaScript. An more rigorously developed alternative would be valuable.
CoffeScript exists. But this must be compiled into JavaScript before adding to a web page.
So JavaScript doesn't have type-checking. Which was the root source of a bug that took me a while to find.
I'm so much more comfortable with strong type-checking. In many languages, I can create a new type, including its allowable values. In Java, for example, here's a type I created:
public enum RelationshipType {
ONE_TO_ONE,
MANY_TO_MANY,
ONE_TO_MANY,
MANY_TO_ONE
}
Now I can specify that a function (method, actually) only accepts one of these four values wherever I need a relationship type.
In JavaScript, a function parameter can be ANYTHING - number, string, array, or object. You need to manually check the values. Which leads to template code like this:
function createRelationship(type) {
if (!(type === 'one_to_one' ||
type === 'many_to_many' ||
type === 'one_to_many' ||
type === 'many_to_one')) {
throw 'IllegalArgumentException';
}
// now do the actual stuff for the function
}
In Java I like to use the Preconditions class from Google's guava-libraries. I wondered if I could do something similar in JavaScript to avoid this template code for simulated type-checking:
if (typeof dubbiya === 'undefined') {
dubbiya = {};
}
if (typeof dubbiya.preconditions === 'undefined') {
dubbiya.preconditions = {};
}
dubbiya.preconditions = {
checkArgument : function(expression) {
if (!expression) {
throw "IllegalArgumentException";
}
}
};
function createRelationship(type) {
dubbiya.preconditions.checkArgument(
type === 'one_to_one' ||
type === 'many_to_many' ||
type === 'one_to_many' ||
type === 'many_to_one');
// now do the actual stuff for the function
}
Having the big window for Dubbiya log messages was ugly. So I took some inspiration from modern computer games and put the log right into the main canvas.

Dubbiya, my fledgling browser-based ER diagram app, now animates the auto-layout. This is less jarring that the sudden jumping around of entities. Watch a demo (best in HD or full-screen):
A friend pointed me toward an excellent one-hour presentation on creating games in HTML5. I applied the animation techniques I learnt from the presentation to Dubbiya, my experimental browser-based database entity-relationship project. Click the "Animation" button and the background text follows a trigonometric path across the canvas.
Clearly this is not so useful yet. It is just a small test to understand the issues with animation in HTML5. I intend to use the technique to animate automatic changes to the diagram layout.
Dubbiya is the code name. I hope a better name comes to me soon. Suggestions welcome.
My vision for Dubbiya:
A month ago, Dubbiya was nothing more than an itch to try out HTML5's new Canvas feature. Now it has become an embryonic project.
I've been creating entity-relationship diagrams for years. First I used ERwin, which was powerful software with a clumsy user interface. It did the job, but you had to fight somewhat to get it done. Then came Visio, which I started using before Microsoft acquired it. This was a big step forward from ERwin for usability. Another product I've used and loved is SQLEditor for Mac OS X. It wins on simplicity and prettiness. The Mac world also has OmniGraffle, which makes pretty diagrams but doesn't have smarts about what an entity-relationship diagram really is - it treats like just a pretty picture.
What do all these have in common? They are more awkward to use than a white board. It is click-click-click-type-click-drag-type, etc. I do my database design on a whiteboard, then switch to software to make it look good. Dubbiya eliminates the whiteboard step. It eliminates the click-click-click-type-click-drag-type step.
It solves pains I've often had when I did IT consulting:
Yes, this is a big undertaking. Yes, there is a long way to go. Like I did with Poker Copilot, I'll develop Dubbiya iteratively, based on feedback.