Click here to Skip to main content
15,905,071 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Motivation for Data Structures Pin
Vark11118-Nov-16 1:29
Vark11118-Nov-16 1:29 
GeneralRe: Motivation for Data Structures Pin
harold aptroot18-Nov-16 1:32
harold aptroot18-Nov-16 1:32 
RantThat's an invalid rant. Pin
Rajesh R Subramanian18-Nov-16 1:47
professionalRajesh R Subramanian18-Nov-16 1:47 
GeneralRe: That's an invalid rant. Pin
TheOnlyRealTodd19-Nov-16 0:20
professionalTheOnlyRealTodd19-Nov-16 0:20 
GeneralRe: That's an invalid rant. Pin
Rajesh R Subramanian19-Nov-16 20:52
professionalRajesh R Subramanian19-Nov-16 20:52 
GeneralRe: That's an invalid rant. Pin
TheOnlyRealTodd20-Nov-16 18:39
professionalTheOnlyRealTodd20-Nov-16 18:39 
GeneralRe: Motivation for Data Structures Pin
W Balboos, GHB18-Nov-16 2:33
W Balboos, GHB18-Nov-16 2:33 
GeneralRe: Motivation for Data Structures Pin
Marc Clifton18-Nov-16 3:08
mvaMarc Clifton18-Nov-16 3:08 
TheOnlyRealTodd wrote:
I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class).


I think the point of the exercise (or at least would be, if I were teaching a class on data structures) is several. Data structures can be complicated, you have to handle edge cases, consider where your performance issues are, often in tradeoffs between a performant search vs. a performant insert/delete, how do you test not just the simple operations and edge cases, but how do you test performance and memory utilization, etc.

In other words, it's a good exercise to bring to consciousness things that we rarely think about because, as you said, these things already exist, so why rewrite them? But the lessons learned are applicable in general programming, and that's important, IMO.

I also think one of the more fun things about data structures is using (or creating) the right structure for the particular task. When I was working on a multi-threaded solution to solve a complex end-of-life analysis of the switch ring topology in communication satellites, I realized there were times when a canned data structure was great, and other places where I needed a custom data structure of the same information, just organized differently. While maintaining both data structures took more memory, that was irrelevant (the memory usage was not the issue here) but what was relevant was the significant performance improvement by using the right data structure for the particular algorithm.

Marc
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802

GeneralRe: Motivation for Data Structures Pin
Nemanja Trifunovic18-Nov-16 3:37
Nemanja Trifunovic18-Nov-16 3:37 
GeneralRe: Motivation for Data Structures Pin
Eytukan18-Nov-16 4:49
Eytukan18-Nov-16 4:49 
GeneralRe: Motivation for Data Structures Pin
den2k8818-Nov-16 4:56
professionalden2k8818-Nov-16 4:56 
GeneralRe: Motivation for Data Structures Pin
Eytukan18-Nov-16 6:21
Eytukan18-Nov-16 6:21 
GeneralRe: Motivation for Data Structures Pin
TheOnlyRealTodd18-Nov-16 15:30
professionalTheOnlyRealTodd18-Nov-16 15:30 
RantPinnacle Studio 20 with latest patch file.... Pin
DaveAuld17-Nov-16 23:25
professionalDaveAuld17-Nov-16 23:25 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
Johnny J.17-Nov-16 23:43
professionalJohnny J.17-Nov-16 23:43 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
DaveAuld17-Nov-16 23:52
professionalDaveAuld17-Nov-16 23:52 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
Johnny J.17-Nov-16 23:55
professionalJohnny J.17-Nov-16 23:55 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
DaveAuld18-Nov-16 0:36
professionalDaveAuld18-Nov-16 0:36 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
Nelek18-Nov-16 2:45
protectorNelek18-Nov-16 2:45 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
Johnny J.18-Nov-16 3:27
professionalJohnny J.18-Nov-16 3:27 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
DaveAuld18-Nov-16 3:42
professionalDaveAuld18-Nov-16 3:42 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
Johnny J.18-Nov-16 3:49
professionalJohnny J.18-Nov-16 3:49 
GeneralRe: Pinnacle Studio 20 with latest patch file.... Pin
DaveAuld18-Nov-16 3:54
professionalDaveAuld18-Nov-16 3:54 
GeneralWeird Wi-fi Proximity Issue Pin
PeejayAdams17-Nov-16 22:58
PeejayAdams17-Nov-16 22:58 
GeneralRe: Weird Wi-fi Proximity Issue Pin
DaveAuld17-Nov-16 23:27
professionalDaveAuld17-Nov-16 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.