text:
Make your country proud!
You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics.
You have been given the incredible honor of competing in the 100-meter-dash. You are the nations sole representative, so there is a huge amount of pressure on you to do well. Unfortunately though, Que-Wopistan's training program is awful! Absolutely terrible. You can't work with this, so you decide to train yourself.
You try a few practice runs. On the first run, you make it 0.3 meters forward, and then fall on your face. You are dedicated though, so you get up and try again. This time, you actually go backwards -1.7 meters, before falling on your face again. You try again. And again. And agin. And again, but every time you fall on your face before making even 2 meters forward. You just aren't coordinated enough to run. Or walk. Or even-- not fall on your face.
This is where your programming expertise comes in handy.
The challenge
In case you haven't realized yet, I am talking about the game QWOP. Once you have wasted 60 minutes, mashed your face into the keyboard, and now returned to this page after rage-quitting (don't worry, I did the same thing), here is your challenge. You must write a program that uses simulated key-presses to play the game of QWOP for you. The following actions do not have to be done by your program (you can do them manually yourself)

Opening the web browser and going to the correct page.
Starting and re-starting the game.
Make a screen recording.

Everything else must be automated by your program.
Judging criteria
The winner of this contest will be the program that makes it the farthest. In the unlikely event of a tie (Which will happen if anyone actually makes it 100 meters), the winner will be decided by who made it there quicker. This is not code-golf, byte-count makes no difference.
If your program automatically detects the game being over (the game ends if you fall on your face or make it 100 meters) and exits, you will get a +10 meter bonus.

This is basically asking for a tool assisted speedrun of QWOP. Not sure if that's on topic as a programming contest. What stops someone skilled at the game from beating it while recording their keystrokes, then having their code play back those keystrokes hard-coded at the exact times?

I don't have the slightest clue how to feed timed keystrokes into a production Flash application, but if you could provide some sample (JS?) code accomplishing this, the challenge sounds worth a try.

I'd like to do this, but unfortunately I don't have Flash installed (nor would I be able to figure out how to send keystrokes to it, if I did). Is there any way to expose some sort of API to programmatically play QWOP or something?

Hm, I'm not sure but wouldn't you just need to simulate a low-level keystroke, rather then sending it in to the flash application?

It doesn't seem that hard to make 100 m. After a few tries I got to 78.6 m by only using the 'Q' and 'W' keys (excepting the first couple of seconds).

AutoHotkey, 100.5 m

After running the following script, it can be activated by pressing Windows+H (yes, it only works on Windows). It can be stopped by pressing Escape.
#SingleInstance force

Esc::ExitApp

#h::
    Loop,5 {
        Send, {w down}
        Sleep, 300
        Send, {w up}
        Sleep, 300
    }
    Loop,9999 {
        Loop, 23 {
            Send, {q down}
            Sleep, 200
            Send, {q up}
            Sleep, 400
            Send, {w down}
            Sleep, 350
            Send, {w up}
            Sleep, 400
        }
        Loop,6 {
            Send, {w down}
            Sleep, 250
            Send, {w up}
            Sleep, 400
        }
    }
return

This particular code reached the finish line the first time it was run. I don't want to test it again now, because it takes forever and I can't do anything else while running it (Please comment if you figure out how to send keys to the Flash player without it being in focus). Caveat: At around 30 m, no keys were sent for a few seconds because a Windows pop-up jacked the focus. It was tested in Chrome browser.
When the script reached the obstacle at 50 m, the script somehow jumped over it right away, which may be a lucky and unusual occurrence. As for the time, the game irritatingly does not tell you how long the run took, but it does have a built-in tiebreaker by allowing you to jump as far as possible beyond the finish line at the end.
Also, this game's code does not seem very robust:

Huh?

AutoHotkey also seems to have the ability to read the color of pixels, so it could potentially be improved by detecting when 50 or 100 m is reached.


text:
The Mirror Maze Mania
Puzzle
There are some mirrors located throughout a grid. A ray of light enters the grid from some position. It travels through the grid in a straight line trying to escape. On encountering with a mirror it changes its course by 90 degrees. This continues to happen until it breaks free from the maze. The challenge is simply this: Guide the light ray to an exit.

Elements

Grid - The grid is a square composed of n x n blocks. A block is either empty or contains a mirror.

Mirror - Both faces of the mirror are reflective. They have two orientations - 45o left or right(see figure).

Light ray - It always travels straight and reflects from the mirror surface upon incidence (i=r=45o).

Code

Input - The user will input 3 values - n, m and s.
n represents the value of grid's length (no of blocks). You are free to choose the type of this value; It could be a string, integer, float or any other data type. This cannot be zero/empty.
m is a sequence of two values indicating where the mirrors are and what their orientations will be. You are free to choose the sequence type. For example, if 0 and 1 are the two orientations of the mirror and each block in the grid is marked from 1 to n2, you may input a sequence such as {(5,0), (3,1), (6,0),...}. Since you're free to choose this type, you may even squeeze them in to a string and decode it properly. In other words, it only needs to be legible to your code. This can be zero for no mirrors.
s represents the starting position of the light ray. Again, you may choose this type based on the rest of your code. Any form of data is valid.
NOTE The user is responsible for inputing the correct values. If they enter an invalid value such as placing a mirror out of the grid or not providing a starting position, your code doesn't have to deal with it.
Process - Calculate the position from which the light ray will emerge out of the grid. You are free to mark your grid (or not) in any way you like. The same goes with start and exit positions. Include these details in your answer below. How you represent these data will influence the output. See scoring rubrics for details.
Output - Display the emerging position of the light ray. Detailed output can score more. See scoring rubrics for details.
You are free to use any libraries or extensions to implement any part of the maze, but not the entire maze. The only restriction here is this: if the library is for GUI, or implementing the Grid or anything like that it's fine. If it already contain a preset grid with mirrors (highly unlikely), you can't use it.

Scoring

+64 for keeping your code less than 10 kilobytes (10240 bytes).
-2 for every byte after the 10240th byte
+16 for including the path of the ray in the output. Any representation is OK, but explain it in the answer. You may mark your grid with numbers, alphabets or in any other way you like.
+64 for drawing the grid with the solution (see figure). It could be a GUI or CLI! The drawing must at least include the grid and the ray of light from start to exit. Numbers, markings and everything else are optional. If you do this, you shouldn't add the +16 points above.
+128 for inventing partially reflective mirrors. These mirrors will guide the light in to two locations. One that is perpendicular to the original ray and one that passes straight through them. You may of course combine multiple mirrors like these with the normal ones for added effect. There may be 2 exit rays for this type of mirrors which you must display in your solution. If you choose to do this, change the user input m to suit the code accordingly (it must be a sequence of 3 elements rather than 2, the third value being the type of mirror). See figure below.
+128 for inventing the absorber mirror. Absorber mirror absorbs the light ray and stops it from exiting the grid. The solution to this case should be something like 'LIGHT RAY ABSORBED!' (you can show anything as long you explain it in the answer below.) Everything else is same as the partially reflective mirror shown above.
+128 for inventing the laser mirror. A laser mirror's reflection will destroy any other mirror that is in it's way. So, if the light strikes a laser mirror(m1) and then falls on another mirror (m2), it (m2) will be destroyed. The ray now travels straight as if that block is empty. Everything else is same as the partially reflective mirror shown above.
+128 for inventing a new kind of mirror and explaining its action. Make it really cool. ;)

TIE BREAKER: In case of a tie, the shortest code shall win. If by some strange coincidence, that happens to be the same, the winner shall be decided based on  how many numbers there are in the code (every single digit of integers, floats and even numbers in variables) - the least one wins!
Example
The first one is a typical solution with a GUI output. It marks the positions as integers from 1 to 12 and shows the path of the ray along with 2 mirrors. The second one shows the partially reflective mirror (bonus points) that has 2 exit rays. The third example is a CLI output model (this one is tough!). It shows the same thing as our GUI. The normal output without any diagrams (no bonus) could be as short as a single number or any value (eg: 7 or G) indicating from where the ray has emerged. The way you chose to name the positions must be included in your answer.

       ^
     __:___ ______ ______ ______ ______
    |  :   |      |      |      |      |
<...|..\\..|.<....|..\   |      |      |
    |______|______|__:__ |______|______|
    |      |      |  :   |      |      |
    |      |      |  ^   |      |      |
    |______|______|__:___|______|______|
    |      |      |  :   |      |      |
....|..>...|......|../   |      |      |
    |______|______|______|______|______|
    |      |      |      |      |      |
    |      |      |      |      |      |
    |______|______|______|______|______|

/  = normal mirror
// = partially reflecting mirror

Related.

What happens if multiple answers implement all the laser types and get all the other points while under 10k? That's a lot of code around here, so it's a definite possibility.

I thought as much. But, if a tie occurs, I will update the question with a tie breaker.

To prevent the perception of choosing favorites in the event of a tie, you should probably come up with a tiebreaker before it's needed. The simplest would probably just be "shortest code".

@Geobits Excellent suggestion.

T-SQL(2012+) Score 512 640
I hope this fits in the rules.  I implemented the 3 mirrors + a super absorber.  I didn't count the super absorber as a cool extra.
The input is three variables.
One int and two tables for mirror and start.
The mirror table has columns for X, Y, Orientation(-1/1) and Type (1-4)
-1 is Left and 1 is Right
Type 0 is standard, 1 is laser, 2 is partial, 3 is absorber and 4 is super absorber
EDIT: 5 is laser splitter and 6 is a splitter.  These will split the beam in both directions.
The start table has columns for start X and Y, Direction(1-4) and Laser Flag(0/1)
Direction 1 is north, 2 is east, 3 is south and 4 is west.
It will handle more than one start point.
A function to handle mirrors.  Run once.
DROP FUNCTION M;
GO
CREATE FUNCTION M(@d INT,@O INT,@t INT,@L INT) RETURNS TABLE AS RETURN
    SELECT IIF(d=0,4,d)d, l FROM (
    SELECT (@d+(@o*(IIF(@d%2=0,-1,1)))+4)%4d,isnull(@t,0)%2l WHERE @L=0 AND @o is not null and isnull(@t,0)not in(3,4)
    UNION ALL
    SELECT @d, @l WHERE isnull(@t,2)=2 OR (@l=1 AND @t<>4)
    UNION ALL
    SELECT (@d+(-@o*(IIF(@d%2=0,-1,1)))+4)%4,isnull(@t,0)%2 WHERE @L=0 and @t in(5,6)
    )m

The grid setup and query
-- Set up Maze
DECLARE @n INT = 5
DECLARE @m TABLE (X INT, Y INT, O INT, T INT)
DECLARE @s TABLE (X INT, Y INT, D INT, L INT)
INSERT INTO @m VALUES (1,5,-1,0),(1,1,-1,0),(2,1,1,2),(3,1,1,2),(4,1,1,1),(2,3,-1,5),(4,3,-1,3),(4,5,-1,4),(4,2,1,0),(3,4,1,6);
INSERT INTO @s VALUES (0,5,2,0);
-- Solve Maze
WITH S AS (
    SELECT x,y,d,l,Geometry::Parse(CONCAT('LINESTRING (',px,' ',py,',',x,' ',y,')')).STBuffer((l+1)/30.)g
    FROM(
        SELECT x+(d.d+1)%2*-SIGN(d.d-3)x,y+d.d%2*-SIGN(d.d-2)y,d.d,d.l,x px,y py
        FROM @s s OUTER APPLY(SELECT O, T FROM @m m WHERE s.x=m.x and s.y=m.y)x CROSS APPLY(SELECT d,l FROM M(s.d,x.o,x.t,s.l))d
        )g
    UNION ALL
    SELECT x,y,d,l,Geometry::Parse(CONCAT('LINESTRING (',px,' ',py,',',x,' ',y,')')).STBuffer((l+1)/30.)g
    FROM(
        SELECT x+(d.d+1)%2*-SIGN(d.d-3)x,y+d.d%2*-SIGN(d.d-2)y,d.d,d.l,x px,y py
        FROM S OUTER APPLY(SELECT O, T FROM @m m WHERE s.x=m.x and s.y=m.y)x CROSS APPLY(SELECT d,l FROM M(s.d,x.o,x.t,s.l))d
    WHERE s.X>0 AND s.X<=@n AND s.Y>0 AND s.y<=@n
        )g
    )
    ,E AS (SELECT *FROM(VALUES(\),(\),(\),(\),(\),(\),(\),(\),(\),(\))E(N))
    ,N AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT\)) N FROM E e1,E e2,E e3)
SELECT CONCAT('Exits into ',x,', ',y,' from the ',CASE d WHEN 1THEN'south'WHEN 2THEN'west'WHEN 3THEN'north'WHEN 4THEN'east'END),null
FROM S
WHERE s.X=0 OR s.X>@n OR s.Y=0 OR s.y>@n
UNION ALL
SELECT 'Beam'O,Geometry::UnionAggregate(g)G FROM S --Draw Line
UNION ALL
SELECT CONCAT('Mirror Type ',T),Geometry::Parse(CONCAT('LINESTRING (',x+(ABS(o)/3.),' ',y+(o/3.),',',x-(ABS(o)/3.),' ',y-(o/3.),')')).STBuffer(.06) FROM @m WHERE T NOT IN(3,4,5,6) --Draw Mirrors
UNION ALL
SELECT 'Blocker',Geometry::Parse(CONCAT('LINESTRING (',x+(ABS(o)/(-T+8.)),' ',y+(o/(-T+8.)),',',x-(ABS(o)/(-T+9.)),' ',y-(o/(-T+9.)),')')).STEnvelope() FROM @m WHERE T IN(3,4) --Draw Blockers
UNION ALL
SELECT CONCAT('Mirror Type ',T),Geometry::Parse(CONCAT('MULTILINESTRING ((',x+.33,' ',y+.33,',',x-.33,' ',y-.33,'),(',x+.33,' ',y-.33,',',x-.33,' ',y+.33,'))')).STBuffer(.06) FROM @m WHERE T IN(5,6) --Draw Splitters
UNION ALL
SELECT 'Grid',Geometry::UnionAggregate(g) FROM (
    SELECT Geometry::Parse(CONCAT('LINESTRING (',x1,' ',y1,',',x2,' ',y1,',',x2,' ',y2,',',x1,' ',y2,',',x1,' ',y1,')'))g -- Draw Grid
    FROM (SELECT TOP(@n) N-.5x1,N+.5x2 FROM N)x,(SELECT TOP(@n) N-.5y1,N+.5y2 FROM N)y
)g
OPTION (MAXRECURSION 10000)

The output
Query Results tab SSMS

Spatial Results tab SSMS

The splitter is really cool!

C# 1669 chars, i implemented everything i think except msges(like laser has escpaed, laser got absorberbed etc...). ITS ALSO ANIMATED!
So its works like this, create a project called mirror and copy all of this into Form.cs.
When you press the form with your mouse it takes the variables entered into the textbox to start everything , so dont click before you enter them. The variables are as follow:
20 2 0 0 5 0 8

The first number is the grid size, the second number is the direction the laser will be going 0 is left, 1 is up, 2 is right and 3 is down. Then come the X Y starting position of the laser and after that you got 3 numbers for every object, first two being the X and Y position of the object and the third being the type of the object:
2 = /
3 = \
4 = //
5 = \\
6 = O (absorber)
7 = X (laser mirror)
8 = T (random teleport)

I dont consider my special object as worthy of the extra points since it isnt very cool. Also side note the thread doesnt finish properly so you need to kill the process (gotta save dat space). Here is a cool one to test it out
40 2 0 0 10 0 3 10 10 2 5 10 4 4 10 5 0 10 6 4 5 2 15 5 5 15 20 2 10 20 7 8 20 3 6 20 2 4 20 4 2 20 5 35 5 8 25 5 5 25 25 2 18 25 6

CODE
    using System;using System.Collections.Generic;using System.Drawing;using System.Windows.Forms;using System.Threading;namespace mirror{partial class Form1:Form{public Form1(){InitializeComponent();this.Load+=l;}int[,]g=new int[1,1];int i;List<int[]>d=new List<int[]>();void l(object ss,EventArgs k){SetStyle(ControlStyles.AllPaintingInWmPaint,true);SetStyle(ControlStyles.OptimizedDoubleBuffer,true);this.Width=this.Height=800;TextBox t=new TextBox();this.Controls.Add(t);this.Click+=(p,e)=>{t.Hide();string[]s=t.Text.Split(' ');i=o(s[0]);g=new int[i,i];d.Add(new int[]{o(s[1]),o(s[2]),o(s[3]),0});g[d[0][1],d[0][2]]=1;for(int j=4;j<s.Length;)g[o(s[j++]),o(s[j++])]=o(s[j++]);Thread x=new Thread(r=>{while(true){for(int c=0;c<d.Count;c++){try{got:if(d[c][0]==0)d[c][1]--;if(d[c][0]==1)d[c][2]--;if(d[c][0]==2)d[c][1]++;if(d[c][0]==3)d[c][2]++;if(d[c][3]==0){int l=d[c][0];int z=g[d[c][1],d[c][2]];if(z==2)d[c][0]=l==0?3:l==1?2:l==2?1:0;if(z==3)d[c][0]=l==0?1:l==1?0:l==2?3:2;if(z==4)d.Add(new int[]{l==0?3:l==1?2:l==2?1:0,d[c][1],d[c][2],0});if(z==5)d.Add(new int[]{l==0?1:l==1?0:l==2?3:2,d[c][1],d[c][2],0});if(z==6){d.RemoveAt(c);continue;}if(z==7)d[c][3]=1;if(z==8){Random rr=new Random();d[c][1]=rr.Next(i);d[c][2]=rr.Next(i);}if(z>1)goto got;}g[d[c][1],d[c][2]]=1;}catch(Exception){}}this.Invalidate();Thread.Sleep(100);}});x.Start();};string[]ar=new string[]{" ","*","/",@"\","//",@"\\","O","X","T"};this.Paint+=(h,v)=>{Graphics z=v.Graphics;for(int q=0;q<i;q++)for (int w=0;w<i;w++){z.DrawRectangle(Pens.Black,new Rectangle(q*20,w*20,20,20));z.DrawString(ar[g[q,w]],this.Font,Brushes.Black,new Point(q*20+8,w*20+8));}};}int o(string s){return int.Parse(s);}}}

non golfed:  http://pastebin.com/sNa0aK7f , http://horobox.co.uk/u/vajura_1414782718.rar exe
Also hope you like it was fun to make! :)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Character Cross
I was expecting to post something more complex as my first puzzle in PCG, but a particular, uh... homework question on Stack Overflow inspired me to post this. They want to:

print the following pattern for any given word that contains odd number of letters:
P           M
  R       A
    O   R
      G
    O   R
  R       A
P           M

c++

Notice that letters are a knight's move apart in the pattern you need to print. So, every other column is empty. -- (Thanks xnor for pointing this out.)

Rules

Using C++ is prohibited. As I may link this question there.
You may use stdout, or any means of quickly outputting a string (e.g. alert() in JavaScript).
As always, shortest code wins.

This is in the related posts on stack overflow: http://stackoverflow.com/q/5508110

What do you mean by ODD?

@flawr I think it means odd, as in not an even number.

God I am stupid, I thought it was kind of an obscure computer scientist abbreviation=)

Is the shortest answer measured in bytes or characters?

@jpjacobs: Bytes, unless the question explicitly says otherwise.

Whole program or just a function? (real smart of me to answer first and make this question later...)

Notice that letters are a knight's move apart in the pattern you need to print. So, every other column is empty.

@krumia Congrats on posting a solid question as a first-time poster on PPCG! I hope you stick around.

@xnor That's not a knight's move, it's an elephant's move.

I might be the first person in history to migrate a question here (although with some modifications). :D

Any restrictions around leading/trailing whitespace?

@streetster No, none. Have a go at it :)

@LilyChung If you select, there's an extra space. So it is indeed a horse move.

@PkmnQ Yep, I sure was wrong about that one back in 2014.

Related golf problem

Canvas, 5 bytes
＼＼：⇵ｎ

Try it here!
Explanation:
\      create a diagonal of the input
 \     create an even steeper diagonal of that
  :⇵   reverse a copy of it vertically
    n  overlap the two

APL (37 35 34 27)
↑{∊2↑¨⍵↑¨I}¨↓(+∨⌽)∘.=⍨⍳⍴I←⍞

It takes input from the keyboard, like so:
      ↑{∊2↑¨⍵↑¨I}¨↓(+∨⌽)∘.=⍨⍳⍴I←⍞
CODE-GOLF
C               F
  O           L
    D       O
      E   G
        -
      E   G
    D       O
  O           L
C               F

All of my upvotes belong to APL.

Python 2 - 94 90 89 88
s=input()
L=len(s)
R=range(L)
for i in R:print" ".join([s[j]," "][j!=i!=L+~j]for j in R)

Input:
"CODE-GOLF"

Output:
C               F
  O           L
    D       O
      E   G
        -
      E   G
    D       O
  O           L
C               F

I was just writing the same thing. My one improvement is i in[j,L+~j].

@xnor: Found an even shorter condition. ;)

Clever. You can still do L+~j though.

@xnor: Ah, you're right. I always forget the +~ trick...

Can you do for i in R:print" ".join([s[j]," "][j!=i!=L+~j]for j in R) to save a char? (I don't have access to Python 2 now to test.)

@xnor: That's exactly what I thought of in that second! :)

Pyth, 22
Vzjdm?@zd}N,dt-lzd\ Uz

Test:
$ pyth -c 'Vzjdm?@zd}N,dt-lzd\ Uz' <<< "CODE-GOLF"
C               F
  O           L
    D       O
      E   G
        -
      E   G
    D       O
  O           L
C               F

Explanation:
(Implicit)                  z = input()
(Implicit)                  d = ' '
Vz                          for N in range(len(z)):
  jd                            print(d.join(
    m                               map(lambda d:
     ?@zd                                        z[d] if
         }N                                      N in
           ,dt-lzd                                    (d,len(z)-d-1) else
      \                                          " ",
     Uz                                          range(len(z)))))

No bit complement in Pyth?

@xnor No, but it wouldn't help. Suppose ~ was bitwise not in Pyth. Then we could change t-lzd to +lz~d - still 5 characters.

Vz is a neat trick: I didn't know that U<string> gave range(len(<string>)).

Yeah, it's a nice feature. Works that way on lists too, but not tuples necessarily. EDIT: Oops, that's missing from the documentation. I'll add it. Sorry.

Python 3: 75 chars
s=input()
i=n=len(s)
while i:i-=1;a=[" "]*n;a[i]=s[i];a[~i]=s[~i];print(*a)

For line i, we start with a list of spaces and set the entries i from the front and back to be equal to the letters of the input string. Then, we print the result.
Python strings are immutable, so a must be a list of characters instead. The list a must be initialized inside the loop or the modifications will carry over between loops. We use print(*a) to print each character in the list, space separated, which requires Python 3.
The output lines are symmetrical, so we can have i count down rather than up using a while loop.
>>> CODE-GOLF
C               F
  O           L
    D       O
      E   G
        -
      E   G
    D       O
  O           L
C               F

It also works for an even number of letters.
>>> CODEGOLF
C             F
  O         L
    D     O
      E G
      E G
    D     O
  O         L
C             F

Converting this to Pyth, I get VlzJ*]dlz=@JN@zN=@Jt_N@_zNjdJ which is 29 bytes... I guess I'll have to try something else to beat APL. Also, +1 for proof that Python 3 can out-golf Python 2 (sometimes)

@fry Python 3 usually out-golfs 2 in my experience. Even if nothing changes anywhere else, most challenges give one input and expect one output, and len("raw_input()") + len("print ") > len("input()") + len("print()").

@undergroundmonorail Well, the trouble with that is that input() is also valid in python 2 (it just acts somewhat differently), so unless the input for the challenge is quite strict, python 2 will usually win out.

Wow, even with Python 2 and print" ".join(a) your code is shorter (82) than mine.

@FryAmTheEggman See my answer - it's an adaptation of the other python answer, and it's much shorter than APL. Pyth really doesn't like assigning to indexes, unfortunately.

CJam, 27 25 bytes
l_,S*:Sf{W):W2$tW~@tS}zN*

Try it online.
Example run
$ cjam <(echo 'l_,S*:Sf{W):W2$tW~@tS}zN*') <<< CROSS; echo
C       S
  R   S
    O
  R   S
C       S

As the example in the answer, each line has trailing whitespace.
How it works
                             " N := '\n'; R := []; S = ' '; W := -1 ";
l                            " Q := input()                         ";
 _,S*:S                      " S := len(Q) * S                      ";
       f{            }       " for each C in Q:                     ";
                             "   T := S                             ";
         W):W                "   W += 1                             ";
             2$t             "   T[W] := C                          ";
                W~@t         "   T[~W] := C                         ";
                             "   R += [T]                           ";
                    S        "   R += [S]                           ";
                      z      " R := zip(R)                          ";
                       N*    " R := N.join(R)                       ";
                             " print R                              ";

Sorry that this is basically a 'great answer!' comment, but I just had to say that it never, ever, would have occurred to me to build the box by columns instead of by rows.

Pure Bash, 94 bytes
l=${#1}
for((;t<l*l;t++));{
((x=t%l))||echo
((x-t/l&&x+t/l+1-l))&&printf \ ||printf ${1:x:1}
}

Too many t%l calculations. Save it on first use to a variable ((x=t%l)) then use the variable to reduce it to 94 characters.

Ah yes, I had done this for x=t%l and y=t/l and it was longer... didn't cross my mind just to use x only

R, 99 98 93 89 bytes
m=ifelse(diag(l<-length(w<-el(strsplit(scan(,''),'')))),w,' ')
write(pmax(m,m[,l:1]),1,l)

Try it online!
Line 1 reads input string, splits it into characters, stores its length and creates a matrix with the word on its main diagonal – letters of the word are superposed on an identity matrix (and repeated by default to match its length) and only those matching 1's are retained, others being replaced by spaces.
Line 2 prints a matrix formed by elements of either the diagonal matrix or its horizontally mirrored version, whichever are greater.
−2 + 1 = −1 byte thanks to JayCe
−4 bytes thanks to Giuseppe

Sweet! And nice explanation.you can save 2 bytes

looking at he other answers and the question - It seems like the matrix should be larger (extra space) - the output should not be a square matrix..

@JayCe Thanks for the 2 bytes! And thanks for the comment about formatting, you are probably right (although the rules could be more clear about this). Fortunately all it needed was putting a space into the separator while printing.

89 bytes using pmax and inlining some more assignments.

@Giuseppe Thanks! Sadly, still not enough to beat J.Doe's solution

JavaScript (E6) 101 95 129 136
Edit Wrong letter spacing. Fixed.
Edit Simpler and shorter using classic for loops
As a function, output via popup.
F=a=>{
  for(l=a.length+1,i=s=o='';++i<l;s='\n')
    for(j=0;++j<l;)
      o+=s+((s=' ')+a)[j==i|i+j==l&&j]
  alert(o)
}

Previous version using .map
F=a=>alert([...a].map((c,p)=>
  --q<p
  ?B(q)+a[q]+B(p-q-1)+c
  :B(p)+c+(p-q?B(q-p-1)+a[q]:'')
,B=n=>' '.repeat(n),q=a.length).join('\n'))

Test In FireFox/FireBug console
F('Java-Script')

Output
J                   t
  a               p
    v           i
      a       r
        -   c
          S
        -   c
      a       r
    v           i
  a               p
J                   t

This doesn't have enough horizontal spacing - there should be columns of all spaces between each column with letters.

Ruby, 64
f=->w{x=w.size
x.times{|i|y=" "*x
y[i],y[~i]=w[i],w[~i]
puts y}}

Explanation

Input is taken as the argument to a lambda. It expects a String.
In a loop that loops trough every character in the word (n in total):

Create a String consisting of n spaces.
Replace the ith and n-ith (~i, thanks xnor) space with the ith and n-ith character of the input.
Print the line

Congratulations on posting the 25,000th answer! :) (Actually, I'm not 100% sure, this is the one, due to caching. But it was the latest answer, when I first saw "25,000 answers" in the site stats.)

You can do -i-1 as the bit complement ~i.

That's very clever, thanks!

With this approach, it actually seems to be beneficial to use stdin instead of a lambda: gets.size.times{|x|u=?\s*~/$/;u[x]=$_[x];u[~x]=$_[~x];puts u} (assumes input is not terminated by a newline, e.g. echo -n CODE-GOLF). One can then make additional use of .chars to save another character: x=0;gets.chars{|r|u=?\s*~/$/;u[x]=r;u[~x]=$_[-x+=1];puts u}

Java - 168
A simple nested loop, there's nothing really special going on here.
class C{public static void main(String[]a){int b=-1,c=a[0].length()-1,d;for(;b++<c;)for(d=-1;d++<c;)System.out.print((b==d|b==c-d?a[0].charAt(d):" ")+(c==d?"\n":""));}}

With line breaks:
class C{
    public static void main(String[]a){
        int b=-1,c=a[0].length()-1,d;
        for(;b++<c;)
            for(d=-1;d++<c;)
                System.out.print(
                    (b==d|b==c-d?a[0].charAt(d):" ")+
                    (c==d?"\n":""));
    }
}

Javascript 102 84 85
Edit: Had to fix spacing. Not so small anymore.
function p(s){for(i in s){o='';for(n in s)o+=(n==i?s[n]:n==s.length-1-i?s[n]:' ')+' ';console.log(o)}}

p('Thanks-Dennis')

T                       s
  h                   i
    a               n
      n           n
        k       e
          s   D
            -
          s   D
        k       e
      n           n
    a               n
  h                   i
T                       s

This does not have enough horizontal spacing.

Wow, shorter than mine and not even using ES6. +1

Better, but the spacing is still wrong (look at the X). Also, unless the question says otherwise, you should write a program or a function. Snippets with hardcoded variables are generally frowned upon.

And can't you make it function(s) since you don't recurse?

Befunge-93, 68 71
:~:84*-!#@#v_\:2*\4+p1+
::+\4+g:!| >$1+0:>p1-::
00+4\*2:\<>0p#:- ^#2g

You can test it here. It'll come up with an input dialog box on each pass through ~; enter your word one character at a time (it does say the input is 'klunky' after all), ending with a space.
It won't print to the console; this wouldn't be Befunge without a hint of self-modification, after all! Instead it will modify its own grid to display the message. After it's done, the grid will look something like this:
 ~:84*-!#@#v_\:2*\4+p1+
::+\4+g:!| >$1+0:>p1-::
00+4\*2:\<>0p#:- ^#2g

c               f
  o           l
    d       o
      e   g
        -
      e   g
    d       o
  o           l
c               f

(Note the noble sacrifice of the cell at (0,0), after we know the pointer won't go there anymore, for the purpose of storing a piece of data.)
It also works with inputs of even length. Note that, since Befunge-93 is limited to an 80x25 grid, the input size is limited to 21 characters if you run it in a Befunge-93 interpreter. Running it as Befunge-98 should remove this limit.
Edit - Now it works more along the lines of the intended output, at the expense of only three characters of length.

Note that the letters are separated with a blank column. Letters are relatively in L shape.

Drats! That complicated things rather significantly. I think I can salvage this, but it'll add to the ending size... oh well.

CJam, 38 36 35 34 32 bytes
l:I,,_f{f{_2$=@2$+I,(=|\I=S?S}N}

Test it here. This reads the input word from STDIN. It also works for an even number of characters. This prints a trailing column of spaces, but I don't see anything in the rules against that.
Explanation
l:I,,_f{f{_2$=@2$+I,(=|\I=S?S}N}
l:I                              "Read input and store it in I.";
   ,                             "Get string length.";
    ,_                           "Turn into range and duplicate.";
      f{                       } "Map block onto first range, with second range on the stack.";
        f{                   }   "Map block onto second range, with first iterator in stack.
                                  Each invocation of this block will start with grid coordinates
                                  y and x on the stack (x on top).";
          _2$=                   "Duplicate x, duplicate y, check for equality.";
              @2$+               "Pull up y, duplucate x, add,";
                  I,(=           "Check if that's one less than the string length.";
                      |          "Bitwise or between conditions.";
                       \         "Swap condition and x.";
                        I=       "Take x'th character from the string.";
                          S?     "Push a space and select character depending on condition.";
                            S    "Push another space.";
                              N  "Push a line feed.";

The contents of the stack are printed automatically at the end of the program.

My dear CJam, you've just got beaten by APL. ^_^

@vaxquis I was surprised I was able to beat it twice in the first place. This problem seems much more suited to APL and co than to stack-based languages.

well, at least it's easier to write l:I,,_f{f{_2$=@2$+I,(=|\I=S?S}N} on a napkin than ↑{∊2↑¨⍵↑¨I}¨↓(+∨⌽)∘.=⍨⍳⍴I←⍞ ... chuckle

Well, someone else managed to beat me using CJam, and I can't make my program any shorter, so CJam did eventually beat me. (But Pyth gets the crown.) (That said, @vaxquis, APL is far easier to read than most of the other languages used on here, certainly once you know the 60 or so characters, and certainly when compared to Pyth or CJam or even J.)

C, 105
two slightly different ways of doing it.
c,i,j;main(int l,char**v){for(l=strlen(v[1]);j-l;)putchar((c=v[1][i++])?i-1-j&&l-i-j?32:c:(i=0,j++,10));}

i,j;main(int l,char**v){for(l=strlen(v[1]);j-l;i++)putchar((l-i)?i-j&&l-i-j-1?32:v[1][i]:(i=-1,j++,10));}

If you want to add extra spaces, replace putchar( with printf(" %c", for an extra 5 characters.

J - 36 30 bytes:
Edit: 6 characters shorter, credits go to  @algorithmshark .
(1j1#"1' '&,({~](*>.*&|.)=)#\)

eg:
   (1j1#"1' '&,({~](*>.*&|.)=)#\) 'Code-Golf'
C               f
  o           l
    d       o
      e   G
        -
      e   G
    d       o
  o           l
C               f

Bonus: works with even length strings too:
   (1j1#"1' '&,({~](*>.*&|.)=)#\) 'CodeGolf'
C             f
  o         l
    d     o
      e G
      e G
    d     o
  o         l
C             f

Prolog - 240 bytes
:-initialization m.
+[]. +[H|T]:-(H=' ';!),+T.
+[H|T]+I+X:-0=:=I,X=H;+T+(I-1)+X.
+L+I+C+S:-L=:=I;S=[D|E],+C+I+B,+C+(L-I-1)+B,+B+2*I+D,+L+(I+1)+C+E,+B,writef('%s\n',[B]).
-X:-get_char(C),(C='\n',X=[];X=[C|Y],-Y).
m:- -X,length(X,L),+L+0+_+X.

Invocation:
$ echo "Code-Golf" | swipl -qf c.pl
C               f
  o           l
    d       o
      e   G
        -
      e   G
    d       o
  o           l
C               f

Readable:
:- initialization(main).

vars_to_spaces([]).
vars_to_spaces([' '|T]) :- vars_to_spaces(T).
vars_to_spaces([_|T]) :- vars_to_spaces(T).

get_index([Head|_], Index, Result) :-
    0 =:= Index,
    Result = Head.
get_index([_|Tail], Index, Result) :-
    get_index(Tail, Index-1, Result).

print_loop(Length, Index, Board, String) :-
    Length =:= Index;
    String = [FirstChar|RestString],
    get_index(Board, Index, Line),
    get_index(Board, Length-Index-1, Line),
    get_index(Line, 2*Index, FirstChar),
    print_loop(Length, Index+1, Board, RestString),
    vars_to_spaces(Line),
    writef('%s\n', [Line]).

get_line(Line) :-
    get_char(C),
    (   C = '\n', Line = [];
        Line = [C|More], get_line(More)).

main :-
    get_line(String),
    length(String, Length),
    print_loop(Length, 0, _, String).

Jelly, 11 bytes
LḶḤ⁶ẋ;"µ»ṚY

Try it online!

Powershell, 78 bytes
+8 bytes thanks @streetster
param($s)$s|% t*y|%{$r=,' '*$s.length;$r[+$i++]=$_;$r[-$i]=$s[-$i];$r-join' '}

Explaned test script:
$f = {

param($s)               # declare a parameter $s stores a word
$s|% t*y|%{             # split $s into chars https://codegolf.stackexchange.com/a/168174/80745
    $r=,' '*$s.length   # create an array of spaces with length equal length of the word
    $r[$i++]=$_         # set first char
    $r[-$i]=$s[-$i]     # set last char
    $r-join' '          # join the array to string
}

}

&$f PROGRAM
''
&$f sword
''
&$f uhm
''
&$f o
''
&$f codegolf  # It works with word that contains even number of letters

Powershell, 70 bytes (if a word can be represented by an array of chars)
+8 bytes thanks @streetster
($s=$args)|%{$r=,' '*$s.count;$r[+$i++]=$_;$r[-$i]=$s[-$i];$r-join' '}

Test script:
$f = {

($s=$args)|%{$r=,' '*$s.count;$r[+$i++]=$_;$r[-$i]=$s[-$i];$r-join' '}

}

&$f P R O G R A M
''
&$f s w o r d
''
&$f u h m
''
&$f o
''
&$f c o d e g o l f  # It works with word that contains even number of letters

Output for both cases:
P           M
  R       A
    O   R
      G
    O   R
  R       A
P           M

s       d
  w   r
    o
  w   r
s       d

u   m
  h
u   m

o

c             f
  o         l
    d     o
      e g
      e g
    d     o
  o         l
c             f

Since you can take input as a char-array (Meta post), that can save some bytes.

I'm not sure that the word in the rule print the following pattern for any given word that contains odd number of letters means an array of chars in a Powershell :) But I've updated post

Aren't you crossing the wrong way?

@streetster, you are best! I've updated the post.

Oof, +8 bytes - sorry!

But now the crossing is correct :)

C# (214 212)
(Certainly badly) Golfed version:
using System;class A{static void Main(){char[]a,w=Console.ReadLine().ToCharArray();int l=w.Length,i=0;for(;i<l;i++){a=new string(' ',2*l-1).ToCharArray();a[2*i]=w[i];a[2*l-2*i-2]=w[l-i-1];Console.WriteLine(a);}}}

Ungolfed version:
using System;

class A
{
  static void Main()
  {
    char[] a, w = Console.ReadLine().ToCharArray();
    int l = w.Length, i = 0;
    for (; i < l; i++)
    {
      a = new string(' ', 2 * l - 1).ToCharArray();
      a[2 * i] = w[i];
      a[2 * l - 2 * i - 2] = w[l - i - 1];
      Console.WriteLine(a);
    }
  }
}

Any hints, tips, tricks or remarks are very welcome, as this is my first attempt at CodeGolf. I just wanted to try it, even though I know my C# byte length won't even come close to double the best solutions ;)
And how do you guys count your bytes? I just posted the above into a Quick Watch window and did .Length. I could write a small program to count bytes for me, but I bet there is an easier way that I don't yet know.

You can save two bytes by removing the spaces in for(;i < l;i++).

Also, I use this for my byte counting.

@BetaDecay Ah great, I must have overlooked those. And thanks for the link!

JavaScript (ES6) - 185 177 175 170 bytes
f=n=>{return s='  ',r='repeat',n=[...n],l=n.length,j=l/2-.5,[...h=n.slice(0,j).map((c,i)=>s[r](i)+c+s[r](l-2-(i*2))+' '+n[l-i-1]),s[r](j)+n[j],...h.reverse()].join('\n')}

Put this in the Firefox console and run as f('PROGRAM'):
P           M
  R       A
    O   R
      G
    O   R
  R       A
P           M

f("CODE-GOLF"):
C               F
  O           L
    D       O
      E   G
        -
      E   G
    D       O
  O           L
C               F

http://codegolf.stackexchange.com/a/40594/26974

I saw that one too.

Mathematica, 149 bytes
FromCharacterCode@Flatten[Append[Riffle[#,32],10]&/@MapThread[Max,{#,Reverse@#,ConstantArray[32,Dimensions@#]},2]&@DiagonalMatrix@ToCharacterCode@#]&

Input passed as parameter to the function; function returns the output string. There is a trailing newline at the end of the output.
Explanation: We create a diagonal matrix with the string, then we create a copy of it vertically flipped using Reverse@# to reverse the rows. Then we have a third matrix of the same dimensions containing only 32 (ascii space). We use MapThread to take the element-wise max of these 3 matrices. Finally, we Riffle spaces into each row, Append a newline at the end, and Flatten the result.

Perl - 90
It might be possible to squeeze some more characters out of this:
($j=$i++%8)==7?++$k&&print"\n":print$j+1==$k||7-$j==$k?"$_ ":"  "for split//,($_ x y///c)

89 + 1 for -n.
Run with:
echo "program" | perl -nE'($j=$i++%8)==7?++$k&&print"\n":print$j+1==$k||7-$j==$k?"$_ ":"  "for split//,($_ x y///c)'

Output:
p           m
  r       a
    o   r
      g
    o   r
  r       a
p           m

PowerShell 118 102 97
($x=[char[]]"$args")|%{$i++;$y=[char[]]" "*$x.Count;$y[$i-1]=$x[$i-1];$y[-$i]=$x[-$i];$y-join' '}

Outputs:
PS C:\PowerShell> .\cross.ps1 SWORD
S       D
  W   R
    O
  W   R
S       D

T-SQL: 180
Taking the input from variable @i
DECLARE @s VARCHAR(MAX)=REPLICATE('  ',LEN(@i)),@ INT=1a:PRINT STUFF(STUFF(@s,@*2-1,1,SUBSTRING(@i,@,1)),LEN(@i)*2-(@*2)+1,1,SUBSTRING(@i,LEN(@i)-@+1,1))SET @+=1IF @<=LEN(@i)GOTO A

This stuffs single characters in/decrementing from the start and end into a string of spaces.
Test Result
DECLARE @i VARCHAR(MAX)='Super Large'
DECLARE @s VARCHAR(MAX)=REPLICATE('  ',LEN(@i)),@ INT=1a:PRINT STUFF(STUFF(@s,@*2-1,1,SUBSTRING(@i,@,1)),LEN(@i)*2-(@*2)+1,1,SUBSTRING(@i,LEN(@i)-@+1,1))SET @+=1IF @<=LEN(@i)GOTO A
S                   e
  u               g
    p           r
      e       a
        r   L

        r   L
      e       a
    p           r
  u               g
S                   e

JavaScript (Node.js), 81 bytes
f=s=>[...s].map((_,i,a)=>a.map((c,j)=>j==i|j==s.length+~i?c:' ').join` `).join`
`

EDIT: -1 Thanks Joe King. I didn't see the TIO gives preformatted direct paste for CG.
Try it online!

btw, the excess code to execute the code in TIO can go in the program footer. This helps determine the correct byte count and use the automated PPCG answer format more smoothly. e.g. Try it online!

-i-1 can be +~i

Stax, 13 bytes
â┤▼iS╙£≥»u5V╓

Run and debug it
Unpacked, ungolfed, and commented, it looks like this.
{       begin block for mapping characters of input
  ]i^)  left-pad each character to length (i+1) where i is the index
m       map using block
r       reverse the array; this produces the southwest-northeast diagonal
m       map using the rest of the program, implicitly output result
  i     iteration index
  xi@   get the i'th character of the original input, where i is the iteration
  &     assign element to array at index
  0\    join with spaces

Run this one

R, 88 bytes
n=ncol(m<-diag(u<-utf8ToInt(scan(,""))-32));diag(m[,n:1])=u;write(intToUtf8(m+32,T),1,n)

Try it online!

Nice! Like me, you can save 2 bytes by using pmax (originally Giuseppe's suggestion).

This won't work with length 1 input.

Canvas, 6 bytes
＼：↶ｎ ＊

Try it here!
Explanation
＼       Create a diagonal with the input
 ：      Duplicate the diagonal
  ↶     Rotate left
    ｎ   Simple overlap
      ＊ Insert spaces on every line

There is already a 5-byte Canvas answer, but nice approach regardless! :)

I see, the built-in is ｎ...

Zsh, 90 82 bytes
Kudos to @pxeger for saving 8 bytes.
for i ({1..$#1})(for z (${(s::)1}){((i==++j||j+i==$#1+1))||z=\
printf $z\ }
echo)

Attempt this Online   90 bytes

82 bytes with a bit of a rejig of the loops

Nice, I knew it needed more optimisation!

C# 208
static void Main()
{
string s=Console.ReadLine(),t="";
int n=s.Length;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(i==j)t+=s[i];
else if(i==n-j-1)t+=s[n-i-1];
t+=" ";
}
t+="\n";
}
Console.WriteLine(t);
}

Save 11 precious characters with t+=i==j?s[i]:i==n-j-1?s[n-i-1]:"";.

Can you remove those newlines?

No matter how long, there's always gotta be an answer in...
Java - 289 234 bytes
public static void main(String[]a){int l=a.length-1,i=0,j;for(;i<=l;i++){for(j=0;j<=l;j++){if(j==i)System.out.print(a[i]);else if(i==l-j)System.out.print(a[j]);else System.out.print(" ");System.out.print(" ");}System.out.println();}}}

Ungolfed:
    class A {

    public static void main(String[] a) {
        int l = a.length - 1, i = 0, j;
        for (; i <= l; i++) {
            for (j=0; j <= l;j++) {
                if (j == i)
                    System.out.print(a[i]);
                else if (i == l-j)
                    System.out.print(a[j]);
                else
                    System.out.print(" ");
                System.out.print(" ");
                }
            System.out.println();
        }
    }
}

Output, lousily done, is:
P           M
  R       A
    O   R
      G
    O   R
  R       A
P           M

Added the import java.util.Scanner inside the code because I never remember if the imports count towards the byte count... Damn, I really suck at this.

Imports do count. This is partly because of Python's import-and-alias syntax: from math import floor as f which is a bit cheaty

You should be able to save a bunch of characters by combining all the System.out.print calls into one, using a couple of ternary operators.

@DLosc Could you give me a few examples?

Yes, actually Geobits' answer is a perfect example--see the contents of the System.out.print call at the end.

See, replies like Geobits' make me feel like I know so little of Java. I was thinking about creating an empty String and appending to it the spaces and characters, using the System.out.println to output it only at the end. Oh well...

@RodolfoDias Don't feel that way. My first few golfs in Java were terrible, and I can still normally shave a decent chunk off my "first revisions" if I look hard enough ;)

GolfScript 46 (DEMO)
:w,:l,{l,{.[.l(\-]2$?)!w@[=32]=}%\;''+' '*}%n*

C# (192 / 170)
using System;class P{static void Main(){var s=Console.ReadLine();int x,y,l=s.Length;for(x=0;x<l;x++){for(y=0;y<l;y++)Console.Write(x==y||l-x==y+1?s.Substring(x,1):" ");Console.Write("\n");};}}

Or, as "Main() only":
static void Main(){var s=Console.ReadLine();int x,y,l=s.Length;for(x=0;x<l;x++){for(y=0;y<l;y++)Console.Write(x==y||l-x==y+1?s.Substring(x,1):" ");Console.Write("\n");};}

Charcoal, 9 7 17 10 bytes
↘Ｓ⟲ＯＯＬθＵＥ¹

+10 bytes because I missed the requirement of space-columns.
-7 bytes thanks to @ASCII-only.
Try it online (verbose) or try it only (pure).
Challenges like this is why Charcoal was made.
Explanation:
Print the input-string in a down-right direction:
Print(:DownRight, InputString());
↘Ｓ

Rotate it 90 degree counterclockwise, and shift it up the length of the input-string amount of times with overlap:
RotateOverlapOverlap(Length(q));
⟲ＯＯＬθ

Put a space gap of size 1 between every column:
Extend(1);
ＵＥ¹

It's not exactly diagonal. There should be an empty column between characters.

@Krumia Should be fixed now.

@KevinCruijssen 10

@ASCII-only Thanks! Didn't knew about Extend, but it's just what was necessary here.

XD > try it only

@ASCII-only Ah oops, lol.. I'll just leave that in. ;p

QBasic, 91 bytes
INPUT w$
l=LEN(w$)
FOR i=1TO l
c$=MID$(w$,i,1)
LOCATE i+1,i*2
?c$
LOCATE l-i+2,i*2
?c$
NEXT

Loops through the input word and uses the LOCATE statement to place each letter (twice) on the screen.

K (oK), 31 bytes
Solution:
`c$a||a:(2*#x)$(-1-2*!#x)$,:'x:

Try it online!
Explanation:
Generate the diagonal, and or with the reverse of the diagonal
`c$a||a:(2*#x)$(-1-2*!#x)$,:'x: / the solution
                             x: / save input as x
                          ,:'   / enlist (,:) each-both (')
                         $      / pad (negative is right-pad)
               (        )       / do this together
                      #x        / count (#) length of x
                     !          / range (!) 0..this count
                   2*           / double it
                -1-             / subtract from -1
              $                 / pad
        (    )                  / do this together
           #x                   / count (#) length of x
         2*                     / multiply by 2
      a:                        / save as a
     |                          / reverse (|) it
   a|                           / or (|) with a
`c$                             / cast to characters

K4, 26 bytes
Solution:
a||a:(2*#x)$(-1-2*!#x)$$x:

Explanation:
Similar to my oK answer but a little shorter:
a||a:(2*#x)$(-1-2*!#x)$$x: / the solution
                        x: / save input as x
                       $   / string ($) breaks into char lists
                      $    / cast ($)
            (        )     / do this together
                   #x      / count (#) length of x
                  !        / range (!) 0..this count
                2*         / double it
             -1-           / subtract from -1
           $               / pad
     (    )                / do this together
        #x                 / count (#) length of x
      2*                   / multiply by 2
   a:                      / save as a
  |                        / reverse (|) it
a|                         / or (|) with a

PHP, 81 bytes
for($k=strlen($s=$argn);$k;$t[2*$i]=$s[$i++],$t[2*--$k]=$s[$k],print"$t
")$t=" ";

Run as pipe with -nR or try it online.

Python 3, 176 bytes
w=input();l=len(w);d=l//2;n=' ';x=range(d)
for i in x:print(n*i*2+w[i],n*(l+2-i*4),w[-1*i-1])
print(n*(l-1)+w[d])
for i in x:print(n*(l-i*2-3)+w[-1*(d+i+2)],n*(i*4+1),w[d+i+1])

Try it online!
This is super stupid, any improvements that you notice are welcome

TI-Basic, 75 bytes
Input Str1
length(Str1→L
For(I,1,L
"
For(J,1,L
If max(J={I,1-I+L:Then
Ans+sub(Str1,J,1)+"
Else
Ans+"
End
End
Disp Ans
End

There is 1 space at the end of lines 4 and 7, and there are 2 spaces at the end of line 9. Outputs a leading space at the beginning of each line.

Alternatively, a larger but faster method (100 bytes):
Input Str1
length(Str1→L
"
For(I,1,L
Ans+"  →Str2
End
For(I,1,L
min(I,1-I+L→K
2(max(L,2)-Ans
Disp sub(Str2+sub(Str1,K,1)+Str2,Ans+4,Ans)+sub(Str1,L-K+1,1
End

There is 1 space at the end of line 3. Outputs two leading spaces if the input has a length of 1.

Jelly, 10 bytes
ṪṭaɗƤ⁶»Ṛ$G

Try it online!
Erik's existing answer ties with minor modifications to also use G: LḶ⁶ẋ;"µ»ṚG.
    Ƥ         For each prefix of the input,
Ṫ             remove the last element
 ṭ            and append it back onto
  aɗ ⁶        the remaining elements replaced with spaces.
      »       Take the maximum of each element of that and
       Ṛ$     its reverse.
         G    Grid format: join each row on spaces then join the rows on newlines.

C++:
#include <iostream>
#include <string>

int main()
{
    char a[] = {'P','R','O','G','R','A','M'};
    int length = sizeof(a)/sizeof(a[0]);
    int l = length - 1, i, j;
    for (i=0; i <= l; i++) {
        for (j=0; j <= l;j++) {
            if (j == i)
                std::cout<<a[i];
            else if (i == l-j)
                std::cout<<a[j];
            else
                std::cout<<"s";
        }
        std::cout<<"\n";
    }
}

Welcome to PPCG! This is [tag:code-golf] which means that the goal is to solve the problem in as few bytes as code as possible. As per our help centre every answer should make a reasonable stab at the given winning criterion (within the limits of their language), which would mean at least removing unnecessary whitespace and using single-character variable names. You can always include a readable/"ungolfed" version in addition to the competitive one. Once you've done this, please also include the byte count of your code in the header.

And anyways, per the rules, using C++ is prohibited.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

authors: ابراهيم الشريهي

authors: شهااب الشمرري

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/