[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 15 KB, 269x312, wolfgang pauli after the plastic surgery.jpg [View same] [iqdb] [saucenao] [google]
3180321 No.3180321 [Reply] [Original]

SO I am trying to fucking self-teach myself Calculus and discrete in order to be a better programmer, so that when I start trying to learn languages I will not be cargo-culting shit.

History: I failed precalc twice because I didn't give a shit. I have the textbook, the assignments, and a couple of graded tests. What I am wondering is if I should re-do them on my own time, and if there are books that are good for learning that shit, like one that is to that as SICP is to coding.

Many thanks.

>> No.3180336

>>3180321
You haven't even looked at any programming language yet?
You can start learning the basics of a language like python now. You don't have to know calculus or discrete to get started.

>> No.3180346

>I failed precalc twice

Just warning you that you're about to be called a retard by everyone in /sci/. Because of course everyone on /sci/ has a 170 IQ and and holds a Ph.D. in Theoretical Physics from MIT.

Advice: Read the sticky. Tons of resources for math. Also obtain (steal) James Stewart's Calculus Early Transcedentals.

>> No.3180349

for calculus:
khanacademy.com

for discrete:
http://freevideolectures.com/Course/2781/Math-215-Discrete-Mathematics/

>> No.3180353

>>3180336
This. When it comes time to really worry about things like algorithm efficiency, then you'll use that kind of math. Until then, you should stick to learning the basics of programming.

Hell, you probably won't EVER have to worry about that if you just remain a hobbyist programmer. Unless you study computer science (or, to a lesser extent, software engineering), you probably needn't concern yourself with squeezing the maximum efficiency out of your algorithms.

>> No.3180362

>>3180353
OP here

>you probably needn't concern yourself with squeezing the maximum efficiency out of your algorithms.

sorry but my perfectionism won't allow me to do that

>> No.3180371

>>3180362
You won't start off trying to optimize algorithms
You don't run before you walk

>> No.3180375

If you want to be a good programmer, work on programming while you're learning calculus. There's no doubt that math knowledge is important for programming, but you can develop an extremely strong foundation without worrying about anything but arithmetic and basic algebra.

This is what everyone else is saying so it seems like pretty agreeable advice. The books/videos suggested so far as great so look at those, but don't let yourself get lost in math without knowing how to program anything.

>>3180362

That's not how you learn to program. Even the most basic programs have a huge amount of room for increasing efficiency and you generally won't understand how to optimize them properly until you've been programming for years. Calculus might help, but having programming experience will help a lot more. If you honestly try to learn to program like that, you'll literally never get anywhere.

>> No.3180378

>>3180371

yeah

now you know why i failed twice

:(

>> No.3180380

These are sites invaluable:

>Project Euler
You need to use programming (most of the time) and math to solve the problems on the site.

>Learn Python (interactive) [learnpython.org]
Interactive site where you modify scripts in order to get a desired result. It's pretty new so it isn't quite complete in the latter problems.

>/scx/
808's programming sub.

>> No.3182379

>>3180380

thanks

>> No.3182416

I rarely use all that calculus I learned when I'm programming, and I've programmed everything from predator drones to cancer cell image recognition. The nature of a computer lends itself to using numerical analysis methods on datasets, not calculus solutions to equations.

>> No.3182448

>>3182416
Explain?

>> No.3182492

>>3182448
Take for example dead reckoning position systems common in most UAVs. These give positioning information by using multi-axis accelerometers.

We all know that to get position out of an acceleration vector equation you just take the double integral with respect to time across X,Y,and Z. However accelerometers don't spit out an equation, they spit out a new reading of what the acceleration happens to be every few milliseconds. You've got to keep track of velocity by constantly adding the new acceleration readings multiplied by the time between them to a running total, and do the same thing again with the velocity variable to get position.

Its not that there are zero programming challenges that require calculus. Its just that calculus is of zero usefulness for 99.9% of them.

>> No.3182794
File: 390 KB, 467x607, ChloëMoretz.png [View same] [iqdb] [saucenao] [google]
3182794

Hey guys, I'm in a similar situation.

I didn't give a damn about math for years 'cause YEEEARS of bad teaching and lazy attitude and classmates that made me hate that.
Now I'm changing my mind, I'm study on KhanAcademy and improving my skills.

Since I'm interested in programming, can you suggest me a good programming language that suits good with math skills? (to motivate me in studying more math and learning a useful language as well)

>> No.3182807

bump

>> No.3182814

>>3182794 can you suggest me a good programming language that suits good with math skills?

Matlab was created so people with a math background could program without learning much new. Everybody else can't stand it though.

>> No.3182830

>>3180362
Dude, even with the knowledge, you will actually NOT optimize every piece of code that you write.

Optimizing takes a ton of time, and as long as you aren't making a program for a domain that has performance as a main driver, you won't bother to optimize it.

Also, you're better off taking a course in algorithms and data structures

>> No.3182837

>>3182794
>can you suggest me a good programming language that suits good with math skills?
Any programming language should fit the bill

>> No.3182841
File: 61 KB, 300x298, hipsterkitty-notapprove.jpg [View same] [iqdb] [saucenao] [google]
3182841

>>3182814

thanks, but something that's not proprietary? Also, I mean a programming language that's useful also to program generic software.

>> No.3185652

>>3180362
>sorry but my perfectionism won't allow me to do that
>History: I failed precalc twice because I didn't give a shit.

You are a stupid Coon.

>> No.3185769
File: 318 KB, 566x650, delicious-lambda.png [View same] [iqdb] [saucenao] [google]
3185769

> learning programming
OK, guys. Here's the deal. There are, broadly, two types of people that program.

One you would more easily call a "plumber." They take some language with libraries and jam shit together until it works on whatever small problem they're trying to solve. Here it doesn't really matter what language you learn, so long as it has a lot of libraries. Python, perl, java, javascript, ruby... fuck, even C++. I would not abuse anyone who wants to plumb. It can be rewarding. Mostly it is frustrating, because common plumbing languages are loaded with syntax. They are loaded with syntax because people have tried to solve hard problems with a compiler/interpreter, leaving only the plumbing. This is great if you are already an expert hacker. It is not so great if you aren't.

The other is a person who is interested in programming as the art of getting computers to solve problems. The best path for this is probably going to go through SICP, HtDP, or both. They happen to use a lispy language for illustrating IDEAS because lisp can be pared down to a very simple core which, once upon a time, was Scheme. The ideas presented are almost never specific to a lisp-like language. A lisp-like language was chosen because it had a very low barrier to entry for non-plumbers, so the instructors could get to the meat of the art of designing programs.

>> No.3186210

>>3185769
Whether a language is suited for algorithms or "plumbing" has nothing to do with syntax. E.g. APL and Haskell both have a lot of syntax but they're certainly not "plumbing" languages. OTOH, Lisp would make a perfectly good plumbing language if more libraries had Lisp bindings.

>> No.3186235
File: 519 KB, 1280x1699, 1302920898421.jpg [View same] [iqdb] [saucenao] [google]
3186235

>>3186210

>OTOH, Lisp would make a perfectly good plumbing language if more libraries had Lisp bindings.

http://www.quicklisp.org/
http://www.cliki.net/index (Under "Free Software Lisp libraries")

Common Lisp has had a hard time because historically Lisp was used for mental masturbation, but this is not the case anymore.

>> No.3186263

>>3186210
Haskell is totally a plumbing language. It's taken plumbing onto the functional plane, but it's nevertheless a plumbing language. Haskell is like perl for functional programming fans. I like the comment in wikipedia:
> Bastiaan Heeren, Daan Leijen, and Arjan van IJzendoorn in 2003 also observed some stumbling blocks for Haskell learners: "The subtle syntax and sophisticated type system of Haskell are a double edged sword — highly appreciated by experienced programmers but also a source of frustration among beginners, since the generality of Haskell often leads to cryptic error messages."

Really, I don't disparage plumbing. It's how a lot of people get into programming, and how most real programs are made (for certain definitions of real).

> OTOH, Lisp would make a perfectly good plumbing language if more libraries had Lisp bindings.
It might. Certainly, that's what the PLT group thinks with Racket, and Chicken Scheme has going with eggs, etc. Actually I think the PLT group has a slightly different aim, but it's close enough for government work.

You'll note that CL was on the verge of being a plumbing language, and as it tried to do so it became loaded with syntax. (Iteration macros being just the tip of the iceburg.) Scheme seemed to step back a bit and say, "We're not a general purpose language, unless your general purpose is experimenting with little languages." (Which is where I think the PLT group wants to go.)

>> No.3186427

>>3186263
To expand a little bit: the correlation between syntax and plumbing is not accidental. In C++, abortion that it is, syntax was added to C to avoid hand-rolling vtables in an attempt to make programs scale better. To help encourage efficient allocation, C++'s faux-OO system tried to engineer its way around incomplete typedefs in C. (Forward declaration.) This interacts in a lot of scary ways will all the other retarded additions and IMO it was horribly unsuccessful at achieving its own goals, but for all that it's still probably a better C, if you manage to stick to C-like programming and don't probe the dark corners of the fractal that is C++ grammar.

Lisp is also a better scheme (which is funny, since they came about in the other direction), and at the very start if you want to compare lisp and scheme you come across the function environment issue, requiring (surprise!) syntax. A complicated macro system like CLOS is of course megatons of syntax.

I'm not saying "Given syntax, you have a plumbing language," but "Given a plumbing language, you have syntax." Common things that are easy to think about but hard to do right often get built into a language. (With, sometimes, mixed success.)

I know almost nothing about APL, btw.

>> No.3187569

>>3186263
> Haskell is totally a plumbing language.

Either you omitted a "not" or you don't understand what "plumbing" means in this thread. Apart from anything else, a plumbing language needs libraries to plumb together, and Haskell has even fewer libraries than Lisp.

Also, most libraries have tend to have impure (stateful) interfaces, which means that any Haskell bindings need to be in the IO monad, which is rather "unHaskell-like". If 90% of your program needs to be in the IO monad, you chose the wrong language.

> how most real programs are made (for certain definitions of real).

Right. If Haskell was a plumbing language, you'd expect to see more real programs written in it. The usual refrain is "Haskell wasn't designed for writing programs; it was designed for writing academic papers". And that usually comes from people who actually use Haskell.

Apart from the lack of libraries, the biggest problem with writing real programs in Haskell is that space complexity (memory usage) is not only not formally defined but usually not even sane (e.g. iterating over a structure will probably use memory proportional to the size of the structure unless you specifically prevent it by using "seq").

>> No.3187580

> Given a plumbing language, you have syntax.

Tcl is totally a plumbing language and has almost no syntax (the language's syntax is specified in its entirety in the man page, which is only 156 lines (not including header, footer and blank lines).

Perl is totally a plumbing language and has a shitload of syntax.

APL is the opposite of a plumbing language (I don't know if it can even invoke external commands or access external libraries) and is almost entirely syntax (to the point where you need a terminal with loads of mathematical symbols to even type it).

>> No.3187687

>>3180380
thanks