No.182
I'd go with python as I feel it's more forgiving towards new programmers. You can focus on the wider programming concepts and not get too bogged down with syntax and low level details like memory management. Very easy to pick up but you lose some degrees of control as a compromise. Also, in case you were wondering, javascript is nothing like actual java which you're more likely to encounter in computer science academia along with python. (I wouldn't recommend java to start off with)
I guess you can look at it depending on what you want to study as well:
computer science - python
web dev / IT training - javascript
No.183
Just pick one and stick with it for a while, it doesn't really matter.
No.191
>>181Do you care more about programming for the web then JavaScript or on like Linux environments then Python. If you are interested in AI you should also consider leaning more towards for Python.
No.192
>>191The problem is that, for better or worse, my answer is "all of the above." It seems front-end web development is the most accessible means of earning the income necessary to finance my deliberative, independent study of artificial intelligence, machine learning, and natural language processing.
Therefore I intend to learn both JavaScript and a more general purpose programming language like Python, but was concerned that my learning JavaScript first would instill bad habits or teach me to become a bad programmer.
If I do learn JavaScript first, I am open to discarding Python in favor of learning a functional programming language like Scheme, Lisp, or Haskell.
I kind of feel lost.
No.193
>>183This is the best answer
No.217
>>181If you're going to do "academic" programming then pick Python. It will still be useful to you 5 years from now.
No.309
If one does learn JavaScript first, does lain have any advice on how to make the best of it? I don't want to let it make me a bad programmer.
No.365
>>190>>309The only thing I can really suggest to beginners (regardless of language) is learn how to use a debugger. Then you can step through a program and trace all the execution steps to give you a basic idea of how it works (documented code is kind of a luxury in the wild). Try this on a small, well written program and see if you can write something similar on your own.
If you're completely new to both, I'd still start off with python to get the basics down and have a more robust language to use later. Outside of academia, python is widely used in games development and as a sort of general purpose glue as well. Once you get a firm grasp on programming concepts you can transfer all that over to the wilds of javascript (or some sane form of it like AngularJS).
See this article:
https://whydoesitsuck.com/why-does-javascript-suck/ there's some author bias there but you can see a ton of "gotchas" that will mess up your learning from level 0.
No.372
>>181poor girl with face plastered all over the internet
No.374
>>181Not OP here, but also struggling with the same question of choosing where to start. My issue is a bit different though, and deals with a question that's kind of impossible to answer objectively, so I'm more looking for a general perspective that would help with a decision.
I kinda wanted to know more or less how long it takes to learn a simpler language, say Python, compared to a more complex one, like C, for example.
I ask this because what I actually want is to understand the deeper aspects of computer science some day, and I don't have any professional ambitions for the time being. So I would prefer going straight into something more complex. That's what I want the most.
On the other hand, starting with something simpler might help me get a better understanding when I move to more complex aspects, and it would be cool to start actually applying what I learned sooner.
I have experience with pure and structural logic (philosophical, not mathematical), I can read books quickly and still understand them well, and I'm pretty good at organizing my studies and creating methods to improve them.
I could apply about one to two hours a day to learning.
So in these terms, could someone give me a very rough estimate of where I'd be in, say, a year, if I chose a simpler, more practical language, and the same if I went straight into a more complex one? Just a general idea about this, coming from someone who already learned, would help me a lot.
No.375
>181JavaScript is in your browser, you can start learning it at any time with no special tooling. It's a pain in the ass but it's a start. There are a boatload of resources for learning JS (Eloquent JavaScript, as mentioned earlier, is great). Just understand that its quirks and faults don't necessarily translate to other languages and it has unexpected side effects and behaviours.
Python is easy to install and has plenty of resources available. Pick up Python Crash Course from No Starch Press and the Python 3 Cookbook from O'Reilly. Focus on Python 3. With those two books, you'll have python under your belt in no time.
"something useful now" depends on what you want to do with your code. There are worse places than JS and Python to start with. Pick up a book or a terminal and just get started.
>374Just dive in and don't worry about time. If you stick with programming, you'll be learning more everytime you sit down in front of your editor. Both C and Python have aspects that translate well to one another. Python is probably faster to get into and provides more pre-baked libraries (at least grouped in one place). Other than learning about pointers and memory management, C won't teach you anything other than a procedural programming style. Those hurdles can be a giant pain in the ass when you're learning.
Why not learn both at the same time? Grab the Python books I mentioned and rock through this C guide:
http://www.imada.sdu.dk/~svalle/courses/dm14-2005/mirror/c/
>> So in these terms, could someone give me a very rough estimate of where I'd be in, say, a year, if I chose a simpler, more practical language, and the same if I went straight into a more complex one?I'd argue that you'd be in the same spot in a year with either language. With Python you'll learn both imperative and object oriented programming. With C, you'll walk away with an understanding of pointers and memory management. I think Python will let you do more easily and help you find a direction that you'd like to continue learning.
Overall, I think that one's first language is irrelevant. Just jump in and start programming and learning. A first language is more about learning the process of programming than it is about finding the golden sledgehammer that you'll use for the rest of your programming career.
No.376
>309
Eloquent JavaScript covers a lot of this.
No.377
>>374Based on your goals and skills I would honestly recommend reading SICP. It's somewhat hard, but if you are comfortable with reading textbooks and doing exercises, it will teach you lots of things that's considered "advanced" while also giving you a very solid foundation.
But if you need to choose between C and Python, I would say Python. With C you need to pay attention to some irrelevant details, so writing complex software can get really uncomfortable. With Pyhton you can more easily write big and complex things as you won't have to deal with the low level aspects of C.
No.378
>377
MIT OpenCourseware has CS classes that go along with SICP. They are free to watch.
No.379
>>375>>377Thank you, those two answers absolutely hit the nail in the head. I guess I begin to understand now that the main points are not in the differences between the languages but how they help you understand the subject itself.
I just read the introductions, prologues and some of the first chapter of SICP, and I'm pretty sure this was exactly what I was looking for. Checking the names of the chapters does daunt me a little, as sometimes I can't even understand those, but the style of the text and the clarity of the ideas as far as I went had me completely taken. I couldn't put the book down now, even if I wanted to. So I guess is just a matter of going ahead and persisting now.
Will also save those materials on python and C and look into them as I go along. I don't know if I'm just over-excited with what I read, but I really feel this was a definite kickstart to finally start learning for real.
Only one other thing I'd like to ask is if there's some kind of specific dictionary I should get? Sometimes the authors throw some technical terms that I feel they expect you to know a little more about what they mean. Should I just go to wikipedia every time, or there's something more adequate?
No.383
>379
wikipedia or your favorite search engine should be fine. maybe look into some books on algorithms (MIT's book is spectacular), data structures, and discrete mathematics if you want a more erudite understanding. the previously mentioned MIT Open Courseware is pretty useful as well. lots of CS class material available there.
No.400
more academic programming? go buy a copy of SICP and start leanring scheme. (racket will be a good enough implementation of scheme to write the code in SICP in)
Then when you are ready, make the switch to Common Lisp, I personally suggest using the sbcl compiler for good performance and decent extensions. you can also switch to clojure if you want to exit academic programming and get a job wirting lisp code.
No.437
>>400>start learning scheme>racket will be a good enough implementation of Scheme to code SICP inWhy not just use the MIT GNU Scheme implementation of Scheme?
No.447
>>400>>439How do you code lisp if you don't use GNU Emacs?
I've always found that Emacs is just about the only decent Lisp editor out there. Unless you happen to know of a better one.
Or do you use Vim? do you have a good workflow with it?
No.448
>>447I suggested racket because it has a built in editor (drracket) that makes it easy for beginners to debug their code, and it has extensions to make the code in sicp work perfectly
No.479
>>478my opinion would be that probably you could learn a lot and do some meaningful, useful stuff in a pretty short time. python isnt terribly arcane, and is pretty readable it seems, even if you dont ''know it''.
some prior programming experience surely will help, though.
No.491
>>478I'm the one who mentioned Python Crash Course. Read a few chapters a day and focus on practice and you can conceivably be using Python in a week.
No.492
I haven't done any programming in a few years,
I am learning python, damn its all coming back.
No.495
>>478You'd have to define "decent" , cause reading a 500 page book and understanding the material is definitely possible in a week.
No.496
>>495I'm not too sure how to describe what I meant by decent. I meant more along the lines of a basic program or something.
No.589
>>181Its really stupid to learn Javascript if youre not going to do web programming. I do web programming and I like Javascript a lot, but its not a general purpose scripting language and no, Node is not sufficient for providing libraries for general purpose scripting.
Python is really a bad language. You dont realize how bad it is until you learn it at a deep level and realize how poorly and inconsistently deisgned it is.
Ruby is a much better choice than Python. The entire language fits a very consistent design model where you can learn how the entire language fits together and will always understand how everything works instead of memorizing an API by rote. The best book for learning Ruby is "The Well Grounded Rubyist", this book teaches how Ruby works at a very low level so you will always understand how everything is scoped and interfaces with each other.
Julia is another good choice, especially if youre doing data or scientific programming. It is very similar to Javascript and a lot of the syntax is a direct rip-off of Coffeescript. It does not use OO but is more based on passing data to functions.
No.594
What do you want to do with it?
If you're looking to get a job, I'd recommend Javascript. Lots of web dev work to be had with that.
If you're just learning for fun or hobby projects, or want to get a better knowledge of programming, I'd go with Python.
No.595
This might help:
https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2017The most recent survey puts Python very high in terms of popularity and job opportunities.
I am a software engineer writing Python, and I see a lot of use for it in various roles.
JavaScript is a good language too, with probably just as many opportunities. I think you're in the lucky position of just choosing through preference.
No.607
Python is more fun imo.
No.665
>>181Been a few months, how are things working out OP?
No.736
Neither. Learn java and from there expand into scala.
Why?
Java isn't hard to learn, it's strongly typed and object oriented. It's a lot easier to go from a language with typing (java/scala/c++) to one without (javascript/python) than the other way around. Also a lot easier to go from a language with objects (java, python) to one that has them nailed into the side as if they were put there by a drunk carpenter (javascript).
Once you've learned java, scala is a lot easier to learn and broadens your horizons to functional programming and all kinds of things. You said you wanted to move on to more academic languages, scala was created by academics researching programming languages. It can do pretty much everything any other language can do. It has a god damned Turing complete type system.
No.747
>>374The problem with learning Python (in any significant depth) as your first language, is that it abstracts away too much of the machine. While it's a fine choice for getting the absolute basics (flow control, inheritance, etc) it does brand new students a disservice by allowing them to make things happen without understanding why they're happening.
Yes, C (and by extension assembler languages) are old, largely unsafe, often obtuse, and you will struggle to even write a file at first. However, what they teach you about computer architecture is invaluable and will inform and improve your coding skill in all other areas. You will be forced to understand the stack (down to specific frames, with assembly), how heap memory is mapped out and allocated on *nix systems, and how to take advantage of (and crack) software with unintended side effects.
To answer your question, you could study python for a year and reasonably expect to find paid work writing it (assuming a portfolio and otherwise good resume). You won't find many people willing to pay for a C/embedded dev with a year of experience under their belt, but you will find that every language you learn after C and ASM will be easier for you (except for Haskell. Fuck Haskell). I learned with pic related, then read K&R, then moved into the JVM world. No ragrets.
No.757
>>747I'd like to add my own thought on to this. I started with Java, but after a while of being stuck on the JVM, I wanted something more.
High level languages, like Python and Java can only do so much. They rely on so many levels of abstraction away from the CPU that there is no longer any understanding of how a computer works. (WTF is a linker? Why can programs run outside the JVM/Python interpreter? Why are garbage collectors magic?)
I'm partial to the bottom-up approach, starting with basic circuitry, transistors, and logic gates, but that takes extra time to see results.
The solution is to do both. Learn a high level language for instant results, but if you want to be more than just a code monkey, do not neglect the fundamentals of computing.
No.761
>>747I actually failed to get into programming with python for this reason. I didn tknow how the fuck I was supposed to know what anything would do when I didnt know more or less what it was doing.
No.763
A problem I see starting with low-level languages is that it takes so long to get soykaf done that beginners will likely lose interest. The same could be said of languages with anemic library ecosystems.
On the typing vs non-typed, besides languages like Scala and Ocaml, I don't really know any good high-level ones with an emphasis on types (Haskell is not a beginner language, ever). I figure both Ocaml, Scheme and Rust primarily rely on C libraries so that kinda makes the beginner aspect moot.
No.765
>>763if it seems like that the problem lies with what you want to do, or at least what you want to teach beginners to do. Ive made a few useful programs with C very shortly after learning the basics, that I actually use.
No.777
>>776a reimplimentation of cat and a soykafty text filter for ratox that matches with strspn. Works though.
I'd also cite that both C books ive read(read one, reading other) have exercises. K&R seems specifically structured to have you reusing your work from previous exercises too, and that creates a feeling of continuity and progress.
No.780
>>779The little Lua I know I learned here:
http://moonshinejs.org/editor/It seems like a neat little language but I haven't really used it for anything.
No.786
>>736> It's a lot easier to go from a languagewhich one did you learn first? typed on untyped? oo or not oo?
No.860
>>859C.
You will have to deal with it one way or another.
No.861
>>859It doesn't matter what you start with, as long as it won't make you simply give up out of frustration or some other reason. Lisp is as good as any language.
However, if you are really brave and want a deep understanding from the bottom up, you can give
Programming from the Ground Up a try. It uses assembly so it's not going to be much help with learning other languages but it will make you really understand what your computer actually does.
No.864
>>181well if you want to get into academic programming right away, there's always julia. it's basically python with some functional programming aspects and better design decisions. kind of purpose built for simulations/statistics/data processing type things.
>js vs pythonpython. js is pretty meaningless without the context of a web browser (inb4 node.js.. i know…). if you just want a good general purpose language for quick results, python's your best bet. of course the real answer is "learn both" but that will come with time and you have to start with something.
if you're really serious about this, start with c. that's what they do at the good CS schools.
No.868
>>400http://www.ccs.neu.edu/home/matthias/HtDP2e/SICP is great but I'd recommend this for beginners, especially if you're going to be using Racket
+1 for DrRacket makes everything easy
No.869
>>864>that's what they do at the good CS schoolsA lot of them start with Java.
which one are you thinking of?
No.870
>>864>if you're really serious about this, start with c. that's what they do at the good CS schools.I really don't understand people's fondness for recommending C as a first language. As a language it has very little to recommend, and the requirements of manual memory management can be a serious distraction and nuisance to beginning programmers.
I suspect it stems from the widespread mythology around lower-level programming, that it's somehow more "real" than higher level programming. I believe that's a serious mistake - programming isn't fundamentally about how computers work, and prioritizing understanding computers over understanding programs is doing a disservice to people learning how to program.
No.896
>>870>programming isn't fundamentally about how computers work, and prioritizing understanding computers over understanding programs is doing a disservice to people learning how to programThis. This is why you read a book called
Structure and Interpretation of Computer Programs or
How to Design Programs, not one called "Java 101" or something.
No.897
I would recommend Python as a first language. The syntax is quite easy and it can be used in a lot of different fields.
You should learn some basic Python, then classes and then functional programming.
For me programming is more than just learning the language, you should also look into maths, how computer works (understanding microprocessors etc.) and stuff that comes in handy, for example if you use Linux learn Bash, Powershell if you use Windows. Learn a little about your operation system and networking.
I know this sounds like a lot but you should take small steps, nobody can just work through one book and be a good programmer. It takes times but when you are able to break down problems and understand the system "as a whole", it''s an amazing feeling and it's really worth it.
No.899
>>897>Powershell if you use Windowsuse bash in the linux subsystem for windows