Author Topic: program language uses  (Read 697 times)

Fire Plague

  • Guest
program language uses
« on: September 11, 2019, 12:35:30 AM »
Hey all you professional ( or equivalent) programmers out there. Is C++ a "difficult" laguage in comparison to most or easier or what? I'm told that on larger projets it becomes nightmare-ish-ly complex and it has a steep learning curve.
What box would you place C++ in?

Offline TechCor

  • Jr. Member
  • **
  • Posts: 75
Re: program language uses
« Reply #1 on: September 11, 2019, 05:52:31 AM »
How to decide which programming language to use:
  • Determine the application you want to make and the target platform.
  • Determine what tools will make development easier that are available for that platform.
  • Use the highest-level language available that works with those tools/platform.

If you are just starting out and want to practice some programming, it depends on what you want to do.

Do you want to start a career in programming?
  • Highly recommend Computer Science college courses.
  • C++ will teach you some important lower-level constructs such as memory management. Knowing how this stuff works at the lower-level is important as it will help you when software written in a higher-level language develops performance problems (and be able to preemptively handle such issues).
  • Start by writing simple programs and work your way up. I personally started with C++ console apps and made a text-based adventure game.
  • Learn binary, bit operators, data structures, software architecture, etc. Again, college is recommended, but textbooks would work fine. I recommend starting with a general programming textbook like "C++ Programming".
  • Don't forget that many places will not hire you without a degree.

Do you want to write some simple programs as a hobbyist?
  • Start with a higher level language, such as C#.
  • Pick an easy to use tool, such as Unity (if you want a real-time application).
  • Practice simple programs.
  • Find good example projects written by professionals (not other hobbyists) to learn some basic software architecture.
  • Find a mentor if possible that will help you write better code.

In all cases, make sure you are learning how to write good code. Otherwise, large projects will always be out of reach. You wouldn't believe how many projects I've seen fall apart once they've reached a certain size. You will figure this out on your own when you get in over your head. It happens on everyone's first complex project. Just make sure you learn from it.

Fire Plague

  • Guest
Re: program language uses
« Reply #2 on: September 11, 2019, 08:16:49 AM »
hmm.
Do you have any good examples in C++ that is up to date? 
would the projects here fall under that umbrella?

 (i would think not, seeing that they said themselves that it was older "style")

Offline TechCor

  • Jr. Member
  • **
  • Posts: 75
Re: program language uses
« Reply #3 on: September 12, 2019, 04:28:08 AM »
You haven't really stated what you are trying to accomplish.

The problem with the projects here is that it is all based on reverse engineering an old game no one has source access to. Personally, I think this stuff is too complicated for an absolute beginner.

If you are serious about programming, you really need to grab a textbook. A good book will start with the basics and work up through more advanced concepts, and teach you why you are doing what you are doing. You will learn much faster this way.

C++ Primer Plus Book
« Last Edit: September 12, 2019, 04:55:26 AM by TechCor »

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 914
Re: program language uses
« Reply #4 on: September 15, 2019, 05:18:57 PM »
Fire Plague,

For what its worth, I learned C# before C++. C++ will be more difficult to learn up front for general application programming than C++, but it isn't really wrong to start with one language over the other. Java or Python would be decent choices as well.

The modern C++ projects hosted in this community would be OP2Archive, OP2MapImager, and OP2Utility. They all use C++11 or newer language features. op2ext has been redone to use more modern features, but it is mixed with 'older' language features since it edits Outpost2.exe in memory.

If you are looking to learn programming while working on Outpost 2, I would recommend trying to program a simple mission (no AI base or very simple base). It is pretty well documented through the forums. Keep in mind since there is a lot of community input, some code here will be awful and some will be good. One small and simple twist is all you need to make it interesting, not the kitchen sink if that makes sense.

I'm not a professional, but a long time hobbyist. Like TechCor mentioned, might be easier to help knowing what you wish to accomplish and could give more specific advice.

-Brett

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2210
    • LairWorks Entertainment
Re: program language uses
« Reply #5 on: September 16, 2019, 06:45:27 PM »
As a developer who uses primarily C++, I can say with confidence that yes, it's very difficult. Unless you're writing low-level software or middle ware, you're better off using C#, Java, Python, etc. These have a much easier learning curve, don't present you with very low level concepts, handle resource cleanup for you (mostly), etc. etc. etc.

Odd that the user deleted their account... wonder why? Are we that scary?
« Last Edit: September 16, 2019, 06:46:59 PM by leeor_net »

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4824
Re: program language uses
« Reply #6 on: September 18, 2019, 02:53:02 AM »
I agree with pretty much everything said above.

Not all C++ needs to be overly difficult, and like any language, you can probably become productive in it within 2-4 weeks. With that said, I would probably classify C++ as potentially one of the more difficult languages to learn. Mostly that's because of the scope of the language, and all the tempting and really cool features that you'll want to dabble with just because they are there. By that token, I would also classify C++ as one of the more important languages to learn if you really want to learn a lot about computers. There's so much to explore, and so much thought and detail that went into the language. There's a reason the C++ standard can come off reading like a legal contract. It doesn't necessarily require a steep learning curve to handle simple code, but because the option is there, it may be a little more likely. And if you like learning, C++ offers many dark corners of the language to explore that will keep you busy for many years to come. I think I first started learning and using C++ regularly back in 2001, and I'm still learning new stuff today. Granted, the language has had a ton of new additions in the C++11, C++14, and C++17 standards released in recent years. The language is evolving quickly, which is probably making it much better at handling the extremely large code bases that now exist in C++.

In terms of recommending the language, if it was an employer asking about what language to use for a new and upcoming programming project, then no, I would probably recommend they stay away from C++. You'd need a very compelling reason to use C++ on a new greenfield project, unless you had a very good reason. Perhaps a project in a niche area like embedded development, a new operating system, a device driver, or perhaps some real-time performance critical code that needs a lot of determinism. I would not recommend C++ to develop a new desktop app, and certainly not to develop a new web app, and probably not for a new cell phone app. C++ is not the best language for general application development, which probably accounts for most of current software development.

If it was a computer science student asking if they should learn C++, then hell yes. There are few languages that can teach you as much about computers as C++. I wouldn't say use exclusively C++, but C++ should certainly be among the languages that you learn.

If it was a hobby programmer, then use whatever they want to learn.



The projects here probably are suitable for someone just starting out and wants something to dabble with. They're not really all that big, and the active projects here have been modernized.

As Brett mentioned, OP2Utility, OP2MapImager, and OP2Archive all use pretty modern idioms, and are written to the C++17 standard. We're also working actively on op2ext which is in the process of being modernized, and is probably mostly there, though that project may be a little harder to understand due to more complex features being used and the runtime memory patching that is does to Outpost2.exe. It's not a typical project. I'd also agree with the Mission SDK being a reasonably easy start.



And yes, I think we are that scary. :P