tag:blogger.com,1999:blog-13743407212226869122024-03-06T03:28:08.551+11:00iCuriosity"The cure for boredom is curiosity. There is no cure for curiosity."Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.comBlogger134125tag:blogger.com,1999:blog-1374340721222686912.post-61055064747114128292019-06-08T18:58:00.000+10:002019-06-08T18:58:18.583+10:00HUD Desktop Stopwatch 0.2.0 (for Mac OS)<div>
Our little utility is getting even better and easier to use. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-DearPFOYYJ1ZweHlGRdHAkK1EaAiivGiltNLHWoIZI2iqifW-7FgZB4N7GOpC9FBSLnNrJmS0Kl8iN55LDdZxJnu9mnbb-7TYIU0gf3b7IZI5UIo9MZ5h8PJvXoSM1gygxYgaDj07kQ/s1600/Stopwatch-0.2.0.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="281" data-original-width="500" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-DearPFOYYJ1ZweHlGRdHAkK1EaAiivGiltNLHWoIZI2iqifW-7FgZB4N7GOpC9FBSLnNrJmS0Kl8iN55LDdZxJnu9mnbb-7TYIU0gf3b7IZI5UIo9MZ5h8PJvXoSM1gygxYgaDj07kQ/s1600/Stopwatch-0.2.0.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<br /></div>
<div>
<div>
Changes in this release:</div>
</div>
<div>
<ul>
<li>Add Start/Stop and Reset buttons on HUD screen</li>
<li>HUD screen includes progress indicator</li>
<li>Improve to visual UI elements</li>
<li>Added About screen to indicate that this is a free software</li>
<li>Bugs fixed</li>
</ul>
</div>
<div>
<br /></div>
<div>
Available here: <a href="https://primecoder.github.io/desktop-stopwatch/" rel="nofollow" target="_blank">HUD Desktop Stopwatch for Mac</a></div>
<div>
<br /></div>
<div>
<br /></div>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-2480370722756394392019-06-03T17:46:00.000+10:002019-06-03T17:46:09.112+10:00Desktop Stopwatch - a.k.a Pomodoro Timer<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/1rXE8M1DznA/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/1rXE8M1DznA?feature=player_embedded" style="clear: right; float: right;" width="320"></iframe></div>
<i>"Imagine there is a bank which credits your account each morning with $86,400, carries over no balance from day to day, allows you to keep no cash balance, and every evening cancels whatever part of the amount you had failed to use during the day.",</i><br />
<i><br /></i>
<i>"What would you do?"</i><br />
<i><br /></i>
<i>"Draw out every cent, of course! </i><br />
<i><br /></i>
<i>Well, everyone has such a bank. It's name is time. </i><br />
<i>Every morning, it credits you with 86,400 seconds. </i><br />
<i>Every night it writes off, as lost, whatever of this you have failed to invest to good purpose. </i><br />
<i>It carries over no balance. It allows no overdraft.</i><br />
<i>Each day it opens a new account for you. </i><br />
<i>Each night it burns the records of the day. </i><br />
<i>If you fail to use the day's deposits, the loss is yours. </i><br />
<i>There is no going back. There is no drawing against the tomorrow. </i><br />
<i>You must live in the present on today's deposits. </i><br />
<i>Invest it so as to get from it the utmost in health, happiness and success! </i><br />
<i>The clock is running. Make the most of today."
</i><br />
<a name='more'></a><br />
<pre class="markdown">-- Anonymous [Value of Time]
</pre>
<pre class="markdown">Hello everyone! Just would like everyone to know that I have implemented a small stopwatch utility for Mac OS. It is for a general purposes timing stopwatch, but ideally also suitable if you'd like to use it as `Pomodora` timer - same concepts - Don't bog down doing one single task for too long; break it down to smaller chungs; take a break between tasks.
It is available for free here: [Desktop Stopwatch]
Cheers
Tick. Tick. Tick. Tick.
<!-- Resources -->
[Value of Time]: https://www.shurupov.ru/time/
[Pomodora]: https://en.m.wikipedia.org/wiki/Pomodoro_Technique
[Desktop Stopwatch]: https://primecoder.github.io/desktop-stopwatch/
</pre>
<!-- Markdown end -->Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-90439144290833029192019-05-17T20:44:00.000+10:002019-05-17T21:47:55.758+10:00Package Management: CocoaPods & Xcode<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<img border="0" data-original-height="105" data-original-width="350" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRNQKS5Jjq7YDscvx2RPrMPdx9cdV7GOucF2bW1S7gHHMLpZmJ3-RR60rB78LTYhe2rVp2T6NMglEHc-2sQOf2k09MsVkUm1iB_AhE9Q3vBD21EiZmFpN6G8u4tDS09jcuh0F7wD6Zgbg/s200/cocoapods-logo-small.png" width="200" />
<img border="0" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5GkO0FcqU1ZEf-uoPw4Eo9A6XvJWyMqAAdlN94xdLs2JwI5XMxz5ZvihA-h64QgPiRJhToxYQXpN4L_N20tMubRSX2IU_bS5Y8QGvAlrtSeTJrkKY1LpcyAnoUs7pPC6ogq3IigD2GjI/s1600/xcode-logo.png" />
<br /><br />
In my previous post, <a href="http://www.icuriosity.com/2019/04/package-management-carthage-xcode.html" target="_blank">Package Management: Carthage & Xcode</a>, I looked at how to setup and use Carthage with the Xcode. In this post, I will be doing the same thing, but, with using CocoaPods instead.<br />
<br />
<br />
<br />
<a name='more'></a><pre class="markdown"><!-- Markdown begin -->
So, for a fair comparison, I used the same components as in my previous post:
- [Quick/Quick on Github]
- [Quick/Nimble on Github]
I decided to continue using my previous Xcode's workspace - [Package Management Study]. After all, the whole idea is to group all my experiments, findings, and etc, all in one place - an Xcode's workspace. Head to where I keep my project and open the workspace.
```
$ tree -FL 1
.
├── BDD-Carthage/
└── PMS-BDD.xcworkspace/
$ open PMS-BDD.xcworkspace/
```
Stay true to my KISS philosophy, I added the simplest iOS single view project to my workspace - BDD-Cocoapods project. If you know me, I am OCD with red-green-refactor approach, I hit CMD+R to make sure the new project build and run correctly.
Quick checking [Using CocoaPods] page, all I needed was to add a Podfile to my project. If you have not installed Cocopods, you can see my previous post [here][Setup PMS]. I used `pod init` to quickly create Podfile for me.
```
$ cd [DIR WITH XCODE PROJECT]
$ pod init
```
`pod init` reads you Xcode's .xcodeproj file and creates initial Podfile for you. I dragged & dropped the newly created Podfile into the top-level of my project file and added Quick & Nimble pods to it. I added the Podfile to Xcode project for convenient of editing it with Xcode, so make sure don't select `Add to targets` when adding as this file is not to be built or included into the binary of your project, see image below.
</pre>
![Adding Podfile](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK6q9abdLUNzZ-l6A75vPTiPizBmcUqp-731CessXGIyyXLFL7Hb7_1myJ9_WF-lnFOijb9ZmDIKuxIarTJl7JJb1h96cOPIM4BDRCaH0kb_x1P5Vw9kf1cPdWwxT6PYc5aSDS9QzzZC8/s320/add-dragdrop-podfile.png)
<pre class="markdown">Here is my initial Podfile and the structure of my workspace.
```
platform :ios, '12.2'
target 'BDD-Cocoapods' do
use_frameworks!
pod 'Quick'
pod 'Nimble'
end
```
![Xcode Project Structure](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR68KUnk0FiARCYmh_zS7ul0TLLxX16c_53WOm-hHgoVN5WJzeomTtihFq6AKsBooHh1QJM7p0BfD3O8NtWUsuMknbYFghqpoAUCmOG3iTpPPRLz5p63EsG74YY29NonLgEeb-Cg5D1CE/s1600/xcode-proj-structure.png)</pre>
<pre class="markdown">From the image above, circled in red is the new Xcode project - BDD-Cocoapods - residing in the same Xcode's workspace as my previous project BDD-Carthage.
Next step is to let CocoaPods does it's magic - analyses Podfile, works out the dependencies for all the 'pods' or frameworks specified, downloads, and builds all the pods.
```
$ pod install
```
Here is the output from Terminal:
```
Analyzing dependencies
Downloading dependencies
Installing Nimble (8.0.1)
Installing Quick (2.1.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `BDD-Cocoapods.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
```
Take a look at the directories and files that CocoaPods generates.
![Directory Structure with Pods](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNitmzy8QwvPKJIDlHEuyg5c8tGPYcHc7JD84_GibZUYwfbHnlEUgbsYdk0jp8eeBcS7MEkppDM6IyIGYys0yK5EcjJ63H9wyvrkPhKinvR8exbmbuCTQQMpgI8e3OjBTcnZutIjZO2xE/s1600/dir-struct-with-pods.png)</pre>
<pre class="markdown">
Impressive! CocoaPods does everything for me. But wait! Checking the above warning! It said that it created a new workspace for me! And that I should start using this workspace instead of the old .xcodeproj file! This is not going to work for me as I already have a workspace and all projects setup. I wanted to continue using my own setup. So, I headed back to [Using CocoaPods] page. My Podfile needs modification as shown here:
```
platform :ios, '12.2'
workspace '../PMS-BDD'
target 'BDD-Cocoapods' do
use_frameworks!
pod 'Quick'
pod 'Nimble'
end
```
Note the line:
```
workspace '../PMS-BDD'
```
Since, I like to keep it "everything-CocoaPods" contained within this project, I chose to keep Podfile at where it was and use relative path to refer to the workspace, hence `../PMS-BDD`.
I removed all the directories and files created by CocoaPods and rerun `pod install` again. This time - no complain.
```
Analyzing dependencies
Downloading dependencies
Installing Nimble (8.0.1)
Installing Quick (2.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
```
Checking the directory structure was all good - everything is at where it supposes to be - self-contained within `BDD-Cocoapods` project.
Built was successful. However, when I tried to run the project on the simulator, I got this error message:
```
dyld: Library not loaded: @rpath/XCTest.framework/XCTest
Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftXCTest.dylib
Reason: image not found
```
I was such a dummy, Quick & Nimble have dependencies on XCTest framework, but from the Podfile, I linked them to non Test target. This is easily fixed.
I created a new Test target called `BDD-Cocoapods-QuickNimbleTests`, added a new Test class `BDD_Cocoapods_QuickNimbleTests` with the following contents (pinched from the BDD_Carthage project):
```
import Quick
import Nimble
class BDD_Cocoapods_QuickNimbleTests: QuickSpec {
func isWorking() -> Bool {
return true
}
override func spec() {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
context("When project has just been build") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
describe("Quick and Nimble") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
describe("Quick and Nimble") {
context("When project has just been build") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
}
}
}
```
The Podfile needs to be modified Podfile as follow:
```
platform :ios, '12.2'
workspace '../PMS-BDD'
target 'BDD-Cocoapods-QuickNimbleTests' do
use_frameworks!
pod 'Quick'
pod 'Nimble'
end
```
Rerun `pod install` and re-open the workspace again. All targets should build and run correctly. All test cases should pass now.
Let's take a look at our workspace.
![Xcode Workspace After Adding Pods](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcpoXxmG1mTZl-4CJUxf8hv4U36t52-gITSN4d-w9HRlX1uCoYwmx_XfxlJ67KzbniFwTc1aotXHR5prWocIbwHpkdFuF3v-bEJ70c38eEyEaD7-uCH3tdDSEeD1GnIxn2mpprswA72NE/s1600/xcode-proj-after-pods.png)
(1) This is our Podfile. It is contained purposefully within our BDD-Cocoapods project
(2) This is our Test target which contains codes to test our Quick & Nimble frameworks
(3) BDD-Cocoapods project is displayed side-by-side as a comparison against BDD-Carthage project. They appear pretty much similar, except this (3) `Pods` folder which contains Xcode's configurations for building pods for each environment, i.e. Debug, or Release.
(4) BDD-Carthage project is listed here for reference and comparison purposes
(5) This is `Pods` project, added to our workspace by the Cocoapods when you run `pod install` command
(6) This is the Podfile used to created this project. It is the same as (1)
(7) This section lists all the frameworks used to build this project
(8) These are all the pods as you specified in `Podfile`
Pretty neat, eh? I like the structure of the project so far. Very straight forward.
Some other areas worth checking are Xcode's project settings of the target(s) that uses the pods.
![Xcode Project Settings](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfrXnJn2vJch4zdzlPofhjxHFNDPO4jW02RR3kH24JiNPw8ruWzX_AxDUZF3avPtv76jXsELU69mqG6Hp4g-uuMBwuFXflk-e1ui649hbaiajkDal5Bnnkp-CkiXxY4gN3Q3kEdFkdG3E/s1600/xcode-proj-settings.png)
CocoaPods was nice enough to show which part of the settings have been added or modified - they are padded with `[CP]` prefixes. These are the areas where all the `magics` happen. You can expand each section and learn from all the scripts there - I will leave it there as your own personal challenges.
## Thoughts - Beauty is in the eyes of be(er)-holder
I have been using Carthage extensively for my previous client for almost 2 years and have been very comfortable using it. Time and again, I would hear people compared Carthage Vs CocoaPods. Those that favoured Carthage would say that CocoaPods are the blackboxes and that they do not feel comfortable trusting it. This may be true at first, for me. However, after using CocoaPods for a while I have grown accustomed to the convenience and ease of use provided by the Pods. Below are my thoughts on using CocoaPods:
- Integrity is more important. With CocoaPods, you get to work with workspaces instead of projects. The pods you use are obvious and visibly included right there, together with your project. When someone, i.e. a new team member, opens your workspace, s/he can see, right away, that your project use external frameworks and how they are organised within the Pods project.
- The `magic` scripts, which run behind the scene, are the work of opensource community. They are transparent and subjected to being scrutinised by the community. The chance of containing malicious or errors is minimised.
- Each external framework's source code is also there - included for your inspection, modification and building as part an integral parts of your workspace's targets.
- The chance of including incorrect framework or incorrect version or incorrect build to the final product is also minimised as any modification that you've done to these frameworks are included and built together with your project.
This is rather a very long post. However, I do hope you enjoy the experience I shared above. Please feel free to leave comments, suggestions, or questions you may have.
Until next post, stay well and see you later.
Peace.
[References]: ()
[Package Management Study]: (https://github.com/primecoder/Package-Management-Study)
[Package Management: Carthage & Xcode]: (http://www.icuriosity.com/2019/04/package-management-carthage-xcode.html)
[Quick/Quick on Github]: (https://github.com/Quick/Quick)
[Quick/Nimble on Github]: (https://github.com/Quick/Nimble)
[Using CocoaPods]: (https://guides.cocoapods.org/using/using-cocoapods.html)
[Setup PMS]: (http://www.icuriosity.com/2019/04/package-management-carthage-vs.html)
</pre>
<!-- Markdown end -->Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-51622504101024973902019-04-29T23:34:00.000+10:002019-04-30T09:25:34.640+10:00Swift Programming: Escaping Closure - The One That Got Away<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvnO2E_xwSBnwhPGG9K5Wp2xZGJLrPTG8WpoK10KekhM7a5exwwPV5HeHOPpUqIrafW_AgZJWeffpPnFSB_q-q8o7_kVHzdiZjOmmky66N_1ddv0SSZOJvvNefFliRpQ8rXI6izbrbKNI/s1600/Swift_logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="106" data-original-width="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvnO2E_xwSBnwhPGG9K5Wp2xZGJLrPTG8WpoK10KekhM7a5exwwPV5HeHOPpUqIrafW_AgZJWeffpPnFSB_q-q8o7_kVHzdiZjOmmky66N_1ddv0SSZOJvvNefFliRpQ8rXI6izbrbKNI/s1600/Swift_logo.png" /></a>Sometimes, when looking at Swift source codes I would see something like this:
<br />
<br />
<pre class="brush: java">public func observe(_ action: @escaping Signal<Value, Error>.Observer.Action)
-> Disposable?
{...}
</pre>
<br />
Gasp! WTF is that?! Swift 5 code is already very hard - as is. Now this! This '<span style="color: blue;">@escaping</span>'! Escaping what? Escaping who?! Escaping where?! Escaping when? 🥴 This was when I plopped my head back, looked at the ceiling and started thinking about that little cafe business I've always wanted to open down the leafy suburban street ...<br />
<br />
Recomposing myself. It's time to look at this closely.<br />
<br />
<a name='more'></a><br />
<br />
Swift's document states that '@escaping' keyword marks an input argument to be Escaping Closure.<br />
<br />
"Oh, sure. Yes! yes! Ok. That's very clear. Hmm, yes. Escaping Closure. Cool. Hmm. Very cool",<br />
<br />
Never mind, let's look a bit more. From <a href="https://docs.swift.org/swift-book/LanguageGuide/Closures.html" rel="nofollow" target="_blank">Swift's Programming Language: Escaping Closures</a>, it says:<br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "helvetica neue" , "helvetica" , "arial" , "verdana" , sans-serif; font-size: 18px;">"A closure is said to </span><em style="box-sizing: border-box; caret-color: rgb(51, 51, 51); color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif; font-size: 18px;">escape</em><span style="background-color: white; color: #333333; font-family: , "blinkmacsystemfont" , "helvetica neue" , "helvetica" , "arial" , "verdana" , sans-serif; font-size: 18px;"> a function when the closure is passed as an argument to the function, but is called after the function returns..."</span></blockquote>
So there you are! I knew I am very smart. So, there are possibilities that a closure is called after the enclosing function is long gone - it's about the differences of the lifespan between the 2 entities:<br />
<br />
<ol>
<li>the caller function (or the parent or the container block); and </li>
<li>the function/block/closure that is being called.</li>
</ol>
<br />
I can think of 2 scenarios when this happens:<br />
<br />
<ol>
<li>In asynchronous operation, as a handler that will be called at a different time</li>
<li>As a closure that is stored somewhere and will be called sometime later - after the parent function has exited</li>
</ol>
<div>
<br /></div>
<h3>
Escaping Closure as Handler in Asynchronous Operations</h3>
<div>
We see a lot of these calls in multi-thread or concurrent operations. In this scenario, a function dispatches a long-running operation to be executed on a different thread or a different queue. The function, then, returns control of operation straight away - without waiting for the operation to be completed.</div>
<div>
<br /></div>
<pre class="brush: java">func longRunningOp(_ opName: String, delaySecond: Int) {
print("\(opName): enter")
let dispatchQueue = DispatchQueue(label: opName)
dispatchQueue.async {
print("\(dispatchQueue.label): start long running process...")
usleep(1000000 * UInt32(delaySecond))
print("\(dispatchQueue.label): completed long running process")
}
print("\(opName): exit")
}
longRunningOp("a", delaySecond: 10)
longRunningOp("b", delaySecond: 3)
</pre>
<br />
Run the above code in Playground. You should see output as below
<br />
<br />
<pre class="brush: java">a: enter
a: exit
a: start long running process...
b: enter
b: start long running process...
b: exit
b: completed long running process
a: completed long running process
</pre>
<br />
Now, let's say, instead of the 'print' statements, we want to use closures/functions to do this task for us. We can modify our code as:
<br />
<br />
<br />
<pre class="brush: java">func announceMsg(_ msg: String) {print(msg)}
func longRunningOp(_ opName: String,
delaySecond: Int,
announcer: (String) -> (),
escapingAnnouncer: @escaping (String) -> ()) {
announcer("\(opName): enter")
let dispatchQueue = DispatchQueue(label: opName)
dispatchQueue.async {
escapingAnnouncer("\(dispatchQueue.label): start long running process...")
usleep(1000000 * UInt32(delaySecond))
escapingAnnouncer("\(dispatchQueue.label): completed long running process")
}
announcer("\(opName): exit")
}
</pre>
<br />
For demonstration purposes, I chose to pass 2 argument-handler functions:
<br />
<div>
<br />
<ol>
<li>A handler (or a function) 'announcer' to be called inside the function as per normal uses</li>
<li>A handler/function 'escapingAnnouncer' to be called in the dispatched queue</li>
</ol>
<br />
<br />
<pre class="brush: java">longRunningOp("A2",
delaySecond: 10,
announcer: announceMsg(_:),
escapingAnnouncer: announceMsg(_:))
</pre>
<br />
As you can see, I passed in exactly the same function block 'announceMsg(_:)' for both cases, the @escaping keyword instructs the compiler to preserver the states appropriately for each usage. Let's try one more example.
<br />
<br />
<pre class="brush: java">longRunningOp("B2",
delaySecond: 3,
announcer: {(msg) in print("(closure) \(msg)")}
) {(msg) in print("(escaping closure) \(msg)")}
</pre>
<br />
This time we passed in a closure (nameless function) for 'announcer' and another closure for 'escapingAnnouncer'. Note, the last argument is passed in as a trailing closure where you don't need to specify the name of the last argument to the function.
Let's see how it runs.
<br />
<br />
<pre class="brush: java">A2: enter
A2: start long running process...
A2: exit
(closure) B2: enter
(escaping closure) B2: start long running process...
(closure) B2: exit
(escaping closure) B2: completed long running process
A2: completed long running process
</pre>
As you can see, the calls to function 'longRunningOp(...)' enters and exits almost immediately. Whereas the asynchronous handler functions are called at a much later stage. In this case, they were called after the parent function has long gone.
Notice the Xcode is smart enough to identify an argument as needs to be Escaping and will complain with compile error-message if you omitted the '@escaping' keyword.
<br />
<br /></div>
<h3>
Escaping Closure as Stored Operation to be Called Later</h3>
Another scenario where an closure can be called - after the parent function has exited - is when the closure is stored within some variable that is accessible outside the scope of the function - for example, a closure can be stored inside an array defined at the global scope.<br />
<br />
<pre class="brush: java">var funArray: [(String) -> ()] = []
func announceMsg(_ msg: String) { print(msg) }
func addMoreFun(_ someFun: @escaping (String) -> ()) {
funArray.append(someFun)
}
addMoreFun(announceMsg(_:))
addMoreFun {(msg) in print("So much \(msg)")}
</pre>
<br />
And some where, much later, these stored code blocks or functions can be executed. For example:
<br />
<br />
<pre class="brush: java">for fun in funArray {
fun("Fun")
}
</pre>
Run the above code in Playground, you should see:
<br />
<br />
<pre class="brush: java">Fun
So much Fun
</pre>
You see, the stored closures are executed at a much later time - after the function itself has long gone. Again, Xcode is smart enough to notice this and will complain with compile error if you omitted the '@escaping' keyword.
<br />
<br />
<h3>
Final Words</h3>
<div>
I think Swift handle Escaping Closure elegantly. The language, the choice for keyword is appropriate and makes your codes clear, concise, and beautiful. Come to think of it, Escaping Closure wasn't that hard to understand. Just that '@escaping' keyword that threw me off in the wrong direction. It would have been easier to understand if they changed the keyword to, for example:</div>
<div>
<ul>
<li>@closure_that_will_be_use_later</li>
<li>@closure_that_will_be_use_after_the_parent_function_is_long_gone</li>
<li>@closure_that_outlast_enclosing_function</li>
<li>@see_you_later_closure</li>
<li>@sleeping_handler</li>
<li>@zombie_handler</li>
<li>...</li>
</ul>
<div>
Or maybe just leave it as '@escaping'. Yes?</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-9902623292710239312019-04-28T21:44:00.000+10:002019-04-28T21:51:05.527+10:00Package Management: Carthage & Xcode<div class="" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOcy_arX4D5nV2_aUteQynHnSmuatMsKJ-SvaRUaqB0dcNDaPkeEmO1z0ym55WmHRii9PXcvQf-kzg7-g-NcRczgnO05mcTG_9VxaDkn9K9DZS-K20jx_WdIu2Fbx8bJ2FRFgAXe1OOk/s1600/carthage-logo-small.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="100" data-original-width="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOcy_arX4D5nV2_aUteQynHnSmuatMsKJ-SvaRUaqB0dcNDaPkeEmO1z0ym55WmHRii9PXcvQf-kzg7-g-NcRczgnO05mcTG_9VxaDkn9K9DZS-K20jx_WdIu2Fbx8bJ2FRFgAXe1OOk/s1600/carthage-logo-small.png" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpsq76r-_BtQI54qSopjcYfEjfcs-dxnsEk7ZMP_jl5BgJpvna-rJBK2vfz6WdDdK7ygcM1u8ycnOqspOuZ_wGYVSPkp2DkkC9Y5pyDx-vEuaUDFWvDsQag48u6KP2QlShOs0n1jY_5us/s1600/xcode-logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="131" data-original-width="144" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpsq76r-_BtQI54qSopjcYfEjfcs-dxnsEk7ZMP_jl5BgJpvna-rJBK2vfz6WdDdK7ygcM1u8ycnOqspOuZ_wGYVSPkp2DkkC9Y5pyDx-vEuaUDFWvDsQag48u6KP2QlShOs0n1jY_5us/s200/xcode-logo.png" width="100" /></a></div>
Carthage (and Cocoapods) are package management software. You are getting involved with them when you stop re-inventing the wheels and start to reuse software components. Software Reusability is a powerful concept in software development, but that's for another post. Today we will be looking at using Carthage to manage software dependency and see how it is working with our Xcode.
<br />
<br />
<a name='more'></a><pre class="markdown"><!-- Markdown begin -->
First, let's pick what components are to be reused - for demonstrating purposes. I've always started a new project with the core functionality of the app. Test Driven Development (TDD) usually works when you already have a clear functional implementation to test. But, we are not at that stage yet. Normally with a new project, you are starting with ideas of what your app is going to do - how it should behave. This is leading down the Behaviour Driven Development (BDD). My projects always start with listing out the required behaviours. Quick and Nimble are very famous for doing this. Perfect! Let's head down to their Github pages.
* [Quick Github Page][QuickGithub]
* [Nimble Github Page][NimbleGithub]
## The Players & The Genre
The players:
* Macbook 2016 with 8GB
* Mac OS Mojave 10.14.4
* Xcode 10.2.1
* Carthage 0.33.0
The Genre:
* Red-Green-Refactor Play
The style of this post will follow Test/Behaviour Driven Development (TDD/BDD) approaches known as **Red-Green-Refactor** approach - that is:
1. Code (or Refactor) a little
2. Test a little
3. Fix a little
4. Repeat again
## Initial Xcode Workspace
In this series, we will be creating and working on several Xcode projects. It's a good idea to group them all in a single workspace. Let's create a workspace for our experiments.
![][XcodeCreateWS]
I created an empty workspace called 'PMS-BDD'. Xcode creates a content package `PMS-BDD.xcworkspace` as below:
```
$ tree
.
└── PMS-BDD.xcworkspace
```
Next, let's add an empty Xcode project. I created a project called `BDD-Carthage`
![][XcodeNewPrj1]
* Use 'BDD-Carthage' for Product Name
* Use 'Swift' for Language
* Uncheck Use Core Data, Include Unit Tests, and Include UI Tests. We will add them later manually
* Specify other details as suitable for your team and organisation settings
* Click Next
![][XcodeNewPrj2]
* Make sure to add this new project to PMS-BDD, as shown above
* Click Create
Notice Xcode creates a new project and how new files and folders are created, as shown below. Get yourself familiar with them, so when Carthage adds new folders and files, you will recognise them.
```
$ tree -L 2 -d
.
├── BDD-Carthage
│ ├── BDD-Carthage
│ └── BDD-Carthage.xcodeproj
└── PMS-BDD.xcworkspace
├── xcshareddata
└── xcuserdata
6 directories
```
It is important to make sure that your project builds and runs on your chosen simulator - so when things are broken you know when and where to start fixing it.
Next, add the standard XCTest (TDD) test target. This will be handy for you to compare the standard XCTest cases against Quick & Nimble test cases.
![][AddTestTarget1]
![][AddTestTarget2]
Your folders should look like below.
```
$ tree -L 2 -d
.
├── BDD-Carthage
│ ├── BDD-Carthage
│ ├── BDD-Carthage.xcodeproj
│ └── BDD-CarthageTests
└── PMS-BDD.xcworkspace
├── xcshareddata
└── xcuserdata
7 directories
```
Now build and test your new test cases. They all must pass successfully before we can move on.
Next, we are going to add another test target. This one we are going to modify it to use Quick & Nimble for our BDD test cases. Let's called it 'BDD-QuickNimbleTests'.
![][QNTestTarget]
![][XcodeStructureWithQN]
And folders and directories structure should look like this:
```
$ tree -L 2 -d
.
├── BDD-Carthage
│ ├── BDD-Carthage
│ ├── BDD-Carthage.xcodeproj
│ ├── BDD-CarthageTests
│ └── BDD-QuickNimbleTests
└── PMS-BDD.xcworkspace
├── xcshareddata
└── xcuserdata
8 directories
```
Again, build and run **all** test targets and test cases. They must all work.
## Test Criteria - The Required Behaviour
Ok, what are we testing here. We want to use Quick & Nimble which are 3rd-party reusable components. Let's define the behaviour that we want.
1. Quick & Nimble must be loaded correctly
So, for this behaviour:
* Quick & Nimble frameworks must be included and our project to build correctly
* Our test case must be able to import the frameworks correctly
* Our test case must be able to instantiate the test case correctly
2. Our project must be able to define the basic (**minimum**) behaviours. These are:
* it() clause
* context() clause
* describe() clause
Assume basic knowledge of BDD and Quick & Nimble this is the **minimum** Test Spec (QuickSpec) we can use.
```
import Quick
import Nimble
class BDD_QuickNimbleTests: QuickSpec {
func isWorking() -> Bool {
return true
}
override func spec() {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
}
```
Now let's build and run all the test cases again. Except, you won't even go far. You will be staring at the Xcode Editor's error message even before you hit COMMAND-U. Xcode editor should scream in red: "No such module 'Quick'".
Great! This is good. So far, we've been following the **Red-Green-Refactor** methodology - we start with what works, and little-by-little we make changes, until it breaks. Then we fix it.
## Integrating Quick & Nimble Using Carthage
### Downloading and Building Quick & Nimbles Frameworks
Our project doesn't build because it doesn't know Quick & Nimble. In normal cases, we would acquire the binary files and manually add them to our project, build, and link them. This is tedious and error prone. Imagine that we would have to do this every time our components were upgraded and released with a new version. That's why we use a package/dependency management software like the Carthage. We will let Carthage do that for us.
With Carthage, this is done by telling it all the components we want to use. We do this in a 'Cartfile' or 'Cartfile.private'. Create a text file called `Cartfile.private` and put it in the same location where our .xcodeproj resides.
```
#Cartfile
github "Quick/Quick"
github "Quick/Nimble"
```
Let's tell Carthage to build these components for us.
```
$ carthage update
*** Fetching Nimble
*** Fetching Quick
*** Checking out Quick at "v2.1.0"
*** Checking out Nimble at "v8.0.1"
*** xcodebuild output can be found in /var/folders/bq/184p_g29061_h33j3ky654wm0000gn/T/carthage-xcodebuild.5ChHIX.log
*** Building scheme "Nimble-macOS" in Nimble.xcodeproj
*** Building scheme "Nimble-iOS" in Nimble.xcodeproj
*** Building scheme "Nimble-tvOS" in Nimble.xcodeproj
*** Building scheme "Quick-macOS" in Quick.xcworkspace
*** Building scheme "Quick-tvOS" in Quick.xcworkspace
*** Building scheme "Quick-iOS" in Quick.xcworkspace
$
```
Carthage checks, resolves all dependencies, downloads source files, and builds them for us.
```
tree -L 3
.
├── BDD-Carthage
├── BDD-Carthage.xcodeproj
├── BDD-CarthageTests
├── BDD-QuickNimbleTests
├── Cartfile.private
├── Cartfile.resolved
└── Carthage
├── Build
│ ├── Mac
│ ├── iOS
│ └── tvOS
└── Checkouts
├── Nimble
└── Quick
```
You will see, Carthage create these new items:
* Cartfile.resolved
Carthage lists all the components and their versions here. It's a quick place to check the versions of your components here. Also, it's a good idea to commit this file in your source repository, this information will be handy for your team members to know. Let's peek a look:
```
github "Quick/Nimble" "v8.0.1"
github "Quick/Quick" "v2.1.0"
```
* 'Carthage' folder
This is where Carthage puts all download files and built artefacts
* 'Carthage/Checkouts'
This is where all the checkout source codes are
* 'Carthage/Build'
These is where all the built artefacts are kept. Notice subfolder 'Mac', 'iOS', and 'tvOS'. Since we did not specify which platform to use, Carthage assumes **all**. Usually, my project uses only one specific platform, you can tell Carthage to build for only the platform to use, i.e. 'iOS'. This will reduce download and build time significantly.
```
$ carthage update --platform iOS
```
Switch back to Xcode, you will be still staring at the error message "No such module 'Quick'". This is because, we haven't introduce Quick & Nimble to Xcode yet.
### Introduce Quick & Nimble to Xcode
"Xcode, this is Quick and Nimble",
"Quick and Nimble, this is Xcode"
Done. It should be that simple. No?!. Unfortunately, this relationship requires a much more delicate manner and style.
Checking [Quick's Installation Guide](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md), we need to add the two frameworks to our **Test Target**.
![][AddQNFrameworks]
![][AddQNFrameworks2]
Remember the folder/directory structure that we looked at? Navigate to the folders where the build artefacts reside. We need to add these frameworks to our 'Link Binary With Libraries' section.
![][AddQNFrameworks3]
Add also add a new Copy File Phase. The 'Build Phases' of your project settings should look like this.
![][XcodeBuildPhases]
Click COMMAND + U to test your project and Ta Da! all test cases should all be successful. Now we are back in the green zone.
Let's refactor our test class to cover the second required behaviour - be able to define behaviours for testing.
```
import Quick
import Nimble
class BDD_QuickAndNimbleTests: QuickSpec {
func isWorking() -> Bool {
return true
}
override func spec() {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
context("When project has just been build") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
describe("Quick and Nimble") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
describe("Quick and Nimble") {
context("When project has just been build") {
it("is working") {
expect(self.isWorking()).to(beTrue())
}
}
}
}
}
```
Hit COMMAND+U, all your test cases should run successfully. Check Xcode's Test Navigatior, notice how all your test cases are listed in human readable form there!
![][QNTestNav]
This was so fun! At this point, we have built ourselves the most basic - **minimum** Xcode project which utilises a package management software (Carthage) and integrates with 2 external 3rd-party components: Quick & Nimble. Once we understand and get our project to work on this minimum framework, we can easily and confidently expand and refactor our project for more functionality.
In the next post, we will be looking at doing the same thing - but with the Cocoapods package management.
Please stay tuned.
Cheers!
<!-- Links -->
[BLOG-PM-Setup]: http://www.icuriosity.com/2019/04/package-management-carthage-vs.html
[QuickGithub]: https://github.com/Quick/Quick "Quick/Quick Github Page"
[NimbleGithub]: https://github.com/Quick/Nimble "Quick/Nimble Github Page"
[XcodeCreateWS]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIEV6nFEX4KLg6O00APuQRaQRjQ85LtMJFwXBWnV4qfUFsh7TfMw7VrWVpqmxvbfOT5XzVzaudGw8-a2AyiGj-q4pyS6c-1wH5bwPUu7R3Ax3CYIwD2G2C4MO7lpjDCUXkOeyGbqp_dyY/w280-h198-p/xcode-workspace.png
[XcodeNewPrj1]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkGHMq8QudBxIYNfWTNQTvyA5Sr3C3OZOUi_U5Lv0uAAMUAjoqvE5sqGjoj62PhMfrUS12z_erCgjcS7y6UFuM55Jx24ULc7v5bNoIlYV48LugQMKevqB4C9rDv4lLyo6hYgdAcdnfnpw/h240/BDD-Carthage-new-prj-1.png
[XcodeNewPrj2]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3AHs_8GXPg7t_qo-9pQ7To0mYMCBSHytq3RyDO7wGdUVtFBtZULrlnPWe803as7F_Lpnsj0taPafU5l6Rh8itdv9IknmmcV55iS8o22YV2ALkNSLX8_-9LdARpuPTFB6-iHEp2JgOobk/w280-h184-p/BDD-Carthage-new-prj-2.png
[AddTestTarget1]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWOWa9RwzaWvtkqT4oVivA6DT1k0yMiTnwwjNqCuKQfoc4gCnjhB36GrOUNH5GUo0_GrjtmqmOPfAZsie-tKLYyH-KiHX2tWuT7kU1ta6Q5GOyIFG0dPiBHUO-jYy7Wc-psJszozMltx0/h240/xcode-add-testtarget.png
[AddTestTarget2]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn6ULnwG5Ba8zIN48U8B4_Mj5BU9-ke4RH55B8chM0mG7QCkawjM6a62EJzYlkXG3zb54uKBizsnQxMLIKKNEfyAlAho1EZW9poiKTzAdAH_fH8N21xWU84zi8e53nMJDdPWdzhU6PDl4/w280-h202-p/xcode-add-testtarget2.png
[QNTestTarget]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr8d1A9iw5WsnL2Kg3eLczpvXYXo3iDtERD9A3EN5DoPNAY41Diz9dd6ief_eMzW2gxq-vPHQerwiD7aZUjEJGiH8o9RFsqCJQu80pgTh3rNGnSE6aOLu98Tp8VZLWdwlxj-kj3HTaGjM/h240/add-quicknimble-testtarget.png
[XcodeStructureWithQN]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ZbAJAjLxL3oPTK0CeZcau-4NR97Z7RTGUkwKof14PJT6tEudL4wv2hlxm0iwhb6ybpRBG8VJrCnX-EYmUXdMzAb5s-k6mUP3vk9AajqOPFUxr-1-9TkQw-FDZHowN_9ZDLAH5WCXBO8/w280-h162-p/xcode-folde-structure.png
[AddQNFrameworks]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgWQ8oH_KfFHIZ3aghEZO0e3SgZlc8h7XhjMsLwep_DSEjowNzfSyrztQ2zapxX4hgRCIf0dj5IwY_lX_B7BASxXfwn0op7JHFfyVAtwqS2ah4ZA_AIBvritjU1FhAuVDx3HW8HlF-CZc/h240/add-quicknimble-frameworks.png
[AddQNFrameworks2]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUHgHSt-4qSHit0QXdn7UZ99uQjGWlpi0LRM6MWu-quR0kNGOWO3drVF_6Dsi2C8NbbeSiXJd4UjTY0c48XtrzMLYH9V6p4bmCaeoD4_pZyTSb_LmipKfYdH7xPlW3dlsgLoYDELiC5S0/h240/add-qnframeworks-2.png
[AddQNFrameworks3]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1WxkHrXDS1vQKvFZ2A6KASO49Xe1CXpXv_Wfu4Q9WYHKUZTI1Qn-wdVKhryNswXsEFwB7IoZu65YkchAtqGiJWB_eelYXsBBve0rArwXPYwZuBO4JfjSFAFaJm-Ix9O7U96EH2fTIWnU/h240/add-qnframeworks-3.png
[XcodeBuildPhases]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj451MoJQ1425r6GCec5gkrQ5VNguiawLhPsmsKjJMCJCprdIalrJqSnduaRzEjx6r30JEgMcsFlZwpXpNuNV08vwOPU6EEenzaq2Ncl4JGt-IJXcumHr44Q_xtimVaWb05KkrT5p9Ay-8/h240/prj-buildphases.png
[QNTestNav]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrsYATbvsj7DQmBcEUzPiRjC40fe_AzDkqV6DGWjuhHeBOnkYuA3mESj-c2_wppErvrMNtQwIILFFrKJQR3onQlKuho-JjGaJOAD7KtBM9yEH8gKcG0L-COgAqzc6VFjnxoIsrDOE1C2U/h240/QN-TestNavigator.png
<!-- Markdown end -->
</pre>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-36300256332140182142019-04-28T15:04:00.000+10:002019-04-28T15:04:07.542+10:00Package Management: Carthage Vs CocoaPods - Setting Up<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1fzf1Ks_ljqGWNgehHwCqHB-MIIY8vA-3p1Bas7Q7V5N2FE0MwG2JTRjHdlZnAw6QdaD2zDDM6_ikqqLLA7oqcmcGH3vJjVYOKIC2D5hXFz12HOEjbO1BDcGhcOQBaVDT-fgKuFd9bs/s1600/carthage-logo-small.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="100" data-original-width="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1fzf1Ks_ljqGWNgehHwCqHB-MIIY8vA-3p1Bas7Q7V5N2FE0MwG2JTRjHdlZnAw6QdaD2zDDM6_ikqqLLA7oqcmcGH3vJjVYOKIC2D5hXFz12HOEjbO1BDcGhcOQBaVDT-fgKuFd9bs/s1600/carthage-logo-small.png" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNApdFLMjX1ajtwTdiTGpgCOqKlzwbIisfyzqgfG8yf8gkqezKXzk_AeWJvZ5TxocBTlSmVzkWrBb5t-PZ9iGs3sxLqKM5InU3D-ddht15k-FuMKmlN5BhE3-TiYfjEM610XgALyiRfbg/s1600/cocoapods-logo-small.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="105" data-original-width="350" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNApdFLMjX1ajtwTdiTGpgCOqKlzwbIisfyzqgfG8yf8gkqezKXzk_AeWJvZ5TxocBTlSmVzkWrBb5t-PZ9iGs3sxLqKM5InU3D-ddht15k-FuMKmlN5BhE3-TiYfjEM610XgALyiRfbg/s320/cocoapods-logo-small.png" width="320" /></a></div>
<br />
<br />
<br />
CocoaPods and Carthage are two of the most prominent package-management and dependency management software. They are very popular in Swift and Objective-C communities. I have been using Carthage heavily with my last client for the past 2 years and sort of "touch-and-go" with the Cocoapods. It's time to dissect and look at them closely.<br />
<a name='more'></a><br />
<br />
<pre class="markdown"><!-- Markdown - begin -->
## Getting to Know Them
The first step - getting to know them. Here are the best places to get information about them.
### Carthage
1. [Carthage on Github]
This is the best place to start learning about Carthage.
### CocoaPods
1. [Cocoapods on Github]
CocoaPods also has Github page. This was the how they started and this was how I found and trust them.
2. [Cocoapods Website]
This is a hint of who is winning. CocoaPods is getting ahead and now has their own website.
Github Pages is a good starting point. That was how I found them and many of the **trust-able** pieces of software. I feel more comfortable with them when they bare all their source codes open for inspection. Plus, there are many sets of eyes helping with the inspection - thus the Check & Bound Due Process at work.
## Installation
All these happened on must trusty MacBook with the following spec:
* Macbook 2016 with 8GM RAM
* Mac OS Mojave 10.14.4
### Installing & Fixing Carthage
![][Carthage Logo]
Most of my Carthage work is on my mac at work. I haven't used it on my personal MacBook in a while. When I attempted to use it again, it complained that I had a version that was too old. So, now was a good time to upgraded it.
```
$ carthage version
Please update to the latest Carthage version: 0.33.0. You currently are on 0.28.0
0.28.0
$ brew upgrade carthage
```
Output:
```
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
allureofthestars cfn-lint cubelib itk leela-zero scws
boringtun cpp-gsl cypher-shell ktlint otf2
==> Updated Formulae
ammonite-repl erlang gtranslator meson restic
ansifilter erlang@20 hebcal mingw-w64 rke
apache-geode ethereum hugo minio ruby-build
.
.
.
Error: carthage not installed
```
Doh! Nothing is going to be easy, ever!
Now, I remembered, the last time I installed Carthage was with using the .pkg file that I downloaded. This way was quick but wasn't cool. The better way is:
```
$ brew install carthage
```
Toward the end of installation, I got this error!
```
...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/carthage
Target /usr/local/bin/carthage
already exists. You may want to remove it:
rm '/usr/local/bin/carthage'
To force the link and overwrite all conflicting files:
brew link --overwrite carthage
To list all files that would be deleted:
brew link --overwrite --dry-run carthage
Possible conflicting files are:
/usr/local/bin/carthage
==> Caveats
```
Ok, let's fix this. I deleted `/usr/local/bin/carthage` and re-link carthage again.
```
$ brew link carthage
Linking /usr/local/Cellar/carthage/0.33.0... 4 symlinks created
$ carthage version
0.33.0
```
Yeh!
Phew! Next is the pods.
### Installing Cocoapods
![][Cocoapods Logo]
First, Check my Pods.
```
$ pod
-bash: pod: command not found
```
Again, I could quickly install a package for Mac - but this wasn't cool. A better way, is via a command-line. Cocoapods uses RubyGem `gem`, a package management in Ruby. Let's check it.
```
$ gem --version
2.5.2.3
```
That's cool. Let's start the installation.
```
$ gem install cocoapods
Fetching: cocoapods-1.6.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
```
Oh! Cocoapods installation actually modifies files outside the log-in user's home directory. You will need root access to install it.
```
$sudo gem install cocoapods
Password:
Fetching: ruby-macho-1.4.0.gem (100%)
Successfully installed ruby-macho-1.4.0
Fetching: nap-1.1.0.gem (100%)
Successfully installed nap-1.1.0
Fetching: gh_inspector-1.1.3.gem (100%)
Successfully installed gh_inspector-1.1.3
...
Done installing documentation for ruby-macho, nap, gh_inspector, fourflusher, escape, colored2, concurrent-ruby, i18n, thread_safe, tzinfo, activesupport, atomos, CFPropertyList, claide, nanaimo, xcodeproj, molinillo, cocoapods-try, netrc, cocoapods-trunk, cocoapods-stats, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, fuzzy_match, cocoapods-core, cocoapods after 44 seconds
28 gems installed
```
That was smooth! Depends on your internet speed, It took mine about 3-4 minutes. Checking the installation.
```
$ pod --version
1.6.1
```
Yes! Yes! Now we are ready to play with them.
[Carthage on Github]: https://github.com/Carthage/Carthage "Carthage on Github"
[Cocoapods on Github]: https://github.com/CocoaPods/CocoaPods "Cocoapods on Github"
[Cocoapods Website]: https://cocoapods.org/ "Cocoapods Website"
[Carthage Logo]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1fzf1Ks_ljqGWNgehHwCqHB-MIIY8vA-3p1Bas7Q7V5N2FE0MwG2JTRjHdlZnAw6QdaD2zDDM6_ikqqLLA7oqcmcGH3vJjVYOKIC2D5hXFz12HOEjbO1BDcGhcOQBaVDT-fgKuFd9bs/s1600/carthage-logo-small.png
[Cocoapods Logo]: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNApdFLMjX1ajtwTdiTGpgCOqKlzwbIisfyzqgfG8yf8gkqezKXzk_AeWJvZ5TxocBTlSmVzkWrBb5t-PZ9iGs3sxLqKM5InU3D-ddht15k-FuMKmlN5BhE3-TiYfjEM610XgALyiRfbg/s320/cocoapods-logo-small.png
<!-- Markdown - end -->
</pre>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-79642226771972499642019-04-25T22:56:00.003+10:002019-04-25T23:06:32.360+10:00Barton Watchband for Samsung Galaxy Watch<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/xPayuq59MFQ/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/xPayuq59MFQ?feature=player_embedded" style="clear: right; float: right;" width="320"></iframe>I jumped on the Galaxy Watch bandwagon since late last year and left the Apple Watch behind collecting dust in the drawer. Never regret since then. One of the main reasons was the customisable of the software, in particular, the watch faces. And now, also the accessories - like the watch bands. Thanks to Samsung's decision to utilise many standards of the conventional watches, i.e the standard 20mm or 22mm straps connections and the lug sizes. Which means many accessories for the Galaxy Watch also fit my other conventional watches, like my legendary Seiko Skx007. </div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: left;">
I was slightly underwhelmed when looking around on eBay, unhappy with the cheapish looking of many products, many are fake. Then the Barton Watch band caught my eyes. Still unconvinced, I visited their website and was blown away by the vast collections. I ordered one straight away. Two weeks later, it was in my mailbox. Amazed, they actually shipped it from the US!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Features:</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<ul>
<li style="text-align: left;">2-tone silicone material (black top / orange bottom)</li>
<li style="text-align: left;">Integrated Quick Release spring bars</li>
<li style="text-align: left;">Black brushed stainless steal buckle</li>
<li style="text-align: left;">Lug width 22 mm</li>
<li style="text-align: left;">Fit Samsung Galaxy Watch (46mm or 42mm). The one in review is 46mm</li>
</ul>
Note: I am not in any way associated with Barton Watch Band P/L. I saw the product. I was curious. I purchased the product and made this review.<br />
<br />
<div class="separator" style="clear: both;">
So here it is, please enjoy the video.</div>
<div>
<br /></div>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-86228149239833844732019-04-25T16:25:00.000+10:002019-04-29T21:06:36.740+10:00Hello (AR) World<h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHt1qhoBtgCAvp8dFGjmxiIi8MBdS_Gt3dT0Ne08VrZK4UU8uii26xbofmkXeq63JhgR6jDldUSQ8-UwepoLHjj9QPPNKS2ylLI2tga488GO-Yalazmr1V6i_vvloBsMRySZirU8KCG5Y/s1600/jet-in-frontyard-small.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="222" data-original-width="480" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHt1qhoBtgCAvp8dFGjmxiIi8MBdS_Gt3dT0Ne08VrZK4UU8uii26xbofmkXeq63JhgR6jDldUSQ8-UwepoLHjj9QPPNKS2ylLI2tga488GO-Yalazmr1V6i_vvloBsMRySZirU8KCG5Y/s400/jet-in-frontyard-small.png" style="cursor: move;" width="400" /></a><span style="font-family: "trebuchet ms" , sans-serif;">Reality, Augmented</span></h2>
<span style="font-family: "trebuchet ms" , sans-serif;">You sit on a train with your cool-shade filtering out bright light, earphones on, rain-pouring-down white-noise helps drawing out this buzzing noise so at least you can concentrate on what you are reading - the news that your government announced GDP growth of 0.3%. Your friend said that you are his best mate and asked to borrow some money; your girlfriend said that she really like the green necktie you wear today. Your boss said that you were her best employee and asked if you could do OT this Saturday. You hate lies. But, all these are alright - you are telling yourself that they were augmented. </span><span style="font-family: "trebuchet ms" , sans-serif;">What's real? What's not? Never mind that, let's alter our perceptions a little bit more, you picked up a book on Augmented Reality and search internet on AR. </span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"></span><br />
<a name='more'></a><br />
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">Hardware & Software Maturity</span></h2>
<span style="font-family: "trebuchet ms" , sans-serif;">Apple introduces Augmented Reality back in WWDC 2017, with ARKit 1.0 and iOS 11, signifies hardware and software maturity to support altering our reality in realtime - with device's camera, Apple A9 CPU, GPU, and wide array of sensors, working in concert to interact, analyse, and produce </span><span style="font-family: "trebuchet ms" , sans-serif;">realistic virtual content on top of real-world scenes.</span><br />
<div>
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">Jump onto the bandwagon</span></h2>
<span style="font-family: "trebuchet ms" , sans-serif;">Fast forward to 2019, Apple released ARKit 2.0, iOS 12, and the all mighty Xcode 10.2. The library is more mature, the iOS is ever more efficient, the tools allow creating AR applications seamlessly - like magic. AR becomes the talk of the town. I thought to myself ... it is now, or never.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">But first, these are the things I need to get before I can get start:</span><br />
<br />
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">iPhone from 6s or newer, and/or iPad from 2017 or newer</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">iOS 11 or newer</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Mac from 2009 </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Xcode 9 or newer</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">I was lucky to have these items available and all posting here are based on them:</span></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">iPhone X & iPad 2018 (not the Pro - I didn't have $$$)</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">iOS 12.2</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Macbook 2016 (1.2 GHz, core m5, 8GB RAM)</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Xcode 10.2.1 (don't get 10.2 - it's buggy)</span></li>
</ul>
</div>
<br />
<h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ntQuaGLNOuVKIpVOuL-uWofMFTa0uDLewGtqX4VpFG4LnJoj_Eso6GvgudwLMaDqDWqDaUTaesZEgV6ZTvfxMpndx9Qb1QY72XZ1OOd4xFm5Boi6bOK5blKQQmN0SLs5qAH-0UL4M2Q/s1600/xcode-scene-editor.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="727" data-original-width="752" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ntQuaGLNOuVKIpVOuL-uWofMFTa0uDLewGtqX4VpFG4LnJoj_Eso6GvgudwLMaDqDWqDaUTaesZEgV6ZTvfxMpndx9Qb1QY72XZ1OOd4xFm5Boi6bOK5blKQQmN0SLs5qAH-0UL4M2Q/s320/xcode-scene-editor.png" width="320" /></a><span style="font-family: "trebuchet ms" , sans-serif;">The Almighty Xcode</span></h2>
<span style="font-family: "trebuchet ms" , sans-serif;">I love the Xcode. I really do. I love the way how Xcode broke all my plugins every time they updated to the new versions and they do make sure that it happens very *very* frequently. But, that is for another post. </span><span style="font-family: "trebuchet ms" , sans-serif;">Obsolency conspiracy, anyone?</span><span style="font-family: "trebuchet ms" , sans-serif;"> </span><span style="font-family: "trebuchet ms" , sans-serif;">No. I mean "yes" - I really do love the Xcode. I was awe in 2017 when Apple put SpriteKit builder in Xcode 9. I have to same awe-struck feeling now with SceneKit's Scene Editor that support 3D and AR authoring.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VNf7lKFNy4xFebdgBC1IEQ1yon-fZiDMN0n-cN-6WRmNBqnLqZjU68mpHxoclFfsvTPpO95uEMSHFIoEpEb-lanBCtnEQ2QzfoHMhr4nL02uNfMeLzXZ5P6eXDC1rueh1eHfx2EiihY/s1600/xcode-scenebuilder-help.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="206" data-original-width="799" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VNf7lKFNy4xFebdgBC1IEQ1yon-fZiDMN0n-cN-6WRmNBqnLqZjU68mpHxoclFfsvTPpO95uEMSHFIoEpEb-lanBCtnEQ2QzfoHMhr4nL02uNfMeLzXZ5P6eXDC1rueh1eHfx2EiihY/s400/xcode-scenebuilder-help.png" width="400" /></a></div>
<span style="font-family: "trebuchet ms" , sans-serif;">The best place to get yourself familiar with Xcode's SceneKit Scene Editor is - with the Xcode! From Editor menu, you can select `SceneKit Editor Help` and have a good read there.</span><br />
<br />
<br />
<br />
<br />
<br />
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">KISS - Keep It Swift and Simple</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDyIEPgREGvSHGMkAgfCC-ip63EDHIw-hUrFUsbN840R4DudP9sFF7CleisXK6UvrOF675m6qxFoP5A7X5Pit7u6EuQpxoy4tpoq0L9xER2hqCxmIUEK3I99ShyphenhyphenylhvZZhJqk8xupuUFU/s1600/xcode-new-ar-prj.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="527" data-original-width="729" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDyIEPgREGvSHGMkAgfCC-ip63EDHIw-hUrFUsbN840R4DudP9sFF7CleisXK6UvrOF675m6qxFoP5A7X5Pit7u6EuQpxoy4tpoq0L9xER2hqCxmIUEK3I99ShyphenhyphenylhvZZhJqk8xupuUFU/s320/xcode-new-ar-prj.png" width="320" /></a></div>
<span style="font-family: "trebuchet ms" , sans-serif;">It is true that with the Xcode's default AR-app template, you can create a good looking AR app with almost no additional line of code. Fair dinkum!</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr1KtTWPGKptILfXnLpj9aWLqNMyv1Ruu9rSX2Zcv0kcABVSHk0MZv_aFGX5JA9oTOnxW7-BbPhjKEk_T4dwd-s5NrXls6JPEIg40tVb6I02mZkODH1X-BqMIRKqBpZFwbuGeVzqF9EGs/s1600/xcode-ar-default.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="266" data-original-width="266" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr1KtTWPGKptILfXnLpj9aWLqNMyv1Ruu9rSX2Zcv0kcABVSHk0MZv_aFGX5JA9oTOnxW7-BbPhjKEk_T4dwd-s5NrXls6JPEIg40tVb6I02mZkODH1X-BqMIRKqBpZFwbuGeVzqF9EGs/s200/xcode-ar-default.png" width="200" /></a><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">In Xcode, create a new project and use the default Augmented Reality App template. Follow through and specify details for your new project, you should end up with project structure like this.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">Assume that you are familiar with Xcode and iOS development in general, AR project is the simplest single-view iOS app - with an additional of the scene asset file - the `art.scnasset` file</span><br />
<br />
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;"><h2>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></h2>
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></h2>
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></h2>
Playing with 3D Objects</span></h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTrVnN0N-J3I92KShmrm0h4LneF2B2M3Wv1J9G5PY367XJ5DmWY0SyP8Ylp3kH1aTTvR_i_RLiW84CFziJ8yhaF6CpUqQwXdQ4IWWPFxtb4hVnFTskhcjorMkNBtHF5oOaIrSAzVsmSjo/s1600/xcode-nodeinspector.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1034" data-original-width="1512" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTrVnN0N-J3I92KShmrm0h4LneF2B2M3Wv1J9G5PY367XJ5DmWY0SyP8Ylp3kH1aTTvR_i_RLiW84CFziJ8yhaF6CpUqQwXdQ4IWWPFxtb4hVnFTskhcjorMkNBtHF5oOaIrSAzVsmSjo/s400/xcode-nodeinspector.png" width="400" /></a><span style="font-family: "trebuchet ms" , sans-serif;">Scene asset file contains all the 3D objects. Each tab in Scene Editor provides with very educational details. </span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">One particular of interest is the Node Inspector. With Node Inspector you can see:</span><br />
<br />
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">object's position on (x, y, z) planes</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Euler (x, y, z)</span></li>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Rotation around x-axis - pitch</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Rotation around y-axis - roll</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Rotation around z-axis - yaw</span></li>
</ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">object's scale (x, y, z)</span></li>
</ul>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgySZM4vHyo2GcrDW4ScowJSuELaYUGwOciVQC9EWGjZUl6iOCDn3fe6WsacgkE5rZoGOoaiVYy0Npi1N9SMu9Mlv5WCh9MdiW1J6Hizc4hxfxxU5EKoY6Bbaj5ACUBirstd8BaqWhcaHQ/s1600/xcode-scene-inspector.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="613" data-original-width="257" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgySZM4vHyo2GcrDW4ScowJSuELaYUGwOciVQC9EWGjZUl6iOCDn3fe6WsacgkE5rZoGOoaiVYy0Npi1N9SMu9Mlv5WCh9MdiW1J6Hizc4hxfxxU5EKoY6Bbaj5ACUBirstd8BaqWhcaHQ/s320/xcode-scene-inspector.png" width="134" /></a><span style="font-family: "trebuchet ms" , sans-serif;">Note that all units are in meter (thanks God! Something non-american!), for example, 'Bounding Box' measurements gives you the size of the object in real world, in the above example that 48.96 x 17.22 x 46.64 meter! That's huge! Try build the project and run on an iPhone. You will need a big back yard to fit that plane there! My front yard is small, so I need to scale it down a bit.</span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">To fit that plane in my front yard, I scaled it down with 0.02 factor (on all x, y, z axises) - that gives the plane the size of about 1 x 0.3 x 1 meter. Don't worry, the Scene Inspector actually calculates the final *real-world* metrics for you.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">Now, that plane fits nicely in my front yard.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
</div>
<div>
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">No Line Of Code - Almost</span></h2>
</div>
<div>
Let's take a look at the source code. If you are familiar with iOS development, you will see that the codes are at the minimum a single-view app. Taking a look at `Main.storyboard`, you will see a single ARSCNView embedded in the main view of the ViewController. All 3D objects and models are loaded from `art.scnassets/ship.scn` file in `viewDidLoad()` as show below.</div>
<div>
<br />
I have added sceneView.debugOptions as extra lines of code in to make the project a little bit more interesting. When I tell you that no extra lines of code needed, I didn't lie - just *augmented* truth 😅<br />
<div>
</div>
<br /></div>
<div>
<br /></div>
<pre class="brush: java"> override func viewDidLoad() {
super.viewDidLoad()
// Set the view's delegate
sceneView.delegate = self
// Show statistics such as fps and timing information
sceneView.showsStatistics = true
// Create a new scene
let scene = SCNScene(named: "art.scnassets/ship.scn")!
// Set the scene to the view
sceneView.scene = scene
sceneView.debugOptions = [
ARSCNDebugOptions.showFeaturePoints,
ARSCNDebugOptions.showWorldOrigin,
SCNDebugOptions.showBoundingBoxes,
SCNDebugOptions.showWireframe
]
}
</pre>
Build the project and run on a device. Have a walk around your new shinny 3D plane. Walk to some where else or other rooms. And when you come back to this spot, notice your 3D plane is still there! Amazing! All this was done as part of real-world objects tracking provided for you automatically by a few lines of codes.<br />
<pre class="brush: java">
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Create a session configuration
let configuration = ARWorldTrackingConfiguration()
// Run the view's session
sceneView.session.run(configuration)
}
</pre>
<br />
<br />
Awesome! This is fantastic! I showed my app to my son and went ballistic with joy! He ran around and inspected the shiny plane from all angles. He can't wait for me to put more cool things there - robots, spaceships, cool sport cars, trees, and so on.<br />
<br />
Ok! How do I get or make these cool 3D models? Where to find them? How to put them into the scenes? Little beads of sweat formed on my head.<br />
<br />
"Yes, son. That's easy. Let daddy work on it", I replied.<br />
<br />
<h2>
Further Reading</h2>
<ol>
<li><a href="https://en.wikipedia.org/wiki/IOS_11#Developer_APIs" rel="nofollow" target="_blank">iOS 11 - Wikipedia</a></li>
<li><a href="https://developer.apple.com/arkit/" rel="nofollow" target="_blank">ARKit - Apple Developer</a></li>
<li><a href="https://www.lifehacker.com.au/2017/08/how-to-get-started-with-apples-arkit-augmented-reality-platform/" rel="nofollow" target="_blank">How to Get Started with Apple's ARKit</a></li>
</ol>
Improbable, but Truehttp://www.blogger.com/profile/02557982096301609759noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-42398850546862383912017-07-13T11:09:00.000+10:002017-07-13T11:09:32.425+10:00Is Decaffeinated Coffee good for you?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hgg4q2-JkNGLf6E8XY_dezrmvwzIWwSadXeTwPAbrgcwfqjB0P5EZ9IFSzfbXZI7PL6ZPfp2kk8qgOiUIhZjdwt_eLe202Zet_Oyi66a9CrIFXfsQ7O1DMlJKexzW9CZbcHApMU17TGt/s1600/cupOfCoffee.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="500" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hgg4q2-JkNGLf6E8XY_dezrmvwzIWwSadXeTwPAbrgcwfqjB0P5EZ9IFSzfbXZI7PL6ZPfp2kk8qgOiUIhZjdwt_eLe202Zet_Oyi66a9CrIFXfsQ7O1DMlJKexzW9CZbcHApMU17TGt/s320/cupOfCoffee.jpg" width="213" /></a></div>
<span style="font-family: "georgia" , "times new roman" , serif;">I love the aroma of a freshly brewed cup of coffee, but unfortunately my body cannot tolerate the high content of caffeine found in 1 cup of regular, black coffee. So I was wondering if I should consider drinking the decaf alternative instead? What are the benefits and side effects of decaffeinated coffee?</span><br />
<span style="font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Decaffeinated Coffee still contains Caffeine</i></span><br />
<span style="color: red; font-family: "georgia" , "times new roman" , serif;"><br /></span>
<span style="font-family: "georgia" , "times new roman" , serif;">According to a reputable professor at John Hopkins Medical School, Dr. Roland Griffiths says:</span><br />
<br />
<blockquote class="tr_bq">
" ... <span style="font-family: "arial" , "helvetica" , sans-serif;"><i>decaffeinated is not the same as caffeine-free ... popular</i></span> <em style="color: #333333;"><span style="font-family: "arial" , "helvetica" , sans-serif;">decaffeinated espresso drinks such as lattes (which contain two shots of espresso) can deliver as much caffeine as a can of Coca-Cola -- about 31 milligrams."</span></em></blockquote>
<br />
<a name='more'></a><br />
<br />
<span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Antioxidants are diminished during extraction processes</i></span><br />
<span style="color: red;"><br /></span>
During the decaffeination extraction process, the phytochemical structure of the coffee beans is chemically altered, hence most of the antioxidants are weakened compared to the non-decaffeinated beans.<br />
<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIxcbRs5l9_3bQpEHvwj4QiLx-l_BWvABRqW5WMFp0pXemzkccTJjlUFxe1PPBAe2SuRL0pMX_LvA6peH2_imfccmN9WolA1B3IYLIgqcl6io5VYINaSy7MT_PTcVsYkSMCurtZ7ecHMc/s1600/methyleneChloride.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="500" data-original-width="275" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIxcbRs5l9_3bQpEHvwj4QiLx-l_BWvABRqW5WMFp0pXemzkccTJjlUFxe1PPBAe2SuRL0pMX_LvA6peH2_imfccmN9WolA1B3IYLIgqcl6io5VYINaSy7MT_PTcVsYkSMCurtZ7ecHMc/s320/methyleneChloride.jpg" width="176" /></a><span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Chemical Solvents used in the Decaffeination process may adversely affect your health</i></span><br />
<br />
<br />
Although is is claimed by the relevant government health authorities (such as FDA) that only trace amounts of <span style="color: red;">methylene chloride</span> (which is a base used in stripping paint) and <span style="color: red;">ethyl acetate</span> (which is a fluid used in dry cleaning) are found after Decaffeination, studies have shown some disturbing links of people who consume decaffeinated coffee to high risks of developing rheumatoid arthritis.<br />
<br />
<span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>High Acidity content</i></span><br />
<span style="color: red;"><br /></span>
Decaf coffee is infamous for it's poor flavour as the result of decaffeination. In order to improve on the taste and flavour of decaffeinated beans, companies used Robusta beans instead of the more superior quality Arabica beans as it has higher acidity content. Highly acidic coffee can cause health problems such as inflammation of the bowels and urinary tract, osteoporosis, stomach ulcers and heartburn.<br />
<br />
<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieuD_HdAYwF4BVMLXMOby3EYpziR4rwy5Mv8EpfdDD4nQKtN_ovdUItn-_PRxcB9iplDxLjmpJlhwa2J2-vYBi-8YwbH99rvZ2p9MGfHPDjziLiPL3kcAnU9nFp1f8BmMw5l3cIEVJIqfj/s1600/reflux.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="329" data-original-width="510" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieuD_HdAYwF4BVMLXMOby3EYpziR4rwy5Mv8EpfdDD4nQKtN_ovdUItn-_PRxcB9iplDxLjmpJlhwa2J2-vYBi-8YwbH99rvZ2p9MGfHPDjziLiPL3kcAnU9nFp1f8BmMw5l3cIEVJIqfj/s320/reflux.jpg" width="320" /></a><span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Harmful effects of Decaf Coffee on you Health</i></span><br />
<ul>
<li>increase the release of stomach acid</li>
<li>increase in acid reflux</li>
<li>increased bone loss and osteoporosis caused by high acidity, loss of calcium, magnesium and zinc</li>
<li>chlorogenic acid prevents effective absorption of iron</li>
<li>increases LDL cholesterol, fatty acids and apolipoprotein B (cause plaques and vascular disease)</li>
<li>increases risks of heart attacks</li>
<li>increases risks of developing glaucoma, vision deterioration.</li>
</ul>
<br />
<span style="color: red;">References:</span><br />
<br />
<span style="color: red;"><a href="http://www.coffeeresearch.org/science/decaffeination.htm">http://www.coffeeresearch.org/science/decaffeination.htm</a></span><br />
<span style="color: red;"><a href="http://teeccino.com/building_optimal_health/39183/Decaf-Coffee-And-Health.html">http://teeccino.com/building_optimal_health/39183/Decaf-Coffee-And-Health.html</a></span>
<br />
<a href="https://en.wikipedia.org/wiki/Lipoprotein">https://en.wikipedia.org/wiki/Lipoprotein</a><br />
<a href="https://en.wikipedia.org/wiki/Low_caffeine_coffee">https://en.wikipedia.org/wiki/Low_caffeine_coffee</a><br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com1tag:blogger.com,1999:blog-1374340721222686912.post-61177633461533418522017-07-03T12:08:00.000+10:002017-07-03T12:08:54.442+10:00Ways to Quit a Bad HabitIf you google the internet, you'll be inundated with so many blogs and youtube videos about ways that can help you to break a bad habit. What I've come to realise is that depending on what the bad habit is you need to apply the method that is best suited to that particular negative habit. What works for other people may not work for you in every situation.<br />
<br />
Let's suppose you have a bad habit of nail-biting when you are anxious, stressed or just nervous. How would you go about quitting this bad habit?<br />
<br />
<a name='more'></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2fsq-eGZ5zjEOQflzj3SX8o6v8-BzgeEsFcFmULMRAvza2ids-vxicSekJjzYLfXdUye6EPuuq5HYghEco1RGlcFcMiKpynJz6Qrwe-PgdUCp1VuJvcBoKnvnbzy81jMeR5Ue8Dd2g6gF/s1600/nailbiting.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="564" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2fsq-eGZ5zjEOQflzj3SX8o6v8-BzgeEsFcFmULMRAvza2ids-vxicSekJjzYLfXdUye6EPuuq5HYghEco1RGlcFcMiKpynJz6Qrwe-PgdUCp1VuJvcBoKnvnbzy81jMeR5Ue8Dd2g6gF/s200/nailbiting.jpg" width="200" /></a><span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i style="background-color: white;">Method 1: Develop Mindful Curiosity of a Bad habit</i></span><br />
<br />
With mindful nail-biting, you become aware of your action - which is moving your fingers to your mouth, as you take the first nibble of your nails, you are curious about what it feels like on your fingers, your teeth, the taste of unhygienic nails and the unflattering image that you projected to people around you. Take a moment to really look at your hands and fingers and compare to those of your peers who don't bite their nails. Do you feel good about the results of nail-biting?<br />
<br />
Strategy of Mindful Nail-biting: Notice the urge - investigate and get curious why you bite your nails - let go of the urge by distracting your hand away from your mouth (e.g., pick up a pen, run your fingers through your hair, or put your hand in your pocket, etc.) - recognise the positive feeling of not giving in to the urge - and repeat.<br />
<br />
<br />
<span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Method 2: Replace a Negative habit with a Positive one</i></span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy242jQIqTTwpw4gesUBLGT-y-1IGuw8N2ZNPAvBzp2RXl382WHPmJHOEf-YRR7WuyCq4mV62QNvtPiuO5IRVQRXGleAV3i3E-gSHLdC3kAIAXwfsY8C-iaPLlF0h54uvxVm-78DN7ossD/s1600/alcohol.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="846" data-original-width="564" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy242jQIqTTwpw4gesUBLGT-y-1IGuw8N2ZNPAvBzp2RXl382WHPmJHOEf-YRR7WuyCq4mV62QNvtPiuO5IRVQRXGleAV3i3E-gSHLdC3kAIAXwfsY8C-iaPLlF0h54uvxVm-78DN7ossD/s320/alcohol.jpg" width="213" /></a><br />
For example, you tend to over consume alcohol when out with friends and then got yourself into a mess afterwards. Too drunk, incoherent, and a pain in the a**. People find that you're not fun to be around with anymore. So, how can you stop this from happening again?<br />
<br />
You need to come up with a plan and a simple strategy that you need to stick to when you are offered alcohol at an event. Suppose your friend offers you a glass of wine, what is the most suitable response?<br />
<br />
Instead of rejecting the drink brusquely: "No, thanks.", you may respond: "Doctor's order, I can't drink alcohol tonight, I'll just have a glass of water, thanks." This way, your friends won't feel offended and are less likely to be offering anymore drinks to you for the rest of the night. No hard feelings.<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpXXfr9PTNvDHjLJKtGqoTH7oaqbvzzOJmhpKL_TuYZfkfMG65DaWkNJQq60ySf3CnAwqyoAPdpR8f2I9NNpJgOpUaumjbSfSFo9J8MyZVN6gMGF2L2vFTdGGTrsbf9iTMf_-wDoZAq5nS/s1600/procrastination.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="846" data-original-width="564" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpXXfr9PTNvDHjLJKtGqoTH7oaqbvzzOJmhpKL_TuYZfkfMG65DaWkNJQq60ySf3CnAwqyoAPdpR8f2I9NNpJgOpUaumjbSfSFo9J8MyZVN6gMGF2L2vFTdGGTrsbf9iTMf_-wDoZAq5nS/s320/procrastination.jpg" width="213" /></a><span style="color: red; font-family: "georgia" , "times new roman" , serif;"><i>Method 3: Tackle One Bad Habit At A Time</i></span><br />
<br />
Train yourself to think differently. Change your environment.<br />
<br />
Another bad habit that I can relate to is procrastination. We tend to leave everything to the last minute. For example, should I mow the lawn now? Nah, I'll do it tomorrow. Should I go for a swim? Nah, too many people at the pool at this time, maybe later. Should I go for a run? Nah, the weather forecast just said that there's a chance of rain during the day.<br />
<br />
The thing is "tomorrow" and "later" and "there's a chance that ..." will never come! Period.<br />
<br />
So, I've developed a strategy that has prevented me from procrastination. Instead, of "Should I ...?", I say to myself: "I am ..." and just do what I want to do. I don't pause to think "should I", "whether this or that", "can I?", "maybe ...". This strategy has worked wonders for me in how I choose to live my life. I've learnt never to use "Monetary Reward" or "Monetary Punishment" in order to motivate myself. This method is shallow, superficial and does not work in the long run.<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-60332802473016627162017-06-29T16:36:00.002+10:002017-06-29T16:36:21.621+10:00Goodness of Chamomile (aka Camomile) Tea<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS7U_bFTnNIsx4fMC_x7EAQXs8iRNCF4Cc_xVFZzi7O-eCyVTf3MaDCY66kCRJg0X6kewbeUfboai0cx54vwmP0IB_p2Lia5W6EYYaL-bXHp1EnCwREduerF_qleHhrY2zlhoza63-xvAw/s1600/IMG_6708.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1200" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS7U_bFTnNIsx4fMC_x7EAQXs8iRNCF4Cc_xVFZzi7O-eCyVTf3MaDCY66kCRJg0X6kewbeUfboai0cx54vwmP0IB_p2Lia5W6EYYaL-bXHp1EnCwREduerF_qleHhrY2zlhoza63-xvAw/s320/IMG_6708.JPG" width="320" /></a>Recently, as a change from drinking Vietnamese jasmine tea, Japanese tea and Green tea, I thought I'd like to try Chamomile tea. Yesterday, after my "healthy" lunch of deep-fried chips (<span style="font-family: 'Apple Color Emoji'; font-size: 12px;">😅</span>) and spicy, chargrilled chicken, I wanted a tea that would get rid of the oily after taste in my mouth. I rummaged through my kitchen drawers and found a box of Chamomile tea.<br />
<br />
I was pleasantly surprised by the faintly-sweet aroma and the effects on my sleep during the night. For the first time in a long time, I had an uninterrupted 7 hours of sleep. I felt rejuvenated and alert as I got up at 5:30am to start my meditation. I found myself humming "Ständchen" while preparing breakfast and packing lunches for my children for school. Wow! This is really something ... so I did some research and found some interesting facts about the effects of Chamomile tea that I'd like to share with you.<br />
<br />
<a name='more'></a><br />
<br />
Well-known Benefits of Chamomile Tea:<br />
<br />
<ul>
<li>help with sleep</li>
</ul>
<ul>
<li>help give glowing skin without invasive cosmetic procedures or unnatural cosmetic applications</li>
</ul>
<ul>
<li>reduce and smooth wrinkles</li>
</ul>
<ul>
<li>eliminate blemishes caused by acne and eczema </li>
</ul>
<ul>
<li>boost and strengthen immune system to help fight bacteria</li>
</ul>
<ul>
<li>ease discomfort of menstruation</li>
</ul>
<ul>
<li>reduce and eliminate stress, worry and anxiety</li>
</ul>
<ul>
<li>help people with diabetes by regulating insulin and sugar levels</li>
</ul>
<ul>
<li>improve stomach health, gas and bowel movement</li>
</ul>
<ul>
<li>promote silkier, lustrous and healthier hair</li>
</ul>
<ul>
<li>prevent dry scalp and dandruff</li>
</ul>
<ul>
<li>pleasant fragrance and taste</li>
</ul>
<ul>
<li>easily accessible</li>
</ul>
<div>
<br /></div>
<div>
Warning:</div>
<div>
<ul>
<li>If you have allergies to flowers and weeds such as ragweed, chrysanthemums, etc., please consult your doctor before consuming chamomile tea;</li>
</ul>
<ul>
<li>If you are pregnant, chamomile may cause miscarriage, so it would be wise to consult your doctor.</li>
</ul>
</div>
<br />
References:<br />
<br />
<a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2995283/">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2995283/</a><br />
<a href="https://www.eurekalert.org/pub_releases/2005-01/acs-tn010405.php">https://www.eurekalert.org/pub_releases/2005-01/acs-tn010405.php</a><br />
<a href="http://www.webmd.com/sleep-disorders/tc/chamomile-topic-overview">chamomile-topic-overview</a><br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-9310017196035458152017-06-27T05:28:00.000+10:002017-06-27T05:50:13.334+10:003AM - The Witching Hour<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeo8PhPtPjKx-kNatv_EpMJ2WV8KOoAXuk9C0y-NMQw0wzCSPWJSE5yAK_0mJv6k67T0OWG6DIN71b2QcE9MhNCsC-Q-JE2qTdZmkAY9Kkgvl5XrGWlDmuaioP4omHx8tSMPP9x70mzrs/s1600/A_perturbed_young_woman_fast_asleep_Wellcome_V0016638.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="[[File:A perturbed young woman fast asleep Wellcome V0016638.jpg|thumb|A perturbed young woman fast asleep Wellcome V0016638]]" border="0" data-original-height="1198" data-original-width="1462" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeo8PhPtPjKx-kNatv_EpMJ2WV8KOoAXuk9C0y-NMQw0wzCSPWJSE5yAK_0mJv6k67T0OWG6DIN71b2QcE9MhNCsC-Q-JE2qTdZmkAY9Kkgvl5XrGWlDmuaioP4omHx8tSMPP9x70mzrs/s320/A_perturbed_young_woman_fast_asleep_Wellcome_V0016638.jpg" title="[[File:A perturbed young woman fast asleep Wellcome V0016638.jpg|thumb|A perturbed young woman fast asleep Wellcome V0016638]]" width="320" /></a></div>
<div style="text-align: left;">
</div>
<i>... I loaded our luggages into the van. It was black, "Very unusual van", so I thought. I got myself to the driver side, "Have I seen this van before?". Inside was very luxurious, plush cream leather. There were already 2 other people inside!. On the passenger side, there was my brother! I had not seen him for a long while.</i><br />
<i><br /></i>
<i>He was yelling, upsetting at something. He waved his hands around and started hitting and banging on the dashboard. I told him that I was not driving with him like this. "Step outside and talk", I demanded. We confronted each other outside the van. He pushed and shoved me around. I pulled him in and hugged. He froze.</i><br />
<i><br /></i>
<i>"Whatever you do, don't touch my butt", I said. </i><br />
<i><br /></i>
<i>We bursted out laughing. The laughter was still echoing in my ears when I opened my eyes -- 3AM! </i><br />
<br />
<a name='more'></a><br />
For as long as I can remember, I often got woken-up and could not put myself back to sleep. Again and again, it was always around 3 o'clock! <i>Why?!</i> At first, I thought It was just me. But then I started telling my friends.<br />
<br />
"Ah!, the '<i>witching hour</i>'", one of my friends said.<br />
<br />
The witching hour?!<br />
<br />
Apparently, lots of people have experienced this symptom throughout history. Symptom? Phenomenon? Googling around, surprisingly, here how common it was that I found.<br />
<br />
The witching hour is the time 3am, at which witches, demons, ghosts, and gremlins are thought to appear and to be at their most powerful. Black magic is thought to be most effective at this hour! -- <a href="https://en.wikipedia.org/wiki/Witching_hour" rel="nofollow" target="_blank">wikipedia.org</a><br />
<br />
3AM - 4AM -- the Dead Time! Catholic church will not perform any church services and prayers!<br />
<br />
2:33AM - 3:33AM -- the Devil's hour! This is an inversion of the time at which Christ died at Calvary! Checking history, It said that Jesus died a holy hour at 3pm. 3am, is the exact opposite -- a mockery of the holy trinity.<br />
<br />
Some websites suggest a more scientific explanation -- your heart rate, cardiac pressure, breathing and arterial pressure becomes irregular at this hour (<a href="http://www.storypick.com/3-am-wake-up/" rel="nofollow" target="_blank">Why is 3-5AM The Creepiest Time</a>). So I guess that you are prone to wake up! But why 3AM precisely?! Is our body's biological clock that precise? I doubt it.<br />
<br />
<i>4AM -- "There goes, my night". As every other times, I could never put myself back to sleep. I got up, got myself a warm glass of milk, I sat and started typing this blog. I did sense some dark shadowy figures outside my window gleaming, looking at me. But, don't worry, I guaranteed you, I will never look outside ... until first light</i>.<br />
<br />
<br />
<span style="font-size: x-small;">* The scary image above came from Wikimedia Commons: https://upload.wikimedia.org/wikipedia/commons/7/70/A_perturbed_young_woman_fast_asleep_Wellcome_V0016638.jpg. See page for author [CC BY 4.0 (http://creativecommons.org/licenses/by/4.0)], via Wikimedia Commons</span><br />
<br />
<br />
<br />
<br />
<br />Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-82609146438597094562017-06-26T12:13:00.000+10:002017-06-26T12:14:42.686+10:00Achieve Mental Alertness and Energy Boost: Coffee verses Cardiovascular Exercise <div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzknGoxq1_Dpn-aVeDGjrVIs7QQSf5u8bBUh2IyB7yqENgJdCc0W4WIqPgJB2Pbyi_hDDcMgGbRZYpnQ3ORqFeWV7pB278aHGpSuvruTtCDehtyd37juwuSUunDeJRIQ9_VZkSbHKQV_5I/s1600/melbourne.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="553" data-original-width="564" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzknGoxq1_Dpn-aVeDGjrVIs7QQSf5u8bBUh2IyB7yqENgJdCc0W4WIqPgJB2Pbyi_hDDcMgGbRZYpnQ3ORqFeWV7pB278aHGpSuvruTtCDehtyd37juwuSUunDeJRIQ9_VZkSbHKQV_5I/s320/melbourne.jpg" width="320" /></a></div>
Melbourne is ranked as the most liveable city in the world according to Economist Intelligence Unit <br />
six years in a row and again in 2016. Although Melbourne is famous for restaurants, night-life and sports, locals and tourists agree that there's no other coffee like those in Melbourne.<br />
<br />
Coffee is a "must-have" for everyone, from high-school students to adults from all walks of life. You can often see young mothers, walking with their prams with one hand holding the coffee like a Golden Globe Award.<br />
<br />
<a name='more'></a><br />
Most of us cannot operate in the morning without our dosage of caffeine. Is this because we were so conditioned into thinking that caffeine is good for us? Or is it because we get a boost of "feel good" vibes every time we drink it? Or is it the expectation that we are more productive if we drink coffee?Regardless of what motivates us to drink coffee, we need to be more discerning and astute with regard to caffeine. There has been discussions, studies, and research into the effects of caffeine. How much is optimal for your health? What are the risks associated with too much caffeine? At what age is appropriate to consume caffeine?<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAiX3EfThCgooBz0N54xqFTH3x7njHsbxzyusRW2H89_tihUwgoeOvdrpLFsUpJ0m-ijkhfRw8ZBBTZ0WfEYTyW9zmG3cBvAq9FhP4pOC2BQmhTv1ruhmT_MJgcPsfudrAzjtItZdnn_D6/s1600/IMG_6704.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1200" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAiX3EfThCgooBz0N54xqFTH3x7njHsbxzyusRW2H89_tihUwgoeOvdrpLFsUpJ0m-ijkhfRw8ZBBTZ0WfEYTyW9zmG3cBvAq9FhP4pOC2BQmhTv1ruhmT_MJgcPsfudrAzjtItZdnn_D6/s320/IMG_6704.JPG" width="320" /></a><br />
According to <a href="http://msue.anr.msu.edu/news/health_benefits_and_risks_associated_with_caffeine" target="_blank">Michigan State University Extension</a>, daily dosage of 200 to 300 milligram of caffeine per day is considered moderate. This is equivalent to 2 to 4 cups of coffee. However, on the side of caution, when I choose to drink coffee, I would only drink 1 cup of coffee per day (but not necessarily everyday) due to my weight, height and sensitivity to caffeine. I also choose not to drink coffee after 10am. Having said that, I also drink green tea throughout the day and a cup of dark chocolate now and then.<br />
<br />
<br />
Below are some of the common beverages that are packed with powerful antioxidants that contain some degree of caffeine:<br />
<ul>
<li><u><b>chocolate</b></u>: flavonoids, procyanidins, epicatechin, cocoa phenols (1 piece of chocolate contains about 5mg)</li>
<li><u><b>tea</b></u>: epigallocatechin, epicatechin gallate, and epicatechin, and theanine - beneficial amino acid</li>
<li><u><b>coffee</b></u>: chlorogenic acid, caffeic acid, melanoidins (1 cup of coffee contains at least 100mg)</li>
</ul>
Somehow, I feel that it's misleading to assume that coffee has all these health benefits when for example tea contains caffeine as well as other powerful antioxidants that are of benefits to our health. Which then somehow got interpreted that since coffee contains caffeine, it is therefore beneficial so we should consume more of it because it is 'potential and a major contributor' to our well-being and mental alertness.<br />
<br />
It is often touted on social media and health news alert that when consumed in moderation, coffee has benefits to humans, such as:<br />
<br />
<ul>
<li>protects brain cells</li>
<li>reduces risks of colon and liver cancer</li>
<li>reduces risks of Parkinson's</li>
<li>reduces risks of skin cancer</li>
<li>reduces risks of liver cirrhosis </li>
<li>helps constrict blood vessels in the brain and therefore assist in reducing headache pain</li>
<li>reduces inflammation and lower the risks of heart-related diseases</li>
</ul>
<div>
From a personal point of view, I feel that all of the above 'health benefits' need further research and independent studies conducted as it seems rather dubious that most of the benefits are attributed to caffeine alone.</div>
<div>
<br /></div>
<div>
However, drinking coffee does have other benefits, just not from a health perspective in my humble opinion. So what are the benefits?</div>
<div>
<ul>
<li>Coffee and socialising: it allows people to get together, to converse, to exchange ideas and to promote social interactions.</li>
<li>Coffee in the workplace: the phrase of "let's have a cuppa" is synonymous with "let's have a chat"; allows 'down-time' from work-related stressful situations; provides a coping mechanism that allow work colleagues to share their personal frustration and exchange ideas.</li>
</ul>
<div>
So, in terms of psychological health, I would agree that coffee helps in reducing stress, but it's short-term and often times, unreliable.</div>
<div>
<br /></div>
<div>
What are the risks of too much caffeine (whether it's from tea or coffee)?</div>
</div>
<br />
<br />
<div>
<ul>
<li>insomnia</li>
<li>nervousness</li>
<li>restlessness</li>
<li>irritability</li>
<li>nausea or other gastrointestinal problems</li>
<li>fast or irregular heartbeat</li>
<li>muscle tremors</li>
<li>headaches</li>
<li>anxiety</li>
<li>caffeine has been linked to <a href="https://www.sciencedaily.com/releases/2008/01/080121080402.htm" target="_blank">lowered birth weight and increase in birth defects</a>.</li>
</ul>
<div>
<br /></div>
<div>
Furthermore, research as indicated that young children should not be exposed to caffeine, especially beverages such as soft-drinks, soda and energized drinks (e.g., Red Bull)</div>
<div>
<br /></div>
<div>
Now, let's look at <a href="http://www.icuriosity.com/2017/06/scientifically-proven-benefits-of.html#more" target="_blank">Benefits of Cardiovascular exercises</a> and you can then judge for yourself. What age group is this beneficial? All ages. What are the side-effects of physical exercises? None. </div>
<div>
<br /></div>
<div>
Last but not least, the health benefits that you get from exercise is long-term.</div>
<div>
<br /></div>
<div>
References:</div>
<div>
<ul>
<li><a href="http://www.health.harvard.edu/blog/exercise-versus-caffeine-which-is-your-best-ally-to-fight-fatigue-2017060811843">http://www.health.harvard.edu/blog/exercise-versus-caffeine-which-is-your-best-ally-to-fight-fatigue-2017060811843</a></li>
<li><a href="http://www.coffeeandhealth.org/all-about-coffee/coffee-workplace/">http://www.coffeeandhealth.org/all-about-coffee/coffee-workplace/</a></li>
<li><a href="https://jonbarron.org/article/caffeine-health-benefits-and-health-risks">https://jonbarron.org/article/caffeine-health-benefits-and-health-risks</a></li>
</ul>
<br />
I hope you enjoy this blog. I look forward to your ideas and comments. Cheers!</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<div>
<br /></div>
<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com1tag:blogger.com,1999:blog-1374340721222686912.post-68426957411589801642017-06-21T11:56:00.002+10:002017-06-21T11:56:52.055+10:00Scientifically Proven Benefits of Exercises - Specifically Cardiovascular Exercises (NOT stretching or toning or weight)<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1PrI0iZjng8aB0rr8zAEQljZXMpSatSRDewNHofspS7ffAE5aRxcmy33tEhUakmpq7FmNpWC9AcaiZTKX1pIyk-mHMFw91kDpNXP3c11yIp8tWnZJ0NDuXeGiT2GSmOMQ1qL_tCJJfjkr/s1600/healthMoney.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1PrI0iZjng8aB0rr8zAEQljZXMpSatSRDewNHofspS7ffAE5aRxcmy33tEhUakmpq7FmNpWC9AcaiZTKX1pIyk-mHMFw91kDpNXP3c11yIp8tWnZJ0NDuXeGiT2GSmOMQ1qL_tCJJfjkr/s320/healthMoney.jpg" width="320" /></a></div>
<br />
I am a health advocate and enthusiast. I am grateful to be born into this world with a clean bill of health. To me, health is one of the few investments in my life worth investing in.<br />
<br />
Having lived and worked in Thailand for a number of years, I noticed that people there don't do a lot of outdoor exercises. It was very rare to see a local person, in their exercise gears going for a run, a jog or even a walk.<br />
<br />
However, what I often saw is that people get ferried about on motorcycle taxis, tuk-tuks and in air-conditioned vehicles.<br />
<br />
What really piqued my curiosity was why no-one seems to like walking, even for really short distances such as a hundred metres or so. One day, while having my hair done, I asked my hairdresser why this is the case. She chuckled politely and said: "Don't you know walking, running, any form of strenuous exercise gives you big legs? Not pretty for girls." I was flabbergasted.<br />
<a name='more'></a>Have you ever wondered why there are so many motorbikes in countries like Thailand and Vietnam?<br />
<br />
There are so many benefits of exercises that most people in the world are not even aware of. These benefits are scientifically proven and a lot of research and studies have been written. If you want to have a happier, more fulfilling life, I invite you to continue reading.<br />
<br />
Cognitive Benefits:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2it0JPiAWDjHz6-j8jCnlvbS6noeM3BBlOeXhl0XSBUvVwhZ_FLPCA0l4XuiruEMLpP-Qf7NunfVZ8pQqpbZrduDH74zt7UT2tuvV4cUgZWEfYEfkL67qrBVPQILGMdJmURnMfKkskqj5/s1600/IMG_6703.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1557" data-original-width="1235" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2it0JPiAWDjHz6-j8jCnlvbS6noeM3BBlOeXhl0XSBUvVwhZ_FLPCA0l4XuiruEMLpP-Qf7NunfVZ8pQqpbZrduDH74zt7UT2tuvV4cUgZWEfYEfkL67qrBVPQILGMdJmURnMfKkskqj5/s320/IMG_6703.PNG" width="253" /></a></div>
<ul>
<li>thought processing skills: problem solving, planning, organising, and behaviours</li>
<li>improve Cardiovascular health is linked to increased IQ</li>
<li>increase the ability to focus and concentrate</li>
<li>responsiveness, attention to detail, mental agility in stressful situations</li>
<li>strengthen and bolster your willpower and self-control</li>
<li>enhances emotional intelligence and promotes calming attitudes</li>
<li>intensify short-term memory and help in comprehension, interpretation and manipulation of information</li>
<li>improve long-term memory, i.e. exercise prior to study will improve recall ability</li>
<li>faster at understanding and therefore faster at problem-solving</li>
</ul>
Psychological Benefits:<br />
<ul>
<li>alleviate stress</li>
<li>increase emotional resilience, optimism & positive attitude</li>
<li>reduce anxiety</li>
<li>increase pain tolerance</li>
<li>effective in preventing depression</li>
<li>improve mood</li>
<li>improve self-esteem</li>
<li>increase happiness level</li>
</ul>
Neurological Benefits:<br />
<ul>
<li>increase resilience to stress - better health, better decision-making, more control in daily life</li>
<li>increase in mental energy level</li>
<li>reduce fatigue and inertia</li>
<li>increase in 'white' & 'grey' brain matter, i.e. makes your brain bigger</li>
<li>decrease or slow down brain shrinkage (due to ageing)</li>
<li>increase development of new brain cells</li>
</ul>
Lifestyle Benefits:<br />
<ul>
<li>alleviate anxiety disorder symptoms</li>
<li>help people with ADHD without side effects</li>
<li>eradicate insomnia and improve your quality of sleep</li>
<li>reduce migraines and headaches</li>
<li>reduce risks of stroke and cardiovascular diseases</li>
<li>decrease risks of dementia and alzheimer</li>
<li>exercise changes your diet for the better</li>
<li>increase productivity in work and study</li>
<li>boost creativity </li>
<li>help prevent and recover from substance abuse (e.g., drugs, alcohol addiction)</li>
<li>jumpstart learning</li>
<li>improve academic performance and professional productivity</li>
<li>reduce ageing - look better and younger.</li>
</ul>
<div>
<br /></div>
<div>
References:<br />
<br />
<a href="https://www.scientificamerican.com/article/does-exercise-really-make/">https://www.scientificamerican.com/article/does-exercise-really-make/</a><br />
<a href="http://www.health.harvard.edu/blog/regular-exercise-changes-brain-improve-memory-thinking-skills-201404097110">http://www.health.harvard.edu/blog/regular-exercise-changes-brain-improve-memory-thinking-skills-201404097110</a></div>
Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-62043662744096738812017-06-19T22:00:00.000+10:002017-06-19T22:00:27.001+10:00The Humble Eggs: Why Eggs are Important to a Healthy Diet.<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNddkEaWLMa-lmHy9UnzCDSvG8_Y9v1Foai5DuyJUTxyNGG8JBGZd-65j_J_E4ydQp1o7neAiJ3UEzL6ekrelUkpTJFaEUqsXfrfEjk9g6fqjh8opoPpnCufjWTRvGn4HK-V1cTEzlaEVD/s1600/35d69e13d51e7f2552aae8e27991f2b6.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="564" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNddkEaWLMa-lmHy9UnzCDSvG8_Y9v1Foai5DuyJUTxyNGG8JBGZd-65j_J_E4ydQp1o7neAiJ3UEzL6ekrelUkpTJFaEUqsXfrfEjk9g6fqjh8opoPpnCufjWTRvGn4HK-V1cTEzlaEVD/s320/35d69e13d51e7f2552aae8e27991f2b6.jpg" width="320" /></a></div>
Riddle: Which one comes first? Chicken or Egg?<br />
<br />
Why are Eggs Nutritious? Well, I hope the list below will help you to decide whether to include eggs in your diet or not.<br />
<ul>
<li>Vitamin A</li>
<li>Folate</li>
<li>Vitamin B5</li>
<li>Vitamin B12</li>
<li>Vitamin B2</li>
<li>Phosphorous</li>
<li>Selenium</li>
<li>Vitamins A, D, E, K, B6.</li>
<li>Minerals such as Calcium, Zinc, Iron and Copper.</li>
</ul>
<a name='more'></a>Eggs are a rich source of betaine and choline.<br />
<br />
Choline is essential for women during pregnancy and breast-feeding as it is important in normal brain development in infants. This vitamin, which is found in eggs is vital to maintaining brain cells health and helps improve your memory. Choline is not only important for expectant mothers and young infants, research has shown its importance extends far into adulthood and old age.<br />
<br />
Folate found in eggs are useful for women in pregnancy planning as it helps in the formation of cells and neural paths in the foetus and reduces the risk of retardation in babies.<br />
<br />
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxn6JWx-7oZVZsJoGTTSiMmZ2RYIGm-A5QI-RlsE3x8ZfhinhvpgNqQDMWESePTYseeKo1BkGjspItYA-qXF4Kbi7CIvkNYtF92gY_R6RYBEOIJl5CtFlDY38EhW2SFbqOgFjkbOcwsg1/s1600/IMG_5807.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxn6JWx-7oZVZsJoGTTSiMmZ2RYIGm-A5QI-RlsE3x8ZfhinhvpgNqQDMWESePTYseeKo1BkGjspItYA-qXF4Kbi7CIvkNYtF92gY_R6RYBEOIJl5CtFlDY38EhW2SFbqOgFjkbOcwsg1/s320/IMG_5807.JPG" width="320" /></a></div>
Eggs also contain Lutein and Zeaxanthin Antioxidants that can significantly reduce the risk of cataracts and macula degeneration due to ageing. These antioxidants are found in egg yolks. As such they are crucial to improving eyesight and reduce the risk of blindness. (Picture of Eye: Courtesy of Catherine Ada)<br />
<br />
While eggs are of benefit to our well-being in many ways, they are also relatively inexpensive, fulfilling and greatly help in achieving weight loss as well as help reduce the risks of cancer, heart disease, osteoporosis and rickets.<br />
<div style="text-align: left;">
<br /></div>
After having discovered the benefits of eggs, as a general caution to myself I wouldn't over-consume a certain type of food just because it's good for me. Everything in moderation is the key to a healthy diet.<br />
<br />
I hope you enjoy this blog. Don't forget to leave any suggestions or comments below. Thanks for visiting!<br />
<br />
<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-82677846985394936722017-06-18T12:00:00.000+10:002017-06-18T12:00:11.023+10:00Reasons why Instant Noodles are Banned from my kitchen pantry.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF9Hkv340W-DrBU3ReYKy5u0cuKb2_KF9o9ywroKFyTAj7TwosaXAZU96dL43J0R62N3WuiOblLOuaLAIyFo88Pz9QtHsC5ogsd5dhO4cHwUEp8aZDb2Qq1NJYYqznjeB-HhiHAE19gBg/s1600/instant-noodles.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF9Hkv340W-DrBU3ReYKy5u0cuKb2_KF9o9ywroKFyTAj7TwosaXAZU96dL43J0R62N3WuiOblLOuaLAIyFo88Pz9QtHsC5ogsd5dhO4cHwUEp8aZDb2Qq1NJYYqznjeB-HhiHAE19gBg/s400/instant-noodles.jpg" width="400" /></a></div>
<i>I have never met anybody who never had instant noodle! I have never met anybody who doesn't like instant noodle! I grew up with it. I got through the uni years because of it -- it was my major source of food. I remembered those times late at night writing assignments, with no time for shopping, and nothing else left in the kitchen - but there were always packs of instant noodles! I used to have uncountable ways to cook it: with bacon; with eggs; with meatball; or just by itself. Very tasty!</i><br />
<br />
<b>But for several years now they are banned from our kitchen!</b><br />
<br />
<br />
<a name='more'></a><br />
Let's look at why instant noodle is so appealing to so many people.<br />
<br />
<ul>
<li>"Instant" implies that it's quick and easy to prepare. All you need is some hot water or a microwave oven and a bowl to put the noodle in. It takes a maximum of 3 minutes to prepare and you have a bowl of steamy, hot noodle ready to eat;</li>
<li>Cost-effective, inexpensive and can be purchased from any convenience store or supermarket;</li>
<li>Comes in a wide variety of tastes and flavours;</li>
<li>Has very long shelf-life.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7T1irj2u5POfWULJCbrrHNKLijHcFFvxTnaGYm4U8TjwW_Jjyrh55OxnXrStAEIdgJuXpCvA7n2gNKLDMTHzHrZBgdOASmPD1v8XkNZ6JEGpBllpkUtmpBqac9Rz2QZqRlNRdqjUze6ap/s1600/8ca182263494621429ee558f5b4ddd58.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="500" data-original-width="500" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7T1irj2u5POfWULJCbrrHNKLijHcFFvxTnaGYm4U8TjwW_Jjyrh55OxnXrStAEIdgJuXpCvA7n2gNKLDMTHzHrZBgdOASmPD1v8XkNZ6JEGpBllpkUtmpBqac9Rz2QZqRlNRdqjUze6ap/s200/8ca182263494621429ee558f5b4ddd58.jpg" width="200" /></a></div>
Instant noodle is not only not nutritious, but increase the risks of diseases that are hard to cure. The culprit is what the manufacturers used to give instant noodle it's long shelf life: Tertiary-butyl hydroquinone (TBHQ). TBHQ is a by-product of petroleum that is used as a food additive to help preserve cheap food such as instant noodle. Also, a carcinogen substance such as Benzopyrene that causes cancer in humans is prevalent in many of the instant noodle brands.<br />
<ul>
<li>Not nutritious, contains high unhealthy saturated fats, low in protein, fibre, vitamins and minerals;</li>
<li>Increase the risk of heart disease and strokes;</li>
<li>Increase the risk of high blood pressure;</li>
<li>Increase the risk of high blood sugar;</li>
<li>Increased the risk of diabetes.</li>
<li>High risk of developing cancer.</li>
</ul>
I would urge you to conduct your own research and reach your own conclusions. Please feel free to share any information or comments below.<br />
<div>
<br /></div>
Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com1tag:blogger.com,1999:blog-1374340721222686912.post-72923492269655608662017-06-16T06:00:00.000+10:002017-06-16T06:00:40.427+10:00HEROIC: Humility, Ethical, Resilience, Optimism, Integrity and Courage.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVPykXlowAQyDSS7asVR579WD9GKfW5EwnsFQer3hHs5P2guUXsGqWo-YF88yK4AH1MeFpJ8dzM0iP3o9aPkZXIXgBku7cM7ZaMYvvjMPwwLHsNYpyZuvbpLT_zaZ8f1Lel90y6K295tUP/s1600/a00441cce95e176c12351cacdb889e75.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1003" data-original-width="564" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVPykXlowAQyDSS7asVR579WD9GKfW5EwnsFQer3hHs5P2guUXsGqWo-YF88yK4AH1MeFpJ8dzM0iP3o9aPkZXIXgBku7cM7ZaMYvvjMPwwLHsNYpyZuvbpLT_zaZ8f1Lel90y6K295tUP/s320/a00441cce95e176c12351cacdb889e75.jpg" width="179" /></a>Whenever I feel doubts or at a loss as to what to do, which course of action to take and how best to fulfil my duties and responsibilities, I've always referred to this word "HEROIC" to give me a major boost of hope and confidence. It's an acronym that I formulated to keep me on the right path and out of trouble when I was young, hot-headed and arrogant. I hope that you will find it inspiring and helpful in your life.<br />
<br />
<br />
HUMILITY:<br />
<br />
"All streams flow to the Ocean because it is lower than they are. Humility gives the Ocean its Power." - Laozi<br />
<br />
"Humility is the solid foundation of all virtues." - Confucius<br />
<br />
"Humility is not thinking less of yourself; it is thinking of yourself less." - C.S. Lewis<br />
<br />
<br />
<br />
<a name='more'></a><br />
<br />
ETHICAL:<br />
<br />
"Ethical behaviour is doing the right thing when no one else is watching - even when doing the wrong thing is legal." - Aldo Leopold<br />
<br />
"Human dignity can be achieved only in the field of ethics, and ethical achievement is measured by the degree in which our actions are governed by compassion and love, not by greed and aggressiveness." - Arnold J. Toynbee<br />
<br />
"A man without ethics is a wild beast loosed upon this world." - Albert Camus<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbuNxj2kwhW8DuPC1TGe1AqpqbMvq_rLQkgC7WkhlrihWkJZKvGCxgbIUU0IKZ1fOsNRyLNmLITCAFjA_V6p6keexIrvdqMbettrhjG7nLjIP1shh7YHSBZ-YCiDaxRk2Ivc_J2B_sPUr_/s1600/3027bcc7dc042ccba56de55e899c07c5.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="749" data-original-width="500" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbuNxj2kwhW8DuPC1TGe1AqpqbMvq_rLQkgC7WkhlrihWkJZKvGCxgbIUU0IKZ1fOsNRyLNmLITCAFjA_V6p6keexIrvdqMbettrhjG7nLjIP1shh7YHSBZ-YCiDaxRk2Ivc_J2B_sPUr_/s320/3027bcc7dc042ccba56de55e899c07c5.jpg" width="213" /></a><br />
RESILIENCE:<br />
<br />
"Fall down seven times, get up eight." - Japanese proverb<br />
<br />
"I don't measure an man's success by how high he climbs, but how high he bounces when he hits bottom." - George S. Patton Jr.<br />
<br />
"Tough times don't last, tough people do." - Unknown<br />
<br />
<br />
OPTIMISM:<br />
<br />
"Optimism is a happiness magnet. Good things and good people will be drawn to you." - Mary Lou Retton<br />
<br />
"For every dark night, there is a brighter day." - Tupac<br />
<br />
"Turn your face towards the sun and the shadows fall behind you." - Unknown<br />
<br />
<br />
INTEGRITY:<br />
<br />
"If you have integrity, nothing else matters. If you don't have integrity, nothing else matters." - Alan K. Simpson<br />
<br />
"Integrity is choosing your thoughts and actions based on values, rather than personal gains." - Unknown<br />
<br />
"Your beliefs don't make you a better person, your behaviour does." - Unknown<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK5kS7Ml0WP7SKvGJUOes3VhieUcHJCHsBSYsyg6Zq08utGRZ4ejvNLPvMNfrjXqQFtIVaF4jzb3axUADsD8iD5e-_T4ADNqHB9ApfuH3fOR8rLpBxXyFrbVu0VtefLHM3n0TtauhjLvz1/s1600/d3b1542728b6f0dbbb5916e7fd139d9c.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="731" data-original-width="501" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK5kS7Ml0WP7SKvGJUOes3VhieUcHJCHsBSYsyg6Zq08utGRZ4ejvNLPvMNfrjXqQFtIVaF4jzb3axUADsD8iD5e-_T4ADNqHB9ApfuH3fOR8rLpBxXyFrbVu0VtefLHM3n0TtauhjLvz1/s320/d3b1542728b6f0dbbb5916e7fd139d9c.jpg" width="218" /></a></div>
COURAGE:<br />
<br />
"Courage is not the absence of fear. It is acting in spite of it." - Mark Twain<br />
<br />
"Courage doesn't always roar. Sometimes courage is the quiet voice at the end of the day saying, 'I will try again tomorrow.'" - Mary Anne Radmacher<br />
<br />
"It is curious that physical courage should be so common in the world and moral courage so rare." - Mark Twain<br />
<br />
<br />
I'd love to hear your comments, suggestions or inputs that you'd like to share. Thank you for reading!<br />
<br />
<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-76576664169478754442017-06-14T12:00:00.000+10:002017-06-14T12:00:04.699+10:00Time is an illusion -- it doesn't exist!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgOeBauggZjQJZ75HZC6RklSizLgMDECmUdlsO9VqxYoHlzI10oZXiz3_qxhOcLFWQQE_UfPxArPwsYXvgA8KOdFDajrQPCNJtSzWiIl178jGJEJ9H45rW2cYJ14jJDgJpXCEj9XIGiY/s1600/timewarp.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="By Craig Sunter from Manchester, UK (Time Warp) [CC BY 2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons" border="0" data-original-height="600" data-original-width="606" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgOeBauggZjQJZ75HZC6RklSizLgMDECmUdlsO9VqxYoHlzI10oZXiz3_qxhOcLFWQQE_UfPxArPwsYXvgA8KOdFDajrQPCNJtSzWiIl178jGJEJ9H45rW2cYJ14jJDgJpXCEj9XIGiY/s320/timewarp.jpg" title="By Craig Sunter from Manchester, UK (Time Warp) [CC BY 2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons" width="320" /></a></div>
<i>Can you describe what "time" is? </i><br />
<br />
Time is merely a concept -- devised by certain races of somewhat intelligent. It is a concept that was invented to measure and compare synchronicity to some <u>Known</u> reference point. Without this known reference point, time does not mean anything -- It doesn't exist!<br />
<br />
<a name='more'></a><br />
<div>
<b>Time Vs Simple Universe</b></div>
<div>
Let's make things simple. You were entering into a simple universe. In a simple universe, there would be -- nothing -- nothing at all, just you. The only way for you to tell "time" was by counting your breath. In and out, you counted one. In and out, you counted two: then three, four, five, and so on. The counting would go on such that you would be able to tell people outside how long you were in there. "I was in there for 1,478 breaths", you would say. Now, what happened if you fell asleep? How long were you in there? How long were you asleep? So, you, entering into that universe, you defined "time". Removing "you" from that simple universe, what was left, there would be "nothing" -- no "time".</div>
<div>
<br /></div>
<div>
<b>Twins clock-makers </b></div>
<div>
Two identical clock-makers, twins, one of them accepted an invitation from an extraterrestrial to travel to a distant planet, decided to make 2 identical clocks. These clocks were highly accurate as they were built using atomic-variation technology -- their clocks were beating at exactly the same frequency -- on Earth. The departing twin promised to return when his clock produced 5,000,000 beats. He, then, left. How does anybody know if their clocks would remain synchronised? </div>
<div>
<br /></div>
<div>
Sadly, the twins did not know about Einstein's Special Relativity theory -- timeframes of two moving bodies are always different -- one beat of the clock on Earth is not necessary equal to one beat of the clock outside the Earth.</div>
<div>
<br /></div>
<div>
<b>Apocalypse Earth</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPmCZ-fijWTzIzw10CrGAHoPrKPKv27Z9EO8WsxwpDBUfPtXIk07bAulELwnbl42YTv9UlRikIbejtPP_gnqnBmTKTYQ1Zk1X1iS1vQDYJEb45XpHEff5d7AUS7RcAEViGQ4u_nHES0_U/s1600/All_Gizah_Pyramids.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="By Ricardo Liberato (All Gizah Pyramids) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons" border="0" data-original-height="532" data-original-width="800" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPmCZ-fijWTzIzw10CrGAHoPrKPKv27Z9EO8WsxwpDBUfPtXIk07bAulELwnbl42YTv9UlRikIbejtPP_gnqnBmTKTYQ1Zk1X1iS1vQDYJEb45XpHEff5d7AUS7RcAEViGQ4u_nHES0_U/s320/All_Gizah_Pyramids.jpg" title="By Ricardo Liberato (All Gizah Pyramids) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons" width="320" /></a></div>
<div>
Humankind had been flourishing for many ten thousands of years on Earth. With the detection of on coming killer asteroids, they must leave to seek a new home. However, some chose to stay -- hoping to rebuild Earth if humankind survived. There would be a long process of rise-and-fall of many civilisations before humankind was restored. They both agreed to build several monuments around the world to send a message to future generations that: that once there was an advanced civilisation of humankind. They need to note the date, a reference point in time. How? Sadly, they realised there was no way to tell the distant future of humankind -- how long ago they were once here. Then they realised something else more important. So they inscribed the message. It reads:</div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: center;">
"Time is not important. What is important is Now."</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Have you got anything important to do? When are you going to do it? </div>
<div>
<br /></div>
<br />Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-65346898190730497892017-06-13T07:00:00.000+10:002017-06-13T10:47:27.708+10:00Exercises to help you build a Healthy Body and Mind - YOGA<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbY-BYXOxjaD_d6X_X3mjV9Favmqm1s9SjClhd-tJVyNGJzRilZR8QeBupdaYAuggDsEPIJcyoADp06py1BDXXO1jB1O-3bZd1Qo3susr0UXJR0G5spI7hxLKb6_BpGywGx9zU3pZoh4c5/s1600/IMG_6654.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbY-BYXOxjaD_d6X_X3mjV9Favmqm1s9SjClhd-tJVyNGJzRilZR8QeBupdaYAuggDsEPIJcyoADp06py1BDXXO1jB1O-3bZd1Qo3susr0UXJR0G5spI7hxLKb6_BpGywGx9zU3pZoh4c5/s200/IMG_6654.JPG" width="200" /></a>Yoga is a form of exercise that anyone can do. From the young to the old, male or female. You don't have to be super flexible to do yoga. For me, it was all about listening to my body about what I can and cannot do. So take it easy on your body and be in tune with it so that you don't inadvertently cause harm to yourself.<br />
<br />
<a name='more'></a><br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHVxqqB0fyUXA6PuoRQiV7H7CufLmWTN2fiMxo_czcVj1qwMBfwEPVYI_tMeptoF0JnwQBdY9uaM_n1-41O54ac6BzC0cFA37WjWTxhaegBJacWfc9eo8VI6nGXOih-e6zxQJqsohoq-op/s1600/IMG_6653.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHVxqqB0fyUXA6PuoRQiV7H7CufLmWTN2fiMxo_czcVj1qwMBfwEPVYI_tMeptoF0JnwQBdY9uaM_n1-41O54ac6BzC0cFA37WjWTxhaegBJacWfc9eo8VI6nGXOih-e6zxQJqsohoq-op/s200/IMG_6653.JPG" width="200" /></a>The reason that I took up Yoga was because I suffered excruciating pain on the heels of my feet. For months, I endured the pain. Outwardly, my heels weren't swollen or have any redness that I could see. Even walking short distances was just too much for me. I winced in pain and my face and body contorted with every step I took. I remembered consulting a doctor, my local GP. She wrote a prescription for a very strong painkiller and told me to come back and see her after 2 weeks if the pain didn't go away. Generally, I am a healthy person, I've never taken a Panadol for many years. Something in my gut feelings told me not to go ahead with this prescription as I don't want to become dependent on it. After many weeks, the pain just got worse and worse so I went to see another GP. This doctor told me that I need to get surgery as soon as possible. She told me that if I agree to this, she'll arrange for X-rays, etc. I told her that I need to think about it. The idea of cutting up my feet without having any facts or evidence about what caused the pain didn't make any sense to me. So I ran out of her consulting room as fast as I could.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsd2pryhpMVp8pXlT1x6QFrZ2fpQbobOy0H56VupA7rQGhABF6dYL3c8Fh2EiDIkOPG8dpMzfDRA_Y_YkhqUbsNyqNcZZY_LkUphoR-BWXYy6eF2mG0QgbIcqIi_ANPt8h1ypqZYNCjOkh/s1600/IMG_6655.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsd2pryhpMVp8pXlT1x6QFrZ2fpQbobOy0H56VupA7rQGhABF6dYL3c8Fh2EiDIkOPG8dpMzfDRA_Y_YkhqUbsNyqNcZZY_LkUphoR-BWXYy6eF2mG0QgbIcqIi_ANPt8h1ypqZYNCjOkh/s200/IMG_6655.JPG" width="200" /></a>By chance, I met a yoga practitioner who has been practicing yoga for 5 years. She noticed that I was limping as I walked towards her so she suggested that I do some very simple, gentle yoga stretches for 15 minutes each day and see if that can help ease the pain at the back of my heels. She said that all I need to have is a yoga mat. That was easy as I already have a very good yoga mat - Airex in my storage room. Before she left, she said to try the "Downward Facing Dog" pose in my 15 minutes routine for about 2 weeks and let her know my progress.<br />
<br />
I went home and Googled "Downward Facing Dog Pose", "Yoga", etc. I was overwhelmed with so much information from my searches and didn't know where to start. So I decided to listen to my body, I chose the gentle yoga poses that my body can handle without putting more strain on my feet. I choreographed my own set of yoga routine that was simple and easy to do and stuck to that everyday for 2 weeks. But instead of doing it once a day, I practiced this set of routine twice a day in the hope that I will regain the use of my feet soon.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9HzEf7MDJz6qOsS0DK4wij_VMvuqMgv-NtKrWupGMzpypaHiDS8svGzPjCv0xZSX9P6oAQJbuKc4ta7rJivofEhlgLTxdm2ltcK2KZYhIVaPHgd7wp9UZ8P73WpNCdCb7mOH2z_j5s0WC/s1600/IMG_6656.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9HzEf7MDJz6qOsS0DK4wij_VMvuqMgv-NtKrWupGMzpypaHiDS8svGzPjCv0xZSX9P6oAQJbuKc4ta7rJivofEhlgLTxdm2ltcK2KZYhIVaPHgd7wp9UZ8P73WpNCdCb7mOH2z_j5s0WC/s200/IMG_6656.JPG" width="200" /></a></div>
<br />
<br />
GUESS WHAT?!!! It worked. I am now pain-free. I can walk without pain. I can dance. I can run! I have my life back!!! HOORAY!!! I am very grateful to have met her that day.<br />
<br />
Up Next ... Check out my YouTube video of the Yoga Routine that I used and worked for me.<br />
<br />
Please leave your comments below and let me know if this was useful to you and any topics that you'd like me to blog about. Thank you so much for your support.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-43702447974560692642017-06-12T15:47:00.002+10:002017-06-12T15:47:28.138+10:00Numerology: Life Path Number - Why does it matter?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg180zSd4YViPBmuVkvFx_tw0RwVYvrb22-Z-YpHgcmpR_6e925g2wwpcr7ipsTCgV4imXvYYKGmkQOmtVpoPOBpAirPK_9OSZvB4ZFgLMXuk69O2YUyMwVinsNygvqdvyB7R0PD1UFNVY/s1600/The_Earth_seen_from_Apollo_17.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="By NASA/Apollo 17 crew; taken by either Harrison Schmitt or Ron Evans [Public domain or Public domain], via Wikimedia Commons" border="0" data-original-height="599" data-original-width="599" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg180zSd4YViPBmuVkvFx_tw0RwVYvrb22-Z-YpHgcmpR_6e925g2wwpcr7ipsTCgV4imXvYYKGmkQOmtVpoPOBpAirPK_9OSZvB4ZFgLMXuk69O2YUyMwVinsNygvqdvyB7R0PD1UFNVY/s320/The_Earth_seen_from_Apollo_17.jpg" title="By NASA/Apollo 17 crew; taken by either Harrison Schmitt or Ron Evans [Public domain or Public domain], via Wikimedia Commons" width="320" /></a></div>
In numerology, life path number is your birth date. It is also the most important number in numerology. <i>Why?</i> Why is (your) birth date has such the importance and play vital role in numerology? Can a person's life and destiny be determined just by knowing his/her birth date?<br />
<br />
<a name='more'></a><br />
To make things simple, let's start with a simplified model. Let's assume that you are a manager of some resort island in a far far away place. This resort island is such a beautiful place that it has many visitors throughout the year. As for you, the manager, with a curious mind, watching visitors come and go - <i>would you be able to read people based upon the date and time of their arrivals</i>?<br />
<br />
Would a person who arrive during a summer holiday be a tourist or visiting to do business? A person arrives in rainy season would probably be here on business -- coming here to work. Whereas, a visitor during a summer holiday would likely be a tourist. A rainy-day visitor, would likely be less friendly than his/her summer-holiday counterpart.<br />
<br />
Would a person arriving during snow season love winter sport and be a seasonal skier, or would he/she love swimming more? Would you choose to compete in running race against snow-season visitors or would you rather compete against summer-holiday visitors.<br />
<br />
Would a person who arrives at the beginning of school semester likely to be a teacher or a student, instead of a holiday maker? Would you be able to tell if a person who arrives late at night, travelled on a more urgent schedule? Whereas a person who arrives in a morning carefully planned his/her trip.<br />
<br />
How many percent would you bet if a visitor who arrives in spring have asthmatic illness and frequently suffered from hay fever?<br />
<br />
Now let's turn things around a little, let's imagine now that you are a visitor or a person in charge to send someone to this island, let's say your child - Jim. Jim is a fun lover type of a child who loves to swim and has asthmatic problem associated with hay fever. When would be the best time to send Jim to visit this island? Is summer good?<br />
<br />
How about Joe, your water irrigation expert. When would be best to send Joe to solve this urgent water-overflowing problem with the dam at the island? How about now! -- Like, this middle of the night?!<br />
<br />
Now, how about yourself? You have been working tirelessly all these days and have some saving, you need to go on a trip -- a trip to visit this wonderful little far-away island. How would you plan for your trip?<br />
<br />
Oh, by the way, let's imagine that this island is named "Earth".<br />
<br />
-- We all are travellers.<br />
<br />
What are your thoughts? Would love to hear from you.<br />
<br />
<br />
<br />
<div style="border: 1px solid; color: #1d2129; font-size: 14px; letter-spacing: -0.23999999463558197px; text-align: center;">
<a href="https://itunes.apple.com/au/app/numerologic/id1228016524?mt=8" rel="nofollow" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt=" Numerologic v1.0 on Apple's AppStore" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwMj4O5iR1AT-7QQK3hTDUJ40LOJeoE1Gr3eAoBzte5t0O_R2CPx7yOlwEZgAUn6nghGg5FtCe7PaJLLwtdmlJ4WoakwcxSvwaVRAAgkzwFy8VDq35R5hh-DkEIzXrxJEQcf173IDYszA/s1600/App_Store_Badge_160x80.png" /></a><br />
<div style="text-align: left;">
<a href="https://itunes.apple.com/au/app/numerologic/id1228016524?mt=8" rel="nofollow" target="_blank"></a><a href="https://itunes.apple.com/au/app/numerologic/id1228016524?mt=8" rel="nofollow" style="font-family: inherit;" target="_blank">Numerologic 1.0</a><span style="color: #1d2129; font-family: inherit;"> - user friendly and very easy to use tool to decipher numerology numbers; calculate life path, expression number, personality number, heart desire, show compatibility between persons, show daily numerological outlook, and more. Highly recommended for all numerologists and/or anyone with keen interest in unlocking the secrets of the numbers. Available now on the </span><a href="https://itunes.apple.com/au/app/numerologic/id1228016524?mt=8" rel="nofollow" style="font-family: inherit;" target="_blank">AppStore</a><span style="color: #1d2129; font-family: inherit;">.</span></div>
</div>
<span style="color: #1d2129; font-size: x-small; letter-spacing: -0.23999999463558197px;"><br /></span>
<span style="color: #1d2129; font-size: x-small; letter-spacing: -0.23999999463558197px;">This post is sponsored by Logical Software International P/L</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-67863787543821450532017-06-11T15:33:00.001+10:002017-06-12T13:33:42.462+10:00Pineal Gland - Biological Viewpoint as a Third Eye?<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOu97rmB8QOZhqXeVrFud67l3jtle62hd0GSYU9vvM6R2aWRQ61A8P8OT8uihbU-A7n0Qiq14kyGaTT-ihMJ4axTgv8JJBIRDdpXnor-Fac-ntL9UH_CXwoHtJVXGy0P2hnLuCC6Yuhg/s1600/senses-n-receptors.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="291" data-original-width="688" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOu97rmB8QOZhqXeVrFud67l3jtle62hd0GSYU9vvM6R2aWRQ61A8P8OT8uihbU-A7n0Qiq14kyGaTT-ihMJ4axTgv8JJBIRDdpXnor-Fac-ntL9UH_CXwoHtJVXGy0P2hnLuCC6Yuhg/s320/senses-n-receptors.png" width="320" /></a>Pineal gland, from the mythical viewpoint, is known as "The Third Eye". But, can we classify it as an eye?<br />
<br />
<a name='more'></a><br /><br />
Our eyes are parts of human sensory perception organs. Let's assume all sensory-perception organs possess these characteristics:<br />
<br />
<br />
(a) it detects some form of stimuli; (b) it is situated and is well protected within our body's compartment; (c) it has an opening that allows the receptor to intercept/detect the stimulus; (d) it has a core receptor unit; (e) information about perceived signals is transmitted via a medium or information bus -- a.k.a nervous system, and; (f) all information is processed at a central processing unit (CPU) -- for all cases, this is always the brain<br />
<div>
<br />
<div>
To test our assumptions, let's run them through some of our common-known and clearly understood sensory organs (we will leave other non-clearly understood senses, like sense of passing time, or spatial sense, etc, out for now).</div>
<div>
<br /></div>
<div>
Sight: (a) signal = light; (b/c) shield = eye socket and eye lid; (d) receptor = eye; and (e) nervous system = optical nervous system</div>
<div>
<br />
<div>
Sound: (a) signal = noise; (b) shield = skull; (c) ear; (d) receptor = eardrum; and (e) nervous system = auditory nervous system</div>
</div>
<div>
<br />
<div>
Taste: (a) signal = chemical reaction on surface of the receptor -- the tongue; (b/c) shield = mouth, teeth; (d) receptor = tongue; and (e) nervous system = taste reception neuron system</div>
</div>
<div>
<div>
<br /></div>
<div>
Smell: (a) signal = chemical reaction on surface of the receptor -- the nose; (b/c) shield = skull, nasal cavity; (d) receptor = nose; and (e) nervous system = olfactory nervous system (bulbs, neurons, etc)</div>
</div>
<div>
<div>
<br /></div>
<div>
Tactile Sense (touch, temperature, pressure): (a) signal = physical impact/force, temperature, moisture, etc; (b/c) shield = skin; (d) receptor = somatosensory system; and (e) nervous system = body nervous system</div>
</div>
<div>
<div>
<br /></div>
</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZAL8usoEUFB0R9334P4DtXYjWHqQwQLf5wmT5MDG4goKhcJ-54EdkNZrWE_qKToa3BL62JV3AoadNjv_MRTXbSN74Rp58g5b_PdTE7YsoUDr16cZ4ZQOIQzfWfZQZQz-Fy-Tqu71rjQ4/s1600/pineal-gland-and-brain.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="Henry Vandyke Carter [Public domain], via Wikimedia Commons" border="0" data-original-height="526" data-original-width="600" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZAL8usoEUFB0R9334P4DtXYjWHqQwQLf5wmT5MDG4goKhcJ-54EdkNZrWE_qKToa3BL62JV3AoadNjv_MRTXbSN74Rp58g5b_PdTE7YsoUDr16cZ4ZQOIQzfWfZQZQz-Fy-Tqu71rjQ4/s320/pineal-gland-and-brain.png" title="Henry Vandyke Carter [Public domain], via Wikimedia Commons" width="320" /></a>You see, all our common senses possess similar characteristics as outlined by our assumption above. What about the pineal gland? These are what we know: (b), it's shielded, it is well protected almost at the centre of our skull; (d) the receptor, in this case, of course, the pineal gland; and (f) the processing unit is always the brain.</div>
<div>
<br /></div>
<div>
Now for the unknown: what are the (a) stimuli or stimulus it detects? (c) What is the opening that exposes the receptor (the pineal gland) to detect the stimuli? What is (e) the nervous system that is used to transmit the information to the brain?</div>
<div>
<br /></div>
<div>
I am continuing study to answer the 3 questions above and will post update in the future blogs.</div>
<br /></div>
Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-13730099187972097492017-06-08T12:00:00.000+10:002017-06-08T12:00:11.292+10:00What is the most important thing in (start) learning martial arts?<script async="" defer="" src="//assets.pinterest.com/js/pinit.js"></script>
<br />
<table>
<tbody>
<tr valign="top">
<td><a data-pin-do="embedPin" data-pin-terse="true" href="https://au.pinterest.com/pin/537617274257367324/"></a>
</td>
<td><i>"What is the most important thing in learning martial arts?"</i><br />
<br />
<i>"Why?! Wingchun is girly and Aikido is for old people,". </i><br />
<br />
<i>"What is the first rule of learning self-defence & martial arts?" </i><br />
<br />
<i>"Winning <u>without</u> fighting", and if you must fight, </i><br />
<br />
<i>"Make sure you win first <u>before</u> fighting"</i></td></tr>
</tbody></table>
<div>
<a name='more'></a></div>
<hr />
I have been doing martial arts all my life. At a very young age, it was from mimicking heroes from martial-art movies. I fought and got myself into trouble at school - a lot! Strangely and ironically, I stopped unnecessary fights, when I started learning how to fight properly - learning Muay Thai. I, then, drifted between boxing, karate, kung fu, wrestling, and Aikido. 30+ years later with nidan black-belt in Aikido and a brown belt in Wing Chun, I was facing this question again when choosing a form of martial art for my kids - What is the most important thing in learning martial arts?<br />
<br />
When I started learning martial arts, it was all about fighting. Then it was comparing. Then a lot of research, a few victories, and lots of defeats and got beaten up, I started to discover: discipline, the codes, honour, friendship, and respect - the gems of martial arts.<br />
<br />
20 years ago, I moved from Thailand to Australia. After doing many years of muay thai, I was looking for something different. I have tried: kung-fu, wing-chun, karate, and aikido with different styles: Aikikai, Tommiki, Yoshikan, Iwama's takemasu. I walked in and out of many dojo's or kwoon. I remembered visiting one of the guys who was teaching tiger-style kung-fu. He asked me what (else) I was looking at learning. I told him that I was also interested in wing-chun and aikido. He chuckled and said,<br />
<br />
<i>"Why?! Wingchun is girly and Aikido is for old people,". </i><br />
<br />
I politely thanked him and never went back to his kwoon.<br />
<br />
<div style="text-align: right;">
</div>
Then, there was this guy who was renting Bayside City Council's town-hall teaching Aikido Takemasu. He offered first 3 sessions free! I went there and attended the first class. At the first class, he asked the question that nobody has ever asked (me) before -<br />
<br />
<i>"What is the first rule of learning self-defence & martial arts?" </i><br />
<br />
That was intriguing, I had never thought of this before. We all gave our answers, all incorrect. He answered:<br />
<br />
<i>"Never put yourself into a situation where you can be harmed", </i><br />
<br />
he said that this comes first, even, before:<br />
<br />
<i>"Winning <u>without</u> fighting", and if you must fight, </i><br />
<i>"Make sure you win first <u>before</u> fighting"</i>, etc, etc<br />
<div style="text-align: right;">
</div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://upload.wikimedia.org/wikipedia/commons/3/3f/High_kick_block.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" border="0" data-original-height="800" data-original-width="533" height="320" src="https://upload.wikimedia.org/wikipedia/commons/3/3f/High_kick_block.jpg" title="By Loura Conerney from Manchester, England (Flickr) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons" width="213" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Muay Thai's Kick</td></tr>
</tbody></table>
<br />
I asked him many questions comparing different art forms, he explained, but in the end he said:<br />
<br />
<i>"It was never about the art, it's always the person, not the art..."</i><br />
<br />
I ended up spent 12+ years with him learning the art of Aikido. Through his instruction, I learned to discipline body and mind, he taught me the Codes and Honour. Over the years, I gained friendship and then I learn <u>to</u> Respect (to yourself, your friends, your opponents and all the people around you). Some people spent their lifetime learning to fight and have never discovered these gems.<br />
<br />
<i>"Doumo arigatou gozaimasu - Thank you, sensei"</i><br />
<br />
So what do you think the most important thing in (start) learning martial arts is?<br />
<br />
<br />
<br />
<br />
<span style="font-size: x-small;">* Muay Thai's Kick, By Loura Conerney from Manchester, England (Flickr) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons</span><br />
<br />
<br />Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-70583072903590712452017-06-08T06:30:00.000+10:002017-06-08T18:29:18.718+10:00Exercises that help you to build a Healthy Lifestyle - Walking<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZfY3AQJiD6TBO1bbYaz5G2QhZ70S3tnHzwXOLcCGLlVsu_ohTsTDta3OTN9wHNzD7Hj-y240uFbtE3h097wOEKgLh2CauXouypJDFTvJF0GZngexgKyx5ZQCBlFBnWkVdstMzuGk_wVO8/s1600/Touche.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZfY3AQJiD6TBO1bbYaz5G2QhZ70S3tnHzwXOLcCGLlVsu_ohTsTDta3OTN9wHNzD7Hj-y240uFbtE3h097wOEKgLh2CauXouypJDFTvJF0GZngexgKyx5ZQCBlFBnWkVdstMzuGk_wVO8/s320/Touche.jpg" width="320" /></a>"Can I please go for a walk too?"<br />
<br />
WALKING is a form of exercise that is often overlooked by many people as it doesn't require a lot of logistics in terms of equipments, fashionable apparels, or endorsements from famous people. Whereas when compared to its more exotic, physically graceful cousin - YOGA, WALKING has a very "Humble, "Conservative" and "Quiet-Achiever" stereotype.<br />
<br />
<br />
<br />
<a name='more'></a><br /><br />
<br />
<br />
<b>Benefits of WALKING:</b><br />
<br />
<br />
<ul><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRTkFXSUksjOZJdxZJ41m4jUzzzbYPVfrVlaVztO7vHD0cZ9cxVFoMtZ7h3CONhSUNVX1g6MbVX8KEO1nuLrTyTNYF6MZOVENnC6fkHccAFEkPcichPuQW83CHDu_4WkFBQknVktJaG4c/s1600/walking-shoes.jpg" imageanchor="1" style="clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRTkFXSUksjOZJdxZJ41m4jUzzzbYPVfrVlaVztO7vHD0cZ9cxVFoMtZ7h3CONhSUNVX1g6MbVX8KEO1nuLrTyTNYF6MZOVENnC6fkHccAFEkPcichPuQW83CHDu_4WkFBQknVktJaG4c/s320/walking-shoes.jpg" width="320" /></a>
<li>Abundance of Fresh Air</li>
<li>Continuous change of sceneries</li>
<li>Affordability - only need to spend money on a pair of good, comfortable shoes</li>
<li>No subscriptions or memberships required</li>
<li>Don't need to maintain/upgrade or storage of equipments</li>
<li>Adjust your own speed and direction accordingly</li>
<li>Time flexibility. Choose any time of the day or night to go for a Walk</li>
<li>Reduces stress and anxiety</li>
<li>Walking can be used as a form of meditation</li>
<li>Improves your immune system and helps your metabolism</li>
<li>Improves your posture and mood</li>
<li>Reduces the risk of Alzheimer, osteoporosis, obesity and heart disease.</li>
<li>Gives a natural radiant glow to your skin and is long lasting.</li>
</ul>
<br />
<br />
These benefits can be shared with your walking companions, such as your pets - "Man's Best Friend".<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-62048891773988504802017-06-07T12:26:00.000+10:002017-06-08T18:30:04.424+10:00Top 5 Secrets to Losing Weight Fast and Within Budget.I know what it's like to have gained over 20kg after childbirth. Before giving birth to my first child, I was 50kg, 160cm tall and led an active lifestyle. Three months after giving birth to my daughter, I weighed at 72kg!<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaDipouWgsxhtChFUAjxvUgNhvfs41as43sE7vgAggFV-nCIxSS-KFl2NTGcnJAvTM0TWwbmCaquejxddGXvLGw6KKcTyRSjMrHUmNxQPxPxoRSOKe89RuD-JYhFF-yJhL4eC3DokWpN35/s1600/IMG_4456.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaDipouWgsxhtChFUAjxvUgNhvfs41as43sE7vgAggFV-nCIxSS-KFl2NTGcnJAvTM0TWwbmCaquejxddGXvLGw6KKcTyRSjMrHUmNxQPxPxoRSOKe89RuD-JYhFF-yJhL4eC3DokWpN35/s320/IMG_4456.jpg" width="320" /></a>This was such a shock to me that I experienced a period of depression and was unable to bring myself out for a short stroll, and perhaps to get some fresh air. I didn't like myself very much then. I remembered how I was huffing and puffing just to get up the stairs from the garage! Why was I feeling so out of breath? I guess, it was the diet that I got me ... mostly, biscuits, cookies and maybe a few pieces of fruits here and there.<br />
<br />
Now that I am back to weighing at 50kg, I feel that life is just more enjoyable and uplifting. How did I do it? I want to share these 5 secrets with you.<br />
<br />
<a name='more'></a><br /><br />
<br />
1. Stick to a ROUTINE. This is VERY IMPORTANT if you want to lose weight fast without putting a strain on your health or daily responsibilities. For example, your routine may be that you want to exercise 3 times a week, stick to that.<br />
<br />
2. Decide the type of PHYSICAL activities what work best for your body type and inclinations. For example, you may like swimming but not running, or walking but not swimming, etc.<br />
My only advice is to choose at least one activity that involves cardio type of work out, where you get to sweat a bit.<br />
<br />
3. Eat healthy. By this I don't mean that you can't have a cookie now and then. This is like depriving yourself of something you love ... then what is the point of living.?! I suggest that you have a balanced breakfast, lunch and dinner. This way, your mind doesn't crave for unhealthy alternative snacks all day and every day because it didn't get what it needs.<br />
<br />
4. Make it into a HABIT. Take one step at a time.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgmIIP3PloJNVr4GbXNmMJn7Mf0bKxacx188qa3dZ8Bj9Tu9iH3K8wPi_klwbvvh6NWfeMR36NoS1Ji2lBHt40FQp9Bsv5JhFZfLIzowYWO453sq1_d-PixcEuI4eJp3lTo_CShuvxBj6p/s1600/5Secrets.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgmIIP3PloJNVr4GbXNmMJn7Mf0bKxacx188qa3dZ8Bj9Tu9iH3K8wPi_klwbvvh6NWfeMR36NoS1Ji2lBHt40FQp9Bsv5JhFZfLIzowYWO453sq1_d-PixcEuI4eJp3lTo_CShuvxBj6p/s320/5Secrets.jpg" width="320" /></a></div>
<br />
5. Listen to your body. Take the middle path. Don't punish yourself or guilt-tripping yourself into doing something you don't want to do in your heart.<br />
<br />
It is such a beautiful day outside. I am off for my run.<br />
<br />
<br />
<br />
<br />Sphinxhttp://www.blogger.com/profile/04469268869484650689noreply@blogger.com0tag:blogger.com,1999:blog-1374340721222686912.post-32405115592771204172017-05-31T11:58:00.000+10:002017-05-31T12:15:31.458+10:00Pineal Gland - Biological Viewpoint<h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyBxhE0l1wGVmcRRVYEvv3kLyGQfmbb0ME9AS2abGMs91yoM0AGPCymQwo8MbjbVJIofhP7_Tt_rkfLnpNodRclD2kAeFSrQSLSlxM29ysiH-KKSDoZ1YQKMHEBGZiLC-kSw3m3C5LWSg/s1600/Illu_pituitary_pineal_glands.jpg" imageanchor="1" style="clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="259" data-original-width="400" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyBxhE0l1wGVmcRRVYEvv3kLyGQfmbb0ME9AS2abGMs91yoM0AGPCymQwo8MbjbVJIofhP7_Tt_rkfLnpNodRclD2kAeFSrQSLSlxM29ysiH-KKSDoZ1YQKMHEBGZiLC-kSw3m3C5LWSg/s320/Illu_pituitary_pineal_glands.jpg" width="320" /></a></h2>
<div>
<a href="https://www.blogger.com/blogger.g?blogID=1374340721222686912" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>What is the fuss that people are talking about this body organ that claims to give psychic super power ability?<br />
<a href="https://www.blogger.com/blogger.g?blogID=1374340721222686912" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><br /></div>
<div>
<a href="https://www.blogger.com/blogger.g?blogID=1374340721222686912" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>Follow this multi-parts study about this unique body organ that in pseudoscience it is dubbed as "the third eye".</div>
<div>
<a name='more'></a></div>
<div>
<b><br /></b></div>
<div>
<b>What is Pineal Gland?</b></div>
<div>
<a href="https://www.blogger.com/blogger.g?blogID=1374340721222686912" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>Pineal gland is a small endocrine gland in the vertebrate brain. It has a shape resembles a pine cone, reddish-gray in colour and is about the size of a grain of rice (5-8 mm) in humans. Located in the epithalamus, near the centre of the brain, the pineal gland is the only midline brain structure that is unpaired.</div>
<div>
<br /></div>
<div>
<b>Biological Viewpoint:</b></div>
<div>
<br />
As a member of endocrine system, it secretes its products, hormones, directly into the blood and delivered to the organs of the body - in this case, the nearest organs are the brain and the nervous system. The hormones produced primarily by Pineal gland are: melatonin and serotonin.</div>
<div>
<br /></div>
<div>
<b>Melatonin</b> regulates sleep and wakefulness (circadian rhythm). It is also associated with blood pressure regulation, seasonal reproduction, antioxidant, and immune system.</div>
<div>
<br /></div>
<en-clipboard></en-clipboard><br />
<div>
<b>Serotonin</b>, the happiness hormone, is thought to be linked to: the regulation of mood, appetite, sleep, and cognitive functions like memory and learning.</div>
<div>
<br /></div>
<div>
Sources:</div>
<div>
<ul>
<li>[1] <a href="https://en.wikipedia.org/wiki/Pineal_gland">https://en.wikipedia.org/wiki/Pineal_gland</a></li>
<li>[2] <a href="https://en.wikipedia.org/wiki/Endocrine_gland">https://en.wikipedia.org/wiki/Endocrine_gland</a></li>
<li>[3] <a href="https://en.wikipedia.org/wiki/Hormone">https://en.wikipedia.org/wiki/Hormone</a></li>
<li>[4] <a href="https://en.wikipedia.org/wiki/Melatonin">https://en.wikipedia.org/wiki/Melatonin</a></li>
<li>[5] Image from <a href="https://commons.wikimedia.org/wiki/File:Illu_pituitary_pineal_glands.jpg">https://commons.wikimedia.org/wiki/File:Illu_pituitary_pineal_glands.jpg</a></li>
</ul>
<en-clipboard></en-clipboard></div>
Apollohttp://www.blogger.com/profile/13616989272578009420noreply@blogger.com0