|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
|||
What should be my first language?
Hello to everybody !!
franky speaking , being a total newbie both in the *Nix world as well as the programming field I wonder what programming lge might be more beneficial to me than others .. ksh scripting ? perl ? python ? they say python is clement as to beginners but I feel perl can help me advance better in 'daemonology' .. right , Daemonologists ? |
|
|||
Quote:
I have two recommendations.
Programming effectively is more than learning any given language's syntax. Programming effectively also means understanding the problem which is to be solved. Lots of research may need to done before you fully understand the underlying problems & all essential code can be written. When embarking upon any programming project, be very truthful with yourself as to your own commitment, curiosity, fortitude, & time when tackling the exercise. Some programming problems will be trivial, but many won't. Practice & experience will help. So don't think that programming can be "mastered" in a week or two. It takes time. Consider the effort a long-term investment. |
|
|||
Quote:
Most, if not all shells claim Bourne compatibility, although some are more compatible than others. The point IdOp is making is consider coding to the Bourne shell as the lowest common denominator. Bourne shell code has a higher probability to running on any number of shells. Although bash was not initially mentioned, integrating bash-ism's into a script limits its use to the bash shell only. Getting locked into using a specific shell may hurt one's self at the most inopportune moment later on. Last edited by ocicat; 23rd January 2012 at 09:14 PM. |
|
|||
Thanks Ocicat , much indebted to you and you're a source !
I thought the openbsd team chose perl because it is more practical and more powerful than the rest .. likewise after reading days ago that openbsd team got rid of c++ from the base I thought c is better or less problematic or more secure .. again a newbie scale .. my aim is to qualify as a BSD user [and contributor in the long run] so that I can -the best way- make use of the new OS I discoverd,loved, and trusted .. I feel the urge to embrace this new culture .. the BSD UNIX culture .. I met with some problems that windows hid from me as a user .. namely : unicode support .. I am divorsing my old bad 'WinHabits' .. among many , doing without gui to develop the alternative '*Nix-habits' .. using snownews / lynx/ mp3blaster/ mutella /xxxterm / ... so I guess it is python instead of perl .. |
|
|||
ldOP , Thanks for your suggestion
c is famous in prog literature so well as in real UNIX LIFE , but some disencourage beginners like me from choosing c as a first programming language some went further as to blame c for pushing learners into learning bad programming habits .. I am just quotng here .. I still have no clue how true or false this might turn .. Friend ldOP , what do you mean by 'large effort' ? |
|
||||
Quote:
Quote:
|
|
|||
Quote:
Quote:
Quote:
But that is my opinion. |
|
|||
interesting ..
well I said it as a fact (bad habits relating to the very nature of the OS) not as an attitude. while bidding windows farewell I did it , not out of contempt or resentment but simply because I found a better alternative .. encompasing all expectations and at this low newbie level , let alone afterwards .. I reember Theo de Raadt once said on an old TV interview that security is based both on me and the other net user .. I believe Windows has contributed much to most net probs .. Respect to all opinions of course .. bifrost has got many colors .. |
|
|||
Quote:
Here's a fuller answer about the decision to use Perl: http://marc.info/?l=openbsd-misc&m=121155084515533&w=2 C++ isn't removed from base in any way that would meaningfully limit you if you chose that as your first programming language. The gcc in base compiles C++ fine, and these days is only a little out of date on most architectures. If you find yourself wanting to use features from C++11 (the new ISO standard just out this year) you may be able to pull in a newer gcc from ports with some support. The C++ program they removed from base I believe you are thinking of was groff. Whatever the C++ bashers want you to believe, the problems for them with groff seemed, from my reading, to have more to do with that particular code base, that it was a general purpose troff formatter and they only needed enough of it in base to handle man page formats, that groff's license was GPL (perhaps -- I'm always unclear just how big an issue GPL in base is for OpenBSD and whether that issue isn't overstated by some people), that the job to bring in a newer version of groff was nothing anyone would find fun, and that Kristaps Dzonsons and Ingo Schwarze had done such a nice job with mandoc. Unfortunately, this usually gets translated as, "groff's written in C++ so it sucks." C is not better than C++. Python is not better than Perl. I'd suggest you try to avoid these language A is superior to language B kinds of statements (both reading them, even when written by OpenBSD developers, or writing them). Bjarne Stroustrup writes about the problems with these statements better than I ever could in his FAQ: http://www2.research.att.com/~bs/bs_faq.html#compare . What ocicat wrote about Python being syntactically clean is fair and a plus for Python as a first language. I think I've read something to the effect that Guido had an earlier language whose goals included being a good teaching language as a model, so it's perhaps understandable that it's novice friendly. That said, Perl's not as bad a choice as many make it out to be either, and you could read the source to the OpenBSD package system, once learning it. Larry Wall has been quoted as having a design goal of supporting "baby talk" meaning that there are meant to be multiple levels of Perl knowledge, none of which leave you hamstrung as far as making things work. IMO, he's been quite successful with that. I found learning Perl to be great fun (and still do every time I relearn it ). I also like what ocicat said in suggesting shell script (though, personally, I go out of my way to avoid shell script beyond a two liner -- Olin Shivers takes some entertaining swipes at Unix shell script I relate to that you can find here if you don't feel like following my advice above about reading language bigotry: http://www.scsh.net/docu/scsh-paper/...per-Z-H-1.html ), since you said your goal was to perhaps contribute to OpenBSD someday. I'm guessing you would start with making ports, in which case you'd need to know shell script, perhaps some Perl, Makefiles, and some C at a minimum. If you learned Python instead of Perl, maybe you could start by maintaining Python module ports. In general though, except for your goal to contribute, I don't personally think you should be as influenced as you seem to be by the preferences of other BSD users and developers. There seems to be a bias towards C and shell script/awk/sed among Unix people. That's not such an unattractive programming world, but there are other worlds, and OpenBSD supports programming in them quite well too, despite the preferences of many of its kernel and user land developers. As an example of the many alternatives available, this book on Lisp could be a fun place to start for a beginner (and there are some great, more serious books on Lisp you could follow up with, such as Peter Norvig's Paradigms of Artificial Intelligence or Abelson and Sussmans' Structure and Interpretation of Computer Programs): http://landoflisp.com/ OpenBSD now has very good support for Common Lisp. They actually are better (in some respects?) than anyone else in their SBCL support, supporting me on PowerPC (yay!). Not even Linux or OS X are up to the version number the OpenBSD porter and SBCL people have gotten up to: http://www.sbcl.org/platform-table.html |
|
|||||
Quote:
Why Perl is in base has been discussed on misc@ periodically for a number of years. My recollection centered around project developer comments such as the following: http://marc.info/?l=openbsd-misc&m=123044348520838&w=2 However, your resurrection of Espie's take (as done above...) is more apropos(1). Quote:
http://undeadly.org/cgi?action=artic...20091228231142 As I recall, the motivation came from wanting to move away from GCC3.2 which was getting old in the tooth. pcc was considered, but many of the developers had concerns over whether pcc was mature enough & whether it could handle all of OpenBSD's supported platforms. The window for making a decision was short, so retrofitting GCC4 was the alternative chosen. I suspect that there will be continued piecemeal moves away from GNU. If mandoc(1) (for replacing textproc/groff...) & tmux(1) (for replacing misc/screen...) are indications, there are collateral advantages. Increased stability is one. Clarity coming from reviewing the problems of old & seeing where usage is likely to go in the future is another. The original tools being replaced had been long used in enough situations for their deficiencies to become clear. Plus, there have been developers motivated enough to come up with working alternatives. Clarity didn't come from using newer shinier tools & languages; clarity came from understanding the fundamental problem space. Quote:
FWIW. Quote:
Quote:
But for those who dismiss the notion, functional programming idioms can be found in Perl & Javascript too(as examples...). Again, thanks thirdm for your insight! You have made some compelling arguments. |
|
|||
Quote:
I find myself lately wanting to do everything through emacs, scsh and Common Lisp. But I've bounced back and forth on this over the years. Sometimes even now I read how others work, quotes like, "the Unix environment is my IDE," and find myself wistful, almost ready to bounce the other way again and become for a while a vi/awk/shell/C person or an acme/awk/rc/C/plan9 person. Still, I hate the quoting rules and lack of types in shell. Just my preference. No one should take that as advice, but instead try it and decide themselves what they like. |
|
|||
that's deep reasoning .. thanks Thirdp ! thanks Ocicat ! we learn from you nice guys ..
I 've got a lot of programming tutorials .. I haven't yet made up my mind .. how ironic it seems to be : for while one tries hard to well choose the right prog-lge to ave time , he wastes more time deciding .. will a year spent on python be a waste of time for a bsd-oriented newb ? won't it help much as fas as c itself is concerned ? being ditched by the openbsd team, obviously when a nerd informed that another lge came first , alluding to perl ... |
|
|||
Yeah, it almost feels easier not to have choice. I was probably a no nothing idiot, but it was comfortable for me starting out because my choices were (falsely?) limited. At one point Turbo Pascal was the "obvious" choice among people I chatted with on BBSes. Then Pascal was no good and you had to use C. Then a few years later, if you weren't using C++ and Objected Oriented Programming you must be very small minded (there was a voice or two chiming in that if you really wanted to do OOP you should learn Smalltalk not C++, but that didn't run on PCs back then, I don't think). As simplistic as my way of thinking was it got me somewhere I'm happy with now. I make my living writing mostly C++, quite like using the language (*ducks*), and am excited about where it's going.
Now (I think) I see better that there are many choices with various tradeoffs and no single right path to take. But I feel just as you do the doubt in picking one thing over another. Should I have never looked at Lisp? Should I have stuck with Scheme instead of switching to Common Lisp (and then, which compiler or interpreter should I use). Maybe I should have concentrated on learning C++ better. I may be local guru where I work but I'm novice level compared to real C++ gurus. Or should I spend more of my free time learning things consistent with the new preferences of the company I currently work for rather than learning it piecemeal as I need it? I don't want to spend a lot of my free time learning a proprietary (more or less) language and library set, especially if I can escape it next job, but should a professional not be expert in anything he uses? I guess you just have to make a choice, go with it a while, then revisit later and potentially switch paths if you have better information then. There's a danger when switching from one thing to another that you never actually write much of anything substantial cause you're always in novice mode or reading books (I'm guilty of this with my recreational programming). To me, if it's something you're doing for enjoyment, that's not that horrible as long as you really do enjoy what you are learning. To others, that may be a serious problem. You might consider asking yourself what programs you want to write and set out goals. Many of the best programmers came at it more that way, I think (maybe minus the goals part -- I guess the best probably just do it without all the deliberation). They wanted to bring something into existence and found the topics they needed to learn. However you go, though, it's bound to be fun and rewarding, so don't worry too much. |
|
|||
Quote:
Quote:
As someone starting to learn to program, your goal should be learning how to best use the language to solve problems. This comes from lots of reading, lots of experimenting, & lots of reflection on how to do the same work again, only better. |
|
|||
Discussion has been split from its parent thread:
http://www.daemonforums.org/showthread.php?t=543 ...as discussion is not on favorite programming languages. |
|
|||
Thanks Ocicat , enlightening and zen-short ..
Thanks Thirdm , enlightening and stream-of-counsciousness that reminds of woolf and joyce .. while reading your post I remembered a friend of mine who bitterly had to divorce visual basic as he had to move to unix .. in fact despite being myself a total newbie it was me who introduced him to BSD World the way Enkidu introduced Gilgamesh to the world of Mortality and its Consciousness .. and here is where the shoe pinches , isn't it futile to learn sth you cannot use at a certain point in time .. some of you Nerds might argue that learning *any* prog-lge is advantageous in that it enables one to understand prob-solving dynamics and procedures and syntax and such .. isn't this a relative truth that occurs only in kingdoms like LISP or PROLOG .. while not feasible as far as VB & ASP are concerned .. as a newly-enamored bsdfan and as a non-programmer , I expect from a prog-lge to open up a door to contribute sth to the ZEN OS and its community .. .. I voted for c here http://www.daemonforums.org/showthread.php?t=543 still , I am not sure if c is the right for me as a zero-stage-newb .. I feel I still need clues from the experienced folk .. to start correctly .. and contribute .. Last edited by daemonfowl; 12th February 2012 at 11:40 PM. |
|
|||
Good stuff in this thread. fwiw, Eric Raymond also recommends Python as a first language.
|
|
|||
yes , the famous how-to-become-a-hacker article ..
Raymond is a linux man and he is still using python after so many years .. maybe this means that choosing a language influences the future of its user .. so my worrying Q is valid.. will DaemonLand benefit from pythonists at this stage ? will learning python be as beneficial to the BSD community as learning C for instance ? isn't C the gateway to porting ? .. |
|
||||
Application language choice and your underlying OS and architecture do not necessarily need to have a correlation. You might pick one or the other due to features, capabilities, supporting libraries .... but there may not always be a need to select a particular programming language, or perhaps, a particular OS.
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TIOBE language index: Python is the programming language of 2010 | J65nko | News | 5 | 12th January 2011 05:33 PM |
Why I can't select language from gdm? | fender0107401 | OpenBSD General | 6 | 11th May 2010 11:09 PM |
C language inventor spurns Google's language exam | J65nko | News | 4 | 22nd April 2010 09:07 AM |
Best Web Application Language | JMJ_coder | Programming | 24 | 25th November 2008 12:25 PM |
The language here | scottro | Feedback and Suggestions | 11 | 19th May 2008 11:54 PM |