Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Prog

Name: Anonymous 2012-09-14 7:46

How do I learn how to program or atleast comprehend what the fuck is going on when someone writes out a code?

Keep in mind I literally know nothing about anything dealing with programming, absolutely nothing, I don't even know what it does or can do.

Name: Anonymous 2012-09-14 7:58

It's like learning a language. It's exactly like learning a language. It's essentially learning a language.
If you know how to do that, it's easy.

Name: Anonymous 2012-09-14 8:09

Read this book and do the exercises.
http://mitpress.mit.edu/sicp/full-text/book/book.html

Download this Scheme implementation to complete the exercises.
http://www.gnu.org/software/mit-scheme/

Name: Anonymous 2012-09-14 8:24

First you need to think what you want to program. Do you want to make games? Or maybe you want to make your website? I have done many websites and tried to make game (With C-language), but it didn't do so good.

Try this link to learn basic HTML (Hyper Text Markup Language)
It's used for simple websites and cores for website. So you aren't going to do any fancy with that.

http://www.w3schools.com/html/default.asp

Name: Anonymous 2012-09-14 8:28

1)
Program on paper, use some few variables in your code (can be pseudocode)
2)
Traverse your program mentally, write a table in a sheet, each column will represent a variable.
3) Each time a variable changes it's value, write it in the table. In another sheet, write the output of your program.

This seems like prehistoric or even awkward, but this forces you to concentrate on what you are doing, slows you down, thus allowing you to catch little details.

Name: Anonymous 2012-09-14 8:37

>>1
1. invent your own domain specific programming language.
2. write your program in it.
3. write a bunch of Lisp macros to parse your DSL
4. execute your program.

Name: Anonymous 2012-09-14 8:40

>>6
Alternatively, instead of writing Lisp macros, one can manually translate his program into C/C++. Like that:

Code in my DSL:

open FileName | <[T:@4,utf8 L:@4,ul D:@L,y? @Xs]=[[T D] @Xs,r]>


same code translated to C/C++:

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

typedef struct chunk {
  uint8_t Tag[5];
  uint32_t Len;
  uint8_t *Data;
  struct chunk *Next;
} chunk;

chunk *loadChunks(char *FileName) {
  int I, L;
  uint8_t *D, *P, *E;
  chunk *C=0, *T, *N;
  FILE *F = fopen(FileName, "r");
  fseek(F, 0, SEEK_END);
  L = ftell(F);
  D = P = (uint8_t *)malloc(L);
  E = P+L;
  fseek(F, 0, SEEK_SET);
  fread(D, 1, L, F);
  fclose(F);

  while (P < E) {
    T = (chunk *)malloc(sizeof(chunk));
    memcpy(T->Tag, P, 4);
    T->Tag[4] = 0;
    P += 4;
    T->Len = *(uint32_t *)P;
    P += 4;
    T->Data = (uint8_t *)malloc(T->Len);
    memcpy(T->Data, P, T->Len);
    P += T->Len;
    T->Next = C;
    C = T;
  }

  for (T = 0; C; C = N) {
    N = C->Next;
    C->Next = T;
    T = C;
  }

  free(D);
  return T;
}

Name: Anonymous 2012-09-14 8:43

Step 1: Install Gentoo
Step 2: Read SICP
Step 3: Archieve Satori

Name: Anonymous 2012-09-14 8:50

Step 1: watch some Linetrap videos
Step 2: become a gay whore
Step 3: ???
Step 4: PROFIT!!1

Name: Anonymous 2012-09-14 10:06

>>8-9
Back to /g/, ``kudasai"!

Name: Anonymous 2012-09-14 12:28

>>10
What's /g/?

Name: Anonymous 2012-09-14 12:40

>>3
This
SICP is the best programming book ever.  It is hard at times, but let this not discourage you: you can skip the hardest exercises and do them later when your skill improves.

Name: Anonymous 2012-09-14 13:02

Name: sage 2012-09-14 13:39

>>10
 
did i just got le fukin trolled? xD

those are the wrong ``faggot quotes''

learn with da best or die like da rest

Name: Anonymous 2012-09-14 14:00

>>7
Your DSL is shit.
First, it generates terribly inefficient code.  malloc in the inner loop, seriously?
Second, the procedures are named using buttUglyCase.

Name: Anonymous 2012-09-14 14:06

>>15
Second, the procedures are named using buttUglyCase.
Haskell uses it.

Name: Anonymous 2012-09-14 14:18

>>16
Haskell is shit

Name: Anonymous 2012-09-14 14:22

>>14
What is wrong with “unicode quotes”?

Name: Anonymous 2012-09-14 14:25

lisp / sicp is only for people looking to achieve satori. OP is
interested merely in a superficial understanding of what the fuck
it is that we do.

OP: start with the wikipedia entry on SICP and just browse for a
couple hours, you'll get the jist of it. if you want to try and
make small programs right click, select "inspect element" and start going at it. Chrome comes with a console that lets you
experiment with javascript easily.

try typing document.title = 'go!' and take it from there.

Name: Anonymous 2012-09-14 15:19

>>19
Next, try typing document.location.href = 'http://mitpress.mit.edu/sicp/full-text/book/book.html'

Don't change these.
Name: Email:
Entire Thread Thread List