Getting back into programming

10 risposte [Ultimo contenuto]
Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

Since I left school I didn't touch programming. Back then I was relatively good at doing things in Delphi 6. So now I thought ObjectPascal would be the right place to get back into programming.

But what do I need in order to write first simple programs in OP? How do I compile stuff and how do I run it?

I've already installed gpc-4.1 (because aptitude told me, pascal-compiler is a virtual package provided by gpc).

Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

Awesome, I've installed Lazarus and it looks just like Delphi! But when I start it, I get this:

The Free Pascal source directory was not found. Some code functions will not work. Install it and set the path Environment -> Environment Options -> Files.

What is it, that I have to install? Am I supposed to simply create a directory somewhere my useraccount can write to and set the path to it in the options?

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

If you really want to use Lazarus, you can. Nevertheless, this language does not have much future. Why not considering C++? It is object-oriented although you can also program à la C. And this one will not disappear anytime soon! The books from Bruce Eckel are a good and freely (as in free beer only) downloadable material to learn C++.

Adrian Malacoda

I am a member!

Offline
Iscritto: 12/26/2010

IMHO C++ is an old, complicated, and hard to use language. If you want to learn an easier language with a developed community and a bright future, look into Python. Mark Pilgrim's Dive into Python is a free (GFDL) book on Python.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

That is true (you could cite Ruby too). I suggested C++ because it is closer to Pascal (compilable, pointers, etc.)... and because it has its advantages too (fast, multiple inheritance, etc.).

Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

I don't really care about the future of the language, because I'm trying to just remember stuff from school. It's supposed to be some programming exercise, nothing more. Like a couple hello worlds, some calculations, etc.

Also, the fsf warns against usage of C in future projects because of Microsofts patents.

oysterboy

I am a member!

I am a translator!

Offline
Iscritto: 02/01/2011

The FSF is concerned about C#, not C! C is widely used in the kernel, GNU apps, etc... I second the suggestion about learning C++/C.

Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

Hm, I thought C# was the same as C... As a next step, I'll certainly look into it. Thanks for clarifying!

Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

Ha, I did it : )

Just made this:

sudo aptitude install fpc-source

And I also had to rescan the fpc source directory from the Lazarus interface, because I was getting error messages when creating onclick events for buttons. Now all works fine!

Cyberhawk

I am a translator!

Offline
Iscritto: 07/27/2010

@Adrian: thanks for the suggestion, but I'm already reading "thinking in C++" and for the first time I feel like I'm really grasping the concept of object oriented programming (thanks Magic Banana). Maybe at some point I'll dive into Python too, but for now I'll stick with fewer languages.

I hope to get an education (Ausbildung in German) in software development this year. For those who don't speak German: getting an education means you'll learn and work at some company for 3 years, each year you are supposed to do more working than learning and in the end you are a certified professional and can get a real job.

skbochs
Offline
Iscritto: 02/20/2011

If you're interested in learning new languages, you might take a look at the "How to Think Like a Computer Scientist" series from Green Tea Press. They're free-as-in-speech, licensed under the GNU Free Documentation License.

Another free book (OPL w/no options) I'd recommend is Advanced Linux Programming. It's provides a fairly gentle introduction to some of the peculiarities of developing for Linux-based systems (such as the difference between Linux threads and pthreads) and working with GCC et al.