Oladeji Oluwasayo wrote:To avoid this I changed that line of code to...
Marcel van den Boer wrote:If you inspect the db file with a HEX editor (which everyone should do before writing any code)
Roel De Nijs wrote:Maybe even better would be to store this 1 in a constant, e.g. private static final byte FLAG_RECORD_IS_DELETED = 1;
Roel De Nijs wrote:I just wrote a database file reader based on the given database file structure
Marcel van den Boer wrote:Actually seeing the data sit there, versus only reading about what *should* be there, makes a lot of difference and I'm pretty sure you'll agree with me on this .
Oladeji Oluwasayo wrote:It wasn't like I didn't know what is in the database or that I didn't know the difference between "1".getBytes() and (byte) 1
Oladeji Oluwasayo wrote:I guess it was my tired head doing some really nasty stuffs there
Oladeji Oluwasayo wrote:Maybe its not worth putting here anyway...
You could have corrupted your records!
Oladeji Oluwasayo wrote:Thats why we are all advised to make back-up copies of the database before testing.
Oladeji Oluwasayo wrote:how many lines was your Data class when you took your exam?
Oladeji Oluwasayo wrote:Where are you now on your project?
Oladeji Oluwasayo wrote:Only the locking codes are not present in my Data class and it has grown to 800+ lines of codes (plus comments, spaces and lots of logging code).
Oladeji Oluwasayo wrote:I'm using a system of <complete-a-component-and-test-it-before-starting-another>.
The Data class contains nothing more than code, comments, limited logging (start + end of each method) and the code is formatted according to the Sun (Oracle) coding conventions.