Discuss programming here.
If you want to fully understand programming conceptually, in the long term, I think Structure and Interpretation of Computer Programs (SICP) is the best foundation. The 1986 MIT lecture videos by the SICP authors, Hal Abelson and Gerald Sussman, are free on YouTube.
If you find SICP too hard, use Simply Scheme first. It was created by Brian Harvey (of UC Berkeley) for the purpose of helping people get ready for SICP.
I'm familiar with Harvey, not Abelson and Sussman. UC Berkeley took down 20,000 free lectures after 2 deaf people complained that there were no subtitles. You can still find Harvey's SICP lectures on Archive.org or uploaded to YouTube by third parties.
There are many reasonable and effective ways to learn to code. If you prefer other material, that's OK.
Messages (14)
I'm combining *Simply Scheme* with https://poignant.guide to learn the fundamentals of coding as well as Ruby. It was great advice.
My reason for doing this is that I always run in to the constraint of not having good enough coders (or any at all) for my projects. Now I want to learn myself since it also helps in my other long term goal of learning philosophy.
If you are new to coding as I am (I had some failed attempts with Python before), the above is a good way.
Curi, if you have written and / or made any video on anything on how to better learn to code please do let me know.
Curi, why do you recommend Ruby over Python (or any other language)?
I don't strongly recommend Ruby. Other stuff, e.g. Swift or javascript, is OK. Ruby has better design principles (e.g. the consistent everything-is-an-object design vs. Python's inconsistent mix) and is more lisp-like and functional-programming-friendly than Python, but it's not a huge difference (they are reasonably similar).
I'm told that Clojure is a good option for a modern lisp, though I haven't used it because I don't do a lot of coding lately.
The larger the project, the more important it is to use a language that is fundamentally better. Ruby is usually fine for small projects and is better than e.g. C++ or Java for most larger projects, but it's not ideal. For a really complicated project, the best language would be a lisp or something else with something fundamentally good about it. Ruby and Python (and Swift, Javascript, Perl, PHP, Lua, etc.), don't really have fundamental advantages (unless you compare to lower level languages like C or Java), they're just pretty convenient for small stuff (except PHP, don't ever use PHP).
Also, in the longer run, it's not important to learn programming using the same language you would do a project in. That's only a shorter term benefit. Once you're good at coding, learning new languages is easy unless they have major stuff that your previous language(s) lacked (in other words, if they have stuff you haven't yet learned about – then you'd have to learn more, but learning to do the same stuff you already do with a different language is generally easy).
Thanks, Curi.
Since most of what I will be doing is considered small projects, Ruby it shall be.
Btw, why never use PHP? It seems to be the most popular framework:
https://www.similartech.com/categories/framework
PHP is just terrible. Awful to use, awful design, total mess. It's far worse than sorta-comparable languages like ruby, python, perl, etc.
can u teach me how to hack stuff
Appart from DD's books, what books / sources do you recommend for learning more about how computers and computation works for someone starting out to learn about this?
Depends what you want to know. I like SICP and Feynman's lectures on computation.
#13307
Fundamentals regarding how it works mostly. I'm reading *Simply Scheme* instead of *SICP* as I found *SICP* too advanced for my present understanding. I will make sure to watch Feynman's lectures on computation. Thank you.
> I will make sure to watch Feynman's lectures on computation.
That's a book.
Another way to learn programming
Elliot referred to "many reasonable and effective ways to learn to code".
Following that thought ...
One overall approach to learning programming is to start with a high-level language. As many of the posts above suggest. That's fine, and good.
Another approach is to start with a very low level language: assembly code.
To take that approach, this is an excellent book:
http://www.bartlettpublishing.com/site/catalog/programming-from-the-ground-up
>> I will make sure to watch Feynman's lectures on computation.
> That's a book.
Thanks. I was hoping for it to be both as Feynman is a great lecturer.
I noticed in SICP
ch 1.1.7
> The contrast between function and procedure is a reflection of the general distinction between describing properties of things and describing how to do things, or, as it is sometimes referred to, the distinction between declarative knowledge and imperative knowledge.
"declarative knowledge and imperative knowledge" is roughly equivalent to denotation and knowledge structure respectively.
https://fallibleideas.com/knowledge-structure
If you're thinking about learning to code, I think this chatlog from discord is worth reading:
> [1:58 PM] Kurapika(Mentally Untouchable): How did u guys learn to code? I am not sure how to start
> [2:00 PM] Kurapika(Mentally Untouchable): I took a web dev class a while back but thats it
> [2:00 PM] Max: I googled how to make a login page in PHP and tried to read some books (wasn't too successful) -- that was 15 yrs ago tho
> [2:00 PM] Max: Do you want advice on how to start?
> [2:00 PM] Kurapika(Mentally Untouchable): yeah
> [2:00 PM] Max: If so, why do you want to learn to code? And do you have anything in mind that you want to build?
> [2:01 PM] Kurapika(Mentally Untouchable): not really
> [2:02 PM] Kurapika(Mentally Untouchable): I do have ideas on how to automate specific stuff I do but I am not sure how I go about learning it.
> [2:03 PM] Kurapika(Mentally Untouchable): Also, making scripts for games may be useful. I just was interested in developing a relevant general skill to have.(edited)
> [2:06 PM] Max:
> scripts for games
> This is a broad subject. e.g. autosplit stuff for speedrunning is done in C#; automation (bots) can be done in almost anything, including autohotkey on windows (which is well suited for it -- though there are edge cases). Lua is used in lots of modding interfaces (though there's a lot of variety).
> [2:06 PM] Max: Automation like IOT stuff is often done in python
> [2:06 PM] Max: FYI there's some relevant threads on curi.us e.g. http://curi.us/2210-programming-discussion
> Programming Discussion
> Discuss programming here.
>
> If you want to fully understand programming conceptually, in the long term, I think Structure and Interpretation of Computer Programs (SICP) is the best foundation. The 1986
> [2:07 PM] Kurapika(Mentally Untouchable): Oh, ok
> [2:08 PM] Max: In general there are lots of structured resources for learning to code (like Simply Scheme which curi recommends)
> [2:08 PM] Kurapika(Mentally Untouchable): Ill take a look thx
> [2:09 PM] Max: If you don't have an enduring reason (your motor) to learn anything particular you might find that's an issue. Having something particular you want to make or do can help w/ that (and help choosing what to learn)
> [2:12 PM] Max: Scheme is a good language to learn if you want to learn some good fundamentals for programming. I don't know what the ecosystem is like, though, so I'm not sure how useful it is. I think there's a lot of flexibility but you might find some large gaps depending on how you wanted to apply it. It's also structured differently to a lot of common languages (I think this is a good thing) but that means there will be extra stuff to learn if you wanted to pick up a new language with a different style
>
> (Scheme is a functional language and Python, for example, is object oriented)
> [2:13 PM] Max: What to learn is highly dependent on what you want to get out of it, though. E.g. If you wanted to do automation stuff with IOT devices then I think the fastest way to do that is probably via Python.
> [2:14 PM] Kurapika(Mentally Untouchable): How hard is it to pick up languages with close function to each other?
> [2:14 PM] Max: Websites are all javascript, basically (HTML and CSS are trivial to learn by comparison, you don't need to worry about them as much unless you're getting into really polished stuff)
> [2:14 PM] Max:
> How hard is it to pick up languages with close function to each other?
> @Kurapika(Mentally Untouchable) Do you mean a similar purpose?
> [2:14 PM] curi: most website code is not JS
> [2:14 PM] Max: You mean b/c of the backend?
> [2:15 PM] curi: yes. you can create a website using not-JS. most ppl do. so it's misleading
> [2:15 PM] Max: Backend is another kettle of fish, I wasn't thinking about that. Just UI
> [2:16 PM] Kurapika(Mentally Untouchable): Depending on its use you have to use a variety of languages right? I can’t just learn C and be able to code everything. If I want to switch from something like html for example to javascript. Is there still a learning curve you have to overcome?
> [2:19 PM] Max:
> yes. you can create a website using not-JS. most ppl do. so it's misleading
> I'm not sure about most. Also IDK if you're talking about options like Elm, coffeescript, typescirpt, etc which transpile to JS.
> [2:21 PM] Max:
> switch from something like html for example to javascript
> they work in tandem. HTML describes structure of the page. CSS handles styling/appearance stuff, and JS handles behaviour (like getting data from an API or reacting to a button press). You'll always need to know about HTML and CSS to make a website. There are ways to not deal with them directly, but you'd almost certainly use HTML's components; you still end up needing to know about HTML.
> [2:22 PM] Max:
> Depending on its use you have to use a variety of languages right?
> That depends on what you're building, what properties you care about (e.g. speed, reliability, etc), and context (like team/business/legacy/whatever)
> [2:23 PM] Max: you can almost build anything in a few select languages; that's thanks to recent developments like WASM (Web Assembly -- basically machine code for websites; other languages compile to WASM code). It's a bit unrefined atm tho
> [2:24 PM] Kurapika(Mentally Untouchable): Oh, I was specifically referring to the learning curve for switching languages. How hard is it to learn a new language when you have been using one for a while. Like obviously its harder when you have to learn languages which function in a different way.
> [2:24 PM] Kurapika(Mentally Untouchable):
> you can almost build anything in a few select languages; that's thanks to recent developments like WASM (Web Assembly -- basically machine code for websites; other languages compile to WASM code). It's a bit unrefined atm tho
> @Max oh, okay
> [2:24 PM] Max:
> learning curve for switching languages
> It depends on your fundamentals and how similar the languages are. I can do it pretty quick but have also used like 10+ languages in production (over many years mind)
> [2:25 PM] curi: basically all languages can build any type of software, and most popular languages work pretty well for most types of software
> [2:26 PM] curi: most languages function in broadly similar ways
> [2:26 PM] Max: It get's easier, but it's hard to switch the first few times. Esp if the languages are v. different. There are common concepts between ~all languages tho, so it's not as hard as learning a language the first time -- generally
> [2:26 PM] Max:
> but it's hard to switch the first few times
> The way you get around this is really good fundamentals btw. It's hard mostly b/c ppl don't know much about programming in general. It's almost like learning from scratch again. (At least that's my memory of it)
> [2:27 PM] Kurapika(Mentally Untouchable): Yeah, I was looking at the stuff curi linked and it looks its based around learning fundamentals(edited)
> [2:27 PM] Max:
> Curi
> fyi curi not Curi
> [2:29 PM] Max:
> looks its based around learning fundamentals
> Yeah; I mean the page I linked before starts:
> If you want to fully understand programming conceptually, in the long term, I think Structure and Interpretation of Computer Programs (SICP) is the best foundation.
> [2:29 PM] Kurapika(Mentally Untouchable): I’ll go look over that stuff for now. Thanks for helping me find a place to start.
> [2:31 PM] Max:
> I’ll go look over that stuff for now. Thanks for helping me find a place to start.
> Cool. There's more on curi.us btw. If you come up with new questions you should post them here or curi.us btw; don't leave them unasked.
> [2:31 PM] Kurapika(Mentally Untouchable): Oh, okay
> [2:34 PM] Max: If you have questions while you're learning and don't ask them, then you risk making errors in your foundation. Errors in your foundation will compound and make future learning harder, and eventually impossible (when you're building on that foundation particularly). An easy way to avoid errors like that is to write down every question / doubt you have while learning. You can ask them to someone or keep them as notes until you learn more, or whatever, just don't forget about them. Questions/doubts indicate that an idea is missing (you haven't learnt it yet) or maybe there's a problem with the ideas you're trying to learn (or some other options). The point is to avoid making mistakes and getting stuck; asking questions is part of avoiding that.