46
\$\begingroup\$

Steve Ballmer is the ex-CEO of Microsoft, and in a recent article, claimed that he "still does not know what he did wrong with mobile".

As CodeProject's newsletter pointed out, "That article's title could be ended at so many spots and still be accurate".

Given no input, output the following:

Steve Ballmer still does not know.
Steve Ballmer still does not know what he did.
Steve Ballmer still does not know what he did wrong.
Steve Ballmer still does not know what he did wrong with mobile.

This must be outputted exactly as shown, and must be the only output of your program. You may include a single trailing newline.

This is so fewest bytes in each language wins

\$\endgroup\$
  • 59
    \$\begingroup\$ When I saw the title / tags I thought that the output would be developers developers ... \$\endgroup\$ – Rod Jun 1 '17 at 12:30
  • 15
    \$\begingroup\$ tcl, 25while 1 {puts developers}demo \$\endgroup\$ – sergiol Jun 1 '17 at 13:29
  • 8
    \$\begingroup\$ braingolf, 23 - 1"developers "[!@11 1>] :P \$\endgroup\$ – Skidsdev Jun 1 '17 at 13:31
  • 16
    \$\begingroup\$ And I thought of xkcd's Ballmer Peak \$\endgroup\$ – ojdo Jun 1 '17 at 15:51
  • 5
    \$\begingroup\$ yes, 14yes developers \$\endgroup\$ – sergiol Jun 6 '17 at 0:12

50 Answers 50

1
\$\begingroup\$

Octave, 126 bytes

Two approaches, same length:

printf('%s.\n',(s={'Steve Ballmer still does not know',' what he did',' wrong',' with mobile'}){1},[s{1:2}],[s{1:3}],[s{1:4}])

Try it online!

s={'Steve Ballmer still does not know',' what he did',' wrong',' with mobile'};printf('%s.\n',s{1},[s{1:2}],[s{1:3}],[s{1:4}])

Try it online!

I could make it 21 bytes shorter, if I steal Rod's approach, but that's no fun.

for i=[33,45,51,63],disp(['Steve Ballmer still does not know what he did wrong with mobile'(1:i),46]),end
\$\endgroup\$
1
\$\begingroup\$

MATLAB / Octave - 120 bytes

a=[];s={'Steve Ballmer still does not know',' what he did',' wrong',' with mobile'};for i=s,a=[a i{1}];disp([a '.']);end

Logic is to start off with an empty string, then we have a cell array that contains the base string as the first element followed by the additions for the other elements. Note that each additional component has a space prepended. We then iterate through the cell array, and at each iteration we concatenate with a component and display the string to the user adding a period at the end.

We get:

>> a=[];s={'Steve Ballmer still does not know',' what he did',' wrong',' with mobile'};for i=s,a=[a i{1}];disp([a '.']);end
Steve Ballmer still does not know.
Steve Ballmer still does not know what he did.
Steve Ballmer still does not know what he did wrong.
Steve Ballmer still does not know what he did wrong with mobile.

Try it online!

http://www.tutorialspoint.com/execute_octave_online.php?PID=0Bw_CjBb95KQMRGZoWFJ1Z3NaNTQ

\$\endgroup\$
1
\$\begingroup\$

Bash, 92 91 bytes

printf 'Steve Ballmer still does not %s.
' know{,' what he did'{,\ wrong{,\ with\ mobile}}}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

JavaScript (ES6, no browser dependencies) 154 Bytes

(s='Steve Ballmer still does not know what he did wrong with mobile.')=>{
  let l=s.slice.bind(s)
  return `${l(0,33).\n${l(0,45)}.\n${l(0,51)}.\n${s}`
}

The other ES6 solution requires (and doesn't account for) the use of html and html element APIs.

\$\endgroup\$
1
\$\begingroup\$

Retina, 82 bytes


ABCC with mobile.
C
B wrong
B
.¶A what he did
A
Steve Ballmer still does not know

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Rust, 145 bytes

||{for i in b"!-3?"{println!("{}.",&"Steve Ballmer still does not know what he did wrong with mobile".to_owned().get(..*i as usize).unwrap());}};

Inspired by this solution.

Try it online!

\$\endgroup\$
1
\$\begingroup\$

APL (Dyalog Unicode), 81 bytesSBCS

↑1⌽¨,\'.Steve Ballmer still does not know' ' what he did' ' wrong' ' with mobile'

Try it online!

One the very right, we have a list of strings.

,\ cumulative concatenation

1⌽¨ cyclically rotate each one step left (puts the periods at the ends)

 mix the list of strings into a character matrix

\$\endgroup\$
0
\$\begingroup\$

QBIC, 95 bytes

?@Steve Ballmer still does not know`+@.`?A+@ what he did`+B?A+C+@ wrong`+B?A+C+D+@ with mobile.

This makes every part of the output into a separate string literal, where 'A$' holds Steve Ballmer still does not know, and then repeatedly prints 'A$', followed by 'B$' (a period) or the next literal.

Chopping the original string into substrings takes just a byte more (96 bytes):

?B,34|+@.`?_sB,46|+A?_sB,52|+A?@Steve Ballmer still does not know what he did wrong with mobile.

Here, 'B$' holds the entire thing, and parts of it are subsequently shown using substring ('_s...|`). Note that 'A$' now holds the period. This allows the full sentence to be moved to the end of the program, so we can drop the closing backtick.

\$\endgroup\$
0
\$\begingroup\$

Braingolf, 139 108 bytes

"Steve Ballmer still does not know
."VRMM!&@v!&@R" what he did"!&@v!&@R" wrong"!&@v!&@R " with mobile"&@v&@R
\$\endgroup\$
0
\$\begingroup\$

Powershell, 101 bytes

0..3|%{-join("Steve Ballmer still does not know"," what he did"," wrong"," with mobile")[0..$_]+"."}
\$\endgroup\$
0
\$\begingroup\$

REXX, 123 bytes

s='Steve Ballmer still does not know what he did wrong with mobile'
w=6 9 10 12
do i=1 to 4
say subword(s,1,word(w,i)).
end
\$\endgroup\$
0
\$\begingroup\$

Perl 6, 90 bytes

"$_.".say for [\,] 'Steve Ballmer still does not know','what he did','wrong','with mobile'
\$\endgroup\$
0
\$\begingroup\$

MSX-BASIC, 123 bytes

1s$="Steve Ballmer still does not know what he did wrong with mobile":forx=1to4:readl:?left$(s$,l);".":next:data33,45,51,64
\$\endgroup\$
0
\$\begingroup\$

Clojure(script), 122 bytes

(print(apply str(interpose"\n"(reductions str"Steve Ballmer still does not know"[" what he did"" wrong"" with mobile"]))))
\$\endgroup\$
0
\$\begingroup\$

Perl, 98 bytes

for('Steve Ballmer still does not know',' what he did',' wrong',' with mobile'){$s.=$_;say "$s."}

(Run via perl -M5.10.1 ... so that "say" will be recognized)

\$\endgroup\$
0
\$\begingroup\$

Tcl, 115 bytes

puts [set S "Steve Ballmer still does not know"].\n[set h "$S what he did"].\n[set w $h\ wrong].\n$w\ with\ mobile.

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Pyth - 98

K." w!ZÑ`±§ÑÔæý^àV;KæM×ü1A_4ÿ"J" what he did"A," wrong"" with mobile"=N\.+KN++KJNs[KJGN)s[KJGHN

The first string is a packed string

\$\endgroup\$
0
\$\begingroup\$

C (gcc), 113 bytes

f(c){for(c=4;c--;)printf("%.*s.\n","?3-!"[c],"Steve Ballmer still does not know what he did wrong with mobile");}

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Fission 2, 109 107 bytes

R"Steve Ballmer still does not know"J2~~$$" what he did"J1~$" wrong"J0" with mobile."*
/0C+$$J1C+$$J2C@"."N

Try it online!

I was a little annoyed at the amount of whitespace in the previous Fission answer, so I decided to see if I could make it smaller.

\$\endgroup\$
0
\$\begingroup\$

Julia 0.6, 99 bytes

Generate the 4 desired strings with cumprod (* is string concatenation). Tack on a period with a broadcasted string concatenation .* and print all elements in the list with a broadcasted call println..

println.(cumprod(["Steve Balmer still does not know"," what he did"," wrong"," with mobile"]).*".")

Try it online!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.