arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1529427554416.png (160.95 KB, 900x630, memo.png)

 No.1217

What would you say are the basics of programming. What would one need to know to be a programmer. I am learning C and looking for some guidence.

 No.1218

The basic idea is to break down a problem into independent intuitive pieces.

 No.1219

File: 1529428159447.png (1.86 MB, 2000x2000, 1248514877080.png)

Psudocode. Understand how a machine thinks in order to think like a machine.

 No.1220

No to degrade your efforts but the Python language is noted for being better suited for people starting out. Past the logical ins and outs is the context of the programing language your trying to learn. Python is the right choice in this regard.

 No.1221

>>1220

C is fine and possible better for learning the very basics of how a computer works. But yes python would be the right choice if they want to get stuff done quickly.

 No.1222

There are no "basics" of programming. Go one way, and you find it's just a special field of applied discrete mathematics, set theory, relations. Go another way, and it's electrical engineering and soldering premade parts. Go a third way, and it's home-brew DIY problem solving duct-tape wizardry. Go to a corporation, and it's just 250 layers of abstractions with people paid 6 figures to see through it and draw specifications for managers so they can communicate to their team what they have to do. Find a 40 year old programmer and he'll show you how it's just making things idiot, fool and retard-proof. Find a 60 year old programmer and he'll show you how it's all just historical bad choices layered on each other.

You will never find a single concept or bottom layer upon which all of programming is built. It's not like saying "duh, chemistry is just applied physics". Programming is a slice of an inseparable cake, and that cake was made in a melting pot of several academic fields in a reality of researcher and corporations needing results now.
The closest answer you will ever get is probably >>1218 because intuitive doesn't necessarily mean you understand or see through things completely. Programmers try to navigate this network of things they don't have time and capacity to understand, adding and changing things in a way that hopefully doesn't make the whole collapse.

 No.1223

File: 1529441675415.jpg (43.89 KB, 432x757, Going up.jpg)

>>1222
I am flattered by your observations. Your broad strokes of experience are disingenuous in answering the question at hand and a thinly masked slight at my post history.

Would you prefer I leave?

 No.1224

>>1220
This is nonsense, the language you start with barely matters, C is as good as any. Personally I wouldn't recommend python since it's full of little surprizes that make it hard to grasp as a whole. Ideally you should strive for an understanding deep enough to have an idea how an interpreter/compiler would be implemented for the language, and reaching this point with C is much easier and more educational imho.

 No.1225

>>1223
What are you tripping on, friend? Feel free to stay by the way. Got plenty of space and panic about the lack of traffic.

 No.1226

File: 1529469614698-0.jpg (32.63 KB, 379x499, 41gHB8KelXL._SX377_BO1,204….jpg)

File: 1529469614698-1.pdf (26.42 MB, The-C-programming-language.pdf)

>>1221
>C is fine and possible better for learning the very basics of how a computer works. But yes python would be the right choice if they want to get stuff done quickly.
I would add that "learning how a computer works" isn't computer science. Computer science is machine agnostic. Any programming language could be run on pen and paper after all. So Python is perfectly suitable for learning computer science, but if OP wants to learn a bit of computer engineering as well, C would be a great language!

 No.1227

File: 1529505908345.png (37.91 KB, 1008x720, lain hap.png)

>>1217
Thank you all for your input. I would ike to clarify i actually started with python but dropped it for C because i want to understand computers. Will not go back to python i think C is were i will be staying. Will most likely learn assembly too.
I would like to know what to study for systems programming. I really appreciate the feedback.

 No.1228

>>1227
I would learn Python as a first language but that's all up to you, if you're determined to your goal Assembler is a good choice but it's extremely complicated, compared to other languages, and before you need a basic understanding of your architecture (I'm just going to assume you want to learn x86 assembler).

What exactly do you mean with system programming ? If you're interested in operation systems in general and how to use system calls in your C programs I would recommend Andrew Tannenbaum's "Modern Operating Systems".

 No.1229

If you learn Perl first, you will be able to jump between languages easily.

 No.1230

Instead of a highly opinionated list of what I consider necessary knowledge in programming, I'm just going to share a secret that most beginners have a hard time to accept: you are very rarely expected to come up with novel solutions, most of the time you are just going to reuse existing solutions, although sometimes in novel ways.

 No.1233

File: 1529617952383.png (387.41 KB, 1280x1024, lainthink.png)

>>1228
>What exactly do you mean with system programming ?
Operating systems i think.
>>1229
>If you learn Perl first, you will be able to jump between languages easily.

How so?
>>1230
i appreciate the secret :p

To take this in another direction, I started learning socket programming.
I am confused about how these work.
where does the socket connection actually take place?

 No.1234

>>1233

Oh nice I think socket programming is a good way to get into C.

> where does the socket connection actually take place?


 int connect(int sockfd, struct sockaddr *serv_addr, int addrlen); 


What are you trying to accomplish? I could probably give a better answer.

 No.1235

File: 1529687634661.png (55.15 KB, 657x721, server.png)

>>1234
I want to make a client for instant messaging. I want to make a simple one that works from the command line for now.
I followed acouple of tutorials but im not sure i completely understand. I got alil bit of something going though.

 No.1236

>>1235

Okay sounds good, try to break down the problem into smaller parts. Perhaps:

1) Make a C program (listener) that simply listens for a connection and maybe prints something when it gets a connection. You can use netcat to initiate the connection.

2) Make another C program (sender) that connects to your other C program and sends some data over. Update the listener to print that data out.

3) This is where it gets tougher. You need to combine the listening and sending into one program. I'm sure there are better ways but I would cheese this by just listening on on one socket while sending on a different socket.

This is a basic way to go about it but I wanted to give a general idea of what you could do.

 No.1237

>>1236
Hey,sir. If i wanna write simple PE dumper. Where i can start?

 No.1238

>>1236
Is there like a standard way of doing this?
this is always what holds me back from trying to make stuff

 No.1239

File: 1529843841713.jpg (12.31 KB, 312x301, yui_shrug.jpg)

I would say there is no standard.

https://beej.us/guide/bgnet/html/single/bgnet.html

^ link is god-tier C networking walkthrough though.

 No.1240

File: 1529850881492.png (24.4 KB, 474x357, hahp.png)

>>1239
Thank you so much, I'm going to put this to use.

 No.1241

>>1237
Is a PE dumper supposed to dump a running process (I assume self-modify code, like packers, etc.?) and try to rebuild the PE header to get it into a runnable executable?

 No.1244

>>1241
Yes, but for begin i supose it can take .exe file and just print PE header.

 No.1246

File: 1530104402793.jpg (675.83 KB, 2737x2038, pe.jpg)

>>1244
For that you just need to know how to read files, some bit-wise manipulation and the structure of PE files: https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format

 No.1247

>>1246
Thank you! Love u so much

 No.1248

File: 1530170866294.png (152.31 KB, 744x638, ars_longa_vita_brevis.png)

You can learn the basics in 21 days

 No.1254

All your answers are incorrect.
You need to know one thing, you are ready to spend half your life on this and for what purpose.
If you do not have a goal, why do you need a programming language? Why study it at all?
The goal is important, everything else itself will come

 No.1255

>>1254
I cannot do it just t-to do it?

 No.1257

>>1255
You can, that's perfectly fine.

 No.1259

File: 1530473538374-0.jpg (110.03 KB, 1000x785, (TechPorn)Calculator.jpg)

>>1227
here is a simple solution
CS50 _Intro course form harvard_ using C and python to explain how things going on.

It will give you into and actually a nice intro, then I wold like to advice you to read SICP _wizard book_ which carry about programming and nice _actually great as lain_ intro to functional programming

while this trip it is your choice to add `C the programming lang` to more C, `Python for scientist` (I don't remeber it's name) for more python. etc etc

if you want moooooore depth how computer work then I will advice you to learn assybler with NAND2Tetris course

 No.1260

>>1259
••• SImple Note •••

1. learning programming is NOT related to language ( there are common thing between langs) but every language has it's own feature and you will learn more and more
consider Programming Languages {A, B, C} courses which tries to make you learn about languase and how easly to move around them by learn concepts of languages.

 No.1261

>>1254
All your answer is incorrect
You just need to Believe in God
The rest will come

 No.1263

>>1227
If you want to understand computers, I recommend the book "CODE - The Hidden Language of Software and Hardware" by Charles Petzold. Learning C will not really tell you how Computers work, and I'm quite certain you would agree after reading said book.

 No.1264

>>1261
That is I think a valid solution to >1254's prompt, that is, the final two lines are a valid solution, the rest is cruft.

 No.1270

>>1263
>Learning C will not really tell you how Computers work
computers are many layered machines.
if you only study one layer, i'm quite certain you will overestimate it's importance.



[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]