LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-16-2014, 09:08 AM   #16
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,224

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320

Quote:
Originally Posted by Ratmonkey View Post
Ok, so lets talk Java quick. I'm contemplating learning that, along with BASH. Good? Bad?
Bad.

Last edited by dugan; 01-16-2014 at 09:13 AM.
 
Old 01-16-2014, 09:09 AM   #17
Ratmonkey
Member
 
Registered: Jul 2012
Location: Notre Dame, Indiana
Distribution: Fedora, OpenSuse, Ubuntu
Posts: 89

Original Poster
Rep: Reputation: Disabled
Lol, ok. Your experience with it, and why?
 
Old 01-16-2014, 09:13 AM   #18
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,224

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Java is one language that's lost a LOT of mindshare over the last decade. Its current niches are being taught as a first language to people learning object-oriented concepts, and being used in large legacy enterprise systems that were written a long time ago and still need to be maintained. A direct result of the second niche is that most Java libraries are just horribly overdesigned and overengineered. It has also failed to attract new developers (who have any desire to use it for more than the one year they are required to), which means its user support is stagnant and sparse.

The following questions should give you an idea of where Java is:

http://programmers.stackexchange.com...on-development
http://programmers.stackexchange.com...a-applications
http://programmers.stackexchange.com...me-development

Last edited by dugan; 01-16-2014 at 04:59 PM.
 
Old 01-16-2014, 09:16 AM   #19
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
You appear to be confusing Java with Protel.
 
Old 01-16-2014, 09:18 AM   #20
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,224

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Very funny, Richard, but I'm not.
 
Old 01-16-2014, 11:30 AM   #21
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
If you want OOP, learn C++. Java is a failed attempt to improve upon C++. C and C++ are definitely cross-platform, so don't worry about that.
 
Old 01-16-2014, 09:36 PM   #22
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I love perl, and have been using perl for a living for fifteen years, but I do not recommend learning perl until after you have learned awk, sed, and tr. Otherwise you will never learn how to use them, because perl does everything they do (and in similar ways).

You should start with sh (which on most linuxes is bash in legacy compatability mode). Take a look at /etc/rc.d/rc.* and *.SlackBuild on your Slackware system to see what it can do (often with awk and tr), and what it is commonly used for.

For practice, you could customize your /etc/rc.d/rc.local (and similar) to automate administrative tasks you normally have to do by hand when a system boots up (if any).

You could also write SlackBuild scripts for making slackware packages out of applications not currently in the http://www.slackbuilds.org repositories. If there are any packages you use for your work which you currently have to build/install manually from sources, that's a good place to start. I'll be writing one for GlusterFS sometime along here, since it's a very useful service for me but takes a little wrangling to install on Slackware from sources.

For a next language, I'd heartily recommend perl or python. Perl has a long history of sysadmin use, and http://www.cpan.org/ is full of useful modules that do the heavy lifting for you for many common tasks (like https://metacpan.org/pod/LWP::Simple for fetching contents from remote websites). Python is a new up-and-comer, with fewer modules but perhaps more marketability (everyone likes the new hotness for new projects).

Whatever language you decide to learn, find its IRC channel (like #python on chat.freenode.net, or #perl-help on irc.perl.org) and hang out there to ask questions. Experienced programmers dedicated to helping out the newbies will put you on the right path. Go through a couple of tutorials first, though, as seen at http://perl-tutorial.org and http://learnpythonthehardway.org or they'll just tell you to read a tutorial and come back. There are programming forums on http://www.linuxquestions.org of course :-) and also on linkedin.

Good luck!
 
Old 01-16-2014, 10:10 PM   #23
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,224

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by ttk View Post
For a next language, I'd heartily recommend perl or python. Perl has a long history of sysadmin use, and http://www.cpan.org/ is full of useful modules that do the heavy lifting for you for many common tasks (like https://metacpan.org/pod/LWP::Simple for fetching contents from remote websites). Python is a new up-and-comer, with fewer modules but perhaps more marketability (everyone likes the new hotness for new projects).
I don't know if the "fewer modules" part is true (it may well be), but I do know that lack of modules is a problem that you will never experience with Python either.

The Python counterpart to LWP::Simple, btw, is requests.

Last edited by dugan; 01-16-2014 at 10:14 PM.
 
Old 01-16-2014, 10:17 PM   #24
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Ratmonkey View Post
Ok, so lets talk Java quick. I'm contemplating learning that, along with BASH. Good? Bad? Seems well supported,and used on multiple platforms. I have friends who have experience programming in it, and I have access to some Java Programming videos as well. But I want to know how it is in combination with Slack. I'd like to hear from you all why and why not to do it, anyone here have strong experience in Java programming?
I do. I've been programming in it since the turn of the century. I've used JDEE (Java Development Environment for Emacs) for almost 10 of those years and I've used NetBeans for the remainder.

FWIW, I've been dicking around with programming since 1976 (and made a living from it since 1995). I know Fortran 77 (first language), Pascal, Forth (several dialects), Basic (several dialects), Common Lisp, Emacs Lisp, C, C++, Python, Scheme, Ruby, Java, Groovy, and various assemblers (mainly 8 bit processors). Oh, and I know some Perl (to my immense shame) and a tiny bit of Objective-C. Been there, done that, bought the T-shirt, and the T-shirt has holes in it from too much washing.

And I know Protel and OO-Protel (which will tell some of you one of my employers).

Java's not a bad language and has gotten better over time. Anything that you'll create in that language will be a class so I think it's a good language to teach object oriented skills. Its syntax is not that far off from C and C++, so if you know either of those two, Java is not much of a stretch.

If you want more details, ask away.
 
Old 01-16-2014, 11:20 PM   #25
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
I'm gonna stick my neck out and promote 'C' (after you have checked out bash, sed, awk,tr, etc - in short, 'shell scripts')
'C' is a 'small' language, meaning that you can actually remember most of the library functions and their arguments and the language built-ins - I don't think that is true in _any_ other language. I have been through most of them in my time - but always come back to (and prefer) 'C'. Besides, there is nothing that will run faster! I shall gladly admit that if you are into object-oriented programming, 'C' should not be your choice - but hey - I just love it to death. My job mostly deals with pumping huge amounts of data through a lot of machines - there is nothing that will beat 'C' in this aspect.
I started off with fortran (like so many others of my (somewhat advanced) age), combining it with assembly, you could do almost anything. However, I've never looked back after meeting 'C'.

Good luck to you anyhow - whatever path you choose!
 
Old 01-16-2014, 11:50 PM   #26
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by dugan View Post
I don't know if the "fewer modules" part is true (it may well be), but I do know that lack of modules is a problem that you will never experience with Python either.
You're right, python has quite a few modules racked up. After deduplicating the entries from https://pypi.python.org/pypi/ it comes to 38,234 packages, which is a lot by any measure. I only wrote python for a living for a couple of years, but found a great many powerful tools in that time (some of which were full-fledged frameworks, like Twisted).

If I hadn't grown accustomed to the 164,860 perl packages available at CPAN, python's collection would seem like a lot. But with perl in decline and python on the rise it's just a matter of time before python catches up.
 
Old 01-17-2014, 03:28 AM   #27
Myk267
Member
 
Registered: Apr 2012
Location: California
Posts: 422
Blog Entries: 16

Rep: Reputation: Disabled
To Ratmonkey:

If you don't know how to program or what programming language to pickup for your first, I'll make a suggestion: Python.

Python is a modern and practical language. It's also cross platform: If you're on your Slackware box, type `python` into the terminal and say "Hi". If you're on Windows, I'm sure you'll have no problem finding the installer on the python website.

Next, you'll need some learning material... Good thing there's a huge list of books here! There's something like 40 Python books in that list, ranging from absolute beginner on up to advanced topics. A few of them are kinda dry, others are more fun, some are more like cook books. There's enough there that you can skip around between them depending on how fast you're picking things up.

As someone who learned to program not so long ago (and I'm still learning), I wish someone had just told me to use Python and give me a fat list of tons of cool books to read and type programs from, so that's what I'm doing. Stick with it, read, program, learn - only you can hold yourself back at this point.
 
Old 01-17-2014, 08:25 AM   #28
Ratmonkey
Member
 
Registered: Jul 2012
Location: Notre Dame, Indiana
Distribution: Fedora, OpenSuse, Ubuntu
Posts: 89

Original Poster
Rep: Reputation: Disabled
Well I've installed python3, and am starting to play around with it.

http://en.wikibooks.org/wiki/Non-Pro...l_for_Python_3
That looks promising.

And Thank you Myk267. Also, Richard, I might check out Java after some playing around with Bash and Python. And thank you everyone else, you all have been very helpful, once again. +1
 
Old 01-17-2014, 09:16 AM   #29
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
On top of what other folks have said let me encourage you toward shell programming (whether with BASH or KornShell or whatever shell programming language tickles your innards); I happen to use KornShell exclusively, taught a course at a university in it and have found it stable and usable since, oh, the late '80's. BASH (Bourne Again Shell) is a rewrite of the Bourne Shell with functions and features of KornShell thrown in by the Free Software Foundation so as not to infringe AT&T copyrights on sh (the Bourne Shell) and ksh the KornShell. Enough history.

Shell programming (I really don't like the word "scripting" to describe what you do with a shell programming language) can get you a long, long way toward understanding programming concepts, program structure and the what, who, why, where, when and how of things. If you go look, you'll see hundreds of shell programs that help make up the tools and utilities you find in Slackware (and other Linux distributions). If you do something like
Code:
file /usr/bin/* | grep POSIX
you'll see what I mean. Shell programs are all over the system (and you don't even know that they're there when you use them).

Shell programs can make decisions (if condition, else if condition, else), do loops, do arithmetic, execute utilities with arguments and use the output of them, pretty much anything you wish to do in a programming environment you can do with the shell -- and not necessarily just as a quick-and-dirty, but as actual production software.

Much of what you do in programming is text. You manipulate text, you alter text, you do what needs doing with text. The shell, in combination with utilities such as sed (the streaming editor), awk to only name a couple is used to perform useful work (including work done with compiled programs; you can filter and manipulate arguments to be piped into a compiled program). You also do the basic type a command and the shell executes that program for you, it's the interface.

One of the hardest things to do in computer programming is deciding what you're going to use to solve which problem. Programming breaks down into a three-step process: what have got, what do you want and what do you have to do to get there (that last is the hard one). The shell can go a long, long way toward solving much of that.

You've not going to do mathematics with the shell, you'd do that with C or FORTRAN (yes, Virginia, FORTRAN is alive and well for Big Math) or some other option. If you learn C++, you've also learned (pretty much) Java (which is really just C++ without structures and pointers and some bells and whistles thrown in).

At the bottom of everything is Linux (Linux is the kernel, all the rest is utilities that talk and listen to the kernel). Right above the kernel is the shell and above that is everything else; wouldn't hurt to know it.

The other thing you really want to learn are regular expressions -- which, at first glance look like gobbledegook (and kind of are actually). Regular expressions, once mastered, make your life a whole lot easier because the same syntax works in just about everything: the shell, the editors, utilities like awk, you name it.

Hope this helps some.
 
Old 01-17-2014, 09:37 AM   #30
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Take a look at rosettacode.org: it shows examples of the same task coded in every language you can think or have heard of... you can get a feel for the syntax of the languages...

Many languages are customized for a task -- like tk can make widgets; openGL can do graphics, etc. etc.

C is great language to understand the hardware -- you have to allocate the correct amount of RAM for various types (integers, long integers, etc.) However, mistakes in code can cause buffer overflows and other things that could compromise security. Some languages, like common lisp, that are not as low level as C, will do the type casting and memory allocation for you.

I like common lisp -- it's stood the test of time, and it has lots of bindings to other languages, such that it is like a programming language that can program in other languages for you; for example, instead of having to learn TK, I can load lisps bindings to tk (a system called ltk) and then manipulate widgets using standard lisp syntax that I got used to -- I figured if it could program the space shuttle, lisp could do anything I needed... And its syntax is derived from lambda calculus, and isn't just arbitrary constructs--as such there are lots of parentheses, but with the color coding and indenting provided by emacs, its not hard to keep track of the parentheses.
 
  


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
Slackware n00b in need of assistance! psearchery13hunter Slackware 22 03-12-2008 07:55 PM
Help a n00b install Slackware 10.2 on SATA harddrive please! asilentmurmur Slackware 5 03-21-2006 03:54 PM
Slackware 10.0 questions -N00b Sader Slackware 2 10-14-2004 07:07 AM
N00b: how do i install a program on slackware? FlinkL.n00b Linux - Software 1 08-26-2004 07:06 AM
slackware firewall (n00b) finchxm Slackware 4 03-04-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:20 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