Concepts, techniques, paradigms that really helped you

Cogman

Lifer
Sep 19, 2000
10,278
126
106
I thought it would be fun if we could have just a fairly open thread where we list the "things" in programming that have helped us become better programmers, even just the little things.

For example. Learning the object oriented paradigm really changed the way I think about programming, it has made programming loads easier and really shifted the way I do things. Rather then saying "do this, then this, then this, ect...." you say "Ok we have a thing, what can a thing do, how does it work with other things, ect". It is much easier to think of and far easier to encapsulate.

As a small improvement, I would say that learning the difference in the speed of different containers vs a straight array have really changed when I think of working with groups of objects and when to use either.

A technique that I really enjoy is the radix sort. This puppy is so powerful and great for a small to medium list of integers. It makes quicksort look slow
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Data structures! Knowing how they work, how to implement them, and knowing all the advantages and disadvantages of different structures in terms of memory and speed is definitely what has changed my programming the most.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Know how to split your main subroutine in mini-subroutines and mini-functions as useful and needed. Learn how to design your program in an object-oriented manner, so it will be easier to reuse some pieces in other applications if you need to. Never make things more complicated than you need to, for no reason. Don't try to anticipate the future all the time. It just makes you lose sight of your current goal, and sometimes it's best to reimplement things anyway.

I usually end up making a "rough draft" of a program that's made a little sloppily and is more of a proof-of-concept. Making that takes longer than you think. But not until you have the proof-of-concept can you design your classes and types properly to work for you. So you don't want to start designing from the ground up. Have some good, solid, sharp code to start from before you start putting in the packing peanuts and bubble wrap. Prototype things before you put them in your main application. For instance, test a new class in isolation by making a new project for it, and use that project as a test bed for the class. Make sure the classes in your program work well before utilizing them all over your code. If you feel queasy about something you just implemented, put breakpoints in (even if the first run works fine) to ensure all your variables are what you expect them to be.

Use the facilities available to you. Usually they are more well-tested and faster. Never implement things yourself unless you absolutely need to. This adds complexity to your project and makes debugging difficult. Break your project up into big, manageable pieces only.
 

Rainsford

Lifer
Apr 25, 2001
17,515
0
0
Modularization, without a doubt. Code that "does it all" is incredibly difficult to debug because it's hard to check the functionality of any one piece. Not only that, but being able to re-use code is something that, while glossed over in college computer science programs, becomes a BIG help in the real world.

The second most important thing has got to be the idea of understanding the platform your software is running on. Computer science generally teaches you that the computer is a generic interpreter for whatever code you're writing, and that the functionality of the code is more important than how it works at the low level on any particular platform. This gives us things like bcopy routines that read a single byte at a time instead of taking advantage of "load word" instructions available on most architectures and other things like that. Computer science professors would like to pretend that the machine is an abstraction layer, but you don't get the best performance results that way...performance matters!
 

reverend boltron

Senior member
Nov 18, 2004
945
0
76
For me when I started drawing things out that really helped my programming.

For instance... drawing out a small binary tree

Or drawing out memory and addresses to understand pointers.. I picture pointers as mailboxes.


------- ----------
| 6000 | CAT |
------- ----------
------- ----------
| 6128 | Dog |
------- ----------
------- ----------
| 6256 | Rat |
------- ----------

Where the numbers are the memory addresses, and the words are the data that are held there.

That might be really basic to everyone else, but when I started to see things like that, it REALLY helped me out a lot.

That and, again, drawing everything out... As in, drawing out my data structures and my program flow, and my MySQL Schemas, and all that fun stuff.

Once I got into the habit I bought a few whiteboards on sale and I used them all the time.
 

Train

Lifer
Jun 22, 2000
13,863
68
91
www.bing.com
Originally posted by: Crusty
Data structures! Knowing how they work, how to implement them, and knowing all the advantages and disadvantages of different structures in terms of memory and speed is definitely what has changed my programming the most.


this.

When I think of core knowledge, data structures are key. Knowing all of them (linked lists, arrays, various tree types) and the various base algorithms that go with them (binary sory, bubble sort, etc) can carry over even into high level languages that handle all of that for you.

Even though I program in managed languages almost exclusively nowadays, I wouldnt have the expertise i have now without having learned things in a non managed language such as C++ first. Knowing exactly what the garbage collector is doing and when, and knowing about the memory allocation of your objects, is crucial. Just because the compiler/gc handles a lot of this for you in the newer high level languages, doesnt mean you shouldnt really know whats going on behind the scenes.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |