Click here to Skip to main content
12,751,306 members (33,530 online)
Rate this:
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 :( 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 11:47am
Updated 30-Jan-13 10:14am
Sergey Alexandrovich Kryukov 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 22-Jan-13 18:08pm
My 5 again!
Bluntly stated, but correct!
Good references!
Sergey Alexandrovich Kryukov 22-Jan-13 18:21pm
Thank you, Andi.
You know, I really hope it will help, eventually...
Andreas Gieriet 22-Jan-13 18:37pm
A good start is become aware of the issues. Actively improving needs its time...
Abhinav S 22-Jan-13 21:46pm
My 5.
Sergey Alexandrovich Kryukov 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.
Sergey Alexandrovich Kryukov 22-Jan-13 22:10pm
Thank you, Abhinav.
Sergey Alexandrovich Kryukov 23-Jan-13 12:06pm
Thank you for understanding.
Have a best of luck,
Balamurugan1989 31-Jan-13 4:54am
My 5....
Sergey Alexandrovich Kryukov 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170215.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2017
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