• 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

203 answers to this question

Recommended Posts

  • 0

I started out by looking at how existing programs were built, and how the code fitted together. I found it frustrating, but Visual Basic 6 got me hooked and started in the world of programming. If, Next and For loops really confused the heck out of me, but soon I got them. Modern coding like C# stumped me, for example, having to set an object reference to an instance of an object, it really made me feel lost, but now it's second nature.

 

Then in 2003 I met my lovely Japanese girlfriend who is an advanced programmer, she has been so wonderful and gentle, has taught me more than any web tutorial could, she simplified it. My best advice is try to find someone who you can be friendly with personally who is a programmer. The internet just doesn't do it as patiently and gently as another real person close to you personally can sat next to you, another person can tailor what they teach you to your own pace and understanding, simplifying the complex bits. I'm more of an electronics guy, but software does make me appreciate what really makes a computer do what YOU want it to :)

 

Good luck and all the best :)

Link to comment
Share on other sites

  • 0

I don't write pseudocode, and I don't know anyone in any of the firms I've worked in that does. You write program specifications that lay out the users requirements for the program, but writing psuedocode is just a time wasting intermediate step that no experienced programmer bothers with anymore.

For bigger projects and such I've very infrequently done "overall diagrams" and such just to plan out the thing before actually working on it to make sure all the bases are covered, and still that's pretty rare for me, just the really complicated projects.  Maybe Agile charting/etc if you're in a team that uses that sort of thing.  But yea.. that requirements writeup typically is your main go-to for planning.  But pseudocode, I personally haven't seen that since like the early 80's, and even then rather rarely.. that's kind of the point of the requirements/documentation (and diagrams if you use it) phase, a bit redundant.  Not including educational materials of course.. see that pop up in books from time to time just to help people think new concepts through.

Link to comment
Share on other sites

  • 0

I've found an eBook which is kind of useful (Heads First C# 3rd edition) and they do explain things but still not what I need. I'm just curious to what polymorphism and memory allocating and everything in this thread means. 

Don't worry about polymorphism, memory allocation, etc. at this point. Those are advanced topics, stick with learning the basic things until you have that down.

  • Like 3
Link to comment
Share on other sites

  • 0

For bigger projects and such I've very infrequently done "overall diagrams" and such just to plan out the thing before actually working on it to make sure all the bases are covered, and still that's pretty rare for me, just the really complicated projects.  Maybe Agile charting/etc if you're in a team that uses that sort of thing.  But yea.. that requirements writeup typically is your main go-to for planning.  But pseudocode, I personally haven't seen that since like the early 80's, and even then rather rarely.. that's kind of the point of the requirements (and diagrams if you use it) phase, a bit redundant.  Not including educational materials of course.. see that pop up in books from time to time just to help people think new concepts through.

 

I suppose it's a useful step for absolute beginners as it will tend to constrain your through processes to the task at hand, but in the real world it's just not used anymore.

Link to comment
Share on other sites

  • 0

I suppose it's a useful step for absolute beginners as it will tend to constrain your through processes to the task at hand, but in the real world it's just not used anymore.

I don't think you guys are really being fair. Writing up design documents, requirements documents, and architecting software are all a form of software engineering. It's not far removed from pseudo code. If you are sitting there and you are designing the APIs of a subsystem and some sort of class hierarchy that establishes the relationships between components, you may very well write out some form of pseudo code for those things (if only for the interfaces). It may not be a formal or a complete process, it may not involve writing the flow of subcomponent code, but it still exists in some form.

Link to comment
Share on other sites

  • 0

I don't think you guys are really being fair. Writing up design documents, requirements documents, and architecting software are all a form of software engineering.

 

There's a difference between psuedo-code and systems/business analysis. 

Link to comment
Share on other sites

  • 0

I don't think you guys are really being fair. Writing up design documents, requirements documents, and architecting software are all a form of software engineering. It's not far removed from pseudo code. If you are sitting there and you are designing the APIs of a subsystem and some sort of class hierarchy that establishes the relationships between components, you may very well write out some form of pseudo code for those things (if only for the interfaces). It may not be a formal or a complete process, it may not involve writing the flow of subcomponent code, but it still exists in some form.

 

Nope. When I'm writing interfaces, I just write the code and have done with it.  When I'm done I might print off an interface model for the rest of the team, but I don't bother with the pseudo step. Requirements documents also are nothing like pseudo code, they're descriptions of what the customer wants the program to do.

 

The closest I -might- get is to sketch out a rough screen layout, but even that is pretty rare.  I and my colleagues are all experienced enough to not need to do all that; the code just flows. :p

Link to comment
Share on other sites

  • 0

Yes you do. btnOkay and nudUpdown are not in the function and need to be defined as variables elsewhere.

It's been a long time since I did any VB, but aren't the names of GUI objects automatically exposed as variables / members within the scope of their parent, the form class? Unless VB.net does things differently of course, in which case ignore my uninformed ramblings ;)
Link to comment
Share on other sites

  • 0

It's been a long time since I did any VB, but aren't the names of GUI objects automatically exposed as variables / members within the scope of their parent, the form class? Unless VB.net does things differently of course, in which case ignore my uninformed ramblings ;)

Yep. Controls are generally in the class definition as a variable in both VB and C#. That's why I said variables are still necessary in his code since the controls can't be declared within the function. :)

Link to comment
Share on other sites

  • 0

Nope. When I'm writing interfaces, I just write the code and have done with it.  When I'm done I might print off an interface model for the rest of the team, but I don't bother with the pseudo step. Requirements documents also are nothing like pseudo code, they're descriptions of what the customer wants the program to do.

 

The closest I -might- get is to sketch out a rough screen layout, but even that is pretty rare.  I and my colleagues are all experienced enough to not need to do all that; the code just flows. :p

Requirements documents are not pseudo code (as if the customer would understand that) but design docs encompass the elicited requirements and are part of the process of software engineering. My point is that going through the motions of software engineering typically includes some form of pseudo code even if it just simple and non-formalized jotting down of potential APIs. So you are telling me that never during the design process does anyone formalize API interfaces and system interactions outside of actual coding and document such things as part of the design? You guys just bang out code based on requirements documents only? 

 

 

There's a difference between psuedo-code and systems/business analysis. 

I would call it formalized software engineering which can and does include aspects of writing pseudo code. Writing pseudo code doesn't mean you are sitting down and banging out specific abstract logic for individual pieces of code. That's just an extreme definition. Any sort of informal or vague description of APIs or system interaction is a form of pseudo code and you should really be doing those sort of things during the process of software engineering a large project.

Link to comment
Share on other sites

  • 0

Requirements documents are not pseudo code (as if the customer would understand that) but design docs encompass the elicited requirements and are part of the process of software engineering. My point is that going through the motions of software engineering typically includes some form of pseudo code even if it just simple and non-formalized jotting down of potential APIs. So you are telling me that never during the design process does anyone formalize API interfaces and system interactions outside of actual coding and document such things as part of the design? You guys just bang out code based on requirements documents only? 

 

Well, we have design meetings where we hash stuff out, but we don't generally document anything in those; I certainly wouldn't call that pseudo coding.  We just decide how and what we're going to do, then do it.  It's fairly informal here in that regard and it works best for us.

Link to comment
Share on other sites

  • 0

Hello,

What a load of nonsense.  I code daily, every weekday of every month for every year for the past 25 of the things.  I don't write pseudocode, and I don't know anyone in any of the firms I've worked in that does. You write program specifications that lay out the users requirements for the program, but writing psuedocode is just a time wasting intermediate step that no experienced programmer bothers with anymore.  It's an anachronism from an earlier age that still gets pointlessly taught in schools and colleges.

OK, its official, noone knows what pseudocode is in this thread :laugh:

 

 

No one does flowcharts anymore, either. ;)

Because of the prior point, it also makes me wonder if you know exactly what a flowchart is.... :s

 

you DO need to know how to derive mathematical formulae based on plain language descriptions of the required results. (ie: Taking an average of a range of data, or finding its highest or lowest values, or calculating a sales forecast based on historical sales data etc.  Can't do any of that without adequate math skills)

:laugh: :rofl:  Did I seriously just read you need to know how to do those? Amazing...either that or someone is stuck in the 60s.

Just in case for everyone:

Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.

It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading. Pseudocode typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.

No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program. Pseudocode resembles, but should not be confused with skeleton programs, including dummy code, which can be compiled without errors. Flowcharts and Unified Modeling Language (UML) charts can be thought of as a graphical alternative to pseudocode, but are more spacious on paper.

 
Link to comment
Share on other sites

  • 0

Yes you do.

Really?

Public Class frmNightclub
    Private Sub btnOkay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOkay.Click
        If rdbFemale.Checked = True Then
            MsgBox("This person is " & Convert.ToString(nudUpdown.Value) & " and female")
        Else
            MsgBox("This person is " & Convert.ToString(nudUpdown.Value) & " and male")
        End If
Eric I dont wanna call you out but thats pretty simple to see....How could you NOT see that variables are not needed in that code?

Dont get me wrong, doing it with two variables is doable and in VB. NET memory doesnt give a ###### but lets try to stick to some effectiveness and cutting a couple of lines...

Link to comment
Share on other sites

  • 0

 

:laugh: :rofl:  Did I seriously just read you need to know how to do those? Amazing...either that or someone is stuck in the 60s.

 

You're missing the point of an example.

Link to comment
Share on other sites

  • 0

Eric I dont wanna call you out but thats pretty simple to see....How could you NOT see that variables are not needed in that code?

 

I think Eric's point is valid:  if you want to use those variables anywhere except right there, you need to declare them.  There's a difference between efficiency (cutting a few lines of code to prove you can do it) and effectiveness (being prepared to use the variables outside of the form, for example).  Not that I didn't contribute to this, but this thread is going seriously off topic.

Link to comment
Share on other sites

  • 0

Hello,

I think Eric's point is valid:  if you want to use those variables anywhere except right there, you need to declare them.  There's a difference between efficiency (cutting a few lines of code to prove you can do it) and effectiveness (being prepared to use the variables outside of the form, for example).  Not that I didn't contribute to this, but this thread is going seriously off topic.

99% of his post is problably valid. Needing those variables is the 1% that isn't.

Yeat, its going OT so that why I made this: https://www.neowin.net/forum/topic/1197051-what-should-be-the-first-programming-language-someone-learns/

Link to comment
Share on other sites

  • 0

Yes you do. btnOkay and nudUpdown are not in the function and need to be defined as variables elsewhere. By not assigning myAge and myGender you paint yourself into a corner if you want to add to the function later. It will have to be rewritten if you just use the values assigned directly.

@OP: I'm not sure how much you've read up on C# yet but a few hints on differences for porting:

- classes and functions are wrapped in curly brackets {}

- keywords are type-sensitive and do not automatically get their capitalization autocorrected so you would have to use "public class" rather than "Public Class"

- the button handler needs to be created in the class constructor (btnOkay.Click += btnOkay_Click)

- C# concatenates strings using the + operator rather than &

- = is used for assignments, == is used for comparisons

I was going to post your class converted but I thought you might like to try it yourself first.

 

 

I wrote this myself in VB.NET :) And I remember the curly brackets from JavaScript. and I don't even know what these mean:

 

- the button handler needs to be created in the class constructor (btnOkay.Click += btnOkay_Click)

- C# concatenates strings using the + operator rather than &

Hello,

Ok so what do you not understand about this code?

To comment, you dont need any variable for this code. At all.

 

I wrote this myself in VB.NET. I do understand what the code does but I don't like VB because it confuses the hell out of me. I prefer having C# for the curly brackets because it makes it more clear for me.

Link to comment
Share on other sites

  • 0

Really?

Public Class frmNightclub
    Private Sub btnOkay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOkay.Click
        If rdbFemale.Checked = True Then
            MsgBox("This person is " & Convert.ToString(nudUpdown.Value) & " and female")
        Else
            MsgBox("This person is " & Convert.ToString(nudUpdown.Value) & " and male")
        End If
Eric I dont wanna call you out but thats pretty simple to see....How could you NOT see that variables are not needed in that code?

Dont get me wrong, doing it with two variables is doable and in VB. NET memory doesnt give a **** but lets try to stick to some effectiveness and cutting a couple of lines...

Where is btnOkay and nudUpdown?

And please watch your language.

Link to comment
Share on other sites

  • 0

I wrote this myself in VB.NET :) And I remember the curly brackets from JavaScript. and I don't even know what these mean:

 

- the button handler needs to be created in the class constructor (btnOkay.Click += btnOkay_Click)

- C# concatenates strings using the + operator rather than &

In VB you can declare a handler the way you did, but you cannot do that in C#. You will have to add the handler elsewhere, like in the class constructor.

Button.Click is an event handler, so in C# you hook into it by adding (literally) your function to it.

class frmNightclub
{
   // constructor
   public frmNightclub()
   {
      btnOkay.Click += btnOkay_Click;
   }
}
The += is a shortcut for add and assign at the same time. You can remove the handler if you need to by subtracting it again.

As for the concatenation comment, I was just letting you know that you add strings together with + instead of & in C#. :)

Not that I didn't contribute to this, but this thread is going seriously off topic.

Agreed. He already said he was frustrated and just learning so let's try to keep it simple for now. :)

Link to comment
Share on other sites

  • 0

I wrote this myself in VB.NET :) And I remember the curly brackets from JavaScript. and I don't even know what these mean:

 

Curly brackets (braces) mean a "block" of code.  They usually mean one of two things:

  • Sequence of instructions:  instructions in curly braces are run in order as a "block".  It may be helpful to think of them as markers for the creation of a machine unto itself:  every time you create a { code block } that code block is a little robot that does one thing, and does it well.  The goal in good programming is to make a bunch of code blocks (robots) that do one thing and do it well.  Then put them all together -- sort of how you buy lumber from one company, screws from another, and the screwdriver from the third.  You build a deck with all those tools, but you don't care how the lumber was planed or the screwdriver forged.  To you, it's a black box.  Curly braces are used to "black box" functions, loops, and pretty much anything major.  They are BIG boundary markers.  
  • Scope:  any variables declared inside the curly braces are only available inside the curly braces.  Any variables declared outside the curly braces are available both outside and inside.  

Scope is pretty complex, but in its simplest form it works like this:

 

I'll use pseudo-code to raise the hackles of other people in this thread:

 

declare variable gender as string

 

{

     // Gender "falls through" because it was declared before the "{", so it is available to this "robot"

     gender = "Male";

}

 

print gender;

 

That will work.  Contrast that with....

 

     declare variable gender as string

     gender = "Male";

}

 

print gender;

 
The second example doesn't work.  "gender" falls out of scope when it hits the close curly brace, so the code where "print gender" is doesn't know what the gender is anymore -- that is, the variable "gender" is destroyed before it reaches the print statement.  
Link to comment
Share on other sites

  • 0

Might as well take this a step further and describe the different types of brackets:

  • {...} Braces:  delineates a code block (loops, functions, and anything major).  Again, think of it as a single robot.
  • (...) Parentheses: depends on the language, but usually used in functions or methods to pass variables between them.  To elaborate on the building a deck example above, if the people at the lumber store need a screwdriver to adjust their machinery, you'd pass a screwdriver into the lumber store like this:  lumberStore(myScrewdriver).  They'd use the screwdriver to make the lumber, then "return" a piece of lumber to you.  
  • [...] Square brackets: typically used for arrays.  {The discussion of arrays is probably } out of scope here, but in basic terms, it's a list of stuff.  list[0] gives you the first item in the list.  list[1] gives you the second item in the list, and so on.
Link to comment
Share on other sites

  • 0

I'm gonna try to convert this code into C# now.

 

Could anybody please explain to me in the simplest way possible (Like you're speaking to a child, compare it to something in real life) what these are?:
 

- Classes

- Objects

- Frameworks

- Libraries

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

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

- Short

- Char

- Event

- Event handler

- Obfuscated code
- The difference between Object-Oriented Programming and another non OOP.

- Operator

- The void thing above my code.

 

I know it's a lot of questions but I can't find a clear enough answer on Google.

 

Thank you all.

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.

Link to comment
Share on other sites

  • 0

Could anybody please explain to me in the simplest way possible (Like you're speaking to a child, compare it to something in real life) what these are?: 

- Classes

- Objects

Classes are templates from which objects are created. Think of a printing press for producing reading materials or money. The typeset for a page, that is the collection of characters that make up a page, that's a template.

Objects are the copies or instances of the template. In the print press analogy they're the actual pages, books, and money printed.

A programming example (non-specific language):

Class Dog {
     Breed;
     Colour;
     Age;
     Owner;
}

Procedure Main:

  Dog MyDog = new Dog ( Terrier, Brown, 2, Me );
  Dog NeighboursDog = new Dog ( Alsatian, Black, 5, Neighbour );
  Dog MumsDog = new Dog ( Corgi, Golden, 1, Mum );

End Procesure
The class Dog is a template from which all the objects MyDog, NeighboursDog, and MumsDog are created. Those objects (Dogs) have the same qualities, Breed, Colour, Age, and Owner, but differ in what they are.

 

I know it's a lot of questions but I can't find a clear enough answer on Google.

Wikipedia might be more helpful. I use it a lot when programming. Just do a search and find the right section. There are even books/courses on there.

Wikipedia's definition of a class: https://en.wikipedia.org/wiki/Class_(computer_science)

  • Like 1
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.

 

just saying liked your answer.

 

this thread/topic/discussion is going seriously off topic! and has a lot of white noise that you have to sift through.

 

Anyway... like person above said.. try keep it to what you need to know.

 

best answer tho for a: class/classes

 

1. Usually you refer or work with one, i.e. there is no such "thing" as classes... that is a collective group for many class's

see point 2 for a better answer of 1.

 

2. your question should of been what is a class.

i.e. one, as if you know what one is.... then classes is just many of them. Follow?

 

3. A class is how you define something.... this could be anything....

for example... a tea cup or a football.... basically anything...and the name should be descriptive of what it is.

 

So if i wanted my program to work with something and i wanted that something to represent a tea cup.

 

Then i would create a class for the tea cup.

 

eg. --> C#

 

public class TeaCup

{

 

}

 

4. when defining a class you cannot have a space in the name. i.e. you cant do this.

 

public class Tea Cup 

{

 

}

 

5. when defining a class like above just away put the word public in front... while you are learning this will be come clear later.

 

6. why create a class? 

 

if you had a program which when you clicked a button it did something... but let say that the program has quite a few different areas.

Let say that the area you are in is about a Tea Cup.

 

Let say that when you clicked a button something happened.... but the action was related to the Tea cup and not anything else.

where in your code would you put this code that was directly related to the Tea cup.

 

Well you would associate it would the Tea cup.... make sense?

 

So your tea cup is able to do something like an action.... like say pour. 

 

So I want my tea Cup to be able to pour and I want to organize it in such a way that when i want to pour i know its pouring from my tea cup and not from my water bottle. follow?

 

So you would have the class code above and now you would change it to have a method/action/Ability.

 

the code would now look like this:

 

public class TeaCup 

{

       public viod Pour()  

       {

 

       }

}

 

I realize that this doesn't do anything yet 

I can keep explaining but there would be no point if you are no following up to this point...

 

Forget about the "viod" and "public" above in the changed code for now... this will make sense later....

but just I want to know if this is too basic or if you would like me to continue or if you don't follow there is no point in my going on.

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.