Author Topic: Programming  (Read 5537 times)

0 Members and 1 Guest are viewing this topic.

Offline Clayface

  • Jungle Hunter
  • *****
  • Posts: 1653
  • user #9
    • View Profile
Programming
« on: July 20, 2011, 12:03:00 am »
Although people on this forum have discussed programming on other threads, there has never been a "main" thread to discuss programming.

I've tried learning c++ 2-3 times in the past, only to get a few chapters into an ebook and lose interest,
I finally got a real book on c++ (not an ebook), it's meant for a 2 semester college course,
I am going to try to read this book front to back and take notes.

i started 3 days ago and I'm on page 60 out of 1550, and have 5 pages of notes,  I've already learned from the other books up until a few chapters from now, but I'm going to read it all again to reinforce what I already know, plus this book is well written and is teaching me things the other books failed to mention.


I programmed my first c++ program today, it's a madlibs program,  I don't know if I'm going to add to it or not.

http://www.mediafire.com/?45cdmr1mq68o6it

there is a link to dl it, please tell me what you think

uploaded new version and replaced link
« Last Edit: July 20, 2011, 09:56:34 pm by Clayface »



Offline Detoxicated

  • Pack M.U.L.E.
  • *****
  • Posts: 2296
  • Spirit of Monkey
    • View Profile
Re: Programming
« Reply #1 on: July 20, 2011, 06:05:23 am »
funny little program you got there... i really enjoyed it, even though it is silly... i have no idea how to program, even though i did try myself a bit in python, but i forgot everything.
OK, both of you die and let us know what happens.

Offline martyk

  • Simon Belmont
  • *****
  • Posts: 5339
  • Never underestimate the power of dolphin!
    • View Profile
Re: Programming
« Reply #2 on: July 20, 2011, 06:52:19 am »
In my experience, just flipping through a book is not the best way to learn how to program.  What I would reccomend is come up with a project you'd like to make.  Something that'll challenge you, but still reasonable for your skill level.  Then make it, looking up more information as you need it.
Quote from: Doctor Zay
Martyk is a handsome fish.
Quote from: Brandonazz
This dolphin is delicious.
Quote
<Sgore> Martyk, mentally I always picture you as like, our forums bartender.
<Neoadept> I've always pictured you trapped in a tuna net

Offline Clayface

  • Jungle Hunter
  • *****
  • Posts: 1653
  • user #9
    • View Profile
Re: Programming
« Reply #3 on: July 20, 2011, 12:53:42 pm »
reading this book won't teach me how to make games, as I don't expect it to, since it's not focused on game design.  But it will help me get a good understanding of a lot of commands and how the syntax works and stuff.  I'm pretty sure my book never even leaves the console, but thats ok for now.  also, this program, or even an idea of this program was not in my book / mentioned in my book.  I thought about all I had learned so far, made a list in my head of possible programs I could have made, and chose to make this one.

Offline Kaizer

  • Mail Order Monster
  • *****
  • Posts: 4393
    • View Profile
Re: Programming
« Reply #4 on: July 20, 2011, 02:49:16 pm »
I took 3 years of visual basic and I'm heading off to college now for my degree in computer science/programming

Offline martyk

  • Simon Belmont
  • *****
  • Posts: 5339
  • Never underestimate the power of dolphin!
    • View Profile
Re: Programming
« Reply #5 on: July 20, 2011, 03:59:06 pm »
4th year of computer science in university along with 4 years in highschool.
Quote from: Doctor Zay
Martyk is a handsome fish.
Quote from: Brandonazz
This dolphin is delicious.
Quote
<Sgore> Martyk, mentally I always picture you as like, our forums bartender.
<Neoadept> I've always pictured you trapped in a tuna net

Offline Legodragonxp

  • Excitebike Gearhead
  • *****
  • Posts: 3558
  • Now for some real user power...
    • View Profile
Re: Programming
« Reply #6 on: July 20, 2011, 05:55:50 pm »
Personally I think the best stuff for 'getting in to programming' is the stuff aimed at kids. I would point in the general direction of C# Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express

and the Microsoft 'for kids' stuff. It is far better written to enjoy than the 'adult' stuff.
http://msdn.microsoft.com/en-us/beginner/bb308754.aspx

Also,while it is currently available for download you might want to grab:
http://www.ebooksdownloadfree.com/C-Plus-Plus/Head-First-C-repost-BI2599.html

Now then, if you committed to C++ you should also consider C++ Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

And although they get pulled on a regular basis, there can be some good books posted here:
http://www.ebooksdownloadfree.com/

Back to the 'for kids' thing. While it might go against your ego to go that route, the truth is that looking for answers to questions get buried in complication. When you focus on answers based on youth or kids you can avoid the yahoo answers about linking iTunes to Lotus Notes on a Linux backbone with Python and C++.

-Lego

Offline Clayface

  • Jungle Hunter
  • *****
  • Posts: 1653
  • user #9
    • View Profile
Re: Programming
« Reply #7 on: July 20, 2011, 06:01:07 pm »
I had a bunch of great ebook a while ago, the first time I tried learning, but I do much better with an actual book in front of me,  I got this $25 book for my birthday from one of my brothers, and it's very well written, better than most of the ebooks I had thought so highly of. 
and there is no ebook version of this book, at least not that I could find

Offline Slinky

  • Mr. Do! Disciple
  • *****
  • Posts: 2162
  • hey there
    • View Profile
Re: Programming
« Reply #8 on: July 20, 2011, 06:04:09 pm »
Warning - while you were typing a new reply has been posted. You may wish to review your post.

Ignoring.

I programmed my first c++ program today, it's a madlibs program,  I don't know if I'm going to add to it or not.

I have my Games You Make forum, and that would be fine to put on there because it's game related, if you want to put it up. I'm trying to build the list. Anyway, off topic.

I have mucked around in programming a little for the last...three years, I think and I kind of know Game Maker Language, but I don't know any serious programming languages.

Offline Clayface

  • Jungle Hunter
  • *****
  • Posts: 1653
  • user #9
    • View Profile
Re: Programming
« Reply #9 on: July 20, 2011, 09:16:05 pm »
well I have used a few pseudo code languages for individual programs,  and i've used actionscript and other scripting languages, I just really want to learn c++
I'm on page 120 of my book now, learning more advanced I/O stuff, I've updated my little program so that you can enter more than one word for each answer without messing up the rest of the program, but I'm not going to upload it anywhere, because it's too much of a hassle

also, i'm looking for a good c++ online community to join, anyone know of any?

Offline Luminar

  • Gyromite Gyro
  • *****
  • Posts: 4332
  • i'm losin' it
    • View Profile
Re: Programming
« Reply #10 on: July 21, 2011, 12:09:11 pm »
I always learned code by reverse-engineering existing things and gradually picking up on how it "goes". That said i've only worked with game mod code for the most part, such as LSL or BYOND.

Offline Kitkat

  • Ultima III Time Lord
  • *****
  • Posts: 2859
  • Beep Boop.
    • View Profile
Re: Programming
« Reply #11 on: July 21, 2011, 06:40:15 pm »
I've coded some Arduino stuff, which I'm not mistaken is C++.
Goddamnit kitkat, you make me look late
Come check out The Bino and The Ni'Calls
(Or don't these are old and embarrasing)

Offline Slinky

  • Mr. Do! Disciple
  • *****
  • Posts: 2162
  • hey there
    • View Profile
Re: Programming
« Reply #12 on: July 22, 2011, 01:27:15 pm »
Arduino rules.

Offline Clayface

  • Jungle Hunter
  • *****
  • Posts: 1653
  • user #9
    • View Profile
Re: Programming
« Reply #13 on: August 03, 2011, 09:40:11 pm »
Made a new program

The computer generates a random number and asks you to guess it.
It's an over-done program, as most people that learn programming end up making it at one point or another.
I tried to add difficulties, easy medium and hard,
if I wanted to spend another 40 min. on it or so I could make it save scores to a txt. and give the average

But I didn't want to spend that long on it

download link:
http://www.mediafire.com/?r00msb1msk9yfds
Code: [Select]
#include <iostream>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
    int num,guess,diffm,numog = 0;
    char agn,diff;
    bool done,difd;
    bool again=true;
while (again)
{
    difd=false;
    while (!difd)
    {
        cout<<"\nSelect Difficulty:\n[1] Easy\n[2] Medium\n[3] Hard\n\n";
        cin >> diff;
    switch(diff)
    {
        case '1':
        diffm=1;
        difd=true;
        break;
        case '2':
        diffm=3;
        difd=true;
        break;
        case '3':
        diffm=5;
        difd=true;
        break;
        default:
        cout << "Invalid Entry, Try again\n";


    }}
  done = false;
  num = (rand()+time(0))%((100*diffm)+1);
  cout << "\nI'm thinking of a number between 0 - "<<100*diffm<<".\nGuess my number\n\n";
  while (!done)
  {

      cin >> guess;
      cout << endl;
      numog++;
      if (guess == num)
      {
          cout<<"Good Job!\nMy number was "<<num<<"\nAnd it only took you "<<numog<<" Tries";
          if (numog<=(6*diffm) && numog<0)
            cout << "\nYou did an Amazing job!";
          else if (numog <=(8*diffm) && numog > 3)
            cout << "\nYou did a pretty good job";
          else
            cout << "\nWow, you're not very good at this, are you?";

            done=true;
            cout <<"\n\nWould you like to play again? (Y/N)?"<<endl;
            cin >> agn;
            switch(agn)
            {
                case 'y':
                case 'Y':
                again = true;
                break;
                case 'n':
                case 'N':
                again = false;
                break;
                default:
                {

                cout <<"Invalid Selection";
                again = false;
                }
            }
      }
     else if (guess < num)

          cout<<"Your Guess is too low\nGuess again  (0 - "<<100*diffm<<")\n\n";
    else
          cout<<"Your Guess is too high\nGuess again  (0 - "<<100*diffm<<")\n\n";

  }}


    return 0;
}


Offline PatMan33

  • Fable Hero
  • *****
  • Posts: 28788
  • M I RITE? STICKERS?
    • View Profile
    • DuckDuckGo
Re: Programming
« Reply #14 on: August 03, 2011, 09:42:25 pm »
I would NEVER run a program written by you, Clay.

Especially one that could so easily get stuck in a logic loop that crashes my processor.