[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why the fuck am I forced to learn this ancient language instead
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 101
Thread images: 16
Why the fuck am I forced to learn this ancient language instead of Ruby or Python for my intro to CS class?

Jesus I hate pointers and other outdated crap.
>>
File: 1388440678191.png (155 KB, 625x626) Image search: [Google]
1388440678191.png
155 KB, 625x626
>>
because if pointers are too hard for you then you're too stupid to program in any language
>>
>>51861431
Okayy? Because I coded Rails webpages before I went to uni.
>>
>>51861360
Because you aren't 11 and python is a retarded language and is useless
>>
>>51861624
>le who cares that dropbox was coded in Python

Also, for small automated tasks, Python is pretty good

Another good reason is offensive/pentest scrypts
>>
>>51861500
Pointers really aren't hard. And the concept is used all over the place, not just in programming.

Good for you on coding in rails, now step up and learn some more shit
>>
File: joel.png (33 KB, 513x430) Image search: [Google]
joel.png
33 KB, 513x430
>>51861360
because you're a fucking idiot who doesn't know shit
>>
>>51861500
>Ruby on Crutches
>>
>>51861360
> He thinks CS is programming.
> He doesn't understand pointers.
Just go study something else mate.
>>
File: specialneeds.jpg (130 KB, 768x888) Image search: [Google]
specialneeds.jpg
130 KB, 768x888
>>51861360
>Just
>>
>>51863451
>strings are difficult
>bunch of continuous (abstraction since the OS probably does paging) bytes ending with a zero-byte are hard
okay spolsky

he also calls other CS101 concepts such as pointers and recursion hard

what a topkekelm
>>
File: 1450069676465.jpg (45 KB, 683x1024) Image search: [Google]
1450069676465.jpg
45 KB, 683x1024
>>51861360
yes indeed, you should learn the x86 assembly language in your first programming course.
>>
>>51863605
it's not that it's hard, it's just that the implementations details aren't abstracted away. Learn to read
>>
File: 1413784193534.png (280 KB, 714x530) Image search: [Google]
1413784193534.png
280 KB, 714x530
>>51863605
>not writing a kernel +/OS in one of your CS classes
EL MA O
>>
>>51863663
>strings are, at a very deep level, difficult
He literally calls them difficult
>>
>>51863456
underrated post

>fuck Ruby
>>
>>51861360
hey i just got that book to try and learn some c on my own. but im a faggot and started playing fallout instead
i should sell my gpu
>>
>>51863605
http://unicode.org/faq/casemap_charprop.html#11
>>
>>51861500
That means absolutely nothing you cocky retard.
>>
theres always some bitter old fuck somewhere who hates that all the kids these days don't have to sit in the trenches like he did.
>>
Dude CS is fucked up , it's not the problem that CS require you to know C, C is a very very good handy tool if you need extra performance, But the real problem is that CS donse't teach you a real good practical cource in C.That is the real problem and that is why you hate so much the C lang but in order to understand and really appreciate C you need to learn in from the basic level and for that you have CS but CS is fucking awfull and eventually you realise that all the hard work comes from you and not from the university .That's quite sad.
>>
>>51863605
The article is here
http://www.joelonsoftware.com/articles/fog0000000319.html

It's actually very well-written. He makes some good points about weird more-than-linear behaviour that creeps into code because people don't understand the underlying algorithms being used.
>>
>>51861360
What do you think the Cython interpreter is written in? I'll give you a hint, it's not Ruby.
>>
>>51865131
There's PyPy
>>
>>51865131
Java Script obviously.
>>
File: A-Ok.png (245 KB, 900x827) Image search: [Google]
A-Ok.png
245 KB, 900x827
>>51861360
It was my first language and i'm self taught. You might just be dumb.
>>
Because it's the only one you should be learning
>>
File: 1445928508671.gif (712 KB, 245x212) Image search: [Google]
1445928508671.gif
712 KB, 245x212
>>51861500

> I coded Rails webpages
>>
>>51861360

listen buddy, people that get intro classes on python and ruby have major flaws in their knowledge of programming. why not learn from a complete language, one that actually makes efficient programs, and then adapt to writing those easy languages, instead of doing it the other way around and failing ?
>>
>>51861360
Learning how to design, and then implement specifications properly in languages like C will produce programs that perform a task in an understandable and expected way, that execute in close to the smallest possible time.

Learning "how to program" in languages like Ruby or Python will produce programs that do not implement their (improperly conceived / defined) specification, that encounter difficult to diagnose bugs due to a lack of understanding of the underlying libraries they make use of, and that execute in a small enough time on the latest super computer that the user didn't get bored and walk away from their screen.
>>
>>51864946
that was actually really good, thanks!
>>
>>51861360
Fuck you. I'm still pissed that all the intro classes during the day at my school were all taught in Python. Night classes got you the professor that uses Java, but you had to take the distance education classes to get C++.
>>
File: gtfo.gif (691 KB, 337x268) Image search: [Google]
gtfo.gif
691 KB, 337x268
>>51861360
It's literally not that hard.
1. You're retarded
2. It's literally one of the best languages out there. There's so much shit you can do with C unlike the meme languages you mentioned . If you mentioned C++, I may have been less bitter, but you are to fucking stupid and ingrateful to realize that you have an advantage over anyone that didn't learn C/C++.

Pls GTFO

>>Pic Very Related, Faggot
>>
>>51864946
>http://www.joelonsoftware.com/articles/fog0000000319.html
Hot damn, that was a good read. I needed that.
>>
>>51861360
>getting the chance to become c master race
>go onto /g/ and complain about it
>tfw you will never be c master race
>>
>>51861360

Forgetting all the other arguments (most of which are valid), if you want to be any good at ruby or python projects, you need to learn C. You'll need to read it, when reading how the calls in the libraries work, and you'll need to write it, to make your own extensions. Because you'll need to either for your project to perform, or to access some library that doesn't have an interface for your language yet.
>>
>>51861500
>Okayy? Because I coded Rails webpages before I went to uni.

Wow fags like you are the dumbest shit in the programming world.
Tell me, who does create all those pretty babby libraries and easy to use languages you work with?

You are probably one of those people that post shit like "Program x written in only 2 lines of Python!!!!!!!!!!"

And to end the fact that I answered your pathetic bait, have a bonus question: Whats the most popular implementation of Python?
>>
Pointers are fucking glorious
>>
File: 无标题.png (44 KB, 832x667) Image search: [Google]
无标题.png
44 KB, 832x667
>>51870594
>You are probably one of those people that post shit like "Program x written in only 2 lines of Python!!!!!!!!!!"

Protip: if your write a library in just the "right" way, you can write your program as just two to five lines of almost any language.


Also, ioccc
>>
>>51870797
Wow! A program made entirely of whitespace!
>>
fuck this languavege
>>
You know, I just started learning C and I still can't figure out what, if anything, I can use pointers for. Aren't they like some sort of complex and dangerous sort of variable?
>>
>>51873245
If never taught proper use they are dangerous indeed. But with knowledge and a little common sense they unlock so many possibilities.
>>
>>51873298
Like, what? I'm seriously not trolling, I keep reading my book and I can't find any good reason why I would use a pointer instead of a variable, at least with what I know.
>>
>>51873245
Pointers point to things.
In particular, dynamically allocated memory (eg, malloc), but there's other reasons.
>>
>>51873324
Everything in C is a pointer, dummy. When you make a variable, that variable is a pointer to the data it stores in ram.
>>
>>51873324
think about a situation where a function takes a large file as a parameter

passing by value means that large file will be copied (slow, takes lots of memory). passing a pointer instead is a much better idea in this case
>>
>>51861624

I make 100k a year with a useless language while you tinker with hobby projects in C for free.

I feel so inferior.
>>
>>51873245
Arrays. Data Structures. Dereferencing things are actually critically useful. You can have functions that access the inside of data structures and change them directly.

For example. I have a data structure that represents an image. I can pass that into a function, let's say,
blur_image()
, and will blur the image in-place. The only way the function can do that is by using pointers in its header
blur_image(Img *img)
and passing your image into it via
blur_image(&image_variable);


This is actually the root of how SDL works in how it has data structures that you manipulate via functions that operate on them.

Just pointing to a random indiscriminate variable is pretty useless and unnecessarily dangerous in the context of most books' introductions to pointers. They don't offer any real world examples and lead you to believe they are unnecessary and pointless.
>>
>>51873486
In my last paragraph, I was talking about shit like this:

int a;
int *b = &a;


Nobody does that shit.
>>
>>51873504
I did that once when i wanted to avoid indirection bullshit with 2D arrays of pointers to structs that i wanted to smuggle through multiple levels of function calls.
you call the array like
(*arr)[j][k] = obj_constructor(...);
>>
>>51873245
I like Rust's terminology for this: Variables have an "owner" and can be "borrowed."
>>
>>51863677
this... sadly, it was on fucking java. Ughh...
>>
>>51873245
pointers are simply a memory address, like the street number to you're house.

pizza guy wants to deliver a pizza? he locates the right house number. you want to read a value from memory? use the correct address.

nothing more than that anon.
>>
>>51873862
It also helps to point out that all strings are simply arrays of chars and can be treated like pointers for most use cases.
Using that logic, you can do the same for pretty much any data type.
You can even create a pointer to an array of struct pointers.
*objs[], **objs are functionally identical, as are objs[32] and *(objs+32).
>>
>>51873862
>you're house
Me, I'm not.

>like the street number to
I dunno how you can say that given that how pointers are literally represented is implementation-specific and you're not supposed to speculate about it. NULL is not even guaranteed to be (void *)0. That's what the pointer variables are actually for, so that the raw addresses are kept internal to the system and the programmer can abstract away from them, using identifiers instead (plus pointer arithmetic, which is relative rather than absolute).
>>
Why the fuck do people find pointers hard? It's the easiest shit ever.
>>
>>51861500
>Because I coded Rails webpages before I went to uni.
>coded Rails
>Rails

Here is your problem fagg.
>>
>>51861360
>Jesus I hate pointers and other outdated crap.

It's like saying "I hate the way computers are actually running".

OP confirmed for retard. Please leave /g/ and start at McDonald's.
>>
>>51861360
Pointers aren't taught in any reputable introduction to CS course, and rightfully so. A handy trick in low level programming languages is not essential computer SCIENCE knowledge, and certainly not necessary for beginners to understand. A programming language for teaching not only introductory computer science but computer science in general, should not give any attention to the inner workings of the computer's memory. That is why reputable universities use languages like Python, Java or functional languages for beginners.

This is b8.
>>
>>51876530
>Pointers aren't taught in any reputable introduction to CS course,
But they are, retard. Any self-respecting intro to programming course will at least have some assignment on pass-by-reference vs pass-by-value.
>>
>>51876549
>intro to programming
Who are you quoting, retard?
>>
File: 1444524776185.jpg (22 KB, 480x360) Image search: [Google]
1444524776185.jpg
22 KB, 480x360
>People unironically using C outside of embedded systems programming
>>
>>51876566
It's funny. The people on /g/ who talk shit about CS courses are the same people who glorify C, Lisp and other dinosaur languages.

As if not having a degree wasn't bad enough, they dedicate their time to learning outdated time-sink languages and using retarded meme time-sink operating systems like Gentoo and Arch.
>>
>>51876560
Take your shitty meme and shove it
>>
>>51876633
What meme, retard?
Yeah, sit down you bitch.
>>
>>51876530
You're the b8 m80.

'Reputable' universities use languages like Python, Java or functional languages for beginners to increase the quota of minorities and women entering they're stem programs, specifically software development.

I'm no fan of the kinds of C code I see out there, but not giving beginners the basics of real systems leaves them essentially permanently crippled as developers unless they can somehow later break out of the mental grip of believing in 'magic'. Few ever do.

Fortunately Stroustrup made time to write a great freshman textbook before he left academia fulltime, and PPP2 serves as a perfectly-paced, targeted, intro to the craft of programming for beginners.

Personally, I see little hope that the West will maintain it's lead in STEM if it's run by the dictates of being overly SJW sensitive. You're position only furthers that.

Real world problems are hard. Actively ignoring that reality for beginners only sets them up to either fail at school, or fail professionally. Neither a good option.
>>
>>51876656
>What meme, retard?
le who are you quoting + le CS is not programming

Anon was clearly talking about programming, and virtually every uni and college will have a intro on programming course.

What would even an "intro to CS" class contain?

>inb4 SICP
I think "structure and interpretation of computer programs" is more of a programming than CS class albeit with a fez, don't listen to fanbois on /g/ trying to meme you into thinking otherwise. They haven't even read SICP.
>>
>>51876676
Just wow.

>>51876695
>Anon was clearly talking about programming
Let's assume he is then. Pointer's still don't need to be taught and there's a reason why no reputable university teaches pointers in an introductory course.

>pass by reference, pass by value
This is as far as it goes and as far as it should go for introductory courses. Pointer arithmetic and all the associated memory management mumbo jumbo is left out. It should be taught in a course running in parallel (or later on) that deals with modern day computer architecture.
>>
>>51876760
>Just wow.
just >>>/tumblr/
>>
>>51876760
>Let's assume he is then. Pointer's still don't need to be taught and there's a reason why no reputable university teaches pointers in an introductory course.
They are taught, just not in the C-way. See below.

>This is as far as it goes and as far as it should go for introductory courses. Pointer arithmetic and all the associated memory management mumbo jumbo is left out.
Pointer arithmetic is a C and C++ specific, but the memory management mumbo jumbo is not left out. Just listen to what your prof says. I learned about garbage collection in my first semester.

>It should be taught in a course running in parallel (or later on) that deals with modern day computer architecture.
It should be repeated then, but memory layout != programatic pointers/references.
>>
>>51876773
I wouldn't even tell you to go to /pol/ because I browse /pol/. You're just pants on head, shit in the street retarded.

Like, you can't fathom why a university would teach a no-nonsense programming language for beginners other than "to appeal to minorities and women".

Will your children(God forbid you have children) be taught arithmetic by first beginning with a formal definition of the axioms of addition and multiplication?
>>
>>51876819
Are you completely unaware that C is actually a high-level programming language to avoid having to deal with the gory details of assembly?

My father learned ALGOL-60 as his first programming language in the late 70s, are you going to spout bullshit about how that was wrong too? Yes, it also has pointers.
>>
>>51876818
>modern day computer architecture.
...Which is constructed of these "mumbo jumbo" memory management thingys and pointers. But who cares, let's just abstract the hell out of everything.
>>
>>51876818
There's absolutely no point teaching pointers in depth to beginners unless you're going to teach about memory management/memory layout.
Memory management is not critical knowledge for beginners especially in this day and age. If you're going to talk to beginners about low-level memory, they're going to naturally wonder about low-level functions and machine-level operations.

That time would be best spent teaching students about algorithms and good programming practices. The workings of a computer should be a black box.
>>
File: 3213.png (144 KB, 860x434) Image search: [Google]
3213.png
144 KB, 860x434
Seems to be that many experts are here and it happens to be that I have a question.

Javascript or Ruby? Which is easier?

[spoiler]I want to play around in RPG Maker but I'm not a math kid so every little bit that makes it easier for the job helps[/spoiler]
>>
>>51876843
>Are you completely unaware that C is actually a high-level programming language
Yes, I am completely unaware of that because it's not true. C might look like a high level language but the correspondence between C code and machine-level language is dead obvious once you understand it. C might abstract away the CISC/RISC instruction set but it only provides a very thin layer of abstraction on the nuances of machine level memory management.

>My father learned ALGOL-60 as his first programming language in the late 70s,
Memory was at a high premium back then you retard. He would have much preferred a machine running python to do all his shit.
>>
>>51876943
Ruby is more concise and just as easy.
>>
>>51877018
thanks anon, Ruby it is then
>>
>>51876566
>unironically using unironically
>>
>>51876676
wew laddy
>>
>>51863683
yes, compared to fixed-size arrays or structs they are certainly difficult to the CPU
>>
>>51873346
register int a;
>>
>>51861360
Because you need to learn memory management. Period. It needs to be ingrained in your mind so you are consciously aware in any language you code in. Always using python is like always bowling with the bumpers up in terms of memory management.
>>
Guys, i want to learn basic programming. where should i start?
>>
>>51877551
C
>>
>>51877594
okay. any book you can recommend?
>>
>>51861360

I did an online intro to cs class in python and just kept wanting to start with c or c++ so I could see what is going on underneath the hood.
>>
>>51877605
the one in the OP
>>
>>51861360
At least it works. I can't say the same about plus plus. Maybe it's a good idea to avoid breakage.
>>
File: 1449634952500.jpg (108 KB, 629x466) Image search: [Google]
1449634952500.jpg
108 KB, 629x466
>>51877605
>>51877629
Don't listen to this Retard

That book is old as fuck and is more of a reference text for people who already know how to program. If you want to get into it fast. Learn Python 3. If you want to be different. Learn Ruby. Both of these are easy and have a gorillion different ways to learn shit.

if you need a classroom setting and classic learning methods and also at least know Calculus, take SICP with MIT Opencourseware. You'll learn Scheme(Lisp) and lots of neat comp sci concepts

if you want to learn haxing shit, learn JS, SQL, etc. If you want to learn low level haxing. Learn Hex, and ASM and C.

if you want to make robots. or microcontrollers. learn C and ASM.

Really it all depends on what you want to do. A nice "one size fits all" is Python. You can pretty much do anything with it.
>>
>>51861360
>Not even trying anymore

Kekes
>>
>>51877551
At your local library.
>>
>>5186136
The whole OS work with all that, if you can't handle it, then CS isn't for you, go learn scratch and work in agriculture
>>
File: 1449894513932.gif (2 MB, 195x130) Image search: [Google]
1449894513932.gif
2 MB, 195x130
>tfw pointers finally clicked for you

Pointers are based. If you can't figure them out you probably should switch majors.
>>
Programming is a pretty broad topic, school typically teaches a subset of that. If you feel like you could learn better on you own, don't go to school. I kind of wish I didn't go to college, I know a few people who are self taught with no degree, no one seems to give a shit. Maybe you won't get a job at facebook or google but spoiler those jobs are full of annoying weenies anyways
>>
>>51863533
>> He thinks CS is programming.
He literally never said that.
>>
File: hihihi.gif (2 MB, 480x360) Image search: [Google]
hihihi.gif
2 MB, 480x360
>>51861500
>Because I coded Rails webpages
10/10 OP!
>>
>>51877369
True. Never seen that used before, hence probably why I'd forgotten it existed lol
>>
>>51878947
You should switch majors anyway, as pointers were something that had to click for you...
Thread replies: 101
Thread images: 16

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.