Steve Baranski

+ Follow
since Sep 21, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Baranski

Hello - I got my score on Monday, and I passed! I posted my score in the proper forum here, but wanted to share some of my experiences with the forum. I waited just over three weeks after upload and testing to receive my grade. Although I was not overly pleased with the score, I am happy with the results achieved in a span of about 4 weeks.

The actual process, however, was much longer. I originally downloaded this thing over two years ago! I finally found some idle time at work around the holidays, and put it to good use. So to anyone wavering, what have you got to lose (other than ~400 USD)?!?

Enough of the excuses already, here are some of my thoughts:

1) The KISS principle - Put simply, keep it simple stupid. I tried to stay as close to the letter of the law with the assignment as possible. Doing more than requested can only hurt you, as you don't get "extra credit". Other reasons for doing this - I'm a pretty conservative guy, and I wanted to honor the month I allotted for the assignment.

2) Logging - I used Java logging. Since the default is to output >INFO to the console, I selected levels below that and documented it as such. I didn't want these messages to frighten/intimidate the user. Since we weren't allowed to provide additional configuration files, I documented that the tester might want to enable "ALL" or something similar on their test machine.

In hindsight, maybe that's why I lost some points in the general considerations?

3) Technologies - I used the nio package and RMI for the key technology decisions. I had nothing preventing me from using FileChannel, and it was super easy once you figure out what flip() does.

RMI is just something I have experience with, and it was SO much less code than sockets!

I tried to show some initiative here by turning the network server GUI into a sort-of console. Once running, it displayed info about the host, address and port the server was running on, as well as the name(s) of objects bound in the registry. Pretty easy, and kind-of fun to tinker with the APIs.

4) Test on multiple platforms - I tested on several versions of Windows, as well as my Powerbook running Mac OS X. I used varying topologies for remote mode with my wife's ThinkPad, my PB, and our home office desktop. It was fun to tinker with that!

I've heard it said that Java is "Write once, run anywhere", but also "test everywhere". I think this rings true more for desktop apps more than web apps.

5) Test harness - A lot of the data in my file was invalid (i.e., dates in the past, not within 48 hours, etc.). I used a test harness to add valid data to the file. It also let me exercise the insert/delete methods on the Data class.

6) Testing - JUnit, enough said. It allows you to test your API, and to keep your test code separate from your submission. I used extensions like ActiveTestSuite to test concurrency, and RepeatedTest to test the varying states of a reservation. Of course it doesn't show, since I got a 44/80. :roll:

7) Documentation - These are free points, folks, so max them out. Manually inspect the Javadoc, or try the validation doclet available from Sun. As for the user documentation, I had the wife glance it over and provide her input.

8) Builds - I suppose you could use the command-line JAR tool, but I went with Ant. I've used it many times before, and it just works. The default target created runme.jar, and I had another target for the submission that created the Javadoc and rolled everything else up. Using a property for the submit file name allowed me to change it if the upload site demanded.

I wrote it one afternoon while watching football. The bottom line is this - you've invested too much time to have your submission be the cause of automatic failure.


I'm almost offended that I got a 17/30 on O-O Design. I used a number of pretty common patterns (DAO, transfer object, MVC, session facade, etc.), packaged things up well, and had a couple of interfaces and abstract types that were useful.

I just wish that you could get a little more feedback, so it could help you improve next time. Still - I feel like I learned a lot from the whole experience.


There are too many helpful people in this forum to call out individually - that's really a good problem.

Thank you again!
[ February 01, 2006: Message edited by: Steve Baranski ]
I saw my result Monday night - I passed!

General Considerations (maximum = 100): 90
Documentation (maximum = 70): 69
O-O Design (maximum = 30): 17
GUI (maximum = 40): 32
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40

I did test my locking quite thoroughly, so I was surprised to see the dreaded 44. I don't know if I was more disappointed with the General Considerations or the O-O Design score. :roll:
15 years ago
Hi Steve: I know you were seeking the experiences of people that have already received their results, so I'd initially refrained from responding to your post.

If it's any consolation, I've been waiting for just over two weeks now. I uploaded on 1/5 and testing on Friday the 6. I thought the Prometric doc I received at the completion of my exam said 2-4 weeks was typical, but I have read elsewhere that it's 4-6. You're right - it doesn't seem long until you're actually waiting!

And BTW, sorry you guys lost to the Seahawks yesterday.
Hi Daniel - I think the forum's been around the block a few times about this debate. Search on 'create', 'delete', etc. to see what the suggestions are.

I'm not aware that many implement either function in the GUI. Some implement in the Data class to fulfill the "supplied" interface. Others implement both as no-op methods and document/justify in choices.txt. It's your call.

The instructions say this about booking a record"

"The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale."

I wouldn't feel comfortable deleting this record. This might be a trivial example, but what if the hotels linked to this DB, or at least a replica of the DB? Searching for deleted records wouldn't be a very effective means of checking in a customer.

Moreover, there's no information in the schema that provides a context for the delete. For example, when was the record deleted? And by whom? Are you displaying deleted records to the CSRs? What about reserved rooms? That could also drive your choice of how to handle it.

I hope this proves useful.

When running java -version I see 1.4.2_10-b03. Is that a product version?

Hi Henrik: JDK 1.4.2 is a released version of the Java platform, so yes - I would say it is a "product version". Of course there are rules related to how old the product version can be - search the forum and you'll see that you can't use a JDK that's been superseded by another version for >=18 months. So, you can use JDK 1.4.2 as long as you submit by end-of-March, since JDK 1.5 is the current version.

I think by using the terms "product (not development)", they're suggesting you can't use a release candidate or "beta" platform version. For example, I think you can download previews of "Mustang" (JDK 1.6), but you can't use them as the basis for completing this assignment, since 1.6 is still in development.

I hope this proves useful.

How would one go about creating a record without using GUI?

This should be pretty straightforward. The method signature in Data (I believe this is similar for each assignment) says you pass in a string array. Each element corresponds to a column in the DB.

The delete can happen by passing in the record number (int).

I exercised these methods with a test harness outside of my delivered code. Since most of the dates in the sample database were not "test-able" for me, my test harness created dummy data for me on demand prior to delegating to my URLyBirdLauncher class to start the app.

That's one suggestion. I'm sure there are other approaches. The bottom line is that you test if you implement the methods, and that you document (in choices.txt) if you don't.

To me, the assignment was very clear that it was unnecessary for the GUI to offer create/delete. Not as clear that we shouldn't implement on the DB side, however. Since the submission is supposedly graded by software, this seemed like an obvious spot for that to happen. Having a class name and an implementing interface (as specified in the assignment) would be pretty easy to fire up a test harness of some sort with reflection or programmatically. I wanted to stand up to the scrutiny I felt was coming.

Ultimately it is your call. Don't you love that?
Hi Krzysiek - Sorry to hear of your misfortune. I opted to implement the 48 hour rule just to avoid the pain. My choices.txt documented the assumption(s) surround that.

Just out of curiosity, did you get your result today? If so, when did you upload and take the assignment? I uploaded almost two weeks ago - Thursday (1/5) and tested on the following day (1/6). I know they said 2-4 weeks, but I'm waiting on pins and needles!

Good luck with the appeal. Please let us know how that turns out...

What kind of configuration is the assignment taking about, the server location, the file name, or what else?

Hi Didier: This is your discretion, but file name/location and/or server name are a great start. People that use RMI tend to allow the port to be chosen as well, but this introduces another twist or two with the registry...just keep that in mind.

I've read that some people persist the preferred window size and other UI-related information, but I feel this is beyond the scope of the assignment.

IMHO, persisting this correctly also takes into account the mode (e.g., server, standalone, client) the program is running in. So for example, running in standalone mode probably shouldn't retrieve the file location used to run in server mode previously, nor should it overwrite the server mode. Moreover, not all of these attributes are required for each mode.

There are several good links if you search for configuration that describe what the common denominator is, etc., as well as how to handle the varying behavior.

Ultimately it's your choice. Good luck!
Hi Daniel - The URLyBird instructions state explicitly that the user interface...

must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

I would consider this the bare minimum, since the dreaded "must" is in there. Smoking could be an option if you see fit.

I use Eclipse because it's free, and the IBM tools I use on a day-to-day basis are built on Eclipse. I would advise that you use whatever tool you are most comfortable with.

Good luck!
Hello Leonid - "Unbook" functionality seems a bit out of scope. Some assignments (e.g., URLyBird...not sure about B&S) have a 48-hour window in which the hotel room can be reserved. Most hotels have a cancellation policy window where they won't refund a deposit, etc.

My point isn't to question your idea, but to point out that additional assumptions (and work) would be required to accommodate this feature. This work won't give you extra credit (recall instructions), but can hurt you.

I would just advise you to keep it simple. If you were uncomfortable about the lack of such a feature in the requirements, note it in the uncertainties/assumptions. You could assume that the CSRs must use manual recourse to create, delete, unbook. I didn't go that far, but it's an idea...
Hi Arun - I think this depends in large part on how you separate responsibilities in the data access layer of your assignment. Are you creating a Data class, or an URLyBirdData or BodgittScarperData class?

I think you need to iron out what the Data class does (i.e., access any kind of data, or specialized data), and document your assumption. Should the Data class know about the type of data it's accessing? Or should that be the responsibility of another class(es)?

If you search around, there are a number of debates about the Data class. Some use it as a facade for file I/O and locking services (which has another benefit), and others deal with it more directly.

In the end, it's your choice. Good luck...
I think your idea deviates from the spec somewhat. I admire your initiative, but I think you're inviting more scrutiny than you might want.

There's validation of the hours (>=0, numeric), and how do you intend to address the question of time. Are you using server time as local, or GMT? There is a topic before about world timezones, where someone (Andrew, if I recall) provided an example you can take some flights here on Earth and actually arrive local time BEFORE you departed. Plus, what does this threshold time actually define? What time of day on the date available? Most hotels have varying check-in times (e.g., 3:00 local, etc.). Do you know what time zone the Castle Hotel in Paravel is in?

If you pursue this route, I would advise you to address some of the issues present. Otherwise, I would err on the side of simplicity. Besides, 48 hours rounds pretty well to a number of calendar days, right?
Hello Anna - My assignment has the following excerpt in the instructions, which I assume to be standard verbiage:

Use of Standard Elements
Use of functionality provided by the core Java classes will be preferred to your own implementation of that functionality, unless there is a specific advantage to providing your own implementation.

As you consider implementing your own logging, I would keep this in mind.

Now if you were considering a tool such as log4j, Jakarta Commons logging, etc., there is completely different text in the assignment that should give you pause...

The final program must have no dependencies on any libraries other than those of the Java 2 Platform.

I hope this gives you some assurance about how to proceed.
Hello - I have got the DB, server and configuration portions of the assignment squared away...working diligently on my third Swing UI ever. Every time I think I have the Data piece put to bed, something else concerns me.

As people who read the FAQ know, my version of the assignment does NOT use cookies. So I'm trying to use unique Data instances to fulfill the requirements.

Just because the instances are unique, it doesn't mean the stored data has to be. This is what I have below to suit that (NB: NIO was not forbidden in my assignment).

The problem I have is this - since (or the DBMain implementor) is supposed to be generic enough to read multiple DBs in the lovely format provided by Sun :roll: , how do I accommodate the case of multiple logical tables being read by Data...

Presumably an additional table would have a different file, and therefore a different magic cookie (metadata). Making those static seems to be a "no go" for that, since problems would arise when caching records to conserve on IO and managing locked records. I think a composite key (DB & record #) is overkill!

Am I overthinking this? Is the assignment suggestion "You may assume that at any moment, at most one program is accessing the database file" enough to surmise that only one file (i.e., a logical table in the DB) will be accessed at a given time? Then the static fields would remain consistent...

Please note that I tried to use discretion with what I've included here - it's not exactly what I have.... I would appreciate any thoughts and/or feedback.

Hello - I also have the URLyBird assignment, and after 1-2 years of having, have recommitted to getting it done.

To quote the text in my assignment instructions...

"You are permitted to use any IDE tool you choose, but you must not submit any code that is not your own work. The final program must have no dependencies on any libraries other than those of the Java 2 Platform."

My guess is that some folks (who like me, are web-tier and/or server-side developers) might attempt to use a GUI editor to create the UI, which can do all sorts of things to thrash your code under the scenes. With the quote above in mind, I would resist that temptation.

So if NetBeans is your IDE of choice, use that. I intend to use Eclipse.
Good luck!