printf(“Hello, World\n);

Making your terminal prompts beautiful.

Imagine


It's your first day programming, you've written yourself a Hello World program, and you're excited to run it for the first time.



Maybe it looks a little like this

#include <stdio.h>;

int main(int argc, char **argv) {
    printf("Hello, World!");
    return 0;
}

You run your program and see this monstrosity

Hello, World!user@hostname ~/developer %


What went wrong?

You forgot the \n (slash n), an essential part of any user-focused program.


How we can help

We at slash n recognized a need to address this growing issue.

Ugly terminals make us programmers look bad.

By simply adding a \n, you can transform your output to something way more beautiful.

#include <stdio.h>;

int main(int argc, char **argv) {
    printf("Hello, World!\n");
    return 0;
}
Hello, World!
user@hostname ~/developer %

Your users (and terminal) will love you for it.



So there must be a catch, right?

No, that's really all.

A single \n adds a measly 2 bytes to your source code.