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

2014年10月11日 星期六

試玩React facebook 開發的js library !!!

http://facebook.github.io/react/docs/getting-started.html

是一套facebook所創造的 JS library


想要解決的問題!
solve one problem: building large applications with data that changes over time. To do this, React uses two main ideas.



Hello React 範例!!

ps:在<script type="text/jsx">的程式碼內第一行要/** @jsx React.DOM */ 才不會錯誤!!

<!DOCTYPE html>
<html>
  <head>
  <title>Hello React</title>
    <script src="react.js"></script>
    <script src="JSXTransformer.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/jsx">
    /** @jsx React.DOM */
    var HelloWorld = React.createClass({
      render: function() {
        return (
          <p>
            Hello, <input type="text" placeholder="Your name here" />!
            It is {this.props.date.toTimeString()}
          </p>
        );
      }
    });
    setInterval(function() {
      React.renderComponent(
        <HelloWorld date={new Date()} />,
        document.getElementById('example')
      );
    }, 500);
    </script>
  </body>
</html>

2014年10月7日 星期二

Sublime Text 3 Compare Tool




http://www.sublimerge.com/

安裝說明

  1. Install the Package Control (if you haven't already)
  2. Open Command Palette ([ctrl]+[shift]+[p] on Windows and Linux, [cmd]+[shift]+[p] on Mac)
  3. Choose Package Control: Install Package
  4. Search for Sublimerge Pro and hit [Enter]


使用方式

 1.[ctrl]+[shift]+[p]
2.Compare to view..