Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IOException

 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys:

An interview question I had recently, the interviewer wanted to know what I would do if I had a large file been transfered over the network, and the file was so large that it threw an IOException what would I do in such a situation.
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That the file is large shouldn't be the cause of the IOException, but an OutOfMemoryError if the file is being read from the network without intervening writes to disk. IMHO
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx Jose:
I had no inclination as to what she meant,neither did I know what to respond to her.
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the interviewer could have meant "You're copying a file over a network, but the file is large, so it takes a long time. The network is fairly unreliable, so often network problems interrupt the transfer. What should you do?"

...in which case the answer would involve splitting the file up, and probably using checksums to ensure correct recomposition at the other end...or a protocol for restarting the transfer from a given position on the file...

However, if the interview meant that then (s)he was pretty unclear - maybe it was a bit of a side-swipe/quasi-lateral-thinking question.


--Tim
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what Tim suggests was indeed the real question and it may have been deliberately worded in such a way as to see if you'd understand it.

Remember that most requests you'll get for features and most fix requests aren't created by technical people so will be pretty vague to say the least.
"It doesn't work when I press Create" is actually more than most users will tell you without serious digging on your part, "it fails" is usually pretty much all you'll have to go on initially.
Possibly your capability to extract useful information from third parties under stress was the real thing being tested.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!