Don't want to pay

Did you buy some tool for development ? Yes, I bought but not too much. Most of the tools that I am using are open source or free.
Did you subscribe some service for development ? For me, only hosting. I hate subscription.

Most of the developer don’t want to pay for service. Don’t like subscription. We like changllenge. If the service is really good and expensive , we are trying to find alternative opensource. I am using sublime text 2 free version and Textastic (bought from Mac App store) and textmate 2. Yes, I am using 3 text editor and only Textastic that I bought because it’s cheap. I want to buy sublime text 2 but I feel expensive. It didn’t support Myanmar Unicode and I can’t write HTML book with sublime text 2. I can’t write Myanmar Website with sublime text 2. That is one of the reason I don’t want to buy sublime text 2. For Myanmar Unicode, I use textmate for development and Textastic for writing blog. I didn’t use Textastic for development because it lack a lot of features. Drag and drop folder to open , file explorer functions are not included. It look like nothing for development. I hope , Textastic’s developer will upgrade some feature. Now, it’s just text editor for writing blog for me. I understand , we can’t satisfy any text editor until we develop our own editor.

Parse , stackmob and other backend service for data storage are popular now. Parse is look stable and safe enough now. But other services are feel not safe enough. We afarid to change or write again after the serivce shutdown. It’s very hard to trust the new service or startup. Startup for Developer are really awesome. But most of them can’t survive. For developer focus is very hard to survive.

I bought delpoymate but it’s not really useful like what they are talking. I feel worse. It’s a one reason I don’t want to buy developer tool. If the tool results can’t get what I except, I feel worse. I just used two or three time. Developer are not same like normal user. They are fewer than normal user. They only buy or subscription if it’s really useful and can use in their daily life. I prfer opensource and setup on our own server. Setup on our own server take time and need to do server management also. But it fun. We can know the new thing. We can learn a new thing. That why we love opensource. I feel , developers have a problem with subscription. They want to buil theirself. Yes, me,too. I always want to built myself instead of buying or subscription. I always find alternative if I need to subscrption or buy. Or we subscript it when we can get back money. Example: Apple Developer account , Google Play Store , etc. Look like freemium model change our mind like we can’t pay but they can make money from other way.

I use following for my app development

  • Sketch 2 (Bought from App Store)
  • Pixelmator (Bought from App Store)
  • Textasitc (Bought from App Store)
  • Textmate 2 (http://macromates.com/download)
  • Sublimte Text 2 (Free version)
  • Delpoymate (Bought it but didn’t use)
  • Intellij Idea 12 (Community Edition)
  • Xcode (Free Download from App Store)
  • Source Tree (Free Download)
  • Firefox SQLite Manager addon (Free)

If it’s a developer focus, should be pay one time payment like Kirby . We love one time payment and no problem for hosting on our server. We want to pay if the app is really great and just one time payment. Yes, focus on developer market business is really hard to success. If your startup is focus on developer , survey first. Make a meeting with some companies that they require your service from your opinion. Your problem can solve with your product but it may not solve our developers problem.

Burma at WWDC 2013

A Golden Charm Called Burma at WWDC 2013.

Deploy Node.js website with git

If we are using node.js , you need to start and stop for running app. So, stop the node.js process. upload the files. start the node.js process again. If we do like that everything , I feel it’s waste of time. We can do automatically with git + service for our life easier.

Setup Git

First we need to setup git on server.

sudo apt-get install git
mkdir /opt/git
mkdir /opt/git/sampleNode.git
cd /opt/git/sampleNode.git
git --bare init

Now, we have created the git repo at /opt/git/sampleNode.git

After that , we need to setup the git hook.

sudo vi /opt/git/sampleNode.git/hooks/pre-receive

In the pre-receive

#!/bin/sh
echo "Stop sampleNode service"
service sampleNode stop

Later we will create the sampleNode service. Now, just put like this.

pre-receive hook when push to the server from client. We can put shell script or python script can write at pre-receive hook. For us, we just want to stop the node.js app service. So, just wrote service stop.

Next, we need to create post-receive

sudo vi /opt/git/sampleNode.git/hooks/post-receive

In the post-receive

#!/bin/sh
echo "Checkout the Files"
GIT_WORK_TREE=/var/www/domain/sampleNode.comquas.com git checkout -f
echo "start service"
service nsmag start

After receive the file , git will checkout the file to /var/www/domain/sampleNode.comquas.com. After finish checkout , service will start again.

Now, we need to update the permission

sudo chmod +x /opt/git/sampleNode.git/hooks/pre-receive
sudo chmod +x /opt/git/sampleNode.git/hooks/pre-receive

Ok, now git service is complete.

Test push data to server from client

In client,

cd  sampleNode
git init
git add .
git commit -m 'init commit'
git remote add deploy root@yourIP:/opt/git/sampleNode.git
git push deploy master

After finish pushing , check the file at /var/www/domain/sampleNode.comquas.com . If the file is there , we are almost OK. Of course, we will see error message at push to server. You also should see “Stop sampleNode service” , echo “Checkout the Files” , echo “start service” .

Create the service in linux

If you don’t have forever , you should install forever first.

npm install forever -g

Create the file under /etc/init.d . My app name is sampleNode , so I create like following

$ vi /etc/init.d/sampleNode

In sampeNode

#! /bin/sh
# /etc/init.d/nsmag
#

NAME=sampleNode
APP=/var/www/domain/sampleNode.comquas.com/app.js
forever=/usr/local/bin/forever
export PATH=$PATH:/usr/local/bin/
LOG=/var/log/sampleNode.log

case "$1" in
  start)
    echo "Starting $NAME"
    HOSTNAME=sampleNode.comquas.com PORT=3001 $forever --minUptime 5000 --spinSleepTime 2000 -a -l $LOG start $APP
    ;;
  stop)
    echo "Stopping script $NAME"
    $forever stop $APP
    ;;
  list)
    echo "List"
    $forever list
    ;;
  *)
    echo "Usage: /etc/init.d/sampleNode {start|stop|list}"
    exit 1
    ;;
esac

exit 0

I am using HOSTNAME and PORT for Node.js ENV. After adding the file , we need to update permission.

sudo chmod +x /etc/init.d/sampleNode

Ok. It almost finish and let we test.

sudo service sampleNode start

And then check your website. Everything OK , you can deploy your website from your client.

git add .
git commit -m 'Production'
git remote add deploy root@yourIP:/opt/git/sampleNode.git
git push deploy master

Setup Nginx for Node.js

First we need to create nginx site-available

sudo vi /etc/nginx/sites-available/samplenode.comquas.com

In sampleNode.comquas.com

server {
    listen   80;
    server_name samplenode.comquas.com;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
            proxy_pass http://127.0.0.1:3001/;
            proxy_redirect off;
    }
}

Now , symbolic link to site enable

sudo ln -s /etc/nginx/sites-available/samplenode.comquas.com /etc/nginx/sites-enabled/samplenode.comquas.com

After finish , reload the nginx like following

sudo service nginx reload

We have finished everything and you can test your website at http://samplenode.comquas.com (samplenode.comquas.com is example domain)

Now, we don’t need FTP for file upload to deploy. We can be done with git push and easy to deploy node.js website now.

Why I don't want to use hangout

I was using gtalk at last 6 year. I approve a lot of friends. Most are from online. I didn’t know at this time , what is privacy , why I shouldn’t add people if I don’t know them. I approve most of the people from internet forum. I have a lot of people in my gtalk list. After 2 year using gtalk , I decided to offline alwyas in my gtalk. I use SMS or email instant. Of course , I use Facebook Message instant. People in Facebook can trust at least. We can check their profile , we can check their timeline in facebook. If we don’t like him , we can unfriend easily.

In gtalk, we don’t want who is he, we don’t know where he from , we don’t know what is his job and what he is doing. If somebody know your email address , they can add you. I opened internet cafe at Yangon and I saw so many people using gtalk and fake their life. Some people didn’t tell about their true story. Most are the fake. It is one of the reason , I don’t like gtalk. I can remove him/her in my gtalk list but they can still chat with me until I block.

If you don’t know them , you may add them and ask or something send email. After that , so many people in my gtalk list and it will annoy to me. I can block , but only way is one by one. I can’t remove my name in their list. The only way is block. So, I decided don’t use gtalk any more. It can’t trust. You can tell me create new account. But we can’t because it’s email. Changing email is not easy. I am using gmail over 6 year and it can’t be change easily.

After google plus release , google force my gmail to their profile. It still OK because I didn’t use google plus. In google i/o 2013 , google introude a new hang out again. They upgrade the google plus also. Design is impressive. So, I tried to use google plus again. I want to tried new hang out again.

I registerd with my phone number in google hang out. After that annoying thing start again. Google put all the gtalk user to google hang out. It mean , I can’t make offline or disable gtalk chat like before. My previous gtalk users can hangout or chat with me. I can’t run aways at this time. Yes, google have setting in https://www.google.com/settings/plus Who can Hangout with you . They have a function about send request. However, all the gtalk user are automatically approved. I can’t remove. Only way is block one by one. Old Story again.

I hope, google will support some function like un hangout function. After I un hangout , they need to send request again. I don’t know , why google put all gtalk user in hangout and without asking my premission. Is there any way to remove all the user in hang out list ?

Thank google at least I can sign out in hangout chat and only using google plus.

Burmese Food at Google I/O 2013

Google unveiled updates to Google Maps at the I/O conference.

IAPHelper

I didn’t update https://github.com/saturngod/IAPHelper around 10 months. Tody I have updated and it include check receipt with apple server.

Code Example

if(![IAPShare sharedHelper].iap) {
    NSSet* dataSet = [[NSSet alloc] initWithObjects:@"com.comquas.iap.test", nil];

    [IAPShare sharedHelper].iap = [[IAPHelper alloc] initWithProductIdentifiers:dataSet];
}

[IAPShare sharedHelper].iap.production = NO;

[[IAPShare sharedHelper].iap requestProductsWithCompletion:^(SKProductsRequest* request,SKProductsResponse* response)
 {
     if(response > 0 ) {
     SKProduct* product =[[IAPShare sharedHelper].iap.products objectAtIndex:0];

     [[IAPShare sharedHelper].iap buyProduct:product
                                onCompletion:^(SKPaymentTransaction* trans){

            if(trans.error)
            {
                NSLog(@"Fail %@",[trans.error localizedDescription]);
            }
            else if(trans.transactionState == SKPaymentTransactionStatePurchased) {

                [[IAPShare sharedHelper].iap checkReceipt:trans.transactionReceipt AndSharedSecret:@"your sharesecret" onCompletion:^(NSString *response, NSError *error) {

                    //Convert JSON String to NSDictionary
                    NSDictionary* rec = [IAPShare toJSON:response];

                    if([rec[@"status"] integerValue]==0)
                    {
                        [[IAPShare sharedHelper].iap provideContent:productIdentifier];
                        NSLog(@"SUCCESS %@",response);
                        NSLog(@"Pruchases %@",[IAPShare sharedHelper].iap.purchasedProducts);
                    }
                    else {
                        NSLog(@"Fail");
                    }
                }];
            }
            else if(trans.transactionState == SKPaymentTransactionStateFailed) {
                 NSLog(@"Fail");
            }
                                }];//end of buy product
     }
 }];

Sketch 2 50% off

Now, you can buy sketch 2 with US $24.99 (50% off). SG $ 31.98. It’s worth.

sketch2

Sketch is a designers’ dream toolbox. Specifically created for designers, it powers a beautiful interface and powerful tools. Tools every designer will appreciate. Here’s one feature — multiple shadows per layer. Making beautiful graphics isn’t challenging anymore. We set out to build a better app for graphic designers. Not to copy — rather to improve.

Windmill

Draw with Sketch 2

image

Part Time Freelance ?

Some people were asking me to do part time freelance, I said “Sorry, I can’t”. I always same answer about that. Why? Part time freelance can make extra money and why I don’t want to do it?

I had a experience about Part Time freelance. Working full time and part time freelance is not easy. We are working 9 AM to 6 PM and then working again 9 PM to 1 AM. It is using a lot of energy. At this time , I was not marriage and I can handle. However, I don’t have family time and mostly I didn’t talk with my family because I was busy. Indeed, it can make more income.

After marriage, I thought , I shouldn’t do part time free lance like this. I need to give a time to my wife and family. So, I decided don’t work on freelance. But I need to stop current part time freelance projects.

Stop as soon as possible

Discuss with the clients and told them can’t work for new project and I would finish as soon as possible or will finish at dead line. Stop adding extra feature or new feature from client request. If the projects are very big and can’t finish or you don’t want to do anymore, try to handover the projects to other freelance developer. Made a good documentation or write a good comment in code for new developer. If still in contract, just focus on it and finish as soon as possible.

After no freelance

You can feel free and you can spend time a lot with family. You can sleep well. After sleep well at night, you can more work done at current full time job. For me, I always want to contribute to the full time job. Spending time with family is really pleasure for our live. It reduces stress a lot. When arrive home, no need to think about the work or projects. It’s a awesome feeling.

Extra money

Sometime, you feel , you don’t enough money with full time job. You want more for saving or other extra cost. For me, I am doing own projects instead of freelance. Own projects are more relax and own timetable. Much stress less than freelance projects. Of course, indie development app can’t make money like freelance projects. But it can make long time income. Example, if you did app, you can sell on apple app store or Google play store easily now. If you want to make Mac app or windows app, you can sell app on their store now. Distribution systems are not hard like before. However, you need to do marketing and you need to learn how to sell your products. You can’t do only coding. But it’s fun for me.

Now, I didn’t do any freelance projects and just focus on full time work and own time table with iOS apps and Android apps to release new. Most of the apps are free but very little income still getting from admob. Yes, also more sleep.

Header Search Paths not found Error

After upgrade to Xcode 4.6 , Header Search Paths file couldn’t find. It always show “file not found”. It was working before but not working now. I thought , it’s because of Xcode.

I am using header search path like following

$(SRCROOT)/openssl_include

I checked my fullpath and it’s showing like

/Users/saturngod/Copy/test project/openssl_include

It’s correct path but it was not working. It made me headache. I realised , the full path is including space test project. So, Header Search Paths may not point to correct folder. I changed header search path like following

"$(SRCROOT)/openssl_include"

Just put and compiling again. Yes. working now.

If our full folder path include space , we need to put in Header search path. Without it , it couldn’t find.