Overengineering simple problem

Pic related.

Show me your software engineering skill and make it complex as much as you can.

Like this?

void main()
{
char array[2048] = {0};
char *ptr = array;

*ptr += 10;
while(*ptr)
{
++ptr;
*ptr += 7;
++ptr;
*ptr += 10;
++ptr;
*ptr += 3;
++ptr;
++*ptr;
ptr -= 4;
--*ptr;
}

++ptr;
*ptr += 2;
putchar(*ptr);
++ptr;
++*ptr;
putchar(*ptr);
*ptr += 7;
putchar(*ptr);
putchar(*ptr);
*ptr += 3;
putchar(*ptr);
++ptr;
*ptr += 2;
putchar(*ptr);
ptr -= 2;
*ptr += 15;
putchar(*ptr);
++ptr;
putchar(*ptr);
*ptr += 3;
putchar(*ptr);
*ptr -= 6;
putchar(*ptr);
*ptr -= 8;
putchar(*ptr);
++ptr;
++*ptr;
putchar(*ptr);
++ptr;
putchar(*ptr);
}

secured job/10

Yes, but to make it professional we need some external dependencies.

main should return int

That's literally just some const-folded brainfuck.

#include

fugged up indentation
function FizzBuzz(length, bool, map){
this.length = ++length;
this.bool = bool;
this.map = map;
};
FizzBuzz.prototype.fizzbuzz = function(){
console.log(
Array.apply(
null, new Array(this.length)).map(
Number.call, Number).map(
i => {
let c = '';
this.map.forEach(
(
a,
b
) => {
switch(this.bool){
case true:
((''+i).indexOf(b) != -1)&&(c += a);
default:
!(i%b)&&(c += a);
break;
}
}
); return (c)?c:i
}
).slice(
1
).join(
'\n'
)
)
}
var FizzBuzzer = new FizzBuzz(100, false, new Map([[3, 'Fizz'], [5, 'Buzz'], [7, 'Woof']]));
FizzBuzzer.fizzbuzz();

oh you meant the enterprise version? Here you go, compile with "-static-libstdc++" flag on g++

#include
#include
#include


class HelloWorlder
{
private:
std::string helloWorldText;

public:
std::string getHelloWorldText()
{
return helloWorldText;
}

void setHelloWorldText(const std::stringstream* text) throw(int)
{
if(text->rdbuf()->in_avail())
{
helloWorldText = text->str();
}
else
{
throw -1;
}

}
};

int main ()
{
std::stringstream hello;
hello setHelloWorldText(&hello);
std::stringstream answer;
answer getHelloWorldText();
std::cout

Sorry, you are not allowed to see the message until you pay us 1.3 bitcoins. Press the button to purchase.
Click me, bitch.

import java.util.ArrayList;

public class Main {
public static void main(String[] args) {
new Main().run();
}

public void run() {
SentenceEmitter emitter = new SentenceEmitter(' ', '!');
HelloWordEmitter helloWordEmitter = new HelloWordEmitter();
WorldWordEmitter worldWordEmitter = new WorldWordEmitter();
emitter.add(helloWordEmitter);
emitter.add(worldWordEmitter);
emitter.emit();
}

abstract class Emitter {
void emit(char ch) {
System.out.append(ch);
}
}

abstract class WordEmitter extends Emitter {
char[] chars;

void emitWord() {
for (char aChar : chars) {
emit(aChar);
}
}
}

class HelloWordEmitter extends WordEmitter {
final char[] HELLO_WORD = new char[]{'H', 'e', 'l', 'l', 'o'};

HelloWordEmitter() {
chars = HELLO_WORD;
}
}

class WorldWordEmitter extends WordEmitter {
final char[] HELLO_WORD = new char[]{'w', 'o', 'r', 'l', 'd'};

WorldWordEmitter() {
chars = HELLO_WORD;
}
}

class FlexibleCharEmitter extends Emitter {
char charToEmit;

FlexibleCharEmitter(char charToEmit) {
this.charToEmit = charToEmit;
}

void emitChar() {
emit(charToEmit);
}
}

class SentenceEmitter extends ArrayList {
FlexibleCharEmitter delimiterEmitter;
FlexibleCharEmitter finalPunctuationMarkEmitter;

SentenceEmitter(char delimiter, char finalPunctuationMark) {
this.delimiterEmitter = new FlexibleCharEmitter(delimiter);
this.finalPunctuationMarkEmitter = new FlexibleCharEmitter(finalPunctuationMark);
}

void emit() {
int i = 0;
for (WordEmitter wordEmitter : this) {
wordEmitter.emitWord();
if (i < size() - 1)
delimiterEmitter.emitChar();
i++;
}
finalPunctuationMarkEmitter.emitChar();
}
}
}

Have some concurrency and pointless copying.

#include
#include
#include
#include

typedef struct arg arg;

struct arg {
size_t i;
char *s;
size_t t;
};

arg *init_arg(const char *c, size_t t) {
size_t l = 0;
while(c[l++]) {
}
arg *arg = malloc(sizeof(*arg));
arg->s = malloc(sizeof(*(arg->s)) * l + 1);
strcpy(arg->s, c);
arg->i = 0;
arg->t = t;
return arg;
}

void free_arg(arg *a) {
if(a) {
free(a->s);
free(a);
}
}

void *print_char(void *x) {
arg *a = (arg *)x;
if(a->i == a->t) {
free_arg(a);
return NULL;
}
printf("%c", a->s[a->i]);
pthread_t t;
arg *t_arg = init_arg(a->s, a->t);
t_arg->i = a->i + 1;
pthread_create(&t, NULL, print_char, t_arg);
pthread_join(t, NULL);
free_arg(a);
return NULL;
}

int main() {
const char tmp[] = "Hello, world!";
size_t s = sizeof(tmp) / sizeof(tmp[0]);
char *a = malloc(sizeof(*a) * (s + 1));
strcpy(a, tmp);
pthread_t x;
arg *t_arg = init_arg(a, s);
free(a);
pthread_create(&x, NULL, print_char, t_arg);
pthread_join(x, NULL);
printf("\n");
return 0;
}

Needs some reflection and third party frameworks, just for added security.

...

String s = ("say it to my face");
s = s.concat("not over the internet");

che frocio che sei loris

main(puts,printf){while(putchar(puts++[" Hello, world!\n"]));}

#define S "Hello, world\n"
main(){exit(printf(S)==strlen(S)?0:1);}

#include
intfoo(void){return0x55;}charass1(void){return'N';}charass2(void){return'b';}charass3(void){return'p';}charass4(void){return'o';}intbar(intx){int(*fooPtr)(void);x=nope(x);fooPtr=foo;returnfooPtr();}charhole(intq,intx){void(*func_ptr[4])={ass1,ass2,ass3,ass4};x=nope(x);char(*fooPtr)(void);fooPtr=func_ptr[q];returnfooPtr();}char*asshole(char*str,intx){char*p=str;intsize=0;x=nope(x);while(*p){*p++;size++;}char*array=calloc(size+1,sizeof(char));for(inti=0;i

#include
#include
#include
#include
int foo(void){return 0x55;}
char ass1(void){return 'N';}
char ass2(void){return 'b';}
char ass3(void){return 'p';}
char ass4(void){return 'o';}
int bar(int x){int (*fooPtr)(void);x = nope(x);fooPtr = foo;return fooPtr();}
char hole(int q, int x){void (*func_ptr[4]) = {ass1, ass2, ass3, ass4};x = nope(x);char (*fooPtr)(void);fooPtr = func_ptr[q];return fooPtr();}
char *asshole( char *str, int x){char* p = str;int size = 0;x = nope(x);while(*p){*p++;size++;}char *array = calloc(size+1, sizeof(char));for (int i = 0; i < size; ++i){char c = str[i];unsigned char b = (unsigned char)(c ^ size - i);unsigned char b2 = (unsigned char)((c >> 8) ^ i);array[i] = (char)(b2

Everyone talks about how simple "Hello World" is, but I it took me months to get it to work. I am glad I started working on it during the summer before the class started, because they wanted us to do it in under an hour. One hour to do a months worth of work, I dropped the class after a few days as the introducing to programing was way too hard and I was accused of cheating, I guess I am just not good with that kind of stuff

When you stop and think about the sequencing of charge bit values in a dynamic system is actually very complex and also hardware specific. You have to have a firm grasp of binary and transistor array structures if you ever want to understand these things. Thankfully the library had lots of book on the subject in the Electrical Engineering section, which is confusing as one would think it would be with the Programing or other sections

The first few days was me just trying to think of a good way to reverse engineer the computer used for my testing, as I didn't have time to build a translator for all architecture types after realizing how big this task was. Then actually doing it. Once I had the identified every circuit in the unit and how they interacted I then started looking for a static pattern that would create the desired results. I eventually I found a sequence of electric impulses that would flip part of the graphics card memory to make the screen display the correct answer. But that was not good enough as it would only display for one cycle. So I found a second sequence that altered the refresh buffer so the screen wouldn't change for 5 seconds. Then put them together as a larger one. After which I started testing the binary sequence to find and assembly function that matched outputs, so I didn't have to type it out as much and we couldn't bring anything with us to the test

Apparently the test not only had to display the text on screen, which I did, but it had to document it to some secret file I didn't know about, I failed

10/10

: hello ." Hello World!";
hello

...

Made me kek. Here's your (You)

>overengineering
Keep it simple, stupid:

hello = require('hello-world')
hello.run()

if (a < b && b > a)

underrated