LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2010, 11:23 AM   #16
Jadebrain
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by AwesomeMachine View Post
You can't learn oo techniques from a book. You must learn very basic things first. It's like trying to learn to play a guitar by reading a book. If you don't understand programming itself, learning a programming language won't be much help.
So, how should I learn a programming language? I wanted to learn a language soon before I began college, because in High School most of the other students in my Computer Repair classes had already learned how to program and even hack. I don't want to be behind the rest of the students in my classes in college.
 
Old 11-15-2010, 01:46 AM   #17
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 177
Blog Entries: 171

Rep: Reputation: 21
Quote:
I don't see how! That is a three year old discussion where the right question is asked, but then seems to be discussed only by people who don't know the answer, then some minor (probably obsolete) info about eclipse is tacked on the end.
You are probably right, but you have to start somewhere. Please do not kill the messenger. the person who asked the original question should of taken the time to do some research. (no offence)

If you have a well written book, you should be able to learn most things. it is like the difference between good and bad support via the phone. I will agree that if you do not get the basics whether it is from a book or where ever, programming will be a challenge no matter what. Building a program is a lot like being an architect. You have to have a model to work from and know the parts it takes to make not only the model but the real thing. That being said, I have seen some elegant code that was not worth a crap. Whether you use oops or not, your still going have to use logic and common sense.

For c++ this might be a start.
http://greenteapress.com/thinkcpp/

Python is sort of becoming the pascal of not so long ago.
http://www.greenteapress.com/thinkpython/

Last edited by peonuser; 11-15-2010 at 02:15 AM.
 
Old 11-15-2010, 08:42 AM   #18
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,506

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by Jadebrain View Post
Thank you for your help. As of yet, I haven't written any programs (as previously, I thought that opening the assembler would bring up a window that I could type the program into), but I have confidence in the instructions given. Once again, thank you.
No, most Linux development tools don't work that way. Linux has a much more compartmentalized approach to just about everything. As other posters state, NASM is a command-line program. It is NOT an IDE (Integrated Development Environment) like Microsoft's Visual Basic or C# environments. E. g. NASM does not provide any facilities to edit the files you want it to assemble.

What this means is that you'll need to use your own editor (I use EMACS) to write your assembler program's text. Then you'll save the file, and then you'll need to go into a terminal (like Konsole or XTerm) and type a command to "launch" (Windowism) NASM "on" the assembler file you've just written. It will then compile the file and spit out an executable, which you'll also need to run from the terminal.

Note that this might seem stupid or laborious if you have a deep love / familiarity with Windows and Windows IDE's but that can be illusory. With the "Linux like" approach, you can mix and match tools and compilers much more easily - e. g. when writing C++ programs on a Linux system, you do this too - use your own editor, and compile via makefiles. Effectively Linux can do exactly what a Windows IDE does - you just need the right separate programs correctly setup and a few shell scripts (and maybe some help from "autotools") and it can appear to do what C# or VB does, for example. Only in fact it is several different programs and scripts, not one big monolithic entity that does everything.
 
Old 11-15-2010, 08:47 AM   #19
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,506

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by Jadebrain View Post
So, how should I learn a programming language? I wanted to learn a language soon before I began college, because in High School most of the other students in my Computer Repair classes had already learned how to program and even hack. I don't want to be behind the rest of the students in my classes in college.
Your approach is correct, methinks. For example, I learned to program (well, the little that I can! from a book called "Beginning with C" by Ron House (ISBN 0170088219). He had no references to what operating system you were using, teaching just the basic concepts and some design principles. So I worked through those, and then figured out by using the net and posts here and on other Linux sites, on how to do compile C programs on Linux.

So don't be put off by the practicalities, much of learning how to program is to understand the concepts. Once you've got a single concept down, try and write a tiny program that tests or illustrates that concept. If you find you need practical help on how to write and save a program in Linux, ask just that question in a new thread - you should speedily get good answers.

Last edited by rylan76; 11-23-2010 at 01:43 AM.
 
Old 11-15-2010, 09:27 AM   #20
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
I think the fact that he WANTS to learn Asm in this day and age should be lauded. There are thousands of C++ programmers out there, and only a handful of good asm ones, so OP - welcome to a new world!
 
Old 11-15-2010, 11:46 AM   #21
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,506

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by resetreset View Post
I think the fact that he WANTS to learn Asm in this day and age should be lauded. There are thousands of C++ programmers out there, and only a handful of good asm ones, so OP - welcome to a new world!
I agree! I got my start in TASM on Dos 3.3 - and I often miss the good old days of straight assembly language programming...

Sentiment aside, where is straight assembler still used today? With even the most tiny embedded systems all with absurd amounts of memory vs. the past, where would one still use assembler? Mostly for device drivers?
 
Old 11-15-2010, 07:50 PM   #22
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
I believe some sections of the kernel are written in assembly... I started with TASM too
 
Old 11-15-2010, 08:05 PM   #23
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Me, too. A mixture of Borland TASM some places; Microsoft MASM in others.

STRONG CAVEAT:
* Most of the "best" sites out there for assembly tutorials still use 16-bit opcodes and MASM syntax.

* Unfortunately, that's NOT necessarily a "good thing" for contemporary OS's (such as - but certainly not limited to - Linux).

* I would instead recommend learning true 32- and 64-bit assemblers. In ATT "as" syntax (which is portable to ALL architectures), vs. the "bass-ackwards "MASM" syntax (used by Intel, and Intel only).

IMHO...

Book recommendation:
Professional Assembly Language Programming, Richard Blum
 
Old 11-16-2010, 11:29 AM   #24
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 177
Blog Entries: 171

Rep: Reputation: 21
My first asm was on an IBM big box at school. Later I was into assembly for the Commodore computers (65xx). In fact, I was luck enough to take a class in person from the late great Jim Butterfield. Find a mentor, it's worth it.

This might be worth checking out. There also some pdf's of books on the web for linux assembly. Not sure whether they are legal or not.

http://books.google.com/books?id=pbB...page&q&f=false

Last edited by peonuser; 11-16-2010 at 11:33 AM.
 
Old 11-16-2010, 01:58 PM   #25
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
I learned asm (for a few different architectures) before I learned C and long before C++ even existed. That doesn't mean I recommend learning asm before C and C++.

Knowing asm made C and C++ easier for me to learn. But probably knowing C or C++ would have made asm easier to learn.

I learned Basic first. Knowing Basic made the next languages easier to learn (I had significant overlap there, so I can't accurately say which languages I learned second or third etc., but C wasn't want of those next few and asm was). Even though knowing Basic first made other languages easier for me to learn, I absolutely would not recommend learning Basic first (or for that matter, learning Basic at all).

Of the languages that are worth learning now, C++ is a good choice to learn first, and asm isn't.
I think Java might be a slightly better choice for a language to learn first. But C++ is a better language overall, so unless you really need the help provided by an easier first language, I wouldn't suggest Java as a stepping stone to C++ (and if asm is a destination, C++ is a better stepping stone than Java).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux->Nasm->Flush ports yousafsajjad Programming 2 07-10-2010 12:21 AM
samba and windows: can not open user share dainsane1 Linux - Networking 4 11-13-2009 04:32 PM
how to open X windows after su'ing to another user? BrianK Linux - General 7 11-18-2008 01:42 AM
Installing nasm for linux enduser000 Programming 9 07-30-2008 02:43 PM
Windows user thinks open source is crap tribalmasters General 33 09-16-2005 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration