what actually matters when coding? yeah i could read a 900 page book about several programing concepts but there are several things that i will be using 99% of the time that actually matters, or at least that will save a bunch of time
on a side note: how does one keep code organized? some people say design paterns are a scam but i dont know if thats true
>>105992109 (OP)Are you asking for us to cram decades of experience into your head through the internet?
Write fucking code and you'll get better at it
>>105992141it's clear that just writing more code won't make you better at making well made code, see game devs like toby fox or yanderedev, they make a lot of code but all of it sucks ass, after writing so much code they should be better but aren't, you need at least some theoretical knowledge, code reviews and other things to become truly better, practice will only make you better at problem solving (which is really important, but still)
>>105992167write lots of code in the company of better developers than you.
>>105992109 (OP)Data Structures and Algorithms
>>105992109 (OP)Lisp (lambda calculus) and Haskell (category theory)
>>105992109 (OP)Soft skills. Do the stuff in the way that helps everybody else in your team be efficient, instead of the way that makes you look smart or that is technically correct. This applies to algorithms, architecture, technologies, everything.
>>105992109 (OP)Getting really good at higher-order functions gives a lot of bang for the buck. Doesn't have to be a pure functional context.
>>105992167>they make a lot of code but all of it sucks assYou want to minmax code so that every piece is perfect and hackerish? You cant
>>105992141/thread experience is all that matters. A senior dev can pick up a language he's never used before and write better code in it than any jeet.
>>105992109 (OP)>how does one keep code organizedDon't worry about it. You'll figure it out as you go. Coding is IQ + experience. That's it. Everything else is retard cope.
>>105992167It's an IQ issue. It's just like how practicing art day in and day out won't turn a retard into a good artist.
>>105992109 (OP)I'm not a good programmer but it would be handy to have a list of 100 concepts to research, ordered by expertise. A guide map for someone of any skill level to improve.
the only thing you need to understand to be a good programmer is the array and how the cpu cache works
take the array pill
theres a concept i heard about where the gist of it is you program about 40 hours a week for years on end and you end up a better programmer. this is contrasted with asking stupid questions and not doing shit
>>105992109 (OP)Spend some time really understanding recursion. It's not something you use every day, but having it be a natural idea really focuses the way you think about code. Playing around with Scheme is a great way to absorb it.
>>105993540In particular, try implementing recursion manually. Ie, pick some simple recursive implementation, and re-implement it as a loop, managing the stack yourself.
>>105992109 (OP)Read papers describing the implementation of successful programs and impressive demos that took a long time to be reproduced. Then try to re-implement them in your language of choice.
>>105992109 (OP)you become a better coder by working on real projects with other skilled programmers. you'll learn exactly jack shit by cramming books trying to acquire 2nd hand experience from some dumb boomer
>>105992109 (OP)>what actually matters when coding?understanding the domain and managing complexity
oh wait that's not """coding"""
In all seriousness, I get paid using the same CRUD concepts I did when I learned as a kid with PHP. Let’s not blow our egos up here
>>105993893That's very true, but there's definite real learning that can be done with personal projects. Something of moderate scale.
Example: write a simple from-scratch ray tracer that handles ray/ellipsoid collisions. There's plenty of new stuff to learn there that isn't super hard, but will make you focus. 3D math, some high level structure so your code isn't crazy, maybe a simple parser so you can specify an input text file. Write the code to actually spit out a targa. Avoid libraries.
It's not a giant thing but it's a good sized project with a clear endpoint that'll teach you a lot about engineering. There was an old issue of Doctor Dobbs that had a bunch of good starter info on this.
>encapsulate state and provide interfaces that preserve useful invariants
>principle of least surprise
>minimize state mutation
>minimize coupling
>don't duplicate state (unless you have a very good reason)
>give things specific, honest, and accurate names even if they're verbose, requiring longer names to satisfy these conditions is a sign of a poor abstraction or design
>prefer linear, explicit control flow
>design for what your requirements are, not what you think they will be, designing out a problem is the easiest way to solve it
>assert your assumed invariants, or if possible enforce them in the type system
>code should be simple to understand, clever code is rarely required
>know your craft inside and out (data structures, algorithms, tools, languages, compilers, libraries, etc.)
>don't repeat yourself, but don't abstract solely to avoid repetition
>premature pessimization is as bad as premature optimization
>understanding the problem domain is as important as understanding the solution domain
>more code is a liability, solving a problem using less code is almost always an improvement
>if your code requires comments to explain what it's doing it's probably poorly written, comments should document why something was done (if it's not obvious), not how it's doing it
>>105993385this wont work here. it works in person because you make someone feel like an abject retard when they see your face in the following conversation
>hey senpai i have a problemhey kohai what did you try so far
>try?
>>105994317>dr dobbshello fellow greybush. these days you run through https://raytracing.github.io/
>>105994502>dont repeat yourself>minimize couplingspend less time in consultants' fantasy land and more time with your own brain. these are mutually exclusive concepts
>>105992167Oh, no no no no. You're getting dangerously close to a based pill the normalnigs aren't going to like.
>"whaaa i keep practicing but i'm not improving">this is somehow not my fault>i should stick with thisNo, these people just suck and are too dense to figure out they aren't cut out for <subject domain>.
Imagine a world in which the average 40 year old wakes up and starts sulking over never making it as this supermodel, multi-millionaire, investor, 9000iq gigachad. Maybe some do, but these people are fucking mongs. Why the noylent freaks feel as though these people are worth pandering to instead of being gatekept, I have no idea.
>>105992109 (OP)- if you need to implement something that is not directly related to your project, put it into a lib. examples: a math utilities lib, SQL transactions lib, separate libs for data structures, a user interface lib, etc.
- use the correct data structures for your problems. example: rather than storing permissions in an array, use a set then do intersection checks and what not.
- use a relational database (Postgres). transactions give you access to very easy concurrency (make sure to use the appropriate isolation level, default to serializable). indexes automate the use of separate data structures for queries (and keep them in sync automatically). constraint allow for fine-grained control over the validity of data.
- use a language with a good type system and try to make illegal program states impossible to represent.
>>105995392it is not sufficient to write a lot. you must solve the same problem in different ways and understand the strengths and weaknesses of each approach.
then, you must throw all that code away. its homework. if you keep it around, its a project. if you upload it to github, youre retarded.
>>105995364There are no hard rules, most decisions in engineering are tradeoffs where either extreme is suboptimal, and where finding the right compromise is often ambiguous
>>105992109 (OP)>[] defines the beginning of a lambdaare you serious
[] defines the captures of the lambda
fucking hate jeets so much
>>105992109 (OP)why programming languages gotta use arcane sequences of esoteric characters?
why not just have like a emoji that says LAMBDA on it
>>105995429yes but you didn't say it that way now, did you? you didn't say on the one hand you have coupling but on the other hand you have DRY and you have to learn how to balance between the two
>>105995453use Clojure, Common Lisp, or Racket
>>105995453I feel like hitting a few standard keys on your keyboard would be significantly faster than trying to remember and enter a unicode character
>>105995453I prefer to use an actual λ.
see, talking about what symbols and shit you should use does not fucking matter. write fucking code.
>>105992109 (OP)I don't care, the AI is doing the code
Everything is a memory address and programming languages need to stop pretending otherwise.
>>105995596this type of thinking is fucking retarded and demonstrates a complete lack of ability to handle abstractions. given your line of thinking, you shouldn't even be using structs. just do some fuckin math on some pointers and get access to the correct slot. put the magic constants into a comment for documentation. pray to God when you decide to update a "struct" and need to search and replace your entire fucking codebase for those magic constants. pray to God when you realize some of those constants are shared.
you're fucking retarded. unironically, what makes you think of this shit?
>>105995619>given your line of thinking, you shouldn't even be using structsthat's retarded and demonstrates a complete lack of understanding of how memory works
>>105995638I would thoroughly enjoy smacking the fuck out of you
>>105995453In the case of C++ it's because they've run out of usable tokens. It's so mutated now, everything has to be a weird contrived bolt-on. It's pretty ridiculous.
>>105995673For efficiency purposes, programming languages should not allow any characters which require the shift key to enter.
>>105995619nah bro. you need to understand how the hardware works.
dudes really out here thinking using a lambda function makes them john nash. incredible what marketing has done to this industry lmao.
only thing that matters is design patterns, project structure, the common idioms for x language used over and over and over to solve the same recurring problem for 40 years, ie having a job.
>>105995729(1) I've been programming for over 15 years at this point.
(2) I've made my own languages.
(3) I've been employed and worked on medical devices.
(4) You're (mostly) wrong.
>>105995596write a compiler that does this please
>>105995596based and memory safe mindset
>>105992109 (OP)The concept of “shitposting on 4chan is bad for you”. Leave, while you still can.
>>105992167I'm not sure "better code" is a goal. But since you brought up game devs, there's a clear divide between people that want to make a game and people that want an audience to validate their identity. The later being typical morbid self-absorption, which I think holding back the ordinary autistics from becoming idiot-savants.
>>105995765ok champ. nothing youve said makes you less wrong
>>105992167It's a lack of understanding of higher order concepts. Basically low IQ plus no desire to learn except the bare minimum. Gamedevs especially can barely code game logic. Yanderedev and pirate software don't even know or use design patterns. That's why even AAA companies publish games with shit graphics that run badly, just because they don't click a checkbox in unreal engine. Gamedevs don't know any graphics programming.