Click here to Skip to main content
11,796,774 members (79,639 online)
Rate this: bad
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
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.


1 solution

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

Solution 1

Please see my comments to the question.

What do you really need? Read this:[^].

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:[^].

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,
Andreas Gieriet at 22-Jan-13 18:08pm
My 5 again!
Bluntly stated, but correct!
Good references!
Sergey Alexandrovich Kryukov at 22-Jan-13 18:21pm
Thank you, Andi.
You know, I really hope it will help, eventually...
Andreas Gieriet at 22-Jan-13 18:37pm
A good start is become aware of the issues. Actively improving needs its time...
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.
Abhinav S at 22-Jan-13 21:46pm
My 5.
Sergey Alexandrovich Kryukov at 22-Jan-13 22:10pm
Thank you, Abhinav.
Sergey Alexandrovich Kryukov at 23-Jan-13 12:06pm
Thank you for understanding.
Have a best of luck,
Balamurugan1989 at 31-Jan-13 4:54am
My 5....
Sergey Alexandrovich Kryukov at 31-Jan-13 10:30am
Thank you.

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

  Print Answers RSS
0 Abhinav S 379
1 OriginalGriff 360
2 Maciej Los 360
3 CPallini 295
4 KrunalRohit 280
0 OriginalGriff 2,032
1 Maciej Los 1,725
2 KrunalRohit 1,310
3 CPallini 1,055
4 ppolymorphe 883

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2015
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