• 0

I'm really getting frustrated.


Question

Hello everyone.

 

I have been trying to learn how to program in multiple programming languages (Python, Ruby, PHP, Visual Basic, C++, JAVA, C#, C.) but I have picked up none of these languages. I have been looking for books for quite a long time, I've been trying hands-on books, I've been trying For Dummies books, Heads First, etc, but I haven't gotten further than writing Hello World.

 

What my major issue is that I do not understand any of the technical terms, even after Googling them. What happens is that I get a book on C# for example and I pick it up for a little bit, then something that I don't understand comes up and I'm practically forced to give up.

I'm an IT student and I would like to have some programming experience before next year. I am really interested in C#, C++, C and JAVA but I have not found anyone or anything that can help me, even after taking a course in Visual Basic (Which I miserably failed).

 

Could anybody show the ropes to an absolute idiot? I'm just looking for definitions on all the technical stuff which is in English, not in technical terms.

 

Thank you so much.

 

ShellBox.

Link to comment
Share on other sites

Recommended Posts

  • 0

Edit:    simplezz's response one page back is more succinct than mine and says the same thing... Just can't bring myself to delete all this typing... :)  Probably best to refer to that one instead.

 

 

I'm going to elaborate on Seabizkit's response here.  With no offence intended to Seabizkit, his answer is a good one, but I think the description is a little difficult for a total novice to wrap his head around.

  • Class: A template
  • Object:  A thing based on that template that elaborates on it

An object is a filled-in template (that can actually do stuff, too).  The fields you fill in on the template are variables (integers and strings for example).  When you fill in fields of the template you create an "object".  So a class isn't a thing, it's a description of a thing.  An object is a thing.

 

The class can be a tea cup, a car, or an internet connectivity device.  It can be anything because you're making it.  An "object" is created by filling in the template of a class.  

 

Do you have a car?  I do, too!  We both have cars, but our cars are different from one another, even though they're both cars.

 

Both of our cars have:

  • Two, Three, or four doors
  • A colour
  • Standard or automatic

These are called "attributes", and we hold them in variables

 

Both of our cars can:

  • Go forward (accelerating at a specific speed)
  • Reverse (accelerating at a specific speed)
  • Lock and unlock the doors

These are called "methods", and we make these things happen with functions.

 

So now we can make a class of a car.  (ignore the exact syntax -- it'll change from language to language)

 

class Car
{
   
       public:
       // Attributes:  things that describe this car
       int doorCount;
       string colour;
       bool isAutomatic;
 
       // Methods:  things the car can do
       Car::Car (int doorCount, string colour, bool isAutomatic);    // This is the "constructor", a special type of method that's used to filled in the template (create an object of this class)
 
       GoForward (int speed);
       GoReverse (int speed);
       LockDoors (bool lockOrUnlock);          // true = lock the doors; false = unlock the doors
}
 
Now it's time to make two objects out of this class:  my car and your car.  My car is red.  Yours is blue.  We call the constructor to fill in the template.
 
Car myCar(4, "Red", false);
Car yourCar(2, "Blue", true);
 
Now have two cars.  One is a 4 door red car with standard transmission.  The other is a 2 door blue car with automatic transmission.  We can make as many cars with this template as we like.
 
We can make our cars go in different directions or lock/unlock the doors by creating methods and calling them.  Does that make sense?
Link to comment
Share on other sites

  • 0

You're asking for a whole computer science course here... Narrow your questions to what you need to do the job right now.

 

I'll answer the immediate questions above:

 

- Boolean (Why can it only be true and false?)

 

For the same reason the alphabet only has letters in it and not numbers or symbols.  The nature of boolean is that it's either true or false.

 

- Integer (What's the difference between an integer and a short for example)

 

You don't really have to worry about it.  Just use integers.

 

I don't understand this bit though, everyone says that I need to learn what these are and when I ask what they are people say that I'll learn that in university.

Link to comment
Share on other sites

  • 0

I don't understand this bit though, everyone says that I need to learn what these are and when I ask what they are people say that I'll learn that in university.

A Boolean is just defined as a true or false value. The keyword in C# for it is bool.

It's named after a mathematician named George Boole because he specialized in logic, which has true or false answers. :)

An Integer is just a whole number. In C# there are 8 that are defined:

Signed values - SByte, Int16, Int32 and Int64. There are keywords you can use instead: sbyte, short, int, and long.

Unsigned values - Byte, UInt16, UInt32 and UInt64. Keywords: byte, ushort, uint, ulong.

In some languages char is the same as sbyte, but in C# a char value is a single character like 'q' or ' '.

Link to comment
Share on other sites

  • 0

Also, I wouldn't bother with obfuscation right now. It's just a way of making your code harder to understand, usually for the purpose of protecting it.

Wikipedia's OOP article is a good place to start on that topic. The overview in the article is fairly straightforward and you can browse the other sections for more specific answers.

Everyone's description of class and object is about what I'd describe... A class is a type of thing, an object is a reference to a specific thing.

(A Car is a class, my Car is an object.)

Link to comment
Share on other sites

  • 0

I don't understand this bit though, everyone says that I need to learn what these are and when I ask what they are people say that I'll learn that in university.

I like to define my own boolean type in C. It's basically just two values, usually true or false, yes or no, etc. It's intended to represent truth logic and allows the programmer to control program flow. For example:

 

#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

/* create a new boolean data type */
typedef enum { TRUE, FALSE } boolean;

void
main ( void )
{
     char *input = NULL;
     boolean Happy;
     
     puts ( "Are you Happy? Type yes or no" );
     
     getline ( &input, NULL, stdin );
     Happy = ( 0 == strcmp ( input, "yes" ) ) ? TRUE : FALSE;
         
     if ( TRUE == Happy )
        puts ( "You are Happy :)" );
     else
        puts ( "You aren't Happy :(" ); 

     free ( input );
}
It can also make the code more readable than using 1 or 0, or other values. It doesn't really matter what values TRUE and FALSE have as long as the meaning is consistent in the code.
Link to comment
Share on other sites

  • 0

Also, I wouldn't bother with obfuscation right now. It's just a way of making your code harder to understand, usually for the purpose of protecting it.

Obfuscation can also be an unintended consequence. OOP especially can lead to it.

Here's an interesting blog post about how OOP can go wrong. It's old but still accurate: http://www.codinghorror.com/blog/2007/03/your-code-oop-or-poo.html

Link to comment
Share on other sites

  • 0

I like to define my own boolean type in C. It's basically just two values, usually true or false, yes or no, etc. 

 

/* create a new boolean data type */
typedef enum { TRUE, FALSE } boolean;
It can also make the code more readable than using 1 or 0, or other values. It doesn't really matter what values TRUE and FALSE have as long as the meaning is consistent in the code.

 

 

It's a nice practice, but will confuse the heck out of a new programmer:  your TRUE evaluates to zero (which is a logical fallacy -- wokka wokka).  Only the comparative in the 'if' makes it return a logical true.  If OP doesn't know what boolean is yet, he's going to have a really tough time understanding how (0 == 0) returns true, but that zero is false, and any non-zero is logically true all at the same time.  Add to that trying to get him to understand that strcmp 0 return for a match in the code above it and he'll be tearing his hair out trying to understand what's true and what's false.

 

I like your TRUE == style -- it avoids lots of pesky assignment bugs.

Link to comment
Share on other sites

  • 0

write a payroll program that calculates wages, taxes,  prints checks, and W2s. Don't come back or ask for help for help until it's done. It's an easy put tedious program to write.

Link to comment
Share on other sites

  • 0

write a payroll program that calculates wages, taxes,  prints checks, and W2s. Don't come back or ask for help for help until it's done. It's an easy put tedious program to write.

 

Hmm, I don't think you have properly read the OP. I can barely code so I can't really do that. I'm trying to get the theoretical work out of the way.

Link to comment
Share on other sites

  • 0

write a payroll program that calculates wages, taxes,  prints checks, and W2s. Don't come back or ask for help for help until it's done. It's an easy put tedious program to write.

If you think that's easy, tell it to the folk who actually develop payroll software products and managed to screw it up throughout the last 20 years  :laugh:

 

 

Hmm, I don't think you have properly read the OP. I can barely code so I can't really do that. I'm trying to get the theoretical work out of the way.

Are you getting some of the concepts down that people are explaining?

 

 

It's a nice practice, but will confuse the heck out of a new programmer:  your TRUE evaluates to zero (which is a logical fallacy -- wokka wokka).  Only the comparative in the 'if' makes it return a logical true.  If OP doesn't know what boolean is yet, he's going to have a really tough time understanding how (0 == 0) returns true, but that zero is false, and any non-zero is logically true all at the same time.  Add to that trying to get him to understand that strcmp 0 return for a match in the code above it and he'll be tearing his hair out trying to understand what's true and what's false.

 

I like your TRUE == style -- it avoids lots of pesky assignment bugs.

That's a terrible use of enum :laugh:... Let's not introduce things that lead to subtle bugs...

Link to comment
Share on other sites

  • 0

If you have autism and/or dyslexia make it visual that's how I learnt the basics, get a whiteboard and make it big and annotate your findings, learn how you want to learn and don't follow exactly how others learn.

Create ideas out of the code (forgot what name of the term) so make IF statements personal choices of the variables(ppl) etc, its so much easier.

Link to comment
Share on other sites

  • 0

You're asking for a whole computer science course here... Narrow your questions to what you need to do the job right now.

 

I'll answer the immediate questions above:

 

- Boolean (Why can it only be true and false?)

 

For the same reason the alphabet only has letters in it and not numbers or symbols.  The nature of boolean is that it's either true or false.

 

- Integer (What's the difference between an integer and a short for example)

 

You don't really have to worry about it.  Just use integers.

 

In fact Boolean Algebra is a vast and very interesting topic on it's own; from truth tables to logical gates.

Link to comment
Share on other sites

  • 0

I don't understand this bit though, everyone says that I need to learn what these are and when I ask what they are people say that I'll learn that in university.

Asking random people on forums is a great strategy for specific programming problems. It's not so great for learning all the basic notions. The most efficient way for you to learn programming is to find a good book and read it from cover to cover. I suggested the Yellow Book a couple of pages earlier, which answers all the questions you asked here in a clear, progressive and example-driven way.

Link to comment
Share on other sites

  • 0

@At All

 

Clearly there are some clever people in here...

but you being too clever...

Well if i was reading this as a noob I would get bogged down with some of the stuff that is just being said without, SellBox being the context.

I mean i understand what you guys are saying but i feel SellBox is just getting confused.

 

Its like some are having their own waffle which is cool just... not sure its helping SellBox.

 

@+LambdaLambdaLambdaFn 

 

I agree...

but i wanted to avoid the word template.... although you said it well.... I was trying to keep it very simplistic, I also wanted to avoid the word object as well.

Just until he had a good idea of what a class is. Do like the way you described some of it tho.

 

@ShellBox

 

Do you now know what a class is? As i feel that in order to get anywhere you need to understand this.

 

Example --> C# 

--------------------------------------

TeaCup A = new TeaCup();

--------------------------------------

Do you know what i am doing here: explain both sides

Link to comment
Share on other sites

  • 0

If you think that's easy, tell it to the folk who actually develop payroll software products and managed to screw it up throughout the last 20 years  :laugh:

 

 
 

Are you getting some of the concepts down that people are explaining?

 

 
 

That's a terrible use of enum :laugh:... Let's not introduce things that lead to subtle bugs...

 

Not really to be honest. Everyone's just throwing these terms at me that I don't understand. This is really confusing and most people are making it even more confusing.

@At All

 

Clearly there are some clever people in here...

but you being too clever...

Well if i was reading this as a noob I would get bogged down with some of the stuff that is just being said without, SellBox being the context.

I mean i understand what you guys are saying but i feel SellBox is just getting confused.

 

Its like some are having their own waffle which is cool just... not sure its helping SellBox.

 

@+LambdaLambdaLambdaFn

 

I agree...

but i wanted to avoid the word template.... although you said it well.... I was trying to keep it very simplistic, I also wanted to avoid the word object as well.

Just until he had a good idea of what a class is. Do like the way you described some of it tho.

 

@ShellBox

 

Do you now know what a class is? As i feel that in order to get anywhere you need to understand this.

 

Example --> C# 

--------------------------------------

TeaCup A = new TeaCup();

--------------------------------------

Do you know what i am doing here: explain both sides

Not exactly, no. I'm just so confused because everyone's saying go for this language or this language, learn it this way or this way, do it this way or this way. I'd be glad to just have a grasp on the fundamentals.

Link to comment
Share on other sites

  • 0

Not really to be honest. Everyone's just throwing these terms at me that I don't understand. This is really confusing and most people are making it even more confusing.

Not exactly, no. I'm just so confused because everyone's saying go for this language or this language, learn it this way or this way, do it this way or this way. I'd be glad to just have a grasp on the fundamentals.

I've been trying to post information relative to C# when I can. If that's what you think you want to start with let us know and we'll try to keep the info simple and related to that. Did you have any luck porting your VB class?

Link to comment
Share on other sites

  • 0

I've been trying to post information relative to C# when I can. If that's what you think you want to start with let us know and we'll try to keep the info simple and related to that. Did you have any luck porting your VB class?

I won't actually get any programming until I get onto level 3 which is next year. I'm now struggling between JAVA and C# because both seem so attractive to me. They both seem fun and I've got a bit of experience in JavaScript and a bit of experience in VB. I will keep you guys updated.

Could anybody give me a small and easy project to start with? Just suggest anything that's do-able.

Thank you.

Link to comment
Share on other sites

  • 0

Could anybody give me a small and easy project to start with? Just suggest anything that's do-able.

 

Here's assignment #1:  

 

Make a program, in the language of your choice, that asks the user two questions:

 

Q1:  What is the first number?

Q2:  What is the second number?

 

Print to the screen:  "The sum of those numbers is " firstNumber + secondNumber

 

Then tell us what language you chose (don't bother with explaining why -- it doesn't matter).

Link to comment
Share on other sites

  • 0

I won't actually get any programming until I get onto level 3 which is next year. I'm now struggling between JAVA and C# because both seem so attractive to me.

C# without a doubt. The learning material is better, gaming libraries are better (if you're into that), the official documentation is better, the language is more flexible, the standard libraries are generally a joy to work with, out-of-the-box powerful visual design tools, etc. Install Visual Studio Express for Desktop and you're good to go.

  • Like 3
Link to comment
Share on other sites

  • 0

I'm now struggling between JAVA and C# because both seem so attractive to me. They both seem fun and I've got a bit of experience in JavaScript and a bit of experience in VB. I will keep you guys updated.

It really comes down to whether or not you want your skills to be useful beyond Windows and Microsoft platforms. Language wise they're about the same in terms of features, documentation, tools etc. The key difference is that Java is truly multiplatform. You can code and run it pretty much anywhere, whereas with C# you're much more limited to Windows and poorly compatible and expensive alternate implementations like what Xamarin produces.

So if you want to write products in the future that target Linux, Android, OS X etc as well as Windows, it might be better to go with Java.

Link to comment
Share on other sites

  • 0

Hello,

ShellBox if you need some help, feel free to PM me.

Im personally done with this thread but its not your fault or has anything to do with you.

Good luck and I hope you learn and enjoy to program which seems to make you pretty happy :)

Link to comment
Share on other sites

  • 0

It really comes down to whether or not you want your skills to be useful beyond Windows and Microsoft platforms. Language wise they're about the same in terms of features, documentation, tools etc. The key difference is that Java is truly multiplatform. You can code and run it pretty much anywhere, whereas with C# you're much more limited to Windows and poorly compatible and expensive alternate implementations like what Xamarin produces.

So if you want to write products in the future that target Linux, Android, OS X etc as well as Windows, it might be better to go with Java.

Xamarin Studio is free for personal use with size limitations on the app; how is compatibility poor? The only libraries not supported are Windows-specific (WCF, WPF). Unity is the most widely used cross-platform game development toolkit, is free and uses C# as a scripting language. There's nothing inherently more cross-platform about Java.

Link to comment
Share on other sites

  • 0

write a payroll program that calculates wages, taxes,  prints checks, and W2s. Don't come back or ask for help for help until it's done. It's an easy put tedious program to write.

 

developing a basic payroll program is easy. i did it for my capstone course for my degree. It's just tedious getting all the tax information together.

Link to comment
Share on other sites

  • 0

developing a basic payroll program is easy. i did it for my capstone course for my degree. It's just tedious getting all the tax information together.

Writing non-racey parallel code is easy also if you are an expert. The OP isn't there

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.