DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
Old 19th August 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

I think Carpetsmoker probably has a good point with his physics book analogy. In the end though it probably depends on the person; some people would find coding below asm more fun then winning the lotto, others wouldn't give a fart, and some would probably quit after hitting arrays (assuming a language that supports them). A thread awhile back that involved peoples kids having a good introduction to computers/etc and finding it to much trouble to do anything fun in writing code and giving up on it, comes to the fore front of my mind.


With the amount of info the OP has given, I don't really think anyone here can do more then give free advice. For something more serious, I'd recommend: Teach Yourself Programming in Ten Years by Peter Norvig.


I suppose, that poses the question, does the OP want to learn programming or just learn a programming language? They are as different (in my humble opinion) as building a chair is from using a hammer.


Something simple allows one to do both learn to program and learn how to do something useful (with a smaller headache). And the hardest part of initial learning in one language, carries on into making learning other languages much more simple. At least, assuming you're not into enough advanced math or pure genius-like that such baby-steps are trivial.


I am young enough to remember the very learning curve that the very basic can have, on people that have no background in it.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 20th August 2008
Crypt Crypt is offline
Port Guard
 
Join Date: Aug 2008
Location: Whitby, Ontario
Posts: 36
Default

What other info could I provide? I had started to learn BASIC back in the 80's and well I haven't needed to learn a programming language. I want to learn one for soemthing to do. I have NO REAL PURPOSE for it, just gives me something else to learn. Oh and I don't expect to be able to learn one over night, and well I have been playing with the idea of learning a programming language for about 10 years now. Just figured I should get off my ass and do it. Just figured I'd ask and see which one would be a good one to start with. I have no desire to be a programmer...I like my job just the way it is

Last edited by Crypt; 20th August 2008 at 12:07 AM.
Reply With Quote
Old 20th August 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

In my experience, people without a problem to be solved, give up learning programming very fast

Why don't you start learning sh shell programming?
You run a BSD OS and knowing sh will enable you to write some scripts to help you in administering your own OS.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 20th August 2008
drhowarddrfine drhowarddrfine is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 377
Default

Quote:
Originally Posted by TerryP View Post
I suppose, that poses the question, does the OP want to learn programming or just learn a programming language?
Yes. That's what I was trying to say but couldn't think of the right way to say it.
Reply With Quote
Old 20th August 2008
chill's Avatar
chill chill is offline
Fdisk Soldier
 
Join Date: Jun 2008
Location: Federal Republic of the US
Posts: 74
Default

Quote:
Originally Posted by J65nko View Post
In my experience, people without a problem to be solved, give up learning programming very fast
Isnt that the truth.

Anyways there is no harm in learning to be able to read and understand another language. ANSI C is nice. If you know the basics and fundamentals of computer programming, arguably the best book on learning C is K&R's C Programming Language.
http://www.amazon.com/Programming-La...9200032&sr=8-1

If you know absolutely nothing about programming, take a look at Perry's Absoulte Beginner's Guide to C and then read K&R's.
http://www.amazon.com/Absolute-Begin...9200198&sr=8-1

I just started learning fairly recently myself so I'm much less knowledgeable than most others in this forum so take anything I say with a grain of salt ;-)
Reply With Quote
Old 20th August 2008
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 507
Default

I generally agree that if you use *nix, you eventually should learn C. And K&R is still a lucid book that teaches the fundamentals well. You can progress to C++ if you want, but you can go a long way on C alone.

I also would not overlook the suggestion for learning shell scripting. This is used a great deal; some respected people on this board cannot program but are accomplished in writing shell scripts. For sysadmin sorts of things (including deciphering ports) this is an incredibly useful skill.

So I personally would suggest the latter, but have a great deal of sympathy for the former. Indeed, if you know C, you can pick up scripting and AWK (for example) very quickly. All of the traditional Unix tools use C-like syntax.

It does help to have a project in mind. A lot.
Reply With Quote
Old 20th August 2008
Sunnz's Avatar
Sunnz Sunnz is offline
Real Name: I don't have real time
Just a computer user...
 
Join Date: May 2008
Location: See Google Maps
Posts: 101
Default

Quote:
Originally Posted by J65nko View Post
Why don't you start learning sh shell programming?
You run a BSD OS and knowing sh will enable you to write some scripts to help you in administering your own OS.
+1

I use Advanced Bash-Scripting Guide:

http://tldp.org/LDP/abs/html/

Many people may hate bash here... I found most of the stuff works in ksh though... but yeh I think it is very useful and the results are immediate.
__________________
She sells C shells by the seashore.
Reply With Quote
Old 21st August 2008
Meta_Ridley Meta_Ridley is offline
OFM Addict
 
Join Date: May 2008
Posts: 21
Default

I don't think people around here hate bash as much as they hate it when ignorant Linux users, especially those who create software meant to be used on other Unix and Unix-like OSs, assume that the user will have bash installed and it will be in /bin/bash. That's what I hate, anyway.
Reply With Quote
Old 21st August 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 445
Default

Quote:
Originally Posted by Meta_Ridley
... ignorant Linux users, especially those who create software meant to be used on other Unix and Unix-like OSs, assume that the user will have bash installed and it will be in /bin/bash.
I'll admit to having made that mistake repeatedly myself years ago. My first intro to the unix-like world was Linux; it makes sense that one would initially believe that other unixes follow suit with their shell choices. Once I started playing around with Free/NetBSD and HP-UX I realized that semi-portable scripts would have to be written in sh.

As lvlamb has pointed out in a few different threads, /bin/sh is a symlink to /bin/bash on Linux boxes, and bash(1) says:
Quote:
If bash is invoked with the name sh, it tries to mimic the startup
behavior of historical versions of sh as closely as possible, while
conforming to the POSIX standard as well.
"Ignorant" probably is the correct word in this context. Given the proper information, most people will attempt to do the right thing. Now that I know what I know, I generally write shell scripts - even on Linux boxes - to use sh.
__________________
Kill your t.v.
Reply With Quote
Old 3rd October 2008
mdh's Avatar
mdh mdh is offline
Real Name: Matt D. Harris
FreeBSD 2.2.6 User
 
Join Date: Oct 2008
Location: West Virginia
Posts: 139
Thumbs up

Quote:
Originally Posted by J65nko View Post
In my experience, people without a problem to be solved, give up learning programming very fast

Why don't you start learning sh shell programming?
You run a BSD OS and knowing sh will enable you to write some scripts to help you in administering your own OS.

Agreed. The same is true of Perl, however, and Perl is more likely to teach you more of the basics of actual programming (having extensive libraries available at the tip of your fingers by CPAN, etc is nice as well.) In reality, learning Perl isn't all that difficult.

My personal approach to learning a language is to begin breaking other peoples' working code and then fixing it, then eventually changing it to make it friendlier to my own way of doing things. I've found that this is often a good starting point, for me at least, once I've read one or two chapters in a book to understand the basic syntax and grammar.
Reply With Quote
Old 3rd October 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Having a specification of the grammar available (Scheme for example) can also be helpful.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 3rd October 2008
maxrussell maxrussell is offline
Package Pilot
 
Join Date: May 2008
Location: Montrose, Angus
Posts: 181
Default

ruby is very expressive and, to my mind, natural (as in language like). It is also powerful and you see results quick. When you are starting out, that is a good thing as you can concentrate on the algorithm rather than worrying about (sometimes complicated) syntax.
Reply With Quote
Old 27th October 2008
Crypt Crypt is offline
Port Guard
 
Join Date: Aug 2008
Location: Whitby, Ontario
Posts: 36
Default

Well it appears that my ideas of learning a programing language will have to be put on hold as the company I work for wants me to learn web design so that they don't have to pay for a real designer to run our website. The worst part is that they won't pay for me to go to school...hopefully, they will cover the costs of any programs i need to purchase...
Reply With Quote
Old 27th October 2008
Sunnz's Avatar
Sunnz Sunnz is offline
Real Name: I don't have real time
Just a computer user...
 
Join Date: May 2008
Location: See Google Maps
Posts: 101
Default

Quote:
Originally Posted by Crypt View Post
Well it appears that my ideas of learning a programing language will have to be put on hold as the company I work for wants me to learn web design so that they don't have to pay for a real designer to run our website. The worst part is that they won't pay for me to go to school...hopefully, they will cover the costs of any programs i need to purchase...
http://codeclimber.blogspot.com/2008...rogrammer.html
__________________
She sells C shells by the seashore.
Reply With Quote
Old 27th October 2008
bsddaemon bsddaemon is offline
Slack Daemon
 
Join Date: Oct 2008
Posts: 35
Default

It was very good read, thank you
__________________
...then the God created man...
Reply With Quote
Old 27th October 2008
Crypt Crypt is offline
Port Guard
 
Join Date: Aug 2008
Location: Whitby, Ontario
Posts: 36
Default

I enjoyed the link man...you have no idea how close to home that hit working here
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undertaking computer science degree, which BSD for learning professional assembly? lionsong Programming 15 18th October 2009 11:26 PM
Learning how to program Solaris_Delta Programming 9 24th December 2008 07:58 PM
Learning Content Management System Oko General software and network 0 31st October 2008 04:02 AM
Learning Perl mtx Book reviews 7 22nd October 2008 05:55 PM
GUI Programming bsdnewbie999 Programming 6 17th August 2008 12:19 AM


All times are GMT. The time now is 05:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick