• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

NotBacon

Member
If I end up doing Android I'll probably just use the Visual Studio 2015 android tools. I know iOS apps are more likely to generate revenue through the app store, but is the same true of ad revenue? (I don't know, actually asking). I mean are iOS users more likely to click ads in their app than Android users?

How hard is porting apps between iOS and Android? Obviously Objective C is out of the question if I want to port something, but is it hard to write iOS apps in C++?

The VS 2015 tools look great for cross development, but just remember it's not nearly as mature and robust as Android Studio.

For ad revenue it seems to be closer to an even split.

I can't comment on porting as I stick to native development on both platforms. Yeah development is slower, but the apps always turn out better.
 
Right, because C++ is just what apps need and devs want. Should've bought Xamarin instead. C# is the way to go.

If you read this: http://blog.xamarin.com/microsoft-and-xamarin-expand-global-partnership/

or this: https://msdn.microsoft.com/en-us/library/dn879698(v=vs.140).aspx

You will see that MS has already partnered with Xamarin and if people want to do Xamarin style development in VS with C# they can. This is a different initiative with a different target audience.

MS also has this: https://msdn.microsoft.com/en-us/library/dn879821(v=vs.140).aspx if for whatever awful reason you prefer Cordova.

That's 3 different ways to do cross platform development in Visual Studio, because MS realizes that different people have different requirements.


If I end up doing Android I'll probably just use the Visual Studio 2015 android tools. I know iOS apps are more likely to generate revenue through the app store, but is the same true of ad revenue? (I don't know, actually asking). I mean are iOS users more likely to click ads in their app than Android users?

How hard is porting apps between iOS and Android? Obviously Objective C is out of the question if I want to port something, but is it hard to write iOS apps in C++?

Depends upon what kind of apps you want to do. The C++ stuff is really better for games/graphics heavy apps and less so for your more typical mobile apps. You could still probably write a lot of platform independent code in C++ and then do wrappers/abstraction layers to the Obj-C/Java stuff. It's not particularly complicated to make C++ and Obj-C talk to each other.
 

Mr.Mike

Member
So I can get Polish citizenship (or I guess I am a Polish citizen by virtue of being born to a Pole and just need to get a social insurance number and a passport). So I'm considering trying to get an internship in Europe for a few months eventually. ( Getting a visa probably wouldn't have been too hard, but whatever).

So where in the EU is "hip" as far as programming jobs go? I suppose the obvious answer for a Canadian would be to go to the UK but I'm open to living in other places for a few months too. I guess it would have to be somewhere where I could still get by with mostly English though. I do have some ability to speak a dialect of Ukrainian (the language my family speaks at home :p) that is mostly mutually intelligible with Polish and Slovakian (from what I understand), and I'm totally up for putting some effort into learning another language.

France might be cool cause then the French I learn would also be really useful in Canada, but France doesn't care terribly much for the whole "speaking English" thing as far as I'm aware. Maybe Belgium?
 

MiszMasz

Member
So I can get Polish citizenship (or I guess I am a Polish citizen by virtue of being born to a Pole and just need to get a social insurance number and a passport). So I'm considering trying to get an internship in Europe for a few months eventually. ( Getting a visa probably wouldn't have been too hard, but whatever).

So where in the EU is "hip" as far as programming jobs go? I suppose the obvious answer for a Canadian would be to go to the UK but I'm open to living in other places for a few months too. I guess it would have to be somewhere where I could still get by with mostly English though. I do have some ability to speak a dialect of Ukrainian (the language my family speaks at home :p) that is mostly mutually intelligible with Polish and Slovakian (from what I understand), and I'm totally up for putting some effort into learning another language.

France might be cool cause then the French I learn would also be really useful in Canada, but France doesn't care terribly much for the whole "speaking English" thing as far as I'm aware. Maybe Belgium?

Belgian proficiency in English is really good in the north (Flanders, where they speak Flemish) but i don't know about the south. I can't imagine it's too bad though and i've generally found the whole "French spit on our English" thing to be exaggerated. As long as you give French a go it's usually ok if you have to default now and then.
However, i've never really heard of Belgium as any sort of hub for tech, so i can't say how that'd go. You might be better off somewhere in north Germany (lots of people there speak English, at least enough so that you can get by day to day and it'd be easier to make your way to Poland from there.
 

Mr.Mike

Member
Belgian proficiency in English is really good in the north (Flanders, where they speak Flemish) but i don't know about the south. I can't imagine it's too bad though and i've generally found the whole "French spit on our English" thing to be exaggerated. As long as you give French a go it's usually ok if you have to default now and then.
However, i've never really heard of Belgium as any sort of hub for tech, so i can't say how that'd go. You might be better off somewhere in north Germany (lots of people there speak English, at least enough so that you can get by day to day and it'd be easier to make your way to Poland from there.

Well, my family is mostly in the south of Poland (and rural too, so I couldn't really stay with family).

The wiki page for Krakow makes it seem like there'd be plenty of programming jobs there, and I'd definitely be up for that, although I'm not sure how terribly much English they'd speak there. (Though to be fair, I did spend most of my time in Poland in rural towns and smaller cities). I suppose the only issue might be the pay disparity between Eastern Europe and Western Europe/Canada.

North Germany would be nice too. And I wouldn't be too far away from Her Majesty's familiar warmth.
 

Onemic

Member
How should I approach writing a cover letter for a job within the programming field when I have no real experience outside of the things that I've done at school? I'm looking at all these cover letter examples and they all go at length about their real world experience in programming....I'm unsure what I can even talk about when the only experience I have are doing assignments/exams/tests in school.
 
How should I approach writing a cover letter for a job within the programming field when I have no real experience outside of the things that I've done at school? I'm looking at all these cover letter examples and they all go at length about their real world experience in programming....I'm unsure what I can even talk about when the only experience I have are doing assignments/exams/tests in school.

Unless you're applying at a small company or startup, I wouldn't really write a cover letter. If the company has more than about 100 employees, I would skip it. Even at a small company, I would be be pretty hesitant to recommend writing one. I know I would never write one for any job, but I'm not sure if things would be different as you're a new college grad. Been a while and things have changed a bunch since I was there. But I know if I was interviewing you, I wouldn't even read it honestly.
 

Onemic

Member
Unless you're applying at a small company or startup, I wouldn't really write a cover letter. If the company has more than about 100 employees, I would skip it. Even at a small company, I would be be pretty hesitant to recommend writing one. I know I would never write one for any job, but I'm not sure if things would be different as you're a new college grad. Been a while and things have changed a bunch since I was there. But I know if I was interviewing you, I wouldn't even read it honestly.

So what would you recommend in terms of making a resume that would get selected if I have no experience? Most of the requirements that I see are way above what I even have(i.e. 5 years of java experience, 3 years of bootstrap, etc.)
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
So what would you recommend in terms of making a resume that would get selected if I have no experience? Most of the requirements that I see are way above what I even have(i.e. 5 years of java experience, 3 years of bootstrap, etc.)

Talk about any and every side project or learning adventure you've done outside of school assignments.
 

Onemic

Member
Talk about any and every side project or learning adventure you've done outside of school assignments.

...I dont really have any.

I mean the most I have is my own website that I've made that's hosted by my own Apache web server. The website is still under construction though. Other than that, I dont have anything. I was aiming for this summer to be the summer where I work on my own side projects and finish up my website.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
...I dont really have any.

I mean the most I have is my own website that I've made that's hosted by my own Apache web server. The website is still under construction though. Other than that, I dont have anything. I was aiming for this summer to be the summer where I work on my own side projects and finish up my website.

That's something though!
It shows that you are exploring topics outside of whatever it is that you "have to do" for you school assignments.

If I were you I'd throw that broken, half-made website up there. Then when they ask you about it talk about the tech you're using and the things you've learned while building it. Even if it isn't fully done.
"So I knew I needed a personal website to point people to. I started with a basic HTML page, and in order to serve the site itself I started my own Apache server for hosting. blah blah blah"

Also keep chugging away at it and improving. Go go go!
 

Onemic

Member
That's something though!
It shows that you are exploring topics outside of whatever it is that you "have to do" for you school assignments.

If I were you I'd throw that broken, half-made website up there. Then when they ask you about it talk about the tech you're using and the things you've learned while building it. Even if it isn't fully done.
"So I knew I needed a personal website to point people to. I started with a basic HTML page, and in order to serve the site itself I started my own Apache server for hosting. blah blah blah"

Also keep chugging away at it and improving. Go go go!

Thanks for the boost of confidence man, haha. I'll need it
 
...I dont really have any.

I mean the most I have is my own website that I've made that's hosted by my own Apache web server. The website is still under construction though. Other than that, I dont have anything. I was aiming for this summer to be the summer where I work on my own side projects and finish up my website.

Not really much to say other than just be prepared to not get called back very often. The first job is always the hardest. Not saying this to discourage you, just that a cover letter really won't help. Either you have things to show or you don't. If you do, they should be on your resume proper making them redundant on a cover letter. And if you don't, then your cover letter would just be mostly fluff and sound like BS.

So just try to emphasize your knowledge. If you ever participated in any programming competitions or got any awards at school, mention those. If you have any hobby projects like a game you're working on mention those. If not, it's never too late to start. Write a game or something in Unity. Make an app for iOS or Android. Try to submit some patches to an open source project (there's lots of big ones out there, like Chromium, Git, LLVM, GHC, Linux). Finish up your website. Etc.
 
Argh, compiler (lack of) support for C++11 regexes is infuriating. Was getting a regex_error out of clang, and chased down the problem to...

std::regex("[abc]+")

Yeah, real controversial there. Using up to date packages on Ubuntu 14.04 no less! I don't remember if I had to add a ppa for clang 3.5 to begin with...

All this and broken LTO too! What's not to love!
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
If you do decide to dabble in iOS check out the program Udacity recently put up. It deals with audio playback/recording, but it also goes into detail about a lot of the ways iOS and Swift handle things.

The instructor notes provide a ton of awesome link resources. I made a page for the hell of it to gather them all up into one place. You can check it out here.
 

Slavik81

Member
Argh, compiler (lack of) support for C++11 regexes is infuriating. Was getting a regex_error out of clang, and chased down the problem to...

std::regex("[abc]+")

Yeah, real controversial there. Using up to date packages on Ubuntu 14.04 no less! I don't remember if I had to add a ppa for clang 3.5 to begin with...

All this and broken LTO too! What's not to love!
If it makes you feel better, complete C++11 support for GCC was just finished in 5.1, which released 5 days ago.
 
If I end up doing Android I'll probably just use the Visual Studio 2015 android tools. I know iOS apps are more likely to generate revenue through the app store, but is the same true of ad revenue? (I don't know, actually asking). I mean are iOS users more likely to click ads in their app than Android users?

How hard is porting apps between iOS and Android? Obviously Objective C is out of the question if I want to port something, but is it hard to write iOS apps in C++?
Soooo I've been busy with too many things at once but to tackle this head on.

Most iOS and Android games are written in C++. You can do C++ in Android with the NDK, but one downside is that the binaries you generate are no longer architecture independent. Fortunately there aren't too many Android phones running around with Intel or MIPS processors.

In both cases, the UI frameworks are in Objective-C and Java, respectively, and most C++ to Obj-C or Java requires some FFI work. It's nicer in Obj-C because there you can just compile a subset of your code as Objective-C++ (ha. ha. ha.) or create C interfaces that call C++ code in the implementation of your functions, and have Objective-C call those C interfaces and never touch the C++ world.

Java, well, last time I checked you kind of have to deal with JNI bidness if you're planning on working with C++. Not the worst, but it's JNI, so it's a wrapper solution much like what I described with the C interface shuffle dance.

Swift is... early, so uh don't use that if you're planning to leverage a lot of C++. The only way to have Swift play nice with C++ right now is to wrap C++ code and calls with C interfaces or do much the same with Objective-C++ objects acting as interfaces. And Swift has its own peculiarities with working against advanced Objective-C and C preprocessor bits so don't dive too deeply into that just yet if you're coming from C++.

All told, it's easier to work with the native frameworks in the languages they're written against than to deal with FFI-ish stuff.

I see the Big Nerd Ranch Android book was recommended to start with. I think the friendliest book to learn iOS and its frameworks and Xcode happens to be Jeff LaMarche's Beginning iOS Development. Unfortunately the iOS 8 version has gone Swift only, but the iOS 7 version still remains Obj-C friendly. For the latest and greatest iOS I'd also recommend BNR's iOS book and not just because Aaron used to be NeXT's documentation dude and the author of the sole book on Cocoa on Mac OS X for a number of years. It's a pretty solid book.
 
Argh, compiler (lack of) support for C++11 regexes is infuriating. Was getting a regex_error out of clang, and chased down the problem to...

std::regex("[abc]+")

Yeah, real controversial there. Using up to date packages on Ubuntu 14.04 no less! I don't remember if I had to add a ppa for clang 3.5 to begin with...

All this and broken LTO too! What's not to love!

Is it possible for you to compile your own version of clang? I just tested this with clang 3.7 and it works fine:

Code:
#include <iostream>
#include <regex>
#include <string>

int main(int argc, char **argv) {
  std::regex rx("[abc]+");
  std::string test1 = "abcabc";
  std::string test2 = "defdef";
  if (std::regex_search(test1, rx))
    std::cout << "Match found against '" << test1 << "'" << std::endl;
  if (std::regex_search(test2, rx))
    std::cout << "Match found against '" << test1 << "'" << std::endl;
  return 0;
}

You seem to be creating a temporary regex object though instead of declaring a variable of type regex, so I tried various other things like passing it into a function which takes a const reference, or passing it into a function which takes a regex by value, and it all works.
 
Just finished up that Java game a few hours ago. I've heard nothing but horror stories of Java, but I gotta say, it was actually (relatively) painless. I made an entire game without even touching the debugger and that's huge.

Also gotta give IntelliJ props for having sane defaults. Except for make and run. Ctrl + F9 to Shift + F10 feels like they're trying to trip me up.
 
Just finished up that Java game a few hours ago. I've heard nothing but horror stories of Java, but I gotta say, it was actually (relatively) painless. I made an entire game without even touching the debugger and that's huge.

Also gotta give IntelliJ props for having sane defaults. Except for make and run. Ctrl + F9 to Shift + F10 feels like they're trying to trip me up.

I think some of that is because people hated Java 10 years ago and haven't bothered to see if it got any better, which from friends I have that work with it say it has.
 

wolfmat

Confirmed Asshole
I think some of that is because people hated Java 10 years ago and haven't bothered to see if it got any better, which from friends I have that work with it say it has.

It's really gotten better, there's still heaps of boilerplate work to deal with though. My biggest gripe with Java. I like it a lot anyway. It's a very expressive, fluid, concept-oriented language.
 
It's really gotten better, there's still heaps of boilerplate work to deal with though. My biggest gripe with Java. I like it a lot anyway. It's a very expressive, fluid, concept-oriented language.
In my brief experience it weirdly feels like they nailed the object oriented approach because of the amount of libraries they have.
I know there's a java package out there that gives me 90% of what I want, so it's more natural to use inheritance than in other languages I've used.
 
Is it possible for you to compile your own version of clang? I just tested this with clang 3.7 and it works fine:

Code:
#include <iostream>
#include <regex>
#include <string>

int main(int argc, char **argv) {
  std::regex rx("[abc]+");
  std::string test1 = "abcabc";
  std::string test2 = "defdef";
  if (std::regex_search(test1, rx))
    std::cout << "Match found against '" << test1 << "'" << std::endl;
  if (std::regex_search(test2, rx))
    std::cout << "Match found against '" << test1 << "'" << std::endl;
  return 0;
}

You seem to be creating a temporary regex object though instead of declaring a variable of type regex, so I tried various other things like passing it into a function which takes a const reference, or passing it into a function which takes a regex by value, and it all works.
That was just an example, I'm passing it into regex_match directly, e.g:

Code:
return std::regex_match(result, std::regex(pattern));

Where result is a string from mysterious places on the other side of the network, and pattern is something hopefully more complicated than "[abc]+", but not in clang...

Not sure what I'll do next, I'm content to give clang the middle finger and stick with g++ for a while.
 

Saprol

Member
Can anyone tell me what partition means when using quicksort?

Means dividing/separating into groups. Also it sounds fancier than those other words. So the partition part of quicksort is when you're reordering everything less than or equal/greater than the pivot.
 

hateradio

The Most Dangerous Yes Man
What do you all think of product management in the scope of software?

I don't really know much about it, but I have an internship in that branch of the company. Currently, I don't develop anything other than some small automation tools, but I get to "learn" about selling the product through the use cases we create.

However, the position will change in the next few weeks and is up in the air. I don't think I'll even be developing anything beyond that point.


And because of that change, I'm now in a position where I can possibly decide to take a QA position or stay with PM.

I don't really like both options, but I can see the benefit of maybe going with PM for now and developing those skills, as they will be useful a few years down the road. I don't always plan to be a developer.

Yet, I do want to develop now and would miss not doing it if I decide not to take the QA position that could lead to a developer position later on. (Typically, they have interns do QA before they develop applications.)
 

Skittles

Member
How should I approach writing a cover letter for a job within the programming field when I have no real experience outside of the things that I've done at school? I'm looking at all these cover letter examples and they all go at length about their real world experience in programming....I'm unsure what I can even talk about when the only experience I have are doing assignments/exams/tests in school.
You could try listing what classes you've taken in college. I would also try for an internship before trying to apply for a full-time job
 

Slavik81

Member
Can anyone tell me what partition means when using quicksort?

Means dividing/separating into groups. Also it sounds fancier than those other words. So the partition part of quicksort is when you're reordering everything less than or equal/greater than the pivot.
Analogy time! It's like splitting your laundry into lights and darks. Everything bright goes in one pile, and everything dark goes in another.

What's bright and what's dark? Well, you pick some piece of clothing
which we'll call the 'pivot'
and decide that everything brighter than it will go in the brights pile, and everything darker than it will go in the darks pile.

The piles don't preserve any sort of order. Each is still just a mess of laundry, but you know that anything you pull out of the brights pile will be brighter than anything you pull out of the darks pile.
 
Ok, question.


I want to start working on projects on GitHub. I am still just a student and don't know how much of a positive contribution I can make to others' projects.

However, I want to start building a portfolio.

What do you guys recommend?

I mostly program in Java but I just picked up a book on C++ that I am going to start going through.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
Analogy time! It's like splitting your laundry into lights and darks. Everything bright goes in one pile, and everything dark goes in another.

What's bright and what's dark? Well, you pick some piece of clothing
which we'll call the 'pivot'
and decide that everything brighter than it will go in the brights pile, and everything darker than it will go in the darks pile.

The piles don't preserve any sort of order. Each is still just a mess of laundry, but you know that anything you pull out of the brights pile will be brighter than anything you pull out of the darks pile.

This is a damn good analogy. I'm going to use it in the future, and if asked where I got it I'll say a Slav taught me it. :)
 

Aureon

Please do not let me serve on a jury. I am actually a crazy person.
I think some of that is because people hated Java 10 years ago and haven't bothered to see if it got any better, which from friends I have that work with it say it has.

Hah, you have it wrong.
It's not that we don't know it's gotten better.
It's that our work, generally, runs on java 5 or java 6.
Yes, yes, i know they're not actually supported anymore. But if you think that stops CTOs wary of any "useless upgrading", you're fooling yourself.

: (
 

MiszMasz

Member
I think some of that is because people hated Java 10 years ago and haven't bothered to see if it got any better, which from friends I have that work with it say it has.

I quite like it these days. I'm proficient enough with it now to do pretty much anything i want without much hassle and the latest versions perform quite well too. To the extent that i'll often choose to use it when i could just as well bash something out with Python or C++. The option to tinker with other JVM languages (including Javascript now) is also nice.

Still, when i'm running the new JDKs and half the external stuff i need for my coursework or projects was built with Java 5 or 6 (bonus points for the odd OpenJDK quirk), the incompatibilities, odd behaviour and bugginess are a constant factor i have to deal with. "Write once, run anywhere", has always been more "Write once, it'll likely at least start", in my experience and is the biggest annoyance for me day to day.
 
http://techcrunch.com/2015/04/29/mi...-free-code-editor-for-os-x-linux-and-windows/

7355CWX.jpg

This sounds awesome and I'm a total Sublime Text snob. I'm starting to really like the post-Balmer MS.
 
Means dividing/separating into groups. Also it sounds fancier than those other words. So the partition part of quicksort is when you're reordering everything less than or equal/greater than the pivot.

Analogy time! It's like splitting your laundry into lights and darks. Everything bright goes in one pile, and everything dark goes in another.

What's bright and what's dark? Well, you pick some piece of clothing
which we'll call the 'pivot'
and decide that everything brighter than it will go in the brights pile, and everything darker than it will go in the darks pile.

The piles don't preserve any sort of order. Each is still just a mess of laundry, but you know that anything you pull out of the brights pile will be brighter than anything you pull out of the darks pile.

Thanks. Also, nice analogy which makes a lot of sense.
 

V_Arnold

Member
Visual Studio Code looks amazing, but the "[" key is not recognized by it on my settings, and I have no idea what to change.

Every other character is displayed properly, except that one...
 
Hmm let's test VS Code out.

edit: First 10 minutes:

- It's rather fast and looks nice (though some icons are way too small and some of it sort of feels of)
- There's some basic features Intellisense, Jump To Definition, splitviews and so on
- Very basic Git integration: you can commit, push and pull but you can't see the commits or pretty much anything else
- Debugger that I didn't try (Node and Mono only)
 
Visual Studio Code doesn't support Intellisense for C++ btw, which makes it a deal killer for me. I'm still very excited for the future of Microsoft though, and being a Windows developer myself I'm loving all this open source stuff they're doing and embracing other platforms. I feel like it's only a matter of time before we see C++ support in VS Code. Here's to hoping anyway.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
Wait wait wait.


We can build .NET applications on OSX now without a virtual machine?


Guess I'll look into it, too. Why the fuck not.

Edit: OS X 10.8 and newer. Hrmpf

What are you doing way back there in pre-2012 land?
 

hitsugi

Member
The Visual Studio Code stuff is pretty godlike, and this is just the beginning. I'm sure C++ support will be on the horizon for it.
 

Granadier

Is currently on Stage 1: Denial regarding the service game future
Might (eventually) try VSC for Javascript stuff.

Can't imagine anything usurping QtCreator for C++ though!

From my short experience, it seems to be best at being just a supercharged text editor. It'll be interesting if plugin support comes in for things like Emmet and various other packages that most ST users are accustomed to having.

I'd definitely feel comfortable doing web dev work with it already, and I'm switching to it for my Unity projects. (get wrecked MonoDevelop)
 

AAK

Member
Sup guys, Need some advice. I have an interview tomorrow for a Student Research Position at my College. The Professor specializes in PhP and Javascript. What sort of interview questions would you guys expect to be asked my way? I have a basic understanding on PhP and Javascript on how Javascript is Client Side scripting while PHP is Server side. Should I be prepared to be asked questions about specific commands like how stuff like MySQLi or Password Hash works or is it just basic concepts?

Thanks in advance!
 
How do I access my array containing values from main? I'm trying to pass in values to quicksort function. But I'm having problems. I made a getArray member function that returns the array with a pointer. And when I try to pass it in to quicksort function from main, I get errors telling me "invalid conversion from int to int*". So I'm guessing the error that is causing me some trouble was the fact that I was attempting to pass array of pointers to an integer to an integer data type of my array.
 
Top Bottom