Subscribe to Stuck in an Infiniteloop        RSS Feed

What is Up With Code Dump?

Icon 2 Comments
Hey look, the title rhymes. Now that I have your attention, what is the deal with code dump nowadays? Considering we (a la programmers) spent an exorbitant amount of time reading and understanding code, you would think that we would be "used to" or "ok with" 5 pages of code with a "what's wrong" thrown on the end for good measure. No. A thousand times no.


Just because you can post an unabridged version of Atlas Shrugged (in code form) doesn't mean you should. Especially if your question is incredibly broad or incredibly specific. Wait, you say, how can it be both?

Incredibly broad: Say you're working on an OOP school project that requires several actors (Cars and People seem to be popular) with various interaction between them. Following your problem statement, you conjure up some classes and rough functionality. "Oh no!" you exclaim as you hit a snag in your progress. What should I do to [make this better/cleaner/faster/more OOP-ish/et al]? You then decide to share the entire project in a thread asking one of the aforementioned questions. The biggest problem with such a broad question is objectivity. What I may think makes your project "better" might be someone's idea of making it worse.


"Your car makes a vroom-vrooom noise? That's dumb, have it go beep-beep instead"

"KYA you're retarded! Everyone knows all Cars go vroom-vroom".

Superficial yes, but equally applicable in every circumstance. In fact, I dare you to go find an instance where this wouldn't apply. Keep in mind this is speculation on a program assuming the guidelines/goals of the project have been met. Arguing over design/code efficiency is encouraged and doesn't fall within the scope of this post.

Incredibly specific: You have a very specific question regarding one function in your program. You then proceed to post then entire program. Why? Nine times out of ten, we won't need the extraneous information and rest assured, if there is some dependency we do need, we'll ask for it! It's akin to going to the doctor complaining of a hurt knee and showing him your elbow. It makes no sense!


The other issue is time. After dealing with a language for a while you can immediately locate where "trouble areas" might be. Case in point: C/C++ segmentation faults. The first time you ever had one, it was scary. But now it's:


Check your pointers, check seg fault memory message, fix. Re-compile. Yawn.

In Java, the issues are usually with NullPointerExcpetions or GUI concerns. Easily isolate-able assuming any form of design is present (GUI stuff in in its own little area, logic in another, so on and so forth). But when you post 5 pages of code with "my JButton actionlistener isn't working", everyone dies a little inside.

Not to mention that no one wants to read through a massive code dump. Unless its their own dump. Clean up after yourself!


To recap, in case you have terminal short term memory loss: keep your relevant code short and sweet, to the point, with specific questions. The community thanks you.

2 Comments On This Entry

Page 1 of 1


12 May 2010 - 12:39 PM
That pretty much sums it up. Nice article!


14 May 2010 - 04:36 PM
Check my pointers...hell, I head right to valgrind :)
Page 1 of 1

November 2020

222324 25 262728


    Recent Entries

    Recent Comments

    Search My Blog

    3 user(s) viewing

    3 Guests
    0 member(s)
    0 anonymous member(s)