You are on page 1of 6

fusionOne candidate developer test task definition

Converter

Project: Candidate Evaluation program


Version: 1.1
Author: Roman O. Petrovski
Email: rooman@fusionone.com
Last Update: 5/13/2020
Copyright  2001-2004 fusionOne, Inc., 1 Almaden Boulevard, San Jose, CA 95113. All rights reserved.

Summary of Changes:
Version
Number Author Date Comments
1.0 Roman Petrovski 22 Nov 2003 Created
1.1 Roman Petrovski 02 Apr 2004 References table created, well formed XML
statement added

Copyright© fusionOne Inc. 2004 1 of 6


Contents
1. Task definition..........................................................................................................................4
1.1. Input file format definition....................................................................................................4
1.2. Output file format definition..................................................................................................4
1.2.1. Efficient result file........................................................................................................5
1.2.2. Less efficient result file.................................................................................................5
1.2.3. Output format allowed tags...........................................................................................6
2. Implementation requirements.....................................................................................................6

Copyright© fusionOne Inc. 2004 2 of 6


1. References
[XML] “Extensible Markup Language (XML) 1.0”, World Wide Web Consortium Recommendation,
URL:http://www.w3.org/TR/REC-xml

Copyright© fusionOne Inc. 2004 3 of 6


Overview
The following task is to be accomplished by all fusionOne C++ or Java developer position candidates.
Internal architecture and error handling is left to the choice of the implementer.

2. Task definition
The task involves writing the converter code that will take the input file and produce the output file. Both
files describe the textual document that can contain various text style modifiers affecting the presentation
(Bold, Italic, text color, etc…). The set of style modifiers supported by both input and output file formats is
same; however, the structure is completely different.

The sample string that is possible to define using both formats:

The quick brown fox jumps over the lazy dog.

2.1. Input file format definition


The input file is a sequential stream of text that may contain style modifiers which define the change
of style for the text following the modifier.

Example:

The\B quick\I brown\B fox \COLOR=RGB(255,0,0)jumps\COLOR=RGB(0,255,0) over\COLOR


the\COLOR lazy dog.

The following table summarizes the escape sequences that can be used:
Escape code Meaning
\\ “\” symbol
\B Toggles the “Bold” style of the following text
\I Toggles the “Italic” style of the following text
\COLOR=RGB(r,g,b) Sets the color of the following text
\COLOR Reverts back to the previous color used

2.2. Output file format definition


The output file is an XML document. The output document must be well formed [XML].

Since there is certain freedom of valid output file variations, the following two examples illustrate what
will be considered as better (more efficient) and worse (less efficient) result files.

Copyright© fusionOne Inc. 2004 4 of 6


2.2.1. Efficient result file

<?xml version="1.0" encoding="utf-8"?>


<document>
The
<b>
<space/>quick
<i>
<space/>brown
</i>
</b>
<i>
<space/>fox<space/>
<colour rgb="255,0,0">
jumps
<colour rgb="0,255,0">
<space/>over
</colour>
<space/>the
</colour>
<space/>lazy
<space/>dog.
</i>
</document>

2.2.2. Less efficient result file

<?xml version="1.0" encoding="utf-8"?>


<document>
The
<b>
<space/>quick
</b>
</b>
<i>
<space/>brown
</i>
</b>
<i>
<space/>fox<space/>
</i>
<i>
<colour rgb="255,0,0">
jumps
</colour>
</i>
<i>
<colour rgb="0,255,0">
<space/>over
</colour>
</i>
<colour rgb="255,0,0">
<space/>the
</colour>
</i>
<i>
<colour>
<space/>lazy
<space/>dog.
</colour>
</i>
</document>

Copyright© fusionOne Inc. 2004 5 of 6


2.2.3. Output format allowed tags
The following table describes XML elements to be used in output file:

Tag Meaning
space Space symbol
b Indicates section with “bold” style active
i Indicates section with “italic” style active
colour Indicates section with specified color active. If the RGB attribute is not
specified, the “default” color should be used

3. Implementation requirements
1. Implemented application should be a “console application”. That is, it should be able to take all the
necessary parameters from the command line. If the output file name is not specified, it is
constructed from the input file name by adding the “.xml” extension.
2. If the desired position involves object oriented programming, the implementation must use
classes.

4. How to improve your scores


1. Provide design documentation along with the implementation
2. Have meaningful comments in code
3. Do not overcomplicate the implementation by reimplementing standard things such as STL
containers in C++
4. Do not oversimplify the implementation by reusing 3rd party libraries to perform the major tasks
like parsing etc.

Замечания:

From Piret Pärna:

About the test task: as a standard each candidate for the developer’s position has to implement the test task I
am sending you now, in the language he/she applies for a position. That helps us determine whether he/she is
the person we are looking for. The test task is specifically designed to give the person a good opportunity to
demonstrate his/her skills in object oriented approach, C++ or JAVA programming and STL usage. The
person is welcome to show us his/her best sides, take time, design first, code later, etc. Please pay attention
that the task will be evaluated by different input files of different levels of difficulty.

Once the task is solved, the students should send me piret@fusionone.ee the source code and the
executable. Then our senior developers estimate the results, and can give feedback to your students.
 
As you can see from the task file, it's written in English - our working language in FusionOne is also English,
besides Russian, our people need to understand at least some level technical English. So, some English skill
is additional requirement, in addition to what was mentioned yesterday - willingness to develop yourself, to
learn new things, passion for the work.
 
The students are very welcome to try to implement the test task as they have a valuable possibility to get
some feedback from our developers, and perhaps one fine day we'll work together.

Вы можете получить это задание как файл у Лии (секрераря).

Последний срок подачи решения: 02.05.2006


Решения (source code and exe file) отсылать на piret@fusionone.ee 

Copyright© fusionOne Inc. 2004 6 of 6

You might also like