views:

2159

answers:

44

For some reason, I notice that I end up using a lot of finite state machines at work. In particular, when I'm implementing a custom TCP/serial protocol, they are very helpful and produce a very robust output (in my opinion).

My days in CS classes are long behind me. As such my recollection of the stuff I learned there is fuzzy. I was curious if there are other concepts people are leveraging that I've forgotten about.

There is no "right" answer. Vote up the answers containing the concept you use this most. We'll simply end up with the most used concepts on top. For me, it'll be a list of stuff to study up on.

-Robert

+4  A: 

The "Google" concept ;)

Walt W
You must make a nice arbitrary-precision math library if you routinely calculate numbers in the googol (10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000) range.
Chris Lutz
You found a bug.10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00010,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00010,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00010,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
Jon
Perhaps I routinely execute the binary 10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ; You never know!
Walt W
@Jon - I found that bug a while ago, but thanks for making it worse. =)
Chris Lutz
At least it only destroys the post with the offending comment
Walt W
As long as no one upvotes any of these comments...
Chris Lutz
you're making it sound like an apocalyptic scenario if someone does . . .
Walt W
+8  A: 

Complexity.

Lance Roberts
Managing Complexity?
Esti
+6  A: 

Time/Space complexity.

Callum Rogers
+16  A: 

Model View Controller pattern is the one I use more so than any other.

Zoidberg
Or, perhaps more generally, a separation of concerns. MVC is really just a well-formed extension of that concept.
Matt
Yes, definitely.
Zoidberg
Except, like many of the answers here, it has nothing to do with Computer *Science*.
Alex B
+10  A: 

Breaking down a problem into smaller sub-problems, I think, is something I quite often do, even if not really thinking about it :

  • it helps getting to the solution
  • and it also help getting cleaner code (smaller functions / methods, that do "unit stuff", for instance)

Still, maybe it's not really a "concept"... Event if I remember some algorithm lessons where we were taught "divide to conquer" ^^


If you want something more concrete, I'd go with :

  • testing ; it's something we don't do when we are just out of school... And we learn the hard way that it's definitly something we have to do more, and better !
  • Some Design Patterns, probably
  • Thinking before coding -- maybe the most important thing in our jobs ^^
Pascal MARTIN
It certainly is a concept: http://stackoverflow.com/questions/1323704/what-computer-science-concept-do-you-apply-the-most/1324123#1324123
chaos
+2  A: 

Object Oriented Programming

marcgg
+16  A: 

Graph theory

shoosh
+30  A: 

Keep it simple. If possible, make it simpler.

Jason Williams
A simple answer, but a VERY good one.
Zoidberg
.. but not any more simple.
PoorLuzer
Is this a CS Concept??
DJ
This is not really a computer science concept imo. Its more just common sense in engeneering in general.
Henri
Of course it's a good practice - but it doesn't answer the question - I don't understand all the up votes
DJ
It is in the very first MIT SICP lecture - hide complexity. You don't get much more CS than that.
jva
Hide complexity != simple
DJ
IMHO it's the best thing programmers/teams can do to improve the quality of their work in all areas.
Jason Williams
+6  A: 

Concurrency and parallel computing. I didn't touch it for many years, but it's become more relevant with each passing year (and each core count doubling).

Michael Petrotta
+12  A: 

Object Oriented Programming and Data Structure

David
+13  A: 

Copying and Modifying Existing Code.

Lance Roberts
How true, yet funny at a superficial level.
PoorLuzer
+12  A: 

Big O notation

Steve B.
Big zero? :)
Stephan202
Just to clarify - Big O is not a complexity class, but rather a notation with mathematical significance...
Yuval A
I, seriously, have never used this ...
Martin
+2  A: 

Requirements analysis and relational databases.

Serge
+1  A: 

It's not CS-specific, but just remember that producing results that are simple or concise are both good goals. If you can produce something simple and concise then you're likely producing high-quality work.

STW
+1  A: 

Understanding and utilizing the data structures and algorithms provided for me by language libraries (either from the standard or third parties, like Boost). Don't reinvent the wheel, and learn what wheels are out there that are better than your own.

fbrereto
A: 

Analysis of Algorithms

Introduction to Algorithms: Cormen, et al.

The Art of Computer Programming: Knuth (the entire series)

Los
The question was about "concepts". Not best sources for them.
PoorLuzer
That's right...the concept(s) are Analysis of Algorithms and I listed which concepts they are by listing the sources
Los
A: 

I believe we all do FSM's day in and out. OOP models a FSM , so does a MVC.

Infact, OOP/MVC etc are patterns for expressing a FSM.

Are there ANY applications where we DO NOT build a FSM?

Consider a simple application - sorting. Well, that's a FSM too!

This should be the question in fact : Are there ANY applications where we DO NOT build a FSM?

PoorLuzer
Flying Spaghetti Monster? ;) In all seriousness, I'm not sure I'd classify this as an applied concept really.
Thorarin
99% of what we build ARE Finite state machines.All that talk about abstraction and encapsulation ec are just ways to help implement them better.
PoorLuzer
+1  A: 

Problem solving...

Martin Marzejon
+4  A: 

Estimating space/time complexity and using appropriate data structures to get much simpler/faster code. Modeling certain problems as graphs also came useful once in a while.

MAK
+2  A: 

Encapsulation or information hidding

eKek0
Would I be wrong to think this would go under abstraction?
Jorge Israel Peña
+3  A: 

Functional decomposition.

chaos
+29  A: 
Joe Philllips
I only wish that EVERY software developer understood the importance of this principle.
Jagd
Lovely Kabbalistic tree of life diagram you have there.
chaos
What package did you use to make that graph? +1 for bringing up decoupling.
Torlack
I never learned this in school, but +1
Martin
The graph was done using a Sharpie marker on a yellow legal pad.
Sammy Larbi
But what does the design look like when you zoom in on M??? Quite often it's just the same mess wrapped inside a class/method/ESB whatever. - Still a very important principle though :)
Esti
+1  A: 

"Debugging code is twice as hard as writing it. Therefore, if you write code as cleverly as you can, you are by definition not clever enough to debug it."

chaos
I like the saying, but in practice its a lot of crap since you can make you're code easier to debug if you think about it and do it cleverly.
Henri
+6  A: 

Singleton, template and strategy patterns.

Also: YAGNI - You ain't gonna need it
KISS - Keep it simple, stupid

galaktor
IMHO, singleton pattern is _very_ overused (borderline "evil"). So yes, you need to know it to avoid it, but "knowing" shouldn't be construed as "using" as the OP intends this question to be.
rmeador
Although you are right, I (and most of us) make use of services every once in a while that are held as singletons - even though I usually manage them with an IoC container, it's still the pattern under the hood.
galaktor
+11  A: 

Don't repeat yourself.

alanlcode
I must have missed that class...
DJ
Ever took a software engineering practicum, or any coding intensive CS class? It should be a core concept if you have. http://en.wikipedia.org/wiki/Don't_repeat_yourself
alanlcode
DRY
Joe Philllips
Hey, I think I took that class twice.
NVRAM
I must have missed that class..
kaizer.se
Python?(some text)
hgulyan
+3  A: 

Avoiding premature optimizations, as Mr Knuth said:

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." (from wikipedia)

fco.javier.sanz
A: 

Data Binding, you gotta use it all the time... in numerous different ways....

81967
A: 

Modelling

Formal verification for small but hard functions.

Lambda expression (C# :p)

Concurrency "theory"

Design patterns

Writing specs before writing code.

Henri
A: 

The fundamental Theorem of software engineering: any software engineering problem can be solved by adding a level of indirection.

(I think that it has been formulated in this form by A. Koenig)

But then, too many levels of indirection can become hard to follow :-)

Francesco
I don't mind about the downvote :-) but do you think it is an unseful concept? Please explain, so that I'll see the point, otherwise I'll be left clueless...
Francesco
+2  A: 

"Any problem in computer science can be solved with another layer of indirection." — David Wheeler, chief programmer for the EDSAC project in the early 1950s

When well-applied, this leads to reasonable generalization as seen in examples such as abstract data types, reusable classes with virtual methods, etc.

When poorly-applied, it leads to overly-indirect implementations with lots of runtime overhead due to over-generalization, e.g. the Intel 432 architecture.

Liudvikas Bukys
+1  A: 

Coupling and cohesion.

It's essentially the divide-and-conquer paradigm the basis of all software.

You are looking for orthogonal concepts and orthogonal software entities, those that exhibit loose coupling and high cohesion.

Used a gosub in Basic? You're using C&C.

Sam
A: 

Relational Model for data management and normalization.

jatanp
+1  A: 

These are the university courses/concepts I found most useful for my professional career

  • Introduction to Databases
  • DBMS - how they're working
  • Algorithms and Data structures
  • Object Oriented Programming concepts
  • Design patterns (mostly MVC, application layering)
  • Requirements engineering
  • Software Quality Management
  • Software Metrics

guess they're all...I did not mention specific technologies here but just the concepts.

Juri
A: 

"First make it work, then make it work /fast/."

Of course, you must not lock yourself in to a slow design, but a lot of time can be wasted trying to optimize routines that would never become the bottleneck of the entire solution - also, if you later discover the need to redesign that optimized module, your optimization effort was arguably wasted.

uosɐſ
A: 

What data structures exist, their space/time characteristics, and what situations each should be used for. There is no better way to write fast, maintainable code than to use the appropriate data structure for your use case.

Btw, even though you could make the case that data structures are design patterns, I intend for this to be considered as distinct from design patterns.

rmeador
+5  A: 

Abstraction

Aho and Ullman write in the introduction to Foundations of Computer Science

But fundamentally, computer science is a science of abstraction — creating the right model for thinking about a problem and devising the appropriate mechanizable techniques to solve it.

Doug
Sad I had to scroll all the way down to find this one haha. Many of the provided answers so far would fall under abstraction I think, which just goes to show how important this one is.
Jorge Israel Peña
+1  A: 

The longer a fault exists in software the more costly it is to detect and correct the less likely it is to be properly corrected

Jakkwylde
A: 

I'm surprised no one has mentioned encapsulation.

Esteban Araya
Actually: http://stackoverflow.com/questions/1323704/what-computer-science-concept-do-you-apply-the-most/1324118#1324118
DJ
+1  A: 

The most important phrase that pops into my head a lot was from my operating systems professor -- and I didn't do very well in operating systems. Nevertheless...

"There is no magic."

He meant that if a computer can do it, a computer programmer can figure out how it is done. When someone waves the magic "high technology" wand, look closer, and you'll see a heuristic.

When I have to accomplish something hard, it gives me the courage to find a way to do it.

When I am presented with some "magical"-seeming piece of technology in the media or in marketing material, it makes me skeptical and dig for the truth.

Vineel Shah
A: 

I frequently apply Computer Science concepts every day to write my own custom splay trees and ray-tracing algorithms for the Java web applications that I develop.

GreenieMeanie
A: 

Vectorization. I use MATLAB at work for some of my programming and am regularly porting scalar operations to a vector implementation. Sometimes it's a lot of fun - sometimes it feels like picturing a hypercube flatlanding a Mobius strip while chatting with Escher.

b3
A: 

Time and space estimation. How long will this thing take to run? Not just big-O notation, but also some idea of whether something will take seconds or hours. Also how much space will something take up? Is it 1 meg of data I can load into RAM, a gig of data I can work on in RAM with a bit of work, or 100 gigs of data that will take disk and/or a distributed system?

I interviewed a lot of fresh-out-of-undergrad engineer candidates at Google. I'd say about 50% of them couldn't tell me how much RAM was in a computer, or estimate how long it'd take to, say, parse a million web pages. Without some basic intuition of how big a problem is you're not equipped to solve it.

Nelson
+2  A: 

Garbage in, garbage out.

Cyril Gupta
A: 

Appropriate levels of Abstraction

Allbite