4 ms·
What are the most important concepts in programming?
- willstepp 9y agoEvery program you will ever write: Input -> Transformation -> Output. That may sound annoyingly simplistic, but internalizing that one concept gives you a foundation to break down any problem you encounter.
- lucozade 9y agoI used to have a boss who had a habit of saying "Data in, data out. How hard can it be?". Annoying doesn't get even half way close.
- tboyd47 9y agoSyntax.
- odonnellryan 9y agoPersonally, data structures. If you're using the correct data structure it doesn't mean you can't use a bad algo, but if you're using the wrong data structure it guarantees you're not solving the problem efficiently. It's much easier to google "how to do X with graphs" to find some research on a great (if needed) runtime solution to your problem. It's really hard to google "how to sort these things so I can quickly do X with them" of course ... On top of that, if you have even a fairly-good data structure for your problem it makes coding and maintaining your solution that much more fun!
- blackflame7000 9y agoI would second that Data Structures are the most important. But another key intertwined principle is the concept of abstraction. Sometimes it can become hazy which class should own which, which class should store which DataStructures, or how related classes should reference the DataStructures instead of copying.
- znt 9y agoWriting pure functions really helps with maintainability: https://en.wikipedia.org/wiki/Pure_function https://en.wikipedia.org/wiki/Pure_function You will always have side effects but you can try to isolate the bits that are impure and write the rest of your software in a purely functional manner.
- BjoernKW 9y agoData structures come out on top for me as well. Other than that, I'd say loops and callbacks.
- _RPM 9y agoA callback is just a function call. Nothing more, nothing less. Unless you're talking about a callback that will be at a later time,, that would be async
- BjoernKW 9y agoNeither are callbacks just functions nor are they necessarily asynchronous, that’s just how they work in JavaScript for example. Callbacks - or closures, to use the more general mathematical term - allow you to delegate behaviour.
- lucozade 9y agoI'm going to plump for interfaces and composition. At least if you're building at any sort of scale.
- Artlav 9y agoLayers of patterns. The whole point of programming is to take something complex and break it down into simple arithmetics and logic that a computer can digest. So you build simple, isolated expressions that do one slightly more complex thing using slightly less complex things, then use these expressions to build slightly more complex things, and so on recursively, all the way up to having a "do the thing" button in an app. Having these isolated, modular, layers of testable implementations is what makes code that can survive the test of time.
- cimmanom 9y agoYup. Combined with this, the "single level of abstraction" principle can make for much more readable and maintainable code.
- samblr 9y agoDepends on what stage of learning curve one is in. For somebody new - strive to be good at data structures, design patterns and consistent code style. - - Also as we get into programming in multiple languages over the course of our careers - we can better harness the power of code templates (live templates in Intellij or code snippets in VS === kind of meta programming). eg: I can spend couple of weeks to learn a new framework/language (which sometimes can involve lot of syntax) or Just few days to learn concepts well - then an hour to make handy live templates in editor. Latter I've found - boosts productivity really well.
- rlancer 9y agoSperation of concerns
- amorphous 9y agoClean code. Knowing that any debt will invariably come back hunting you. Clean code, however, is still a lot of art and experience, you never stop learning.
- LarryMade2 9y agoMaybe theres more money in guaranteed advertising than can be realized by subscriptions.