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

I think C is worth learning in depth, resources?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 92
Thread images: 7

File: the daily grind.jpg (27KB, 604x604px) Image search: [Google]
the daily grind.jpg
27KB, 604x604px
Final year cs student, I've pretty much come to the conclusion that there are only 2 languages worth learning which is Python3x and C.

Python for high level general solutions and C for efficient and quick data intensive problem solving.

What resources are there? I often see some pink haired anime girl holding a C book but is it actually good and worth getting a copy in real life?

Thanks.
>>
>>57055108
Your conclusion is pretty stupid.
>>
>>57055116
This

Learn C++, then if you need even more control of your programs learn C
>>
what if you wanted to make a phone app? or maintain a corporate website? or machine learning? or what about financial analysis?

you post is stupid
>>
>>57055116
Do tell?

Python offers the separation from the memory handling giving you high level solutions in any area, graphical, std.i/o file reading, anything really, but it is slow because its so high level

C is great because it scales better with data intensive stuff but at a cost of low level memory management

Java is rubbish.

There are other niche languages but im not really interested in those web meme languages

Best of both worlds.

>>57055125
How does C, C#, C+, C++ all relate except it all being built on top of C?

>>57055134
>phone app
lol im not a memeing pajeet
>maintain corporate website
yeah there are niche languages for that but im not interested in that field
>machine learning
I dont know havent taken a paper on it yet
>financial analysis
literally what does this have to do with languages
>>
>>57055146
>there are only 2 languages worth learning
>im not really interested
Fascinating.
>>
>>57055146
He said your conclusion is stupid because you really have no idea what you're talking about and you aren't in any position to make that kind of judgment.
>>
>>57055154
fuck sakes why is everyone here so autistic obviously I mean this in a general sense, if you want to maintain a website who the fuck doesnt know you need to know js, ror, c# .net and some other shit jesus christ

>>57055160
ok, I dont care because he didnt even explain anything aftewards the point is I want some C learning resources
>>
>>57055172
>obviously I mean this in a general sense
That is the problem. You said it in general sense, that there's only two languages worth learning. If you clarified that it was only for your particular purposes and not in general sense, there would be no problem.
>>
>>57055146
>How does C, C#, C+, C++ all relate except it all being built on top of C?
They dont, there are only C and C++, all others are trash.
>>
>>57055179
Ok I guess thats reasonable enough. So any resources for C language?

>>57055188
Resources for C? My experience with C# is horrible its like a retarded Java
>>
>>57055194
Your best bet would be to just go around and tinker with some simple-ish open-source program. K&R is praised for being good if you still want a book. C# is pretty nice, though, so if you're having issues with that I shudder to think how you'll fare with C.
>>
>>57055194
If anything, Java is like a retarded C#.
>>
>>57055212
>K&R
Ok
>Problems with C#
Its not that I have problems with C# its just that I dont like it because, like Java the concept of the language is good but in practice its dogshit. I haven't learn C in that much depth but I do like the fine grained ability to handle memory and the level of control you have as opposed to calling some random inbuilt method on an object which extends 20 other objects which implements some interface Lol.
>>
>>57055230
There's nothing to lol about. Python shares all your perceived failures of C#. You're just repeating someone's negative comments about Java and C# without really having a clue about either.
>>
>>57055108
>Final year CS student
>Don't know any programming languages
n i g g a
>>
>>57055194
>>
>>57055246
Sure python shares some of the faults of oo programming but it sure does simplify it, java and c# both make mistakes in trying to make things high level but it gets convoluted extremely fast, adding simple functionalities ans basic things can end up having things throw exceptions deep inside extended classes, in short its a fucking mess. Python shares the same faults however it doesnt try hard to be low level, you have things and they fucking work. The libraries that the community puts out are amazing too.

I dont care what you say, I don't care if im bad at java/c# the fact that ive worked with both for an entire semester and all ive got to show for it is bad memories I think its a problem with the garbage language than myself

>>57055254
university doesnt really encourage you to pick your 'main' go to language, its more like a 'have a taste of everything' anyone who goes to university knows this

>>57055265
ty
>>
>>57055108

java kicks ass
>>
>>57055375
Just because you don't feel comfortable with a language does not make it a mess. Issues with exceptions are not different from what Python has. "you have things and they fucking work" is exactly what's happening in C# and Java.
>>
>>57055108
>cs student
>conclusion meaning anything
come back after you get your Ph.D or at work in the industry for a couple of years
>>
>>57055134
Not OP. But machine learning is pretty good on python. (sklearn, theano, tensorflow... )
>>
>>57055146
>Java is rubbish.
t. Never worked for life
>>
>>57055399
>is exactly what's happening in C# and Java.
And then you realize it takes 50 lines of code to read text from a fucking file. I dont know if youre too accustomed to accept it since I assume youre good with both, but don't you ever realize that Java cant make its mind up between being high level or low level? Just fucking pick one if you want to add all these bullshit exception classes, and all this obscure functionality at least let the compiler handle it, why the fuck do I need to think about what happens when object X interactes with object Y when it implements Z.

>>57055406
r u seriously implying?

>>57055422
yea thats what it means to be a student lol
>>
>>57055435
Well, there we go, now you posted evidence that you know nothing about those languages.

It takes one line to read whole text file for me in C#m using a built-in function: https://msdn.microsoft.com/en-us/library/ms143368%28v=vs.110%29.aspx
>>
>>57055452
I was referring to Java, the only stuff I've done in C# is console/web applications that dont involve "actual computation" just object handling.
>>
>>57055462
So next time you want to voice your hot opinion about C#, stop. You'll only be making a fool out of yourself.
>>
>>57055462
Here's how you read file into a string in one line in Java:

new String(Files.readAllBytes(Paths.get(filePath)));


Congrats.
>>
>>57055108
>final year cs student
>doesn't already know c
>thinks K&R is an anime meme
>>
>>57055469
Even then C# is horrible? It has the same problem as Java with its retarded inbuilt gui library swing with its jbutton or whatever, actually I praise java for doing a much better job of this than c# its rather easy to work with guis in java but in c# its a joke

>>57055472
Lol thats not the point, its harder handling textfiles in java than in python. Do you not see how ironic that line of code is? Look at how "convoluted" it is when they could have just made an inbuilt method?

>>>infile = open("sample.txt", "r/w/r+/w+")
>>>contents = infile.read()

yeah java sure isn't a meme
>>
>>57055487
I do know C, just very little of it because a half decent university won't just teach you one language for every course for 3 years

>thinks K&R is an anime meme
I don't evne know what this means lmao
>>
>>57055508
So it is more convoluted because you do 3 calls in Java and 2 calls in python? That's your problem with it? That's what you perceive as 50 lines to read a file?

Wouldn't that make python just as much inferior to C# as Java is to Python in your eyes, since you only need one call in C#?

>gui
You already demonstrated your lack of knowledge, I don't feel the need to explain anything else.
>>
.oO(Confirmed, all programmers are arrogant, obnoxious assholes...)
>>
>>57055534
No its not because I have to make additional calls, its because its irrelevant garbage to my eyes that I dont need to look at, what makes more logical sense and is more easily readable and understandable, Java or Python for reading files? Its not the number of lines were competing for its the readability and intuitive meaning the syntax has. Do they honestly think building an inbuilt function for reading like python is gonna slow down the already slow shit that is high level programming? Who actually cares, this is backwards thinking logic
>>
>>57055559
Those examples posted by you and me are pretty much equivalent. You're using built-in functions in all of them. Your literally only argument here is "i like how python looks more".
>>
>>57055518
By my final year in my master's I had already learned C, Java, PHP and Python.

- implemented an OS in C and assembly for OS class, from bootloader and setting up protected mode to interrupt handling, to virtual memory management to file system management
- implemented OLSR and RED packet drop scheme for a L3 router mock-up that ran as a virtual router in a ns3 simulation (in C)
- implemented a naive B-tree based database engine in C. It sucked ass, but still learned about the importance of cache coherency and whatnot
- made a rudimentary compiler for a simplified C language in Java
- read out values from a handheld controller and processed it on a microcontroller before converting it into a specified serial format some open source flightsim program could understand

All these were classes at my university, which was a mediocre European university, ranked below the top 150 universities on all three major university rankings.

What's your excuse?
>>
>>57055375
>I dont care what you say, I don't care if im bad at java/c# the fact that ive worked with both for an entire semester and all ive got to show for it is bad memories I think its a problem with the garbage language than myself

Translation:
>I'm scared of OO programming
>>
>>57055580
>What's your excuse?
Probably an American
>>
>>57055108
C is like waging a war against the syntax
>>
>>57055108
>Final year cs
>come to conclusion about all programming-languages

Geez, be a little humble you fucking pussy
>>
>>57055573
But whats the purpose of high level languages? The purpose is to take away the low level detail and focus on the functionality am I correct? Its more than "I like it how it looks", its "I like it how it looks because as a human being it makes more intuitive sense and aids the understanding behind the big picture to accomplish my task at hand". Just look at Java trying so hard to be like C with variable declarations and method return types, what is the fucking point were dealing with high level languages you SHOULDNT need to care about that shit, Python > Java in every fucking way I need not say any further.

>>57055580
I dont know what youre asking me? Whats my excuse for what? Are you asking me what languages we had to take so far?
-http+css (inb4)
-python
-java
-c
-c#
-lc3 assembly
-js
-sql
? I didn't question your skill but if you wanted to show someone your achievements, nice man?

>>57055591
python is oo though

>>57055615
Clearly that sentence implies its my own opinion? I dont need to be humble about my own opinion
>>
>Final year art student, I've pretty much come to the conclusion that there are only 2 colors worth using which are black and white.
>>
>>57055655
>Just look at Java trying so hard to be like C with variable declarations and method return types
Are you honestly trying to say here that compile time type strictness disqualifies the language from being high level?
>>
>>57055655
You are really, really dumb and I seriously dread to think that you're a final year CS student. The system failed.
>>
File: 1474304028918.jpg (65KB, 736x822px) Image search: [Google]
1474304028918.jpg
65KB, 736x822px
What is so terrifying about object oriented languages?

I don't like Java too but I know how to use it anyway. Sometimes it feels like you guys just don't want to learn something new, well, you picked the wrong career.
>>
>>57055683
calling oop terrible has been a meme for a few years now, said by some influential programmers and repeated by retards who dont know wht the fuck they're talking about
>>
>>57055655
Try making a web application for a business that actually needs decent performance.
Implement it in Python and C and see what you get.
Both will suck, Python will be too slow and C will use too much developer time.

This is a sweet spot for Java and C#.
>>
>>57055108
>is it actually good and worth getting a copy in real life?
Nope. K&R is a reference book at best.
>>
>>57055696

desu when the retarded says that, and I've heard this kind of commentary before, it just cross me as he's just too lazy to learn another way of doing things. If you're a real programmer, it's not even that complicated.

Kind feel like committing career suicide. We've seen the outcome of those who didn't want to learn a new way of doing things.
>>
>>57055683
When people say they "hate OO" they really just mean "I hate the standard libraries/templates in Java/Sepples"
>>
>>57055696
I think it's a backlash against the OOP shilling that had been going on for a long time.

It's nice that a lot of OO languages are headed in a more functional direction so we can use the languages more flexibly.
>>
>>57055108
Programming languages are just tools, be language-agnostic if you don't want to be fucking autistic code monkey. What's important is general programming skills, knowledge and methodologies. You should be able to pick up any language and be reasonably competent within a week of studying and practicing it.

Also, I don't know what book you're on about but literally just look look up 'C' or 'C programming' on any free library. Like bookzz or libgen.
>>
>>57055108
Stanford?

>>57055580
MIT?
>>
>>57055676
No but what I am saying is if its supposedly high level whats the point of having so many irrelevant things
>>57055704
I dont doubt you and youre probably right, I don't know if we just got taught Java and C# in a shit way but its made me hate it
>>
>>57055734
>MIT?
As I said, shitty European university not even close to rank among MIT (which is consistently on top 10 on all three rankings).
>>
>>57055728
functional programming is not the opposite to OOP programming
the smart people who hate OOP favor plain procedural programming instread
anyone who favors functional programming doesnt have a clue what they're talking about
>>
>>57055580
Sounds a lot like my uni, we are only taught C and C# while we are expected to learn new programming languages as tools for our semester projects.
>>
>>57055108
Learn avr-C and directly program hardware.
>>
>>57055733
>Be language-agnostic
Thats like saying to a pianist be piano-agnostic, every pianist has their comfortable comfy piano that they retreat to whenever they do personal practices or whatever. The thing is, everyones good at general programming skills and knows how to solve, the problem comes with implementation and some languages make it much much harder than it needs to be.
>>
>>57055435
>And then you realize it takes 50 lines of code to read text from a fucking file.

https://docs.oracle.com/javase/tutorial/essential/io/file.html
Path file = ...;
byte[] fileArray;
fileArray = Files.readAllBytes(file);


good luck finding a job where even Pajeets can outskill you
>>
>>57055769
going too low level is just stupid, I don't want to take 2 weeks connecting and+or+not gates to print hello world on a 20x20 lcd screen
>>
>>57055746
>functional programming is not the opposite to OOP programming
I didn't say it was the opposite. Most OO languages aren't even purely OO they are procedural OO languages. A lot of people just refer to C# and Java as OO languages.
So what we are seeing is a combination of procedural OO languages and FP languages which is what I think is nice.

>anyone who favors functional programming doesnt have a clue what they're talking about
If by thinking a certain paradigm is superior, then yes that's ridiculous.
>>
>>57055740
They are not irrelevant. The point is performance, and Java is very much ahead of Python in that area. Apart for allowing for optimizations they also enable plenty of compile-time error checking, unlike with Python where same errors arise in runtime. Although that's something that you, who has never written a line of code that was useful for someone else, probably wouldn't appreciate.
>>
>>57055786
what's stupid is picking a level arbitrarily and not depending on the given task

you don't program web applications in assembly
you don't write hardware drivers in javascript
>>
>>57055802
>Although that's something that you, who has never written a line of code that was useful for someone else, probably wouldn't appreciate.
System.out.println("Now thats what I call edgy!");
System.out.println("Lmao system.out.println to print a fucking line")
Whatever java shill
>>
>>57055786
You don't connect gates while programming an AVR chip directly.
I'm using an Arduino for my semester project but I'm not using the Arduino libraries.
Instead I compile my own libraries directly to the AVR chip.
In most cases this is overkill but I really need to be able to optimize my code as it's a real-time system for an autonomous drone.
I probably need to optimize it a lot later to meet my deadlines.
>>
>>57055806
You can do both though, although <anything> in assembly is painful and hell.

But plenty of web apps are written in C++ and even C.

Various IoT development kits support writing low-level code in both javascript and python, Intel Galileo and Arduino are notable examples of that.
>>
>>57055108
learn asm for performance
>>
>>57055795
OO isn't mutally exclusive with procedural, you don't have a 'pure' OO language it's just a way of organizing code that already exists
and functional programming is inferior to procedural for most purposes, why is why it's not commonly used
>>
>>57055786
>confuses typing code to soldering 7400 series ic together.
We lad you dumb
>Doesn't want to make the next bluescreening video card driver.
I'm sorry you just dumb
>>
>>57055819
Of course. That's your best argument. "i like how python looks more".
>>
>>57055108
> Python
> worth learning
> over Haskell, C# and what not
As someone who has learned and actually used it in big projects, its only good for scripts embedded in or related to bigger projects. But this could be done with literally every other language too and is only done in python because its fast to write something that just werks in python.
>>
>>57055838
yeah man keep using those swing workers to keep running daemon threads in the backround you'll surely complete the task at hand kek, oh wait you forgot to schedule them and give them the reentrant lock so they can simultaneously work on the same object, oh wait.
>>
>>57055655
god you are retarded
>>
>>57055888
You already demonstrated very clearly how clueless you are so this is not very convincing at this point.
>>
>>57055901
lmao ur nothing without your ide kid keep talking like a big boy
>>
>>57055108

Python is so shit, it's easy to use but it's shit
>>
>>57055931
shit as in slow or?
>>
>>57055939
shit as in as retarded as you are
>>
File: lmao.jpg (26KB, 1280x720px) Image search: [Google]
lmao.jpg
26KB, 1280x720px
>>57055981
>>
>>57055939
Shit as in horrible for commercial use.
There is a reason why python's niche is scientist without CS knowlegde(it is the go to language for physics and such to process research data) and not people who actually get their money as software engineers.
>>
>>57055108
I hate Asuka. She's a total slut.
>>
File: 476.jpg (34KB, 640x480px) Image search: [Google]
476.jpg
34KB, 640x480px
>>57055108
>animefag
>retarded
every time
>>
>>57056030
Great but that's Maki and she's a tomato
>>
File: 076 - 4E6CYHu.gif (276KB, 240x287px) Image search: [Google]
076 - 4E6CYHu.gif
276KB, 240x287px
>>57055108
>Final year cs student, I've pretty much come to the conclusion that there are only 2 languages worth learning which is Python3x and C.
So CS is actually a meme. We punished with C++, C#, Java and webshit and my conclusion is all of them is equally useful on their meme.
>>
>>57055487
>thinks K&R is an anime meme
DELETE THIS
>>
>>57055108

>there are only 2 languages worth learning which is Python3x and C.

Python and C are definately a very good foundation. So yes, start with them.

But you have to understand two things:

1. knowing languages != being a good programmer

You can know 3 langauges by the book, but be a bad programmer, beacuse you need practice: How to modularize code? Where does the control flow go? You can't learn this theoretically, you have to apply it and face actual implementation problems.. "Experts have failed more times, than beginners even tried."

But you can also be an amazing programmer with little knowledge about langauges! Put a guy with 10 years Java experience in a C project and you will notice that even if he might take some time for the switch, he will (after a short while) write super well-structured and maintainable Code. An experienced Ruby develloper will also be a decent Python programmer and vice versa..
It's not that important, where you start, just do a lot of projects.


2. Languages are TOOLS. Of course you can tackle each problem with each language, but some problems can be super easy with on language and pretty hard in another one, each language has pros and cons.

So with good C and Python knowledge (having done some projects with about 10k LOC) you are already settled for a good career. But if you want to become a really good programmer you want ideas from other langauges. I highly advise at least some basic knowledge in each of those categories:

1. C or Assembly ("how does shit work")
2. an OOP langauge like Java, C# or C++ ("proper abstraction, no low level coding")
3. One scripting language like Python/Ruby/Perl ("getting shit done fast")
4. The web basics: HTML, CSS, JavaScript

Pro level coder:
5. LISP/Scheme/Clojure (a differnt way to look at data)
6. A functional language like Haskell, OCaml, Erlang, Elixir (another way to look at data)


But that's a lifetime's goal, tacke one langauge each year. Godspeed, OP.
>>
>>57055134
Typical 00s developer.

C isn't liked because it's so complete it makes it hard to learn. So instead of learning C, people learn easier meme languages, which merely mask the complexity of programming and one day it comes bite you in the ass. And depending on how recent the meme is, it can be untested, unproven, unmaintained, unfit for production use, and one day you'll end up crying. Now sure, a retard is going to come and say "waaaaah C doesn't do X!!". It actualy does, people did it, and they made nice libraries out of it, that you can reuse. Link that library, and suddenly it does EVERYTHING.

But neo-devs don't do that. They never look back at what has been done before. So they keep reinventing the wheel. They develop stuff when great libs already do it, they invent their own formats and protocols when great ones exist... That's why one meme language follows another, because with each generation comes a bunch of retards that are too beta to even learn Perl or Ruby and as a result develop their own meme language because "waaaaaah it's too hard!". We are literally witnessing a casualization of programming languages. Devs now spend most of their time developing interfaces between different languages, libs and protocols that all have their own specific standards and norms.

The best example is the entire modern stack of web technologies: it's one huge fucking mistake, especially when you realize the functional complexity of could be achieved by a fucking Gameboy. It's one gigantic pile of memes, and every two years, a new generation of retards stack their own memes on top. HTML4 itself was pretty much a mistake: just see how a document description language is now used to develop fucking software. This is pants on head retarded. And thanks to smartphones being as powerful as 00's supercalculators, they don't even see how inefficient all that shit is.

Websites and financial analysis could be made in C and run on 10% the hardware, if it wasn't for retards.
>>
>>57056224
This seems like the most reasonable post here, props.
>>
>>57056224
Informative post, one question though, could you explain to me an example of "ideas from other languages"? like any basic example, also what is "10k LOC" ?
>>
>>57056351
lines of code
>>
>>57056316

thx!

>>57056351

>what is "10k LOC"

"10 kilo Lines Of Code" = 10 000 lines of code

I pulled that number out of my ass, I just wanted to give an idea of the scale.
If you do a "g programmign challenge" it's about a few dozen to a few hundred lines of code. A small usefull programm (with some abstraction) might be a few hundred to a few thousand lines of code. A bigger project has about 10k - 100k lines of code..
So IMHO if cou have done some 10k projects you can say you "know" the language. That doesn't mean you can't get a job with smaller projects, though. But bigger = better ;)


>could you explain to me an example of "ideas from other languages"

Huh, that's a tough question. There's a lot to say here.. Bascially each paradigm solves differnt problems.

People use to write C doe and found out it's shit when you have 1000 variables floating arround. So they encapsulated data so that each module/alss provides an interface and "protects" it's inner stucture.

Also it makes it easier to exchanges components, you have a class that ensures it does certain things, you can easily exchange it (or devellop it "for itself", without knowledge of the surrounding) if you need to ("Design by Contract").

I put a difficult feature or a feature that's like to change in the future into a seperate module/class, so I can easily exchange it:

class a: [input -> ("sort with bogosort") -> output]

>"oh anon, it has to be faster"
>"no problem, boss!"

exchange class a with class b:

class b: [input -> ("sort with heapsort") -> output]


This is just a small exmaple of a problem where it's good to use OOP. Of coures it's more complex thatn that.. :)
Thread posts: 92
Thread images: 7


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.