Skip to content

Instantly share code, notes, and snippets.

@liopic
Last active June 9, 2017 01:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liopic/376779ef480ec80e88ea4251a3709858 to your computer and use it in GitHub Desktop.
Save liopic/376779ef480ec80e88ea4251a3709858 to your computer and use it in GitHub Desktop.
Coding kata: designing a virtual disk

#Designing a virtual disk

The basic task is to design the classes and methods needed to model a virtual disk that will contain files.

##Method This kata is incremental, that is, every 10 minute a new requirement will be announced, so developers have to implement it (usually a new method to code) and rethink the classes' structure.

This kata is intended to be done with pair programming, and at the end a discussion will be opened.

You can use any programming language with object oriented programming.

##Requirement 1

  • User can store files.
  • We are not going to move/save any real file; just store file's name and size.

A base class for this virtual disk could be:

class Storage
{
   public Directory rootDirectory();
}
  • The Directory should allow to add a file and delete a file.
  • A File will be created with a name (a string) and size (an int).

##Requirement 2 (and following) ...will be announced during the kata sesion ;-)

@KOUSOULOS
Copy link

I have a question concerning some PHP code you wrote. Can you please contact me at louiskousoulos@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment