• 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

Why don't you set up rsync?
Version control?

To be more clear, I'm syncing some binary data, but most of what I care about is source code, design documents, and writing materials. e.g. stuff I want under version control. I used to have a simpler syncing solution set up, but I kicked it out in favor of svn a couple years ago.
 

hateradio

The Most Dangerous Yes Man
Not really. It basically syncs files/directories across different machines. Think of dropbox.

Unless you actually need VCS, it would be a good option to keep things together and up to date.

Here's a quote from a guide.

Rsync is a wonderful little utility that's amazingly easy to set up on your machines. Rather than have a scripted FTP session, or some other form of file transfer script -- rsync copies only the diffs of files that have actually changed, compressed and through ssh if you want to for security.​

http://everythinglinux.org/rsync/

edit: I posted this before I saw that it was only some binary data. I'm not sure how well it would work for source files.

As for VCS, I've only ever used Git, so I have no knowledge of SVN.
 
Yeah, rsync doesn't really suit what I want (revision tracking).

svn is like git. But it's simpler, and things like branching/merging only kinda sorta (but not really) work. Basically, it's almost perfect for a single-user setup!
 
Yeah, rsync doesn't really suit what I want (revision tracking).

svn is like git. But it's simpler, and things like branching/merging only kinda sorta (but not really) work. Basically, it's almost perfect for a single-user setup!

I use git for single user setups, as I like to code on various devices, and git's distributed-ness is great. Branching and merging are really clean, too. (most of the time)
 
Can anyone help me with some Objective C, iOS development?

I want to play a song in my app IF and ONLY IF no other application is playing music. So, if Instacast is playing, or if Music.app is playing, then I don't want my app to interrupt and start playing. Only if nothing is playing do I want my song to play. I'm using AVAudioPlayer to play the song.

So, is there a way to check if another application is playing, and if so, to NOT interrupt it?
 
Why restrict git to single user setups? It scales well.

Only if you use it right and have good tools. I was a git hater until 4 months ago, when I realised that all of my hate came from bad tools and useless sysadmin. We're using SourceTree to connect to GitHub now, and it's great (we have 6 people as of today).
 

Hellix

Member
When learning a language, how do you practice it? In a class, it is easy since you have an instructor telling you to make something or create a specific project. On your own, I am having trouble thinking of what to make. Perhaps there is a website asking you to solve specific problems or to create something in a particular language?
 

GK86

Homeland Security Fail
I don't know a better place to put this question, is it easy to find work with an Associates degree? Or is it recommended you graduate with a BA?
 

W1SSY

Member
Along with GK86's question any recommendation for looking for jobs just after graduation? I have a BA in Computer Science and have been looking but it seems like most positions want experience that I don't have.

Would it be beneficial for me to try and get some certifications for things and if so what would you recommend?
 

survivor

Banned
When learning a language, how do you practice it? In a class, it is easy since you have an instructor telling you to make something or create a specific project. On your own, I am having trouble thinking of what to make. Perhaps there is a website asking you to solve specific problems or to create something in a particular language?

Depends on what sort of language. If it's like Java/C++ then you can look around mobile game development. Maybe get some simple game up and running that doesn't rely too much on graphics? Or if it's like PHP/Ruby you can mess around with the dozen of web frameworks out there. Obviously it all depends on how comfortable you are with the language and what sort of things you like to make, but that's generally how I approached learning. Also the "create X from scratch" tutorials are pretty good too.
 

Leezard

Member
When learning a language, how do you practice it? In a class, it is easy since you have an instructor telling you to make something or create a specific project. On your own, I am having trouble thinking of what to make. Perhaps there is a website asking you to solve specific problems or to create something in a particular language?

Or you can do some stuff in Project Euler. That's what I usually do.
 

Omikron

Member
When learning a language, how do you practice it? In a class, it is easy since you have an instructor telling you to make something or create a specific project. On your own, I am having trouble thinking of what to make. Perhaps there is a website asking you to solve specific problems or to create something in a particular language?

Usually I have a specific thing I want or need and instead of just grabbing the freely available application etc I will just build a version myself. Doesn't ever have to be perfect, just gives you a good focal point to learn.
 

usea

Member
I assume you guys are talking about programming jobs.
Along with GK86's question any recommendation for looking for jobs just after graduation? I have a BA in Computer Science and have been looking but it seems like most positions want experience that I don't have.

Would it be beneficial for me to try and get some certifications for things and if so what would you recommend?
I wouldn't recommend certifications. I don't know anybody with one, and I don't know anybody who would hire a person because they had one. Most people would ignore them.

I recommend applying to jobs even if they require more experience. Usually HR writes the job listings, but the hiring manager or team lead or whatever just wants somebody competent.

I don't know a better place to put this question, is it easy to find work with an Associates degree? Or is it recommended you graduate with a BA?
A BS is strongly recommended. However, it's not impossible by any means to get a job without one. It will be harder to land interviews, and certain companies won't hire you, but after you land your first job it will become a much smaller factor.

Unless there's a good reason why you can't, I would definitely recommend getting a bachelor's.
 

GK86

Homeland Security Fail
A BS is strongly recommended. However, it's not impossible by any means to get a job without one. It will be harder to land interviews, and certain companies won't hire you, but after you land your first job it will become a much smaller factor.

Unless there's a good reason why you can't, I would definitely recommend getting a bachelor's.

Thank you for your input. My reasoning is wanting to get out into the workforce as quickly as possible. Which isn't a very good reason. I was leaning towards getting my BA, but will definitely look into it once I'm done with my associates.
 

Slavik81

Member
Taking a 12-16 month internship after the 3rd year of a BSc. makes it a lot easier to find work after graduation. And it can help to offset the costs of schooling too.

In retrospect, I should have taken one. It worked out fine in the end for me anyways, but it would have been the smarter, safer move.
 
Taking a 12-16 month internship after the 3rd year of a BSc. makes it a lot easier to find work after graduation. And it can help to offset the costs of schooling too.

In retrospect, I should have taken one. It worked out fine in the end for me anyways, but it would have been the smarter, safer move.

I'm not from the US but 16 month internships? you mean weeks?
 

Slavik81

Member
I'm not from the US but 16 month internships? you mean weeks?
I mean 16 months. After 16 weeks, most interns would not have produced enough to offset the cost of training them. And software interns tend to be paid quite well. The employer wants a year or more in order to recoup their investment.

Companies would be hiring students for May of their 3rd year and August of their 4th. That turns a 4 year degree into a 5 year process.

The experience, the money and the networking all make an internship a really, really good idea. At the company I work for, a lot of our employees were once interns. Perhaps even most of them.
 
I guess the term internship is loosely used then. After a couple of month you are no longer an intern, you are a full fledged worker, maybe a green one but a worker nonetheless.
 
I mean 16 months. After 16 weeks, most interns would not have produced enough to offset the cost of training them. And software interns tend to be paid quite well. The employer wants a year or more in order to recoup their investment.

Companies would be hiring students for May of their 3rd year and August of their 4th. That turns a 4 year degree into a 5 year process.

The experience, the money and the networking all make an internship a really, really good idea. At the company I work for, a lot of our employees were once interns. Perhaps even most of them.

I need to find me one of these. Gotta compete with Drexel U students who have to do co-ops though.. Slightly irritating.
 

usea

Member
I guess the term internship is loosely used then. After a couple of month you are no longer an intern, you are a full fledged worker, maybe a green one but a worker nonetheless.
They're called internships, but yeah they're entry-level jobs for students. I mean, you can make well above 60k depending where you are.
 

Tomat

Wanna hear a good joke? Waste your time helping me! LOL!
Taking a 12-16 month internship after the 3rd year of a BSc. makes it a lot easier to find work after graduation. And it can help to offset the costs of schooling too.

In retrospect, I should have taken one. It worked out fine in the end for me anyways, but it would have been the smarter, safer move.

You're taking a 12-16 month internship or you're recommend taking one? Also have you graduated yet or is it your third year after graduating? Sorry, a little confused because of the second half of your post.
 

Slavik81

Member
You're taking a 12-16 month internship or you're recommend taking one?
I recommend taking one. Typically you would take it after your third year.
Also have you graduated yet or is it your third year after graduating? Sorry, a little confused because of the second half of your post.
I graduated nearly 4 years ago. I did not take an internship myself, but I can see how useful it is. We hire a lot of former interns.
 

Tomat

Wanna hear a good joke? Waste your time helping me! LOL!
Gotcha, thanks for the clarification. I haven't known anyone personally who has taken an internship anywhere post-graduation so I was curious. Is that a thing? Can you do that?
 

Karram

Member
So I'm in the process of learning my first language, C# using the Head First book, but I got stuck in their first lab activity, and it made me think that I might want to switch to JavaScript instead.
I'm mainly learning to program to script in Unity, so I'm wondering should I try JavaScript instead as I'm having hard time with C#, should I find another book, or is it normal to suck when starting out ? Getting really frustrated here ;<
 

Haly

One day I realized that sadness is just another word for not enough coffee.
UnityScript (Unity's particular brand of Javascript) is a little simpler than C# but not all that much. If your problem is a syntactical one, switching might help, but if it's more of a conceptual problem it won't make a bit of difference if you're using UnityScript or C#. They do the same things with roughly the same syntax the same ways.

You can always just ask this thread for help and there will be people willing to answer your questions.
 

Chris R

Member
What exactly caused you to get stuck with C#? It might be something that is real simple that the book didn't explain properly. C# is already a really easy language to learn compared to some of the older and more robust languages.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
So what are you stuck with exactly? Are you having trouble knowing where to start, or is there a particular sub-problem that's confusing you? Is it the images?

I have to say I'm not fond of the lab description, it leaves a lot of stuff to interpretation including what the "racetrack simulator" is actually supposed to do. Maybe that's the point, I dunno.
 

NotBacon

Member
Android development sounded exciting at first (pretty good with java, have an android phone, etc.), but after doing the first few lessons I just can't help but feel lost :/ Only like half of it(and there seems to be a lot of 'it') is making sense to me. Any good resources out there besides googles developer site?
 

Magni

Member
Karram, from my experience C# should be much nicer to code in than JavaScript. Hang in there!

Taking a 12-16 month internship after the 3rd year of a BSc. makes it a lot easier to find work after graduation. And it can help to offset the costs of schooling too.

In retrospect, I should have taken one. It worked out fine in the end for me anyways, but it would have been the smarter, safer move.

I wish I could have done that, but then again my program has two 6-month co-op internships, and since there's summer break before, you can make it an 8-month internship (which I did :D).

I can't imagine graduating without having worked at least three months full-time in your field.
 

usea

Member
My problem is not at all syntactical, but rather conceptual. Here is the link to the program I'm supposed to build http://www.headfirstlabs.com/books/hfcsharp/lab01.php
I already went through the finished code after getting really frustrated.
Yeah, I've definitely been there. Getting frustrated when programming is not uncommon at all, especially among beginners. Can you describe in some detail what was frustrating about it? We may be able to help.

I wish I could have done that, but then again my program has two 6-month co-op internships, and since there's summer break before, you can make it an 8-month internship (which I did :D).

I can't imagine graduating without having worked at least three months full-time in your field.
Given the number of people who do internships vs the number who don't, I'd wager the vast majority of people do not have any full-time experience when they graduate. Note: numbers made up from my imagination.
 

survivor

Banned
Have to pick my courses for final year in CS today and it turns out my school stopped offering the Compilers and Parallel Computing classes. I have no idea why, maybe low interest? But they seem like really fun and fundamental concepts. They certainly beat taking another course on analysis of algorithms.
 
Hi!
I just recently started programming in C++ and my first real project is porting a thing I did in C# that draws L-Systems (basically fractals used for procedural generation of plants for example). I'm using SFML for drawing the things I need. It works fine, but my concern is that it uses up a lot more memory than I feel it should. The C# version of the program uses about 10 MB of RAM when I first start it up, and the C++ version uses 33 MB. (the C# version uses Windows Forms and the C++ version is just a raw window) I know this isn't a very smart comparison, but I still feel it's off. When I start increasing the number of iterations for some of the L-Systems, it very quickly rises to about 200 MB or more. It's not really a performance concern for me right now but I'd be interested in why there is so much memory being used.

What I'm looking for is methods on how to find where all that memory is going. I'm using VS2012 and the built-in profiler only has support for .NET-managed memory. It's not leaking memory, so valgrind is not really of much use to me right now.

I've put the code on GitHub if someone feels like taking a look.
 

Magni

Member
Given the number of people who do internships vs the number who don't, I'd wager the vast majority of people do not have any full-time experience when they graduate. Note: numbers made up from my imagination.

Most of my American friends (in CS) have at least done two-month summer internships, at pretty big companies like Microsoft/Google/Amazon/Yelp, but here in France (where I'm doing my studies), every engineering school requires at least one six-month internship, with some (like mine) requiring two.
 

usea

Member
Most of my American friends (in CS) have at least done two-month summer internships, at pretty big companies like Microsoft/Google/Amazon/Yelp, but here in France (where I'm doing my studies), every engineering school requires at least one six-month internship, with some (like mine) requiring two.
Think about how many intern positions those companies have, compared with how many people graduate CS each year. It's several orders of magnitude difference.
 

Magni

Member
Think about how many intern positions those companies have, compared with how many people graduate CS each year. It's several orders of magnitude difference.

Well clearly, but there's more than just those companies. I did my 8 month internship at a startup where I was effectively the second engineer on the team. Did wonders in terms of work experience, since I got to work on pretty much every facet of the codebase.
 

Aleph

Member
Hi!
I just recently started programming in C++ and my first real project is porting a thing I did in C# that draws L-Systems (basically fractals used for procedural generation of plants for example). I'm using SFML for drawing the things I need. It works fine, but my concern is that it uses up a lot more memory than I feel it should. The C# version of the program uses about 10 MB of RAM when I first start it up, and the C++ version uses 33 MB. (the C# version uses Windows Forms and the C++ version is just a raw window) I know this isn't a very smart comparison, but I still feel it's off. When I start increasing the number of iterations for some of the L-Systems, it very quickly rises to about 200 MB or more. It's not really a performance concern for me right now but I'd be interested in why there is so much memory being used.

What I'm looking for is methods on how to find where all that memory is going. I'm using VS2012 and the built-in profiler only has support for .NET-managed memory. It's not leaking memory, so valgrind is not really of much use to me right now.

I've put the code on GitHub if someone feels like taking a look.

This sounds really interesting, as it combines two topics I'm currently interested in (C++ and L-Systems). I'll definitely try it on Linux, to compile I just have to use the makefile, right?
 
Hi!
I just recently started programming in C++ and my first real project is porting a thing I did in C# that draws L-Systems (basically fractals used for procedural generation of plants for example). I'm using SFML for drawing the things I need. It works fine, but my concern is that it uses up a lot more memory than I feel it should. The C# version of the program uses about 10 MB of RAM when I first start it up, and the C++ version uses 33 MB. (the C# version uses Windows Forms and the C++ version is just a raw window) I know this isn't a very smart comparison, but I still feel it's off. When I start increasing the number of iterations for some of the L-Systems, it very quickly rises to about 200 MB or more. It's not really a performance concern for me right now but I'd be interested in why there is so much memory being used.

What I'm looking for is methods on how to find where all that memory is going. I'm using VS2012 and the built-in profiler only has support for .NET-managed memory. It's not leaking memory, so valgrind is not really of much use to me right now.

I've put the code on GitHub if someone feels like taking a look.
valgrind is more powerful than you think it is!

Code:
valgrind --tool=massif ./thingyouwanttorun
massif is a heap profiler. There is a program called massif-visualizer that shows you its output in pretty graph format:
massif-visualizer.png


There is also
Code:
valgrind --tool=callgrind ./thingyouwanttorun
...callgrind for more traditional CPU profiling. With kcachegrind it's basically the greatest invention since beer.
 

GK86

Homeland Security Fail
Another question for you guys. My college (2 year) is switching their general education requirements come fall. They have given options to current students to opt in.

Current:

Math- Calculus 1/2/3, Linear algebra, Intro to discrete math

Programming- Intro to CS, OOP, Basic Assembly Language, Data structures, comp. Architecture

New system:

Math- Calculus 1/2, Linear algebra

Programming- Intro to CS, advanced c/c++, OOP, discrete structures, comp organization and assembly language, data structures.


Another big change, they would drop the internship I would be required to do under the current system. But I would probably sign up for that under the new one. And once you opt in, you can't switch back. The new system is better, right?
 

W1SSY

Member
I assume you guys are talking about programming jobs.

I wouldn't recommend certifications. I don't know anybody with one, and I don't know anybody who would hire a person because they had one. Most people would ignore them.

I recommend applying to jobs even if they require more experience. Usually HR writes the job listings, but the hiring manager or team lead or whatever just wants somebody competent.

Thanks for the input.

On the subject of internships I really wish I would have done one. I did a summer internship but didn't get much from it because it was for a couple months. A lot of companies in the area have internships that usually transition to being employed and something like that would have been amazing to do.
 

Tamanon

Banned
Man, I'm in an Intro to Computer Programming this semester, learning the basic basics using Python.

The only thing that throws me sometimes is the switch between Python 2 in class and Python 3 on some other stuff I'm doing personally. That dang raw_input vs input annoys me, although I vastly prefer Python 3.

Now, if only my teacher didn't spend the first two classes explaining to the class how to extract ZIP files and attach files to our online system for submission. Seems like wasted class time, only learning what I put into it.

Thus far, the basics are helping some, but Code Academy's Python intro is pretty nice also.
 

Magni

Member
Another question for you guys. My college (2 year) is switching their general education requirements come fall. They have given options to current students to opt in.

Current:

Math- Calculus 1/2/3, Linear algebra, Intro to discrete math

Programming- Intro to CS, OOP, Basic Assembly Language, Data structures, comp. Architecture

New system:

Math- Calculus 1/2, Linear algebra

Programming- Intro to CS, advanced c/c++, OOP, discrete structures, comp organization and assembly language, data structures.


Another big change, they would drop the internship I would be required to do under the current system. But I would probably sign up for that under the new one. And once you opt in, you can't switch back. The new system is better, right?

Honestly, an internship is more valuable than any one class IMO. The difference between the two systems is basically dropping Calc3, Intro to Discrete Math, and the internship for Advanced C/C++? I don't think it's worth it, is there no way to take Advanced C/C++ with the old system?
 

usea

Member
I say take everything. Do the internship, take Linear Algebra, take the C++ class. I regret graduating in 4 years and missing out on a few classes that I should have taken just for the hell of it.
 

GK86

Homeland Security Fail
Honestly, an internship is more valuable than any one class IMO. The difference between the two systems is basically dropping Calc3, Intro to Discrete Math, and the internship for Advanced C/C++? I don't think it's worth it, is there no way to take Advanced C/C++ with the old system?

The new system would add discrete structures and comp organization and assembly language as well. I could take the internship(or the advanced c/c++) regards of what system I'm in. I just want to make sure I'm taking the best classes to help me along the way.

Keep in mind, that this is a 2 year school.

I say take everything. Do the internship, take Linear Algebra, take the C++ class. I regret graduating in 4 years and missing out on a few classes that I should have taken just for the hell of it.

Any class in particular you feel you shouldn't have missed out on?

Thanks fellas, I appreciate your thoughts.
 

usea

Member
Any class in particular you feel you shouldn't have missed out on?
I never took finite automata, numerical methods / analysis, compilers, survey of programming languages, linear algebra.
 

Big Chungus

Member
Trying to overwrite a .txt file in Java.

When the program first starts the .txt file looks like this:

Code:
Bob
0
1
Red
5
-

But when I overwrite the .txt file with updated data, it appears like this:

Code:
Bob
 

Red


-

This is the code I use:

Code:
File file = new File("mnt/sdcard/player.txt");
		FileWriter fw;
	
		try 
		{

			
			fw = new FileWriter(file);
			
			fw.write(character.name);
			
			fw.write("\r\n");

			fw.write(character.xp);
			
			fw.write("\r\n");

			fw.write(character.level);
			
			fw.write("\r\n");
			
			fw.write(character.colour);
			
			fw.write("\r\n");
			
			fw.write(character.levelLimit);
			
			fw.write("\r\n");
			
			fw.write(character.status);
			
			fw.flush();
			
		} 
		catch (FileNotFoundException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

I think the problem has something to do witht he object variables but i'm not sure how to fix it.
 

Ixian

Member
I am not a Java dev, but it seems like all of the values not being written are integer values. Looking at the parameters for the write function, it looks like it really wants a string -- have you tried converting those values to strings?
 
Top Bottom