Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Inspired.  (Read 4070 times)

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: Inspired.
« Reply #15 on: March 17, 2016, 09:48:18 pm »

Python is a 'nice' language, but if you're maybe trying to kill two birds with one stone by learning a more widely applicable language, learn C++.

Really, most companies these days if you want programming career use C++ widely, and generally will question on technical interviews regarding proficiency (for west US jobs).
If you combine it with C it ties with number of jobs you can get by learning Java if you actually look at the stats. So, uh, it's good to learn, but it's not some holy grail of getting a career. And, to be honest, if you want a career, learn Javascript.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Untrustedlife

  • Bay Watcher
    • View Profile
    • My Website
Re: Inspired.
« Reply #16 on: March 17, 2016, 10:33:03 pm »

Python is a 'nice' language, but if you're maybe trying to kill two birds with one stone by learning a more widely applicable language, learn C++.

Really, most companies these days if you want programming career use C++ widely, and generally will question on technical interviews regarding proficiency (for west US jobs).
If you combine it with C it ties with number of jobs you can get by learning Java if you actually look at the stats. So, uh, it's good to learn, but it's not some holy grail of getting a career. And, to be honest, if you want a career, learn Javascript.

Really will? Javascript? Maybe if you are a web developer but software developers (in my experience) never use javascript for offline software and I personally have only used it once or twice. And java and javascript are different. You can't even write big software with javascript. C++ is the way to go if you want a career. Java (NOT JAVASCRIPT) is popular aswell.

edit:
I suppose javascript is good to know, but you won't build a career with that.
« Last Edit: March 17, 2016, 10:37:24 pm by Untrustedlife »
Logged
I am an indie game dev!
My Roguelike! With randomly generated creatures Roguelegends: Dark Realms
My Turn Based Strategy game! Which you can buy on steam now!DR4X
My website untrustedlife.com

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: Inspired.
« Reply #17 on: March 17, 2016, 10:44:57 pm »

Having been trying to find a software dev job around here, literally everything is mobile development right now, which -- while not required -- is seemingly done with quite a lot of Javascript. I do know it's not the same thing as Java, but projecting from this terrible state of affairs, I figure it's going to be a very important language to know. I mean, it's terrible, but it's also currently glueing most of the internet together, with many of the other front-end languages compiling down to JS to run. Since JS is also far too embedded in everything already to ever be removed, it's going to have to be maintained for the rest of the internet's lifetime.

So yes, if you want a career, learn Javascript. Probably not as your first language though.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Untrustedlife

  • Bay Watcher
    • View Profile
    • My Website
Re: Inspired.
« Reply #18 on: March 17, 2016, 10:52:22 pm »

Having been trying to find a software dev job around here, literally everything is mobile development right now, which -- while not required -- is seemingly done with quite a lot of Javascript. I do know it's not the same thing as Java, but projecting from this terrible state of affairs, I figure it's going to be a very important language to know. I mean, it's terrible, but it's also currently glueing most of the internet together, with many of the other front-end languages compiling down to JS to run. Since JS is also far too embedded in everything already to ever be removed, it's going to have to be maintained for the rest of the internet's lifetime.

So yes, if you want a career, learn Javascript. Probably not as your first language though.
Fair enough.
Logged
I am an indie game dev!
My Roguelike! With randomly generated creatures Roguelegends: Dark Realms
My Turn Based Strategy game! Which you can buy on steam now!DR4X
My website untrustedlife.com

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Inspired.
« Reply #19 on: March 17, 2016, 10:55:34 pm »

its written in c++ with sdl, note c and c++ are different.
They're not that different. C++ is C with some extra helpful stuff. C code compiles in C++. Pass by reference and strings are nice.
Disagree. What constitutes good style in C and C++ is very different, making them very different languages. For example, in C it's common to write your own linked list. In C++ you should be using std::vector for most such cases. C is simpler than c++, but you don't have good support for vital features like generic containers and OOP. I don't recommend using C if you can avoid it.

If you think C++ is just a few features tacked on to C, you're probably not a good C++ developer.
It depends on your purposes. std::vector uses templates and has extra overhead. You wouldn't use it when your code absolutely needs to be fast (e.g., the SDL itself is written in C.) You can do C++ and opt for dynamically allocated arrays instead of vectors. C code is generally faster but with less error checking. However, you could write your own headers/libraries in C that have all the bells and whistles of C++ (if you were so inclined.) You can also reduce sections of your C++ code to C and still compile, which is why I say they're not entirely different.

Really, if you want to make a such distinction, Dwarf Fortress was released in 2006, which means it's very likely programmed in C++03 (or 98.) That means no auto keyword, range-based for loops, lambda functions, nullptr (using magic number 0 was standard before,) template aliases, UTF-8/16/32 support, multithreading support, hash tables (relevant to your vector example,) or smart pointers (also relevant.) I'd go so far to say that C++03 and C++11 are almost as different as C and C++03.
« Last Edit: March 17, 2016, 11:12:09 pm by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Untrustedlife

  • Bay Watcher
    • View Profile
    • My Website
Re: Inspired.
« Reply #20 on: March 18, 2016, 12:13:30 am »

its written in c++ with sdl, note c and c++ are different.
They're not that different. C++ is C with some extra helpful stuff. C code compiles in C++. Pass by reference and strings are nice.
Disagree. What constitutes good style in C and C++ is very different, making them very different languages. For example, in C it's common to write your own linked list. In C++ you should be using std::vector for most such cases. C is simpler than c++, but you don't have good support for vital features like generic containers and OOP. I don't recommend using C if you can avoid it.

If you think C++ is just a few features tacked on to C, you're probably not a good C++ developer.
It depends on your purposes. std::vector uses templates and has extra overhead. You wouldn't use it when your code absolutely needs to be fast (e.g., the SDL itself is written in C.) You can do C++ and opt for dynamically allocated arrays instead of vectors. C code is generally faster but with less error checking. However, you could write your own headers/libraries in C that have all the bells and whistles of C++ (if you were so inclined.) You can also reduce sections of your C++ code to C and still compile, which is why I say they're not entirely different.

Really, if you want to make a such distinction, Dwarf Fortress was released in 2006, which means it's very likely programmed in C++03 (or 98.) That means no auto keyword, range-based for loops, lambda functions, nullptr (using magic number 0 was standard before,) template aliases, UTF-8/16/32 support, multithreading support, hash tables (relevant to your vector example,) or smart pointers (also relevant.) I'd go so far to say that C++03 and C++11 are almost as different as C and C++03.


C isn't object oriented, c++ is, so no you couldnt do  "all the bells and whistles" with c that you can with c++ in fact you couldnt get close.

And before you say it no, structs are not as powerful as actual objects.
« Last Edit: March 18, 2016, 12:15:48 am by Untrustedlife »
Logged
I am an indie game dev!
My Roguelike! With randomly generated creatures Roguelegends: Dark Realms
My Turn Based Strategy game! Which you can buy on steam now!DR4X
My website untrustedlife.com

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Inspired.
« Reply #21 on: March 18, 2016, 03:29:51 am »

DF is currently being developed with Visual C++ 2010. Most C code will work with a C++ compiler, so when people say they're mixing the two, they mean using some combination of C++ style and C-style code (i.e. not object oriented, etc) under a C++ compiler.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Inspired.
« Reply #22 on: March 18, 2016, 03:39:24 am »

Python is a 'nice' language, but if you're maybe trying to kill two birds with one stone by learning a more widely applicable language, learn C++.

Really, most companies these days if you want programming career use C++ widely, and generally will question on technical interviews regarding proficiency (for west US jobs).
If you combine it with C it ties with number of jobs you can get by learning Java if you actually look at the stats. So, uh, it's good to learn, but it's not some holy grail of getting a career. And, to be honest, if you want a career, learn Javascript.

Really will? Javascript? Maybe if you are a web developer but software developers (in my experience) never use javascript for offline software and I personally have only used it once or twice. And java and javascript are different. You can't even write big software with javascript. C++ is the way to go if you want a career. Java (NOT JAVASCRIPT) is popular aswell.

edit:
I suppose javascript is good to know, but you won't build a career with that.

This is hilariously wrong. All reasonable statistics I see say that Javascript is by far more popular than C++, with Java and Java only beating it out in popularity, especially as careers go. You're basically saying web developer isn't a reasonable career.

For development of a roguelike, I'd say Python is king. It has an easy to use module/package system (C++17 will have a proper module system IIRC, but it ain't 2017 yet) and performance isn't really a problem in turn-based games with no rendering between turns.
« Last Edit: March 18, 2016, 03:45:49 am by Putnam »
Logged

quekwoambojish

  • Bay Watcher
    • View Profile
Re: Inspired.
« Reply #23 on: March 18, 2016, 12:46:03 pm »

Python is a 'nice' language, but if you're maybe trying to kill two birds with one stone by learning a more widely applicable language, learn C++.

Really, most companies these days if you want programming career use C++ widely, and generally will question on technical interviews regarding proficiency (for west US jobs).
If you combine it with C it ties with number of jobs you can get by learning Java if you actually look at the stats. So, uh, it's good to learn, but it's not some holy grail of getting a career. And, to be honest, if you want a career, learn Javascript.

Really will? Javascript? Maybe if you are a web developer but software developers (in my experience) never use javascript for offline software and I personally have only used it once or twice. And java and javascript are different. You can't even write big software with javascript. C++ is the way to go if you want a career. Java (NOT JAVASCRIPT) is popular aswell.

edit:
I suppose javascript is good to know, but you won't build a career with that.

This is hilariously wrong. All reasonable statistics I see say that Javascript is by far more popular than C++, with Java and Java only beating it out in popularity, especially as careers go. You're basically saying web developer isn't a reasonable career.

For development of a roguelike, I'd say Python is king. It has an easy to use module/package system (C++17 will have a proper module system IIRC, but it ain't 2017 yet) and performance isn't really a problem in turn-based games with no rendering between turns.

I've visited roughly 5 college career fairs in the last two months, mind you these jobs are all for engineers, mathematicians and physicists, and not independent web developers/app  designers. These careers are all West Coast US, and other places may have their own biases.

Over half of the representatives I've spoken with, they would preferre a candidate with knowledge of C++, and many of them mentioned python as something 'nice' to have.

Virtually none of the companies I spoke with (around 60 companies) were even considering Java, there were a couple, but absolutely none I spoke with preferre it over C++ OR python. Even in our collaborative major labs, I have never seen our grad students mention Java.
Logged

Untrustedlife

  • Bay Watcher
    • View Profile
    • My Website
Re: Inspired.
« Reply #24 on: March 18, 2016, 02:43:18 pm »

Python is a 'nice' language, but if you're maybe trying to kill two birds with one stone by learning a more widely applicable language, learn C++.

Really, most companies these days if you want programming career use C++ widely, and generally will question on technical interviews regarding proficiency (for west US jobs).
If you combine it with C it ties with number of jobs you can get by learning Java if you actually look at the stats. So, uh, it's good to learn, but it's not some holy grail of getting a career. And, to be honest, if you want a career, learn Javascript.

Really will? Javascript? Maybe if you are a web developer but software developers (in my experience) never use javascript for offline software and I personally have only used it once or twice. And java and javascript are different. You can't even write big software with javascript. C++ is the way to go if you want a career. Java (NOT JAVASCRIPT) is popular aswell.

edit:
I suppose javascript is good to know, but you won't build a career with that.

This is hilariously wrong. All reasonable statistics I see say that Javascript is by far more popular than C++, with Java and Java only beating it out in popularity, especially as careers go. You're basically saying web developer isn't a reasonable career.

For development of a roguelike, I'd say Python is king. It has an easy to use module/package system (C++17 will have a proper module system IIRC, but it ain't 2017 yet) and performance isn't really a problem in turn-based games with no rendering between turns.

I've visited roughly 5 college career fairs in the last two months, mind you these jobs are all for engineers, mathematicians and physicists, and not independent web developers/app  designers. These careers are all West Coast US, and other places may have their own biases.

Over half of the representatives I've spoken with, they would preferre a candidate with knowledge of C++, and many of them mentioned python as something 'nice' to have.

Virtually none of the companies I spoke with (around 60 companies) were even considering Java, there were a couple, but absolutely none I spoke with preferre it over C++ OR python. Even in our collaborative major labs, I have never seen our grad students mention Java.

This is what I'm saying.  They don't even teach javascript outside of specific web development classes at my university.

Putnam where are you getting these statistics of yours?
« Last Edit: March 18, 2016, 02:44:51 pm by Untrustedlife »
Logged
I am an indie game dev!
My Roguelike! With randomly generated creatures Roguelegends: Dark Realms
My Turn Based Strategy game! Which you can buy on steam now!DR4X
My website untrustedlife.com

King Mir

  • Bay Watcher
    • View Profile
Re: Inspired.
« Reply #25 on: March 18, 2016, 08:20:16 pm »

its written in c++ with sdl, note c and c++ are different.
They're not that different. C++ is C with some extra helpful stuff. C code compiles in C++. Pass by reference and strings are nice.
Disagree. What constitutes good style in C and C++ is very different, making them very different languages. For example, in C it's common to write your own linked list. In C++ you should be using std::vector for most such cases. C is simpler than c++, but you don't have good support for vital features like generic containers and OOP. I don't recommend using C if you can avoid it.

If you think C++ is just a few features tacked on to C, you're probably not a good C++ developer.
It depends on your purposes. std::vector uses templates and has extra overhead. You wouldn't use it when your code absolutely needs to be fast (e.g., the SDL itself is written in C.) You can do C++ and opt for dynamically allocated arrays instead of vectors. C code is generally faster but with less error checking. However, you could write your own headers/libraries in C that have all the bells and whistles of C++ (if you were so inclined.) You can also reduce sections of your C++ code to C and still compile, which is why I say they're not entirely different.
This is wrong.

Templates do not make std::vector have extra overhead. You could write a dynamic array in C, but your handwritten version is likely to be inferior to the dedicated work of standard library developers that wrote std::vector. Quite the opposite, templates can be a zero overhead abstraction, meaning you can write high level, complex template code that is all highly optimized by the compiler. In some cases it can be negative overhead, because unlike equivalent C code that uses void pointers, template arguments have types, which give more information to the compiler to optimize around. Specifically if the compiler can prove that there are no unsafe casts, then it knows that no two pointers of different types (with caveats) will ever point to the same object, allowing it to safely rearrange reads and writes through those pointers. This cannot be done with void pointers in C.

You would absolutely use C++ when your code needs to be fast. There are many legacy libraries written in C, and or that have C apis for portability reasons, but that does not make C a better language for writing high performance libraries. Yes you can chose not to use C++ features in portions of your code, but using C++ gives you the flexibility use alternatives, that are sometimes superior, by being just as fast, but easier to maintain. And yes sometimes the best way to do things is the same in C and C++. But other times it's not.

Quote
Really, if you want to make a such distinction, Dwarf Fortress was released in 2006, which means it's very likely programmed in C++03 (or 98.) That means no auto keyword, range-based for loops, lambda functions, nullptr (using magic number 0 was standard before,) template aliases, UTF-8/16/32 support, multithreading support, hash tables (relevant to your vector example,) or smart pointers (also relevant.) I'd go so far to say that C++03 and C++11 are almost as different as C and C++03.
Yeah dwarf fortresss is probably not a shining example of C++. Tarn has admitted as much.

I wouldn't go so far as agree with your last line, but the point is valid.

Zekka

  • Bay Watcher
    • View Profile
Re: Inspired.
« Reply #26 on: March 18, 2016, 08:37:20 pm »

Disclaimer: I hate every programming language. That's a jokey "hate" but also a serious one! My favorite languages for big projects used to be Haskell and Prolog -- I would still defend them but I tired myself out on them pretty quickly. They all have featuresets that are laser-targeted to one kind of problem at the expense of most others. I don't think either comes with any features or builtins that would help you with this project. My favorite language for world simulation is Inform, but it's probably too special-purpose for what you want.

I have a hunch you'd be happiest if you picked a popular language. Out of the ten most popular languages on this page (http://www.tiobe.com/tiobe_index) I think Java has the least wrong with it for writing big projects like this. (I can say much the same for C#, which trades lots of additional complexity for a ton of convenience features -- but it's not one of my primary technologies.) There's good libraries to get started with for curses-style development in Java, and the tooling is excellent, even though IMHO every major Java framework, including most of the builtins, is a design trainwreck. (Libraries with fewer aspirations of taking over your entire program are sometimes OK.)

Java is really verbose and the syntax is a little dated, though, so I can't recommend it super hard for small projects. It's a language that takes a lot of time and effort to get something done in even if you know what you're trying to do. At least it's fast! (it's closely comparable to C++)

I can't in good conscience recommend Python for something larger than 1000 lines -- the documentation doesn't really cover what errors anything is allowed to throw and there's no static type system, which makes it really hard to determine if your code is going to crash or not. The error handling builtins have much less bias towards defaulting to doing the right thing than the builtins in e.g. Prolog or Icon, but both of those languages have IMHO too much bias in the direction of guessing what you mean.

I don't really like the syntax in Python, but most languages in wide use have really inflexible syntax. (At least Python's syntax is less verbose...) My big issue with it is that it wasn't designed for continuation-passing, even though it can do it -- continuation-passing is a really common tool for writing multitasking programs or otherwise manipulating what order things happen in, and Python not having it is imho cumbersome.

If I'm not throwing you to Java and I'm not throwing you to Python, though, I'm almost certainly throwing you to C, Javascript, or C++ and all of those have deeper fundamental problems, IMHO. Please use Python over those! They all suffer from a much worse version of Python's problems. Except C++, which is pretty type-safe but can still fail at a moment's notice due to manual memory management. (C nominally has a type system, but I don't believe the rumors.)

Don't use PHP.

Some other languages to consider if you want something like Python are Ruby and Lua. Lua is effectively a smaller Python, but its builtins are tiny and you'll have to build everything you want yourself -- it's also hard to deploy. Ruby has better support for e.g. continuation-passing and continuations in general, which is a big win imho -- but it's far more complex and almost everything associated with it has horrific documentation.

(Disclaimer: I am far more experienced with C than with C++.) My experience with C++ is that a lot of my friends start big projects in it, then realize they made a bad memory management assumption at the beginning of their project and are pretty powerless to fix it. I don't think the memory management is as bad as a lot of people say, but you have to think about it all the time and every time you take a shortcut (which is constantly tempting) you're gambling on whether the shortcut you took is going to break your program in the future. It's also an extremely complicated language and a lot of the features interact in surprising ways. And it's famous for its cryptic error messages!

I think it would be a bad idea for someone who doesn't know exactly what he's getting into (meaning "has C or assembly language programming experience, and also has Java programming experience, and also understands how Java objects were implemented") to use C++. I think it's still not a good idea if you know the difficulties -- I don't like C++ very much -- but hey, some people don't use condoms, either.

If you really want to use C++, you might consider trying Rust if you get frustrated. Rust is about as difficult as C++ (it has a smaller featureset that can still create most of the same problems), but it comes with a checker to tell you when you make a mistake that's likely to break your program. Could also look into Modula-3, which I don't personally use but one of my friends does -- I wouldn't be the one to sell you on it though, and it's not widely used.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Inspired.
« Reply #27 on: March 18, 2016, 08:40:49 pm »

Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Inspired.
« Reply #28 on: March 19, 2016, 01:26:28 am »

If I'm not throwing you to Java and I'm not throwing you to Python, though, I'm almost certainly throwing you to C, Javascript, or C++ and all of those have deeper fundamental problems, IMHO. Please use Python over those! They all suffer from a much worse version of Python's problems. Except C++, which is pretty type-safe but can still fail at a moment's notice due to manual memory management. (C nominally has a type system, but I don't believe the rumors.)
You didn't mention C#, which is like C++ with garbage collection. Python wasn't built for multi-threading, which kind of makes it a bad choice for "serious"* game programming.

*That is, high complexity, CPU heavy games like DF, Call of Doody, etc.
« Last Edit: March 19, 2016, 01:30:30 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Inspired.
« Reply #29 on: March 19, 2016, 01:30:39 am »

Python wasn't built for multi-threading, which kind of makes it a bad choice for "serious" game programming.
You can do multiprocessing in Python, which is almost the same thing.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.
Pages: 1 [2] 3