Where to start on beginner programming?
-
- Posts: 13
- Joined: Thu 10 Jun 2010, 03:39
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
Joey
Joey
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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
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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Using Bash code inside of this sort of template
is no harder than HTML
http://www.murga-linux.com/puppy/viewto ... 514#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 . . .
is no harder than HTML
http://www.murga-linux.com/puppy/viewto ... 514#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 . . .
- ttuuxxx
- Posts: 11171
- Joined: Sat 05 May 2007, 10:00
- Location: Ontario Canada,Sydney Australia
- Contact:
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
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
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.
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.
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
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
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.
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.
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
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
vovchik,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.
You should be sure to take Invisible_Hobo737 under your wing and teach your elegant coding disciplines
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
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Truth.Doing anything with a GUI in C is brain damaging.
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. For kicks and giggles, type the following into a terminal and press enter (it won't hurt anything):
Code: Select all
\(-
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.
[size=75]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[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Dear seaside,
Barry K. has included Bacon in Quirky (devx), which is great, and a pet exists here: http://distro.ibiblio.org/pub/linux/dis ... es-quirky/. As for the Bash version, Bacon works perfectly with with:
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
Barry K. has included Bacon in Quirky (devx), which is great, and a pet exists here: http://distro.ibiblio.org/pub/linux/dis ... es-quirky/. As for the Bash version, Bacon works perfectly with with:
Code: Select all
root$ [~]-> bash --version
bash --version
GNU bash, version 3.2.29(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
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
Dear Gerry,
I posted last November to the link quoted by Jemimah above, but, since it's not long, here it is again:
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
I posted last November to the link quoted by Jemimah above, but, since it's not long, here it is again:
Code: Select all
' *****************************************************
' 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
' *********************
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
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
Pizzasgood wrote: For kicks and giggles, type the following into a terminal and press enter (it won't hurt anything):Code: Select all
\(-
vovchik
for me the fist language I leaned was basic
I used to think in basic if you know what I mean
then I had to learn Assembly language for electronics
even though I can code in it its not fun to say the least
that will scare away anyone from writing code
basic on the other hand was the simple way to get something working very fast
in linux bash is the base language knowing how to use it saves you
time and time again
I like Xdialog it is unforgiving for errors but it will follow the gtk theme
you can even push it hard and have it do dynamic menus
with some will to make it work I find it very easy
I have many things I used it for
even a rewrite of slackwares package tools with it ....that was insane
but works beautifully
if you want to check the code
http://www.murga-linux.com/puppy/viewto ... 2&start=26
I have been wanting to do something in bacon since you posted
so let me upgrade bash a bit (I'll have to test this a lot before adding it to the next iso )
the compile was clean
just remember bash on puppy is in /bin
when its compiled and packaged its in /usr/bin
so dont forget to put it in just /bin so there isnt two versions installed
Joe
for me the fist language I leaned was basic
I used to think in basic if you know what I mean
then I had to learn Assembly language for electronics
even though I can code in it its not fun to say the least
that will scare away anyone from writing code
basic on the other hand was the simple way to get something working very fast
in linux bash is the base language knowing how to use it saves you
time and time again
I like Xdialog it is unforgiving for errors but it will follow the gtk theme
you can even push it hard and have it do dynamic menus
with some will to make it work I find it very easy
I have many things I used it for
even a rewrite of slackwares package tools with it ....that was insane
but works beautifully
if you want to check the code
http://www.murga-linux.com/puppy/viewto ... 2&start=26
I have been wanting to do something in bacon since you posted
so let me upgrade bash a bit (I'll have to test this a lot before adding it to the next iso )
the compile was clean
Code: Select all
# bash --version
GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
when its compiled and packaged its in /usr/bin
so dont forget to put it in just /bin so there isnt two versions installed
Joe
Thanks vovchik,vovchik wrote:Dear seaside,
Barry K. has included Bacon in Quirky (devx), which is great, and a pet exists here: http://distro.ibiblio.org/pub/linux/dis ... es-quirky/. As for the Bash version, Bacon works perfectly with with:
Downloaded and tried the Quirky Bacon pet on Puppy431. Bacon complained about missing libs and wouldn't work. Barry mentioned that he compiled Quirky Bacon (ooh, that sounds like it might be spoiled ) by temporarily installing Bash4.
Since Bash4 was also at that site, I downloaded and installed it. Then compiled the Bacon.bac program using Bash4 under Puppy431 and the resulting Bacon exec seems to work.
I packaged the latest Bacon build 14 with the latest documentation, examples, and HUG files into a pet below, in case any other Puppy users running standard puppy bash3 would like to try it out.
Cheers,
s
One thing that you do need in order to start programming is a problem to solve- ie a function that you need, and for which nobody else's solution will be adequate. My first BASH script was a version of Pnethood that ran automaticly at boot, and connected my printer which is attached to a windows computer, without any manual intervention from me. Find a problem to solve, then choose the best tool.
I started programming over forty years ago, with original Dartmouth Basic, and Fortran IV. Got into a position where all I needed was a spreadsheet and PertMaster (or similar) so no more after that.
I think interpreted languages are better for beginners- write it, run it, correct it, run it...... seems more direct and intuitive than compiling.
gerry
I started programming over forty years ago, with original Dartmouth Basic, and Fortran IV. Got into a position where all I needed was a spreadsheet and PertMaster (or similar) so no more after that.
I think interpreted languages are better for beginners- write it, run it, correct it, run it...... seems more direct and intuitive than compiling.
gerry
-
- Posts: 13
- Joined: Thu 10 Jun 2010, 03:39