Re: Wanting Advice Please...
Joost Kremers wrote:
[color=blue]
> Blazar Jet wrote:[color=green]
>> I would like to learn how to program.
>> Where should I start?[/color][/color]
[color=blue]
> the choice of language really depends on what you want to do. python is
> useless if you want to program kernel drivers, for instance. OTOH if you
> want to write higher-level programs that interact with the user through a
> GUI, something like python might be a better idea, as it'll get you
> results quicker than a language like C or C++.[/color]
My fault - I should have included more information into my initial post.
I am nearing retiement after 30 years in comp tech hardware and would like
to learn programming "best prectices' with the thought of perhaps helping
out with some F/OSS projects. Perhaps starting by cleaning up code and
writing docs.
The thought also occurs to me that some projects are sitting dormant and it
might be helpful to try and bring them back to life.
I have been using Linux since 1995 and would love to contribute back in the
next 30 years of my life. (I am confined to a wheelchair now)
[color=blue]
> if you just want to get an idea of what programming is like, and see what
> you can do with it, i'd suggest python. results are quick, it's useful for
> scripts to automate all sorts of file maintenance tasks, it's not too
> difficult to write GUI programs with it, and it'll scale up to larger
> programs as well.[/color]
[color=blue]
> then if you later decide you want to program specific things, you can
> always switch to another language more suited to those tasks.[/color]
Thanks for your input.
BJ
Re: Wanting Advice Please...
On Tue, 22 Jan 2008 15:46:27 +0000, Blazar Jet wrote:
[color=blue]
> You recommend starting with C++ and then I should be able to understand
> C.[/color]
Not really, the common idioms are very different. Although you can write
pure C in C++, it does seem pointless.
Nonetheless, if you want to do systems programming, C ROOLZ!
[color=blue]
> I am going to try and understand the Zen of 'procedural vs object
> oriened'.[/color]
Programming isn't about a particular language. It's a way of thinking.
Or collection of ways. Mostly the languages get in the way of the
thinking by making you focus on the distractions.
The best way to learn is with something modern and working at a high
abstraction level, like Ruby.
Not many programming books are as well written as Why's (Poignant) Guide
to Ruby:
[url]http://poignantguide.net/[/url]
As a benefit, if you ever decide to commercialise your programming
skillz, Ruby on Rails coders are in high demand :-)
Re: Wanting Advice Please...
Tom N wrote:[color=blue]
> On 2008-01-22, Blazar Jet <blazar.jet@gmail.com> wrote:[color=green]
>> I would like to learn how to program.
>>
>> Where should I start?[/color]
>
> Bash then C.[/color]
I totally agree. Bash is probably the easiest way to learn what
programming is about. You'll be able to write simple, useful scripts
after a few days of learning on your own.
--
Wallman
[url]http://www.3dwallpaper.ws[/url] ::: 3D wallpapers :::
Re: Wanting Advice Please...
Blazar Jet <blazar.jet@gmail.com> writes:
[color=blue]
> Loki Harfagr wrote:
>[color=green]
>> Tue, 22 Jan 2008 07:44:25 +0000, Blazar Jet did cat*:[color=darkred]
>>> I would like to learn how to program.[/color][/color]
>[color=green]
>> Fine, but what do you want to program for?[/color]
>
> I am nearing retirement and have been involved on the hardware side of comp
> tech for close to 30 years and now wish to actually learn the basics of
> writing clean fat appropriately commendted code.[/color]
Well, I'm not a programmer, just a dabbler! But I have found these
books (versions of the same book) rather useful
[url]http://www.openbookproject.net/thinkCS/[/url]
How to Think Like a Computer Scientist
Python | Java | Logo | C++
These texts are introductions to Computer Science in an increasing number
of both programming languages and natural languages. The order of
presentation is what might be called "procedural first," which means that
the programming style is mostly procedural until the later chapters,
which introduce object-oriented programming.
They are intended for people with little or no programming experience,
and are appropriate for first year college or advanced high school
students, or anyone interested in learning to program. All versions are
under the GNU Free Documentation License.
Just about my level!! Might be a good place to start.
atb
Glyn
--
RTFM [url]http://www.tldp.org/index.html[/url]
GAFC [url]http://slackbook.org/[/url] The Official Source :-)
STFW [url]http://groups.google.com/groups?hl=en&group=alt.os.linux.slackware[/url]
JFGI [url]http://jfgi.us/[/url]
Re: Wanting Advice Please...
Blazar Jet <blazar.jet@gmail.com> wrote:[color=blue]
>I actually passed a couple courses in assembly language in the DOS
>environment 25 years ago.[/color]
That's excellent... C is just one nice step up from assembly, and it's
nice to be able to have an idea of what assembly the compiler is
producing.
In school, I watched people struggle with learning assembly language
after learning the patterns of a high-level language, but people who had
learned assembly first had little trouble with it even when it was new
to them. It seemed like the order in which the patterns were learned
was important.
A general knowledge of assembly language has been useful in virtually
every job I've had, whether I was working on Windows, PalmOS, or the
Playstation2, even if I was rarely writing code in it.
[color=blue]
>I really loved it but was overwwhelmed by the bewildering array of DOS
>calls.[/color]
One of the hardest things of learning any new language isn't the syntax;
it's learning the huge number of calls at your disposal.
Take C# vs Java, for instance. The languages are very similar, but they
both have gigantic support libraries. If you know Java, you'll have a
good idea of what you can do in C#, but you'll have to spend time
looking it all up. :)
[color=blue]
>I am nearing retirement and looking to increase my understanding. Who
>knows, maybe write the Great American Program.[/color]
Laudable goals!
-Beej
Re: Wanting Advice Please...
Beej Jorgensen wrote:
[color=blue]
> Blazar Jet <blazar.jet@gmail.com> wrote:[color=green]
>>I actually passed a couple courses in assembly language in the DOS
>>environment 25 years ago.[/color][/color]
[color=blue]
> That's excellent... C is just one nice step up from assembly, and it's
> nice to be able to have an idea of what assembly the compiler is
> producing.[/color]
[color=blue]
> In school, I watched people struggle with learning assembly language
> after learning the patterns of a high-level language, but people who had
> learned assembly first had little trouble with it even when it was new
> to them. It seemed like the order in which the patterns were learned
> was important.[/color]
[color=blue]
> A general knowledge of assembly language has been useful in virtually
> every job I've had, whether I was working on Windows, PalmOS, or the
> Playstation2, even if I was rarely writing code in it.[/color]
That is good information!
I think I should revisit my understanding of assembler again - it's been a
long time since I have written anything beyond a VERY simple printer
driver.
[color=blue][color=green]
>>I really loved it but was overwwhelmed by the bewildering array of DOS
>>calls.[/color][/color]
[color=blue]
> One of the hardest things of learning any new language isn't the syntax;
> it's learning the huge number of calls at your disposal.[/color]
Ok.
[color=blue]
> Take C# vs Java, for instance. The languages are very similar, but they
> both have gigantic support libraries. If you know Java, you'll have a
> good idea of what you can do in C#, but you'll have to spend time
> looking it all up. :)[/color]
Ok. Is most of this online or am I going to be buying a lot of books?
[color=blue][color=green]
>>I am nearing retirement and looking to increase my understanding. Who
>>knows, maybe write the Great American Program.[/color][/color]
[color=blue]
> Laudable goals![/color]
Thanks - it would be nice to be able to contribute something back.
BJ
Re: Wanting Advice Please...
Blazar Jet <blazar.jet@gmail.com> wrote:[color=blue]
>I wish I understood the relationship between C and C++ - that may help me
>make an informed decision.[/color]
It's a different programming paradigm; that's the biggest thing, IMO.
C++ started as "C with Classes", which was a way of bringing
object-oriented programming to the procedural world of C.
Here's a great list: [url]http://en.wikipedia.org/wiki/Programming_paradigm[/url]
In it you'll find Procedural Programming (C) and Object-oriented
Programming (C++). C++ can also behave almost entirely like C, but
that's not its /raison d'etre/.
Both can solve the same problems, but they're sort of different ways of
thinking about them.
For me personally, and this is not an exhaustive list by any means, the
biggest winners for using C++ (or some OO language) over C are games and
user interfaces. These are both applications where you have definite
"things that do stuff" (windows, widgets, or game entities), so it's
good to have an OO language that naturally describes "things that do
stuff". If you have a list of things to do, (i.e. a procedure you have
to go through) then a procedural programming language could be better.
(This is much more of a guideline than a rule.)
Python and C++ are OO/procedural hybrids, and can be programmed either
way.
-Beej
Re: Wanting Advice Please...
Beej Jorgensen wrote:
[color=blue]
> Blazar Jet <blazar.jet@gmail.com> wrote:[color=green]
>>I wish I understood the relationship between C and C++ - that may help me
>>make an informed decision.[/color][/color]
[color=blue]
> It's a different programming paradigm; that's the biggest thing, IMO.
> C++ started as "C with Classes", which was a way of bringing
> object-oriented programming to the procedural world of C.[/color]
[color=blue]
> Here's a great list: [url]http://en.wikipedia.org/wiki/Programming_paradigm[/url][/color]
[color=blue]
> In it you'll find Procedural Programming (C) and Object-oriented
> Programming (C++). C++ can also behave almost entirely like C, but
> that's not its /raison d'etre/.[/color]
[color=blue]
> Both can solve the same problems, but they're sort of different ways of
> thinking about them.[/color]
[color=blue]
> For me personally, and this is not an exhaustive list by any means, the
> biggest winners for using C++ (or some OO language) over C are games and
> user interfaces. These are both applications where you have definite
> "things that do stuff" (windows, widgets, or game entities), so it's
> good to have an OO language that naturally describes "things that do
> stuff". If you have a list of things to do, (i.e. a procedure you have
> to go through) then a procedural programming language could be better.
> (This is much more of a guideline than a rule.)[/color]
[color=blue]
> Python and C++ are OO/procedural hybrids, and can be programmed either
> way.[/color]
That is all excellent information but I may require more information about
the significance between Object v Procedure.
I gather from you description so far that with a GUI you have 'objects' like
OpenWindow and ScrollWindow etc. Procedure could be compared more to
assembler where all the tasks are suitabley known and anticipated.
The same would be applicable to games where dozens/hundreds of
activities 'objects' are taking place on a constantly updating dataset.
OK - I have some work to do.
I think I must begin again by studying up on assembler again, this time
Linux style.
Thanks again for your advice.
BJ
Re: Wanting Advice Please...
Blazar Jet <blazar.jet@gmail.com> wrote:[color=blue]
>Ok. Is most of this online or am I going to be buying a lot of books?[/color]
"Print is dead." --Egon Spengler, Ghostbusters
It's really rare I buy a computer book anymore. Virtually everything's
online, from reference to tutorial. Wikipedia is a great source for
general information, plus links to specific information. A Google
search will yield tons of hits, e.g.:
Results 1 - 10 of about 259,000 for "javascript tutorial".
-Beej
Re: Wanting Advice Please...
Tom N wrote:[color=blue]
> Better to start with bash. That way he'll learn how to run his computer
> without KDE or the like at the same time he's picking up the basics
> of programming.[/color]
Once again Tom assumes he is the only one that knows how to use the
shell and everybody else is void of that knowledge.. Good one Tom.
Re: Wanting Advice Please...
Blazar Jet wrote:[color=blue]
> I would like to learn how to program.
>
> Where should I start?
>
> C
> C++
> Ruby
> Python
>
> If I learn to program in C, will that screw me up learning C++?
>
> All advice is welcome.
>
> Thank you.
>
> BJ[/color]
Hi Blazar,
What platform/operating system are you looking at programming for? I'd
discourage scripting as a guide to learning the basics of programming as
its not writing REAL code! Scripting is as close to writing REAL code as
is writing autoexec.bat for DOS.
Seeing as you have said, that you have learnt assembly language, you
already have a great head start on what programming is actually about,
and what is happening inside the computer, thats a huge advantage over
nubs that walk into the programming world and start with a HLL and think
they know everything. I'd recommend C as a next step if you want to go
the high level way. And of course, there is nothing to stop you from
linking your C with snippets of assembly code or using inline assembly.
Assembly is still used under unix, same way it was used under DOS, you
would just call int 0x80 instead of int 0x21 under DOS. MPlayer is a
great example of a C and assembly language ****tail :) Tools like Nasm
are there for writing assembly (or you can use Gas, but you will have to
learn that disgusting at&t asm syntax), and gcc is the universal C
compiler on unix systems (also ported to DOS as djgpp).
C programs can be ported to many platforms with ease (providing they
don't issue tonnes of exclusive calls to a platform specific API. C++
can produce some very BLOATED and slow code, and isn't really always
necessary if you plan on writing programs that just run in the text mode
shell. I'd only go near C++ if its absolutely necessary (ie: You're
writing something for a GUI etc, or need to interface with some other
library in C++)
C is an incredibly versatile language, so it gets my vote.
My coding experiences first started with C in the early 90's and I
initially had trouble learning C and what pointers really were etc, but
I had seen some amazing stuff done in assembly and veered off course and
learnt assembler in my own time, when I came back to learning C, it was
a piece of cake, the missing piece of the puzzle was now in place.
Alex
Re: Wanting Advice Please...
Blazar Jet wrote:[color=blue]
> I would like to learn how to program.
>
> Where should I start?
>
> C
> C++
> Ruby
> Python
>
> If I learn to program in C, will that screw me up learning C++?
>
> All advice is welcome.
>
> Thank you.
>
> BJ[/color]
As a long time sysadmin, who's recently moved over to the application
development side, here's my 2 cents.
WHAT do you want to program? If you want to write a mouse driver, you
need C. If you want to make interactive web pages, then Python, Perl,
or even asp. Think of a programming language as a tool - sometimes, the
answer is Visual Basic, sometimes the answer is bash.
Do you have a job? If so, your choice of language will likely be
dictated to you. For example, I'm off on parental leave from work, but
when I go back, I'm on a new team that will be doing legacy support for
our OpenVMS boxes, which means I'll be learning VMS BASIC. (It's ok, I
sort of volunteered for it because I thought it would be interesting.)
I suggest learning them all eventually. :)
I think you can start anywhere, but I do recommend learning as low of a
level as possible, even if it's only "Hello World" in assembler. Why?
Learning what a stack is, what pointers are, how memory management
works, etc... all helps to optimize how you do things in a higher level
language.
On my bookshelf of "programming language books I'm reading" I have a
smattering of C, assembler, Python, Pearl, VB, Java, Microsoft SQL. I
also have Code Complete, The Pragmatic Programmer, Dreaming in Code, The
Mythical Man-Month. I plan on adding some C++ books, and the Art of
Programming Series.
One web site I go to that's entertaining (even if windows biased) is
codinghorror.com. One funny comment made every halloween - if you want
to see scary, look at code you wrote 5 years ago. :)
Most of all, pick one and have some fun. You learn by reading, you
learn by doing. And, if you don't manage to blow yourself up once in a
while, you're not trying hard enough. :)
Ray
Re: Wanting Advice Please...
Blazar Jet wrote:[color=blue]
>
> I am nearing retirement and looking to increase my understanding.
>
> Who knows, maybe write the Great American Program.
>
> Thanks for your input.
>
> BJ[/color]
you're like me for sure... think of a program you'd like to write, or
even one you'd like to extend. That will help pick the language.
Let's say you like xmms, but want to write a rating plugin like iTunes
has. You'd need to look at xmms's source and see how to extend it.
IIRC, that's C++.
What does your computer do that you wished it did better - or doesn't do
at all that you'd like it to do? That's even how Linus got started on
Linux - he wanted a free unix kernel to hack around on.
Ray
Re: Wanting Advice Please...
On Tue, 22 Jan 2008 19:53:44 GMT, Blazar Jet <blazar.jet@gmail.com> wrote:
[color=blue]
>I think I must begin again by studying up on assembler again, this time
>Linux style.[/color]
Uh, that'd be kernel programming in C then ;)
One doesn't really do assembler on unix. Well, just a little, see LKML.
'Cos you see, C and unix grew up together.
Grant.
--
[url]http://bugsplatter.mine.nu/[/url]
Re: Wanting Advice Please...
On Tue, 22 Jan 2008, Mark South wrote:
<modquote>[color=blue]
>
> Programming isn't about a particular language. It's a way of thinking.[/color]
</modquote>
--
William Hunt, Portland Oregon USA
Tower of Babel Re: Wanting Advice Please...
Blazar Jet wrote:[color=blue]
> I would like to learn how to program.
>
> Where should I start?[/color]
Read the thread and it looks like 'crying in wilderness' as you get
responses from every imaginable 'mother tongue' of the responder.
So I will join in.
Start with something basic and invest the time till you can 'speak
freely', the transfer to any other language will be a calculated
decision then, understanding why and what for.
My way was influenced by then 'new' Borlands TurboPascal v.3 which could
have 128 letters long names of variables and programming for non-english
speaking users it was very convenient to represent variables in long
'Camel style' names.
[color=blue]
> If I learn to program in C, will that screw me up learning C++?[/color]
If you _want_ to learn, nothing can stop you.
Have fun
Stanislaw
Slack user from Ulladulla
Re: Tower of Babel Re: Wanting Advice Please...
On Wed, 23 Jan 2008, Stanislaw Flatto wrote:
[color=blue]
> If you _want_ to learn, nothing can stop you.[/color]
Very true..
When employing someone with programming abilities (for an
internet service) I look for and probably in this order -
perl
python
php
C++
It depends on what area you want to enter, like if you want to program
games, no point in learning php or perl :)
--
Cheers
Res
mysql> update auth set Framed-IP-Address='127.0.0.127' where user= 'troll';
Re: Wanting Advice Please...
Blazar Jet wrote:[color=blue]
> I am approaching retirement after ~30 years in comp tech hardware and would
> like to perhaps donate some time helping around some of the FOSS projects,
> cleaning up code, writing docs, that sort of thing.[/color]
That's the info we needed. Find projects you want to help, find out
what they need done, and try to help out. That will determine what
you need to learn.
If you were just starting a career, I may have answered completely
differently.
- Daniel
Re: Wanting Advice Please...
On Tue, 22 Jan 2008 07:44:25 +0000, Blazar Jet wrote:
[color=blue]
> I would like to learn how to program.
>
> Where should I start?[/color]
Turbo Pascal (for DOS).
--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
Re: Wanting Advice Please...
Dan C wrote:[color=blue]
> On Tue, 22 Jan 2008 07:44:25 +0000, Blazar Jet wrote:
>[color=green]
>> I would like to learn how to program.
>>
>> Where should I start?[/color]
>
> Turbo Pascal (for DOS).[/color]
Why not debug.exe for DOS? :P U can code there too ;)