LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-04-2009, 09:47 PM   #1
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
My first program...


http://pastebin.ca/1593583

I decided to learn programming and started with perl. Some friends and I were talking about the new Dungeons and Dragons online free mmorpg, and some of us wanted to play "paper" DnD. I decided to start writing some Dungeon Master helper scripts, this is the first one. Its actually the first 4 bundled into one blah blah blah.

I've BS'd about learning it (programming) before and I've had to hack programs and or machine code for jobs, but never extensively. Basically I'm a hardware guy and I'm thinking about going back to school which will involve programming whatever path I take. I have an associates degree from (gasp) ITT in EET, but I can place out of all but the last 9 months of the general computer degree.
 
Old 10-04-2009, 09:49 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
learn C
its useful, fast, universal, and common
http://cprogramming.com
take it step by step
 
Old 10-04-2009, 09:54 PM   #3
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
Quote:
Originally Posted by smeezekitty View Post
learn C
its useful, fast, universal, and common
http://cprogramming.com
take it step by step
For sure. The list I have in my head is c++/c, java, perl, python, and one form or another of visual basic. I don't know what the curriculum will be so perhaps more.
 
Old 10-04-2009, 10:13 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
with C/C++ your set
but learning PHP and the basics of HTML can help
 
Old 10-05-2009, 12:08 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
What do you mean by 'hardware guy'? If you're designing hardware from scratch, C (not C++) and assembly are the languages to go for.

I still think that C is the most universal language; it's used in software development from microcontrollers to PCs to supercomputers.

The other thing to consider is platform independency. Most scripting languages are available for multiple platforms so it really is a write once, run on many (if written properly). I've written a number of Tcl/Tk applications that without modifications run on both Windows and Linux (and will probably without modification run on other platforms as well).

As far as I know plain C (and probably C++) is not platform independent as both networking functionality and serial ports require different code.
 
Old 10-05-2009, 06:26 AM   #6
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
Quote:
Originally Posted by linuxpokernut View Post
The list I have in my head is c++/c, java, perl, python, and one form or another of visual basic.
That's quite a list. If I were you, I'd drop it. The "idea" is not to have some very limited knowledge of all those languages, plagued by incorrect info that you think is correct, etc. Pick one of those languages and learn it well. Learn it so well as to theoretically be able to use it for whatever project you might think of. Learn it so well to be able to think in it. Learn it so well to be efficient in it. This alone will take you quite a few years, chose wisely.

Wim Sturkenboom: The C and C++ programming languages have no knowledge of networking, etc.
 
Old 10-05-2009, 06:48 AM   #7
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
Quote:
Originally Posted by carbonfiber View Post
That's quite a list. If I were you, I'd drop it. The "idea" is not to have some very limited knowledge of all those languages, plagued by incorrect info that you think is correct, etc. Pick one of those languages and learn it well. Learn it so well as to theoretically be able to use it for whatever project you might think of. Learn it so well to be able to think in it. Learn it so well to be efficient in it. This alone will take you quite a few years, chose wisely.

Wim Sturkenboom: The C and C++ programming languages have no knowledge of networking, etc.
Unfortunately if you got to college this is simply not an option.
 
Old 10-05-2009, 08:06 AM   #8
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
Quote:
Originally Posted by linuxpokernut View Post
Unfortunately if you got to college this is simply not an option.
Yes it is. But you have to be willing to put in the extra work. It's up to you and the standards you set for yourself.
 
Old 10-05-2009, 08:16 AM   #9
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
Quote:
Originally Posted by carbonfiber View Post
Yes it is. But you have to be willing to put in the extra work. It's up to you and the standards you set for yourself.
What I meant was its not an option to learn only one language.

Yes, I know HTML but not php. I forgot to mention php and my sql.

The last hardware job I didn't get required perl and java. I looked at the curriculum and its not that intense, c++, Java, html, php.

I think the basic ==> intermediate general programming courses will help a lot. I'm going to look into it now.

Thanks for the advice.
 
Old 10-05-2009, 09:48 AM   #10
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
I'm finding it hard to explain what I meant (+ I believe there are other members of LQ who could probably give you better and clearer advice). I'll just leave you with the following thought: if you take on C, C++, Java, Perl, Python, PHP at "roughly" the same time (I know we're talking about a number of years) and you claim to not have much programming experience.. I believe the result will be as such: you will know bits an pieces of each of those languages, be efficient in none, write "the same way" (as much as possible) in all of them - disregarding each's advantages over the others (you'll restrict yourself to the greatest common divisor, etc). Now, imagine this: you are out of college and start looking for work. You try to find a job as a C programmer, who are they going to pick? You, the guy who knows "a bit" of C, and "a bit" of C++, Perl, Python, PHP, etc. - or the guy who knows C well and knows less of the other languages than you do? Ok, so you don't get the job, you've still got your other skills. So you try to land a job as a Python programmer. Who are they going to hire? You, the guy who knows "a bit" of Python, and "a bit" of C, C++, Perl, PHP - or the guy who knows Python well and knows less of the other languages than you do (sorry about the repetition)? Etc.

There are numerous people out there who write sh*t software for a living, every single day *military salute*. It is up to you to decide if you wish to be one of them. I am in college too, and most of my colleagues would be more than happy to live such a life as bad programmers. One sh*tty piece of code after the other, day by day, etc. For what? Money? Women? Respect? Power? Ha.

Last edited by carbonfiber; 10-05-2009 at 09:52 AM.
 
Old 10-05-2009, 11:18 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I think C/C++ is mandatory for almost any programming profession (except maybe web-based, but java has syntax almost identical to C++). Besides, most programming languages I've come across are modeled after C (notable exceptions do exist, such as common lisp).

And yeah, you probably should know at least 1 language well, well enough not to make lots of mistakes. But therein lies the problem, C is designed to let you make mistakes, so it's not going to be easy, and actually I'm not convinced it will be worth it ... you know the great depression mark II ...
 
Old 10-05-2009, 01:14 PM   #12
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
Let me take a moment to articulate now that I have a little time, and thank everyone for the responses; Thanks guys/gals.

Quote:
What do you mean by 'hardware guy'? If you're designing hardware from scratch, C (not C++) and assembly are the languages to go for.
I have a degree in EET. Most of my experience is manufacturing microprocessors for Intel Corporation. In the factory environment, it's obviously all automated. There were operators (mostly robots now), process technicians, and equipment technicians. Automation was a whole separate department. I didn't have to deal with any code at that job, but did at others. I did not have to be proficient, only have my machine up & running.

I was a manufacturing technician (operator) and process technician. The process technicians job is to work with non standard occurrences and determine what caused them, correct them if possible, etc etc... Anyway, to do this you need root access to the UNIX that runs the machines. The process technician job there did not require that you have any programming, however the days of 2000 people working in one fab are gone. I have seen the exact same job online for smaller companies that require the experience I had as a process tech with the additional requirement(s) of perl and java proficiency. Basically you do what the job used to entail plus part of a another position that used to exist. In other words you do not have to be a perl guru for that job, but you have to be able to hack the script that your tool uses (a tool is any machine that is used in the manufacture of microchips).

Quote:
I think C/C++ is mandatory for almost any programming profession...
Java and C++ are on the curriculum for programming. Perl is a separate course for a different degree and unfortunately they don't offer ala carte courses. I would really like the Linux admin class also but thats only for "IT".

Quote:
The other thing to consider is platform independency. Most scripting languages are available for multiple platforms so it really is a write once, run on many (if written properly). I've written a number of Tcl/Tk applications that without modifications run on both Windows and Linux (and will probably without modification run on other platforms as well).
For an employer I will write for what platform they tell me. For myself I prefer perl because I use linux and its just sitting there begging me to use it, and when I make an app to be shared with friends java seems like the good choice. My mac, wintel, and nix playcousins can all play nice together in the sandbox with that.

Quote:
I'm finding it hard to explain what I meant (+ I believe there are other members of LQ who could probably give you better and clearer advice). I'll just leave you with the following thought: if you take on C, C++, Java, Perl, Python, PHP at "roughly" the same time (I know we're talking about a number of years) and you claim to not have much programming experience.. I believe the result will be as such: you will know bits an pieces of each of those languages, be efficient in none, write "the same way" (as much as possible) in all of them - disregarding each's advantages over the others (you'll restrict yourself to the greatest common divisor, etc). Now, imagine this: you are out of college and start looking for work. You try to find a job as a C programmer, who are they going to pick?
I apologize for not explaining more earlier as I didn't have time to make this huge post. I totally agree I shouldn't try to do all of that "at once", but I figure a good place to start is
keep learning perl, once I start classes learn C++ and Java. I won't actually have to get into php and I'm pretty sure I can test out of html. In the end thats not going to be too much and if I only wind up with intermediate skills in perl and Java it wont necessarily land me a job as a full time programmer, but it will certainly enhance my chances of getting a job like the one mentioned above.

It really is amazing to me how much time a simple program can save. I never would have imagined it to be possible to write a program for personal non financial gain. I thought the only reason people did it was when they had a piece of hardware that was either legacy or obscure and the only way to get it to work was to write the code. The amount of time that I saved myself just by writing this code is more than it took to write, let alone if anyone else ever uses it. I would have guessed it would take me a few weeks to get that far.
 
Old 10-05-2009, 01:41 PM   #13
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
It is quite clear that I don't know you and you don't know me. The only obvious interaction between the two of us is here on LQ. Disregarding all of this: I wish you the best of luck (learning, college, etc.).

P.S.: Have fun (programming)!
 
Old 10-05-2009, 02:27 PM   #14
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by carbonfiber View Post
Wim Sturkenboom: The C and C++ programming languages have no knowledge of networking, etc.
Your correct.

What I was trying to say was that the functions/libraries are different and therefore the same code can not always be used on different platforms without modification.
 
Old 10-05-2009, 03:32 PM   #15
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
Quote:
Originally Posted by carbonfiber View Post
It is quite clear that I don't know you and you don't know me. The only obvious interaction between the two of us is here on LQ. Disregarding all of this: I wish you the best of luck (learning, college, etc.).

P.S.: Have fun (programming)!
lol, thats one thing I hate about the internet, its hard to pick up sarcastic or condescending tones, I wasn't being either for the record.

You hit the nail on the head anyway "Have fun (programming)"! is exactly it.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple C++ Program: Program Compiles But Won't Run (Segmentation Fault) violagirl23 Programming 3 01-09-2008 12:09 AM
Total recovery: Which program? ghost4linux, YaST2? Best drive imaging program? lagu2653 Linux - Software 1 06-20-2005 01:44 PM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 09:36 AM
Gtk-Warning but program still works... I close konsole, program closes Laptop2250 Linux - Software 2 11-14-2003 11:18 PM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 08:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration