What Is Software Design?

程式設計不是 “building software”,而是 “designing software”。

Is Design Dead?

軟體系統的設計是演進來的,不能一步到位,而是要藉由憑繁與使用者互動得到的回饋來修改系統設計。

Programming is Gardening, not Engineering

與其把程式設計比喻成蓋房子,實際上更像是園藝。

Orthogonality and the DRY Principle

所有程式設計活動其實都是維護,因為絕大部分的時間都在改code,寫一點改一點。即使是新專案,也很快需要回頭作修改。

2015年2月18日 星期三

Parse 解 saveInBackground for android

setp1.

android的code

//做全域宣告

final ParseObject PurchaseHistoryTable = new ParseObject(
"PurchaseHistoryTable");

//設定要上傳的東西
PurchaseHistoryTable.put("PurchaseType", PurchaseType);
PurchaseHistoryTable.put("Quantity", Quantity);

....很多資料

//設定Progress

//由下面的progress可以得知是否上傳成功 以及拿到對應的udid

PurchaseHistoryTable.saveInBackground(new SaveCallback() {
            public void done(ParseException e){
                if (e == null){
                    Log.d("ParseFileTransfer", "Saved file successfully");
                    Log.d("id:"+PurchaseHistoryTable.getObjectId(), "Saved file successfully");
                }
                else{
                    Log.d("ParseFileTransfer"+e, "Could not save file");
                }
            }

        });