You are not logged in.

#1 2014-05-21 03:26:50

xxarchangellxx
Member
Registered: 2014-05-21
Posts: 3

Looking to start programming in Linux

I want to start learning how to code and program in Linux. I have gotten so much help from others via google on how to get programs to work and installing programs in linux I would really like to be able to do the same for others. Does anyone know of a good place to start or a website etc that will help me learn to code and make programs for linux?

Offline

#2 2014-05-21 03:36:17

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Looking to start programming in Linux

If you are a new programmer then Python is a good place to start.  Install WingIDE 101 from the AUR for a good beginner's IDE for that.

Think Python is a free book to get started with (PDF or HTML download on that page and you can buy the dead tree if you want)

If you want to do programming that requires fast code above all else then C++ is the standard.  Code::Blocks is a good IDE for that.  Be sure to install "base-devel" and "gdb" to go along with it.

Programming - Principles and Practice Using C++ is a dead tree book for C++, you have to buy it but that is offset by the fact that its author is also the author of the C++ language.


We all make choices, but in the end, our choices make us.

Offline

#3 2014-05-21 03:37:55

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,776

Re: Looking to start programming in Linux

You did not specify a language.

Dive into Python
Beware, that site is for Python 2.  There is a book for version 3, but it is not quite up to snuff.

For C, get a copy of The C Programming Language Brian W. Kernighan and Dennis M. Ritchie

Last edited by ewaller (2014-05-21 03:40:33)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#4 2014-05-21 03:47:14

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Looking to start programming in Linux

There is also Learn Python the Hard Way, and Dive Into Python 3, and A Byte of Python.  Check all those out - they're free.

Python is a good beginning language and remains a good language even when you're an expert.  There is lots to do with it and it can be very productive.  It depends on what you want to program however.  Applications and scripts?  Python sure.  Games?  No, drop to C++.  And no, pygame isn't a realistic way to make games sadly.

Edit: didn't see you pointed to Dive Into Python already ewaller. tongue

Last edited by headkase (2014-05-21 03:55:06)


We all make choices, but in the end, our choices make us.

Offline

#5 2014-05-21 03:50:35

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Looking to start programming in Linux

ewaller wrote:

For C, get a copy of The C Programming Language Brian W. Kernighan and Dennis M. Ritchie

C is "portable assembler." wink  Without OOP features you really have to plan ahead for scaling to larger projects.  No data hiding can bite you in the butt.

The Linux kernel is written in C however, and for good reason: C is what you should be using at a low level like the kernel.  Higher level languages and their structures however allow a programmer to be more productive and have fewer errors to track down in their code.


We all make choices, but in the end, our choices make us.

Offline

#6 2014-05-21 03:58:45

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,776

Re: Looking to start programming in Linux

headkase wrote:

C is "portable assembler." wink  Without OOP features you really have to plan ahead for scaling to larger projects.  No data hiding can bite you in the butt.
.

I agree 100% about it being a universal assembler.  I think it was Ritchie that conceded that himself; but I could be wrong.
If someone wants to jump into OO, I think Python is the way to go.  I would not recommend C++ and its flavor of OO for beginners. 

IMHO learning C in Linux with glibc is a great way to learn about Linux.
C++ with Qt or gtkmm is a great way to learn how to write something with a GUI and OO


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#7 2014-05-21 04:05:44

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,738
Website

Re: Looking to start programming in Linux

I'd also advocate for *not* using an IDE or any other such 'all purpose' tools.  Just get familiar with a text editor.  Then you'll get a good grasp of makefile, how source files can/should be laid out in a directory structure, vcs systems (perhaps), autotools, etc.  Many of these bits are "black box" magic in the IDEs.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#8 2014-05-21 04:18:45

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,579
Website

Re: Looking to start programming in Linux

ewaller wrote:

IMHO learning C in Linux with glibc is a great way to learn about Linux.

Programming with C is a worthwhile effort as C is procedural.  Just like the CPU.  OOP and such are crutches for humans, they represent the code structure in a way humans can grok.  C, procedural, that is the way the CPU works.

Last edited by headkase (2014-05-21 04:19:26)


We all make choices, but in the end, our choices make us.

Offline

#9 2014-05-21 09:50:31

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,033

Re: Looking to start programming in Linux

My advice:

0) like Trilby said, avoid IDEs and start out with a good text editor
1) use Python exclusively for the first 6 months or so, just to familiarize yourself with typical control structures (conditional statements, loops, etc), data structures (lists, dicts, etc) and overall program design
2) start learning and using C to gain a better understanding of memory management and what's going on under the hood
3) at least learn a bit about (and maybe code up some small exercises) languages that use some other programming paradigm: Scheme/Lisp, Haskell/Erlang, Prolog, Smalltalk/Eiffel, and so on.
4) generally remember that different languages are suited to different jobs, however you should become very comfortable with at least a couple languages.  Once you learn one language of a given paradigm, all the others are very easy to learn.

Offline

#10 2014-05-21 10:28:03

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,162
Website

Re: Looking to start programming in Linux

Trilby wrote:

I'd also advocate for *not* using an IDE or any other such 'all purpose' tools.  Just get familiar with a text editor.  Then you'll get a good grasp of makefile, how source files can/should be laid out in a directory structure, vcs systems (perhaps), autotools, etc.  Many of these bits are "black box" magic in the IDEs.

I concur. I used an IDE for Java, and I now have to relearn it to learn all of this stuff (if I ever want to pick up Java. Currently flirting with C.).


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#11 2014-05-21 12:01:45

xxarchangellxx
Member
Registered: 2014-05-21
Posts: 3

Re: Looking to start programming in Linux

Thank you guys for the fast responses. Hopefully I will be able to contribute more in the future as I learn more. As far as text editors VIM should be a good start correct?

Last edited by xxarchangellxx (2014-05-21 12:04:59)

Offline

#12 2014-05-21 13:16:14

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,033

Re: Looking to start programming in Linux

xxarchangellxx wrote:

Thank you guys for the fast responses. Hopefully I will be able to contribute more in the future as I learn more. As far as text editors VIM should be a good start correct?

Do a tutorial in both vim and Emacs and decide which one is more comfortable/interesting to you. I used vim for several years before I gave Emacs a try and  I wish I had tried it earlier. Others have gone in the opposite direction. Either way, please don't become dogmatic about your choice. smile

Offline

#13 2014-05-21 14:40:51

xxarchangellxx
Member
Registered: 2014-05-21
Posts: 3

Re: Looking to start programming in Linux

jakobcreutzfeldt,
Will definitely give them both a try.
Thank you,

Offline

#14 2014-05-28 13:26:55

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: Looking to start programming in Linux

No one has mentioned Perl? sad

But I agree with the others. Maybe, you could start writing bash-scripts at first to get a clue about scripting smile


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#15 2014-05-28 14:41:34

publicus
Member
Registered: 2014-01-01
Posts: 129

Re: Looking to start programming in Linux

Go nuts:
http://royal.pingdom.com/2012/02/24/10- … x-e-books/

[edit]

If you just want to get going, just use gedit, it's very self-explanatory.  Having to learn a programming language and then how to use the specifics of an editor of VI or Emacs can get overwhelming.

Last edited by publicus (2014-05-28 14:42:29)

Offline

#16 2014-05-28 23:16:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: Looking to start programming in Linux

Create something you find useful, scratch your own itch. It really doesn't have to be another music player ;P
See e.g. http://jasonwryan.com/blog/2013/09/15/awking/

Apart from books and websites, you should read and re-read man pages. This way you're less likely to reinvent the wheel.
Let's say you want to script some pacman task - start with a shell script. Later you can rewrite it using pyalpm.

Offline

Board footer

Powered by FluxBB