Author Topic: Coding and Scripting  (Read 12579 times)

Online Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Coding and Scripting
« Reply #45 on: November 25, 2009, 04:46:25 PM »
I agree but with one exception - if a bit of code is used to illustrate an example to explain something or to ask a question. Having to write a compilable code for each time you want to ask a question or give an example of something might be a bit much.

Of course, I'll yield on this, if the consensus is that it is not to be done.


Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: Coding and Scripting
« Reply #46 on: November 25, 2009, 04:56:35 PM »
No worries Neal, this is just brain storming.  So get down to it man!  I'm waiting!   ;) :) :D ;D :P
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Online Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Coding and Scripting
« Reply #47 on: November 25, 2009, 05:16:47 PM »
No worries Neal, this is just brain storming.  So get down to it man!  I'm waiting!   ;) :) :D ;D :P

Okay. Here is another symbol used -- //. It preceeds a comment. Bet you knew that already. ;D ::) :P

« Last Edit: November 25, 2009, 05:19:07 PM by Neal »

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Coding and Scripting
« Reply #48 on: November 25, 2009, 05:36:50 PM »
No worries Neal, this is just brain storming.  So get down to it man!  I'm waiting!   ;) :) :D ;D :P

Okay. Here is another symbol used -- //. It preceeds a comment. Bet you knew that already. ;D ::) :P


It is necessary to decide if we are using C or C++, before we get into the symbols and semantics, as there are two many differences in languages to cover more one at a time. I've skimmed the other comments and I am thrilled at all of the people following this thread!

Galen

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11595
  • ----IOFLU----
Re: Coding and Scripting
« Reply #49 on: November 25, 2009, 05:46:17 PM »
I agree but with one exception - if a bit of code is used to illustrate an example to explain something or to ask a question. Having to write a compilable code for each time you want to ask a question or give an example of something might be a bit much.

Of course, I'll yield on this, if the consensus is that it is not to be done.


If one starts with small compilable apps, and moves on to bigger apps, by the time an example such as described is asked for, there should be something already available that it could be plugged into, then compiled, to see what difference it made from the original.

Back when, I found lots of sites that had code snippets, with explanations as to their function, so they could be patched into existing code, to modify its output, or add a function that didn't exist before. I would assume there are still sites around that continue to do this.

I think most people here would understand when something was compilable on it's own, or used as a patch within existing code, to modify it in some way. Learning to patch code is part of the learning experience. Even if the majority of those interested never reached the point of coding a major app from scratch, it would be great if they got to the point where they could read a block of code like a text written paragraph. With that ability alone, they could grab chunks of code from one open source application and patch it into another app to add a new desired feature, without having to write the app from scratch. Maybe someone would check out an older unmaintained application and upgrade it to again be usable, or finish an abandoned project that never got quite finished. There's great potential in open source that way.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Online Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Coding and Scripting
« Reply #50 on: November 25, 2009, 08:27:51 PM »
Galen,
All that I have posted thus far is from C++.

O-P,
I believe I'm beginning to understand what you mean. thank you.


Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Coding and Scripting
« Reply #51 on: November 25, 2009, 09:18:45 PM »
Galen,
All that I have posted thus far is from C++.

I thought so, I just wanted to be clear on what we are doing. I have family for Thanksgiving, but when there is time, I will try to make a couple of contributions.

Galen

Online Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Coding and Scripting
« Reply #52 on: November 25, 2009, 09:36:28 PM »
I found this page with links to quite a view online tutorials for C++. There may be something there we can use. Also, using the previous and next links on the page takes you to more info on C++.


duxbookstore

  • Guest
Re: Coding and Scripting
« Reply #53 on: November 27, 2009, 08:03:48 AM »
Please name some of your ideas :)

I'm interested in helping

Ok first would be a collection manager like GC  Star manager but that works. (Can be found in synaptic)

Or a Simple Point of Sale program for linux. (There are not many free open source.)

Those are just the first two that come to mind before my coffee this morning. I do have many more.

I do have one app that I would like to have developed that would be commercial. too.

OF course a simple game might be fun as a learning project.

I can elaborate on these ideas further and I will post more ideas later right now I am deprived of caffiene and need to go get some!

Bernie

duxbookstore

  • Guest
Re: Coding and Scripting
« Reply #54 on: November 27, 2009, 08:11:43 AM »
As no one responded to my last request for sharing knowledge, I ask this:

Is the question I asked something that you consider to be too basic? Is understanding those symbols "required" before going on to other things and must be learned on one's own? Or is it too advanced and needs to be learned "as you go?"


When starting a project like this, assume total ignorance on the learners part, and start with "Hello World". With each lesson, give details as to the meaning of each character used, then the working example. Those with more experience will jump in once the lessons progress to where they exhibit a level in excess of their current
knowledge, or to answer questions, if some detail was not made clear in the lesson proper.

The trouble with most tutorials is that they either assume more knowledge than is actually present from the start, or they start with "Hello World" and a few rather meaningless examples, then jump to a level that leaves a big gap in the students knowledge, and pick up where the former group of tutorials start. This gets very discouraging for those newer students, as they don't get the middle level transitional knowledge; they're just suddenly in over their head. I've seen many tutorials I would equate to teaching first, second, and third grade, then jumping directly to middle or high school level, with only a paragraph in between.

How many tutorials start with, "We assume the student is already familiar with programming in another language"? If all tutorials were written this way, nobody would learn anything. To be successful as a true teaching method, one must assume this to be the first programming language the student has ever seen, and progress in a logical fashion from there. This may be a fact, but even if it's not, it's still good to offer all the needed steps as a refresher, to those who have been away from the language for a while, and keep everyone on the same page.


Yeah what he said!!! WELL PUT!

Bernie

duxbookstore

  • Guest
Re: Coding and Scripting
« Reply #55 on: November 27, 2009, 08:19:18 AM »
ok I forgot who but someone said to figure out what language we are actually using. I agree C or C++

Then let us all agree on one compiler to run so that the instructions to compile are the same

I have many time tried to learn to do something and they use a commercial compiler that I cannot afford and I will have an open source one that does not work the same. So let us choose to be on the same compiler as well.


Bernie


Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Coding and Scripting
« Reply #56 on: November 27, 2009, 10:36:39 AM »
g++ should be the compiler. When we get to that point, I would like to learn to use autoconf, automake to set up whatever we create for distribution. But this is getting way ahead.

I think we should assign a reading of a specific introductory tutorial and then discuss it, ask for clarification, etc. I suggest we start with a tutorial that does not assume knowledge of C, when teaching C++. I also prefer an online tutorial instead of a pdf, for easier reading and navigation. We've had several suggestions for tutorials. Next, we need to pick one and work through it together.

Galen

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2253
Re: Coding and Scripting
« Reply #57 on: November 27, 2009, 03:21:14 PM »
I'm late to the discussion, but I only just now found where Neal wanted me to copy one of my posts over here, so, here it is...


Quote
Quote from: (another poster) on November 22, 2009, 02:41:48 AM
TheChief
For years I have been sniffing around C or C++ don't even know the difference between those.


NOTE:  This is greatly simplified - as ususal, there is more to it.  But it should be good enough, for now.

C++ is, basically, C with "objects."  An object is a collection of data and the procedures to manipulate that data.  Plain old C had data collections (called structures), but no way to create code to manipulate them that would be contained in, and local to, the data structure.  C++ cured that.

Quote
When I then saw void in the program I decided I ain't going into the void, that is for black stars.


"void", in this context just means "of indeterminate type," and existed in plain old C, too.  Normally a variable is of some specific type (integer, character, etc.), and you could create pointers to them to allow indirect manipulation.  But sometimes you didn't know ahead of time what the pointer should point to, so you created a pointer to "void" (an indeterminate type).  It became more commonly used in C++.

Quote
What about just starting with a little description or sort of step by step getting started with C or C++ requirements?


Rather than go off on what might be a confusing ramble, I'll point you to some decent online tutorials, and standby to answer questions - OK?

C Programming: http://www.freeprogrammingresources.com/ctutor.html
This one even has a special section for GNU C

C++ Programming: http://www.cplusplus.com/doc/tutorial/
And some more: http://www.freeprogrammingresources.com/freetutr.html

If you have PCLOS installed, you have everything you need to start programming in C (gcc), and the C++ compiler (gcc-c++) is in the repo, any text editor and a make utility.  Also in the repo is kdevelop, an "Integrated Development Environment for C++/C"

Scout around the freeprogrammingresources site, and you'll find some example code ot play with.

Quote
Will C even run under Linux?


Well, the actual C (the source code) never runs - the output of the C compiler runs (and gcc is a Linux C compiler, which is installed by default).  A compiler converts the source language into machine language (the actual microprocessor instructions), so all you need is a compiler for your OS and away you go.


How's that. Neal?

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Online Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Coding and Scripting
« Reply #58 on: November 27, 2009, 03:25:21 PM »
Thanks for joining us, Chief, and for posting that here. Your input is appreciated.


NinerSevenTango

  • Guest
Re: Coding and Scripting
« Reply #59 on: November 29, 2009, 03:20:32 PM »
OK, you've got to crawl before you can walk.

I installed QT Creator from the repo -- and it came in without the examples and without the help files.  COMPLETE dead end.

Searching the forum here only comes up with three hits, and one of them is this thread. 

I really wanted to learn to use this tool.

Looks like it's going to be an uphill climb.