Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Programming it!  (Read 1607 times)

RustKnight

  • Bay Watcher
    • View Profile
Programming it!
« on: June 04, 2013, 12:36:09 am »

So this topic is related to LCS.
Jumped into c++ a few days ago, and frankly it's a long way, I am sure of it.
Reading tutorials and such, but in case i would want to practice around with the code source of LCS, i would need:
C++ notions (and more...)
What else?

Also if you have some good C++ tutorials, paste them links. Have a couple of my own, but having more sources to read from is always a good way to learn.

Would be glad to try and learn some in my spare time, i've got a lot of it.
And of course help with all the gutting, low priority tasks.
« Last Edit: June 04, 2013, 12:52:17 am by RustKnight »
Logged

fr0z3d

  • Bay Watcher
  • /tmp/fr0z3d.log
    • View Profile
Re: Programming it!
« Reply #1 on: June 04, 2013, 11:08:31 am »

Learn to use curses, that will make the code LCS code easier to understand
Logged

K1lo

  • Bay Watcher
    • View Profile
Re: Programming it!
« Reply #2 on: June 04, 2013, 12:10:55 pm »

Realistically it takes a long time to get to grips with C++. I've been doing it full time for 5+ years and I'm still learning.

But that's not to say you can't make a lot of progress (and indeed cool projects) whilst getting up to speed. Far from it, I'd strongly suggest writing lots of small hobby projects - it's the best way to learn.

As for resources to get you going, learncpp.com is actually pretty good, but there are loads of books and resources online. Nothing beats looking at other peoples code though.

If you want to create simple games while you learn, http://lazyfoo.net/SDL_tutorials/ is a good source for getting to grips with C++ and the SDL library.
Logged
Moar mining.

Ihlosi

  • Bay Watcher
    • View Profile
Re: Programming it!
« Reply #3 on: June 04, 2013, 12:24:51 pm »

Jumped into c++ a few days ago, and frankly it's a long way, I am sure of it.
Reading tutorials and such, but in case i would want to practice around with the code source of LCS, i would need:
C++ notions (and more...)
What else?

Well, let's see ...

1. If this was the "olden times", you'd have to get a compiler, an editor and a linker, and maybe a debugger, too.

Nowadays, all of this comes in a handy package called an IDE (integrated development environment). There's probably dozens of different ones out there. I'm using Code::Blocks because a) it's free and b) the LCS code comes with a project file for Code::Blocks. Then again, my main programming experience is writing for small microcontrollers, where different IDEs are used and, while fun, is quite different from writing software for a PC. I usually don't have to deal with this pesky "user" who seems to be a major factor in PC software, for example.

2. You may want to get some reading material on good programming practices, which are fairly independent of the language you actually use. While basically every programmer is guilty of having produced unreadable and/or unmaintainable code at some point, you'll want to keep your code as readable and maintainable as possible. If found the book "Code Complete" by Steve McConnell to be very helpful and regret not having found and read it much earlier.

3. Familiarizing yourself with the concept of revision control and various kinds of software for this purpose is highly recommended (actually, it's also covered in the book mentioned above). There's probably dozens of different revision control systems out there, but every single one of them is a thousand times better than not using revision control at all. It may not appear necessary for the first steps in programming, but after that you don't want to find out that your last three hours of coding broke the program beyond repair and you overwrote the original working copy that you started out with. Using revision control prevents this and offers many additional benefits.

4. You may want to google for "how to write unmaintainable code". The document you'll find is both hilarious and very educational, giving you a good idea of what not to do.

5. If you're doing C and C++ you may want to get at least "the books" in paper form. For C, "the book" is "The C programming language" by Brian W. Kernighan and Dennis M. Ritchie (who designed the language), and for C++ it's "The C++ Programming Language" by Bjarne Stroustrup (who came up with C++).
« Last Edit: June 04, 2013, 12:28:34 pm by Ihlosi »
Logged

RustKnight

  • Bay Watcher
    • View Profile
Re: Programming it!
« Reply #4 on: June 26, 2013, 11:30:38 am »

Very happy with your answers, pertinent and at the point.
Find them very helpful and of course, this may sound obvious, mature.
I know programing is the least of hobbies you could pick up and expect to have fun with in a short period of time.
As the time passed since my last post i managed to learn the basics of C++ while dodging bullets in collage, final exams being inevitable as we speak.
As for so far i did write my own programs, very crude and basic but wonderful on the other hand.
I just enjoy so much in trying to learn how it works, and i am having kicks out of it just by learning, not necessary aiming to make a game. My current satisfaction comes from understanding the so called "difficult" aspects of programming.

All in all, this is as much a dilemma for me as it is maybe a point of start for an introspection for the rest of you in the programming trenches. Don't get me wrong, i am not schooling anyone but i am unsure what to do at this point. I enjoy programming fairly enough to suck me in and spit my social life out. For me personally i can't find reason in balancing social life with the satisfaction that you get from making something as beautiful as a program.
Given the fact that i graduated law school just now, or am about - makes me fairly old to pick up coding at this age, and also not having a favorable study background for my currently spoken goals might make my current goal orientation tardy.

All in all right cogitation in your own actions should benefit instead of being harmful.
To make jabbering less, i would think (at least as far as i go?) that such a hobby cannot be controlled in ones life, and if serious you need long term commitment that may damage several aspects of ones personal life.
Curious about your thoughts on this.
« Last Edit: June 26, 2013, 11:34:47 am by RustKnight »
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Programming it!
« Reply #5 on: June 27, 2013, 06:11:10 pm »

I, for one, have a burnout personality, and I'm prone to getting tired of certain hobbies. I say have fun with it while it's the thing you want to do, and if it remains the thing you want to do for a long time, then go for it. If you enjoy programming for awhile and then get tired of it and want to do something else, then when that happens, you can set it aside and do something else.

I think you can easily fall into the mistake of obsessing about sunk costs; you've studied law, so it doesn't make sense to learn programming? Why not both? You may think you're old to embark on learning a new "trade", but most of your life has been about learning the basics of human interaction and children's education. You're only a small fraction of the way into your adult life, so you have a huge amount of time to learn not just two major trades, but as many as you want to. Leonardo da Vinci was a painter, sculptor, architect, musician, mathematician, engineer, inventor, anatomist, geologist, cartographer, botanist, and writer, and he died in his sixties! Make time for the things you want to do, because there is time; if you truly can't find the time to do everything you want to do, you're probably just bogged down with time commitments above and beyond what you really need.

As I see it, if you're too busy to enjoy yourself, you're probably treating life less as an experience to be enjoyed and more as a job to be done right. Yes, it's definitely important to make sure you're planning for the future, but if you get too deep into making sure you enjoy some far off future, that future will never come; you'll always be working for your future. You should be able to find a balance between ensuring you're doing the right thing for the future, and ensuring you're enjoying what you're doing (or learning) right now.
Logged

RustKnight

  • Bay Watcher
    • View Profile
Re: Programming it!
« Reply #6 on: June 28, 2013, 02:31:12 pm »

At first i would have thought to throw a joke about what you wrote, in a positive way not "trolling it".
But if i come to think of it, what you wrote is so much of common senses that i think a less "funny" reply about it is needed.
Seriously maybe more people should read what you've wrote, you are an interesting individual and I would have been happy to talk some more with you if we would have had the time.
Not trying to raise you a statue or anything but you make a good coach!
Heh, somehow i feel that i dumbed down what you've wrote by such a lame "thumbs up" but you should be proud of yourself, you got the stuff.

As for how i see life, you sort of narrowed me in - yes i see it as a duty, i like to see it as rigid as possible, in the same time the tension i put on myself throws me out of my goals and frequently makes me act opposite to my beliefs, so i do think there is a management of goals, methods to obtain them and not strain yourself while trying to reach them - because at the end you won't be able to do not even 20 % of what you initially planned out.

Life...
Must say, pretty tasty, nothing compares too it - or at least i can't compare it YET to anything else; but as you said, it's wonderfully varied and somehow it's sad that it comes to an end at some point; i would guess that the final teachings of life is how to die - we all need to learn it eventually.
Logged

Ihlosi

  • Bay Watcher
    • View Profile
Re: Programming it!
« Reply #7 on: June 29, 2013, 02:36:30 am »

To make jabbering less, i would think (at least as far as i go?) that such a hobby cannot be controlled in ones life, and if serious you need long term commitment that may damage several aspects of ones personal life.

I'd like to get more involved, but next to a family and a job there's very little time left. Maybe if I was a "high energy person" that can do with 5 hours of sleep ... but I'm not.  :P
Logged