Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Sep 2014, 17:55
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Where to start on beginner programming?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Author Message
Invisible_Hobo737

Joined: 09 Jun 2010
Posts: 13

PostPosted: Thu 10 Jun 2010, 20:39    Post subject:  Where to start on beginner programming?  

I've recently taken a shine to programming and languages. I can code HTML pretty much in my sleep but I'm a little behind as far as programming and most computer technical jargon goes. I'm pretty much a blank slate so if someone could tell me what to start out on as basics I'd be very grateful

Smile

Joey
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: Fri 11 Jun 2010, 00:02    Post subject:  

Take a look at gtkdialog. It is very similar to html and used throughout Puppy and in other small distros.

http://www.murga-linux.com/puppy/viewtopic.php?t=38608

after that - genie is pretty easy to learn followed by vala

http://www.murga-linux.com/puppy/viewtopic.php?t=39560

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Fri 11 Jun 2010, 00:07    Post subject:  

Using Bash code inside of this sort of template
is no harder than HTML Smile
http://www.murga-linux.com/puppy/viewtopic.php?p=363514#363514

copy the code into an editor
make it runnable *right click in rox' or start a script from there
use 'chat' icon to get instant programming help
(often available)

You can also start a script from rox by right clicking 'New'
and copy the text

./myscript to run from terminal

use javascript from within HTML
and use the Python like Puppy language
Genie
http://puppylinux.org/wikka/ValaGenieintro

Two scripting languages
One for Linux
one for the Cloud
and one compiling for Puppy
that should get you started

Technosaurus is saying much the same
and got there first . . . Smile

Smile

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10750
Location: Ontario Canada,Sydney Australia

PostPosted: Fri 11 Jun 2010, 05:17    Post subject:  

I would say learn "C" language, vala takes extra libs, gtkdialog takes extra memory/resources, plus puppy has way too many gtkdialog developers,a "C" developer would be so handy to have plus its way better on the resources.
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 11 Jun 2010, 11:08    Post subject:  

I'd really hesitate to recommend gtkdialog to a new programmer. The documentation sucks (except zigert's thread), and half the features are too buggy to use or not implemented. The theory is perfect, but development on Gtkdialog stopped well before it was a finished product.

Doing anything with a GUI in C is brain damaging.

I've been meaning to check out BaCon:http://www.murga-linux.com/puppy/viewtopic.php?t=48901

I think Vala would be a good choice if their documentation has improved. Probably not...

Personally the way I learn, is find a project that has almost, but not quite, the features I want, then fix the code. This gives you exposure to a broad amount of languages and it is less daunting that starting from scratch.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5719
Location: Valåmoen, Norway

PostPosted: Fri 11 Jun 2010, 12:33    Post subject:  

It always depends on what the goal is. If you want to make some quick guis that not involve complex rendering (like image/video editing), gtkdialog could be super. But for making larger/faster programs with complexity, gtkdialog is definitive NOT the way. You will find some examples of gtkdialog scripts via my signature. Pmusic is my personal project to investigate how far it is possible to push gtkdialog. - For now. it has obvious weaknesses, but we learn ....... and what we learn, I try to collect in my 'Tips and Tricks' thread.

Because of its limitations, I would not recommend gtkdialog. But on the other hand, programming might get boring before you actually got something running. In this matter, gtkdialog is invincible..... It is really fast building a gui with gtkdialog.


Good luck
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Fri 11 Jun 2010, 12:35    Post subject:  

Have a look at

http://99-bottles-of-beer.net/

gerry
Back to top
View user's profile Send private message 
2lss

Joined: 20 Sep 2009
Posts: 225

PostPosted: Fri 11 Jun 2010, 15:01    Post subject:  

I started programming tibasic on my ti-83 graphing then moved to programming pbasic on stamp2 micro controller for a robotic competition. Basic is a simple language and easy to understand but I learned some bad habits along the way that made learning other languages harder.

I also did some programming on some allen bradley plc's (mainly the slick 500) using ladder logic. Its not applicable to anything you would use on a computer but it's a easier to understand and is kind of fun.

My advice, just find a program written in bash (puppy is full of them), open it up in a text editor and learn how it works. Take little snippets out, google what you don't understand, and regurgitate it into something else. Basically reverse engineer the program. I found that digging though scripts helped me learn way more than reading guides or how-to's.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Fri 11 Jun 2010, 16:14    Post subject:  

Dear Jemimah and Co.,

Please have a look at http://www.basic-converter.org/. Much has happened on the Bacon front in the past few months. It is a nice, structured language, and Peter, the author, keeps improving it almost daily. Some of my forays in Bacon are also posted there. The nice things is that if you have gcc and the gtk libs, you can compile rather small gui apps quickly. The only thing missing is a gui RAD environment but I have been thinking of co-opting a glade2fb converter (Bacon also knows glade) or writing my own glade2bac parser/conversion utility. That would make designing complicated guis a cinch. And if that works, once could use most of that code to write a glade2gtkdialog utility as well.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Fri 11 Jun 2010, 17:09    Post subject:  

vovchik wrote:
Dear Jemimah and Co.,

Please have a look at http://www.basic-converter.org/. Much has happened on the Bacon front in the past few months. It is a nice, structured language, and Peter, the author, keeps improving it almost daily. Some of my forays in Bacon are also posted there.


vovchik,

You should be sure to take Invisible_Hobo737 under your wing and teach your elegant coding disciplines Very Happy

I took a look at the BaCon site and apparently it needs Bash 4, and all Puppies currently use Bash 3. Do I understand this correctly?

It seems like it could be interesting.

Regards,
s
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Fri 11 Jun 2010, 17:19    Post subject:  

Quote:
Doing anything with a GUI in C is brain damaging.
Truth.

Last fall, after working on a C/GTK project for a good while, I took a break and worked on a Python/GTK project I had in mind. I didn't get very far because things got busy and I had to switch gears. But from what I saw of doing GTK in Python, it was like going from eating crackers in the desert while being eaten alive by flies to having grapes and watermelon in the shade next to a nice cool fountain and being attended by <insert-favorite-type-of-attendants-here>.

Not that I have anything against C in general. I prefer C to Python, actually. Probably because I have much more experience with C.



If you're already pretty good with HTML, you might want to consider JavaScript before getting into normal programming. If you have access to a server with PHP, you might want to look at that too. Both languages are pretty nice, and if you're good with HTML you probably have a use for being able to generate dynamic webpages. And this way you could have GUI capability (via HTML) right from the get-go - most of the time when learning to program you start by making mostly commandline programs, and move up to GUI stuff when you have the basics of the language down.

If you'd rather dive into making programs that run normally and can be useful, as others have said Bash/shell scripts are probably the way to go. Tons of examples built right into Puppy, so there are a lot of things you can modify to suit your needs or to use as references. Lots of room for trial and error hands on learning. Do make an off-disk backup of your important stuff though, because experimenting with Bash can do funny (and not so funny) things sometimes. Smile For kicks and giggles, type the following into a terminal and press enter (it won't hurt anything):
Code:
\(-


Don't sweat the language decision too much. It doesn't matter a whole lot. The hard part is just getting started, getting a feel for the basic techniques. Once you learn one language, the second is a good bit easier. And after that learning subsequent languages is just something you do matter of fact.

More important than which language to start with is motivation. Without motivation you won't get very far. That's why it's a really good idea to start with something that already exists and just expand it to add a feature you want/need. And then create simple utilities that could make your life easier/more-fun. If you're doing things that are useful to you, not meaningless exercises, it's a lot more interesting and easier to stay motivated.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Fri 11 Jun 2010, 19:13    Post subject:  

Dear seaside,

Barry K. has included Bacon in Quirky (devx), which is great, and a pet exists here: http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-quirky/. As for the Bash version, Bacon works perfectly with with:
Code:

root$ [~]-> bash --version
bash --version
GNU bash, version 3.2.29(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.


which is available from the Slackware site as a binary. I think I actually compiled it from source, but can't remember. Old Bacon compiled just fine with old Puppy bash, and the latest version and unreleased betas compile fine with the version mentioned above. In any case, it's worth the change, and there are no deleterious side-effects resulting from the upgrade.

And if Invisible_Hobo737 needs any advice, we're all here to help one another out. Pizzasgood's comments are to the point - motivation is key - and there are many roads that lead to Rome (or Ougadougou, for that matter).

With kind regards,
vovchik
Back to top
View user's profile Send private message 
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Sat 12 Jun 2010, 07:27    Post subject:  

Vovchik- I can't see 99 bottles in Bacon. How about a demo?

gerry
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sat 12 Jun 2010, 08:04    Post subject:  

Dear Gerry,

I posted last November to the link quoted by Jemimah above, but, since it's not long, here it is again:
Code:
' *****************************************************
' PROGRAM:   beer.bac
' PURPOSE:   http://99-bottles-of-beer.net   
' AUTHOR:      vovchik (Puppy Linux forum)   
' DEPENDS:   gcc, bacon, bash
' PLATFORM:   Puppy Linux (actually, any *nix)
' DATE:      15-11-2009
' COMMENTS:   Not elegant - but works
' *****************************************************

' *********************
' INIT VARS
' *********************
beer_bottles = 100
stock$ = "bottles"
what$ = "of beer"
where$ = "on the wall"
action$ = "Take one down and pass it around, "
' *********************
' END INIT VARS
' *********************

' *********************
' MAIN
' *********************
REPEAT
   beer_bottles = beer_bottles - 1
   SELECT beer_bottles
      CASE 0
         stock$ = "No more bottles"
         action$ = "Go to the store and buy some more, "
         stock_depleted$ = CONCAT$(STR$(beer_bottles + 99)," ","bottles")
      CASE 1
         stock$ = CONCAT$(STR$(beer_bottles)," ","bottle")
         stock_depleted$ = "no more bottles"
      CASE 2
         stock$ = CONCAT$(STR$(beer_bottles)," ","bottle")
         stock_depleted$ = CONCAT$(STR$(beer_bottles-1)," ","bottle")
         ' stock_depleted$ = "no more bottles"
      DEFAULT
         stock$ = CONCAT$(STR$(beer_bottles)," ","bottles")
         stock_depleted$ = CONCAT$(STR$(beer_bottles-1)," ","bottles")
   END SELECT
   PRINT
   PRINT stock$," ", what$," ", where$, ", ", LCASE$(stock$), " ", what$, "."
   PRINT action$, stock_depleted$, " ", what$," ", where$,"."
   PRINT
UNTIL beer_bottles EQ 0
END
' *********************
' END MAIN
' *********************



With kind regards,
vovchik

PS. I also tried posting it to the 99-bottles site back then but never got confirmation from them, and it isn't there in their listings. Weird. I assume they must not like associating with pork Laughing
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Sat 12 Jun 2010, 11:39    Post subject:  

I have been experimenting with gtkdialog i don't have any experience with any programming or code untill a few days ago but managed to make this after reading a link on Lobsters website and looking through zigbert gtkdialog thread and installed puppy applications. Cool

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1047s ][ Queries: 12 (0.0077s) ][ GZIP on ]