• 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

As someone who has been interested in programming before and has dabbled in some languages but never stuck to one, what programming language would you recommend? I'm interested in building applications focused around networking and possibly a game or two.

I'm thinking C or C++, but I'd like to hear people's opinion first.
 

Jokab

Member
As someone who has been interested in programming before and has dabbled in some languages but never stuck to one, what programming language would you recommend? I'm interested in building applications focused around networking and possibly a game or two.

I'm thinking C or C++, but I'd like to hear people's opinion first.

I think Java is the best choice for a beginner looking to actually build something of at least moderate size. It's easier than C or C++ while still being pretty much as powerful.
 
I think Java is the best choice for a beginner looking to actually build something of at least moderate size. It's easier than C or C++ while still being pretty much as powerful.

My only issue with Java is that I imagine it would be harder to swap to another language down the line, or would I be wrong?
 
My only issue with Java is that I imagine it would be harder to swap to another language down the line, or would I be wrong?

No, not really. You could switch to pretty much any OOP language in no time. It's just that outside backend service type of deal-ious Java is kinda shitty and could be a total turnoff to anyone.
 
No, not really. You could switch to pretty much any OOP language in no time. It's just that outside backend service type of deal-ious Java is kinda shitty and could be a total turnoff to anyone.

Yeah, I've heard enough bad stuff about Java over the years, but I imagine that it could be a good starter language.

Is there any good starter resources for Java?
 
No, not really. You could switch to pretty much any OOP language in no time. It's just that outside backend service type of deal-ious Java is kinda shitty and could be a total turnoff to anyone.

Java is a little verbose and in some ways not the most modern or best-designed language, but it's not a huge language (like C++ or C#) and the syntax is very simiar to the C family of languages. A big advantage is also that Java runs on almost anything, especially compared to C#. You can execute the same Java application on Linux, Mac OS X and Windows without any changes, provided it doesn't rely on any OS-specific quirks (which simple applications don't usually do)

Another language often recommended to beginners is Python because the syntax is super clean, it's a lot less verbose and has less clutter. For example, the Hello World application in Java looks like this:
Code:
public class HelloWorld {
    public static void main(String[] args) {
        Sytstem.out.println("Hello World!");
    }
}
A lot of brackets and keywords and strange stuff a beginner doesn't really need to know right away.

In Python it's as simple as that:
Code:
print("Hello World!")

Of course, there are some drawbacks to Python, object oriented programming doesn't come as naturally as in Java, it's a lot slower and some other things.
 
I don't know whether it's a good idea to directly work with DirectX, since it's not exactly an easy starting point for a beginner from my experience. XNA with C# is a viable alternative, although Microsoft stopped updating it. Other than that I think using an established 3D engine, such as OGRE or Panda3D (no need to reinvent the wheel), is easier to work with but maybe the 3D specialists here have some better suggestions. I had some good experiences with jPCT, but thats Java (Android version also exists).

Edit:
Even though XNA is no longer supported, it doesn't mean that it's not usable. It's great for quickly getting visible result, and the initial stuff you have to learn applies to most other engines and APIs anyway. I actually expect that MS presents a successor to XNA along the announcement or release of Durango.

Making a game is difficult enough as is. Use a framework like Unity or GameMaker and visit this thread instead: http://www.neogaf.com/forum/showthread.php?t=491431
 
Java is a little verbose and in some ways not the most modern or best-designed language, but it's not a huge language (like C++ or C#) and the syntax is very simiar to the C family of languages. A big advantage is also that Java runs on almost anything, especially compared to C#. You can execute the same Java application on Linux, Mac OS X and Windows without any changes, provided it doesn't rely on any OS-specific quirks (which simple applications don't usually do)

Java is a huge language, probably just as big as C# or even C++.
 
Bleh my brain is completely overwhelmed by all the information for Operating Systems...

Seeing what goes on in the background makes me have utmost respect for those who not only wrote the beginnings (Unix) but for those who continually update the backend of modern OSes as well.
 
I don't know whether it's a good idea to directly work with DirectX, since it's not exactly an easy starting point for a beginner from my experience.
You're right, it's a terrible idea to work directly with DirectX unless you're making something very simple.

XNA with C# is a viable alternative, although Microsoft stopped updating it. Other than that I think using an established 3D engine, such as OGRE or Panda3D (no need to reinvent the wheel), is easier to work with but maybe the 3D specialists here have some better suggestions. I had some good experiences with jPCT, but thats Java (Android version also exists).
Don't use a 3D engine. Use a games engine. Otherwise you're just wasting time, and making your project unnecessarily complicated.
 
Need directions GAF.

Let's say I have a program that sends a GET request to a static PHP URL and accepts a value it returns.

What do I have to look up so that I can write a script that intercepts that? Like, instead of hitting www.google.com, it will hit www.bing.com, or even a local file like 127.0.0.1/home.php.

I'm looking at hooks but I have no experience with them and I'm not sure if that's what I even need.

If there's a software that already does this, all the better.
 

Slavik81

Member
Speaking of Go, I really like its declaration syntax.

The declaration system in C++ seems simple enough at first. I've had an intuitive understanding of it for years... but I know that understanding is wrong. It breaks down once you start using functions as objects. Then you need to start to understand the clockwise spiral rule.

...or copy/paste/modify working declarations.
 
Speaking of Go, I really like its declaration syntax.

The declaration system in C++ seems simple enough at first. I've had an intuitive understanding of it for years... but I know that understanding is wrong. It breaks down once you start using functions as objects. Then you need to start to understand the clockwise spiral rule.

...or copy/paste/modify working declarations.

Holy jesus this function pointer example in c.

Code:
int (*(*fp)(int (*)(int, int), int))(int, int)

that broke me initially
 

Magni

Member
I was linked to this six-year-old blog post in a Ruby mailing list earlier today http://old.iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-internet/

Wow, just wow:

Perl on Rails – Why the BBC Fails at the Internet
By seb

Perl on Rails is a project by the smart chaps over in BBC Audio and Music Interactive that replicates the Ruby On Rails MVC framework in Perl. They’re obviously rather proud of themselves, and I understand that internally the project is making waves. Whilst I applaud the technical achievement of the individual developers, I deplore the situation that has forced them to do this.

The problem is that the BBC doesn’t control its own technical infrastructure. In an act of staggering short-sightedness it was outsourced to Siemens as part of a much wider divesting of the BBC Technology unit. In typical fashion for the BBC, they managed to select a technology supplier without internet operations experience. We can only assume that this must have seemed like an acceptable risk to the towering intellects running the BBC at the time. Certainly the staff at ground level knew what this meant, and resigned en masse.

Several years later this puts the BBC in the unenviable situation of having an incumbent technology supplier which takes a least-possible-effort approach to running the BBC’s internet services. In my time at the BBC, critical operational tasks were known to take days or even weeks despite a contractual service level promising four hour response times. Actual code changes for deploying new applications were known to take months. An upgrade to provide less than a dozen Linux boxes for additional server capacity – a project that was over a year old when I joined the BBC – was still being debated by Siemens when I left, eighteen months later.

The BBC’s infrastructure is shockingly outdated, having changed only by fractions over the past decade. Over-priced Sun Enterprise servers running Solaris and Apache provide the front-end layer. This is round-robin load balanced, there’s no management of session state, no load-based connection pool. The front-end servers proxy to the application layer, which is a handful of Solaris machines running Perl 5.6 – a language that was superseded with the release of Perl 5.8 over five and a half years ago. Part of the reason for this is the bizarre insistence that any native modules or anything that can call code of any kind must be removed from the standard libraries and replaced with a neutered version of that library by a Siemens engineer.

Yes, that’s right, Siemens forks Perl to remove features that their engineers don’t like.


This means that developers working at the BBC might not be able to code against documented features or interfaces because Siemens can, at their sole discretion, remove or change code in the standard libraries of the sole programming language in use. It also means that patches to the language, and widely available modules from CPAN may be several major versions out of date – if they are available at all. The recent deployment of Template Toolkit to the BBC servers is one such example – Siemens took years and objected to this constantly, and when finally they assented to provide the single most popular template language for Perl, they removed all code execution functions from the language.

So talented, underpaid, and frustrated software engineers at the BBC are forced to make a decision. Either they can produce websites using static HTML, and make a few remote calls to limited Perl functions, decorating their page with SSIs, or they can fight against a reticent and incompetent technology supplier to make use of a crippled and outdated language on servers that more than likely are unable to meet the capacity requirements of a dynamic application being used by the BBC’s audience. Software engineers at the BBC must become masters of the sleight-of-hand, using every smoke and mirrors tactic they can to conjure the appearance of dynamic websites, not exactly what you would expect from one of the largest media corporations in the world. Oh, and if you’re an external agency working for the BBC and hoping to write a new application or build on technologies that the rest of the world has taken for granted for the best part of a decade, you might as well forget it. There’s only one externally available development server, and it’s not in synchronisation with the live environments.

It doesn’t have to be this way. If, instead of forcing its teams to waste valuable license fee payers’ money on duplicating existing free software, the BBC decided to take control of its technical infrastructure and provide a viable platform for complex, dynamic applications, then that creativity, effort, and time could be directed at making more of the kind of applications that make the BBC great.

Some work is already progressing in this direction. A large part of the BBC’s Creative Futures project is what the BBC calls “BBC 2.0″ (often mistakenly referred to by executives and television-types as “Web 2.0″). The last I heard this was planning to deploy an architecture based around Java, Tomcat, Hibernate, Velocity, and MySQL. Whilst I disagree with the choice of technology for many reasons, this is at least an important step in the right direction for the BBC – as long as they exert control over the infrastructure from end to end.

It’s a ridiculous situation, and I know that many talented and respected technical staff have left the BBC in the past few years citing frustration at the insufficient technical infrastructure, and the inability of both Siemens and BBC management to keep up with the pace of technological change. Unfortunately, unless something dramatic changes with the upper levels of BBC management to recognise the nature of the problem, it’s a situation that will remain the status quo for a long time to come.

I wonder what it's like at the BBC today, if there's any traces of that clusterfuck left.
 

usea

Member
Anyone know of any good, comprehensive Go tutorials? http://tour.golang.org isn't really doing it for me.
I got started just by doing the tour and reading the spec. After that I just dove in and started writing some small programs. You get tripped up a lot early, and when that happens I would either re-read the spec and find something I overlooked, or look at a random Go project on Github, or ask on their irc channel.
 

TeegsD

Member
Has anyone here ever developed for the Kinect for Xbox 360? I don't have to make a complicated program but I haven't developed for it and can't think of where to start. Anyone know of any good resources?
 
Has anyone here ever developed for the Kinect for Xbox 360? I don't have to make a complicated program but I haven't developed for it and can't think of where to start. Anyone know of any good resources?

What do you need to accomplish?

I'm pretty sure you language of choice must have a binding library for it.
 

DTKT

Member
I feel really silly for asking this, but I feel like I'm missing some deep understanding of text files.

Why does an empty text file with 3 blank lines one after the other weigh 4 bytes? In the same vein, why does an empty text file with 2 blank lines one after the other weigh 2 bytes?

I assume that there is a difference in how the computers seems a document with 2 or 3 lines. But what is that difference?
 
I feel really silly for asking this, but I feel like I'm missing some deep understanding of text files.

Why does an empty text file with 3 blank lines one after the other weigh 4 bytes? In the same vein, why does an empty text file with 2 blank lines one after the other weigh 2 bytes?

I assume that there is a difference in how the computers seems a document with 2 or 3 lines. But what is that difference?
What you're "not seeing" is the newline character being used by the file.

This character is rendered as a line break so for example, using '\n' (line feed) as the newline character, the sequence "Hello\nWorld" is rendered as:
Code:
Hello
World
by an editor. It takes up space, but not visibly. There are other things to watch for, since newline differs depending on where you look (sometimes '\n' is used with '\r' (carriage return), making a newline sequence '\r\n'), but that's the general idea. Something is there that tells whatever's rendering the text to go to the next line and continue drawing characters.

More info here:
http://en.wikipedia.org/wiki/Newline
 
I feel really silly for asking this, but I feel like I'm missing some deep understanding of text files.

Why does an empty text file with 3 blank lines one after the other weigh 4 bytes? In the same vein, why does an empty text file with 2 blank lines one after the other weigh 2 bytes?

I assume that there is a difference in how the computers seems a document with 2 or 3 lines. But what is that difference?

How do you think a text file know whether are 4 or 2 blank lines? link
 

TeegsD

Member
What do you need to accomplish?

I'm pretty sure you language of choice must have a binding library for it.

I just need to use the Kinect to cover an area like 10 x 10 or 12 x 12 room. There will be one subject in front of the camera that will begin moving around in that area after the user presses the button. Once the user presses the button again, the program will give the total distance traveled by the subject in that time.

I was mainly wondering if anyone used any decent tutorials for it that they'd want to recommend
 
Really silly question, but would anyone recommend getting a non-coding job, but still an IT job just to gain industry experience? (As a Computer Science major who enjoys coding...)
 
Really silly question, but would anyone recommend getting a non-coding job, but still an IT job just to gain industry experience? (As a Computer Science major who enjoys coding...)

No everyone will agree with this, but IMO it's pretty weird to have a CS guy who doesn't code. You can still manage a team and code.
 

Magni

Member
Really silly question, but would anyone recommend getting a non-coding job, but still an IT job just to gain industry experience? (As a Computer Science major who enjoys coding...)

Are you talking about a real job, or a summer job while you're still in college? I did a brief summer job in the IT department of a major corporation a few summers back, it didn't hurt. But I definitely wouldn't do it again now that I have proper coding experience.
 
Are you talking about a real job, or a summer job while you're still in college? I did a brief summer job in the IT department of a major corporation a few summers back, it didn't hurt. But I definitely wouldn't do it again now that I have proper coding experience.

A real, full-time job. The thing is, I've been looking for a entry-level coding job with no luck so far, and I'm not sure if I could wait another 1 or 2 months without a job.

There's this recent offer about this non-coding job that is tempting because of the money (and the IT experience), but nothing else.

The worst thing is that I don't think I'm a bad coder at all, and I really enjoy programming, but not finding a job is killing me.
 

Godslay

Banned
A real, full-time job. The thing is, I've been looking for a entry-level coding job with no luck so far, and I'm not sure if I could wait another 1 or 2 months without a job.

There's this recent offer about this non-coding job that is tempting because of the money (and the IT experience), but nothing else.

The worst thing is that I don't think I'm a bad coder at all, and I really enjoy programming, but not finding a job is killing me.

I did a light coding job mixed with IT while going to school. Just get a job if you don't have one, if anything you get some related experience and it widens your network. If you work with IT people chances are that they will eventually know someone who needs a programmer. If you want to code, just stay current and look for opportunities to code in your current position.

I'll add that while I did this job, I got to create programs that I likely wouldn't have done otherwise. They were small of course, but you can always put it on your resume as related work experience, especially if you can prove that it is either in use or add some value to the company.
 

Magni

Member
A real, full-time job. The thing is, I've been looking for a entry-level coding job with no luck so far, and I'm not sure if I could wait another 1 or 2 months without a job.

There's this recent offer about this non-coding job that is tempting because of the money (and the IT experience), but nothing else.

The worst thing is that I don't think I'm a bad coder at all, and I really enjoy programming, but not finding a job is killing me.

Did you not go to school for coding or not live in a city with many coding jobs? Just curious, since I'll be on the job market a year from now.

Honestly if money is an issue, I'd take the job but keep searching.
 
Did you not go to school for coding or not live in a city with many coding jobs? Just curious, since I'll be on the job market a year from now.

Honestly if money is an issue, I'd take the job but keep searching.

I'm a CS major and I live in a city with many coding jobs. The problem is that 95% of them require experience, it's really hard to get a job without it (entry-level jobs are very rare). I did not do any internships (which I regret), so I'm having a bad time finding a job.
 

Zoe

Member
A real, full-time job. The thing is, I've been looking for a entry-level coding job with no luck so far, and I'm not sure if I could wait another 1 or 2 months without a job.

There's this recent offer about this non-coding job that is tempting because of the money (and the IT experience), but nothing else.

The worst thing is that I don't think I'm a bad coder at all, and I really enjoy programming, but not finding a job is killing me.

It sucks, but you can go for QA. Or try to go for some kind of database support.
 

usea

Member
I'm a CS major and I live in a city with many coding jobs. The problem is that 95% of them require experience, it's really hard to get a job without it (entry-level jobs are very rare). I did not do any internships (which I regret), so I'm having a bad time finding a job.
Have you applied to these jobs? Or are you just seeing the postings mention experience and neglecting to apply? Are you making it to interviews, or never being called in?

Do you live in the US?

To answer your question, I would not take a non-coding job. I would evaluate why you're not able to get a coding job and fix that. You should have zero problem getting a job even as a fresh graduate, provided you can write code.
 

Kalnos

Banned
Everyone at my school is required to do a year of internship and everyone I know has had no problems getting interviews and my city isn't really the greatest for technology jobs. Maybe your resume needs work?
 

Chris R

Member
I'm a CS major and I live in a city with many coding jobs. The problem is that 95% of them require experience, it's really hard to get a job without it (entry-level jobs are very rare). I did not do any internships (which I regret), so I'm having a bad time finding a job.

It could be worse, I'm at a point where I have the experience (most seem to want at least 3 years for "entry" level positions) but now the jobs in my area have dried up, or the marginal ones I'd consider just list DOE for compensation. At least the city/state/school district ones don't, but then again each of those places just just a portion of their workforce in the previous few years :(
 
Have you applied to these jobs? Or are you just seeing the postings mention experience and neglecting to apply? Are you making it to interviews, or never being called in?

Do you live in the US?

To answer your question, I would not take a non-coding job. I would evaluate why you're not able to get a coding job and fix that. You should have zero problem getting a job even as a fresh graduate, provided you can write code.

I've applied to a couple of jobs, making it to interviews, with no fortune. I must add that there's this nasty culture here of judging you by your resume (particulary work experience) rather than by technical interviews.

I live in Mexico.
 

Kalnos

Banned
I've applied to a couple of jobs, making it to interviews, with no fortune. I must add that there's this nasty culture here of judging you by your resume (particulary work experience) rather than by technical interviews.

I live in Mexico.

That 'culture' exists in the US as well. If you don't have work experience you have to make up for it by using whatever relevant project work you have. Employers have to weed the masses out somehow and the most effective 'somehow' is resumes.
 

Magni

Member
I'm a CS major and I live in a city with many coding jobs. The problem is that 95% of them require experience, it's really hard to get a job without it (entry-level jobs are very rare). I did not do any internships (which I regret), so I'm having a bad time finding a job.

Ahhh, the experience required for entry level jobs problem. I'm glad my school forces us to do two 6+ month fulltime internships for this very reason.

Any personal/school/open source projects? Also, apply even if it says X years of experience required.
 

Chris R

Member
An internship would have been nice now that I look back at it, not just for the experience, but also for the potential networking opportunities in the future.
 

Lonely1

Unconfirmed Member
I've applied to a couple of jobs, making it to interviews, with no fortune. I must add that there's this nasty culture here of judging you by your resume (particulary work experience) rather than by technical interviews.

I live in Mexico.

Where have you applied? On which city are you located? I have already landed job interviews with Oracle and MS and my resume is filled with academic stuff. It was all about technical interview and your actual coding skills. Now, I haven't personally tried with the local companies, but I know of someone who got a job at one of the big banks, with a Licenciatura en Matemáticas and cero programming experience after taking and passing a course in Cobol.
 
Where have you applied? On which city are you located? I have already landed job interviews with Oracle and MS and my resume is filled with academic stuff. It was all about technical interview and your actual coding skills. Now, I haven't personally tried with the local companies, but I know of someone who got a job at one of the big banks, with a Licenciatura en Matemáticas and cero programming experience after taking and passing a course in Cobol.

I've only applied to IBM and a small company here in Monterrey. I'm getting the interviews, I'm just not getting the offers :(.

IBM didn't do any technical interviews to me. It seems that they care more about people with working experience than their actual coding skills.

To be fair, I've only been rejected from two places, but the lack of job offers for beginners is making me frustrated. Too bad MS and Oracle don't have development centers here (I don't really wanna relocate to DF).
 

Lonely1

Unconfirmed Member
I've only applied to IBM and a small company here in Monterrey. I'm getting the interviews, I'm just not getting the offers :(.

IBM didn't do any technical interviews to me. It seems that they care more about people with working experience than their actual coding skills.

To be fair, I've only been rejected from two places, but the lack of job offers for beginners is making me frustrated. Too bad MS and Oracle don't have development centers here (I don't really wanna relocate to DF).

Well, Oracle is in Guadalajara and MS was for a gig at Redmond. A couple of friends got free ride to São Paulo for the next step of the MS interview process :3. (as for me, it was clear for me and the interviewer that my interest lied elsewhere at the time). But I take it as you don't want to leave Monterrey? Is strange to me that IBM didn't do a technical interview, but I don't really know much about their hiring practices.

Try hitting other type of companies like banks? What does the IT job you are looking at entails?
 

upandaway

Member
Can't help but laugh whenever I read a page of Effective Java. In summary:

- Autoboxing is a gift from the devil himself
- Build at least 2 shrines to honor Enums in your house
- The official API is a bag of messy farts (*cough* except for the Collections framework)
- No really, it's seriously bad
- Static factories *blush*
- You guys, did you know the API is hilariously bad
- Ew is that a public instance variable? Don't touch meeee that's sexual harassment
 
So any GAF-Progammer is willing to modify a chrome extension?

The extension: https://chrome.google.com/webstore/detail/currency-converter/lncdobdbibdgoiohgnflmjajfphcnakg

What I would like:
To have the value on the first box divided by 12 and this value shown in a new box. So it would be something like [converted value][converted value divided by 12][Currency name]

I can't believe this is hard. I just NEVER worked with java.

Thanks to anyone that would take the time!
 
OK I am a little in over my head here trying to assist this guy as an intern. I am not even being paid for this right now, but it ended up being my only option as far as continuing my career goals this summer.

I was told I only needed knowledge of Javascript for this and I thought I knew enough.

Hahaha in actuality I know nothing.



This is what I currently need to do. I have Node, Express, Coffeescript all set up and have been following these guides.

http://expressjs.com/guide.html#routing
http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/

Any ideas/tips/suggestions?

I have no idea if I am on the right track though. I'm in over my head, but I still believe I can do this.
 
Top Bottom