[ 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: 925 KB, 1280x960, coding.jpg [View same] [iqdb] [saucenao] [google]
5749230 No.5749230 [Reply] [Original]

What is coding?
How does it involve math?
If I know nothing about it, how soon will I be able to learn a language? (Say I take a few hours out of my day in the morning/night to learn a language)

>> No.5749244

>>5749230

get a book and start writing the examples. everyone.

i started with Perl a few months ago and i still do not quite get it but i can look at source now and have some idea whats going on.

>> No.5749246

>>5749244
oops *every-one

>> No.5749252
File: 108 KB, 306x388, 1368121159089.jpg [View same] [iqdb] [saucenao] [google]
5749252

How soon?
It can take less than a second or a couple months.

I mean, quantum physics, right? There is a chance you suddenly learn the notation.

http://www.youtube.com/watch?v=nLzjm9E1hwg&list=UU0wTxcvWAlCP7CtZxAb8Azg&index=39

>> No.5749257

>>5749230
>What is coding?
giving a computer a set of instructions (though these instructions can become very complex fast).

>How does it involve math?
computers run on math and logic, but you don't necessarily have to know how. many programs can be made without using any math directly.

>how soon will I be able to learn a language?
I'd suggest starting with a simple language like Python. The code is very easy to read and write. From there transitioning to a language with more complex syntax will be easier since you're already familiar with programing.

>> No.5749258

>>5749244
You think everyone should know how to write codes?
I think it's going to become like the US customary system. In this case someone will eventually make a program that writes everything for you.
Am I just dumb?

>> No.5749270

>>5749252
Why does the cowbell on this sound so familiar?

>> No.5749288

>>5749257
After say Python, how soon could one reasonably learn C or C++?

>> No.5749287

>>5749230
Go on code academy or a similar site, learn Python to get a feel for the basics from a useful all purpose language.

Then try out a functional programming language like Haskell or SML, then you'll see how you can apply mathematical thinking to coding.

>> No.5749294

>>5749288
Why are people always so obsessed with C and C++?

>> No.5749299

>>5749288
As soon as possible, really.

>>5749294
Because pretty much everything that needs heavy computing is coded in them.

>> No.5749305

I'm taking my first coding class at my uni and they start us out learning c

>> No.5749309

The correct answer here is that learning these languages gives you valuable insight into what programming actually /is/ - what keywords actually do, how memory is allocated, how the compiler functions, etc, while still remaining a relatively high level language (ie not assembly).

>> No.5749312

>>5749294
what this anon said >>5749299


you know any good online resources for learning this stuff? I have downloaded some books and have some sites saved so that I could start learning this stuff as soon as my exams are over.

any help is appreciated, just want to make sure i havent missed out on anything obvious

>> No.5749313

I started learning Python about 3 months ago, couple of hours per day. I had some previous background in it but that was years ago and I pretty much started from scratch. I'm no saying I understand everything still, but like >>5749244 said, I can look at an unfamiliar code and work out what it does.

It goes much faster if you have a goal that you want to achieve.

>> No.5749318

>>5749258
A program writing everything for you isn't something I can see happening. What will happen, though, is programming languages will become easier and easier to write in over time until programming isn't much of a skill anymore. This does not include very low level stuff like writing a kernel.

>> No.5749316

>>5749299
Yeah but why?
C++ is a huge clusterfuck and there are many alternatives that allow the same level of optimization without being so bad

>> No.5749321

>>5749312
Lurk the DPT threads on /g/, ask questions whenever you're confused. There's a set of guides they have bundled in a torrent, just ask for them.

Look in the catalog for an upside blue anime girl.

>> No.5749326

>>5749318
>A program writing everything for you isn't something I can see happening
We already have code that can generate code algorithmically.

>> No.5749332 [DELETED] 

http://books.gentoomen.org/

>> No.5749333

>>5749330
>using the worst DPT starter
>any day

>> No.5749330
File: 159 KB, 462x465, archmage.jpg [View same] [iqdb] [saucenao] [google]
5749330

>>5749321
The one wearing the wizard's hat, clutching the holy book.

>> No.5749337 [DELETED] 

> not using the DPT detector

http://hpaste.org/64621

>> No.5749341

>>5749326
But there will always need to be an idea and instructions given to the computer, whether those instructions be complex or not. Even declarative programming requires instructions to some extent.

>> No.5749352

>>5749337
>not making your own DPT detector

>> No.5749417

>>5749352
>not sensing a new DPT through biotech

>> No.5749422
File: 33 KB, 210x504, 3.jpg [View same] [iqdb] [saucenao] [google]
5749422

>>5749417

>> No.5749423

>>5749230
>How does it involve math?
it doesn't: >>>/g/ >>>/prog/ >>>/lgbt/

>> No.5749430

>>5749423
Formal proofs are programs, so math is just a specialized branch of computer science, usually practiced non-rigorously.

>> No.5749460
File: 42 KB, 1000x1402, Polynomial_time_hierarchy.png [View same] [iqdb] [saucenao] [google]
5749460

>>5749430
HAHAHAHAHAHAHAHA, no.

Proofs are infinitely harder than the hardest problems in the kiddy pool of CS. If you had a Turing machine with a halting problem solving oracle, you still couldn't decide a proof of any arbitrary mathematical statement. In fact any the finite progression of Turing Machines_n with oracle that solves the halting problem for Turing Machines_n-1 (0 being regular TM) can't decide proofs.

Mathematicians do the work of gods, Computer scientist just do the work of monkeys.

>> No.5749527

>>5749318
There are already languages like that. But any non-retard will realize that there is a trade-off between the simplicity of a language and its flexibility.

>> No.5749537

It's like math + logic, + grammar - in the sense that if you fuck up the slightest bit of spelling or capitalization or sometimes spacing, your code won't work.

>> No.5749538

>>5749460
Whilst harsh, I'd have to agree with you. Many computer scientists are okay with approximation while most mathematicians find that idea to be pig disgusting.

>> No.5749565

>>5749460
You just had to respond to it didn't you?

>> No.5750209

>>5749230
Basic coding requires basic math, and a solid understanding of what various bits of code do.

More advanced coding requires you to take run-time and efficiency into account when you design your algorithms; this is where the math gets intricate.

The most advanced maths you are required to know for a type of coding is when you are doing modelling or simulation, especially of light or fluids, or for that matter non-Euclidean space (look it up).

I've been learning to programme java at uni, about 2&1/2 months in and I have a basic handle on most non-GUI basic coding. Some of the optional coding problems required some googling when it came to the math; e.g, I was asked to complete a method called in the following way;
public boolean isPrime (int number)

so the method was handed an integer, and spat out a true or a false, depending on whether it was prime.

After trying the usual sieve method with varying degrees of success, I had to resort to looking up primality tests to determine the best way to code it.

I ended back up at the sieve method, ironically.

>> No.5750225

>>5749460
You are confused. The fact that proofs are programs does not in any way imply that arbitrary mathematical statements are decidable. A proof just proves one theorem.

>> No.5750243

>>5749460
I don't agree with the guy you responded to (just because I don't set math equal to theorem proving)
but aren't all foundational languages of mathematics such that the formal expressions are enumerable?
Given enough resouces, one could just brute force search for proofs for a given set of theorems, no?
If not, does this not work because of uncomputable valuations?

>> No.5750248

>>5749430
Proof verification does not make maths a subset of CS, you imbecile.

>> No.5750258

>>5750248
not the guy you respond to, but there isn't only verification, also, in principle, proof search

>> No.5750281

>>5750258
>exponential-time algorithm

>> No.5750407

>>5750281
>Implying Undecidable problems are in NP/PSPACE/EXPTIME

Kill yourself.

>> No.5750438

>>5749537
stop coding in python

>> No.5750446

>>5750407
>herp derp

>> No.5750447

>>5750225
That's like saying books are programs because you can put them through spell checker.

>>5750243
>but aren't all foundational languages of mathematics such that the formal expressions are enumerable?
>Given enough resouces, one could just brute force search for proofs for a given set of theorems, no?

This is the very point of the distinction of Recursive (decidable) and Recursive-enumerable (recognizable) languages. <span class="math">IF[/spoiler] a proof exist, you write down all strings and check if each one does it. If it exist, it has a finite length and is found in finite time. <span class="math"> \bf{ IF ~ NOT } [/spoiler] you're on a will goose chase that will NEVER end since there is no length limit on proofs. If you put and arbitrary bound on length, say 10,000 pages, you're going to miss out on infinitely many proofs, the classification of finite simple groups is one major example.

>> No.5750496
File: 92 KB, 465x468, wizard.jpg [View same] [iqdb] [saucenao] [google]
5750496

>>5749330
You called.

Master Wizard of Lisp reporting in.

>> No.5750526

>>5750407
>FLT was undecidable in 1980
Kill yourself.

>> No.5750565
File: 149 KB, 1031x882, 63ijdck.jpg [View same] [iqdb] [saucenao] [google]
5750565

>>5750496

>> No.5750625

>>5750565
Good going gro. You are now an <span class="math">\sum xpert \int \mathbb{P} rogrammer[/spoiler]

>> No.5750641

>>5750438
why did i lol.

>> No.5750665

>>5750526
And?

Undecidable means you can't find yes or no in all instanced; not that it's impossible for all instances.

>> No.5750666
File: 438 KB, 512x717, SICP.png [View same] [iqdb] [saucenao] [google]
5750666

>>5750625
>>5750565
>>5750496
Not that I'm any different

>> No.5750719

>>5750665
What are you even talking about? <span class="math">p[/spoiler] is decidable in a theory if there is a proof of <span class="math">p[/spoiler] or <span class="math">\not p[/spoiler]. Truth =/= proof. According to the logic of >>5749430 and >>5750258, some computer scientist living in the 1980's would claim FLT is undecidable as there wasn't a finite algorithm to prove or disprove it at the time and no algorithm to find one. That's fucking retarded.

>> No.5751103

>>5750719
>FLT
Just to be clear, you are talking about Fermat's Last Theorem correct?

>a finite algorithm to prove or disprove it at the time
>and no algorithm to find one

Finding a proof and proving something is the same thing and there isn't one for either.

>p is decidable in a theory if there is a proof of p or !p

I'm not talking about individual theorem's in a theory. I'm talking about the language of all true theorems in a/any mathematical theory. So to show that this language is undecidable, then all you need is to find the existence of one true statement that you can not prove/disprove and hence can't devise an algorithm to determine membership in the general case because it would have to prove it.

The Halting problem of "Hello world" is not undecidable until someone write a program for it, the halting problem for the whole whole class/language of programs is undecidable. Just because a proof of FLT exist doesn't make proving all other mathematical statement decidable.