Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
HELLO EVERY BODY I've tried to deal with link sprite jpeg camera by writing the following c# code : ------------- ------------- MY PROBELMS ARE : 1- when I send take pic command and want to read the jpeg file contents directly without reading the size the result is a pic whith 0 size !! although " read jpeg file contents " command does not depend on " Read JPEG file size " command !! 2- If I success to take a picture after sending " Read JPEG file size " command .. sometimes the picture is complete .. sometimes the picture is not complete Frown | :( 3- I haven't succeeded to take continuous shots only 2 pictures >>> I don't know how to overcome these problems ... I need the help and advice ... :\ Thanks.
Posted 22-Jan-13 10:47am
Edited 30-Jan-13 9:14am
v9
Comments
Sergey Alexandrovich Kryukov at 22-Jan-13 17:02pm
   
I would not expect that someone will dig into your code.
 
Your problem is not the failure to achieve certain effect, but the manner of writing the code: not strict plan, hard-coded "magic constants", repeated statements. It all makes your code very redundant and not supportable. And (related to your chances to get help), also unreadable.
 
Basically, you won't succeed unless you improve your general style and techniques. Fixing your code just makes no or very little sense.
 
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see my comments to the question.
 
What do you really need? Read this: http://en.wikipedia.org/wiki/Anti-pattern#Programming[^].
 
I gave you the link to the "Programming" anti-patterns, because this is your problem I can see immediately, but you should also look at the whole article. So, you need to start with identification of the anti-patterns in your code and learning how to eliminate them. You suffer from a whole bunch of those anti-pattern.
 
In addition, you heavily violate this very basic principle: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself[^].
 
It's not too bad if it distract you from solving your problem related to your question. If you continue developing in the style you just demonstrating, not only this experience won't help you, it would harm your chances to start programming. Right now, it's not too late.
 
Good luck,
—SA
  Permalink  
Comments
Andreas Gieriet at 22-Jan-13 18:08pm
   
My 5 again!
Bluntly stated, but correct!
Good references!
Cheers
Andi
Sergey Alexandrovich Kryukov at 22-Jan-13 18:21pm
   
Thank you, Andi.
You know, I really hope it will help, eventually...
—SA
Andreas Gieriet at 22-Jan-13 18:37pm
   
A good start is become aware of the issues. Actively improving needs its time...
Andi
Sergey Alexandrovich Kryukov at 22-Jan-13 22:09pm
   
Exactly my point. If you did not hope for that, would not bother about these explanations at all. :-)
Thank you again.
—SA
Abhinav S at 22-Jan-13 21:46pm
   
My 5.
Sergey Alexandrovich Kryukov at 22-Jan-13 22:10pm
   
Thank you, Abhinav.
—SA
Sergey Alexandrovich Kryukov at 23-Jan-13 12:06pm
   
Thank you for understanding.
Have a best of luck,
—SA
Balamurugan1989 at 31-Jan-13 4:54am
   
My 5....
Sergey Alexandrovich Kryukov at 31-Jan-13 10:30am
   
Thank you.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 504
1 Gihan Liyanage 298
2 RyanDev 250
3 Sergey Alexandrovich Kryukov 223
4 Richard Deeming 195
0 Sergey Alexandrovich Kryukov 8,906
1 OriginalGriff 7,771
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100