Monday, September 6, 2010

Zig Zag painting Java program

Have you ever wondered how you started to paint of fill a block with cryon. It was in manner pictured here
http://en.wikipedia.org/wiki/File:JPEG_ZigZag.svg
What a initution this is the manner that is used in JPEG compression encoding algorithm.
Figuring out to pattern for programming. You can't best is to store all the 64 values in an array.
like structure.
Following program can be handy

public class ZigZag {
    public static int ZAG[] = {
             0,   1,   8, 16,   9,   2,  3,  10,
            17, 24, 32, 25, 18, 11,  4,   5,
            12, 19, 26, 33, 40, 48, 41, 34,
            27, 20, 13,  6,  7, 14, 21, 28,
            35, 42, 49, 56, 57, 50, 43, 36,
            29, 22, 15, 23, 30, 37, 44, 51,
            58, 59, 52, 45, 38, 31, 39, 46,
            53, 60, 61, 54, 47, 55, 62, 63
        };
   
   
    public static void main(String[] args) {
        for (int i=0 ; i< 64 ; i++)
        {
          // Matrix values  (Row , Column
          System.out.println(ZAG[i] +"= ("+ ZAG[i]/8 +","+ZAG[i]%8+")" );
             
        }   
    }

Such techniques can be extended into circular concentric spiral approximation.
Similar pages http://java.about.com/od/beginnerlevel/a/doublyevenmagic_2.htm

Wednesday, September 1, 2010

Life without a source control management

It is difficult to track the changes/ files / folder structure if you donot have it in a source control.
You have to get the hassle of backing, remember the following things.

Following were typical artifacts to track it.

---  MILESTONE LABELS ---

AUG_03_migration_work_done
AUG_13_axlStuff_add_remove_userworking
AUG_31_1200_refine_axl_5_1_testing_deleteDID_UC
JULY_15_start_sketal_framework
JULY_19_minimal_ui_and_contols
JULY_23_UI_and_controls_working_M1
JULY_27_first_internal_demo
JULY_30_rangeDID_input_done
SEP_02_1200_for_customer_demo


---  SOURCE DIFFS OVER A PERIOD OF TIME ---

ALL_ccmdiffs.txt

ccmdiffs_from_creation_july15_M1_M2_aug10.txt
ccmdiffs_during_development_from_august11_to_august30.txt

ccmdiffs.txt


--- SPRINT FEATURES ---
ccm_revisions_changes_from_developer_perspect.txt


--- Project work space tree structure ---

cur_tree.txt
prev_tree.txt



--- Web archives backuped at regular intervals and patched --

Directory of C:\ccmusers_project\packaged_web_archive_backups

09/02/2010  10:50 AM   
          .
09/02/2010  10:50 AM              ..
08/13/2010  05:55 PM         1,508,090 ccmapp_aug13_fordemo.war
08/17/2010  05:12 PM         1,519,778 ccmapp_aug17.war
08/10/2010  05:53 PM         1,534,414 ccmapp_aug_10_with_axl_login_calls_workin
g.war
08/09/2010  09:12 AM         1,502,429 ccmapp_aug_7_with_search_user_lcode_lname
_from_props_file.war
08/25/2010  03:07 PM         2,086,899 ccmapp_src_25AUG_0300.war
09/02/2010  10:46 AM         2,097,123 ccmapp_with_src_20100902_1045.war
08/04/2010  12:56 PM           459,095 ccmuserapp_aug4.war
08/05/2010  01:24 PM         1,493,679 ccmuserapp_aug_5_messagebundle_generic_js
p.war
07/28/2010  06:32 PM           431,972 ccmuserapp_july29_missing_jdbc_mai_activa
tion_jar.war
08/26/2010  02:37 PM         2,087,538 ccm_aug26_0237.war
08/31/2010  12:24 PM         2,052,187 ccm_aug31_1200.war
08/20/2010  08:01 PM         2,086,887 ccm_aug_20_0800PM_src_loggingtofile.war
              12 File(s)     18,860,091 bytes
               2 Dir(s)  65,679,618,048 bytes free

C:\ccmusers_project\packaged_web_archive_backups>
So I feel the necessity of ADE like SCM specially if web application goes on and on.

Followers