What are the most important concepts in programming? - xstartup
======
odonnellryan
Personally, 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
I 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.

------
willstepp
Every 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
I 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.

------
samblr
Depends 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.

------
Artlav
Layers 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
Yup. Combined with this, the "single level of abstraction" principle can make
for much more readable and maintainable code.

------
znt
Writing 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.

------
lucozade
I'm going to plump for interfaces and composition. At least if you're building
at any sort of scale.

------
LarryMade2
Maybe theres more money in guaranteed advertising than can be realized by
subscriptions.

------
BjoernKW
Data structures come out on top for me as well. Other than that, I'd say loops
and callbacks.

~~~
_RPM
A 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
Neither 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.

------
amorphous
Clean 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.

------
rlancer
Speration of concerns

------
tboyd47
Syntax.

