if i was desiging a 4 km long ship (any ship im not even talking warships, because space dibrits can be as bad as a bullet) id put at least 10 feet of steel between the outside of the ship and the nearest habitable section.
Yeah but what about fighters with obvious windows. They travel at many times the speed of a capship, and we DO see debris fly by us. with lasers hitting our windows, debris hitting it, and the shrapnel from explosions, why don't they break? Keep in mind that we didn't always have shields.
As another example, the Space Shuttle has windows, as does many other ships.
and those windows are 3 inches thick

FS2 ships can survive hits from multi kiloton weapons even without the use of shielding. Space debris is about as damaging on that scale as having someone throw feathers at you.
i was thinking realisticly, not freespaceistically

In space the increasing amount of armor (ie. the mass) translates quite directly into smaller acceleration.. So keep adding armor and you end up having a nice ship shaped - if practically immobile - space station instead of a space ship. That is assuming it can ever make it to the orbit.
well maybe 10 feet of metal might be overkill. an inch of steel for the outer hull plus a couple layers of 1/2 inch or 1/4 inch plating for an internal double and/or tipple hull. each hull would be angled differently to help vector radiation and high energy particles from habitable areas. sorta in a similar way to how stealth reflects radar away from the source.
more steel would mean slightly better radiation protection. mass can be cranked assuming the propusion tech can keep up with structural designs. you could also store water between the hull plates for added radiation shielding and it could also be used as propellant. youre not gonna be able to build a several kilometer long ship unless you got some big honkin engines.
for warships youd want a densely layered hull with blast compartments which could contain explosive forces and radiation. to be able to take nuclear detonations youd go with more or less a zepplin style construction, which is mostly a huge hollow superstructure with skin attached and habitable areas being small and within the bowels of the ship. you could fill in the voids with honeycombed cells to help take blasts. you could join the cells with explosive bolts so they tear away from the hull when a detonation takes place inside one.
you could counter all that by encasing your nukes in heavy water ice. the effect would be 2 fold, neutrons would reflect back into the bomb and make the reaction last longer (increasing the yeild), and provide blast mass which would vaporize and expand to give it some effects of a blast wave in the vacuum of space. such warheads wouyld ne4ed to penetrate and detonate in a confined space to be useful.