Tuesday, April 15, 2014

An old man once told me

Make more than costs.
Use wisdom to filter people, businesses and ideas.
Think long term.
Know when to cut losses and sunk costs.
Learn how to say no in a polite way.
Put yourself in the other person's shoes.
Learn the written and unwritten rules of the game you are playing.
Be honest with yourself.
Ask yourself whether you control the power, money, information and/ or relationship.
Think of all the possible risks first.
Don't be greedy.
See the world for what it is.
Forgive, but don't forget.
There are always options.
Follow the flow.
Trust your intuition.
There are times when you have contradictory thoughts, learn to make a decision based on the situation.
Learn to control your temper.
Follow the actions, follow the money.
Be punctual.
Listen 100 times more than talking.
Observe with your eyes, heart and mind.
Be humble because pride comes before a fall.
Work hard and smart in the direction of increasing happiness.
Use time wisely.
When you are down, remember who are your true friends.
Remember the people who tell you what you need to hear.
Learn to be yourself in all situations.
Preserve a balance.
Take care of what you eat, drink and breathe.
Exercise regularly.
Learn about trends.
Trust and verify.
There are times when everything seems out of control. Remember S.O.S. S for Stop, O for Organize, S for Securing resources.
Help the people around you become great.

Friday, September 20, 2013

Cyberduck and S3

I found the user interface of S3 a bit irritating:
Cannot rename files (capital letters in filenames and extensions kept tripping me)
Cannot easily move and copy files

Luckily, there's Cyberduck.

Go to your account and generate a access key ID and secret access key.

Start Cyberduck and select "Open Connection".

Select "Amazon S3" for the connection.

For username, enter the access key ID.
For password, enter the secret access key.

Click connect.

Hosting your own static site and mail hosting - Using Amazon S3, Amazon Route 53 and Zoho Mail

For fun, I tried using S3 to host our new site www.axo.sg.

Configuring S3 and Route 53 for static website hosting
Not exactly simple, but doable if you follow the steps slowly.

Configuring Zoho Mail
Go to the newly created hosted zone under Route 53.
Add the following mx records:
10 mx.zohomail.com.
20 mx.zohomail.com.

Wednesday, July 31, 2013

Notes from the Arduino SparkFun Inventor's Kit - Sketch 01 to Sketch 05

Arduino programs are called Sketches, which are uploaded to the board. They are written in Processing, which is a subset of C++.

Exercise: Sketch 01
Learning points:
Each Arduino board must have 2 functions - setup() and loop().
void setup() initializes the Arduino board. It only runs once.
void loop() is the function that runs continuously.

pinMode(pin_number, mode)
  e.g. pinMode(13, OUTPUT);
digitalWrite(pin_number, mode)
  e.g. digitalWrite(13, HIGH)
  e.g. delay(1000) // delay 1000 msecs

Exercise: Sketch 02
Learning points:
An Arduino can accept analog and digital inputs. We are using a variable resistor in this circuit.

  e.g. sensorValue = analogRead(sensorPin)

Exercise: Sketch 03
Learning points:
Putting "const" is like "final static" in Java.
The white LED has 3 pins for RGB, ranging from 0 to 767.

for (x = 0; x < 768, x++)

analogWrite(pin_number, int value)
  e.g. analogWrite( RED_PIN, redIntensity)

Example: Sketch 04
Learning points:
Arrays in Processing
  int ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9};

e.g. int index = random(8); // picks a number randomly from 0 to 7

Exercise: Sketch 05
Learning points:
Boolean logic using digital pins for input
Connect the pin of the pushbutton to GND and the other pin to a digital pin. Use a 10K resistor in between the pin of the pushbutton and the digital pin so that when the pushbutton is not pressed, the pin will read as "HIGH".

A == B
A != B
A && B
A || B

Exercise: Sketch 06
Learning points:
Using photoresistors

map(initial lower bound, initial upper bound, ideal lower bound, ideal upper bound);
e.g. map(0, 1023, 0 , 255) // map values from 0 to 1023 to 0 to 255
constrain(range of values, lower bound, upper bound); 
e.g. constrain(lightLevel, 0, 255)

Exercise: Sketch 07
Learning points:
Using temperature sensors
Do not connect the temperature sensor in the opposite direction (Vin to the GND pin of the temperature sensor)! The sensor heated up till over 260 degrees and I got burnt. Ouch..
Serial transmission

Serial.being(baud rate)
e.g. Serial.begin(9600) 
Serial.print(string or variable) 

Exercise: Sketch 08
Learning points:
Using servos
Importing libraries

#import <>

Exercise: Sketch 09
Learning points:
Using the flex sensor

flexposition = analogRead(filexpin);

The Gap - What haunts me daily

The gap between what I could be and what I am currently haunts me daily, incessantly, relentlessly.

Monday, July 29, 2013

Starting Arduino with Ubuntu 12.04

Bought an Arduino Starter Kit 2 days ago and started with the tutorials.

Note when starting Arduino on Ubuntu: If you are using Ubuntu 12.04, you do need to add Arduino as a user and restart in order to access the serial port.

It's fun to make LEDs light up =)

Hardware Product Design - FreeCAD

I used SolidWorks during my engineering days, but now that I no longer have access to SolidWorks, I had to find an alternative CAD software. Hopefully, something that runs on Windows and Ubuntu.

Just started using FreeCAD, which is not as user-friendly as SolidWorks, but I'm not complaining.

Coming from someone who has used SolidWorks before, I think the easiest method to get started was to watch the video tutorials on FreeCAD.

I started with a new document, under the "Part" mode (not "Part Design").

I found the menu a bit confusing. You have to choose the mode that you are in to access the tools.

For navigation, I selected the "Blender" navigation mode.

For rotation of objects and parts, I used "Edit -> Placement" and selected either Yaw, Pitch and Roll (google for the relevant axis of rotation).

I haven't tried "Assembly", which is similar to "Mate" in Solidworks, where you can align 2 parts to each other using either faces, edges or points.

Tuesday, June 18, 2013

3 free and easily available tools for usability testing

Problem Steps Recorder
Windows 7 comes pre-installed with "Problem Steps Recorder".
Go to "Start", search for "Problem Steps Recorder". Under settings, remember to set the number of steps as 100.

Allow remote access.

More for designers, but you can upload a screenshot and let your clients comment on the mockup.

Better than screenshots or emails, saves a lot of frustration.

Wednesday, June 5, 2013

Linux server admin - Adding user accounts, resetting passwords

When logged in as your own account and changing your own password:
$ passwd

As superuser (or root), changing the password for other accounts

Find out list of users
$ cat /etc/passwd | cut -d: -f1

Change password for account "guest1"
$ passwd guest1

Add users (with default configuration)
$ useradd guest1

Monday, May 20, 2013

Getting started with Android Studio on Ubuntu 12.04 - tools.jar missing

I tried installing and running Android Studio, but came across the error: "tools.jar missing from classpath. Please ensure that JAVA_HOME points to the JDK, not the JRE."

I tried the following:
Finding where java is installed:
  $: whereisjava
  $: java -version
  $: echo $JAVA_HOME
  $: echo $JDK_HOME

For Ubuntu, normally the openjdk version of Java is used.

Editing and saving ~/.bashrc
$: nano ~/.bashrc
JAVA_HOME =  /usr/lib/jvm/java-7-openjdk-amd64/
export JAVA_HOME
JDK_HOME = /usr/lib/jvm/java-7-openjdk-amd64/
export JDK_HOME

Reloading ~/.bashrc
$: source ~/.bashrc
$: echo $JAVA_HOME
$: echo $JDK_HOME

Check for the correct version of Java if you are like me, having both Java 6 and 7 installed.

sudo update-alternatives --config java

Choose the correct version of Java.