[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>first job interview >asked to write hello world in C++

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 78
Thread images: 7

File: 1472095115400.png (157KB, 2603x1000px) Image search: [Google]
1472095115400.png
157KB, 2603x1000px
>first job interview
>asked to write hello world in C++
>open visual studio
>hear laughing in the background
>"Actually we just hired somebody else, good luck"

Third time this has happened. Every time I mention visual studio they immediately end the interview. What editor should I learn that will actually get me a job?
>>
All my interviews have been in notepad or on whiteboard. Google had me use google docs for the over the phone interview
>>
pen and paper is all you need for hello world
>>
This is b8
>>
didn't happen
but i wish it did
>>
>>56380165
#include <iostream> int main(){std::cout << "Hello world"; return 0;}


this is how you write hello world for a potential employer. It shows you are efficient.
>>
>>56380602
everyone knows that more lines = more program you dunce
>>
>>56380602

> didn't even #include <windows.h>

You need to use at least 4 windows-specific API calls
>>
>Using VS for C/C++
Enjoy your C99 compatibility.
>>
>>56380165

>What editor should I learn that will actually get me a job?

Why do you need more that a plain text file and gcc?
>>
>>56380664
>programming on windows

How new are you?
>>
>>56380636
>>56380664

/*!
* Hello world! application
*
* \file hello.cpp
*/

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cassert>

/*!
* Dispay message.
*/
void displayMessage();

/*!
* Sentence type
*
* Type of sentence, used to decide how to terminate sentence.
*/
enum ESentenceType {
eStatement,
eExclamation,
sQuestion,
eCommand
};

/*!
* Utility class to prevent unintended copying of class instances.
*/
class nonCopyable {
protected:
nonCopyable() {
}

~nonCopyable() {
}

private:
nonCopyable(const nonCopyable&);
const nonCopyable& operator=(const nonCopyable&);
};

/*!
* Utility function to obtain punctuation mark to end sentence
* of specified type.
*/
inline char getPunctionMark(ESentenceType sentenceType) {
char puncMark = '.';
switch(sentenceType) {
case eStatement : puncMark = '.'; break;
case eExclamation: puncMark = '!'; break;
case sQuestion : puncMark = '?'; break;
case eCommand : puncMark = '.'; break;
default: {
// should never get here
assert(false);
}
}
return puncMark;
}

/*!
* Utility class for creation of instances.
*/
template<typename TElem>
class Creatable {
protected:
Creatable() {
}

virtual ~Creatable() {
clear();
}

public:
static TElem* create() {
TElem* e = new TElem;
return e;
}

void free() {
delete this;
}


>>
>>56380721
http://www.cplusplus.com/forum/lounge/79437/
>>
>>56380715

>implying that people don't develop Windows software using Windows

Retard.
>>
>>56380744
>he doesnt know
>>
>>56380763

>he doesn't develop
>>
>>56380744
uhhh... most people develop for windows on Linux, even ms devs themselves...
>>
>>56380788
So uhh do they just assume the code is correct without any build tests?
>>
>>56380165
this did not happen
>>
Surprised people are replying to this b8.
>>
>>56380715

was a joke, because every program by a windows person is littered with shit I've never seen as a C++ dev
>>
>>56380165
emacs
>>
Notepad++
>>
File: 01b[1].png (39KB, 640x400px) Image search: [Google]
01b[1].png
39KB, 640x400px
>>56380788
What the fuck are you talking about?
>>
File: 1452178234649[1].jpg (353KB, 1036x1080px) Image search: [Google]
1452178234649[1].jpg
353KB, 1036x1080px
>>56380743
virtual ~AbstractHello(){std::cout << " World!";}
>>
>>56380721
forgot karlie browsed 4chins
>>
File: comedy gold.jpg (42KB, 660x330px) Image search: [Google]
comedy gold.jpg
42KB, 660x330px
>>56380721
>delete this
>>
>>56380951
>>56381071
It's true. They test in a VM or deploy to a remote test machine.
>>
>>56380511
No... really?
>>
File: Visual-studio-code-1024x725.png (263KB, 1024x725px) Image search: [Google]
Visual-studio-code-1024x725.png
263KB, 1024x725px
>>56380165
Visual Studio Code
>>
>>56380165
>Things that never happened.

Microsoft is so deeply inside the rectum of pretty much every company out there they would laugh if you used something else.

Also technically you should also only use the tools that are provided by the company due to standardization but you're just a NEET shitposting.
>>
>>56380602
the include and the int main must be in diferent lines
the # makes the entire line to be a macro
>>
>>56382152
nope
>>
>>56382075
why do people use this garbage?
>>
>>56382229
whats wrong with it?
>>
>>56382152
>>56382218

might be IDE specific, VS doesn't allow it.
I'm pretty sure it's not allowed anywhere though.

#includes should be on their own private lines
>>
File: image.jpg (5KB, 124x83px) Image search: [Google]
image.jpg
5KB, 124x83px
>25 yo
>BS Comp Sci UIUC
>use VS2015 + ReSharper allday erryday
>$120k/yr + benefits
Feels good man
>>
>>56380165
emacs
>>
>>56380602
#include <stdio.h> main() { puts("hello world"); }
>>
File: Jared-Leto-Joker[1].jpg (57KB, 644x508px) Image search: [Google]
Jared-Leto-Joker[1].jpg
57KB, 644x508px
>>56383224
>22:22:22
>>
>>56382229
Because it's still better than Atom, yet free and not a sperg editor.
>>
>>56382218
$ cat hello.cc
#include <iostream> int main(){std::cout << "Hello world"; return 0;}
$ g++ hello.cc
hello.cc:1:21: warning: extra tokens at end of #include directive
#include <iostream> int main(){std::cout << "Hello world"; return 0;}
^~~
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
>>
>>56383391
install gentoo
>>
>>56380721
delicious utility
>>
>>56383194
>ReSharper

What the hell does resharper do anyways? Am actually curious.
>>
>>56380686
>plain text file
Is a file format, not an editor. And to Windows users, it tends to imply use of Notepad, which really isn't ideal for anything more complex than Hello World. An editor with line numbers, at least, makes it much easier to resolve syntax errors.

>>56380788
What specifically makes Linux so better for development? Is it just things like make and an actually usable command prompt?

>>56382152
>>56382218
>>56382265
>>56383391
C/C++ standards say preprocessor directives are terminated by a newline, as there is no other explicit terminator like the ';' for regular code.
>>
>>56383537
Ever tried installing a library on Windows?
>>
>>56380165
>first job interview
>Third time this has happened.
>>
>>56383733
u just got TRICKED
>>
>>56380602
>unreadeable codes are what employers want
>>
>>56380165
Visual studio is amazing, but in reality you shouldn't need that to write cout << "Hello World";
>>
>>56383736
Whadaya mean got tricked?
>>
>>56383964
>>cout

I really really hope you don't use
 using namespace std; 
>>
>>56384047
A minimally acceptable answer would be what I put. Of course there are more satisfactory answers like yours that would be more in depth.
>>
>>56384206
No, neither are acceptable.
>>
>>56383517
it sharpers again

or it googles it.
>>
>>56384269
Then this is why your teammates find you insufferable to work with.
>>
>>56384206
If you used a namespace within a hello world program, they would literally hire you just to fire you 2 seconds later for being a faggot
>>
>>56384305
It's an interview you dunce, and obviously a low level one if all they want is "Hello world" in C++.

You ever done an entry level or new grad position interview in your life?
>>
>>56384358
How the fuck are you justifying writing "using namespace std" instead of std::cout.

Anyone that can touch type does not need that retarded shit.
>>
>hello world
okay. what about some actual interview tests?
>>
Seems like something I'd do when hiring.

Not that I'm involved in hiring, but the first thing I'd do is stick a developer on linux machine with a text editor (not ide) of their choice, and a modern gcc. Of course our real development isn't like that at all, we use plenty of tools to make our lives easier, but if you can't hack it with the bare basic tools, you probably don't understand enough to work here.

The time in my life where I train retarded windows based web dev kiddies how to 'cd' and 'ls' is over, and it's never coming back (don't even get my started on people not understanding pipes and stdin/stdout/stderr redirection)
>>
>>56380165
>first job interview
>third time this has happened

Put some effort into this next time
>>
>>56385031
I try to maintain a perspective.
I can work just as easily with hacked tools as professional tools.
When it comes to computer science, as with hacking, my key tenant is maintaining a multi faceted outlook. Be prepared for whatever may cross your path, and educate yourself when you are not.
>>
>>56380672
Isn't C99 part of the C++14 spec?
>>
>>56385082
As is the only way to survive as a developer. If you don't take that perspective, you'll get left behind after a few years.

Heard about a slightly older guy that applied to work at my office, as a dev for your standard CRUD style HTML5 frontend talking to a REST API backend. Wasn't doing well in the interview, proceeded to argue with my boss that visual basic is entirely appropriate for making modern web interfaces (he couldn't complete the javascript interview question adequately, wanted to do it in VB). He didn't get the job.
>>
>>56382229
VSCode is actually pretty nice. It is free/open, fast (after initial load anyway), simple but with a lot of powerful features and cross platform. if you ignore it is from MS it is a solid editor.
>>
>>56380664

You actually don't need any.

rubyist@Overmind:~/scratch$ cat foo.c
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
printf("Hello World!\n");
return EXIT_SUCCESS;
}
rubyist@Overmind:~/scratch$ x86_64-w64-mingw32-gcc -std=c11 -O2 -o foo.exe foo.c
rubyist@Overmind:~/scratch$ wine foo.exe
Hello World!
>>
>>56383907
>codes
Pajeet detected
>>
Even though this is b8, yeah. Using VS is just terrible unless it's for gamedev (where it's pretty much required).

Just use a decent text editor and a compiler. You really don't need anything else.
>>
>>56385815
Nice programming there, fagget
>>
>>56380951
>what is continuous integration
>>
>>56386117
I don't think it's a question of need so much as want at this point.
It's full of bloat but fuck is it comfy to use, like one of those armchairs with the leg rest and the cup holder and the teamserver you don't need etc etc.
>>
>>56386117
>terrible
If your PC is worse than smartphones 4 years ago. Otherwise there is no reason to use a text editor.
>>
>>56380788
>>56383658
So that's why there are so few MS apps.
>>
>>56383733
>>56385068
Obviously the first of many interviews for the job.
>>
>>56380721
I love this
>>
>>56380165
You fucking retard.

1) Get a text editor.
2) Learn to use the command line.
3) Profit.
Thread posts: 78
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.