What Is Software Design?

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

Is Design Dead?

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

Programming is Gardening, not Engineering

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

Orthogonality and the DRY Principle

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

2015年7月14日 星期二

利用Windows Jenkins 架設 jmeter use ant

1.首先我們要先確定 jenkins 裡面環境的兩個設定

  • 第一個是   ant 我們透過他來幫助我們跑 jmeter 並且會製作出report
  • 第二個是  請確定 jdk  也就是java的位置  我們跑 ant 會使用到java


2.請在jenkins 裡面確定外掛程式



這兩個都要安裝!!!

3. 下在jmeter 確定 jmeter 底下\extras 資料夾
確定 ant-jmeter-1.1.1.jar 這個檔案存在
以及build.xml


有必要時 我們要確定我們需要test 的jmeter放在哪裡
路徑要去build.xml 裡面修改

請確定下面這行的路徑可以抓到您想要run的jmeter
<property name="testpath" value="${user.dir}\extras"/>


3.開始製作job的組態



恭喜你成功了~!!!

2015年5月22日 星期五

parse 利用parse pointer query 所有 table

1.確定table 裡面有 pointer row

2.
cloudcode
請這樣寫


 
var  _UserTable = Parse.Object.extend("UserTable");
var _PurchaseTable = Parse.Object.extend("PurchaseHistoryTable");


var innerQueryByDevice = new Parse.Query(_UserTable);

innerQueryByDevice.equalTo("DeviceUDID", request.params.user_Deviceudid);
innerQueryByDevice.include("userid");


var list = [];
var listuserid = [];


  innerQueryByDevice.find({
      success: function(results) {

        if(results.length == 0)
        {
          response.error('fail check DeviceUDID');
        }
        else
        {


         
           for(i = 0; i < results.length; i++)
           {

              list.push(results[i]);
              //list.push({"Status":results[i].get("userid").get("Status"),"Amount":results[i].get("userid").get("Amount")});
             
           }

           response.success(list);

            //list[i]= results[i].get("userid").toJSON();

         
         
        }

      },
        error: function(error) {
         response.error("Error: " + error.code + " " + error.message);
      }
  });

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");
                }
            }

        });


2015年1月27日 星期二

Android Parse call cloud code api

第一步 安裝parse 到android

第二步
import com.parse.FunctionCallback;
import com.parse.Parse;
import com.parse.ParseCloud;
import com.parse.ParseFile;
import com.parse.ParseObject;


第三步 在主程式 加入

HashMap<String, Object> params = new HashMap<String, Object>();

params.put("email", "john6812711@gmail.com");

ParseCloud.callFunctionInBackground("seandemail", params , new FunctionCallback<String>() {
      
     @Override
      public void done(String result, com.parse.ParseException arg1) {
       // TODO Auto-generated method stub
       Log.d("INT", "check buy "+result);
       }

});


1.先創一個object

2.把值裝進去

3.接api回來得值 result

4. seandemail 是api name

2015年1月11日 星期日

Laravel 串 js and html5 html file

 首先 將所有的資源檔案放入 Laravel框架下的對應位置
  • /public/css/app.css
  • /public/js/app.js
  • /public/index.html
範例 我放了 public/john/index.html

接著回到app資料夾下 找到 routes.php 這檔案

加入以下的規則

Route::get('john',function())
{
    return File::get(public_path().'john/index.html');
});



這樣導入後
只要在網址列後面接 cpc-cpcteam.rhcloud.com/john 就會出現html file的網頁了!!! 也可以正常的使用js