Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(Urlybird1.3.1) Magic cookie is Header Length

 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if this has been posted before but it seems to be a source of much discussion.
Anyone noticed this before, its not just some random integer that denotes a data file:

Total Header Length: 257 = Magic Cookie:257


O


[ September 27, 2006: Message edited by: Mark Smyth ]
[ September 27, 2006: Message edited by: Barry Gaunt ]
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not agree. In my URLyBird assignment the header size is 56 bytes and the magic cookie is 259. In fact I do not see why your header size is so big as 257 bytes.
[ September 27, 2006: Message edited by: Edwin Dalorzo ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not publish detailed information about the assignment database schema - it spoils the fun for other SCJD candidates.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11945
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Several people have noticed that the magic cookie appears to be related to the version number of their assignment.

So Mark has a cookie of 257 = 0x101 = version 1.x.1 of the assignment (and from your subject, you state that you are working on 1.3.1 of the assignment).

Edwin has a cookie of 259 = 0x103 = version 1.x.3 of the assignment. Edwin - care to confirm?

Regards, Andrew
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very interesting, Adrew.

You seem to be completely right. My version is 1.x.3.

 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Barry didn't mean to break the house rules!

Edwin just to clarify what I meant by the header size was the total length including each of the record field schemas at the start of the file.

It seemed like too much of a coinsidence for there not to be something in it, but of course I haven't seen data files from other versions of the SCJD exam to confirm this.
[ September 28, 2006: Message edited by: Mark Smyth ]
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
every .class file you generate contains a version stamp: two unsigned short integers starting at byte offset 4, right after the 0xCAFEBABE magic number. so assignment follows same path as far as version number and magic cookie are concerned.If interested see here..

http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version-p2.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic