Step 1 :Let the sides perpendicular to the barn be of length \(x\). Notice that there are a total of \(100\) meters of fencing. Therefore, the side parallel to the barn has length \(100-2x\).
Step 2 :The area to be maximized is \(100x-2x^2\).
Step 3 :Completing the square results in \(-2(x-25)^2+1250\), which is maximized when \(x=25\).
Step 4 :Therefore, the side parallel to the barn has length \(100-2(25)=\boxed{50}\) meters.
Step 5 :The sides perpendicular to the barn should be \(\boxed{25}\) meters long.