rinke hoekstra

Ranch Hand
+ Follow
since Apr 06, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by rinke hoekstra

Originally posted by Mike Mitchell:
Congrats Rinke!

May I ask about how many hours you spent on the project?



You may, but I find it very difficult to answer.

I started in january 2007, but there are several long periods of not working on the project at all, which makes it difficult to estimate.

If I were to make a rough guess, I would say 2 or 3 months full time.
I passed the exam with 368 points. Scores:

General: 90/100
Doc: 70/70
OOD: 30/30
GUI: 28/40
Locking: 80/80
Data: 40/40
Network Server: 30/40.

Of course I'm a bit disappointed, because I wanted a 400/400 score, but alas

Thanks all on this forum, it was my most useful source of information and help.

Originally posted by Joshua Fix:


I am working on B&S. For me, it seemed too unlikely that two businesses with the same name are in the same city that offer the same specialties and have the same number of employees and same rate.



Hi Joshua,

sure, I was talking about URLyBird. I don't know the specs of B&S.

Originally posted by Ewan Livingstone:
I don't see any way in which there could ever be any circumstance in which one cannot insert a record because the ID/key already exists.

Am I missing something?



No, you're not missing anything. You phrased it perfectly: there is not any circumstance in which one could not insert a record because the key already exists. So, this exception is completely bogus. Just ignore it. But don't forget to put it in your choices why you ignore it.

Originally posted by Joshua Fix:
I just call my find(String[]) method on the data that was passed in to the create method. It in turn attempts to match every field of a record to the fields of the record that is trying to be created.

If any matches are returned, then there is an entry with all the same values. In that case, I throw a DuplicateKeyException.



Again: why shouldn't hotel "Palace" in "Sometown" have two (or more) rooms in the offering on the same date, for the same price, and both non-smoking? It's a hotel, so they're expected to have many rooms available!

I think the only valid key is the record number. There is no reason to say that two records are not allowed to have all fields equal.
[ June 25, 2008: Message edited by: rinke hoekstra ]

Originally posted by Jim Petersson:
I chose to use name + location as a primary key. Of course this has to be mentioned in the choices file. I guess this is one of those cases were you need to make a design decision for yourself.



Supposing you are talking about urlybird:
I wouldn't do that. What makes you think that each hotel just has exactly one room to offer? I didn't think that very likely. It is more likely that, when a hotel is a customer of urlybird, they may have several rooms in the offering, and two rooms may even have exactly the same field values. Why shouldn't a hotel have two rooms available on the same date, both non-smoking, for the same price?

Originally posted by Raghavan Muthu:
But hanging is a different issue as there may be some other environmental/OS related factors contributing for it.



Yes, I guess you are right. It must be something environmental.

But the problem scares me quite a bit.

Originally posted by Liviu Carausu:

That means that you are either ignoring the requirement "possibly reusing a deleted entry" (You are right, it is not a "must" ), or you are compacting somehow the database at startup . Am I right ?



Yes, I am ignoring this.

I found that it makes the code quite a bit more complicated, and file size is normally not a problem on modern computers, especially not with this database type.

There is also a requirement to keep the code as simple and understandable as reasonably possible, and I chose to give more importance to this requirement then to the "possibly reusing deleted records" requirements.
Hi all,

I already scheduled my essay exam, I finished the work on the code, but now I tested the program on another OS, and guess what, it hangs!!

I developed and tested on windows 2000, which worked perfect.

When testing on red hat linux however, the program hangs in the clean closing of the database (using a shutdownhook) and the server won't even start!!

1) How is this possible? I thought java was "code once, run everywhere"?

2) Will this cause me grading problems?


rinke
I'm just not reusing deleted records. All records are appended.
An exception is about a situation which shouldn't have occurred. Something is wrong when an exception happens.
Now, in this case, it is clear that if the previous method called was the delete method, the absence of the record is exactly what we would except.

Raising an exception in a situation which is to be expected is very silly, and typically not a situation in which it is appropriate to raise the exception.

So just ignore the throws clause, and put in your javadoc that the exception is never raised by this method.
I used a singleton, a facade, a value object, and maybe some more without realizing it or knowing the name.

One you didn't mention which I used is the Service Locator pattern.

But I believe patterns are a too much hyped phenomenom. The main goal is to get good sollutions; the use of patterns is at most a guideline, but not a goal in itself. Before deciding to use patterns one should always realize this.
urlybird 1.1.1, 99% done. All coding done, only need to pack, improve some javadoc and some documentation.
Yes, I understand that.
My problem is that the fifth parameter (the options Object[]) seems to overrule the JOptionPane.OK_CANCEL_OPTION parameter completely in this particular 5-parameter constructor.

So what I don't understand is why this is a parameter if it doesn't seem to be used in this case.
16 years ago
Hi all,

I'm using a JOptionPane constructor, as follows:



Now, the point is, I don't get the sense of the third argument (JOptionPane.OK_CANCEL_OPTION) of the JOptionPane constructor, in combination with the fifth argument (the options array of objects).
Anything I put in the fifth argument is placed as option button at the bottom of the pane, so it seems to overrule the third argument completely.

So what's the sense of having this third param? Is there anybody who can clarify this?
16 years ago