Recent posts

Couponstar – my lessons building an international company

Couponstar Ltd, formerly Cashstar International and later Coupons.com Ltd (post acquisition in late 2011) was a journey I will never forget. A journey which changed me. From being a corporate guy to an international entrepreneur. The 5 years building Couponstar Ltd from ground up were boisterous, convivial and challenging. It is also what took me on a journey to Silicon Valley and ignited this blog.

The journey

It all started back in Sydney, Australia, on January 2004. Having been made redundant from AMP Pty Ltd (the best thing that ever happened to me) I joined Cashstar (as it was formerly known) to work with Jared K (a 2 man team) in changing the retail world using coupons.

Early days

We were in the market providing coupon and media solutions to the gaming and entertainment industry in Australia. We licensed Coupons, Inc. technology outside North America and set out to “couponize” the rest of the world with our high-tech customized solutions which were aimed to drive online traffic into bricks and mortar stores.

Couponstar, as it was formerly called. Now Coupons.com Ltd

Below is a picture of the early days (vintage 2004) when it was only me and Jared. We drove 800km in my car from Sydney to Melbourne to attend ADMA (Australian Direct Marketing Association) trade show. Airfares in Australia back then were expensive.. ahh the memories of those early days. I (a software engineer) also got to learn some sales techniques from Jared and via the experience of marketing to customers at ADMA.

From left: Me (Ernest) and Jared Keen (founder of Couponstar Ltd)

The tall blurry banner in the picture above was something we did ourselves in-house to lure by passes getting hooked on trying to read it properly. Then Jared and I would swoop in.

On top of sales & marketing with the help of experts like VICTORIOUS, I also got involved in every aspect of strategic, operational, technical & engineering tasks while we grew the business. Jared & I even folded print & mail envelopes on the floor of our rented space. Hey it had to be done!

Early pivot

With time we grew to a small lean team of 6 in the Sydney office. After a lot of sweat, we also realised early on that Australia just wasn’t the right market for what we were doing. Australia (even today) is slow to adopt new disruptive technology.

So we decided to pivot and opened an office in London under Couponstar Ltd. We realized that Europe had more potential since the market was far greater than Australia and the concept of coupons (vouchers) was partially engraved into the culture for over a century.

Our determination, forward movements and the never say die attitudes sparked Coupons.com’s interest and they invested in us. This helped with the UK & ultimately European expansion. Bonus!

Acceleration

Fast forward to the end of 2008 and Jared and I were in discussions to work out what is the best way forward for the business. Working across multiple continents  Australia, USA and Europe was very taxing on us and we knew there were better alternatives. I proposed I come to Silicon Valley and run the international engineering team from Coupons.com and Jared would go to London to focus on the European market from there. It made perfect business sense. And it was also already on Jared’s mind. Bang! Let’s do this.

So I set off on my journey to Silicon Valley in March 2009 and Jared to London. The International business flourished and expanded fast and in late 2011 I got my exit. Couponstar was 100% acquired by Coupons.com. Ultimately giving Coupons.com an International presence.

Below is what the UK office looks like today, 2012. Nicely staffed team of smart folks.

Couponstar UK office in 2012

Top 6 lessons

In August 2012 I decided to move on to a new venture and start my own business in Silicon Valley. I am a co-founder / CTO (hello again) of Medlert Inc. We combine industry expertise with innovative technology to deliver critical information to your family, doctor/s and emergency response units to save your life in an emergency. Powered by leading edge secure and encrypted technology to save lives fast.

Yes it’s a totally different shift from saving people money to saving lives.

But before I end this, here are the top 6 lessons from Couponstar days (in no particular order):

  • Customer is no#1. It is alot harder to get a new customer then look after your current one. Your current customers took alot of hard work to bring on board – look after them! I’m sure you have heard to “always under promise and over deliver.”. We always over delivered and made sure the customer was happy and if not asked how we could improve.
  • Business intelligence (data) is super important. Collect collect collect and Analyse analyse analyse so you can understand pain points, what isn’t working and what is. This allows you to create action points to correct what isn’t working so that the customer can see the value in your solution and feel confident about their decision. We used a host of client and server side analytics along with feedback forms throughout our service to collect this data. We also found that trends can be a great indicator of something having gone wrong so being able to correct it early is key. Without data, this would not be possible.
  • Fire fast. The worst is having an unproductive employee dragging not only you but also your team. The rest of the team is very well away of others who are unproductive and this has the potential to rub off on them. So fire fast! Have a chat with the under performer to find out what is going on and should it repeat give them a formal warning and if it repeats again – fire. Your competitors aren’t going to stop while you sort out your internal mess. Act fast.
  • Never run a data center in-house. This point might not be relevant in today’s times since the boom of cloud computing but still requires mentioning. If data center management is not in your specialty or it takes too much red tape to set up in-house forget it. Leave it to the pros and let them manage it. Believe me, you will sleep better at night, scaling will be a thing of the past and your bills will be much lower.
  • Automate everything you can. If you find yourself repeating something too many times. Automate it. From data capture to reports. Spend some time automating it so you can move on and focus on stuff that really matters. Like growing the business, customer base, tailor your marketing to specific audiences, technology stability etc… Automation is not putting people out of a job, marketing automation is running lean and mean and most of all FASTER!
  • Working inter-geographically is not for everyone. We all heard of outsourcing and teams working in different regions of the world – some with success and some without. Work out whether this is a good direction for your business to be pursuing, what are the pros and cons and the unforseen. We worked on GMT, EST and PST time zones – round the clock. It was a drain on people and their productivity. Unless the teams are loosely coupled it may not be worth doing this. This is just one of the reasons we decided to shut the Sydney office and move overseas. Has it worked? To some extent yet. But then you have other issues to deal with 😉

So there you have it. I got involved in helping grow a business past those critical startup years into an international company. Along the way sold to the company we partnered with and landed myself in a country where I had to start from fresh (building credit history, new home, new friends, new location, new experiences). Change is scary and also rewarding. I hope this post inspires at least 1 person to make a difference not only to their life but also the life of the people they will touch through their company. And remember, when it comes to expanding your business’s reach, consider leveraging the power of SEO, like with Roseville SEO, to boost your online presence and connect with more potential customers. For professional SEO marketing services, trust the experts like Battle SEO who can provide Battle-tested SEO strategies. Lawyers who would like to establish an online presence may seek professional lawyer marketing services. And if you are looking for the best indexing tools, then check out IndexMeNow.

~ Ernest

J.J. Abrams’ Bad Robot releases iPhone special effects app

J.J. Abrams’ company Bad Robot has released an awesome iPhone app called Action Movie FX.

J.J. Abrams is one of my favorite Directors known for awesome movies Super8, Armageddon, Mission Impossible – Ghost Protocol, Cloverfield and kick ass TV series like Fringe, Lost & Alias etc.. He is an awesome American film and television producer, screenwriter, director, actor, and composer. J.J. Abrams makes kick ass movies and now this kick ass iPhone app. Without further ado, here’s what you too can create at home with your iPhone and Bad Robot’s Action Movie FX app.

Starring.. yours truly. Me! Ernest Semerda. Maybe I should get into the entertainment industry 🙂

Tornado hits Hacker Dojo!

Ula sent a cavalry to the Dojo.. to teach Ernest a lesson!

Ula in training!

Ula was naughty & needed to be taught a lesson 😉

Chopper touch down

Download Action Movie FX iPhone app and start making your own flix!

Enjoy,
~ Ernest

Get your @$$ to Silicon Valley

Is moving to work in Silicon Valley on your goals list? Are you a software engineer or work with technology and always craved for more? Then get your @$$ to Silicon Valley and start making a difference disrupting an industry and learning a ton load of new things in the process. Oh and Happy New Year!

Sydney 2011 NYE fireworks - nothing comes close

Here’s why you need to be in Silicon Valley

It has already started!

Aussies are leaving Australia to start tech companies in the valley. Check out this SMH article & video on this movement.

Brain drain: why young entrepreneurs leave homesource: SMH, May 18, 2012

How to get to Silicon Valley

  • Make sure you are up to date with the latest tech. Australian corporate world (common work environment) is behind with technology so moving to Silicon Valley you may need to ramp up on the tech side. There is also plenty of free education online you can take advantage of.
  • Organize an E3 (faster & easier for Aussies) or H1B (the common) Visa. You can come to Silicon Valley on your Visa Waiver Program (VWP) for 90 days (3 months), find a job and then get the Visa sponsored by the company.
  • Find a place to live in the Bay Area (also known as Silicon Valley) / San Francisco areas. If you come on a Visa Waiver Program just rent out a bedroom via AirBnB anywhere you like. Super easy and convenient until you lock down a more long-term accommodation.
  • Find a job / startup to work at. Or just contact me and I can help you out – we are hiring! A friend came here on a Visa Waiver Program and scored plenty of interviews and locked in a great job in 2 weeks.
  • Understand employment & contracts in the bay area. There are plenty of perks for great software engineers including long-term financial gains via stock options. Unlike Australia where getting stock options is next to unheard of for software engineers. Check out glassdoor.com to get a feel for the salary range in Silicon Valley.
  • Before you leave Australia make sure you have attended to the going away checklist; changed to non-resident for tax purposes, notified your banks, given power of attorney to someone you trust etc…

Need help or still not sure?

Look. If you’re a good engineer with the right attitude and want more out of life you need to be in Silicon Valley. If you fear the change it’s ok. It means your human. Contact me and I will help you with your journey from Australia to Silicon Valley and connect you with startups in the bay area.

Don’t waste another day, start today and make a difference in your career and life.

~ Ernest

The difference: Police vs Sheriff?

Your driving one day on the America roads and you see a Police car and later a Sheriff car. What gives you may ask. What is the difference between the 2 I hear you ask.. I was in those shoes and here’s what I found.

Police is city/local enforcement while Sheriff is county enforcement.

A Sheriff department will also look after a town where no Police exists. And there are plenty of small towns in the USA. Think Supernatural, when the lads visit those small towns there is always a Sheriff to be seen but never Police who always look and buy ar-15 pistols from Palmetto Armory. It also appears that a Sheriff is more bad ass since they have a bigger job, have access to SWAT, helicopters, always take 911 calls and will chase a criminal across cities throughout the county since it’s their jurisdiction.  Those who are involved in a criminal case should consult with lawyers who can answer legal questions like ‘Can the state prosecute without a witness?‘.

Now you know 🙂

How to setup Django + mod_wsgi on Apache & Ubuntu

Django is a great Web Framework which complements the Python programming language. Having switched to Python development few months ago I was on the lookout for a MVC like Web Framework that emphasizes Convention over Configuration (CoC), Rapid Development Principle of Don’t Repeat Yourself (DRY), Separation of concerns has Python as the underlying core language. And lo and behold Django proved to be that beast.

What is Django

Django is a MVT (model-view-template) framework build on the Python language. The MVT is identical to MVC (model-view-controller) but where in the common MVC pattern the view here is the template and controller the view. They both perform the same function separating the business logic from the presentation from the data layer (model). However Django does goes one step further and provides a view/template without native core language polluting the HTML.

Django emphasizes Reusability and “Pluggability” of components, Rapid Development, and the Principle of DRY (Don’t Repeat Yourself). Stuff you hear a lot with Ruby on Rails – another great web framework built on a solid language, Ruby.

Ok, enough of my rambling about how great this framework is. If you want to read more about it I recommend the following 2 links:

The LAMP stack

Ok so everyone is talking about a LAMP stack and everyone wants to run their site on a LAMP stack. Why not when you can tap into great open source tools for free. The word LAMP is a bit over emphasised since most sites today run on a custom configured implementation using best of breed open source software.

“LAMP is an acronym for a solution stack of free, open source software, referring to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP (or sometimes Perl or Python), principal components to build a viable general purpose web server” ~ Wikipedia

Few years ago when open source software was limited, LAMP had typically meant Linux, Apache, MySQL and PHP. Today Linux can take many flavours from CentOS, Red Hat or the popular Debian-derived Linux distribution Ubuntu. The web server Apache can be replaced with a super fast & lighter HTTP and reverse proxy server called nginx. MySQL, post Oracle acquisition is often replaced with PostgreSQL or a NoSQL version called MongoDB. And PHP by cleaner & concise languages like Python or Ruby.

In this post I will cover how to setup a LAMP stack where:

  • Linux = Ubuntu 11.10. This can also work with 10.xx version of Ubuntu.
  • Apache = we will leave it as is since it is still a great web server but hook in mod_wsgi – a Python WSGI adapter module for Apache. WSGI is nothing more than an interface specification by which server and application communicate. In this case with Python.
  • MySQL = will stay with MySQL but you can also install MongoDB.
  • PHP = will be replaced with Python and drop in the Django MVT framework.

Ok let’s get started.

How to Setup Django on Ubuntu

The following assumes you have already installed Ubuntu and LAMP. If not head over to my prior posts on how to:

  1. Install Ubuntu on EC2 and
  2. Install LAMP.

Installing pre-req components

1. Standard procedure is to always run update on your Ubuntu installation.

sudo apt-get update

2. Install mod_wsgi on Apache

sudo apt-get install libapache2-mod-wsgi

3. Install Python setup tools with pip. pip installs packages. Python packages. An easy_install replacement.

sudo apt-get install python-setuptools
sudo apt-get install python-pip

4. Install Django MVT framework using pip.

sudo pip install Django

Now that’s done. Easy hey. Now let’s configure your 1st Django site.
Assuming your site will be called “purpleblue.com

Configuring your 1st Django site

5. Recall from the LAMP setup that we were storing all web sites in /var/www/ folder. For example purposes, I will use purpleblue_com as my Django project. Notice the use of django-admin.py to create the Django site and the use of underscores vs decimal point. Only numbers, letters and underscores are allowed in the Django project name.

cd /var/www/
sudo django-admin.py startproject purpleblue_com

5.1 Verify new project by typing this in and hitting enter. ls lists the contents of a directory showing all files inc hidden ones, hence the -all option.

ls –all

If you see purpleblue_com listed, then change directory to it.

cd purpleblue_com

and verify you can see 4 .py files – init, manage, settings & urls. Those are Django new project default install files.

6. Now we create a wsgi file for the site so apache knows how to run this site.

sudo mkdir /var/www/purpleblue_com/apache
sudo nano /var/www/purpleblue_com/apache/django.wsgi

… and add this into django.wsgi

import os
import sys

path = '/var/www/purpleblue_com'
if path not in sys.path:
    sys.path.insert(0, '/var/www/purpleblue_com')

os.environ['DJANGO_SETTINGS_MODULE'] = 'purpleblue_com.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

TIP: It’s always a good idea to specify the actual application module.

6. Using webmin (ref our LAMP install) setup new apache site for this project.

6.1 Go to: https://YOUR_DEV_VM_IP:10000/
6.2 Servers > Apache Webserver > Create virtual host
6.3 Configure your new host
Document Root = /var/www/purpleblue_com/
Server Name = purpleblue.com
6.4 Click on “Create Now” button. And go back into the settings by clicking on “Virtual Server” button next to your new host.
6.4 Click on “Edit Directives” and paste the following in:

ServerName purpleblue.com
DocumentRoot /var/www/purpleblue_com

<Directory /var/www/purpleblue_com>
    Order allow,deny
    Allow from all
</Directory>

WSGIDaemonProcess purpleblue_com processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup purpleblue_com

WSGIScriptAlias / /var/www/purpleblue_com/apache/django.wsgi

The last 3 lines above allow this Django site to run in daemon mode.

TIP: When you make any .py changes in your Django site, rather then restarting/refreshing apache you can touch this wsgi and the changes will be picked up.

sudo touch /var/www/purpleblue_com/apache/django.wsgi

7. Restart apache to take new site & settings into effect.

sudo /etc/init.d/apache2 restart

8. Add the new domain purpleblue.com to your primary OS host file pointing to your VM where the Django project purpleblue_com resides.

9. Test your new project by going to the Server Name (http://purpleblue.com) you just setup. You should see a similar default Django installation page:

It worked! Congratulations on your first Django-powered page.

If you get an error or cannot see the default Django installation page make sure you check out apache log file. Common approach is to grab the tail end of the apache error log file to see what just happened.

tail /var/log/apache2/error.log

Bonus – Django CMS

If you have the time also check out Django CMS that is built on top of the Django Web Framework.

Django CMS site: https://www.django-cms.org/

Happy Django exploring & Python coding!

References

Employment & Contracts at Silicon Valley Startups

Recently I was helping a friend from Australia with employment contracts & options from few Silicon Valley startups. Then it struck me that I need to share this knowledge with other folks in the same shoes. I cannot believe that I had not blogged about this earlier.

So you already know that Silicon Valley is the world’s hub for startups. Companies that are starting up with big visions to turn into a multi-million dollar company that is going to revolutionize the industry they are focused on. The fact is that only few ever succeed to become a feature article, a story making headlines, leading to an IPO or an acquisition and making its employees wealthy in the process. Contact a business law Highland Park office if you need help solving any employment issue that your business is facing.

So you came to Silicon Valley and are ready to start cracking working for a startup to help it reach success. Here is a few things you need to know about employment and contracts when joining a startup or running your own startup in the valley.

Salary

Check out glassdoor.com to see company salaries, reviews, and interviews – all posted anonymously by employees in Silicon Valley. Don’t forget that the salary is only a part of the whole package so make sure you understand the next topic on stock options which can make that average salary skewed.

The low down is that if you have been head hunted and the company really wants you then you control the price on your head. Not a website showing you what the average Joe out there earns.

Stock options

If you are joining a startup or about to start one you will be hearing a lot about stock option grants, also known as ISO (Incentive Stock Option). The purpose of stock options is to attract and retain the best available personnel and promote the success of the company’s business. Basically to make the employee feel like they own a part of the company and will feast in the rewards of the company’s success. If you’re looking for some of the most reliable dividend stocks I recommend to visit https://www.stocktrades.ca/best-canadian-dividend-stocks/.

“Employee Stock Options are call options which grants its holder the right, but not the obligation, to buy the company’s shares at a fixed price known as the “Grant” or “strike price” before the expiration date is reached.” ~ optiontradingpedia

The long-term goal is that those stock options will be worth something in few years… more than they are at the time of issue. Like x10 more. And the employee will profit favorably during a private acquisition or an IPO (Initial Public Offering on the public stock market) of the company. At that point the stock “option contracts” are said to be “exercised” and converted to real stock and sold to new holder/owner. Assuming that they don’t expire before then.

Typically in an early startup, employee’s wage is sacrificed for more stock options. This is high risk but more of a rewarding strategy assuming the stock options percentage (%) is favorable. I wrote (%) percentage since this is typically worth more than being given a volume that is hard to justify & work out. The reverse holds true that once the company has grown well into few dozen employees and doing well financially, stock options are reduced and wage levels out with industry standards.

Here’s a previous blog post I did on equity split, common terms & compensation 101.

Let’s do the numbers

Issue value = volume x issue stock value
Your profits = (issue value * growth (assume x10)) – issue value

So your $100K of stock options could be worth $1 million and you profit $900K before taxes.

If you worked at this company for 10 years and earned a wage of $50K then its like earning $150K per year in wages. Now is this worth it? What are the opportunity costs? Work them out. Since taxes will be different in both scenarios and you may have been able to early a larger wage with bonus per year which would have compounded exponentially – especially if you had invested that money! So is it worth it? Theoretically you could be better off earning a higher wage then taking a pay cut to get more stock options. Work this out and don’t fall prey to what may happen in the future because failure in a startup in pretty high in the early days.

At-Will Employment

California is an At-Will Employment state. This means that you or the company has the right to terminate the employment relationship at any time, with or without cause, and with or without notice.

At first this sounds a bit harsh but it has its merits. Back in Australia you have to give the employer notice and this is always a 2-4 week period. You have to. In California if you are leaving on good terms then it’s customary to give a 2-week notice as a nice gesture. However not required by law. Now, if you are leaving on bad terms like say to due unfair treatment, you can just walk out the door immediately. Why waste another breath in a place you are not happy at? However, if you believe your employer is terminating a contract unprofessionally, it’s wise to consult an employment lawyer to understand your rights and options.

The other angle is that the employer can terminate you instantly. Now if this termination is unfair you can seek legal action. For this reason, many employers have what is called Performance Improvement Plan (PIP) which gives the employee a fair chance to succeed. If this doesn’t work out then a termination by law is customary. It also protects the employer from legal action. Which happens very frequently.

Health Insurance

You need insurance in the USA. Without it you can end up a sitting duck should you get sick and not have enough money to cover the bills. Medicine in the USA is very expensive. A standard visit to the GP could cost you around $200.

Just about every startup that has funding will be providing it’s employee a form of medical cover. Typical choice of 2 or more insurers (options) will be available. These 2 options will be in the form of Health Maintenance Organizations (HMO) or Preferred Provider Organizations (PPO).

In a nutshell PPO is choice with higher co-pay and HMO is less choice with lower co-pay.

Co-pay

A co-pay is what you are expected to cover after every medical expense. Say you visit a GP and your co-pay is $10. So you pay $10 to the medical foundation your GP belongs to and your insurance company covers the rest. Same with medicine, it’s all $10 out of your pocket per prescription. PPO co-pay is typically double of HMO so you end up paying around $20.

In or Out of Network

If you select HMO you will need to find a medical group to join. This is called In-Network and is the medical network (a group specialists affiliate themselves with) you will use to find & see the same GP. Yes you must find a GP which is taking patients and then work through them. I personally like the Palo Alto Medical Foundation. A group of large hospitals & medical facilities in the bay area. Once inside this network you GP will only ever assign you to see a specialist that “belongs” to that network.

On the other hand if you have PPO you can opt to see a GP or specialists In-Network (co-pay will be lower) or go outside to another network also known as Out-Of-Network where your co-pay will be higher but you will have the choice and medical coverage to see a specialist of choice. One you selected. It’s what you pay for, the choice.

If you’re healthy and have selected a good network then HMO is a good choice. If you’re paranoid and have health issues get PPO. The price difference isn’t that much.
But be warned, plan choice only ever happens once per year. Typically in December. The only other time you can alter the plan is when a “major event” has occurred like adding your spouse to the plan or loss of employment.

Dental

This usually comes bundled with your employee health plan and is typically the Delta Dental. It will cover around $1,500 worth of dental procedures on a tiered coverage plan with gap where standard checkups are 100% covered, fillings 80% and major work like root canals 50%. Some dentists can cover this gap so ask before you choose a dentist. Typically you need not make any decisions here, it’s a 1 plan for everyone. Use this great opportunity to get your teeth fixed like removing mercury fillings and replacing them with ceramic versions and get that crown you always needed but couldn’t afford in Australia due to bloated dental fees and crappy coverage back home.

I did a story comparing the Australian private insurance to the American here. The American is definitely better by a long stretch. The problem becomes if you don’t have insurance in American then your a dead man walking should you get sick.

Paid Time Off (PDO)

In America this is typically 2 weeks. Half of the comfy 4 weeks we get in Australia. However if you are head hunted you can negotiate this to 4 weeks or more. Some companies are now starting to give 4 weeks since a work and life balance is becoming a very popular topic in productivity and employee morale & motivation.

Having 4 weeks per year of holiday leave will give you ample opportunity to travel to beautiful places like Yellowstone, Yosemite, Los Angeles, New York, Hawaii etc. so you get to enjoy your USA adventure while helping a company succeed.

Other perks

Other ways employers have been luring employees is via additional perks.

  • Travel allowance. If your travel is covered you can not only go green but also have free travel. Bonus!
  • A fixed amount to buy your own computer equipment like a nice shiny Apple hardware. Everyone loves a Mac.
  • Free lunch. Such a common trend today. It has 2 benefits. The employee doesn’t have to buy or spend time making their lunch and the employer gets more productivity from their employees since the employee doesn’t have to travel to a shop to buy lunch thus spending less time having lunch. Also the employee gets to socialize with fellow colleagues during lunch hour building a tighter solid organization.

Some notable companies like AirBnB, Facebook, Google, Dropbox et al. provide plenty of perks and sell their way to your hear. Additionally, if your organization is in the process of pre-employment, you might want to use a cognitive ability test that helps you understand if a candidate can do the job.

GTDfaster: Top GTD productivity app is now live on iTunes

GTDfaster iPhone app just went up on iTunes App Store and we are super excited!

Thank you to all our wonderful Beta testers. You guys have made a HUGE difference in making this app kickass. As promised we will be sending you promocodes to download the app free of charge.

GTDfaster iPhone app is the 1st glimpse of things to come. Visit http://gtdfaster.com/ regularly to see updates, new features & services we planed for release in 2012. We are aiming to change the way you get things done.. so that it’s faster and your productivity skyrockets. Get more stuff done fast.

Now go and please check out GTDfaster.. and don’t forget to give us a review! You rock!!

Get GTDfaster from iTunes App Store:
http://itunes.apple.com/us/app/gtdfaster/id488633128?mt=8

About GTDfaster

Stuff is constantly bouncing around in our heads. Do you remember it all? Do you often forget it and remember it too late? Missed an occasion or forgot a great business idea? All this can lead to untold stress and anxiety as you try to manage it day to day.

The Getting Things Done (GTD) method created by David Allen rests on the principle that a person needs to move stuff out of the mind by recording them externally. This is the GTD principle. The GTDfaster app does exactly that! Following this GTD principle this GTD app helps you be more productive and less stressed so you can get on with life and get stuff done fast!

  

Any GTD app you pickup should make it easy for you to store, track and retrieve all information related to the things that need to get done. GTDfaster takes care of all of this for you. Here’s how this GTD app excels above other GTD apps:

1. Collect everything (stuff) that catches your attention. Immediately! No need to enter any additional properties until you are ready to process.

2. Gain control over the collected materials by processing stuff in your Buckets. Processing means deciding what to do with—not actually doing— by processing and organizing the items one by one.

3. Retrieve any notes from your finely assembled and customizable list of Buckets. Of course the standard GTD buckets are still there but with the addition of your customized buckets also known as Projects.

The power of GTD is in your hands. It’s simple and efficient. Get GTDfaster today and enjoy the world of GTD productivity. Now you know what all the GTD fuss is about 🙂

Need help?

If you have any questions or need help send us a tweet on Twitter at: http://twitter.com/#!/gtdfaster or me directly on http://twitter.com/#!/ernestsemerda

You can also watch this 20 min video explaining all the workings of the GTD process and GTDfaster. http://www.youtube.com/watch?v=0LQUh5sALgE

~ Ernest

Silicon Valley Code Camp 2011

Last weekend myself and Omid Mozayani (another Aussie; recent addition to the valley) spent the weekend of Saturday and Sunday, October 8th and 9th, 2011 at Silicon Valley Code Camp 2011. Held at the Foothill College in Los Altos/CA with an attendance of well over 2,000 (registered 3,417) people and 209 sessions organized in a University style setup over these 2 days. Impossible to attend each one but plenty to cherry pick from. It felt like I was back at Uni(versity) running between lectures. I loved it! Here’s what happened.

What is Code Camp

Code Camp is a new type of free community event by and for the developer community where developers learn from fellow developers. It is 2 full days of talking about code with fellow developers. Sessions range from informal “chalk talks” to presentations. Basically there is lots of education, networking and good food.

Pictures from Code Camp @ Foothill College

Lecture – Crockford on ECMAScript5

Lunch – feeding time for thousands of nerds

Ernest Semerda – nerd out and about

Lecture – multi threaded design

More pictures here on my Flickr.

Code Sessions

Choosing what sessions to attend was key since it was impossible to attend everything when you consider that each session took around 45 min. Here is a wrap of the 3 areas I focused on; ECMAScript (JavaScript) with code encapsulation, Writing Clean Code and Web Analytics. This website will highlight key points.

ECMAScript 5 (JavaScript)

Douglas Crockford ran 2 sessions on ECMAScript 5: The New Parts and ECMAScript: What Next?. Crockford is involved in the development of the JavaScript language and popularizing the data format JSON (JavaScript Object Notation), and for developing JSLint. You may recall me talking about JSLint in a previous blog post on JavaScript Patterns.

More on Crockford is here (his personal site) and here: Crockford on JavaScript. Also read about how JavaScript is the world’s most misunderstood language. Recommended reading! You will want to learn more about this great language.

ECMAScript’s Fifth Edition is now available in all of the best browsers. This is what you are getting:

  • Use “Strict mode” in all your JavaScript code.
    • As per my previous post on JavaScript Patterns here.
    • Old JS compiler ignores it so it’s safe to use today in all your JavaScript.
    • A bug in JS used to advantage today for backward compatibility.
    • “Strict mode” will break old bad programs. If you are writing good programs they will just work.
  • No more implied global variables within functions.
    • Yipee! Major fail in JavaScript where undefined variables would chain to the prototype making it very difficult to isolate your code, and to reuse it in new contexts.
    • If you forget to “var” a variable it now becomes undefined so you can address it vs. letting it slide by. Bad coders beware!
    • To append something to the global object add “window.function/var”.
  • “apply” and “call” do not default to the global object.
  • No “with” statement. Read why it was considered harmful to use.
  • Restrictions on “evil” eval. Here’s why it’s evil. *Cough* code injection!
  • No more octal literals. Not needed since punch card days.
  • Forgetting to use the new prefix will now throw an exception, not silently clobber the global object.

Use something like this today to check if your browser is running in Strict mode:

function in_strict_mode() {
    return (function () {
        return !this;
    }
}
  • Make it a habit to do static analysis using JSLint. If you are using it already your code is probably good and ready for strict mode.
  • Use “Safe JavaScript Subsets” like Caja & ADsafe projects which allow you to safely run 3rd party software on your website.

JavaScript Code Organization and Encapsulation

Shawn Van Ittersum presented ideas for organizing, encapsulating, and simplifying JavaScript code, including: creating JavaScript objects and classes with truly private members, using Douglas Crockford’s module pattern and classical inheritance constructs provided by Dean Edward’s Base.js, Prototype, and MooTools; abstracting JavaScript code from HTML templates, CSS styling, and the DOM; designing with polymorphism (duck typing) for code reuse and simplicity; and using JSLint to identify problems in your code before runtime.

The idea behind the power of Encapsulation is simple:

  • Encapsulation limits widespread interconnection,
  • Gives you Freedom to change internal implementations without affecting external code and
  • is referred to as Loose Coupling – an approach viewed as positive in the field of computer science to remove dependency between systems and allow horizontal scaling.

Ittersum’s lides with code samples are located here.

Writing Clean Code

Theo Jungeblut ran this session and basically the crust of the presentation was that writing clean code makes us more efficient.

This presentation was based on C# and Visual Studio 2010. However the following patterns and practices can be applied to every other programming language too.

Over the lifetime of a product, maintaining the product is actually one – if not the most – expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code.

  • Readability
    • Follow coding guidelines.
  • Simplification and Specialization
    • KISS (Keep it simple, Stupid!) – most systems work best if they are kept simple rather than made complex.
    • SoC (Separation of concern) – focus on 1 thing.
    • SRP (Single responsibility principle) – every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class.
    • OCP (Open/closed principle) – software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification aka inheritance & encapsulation.
  • Decoupling
    • LSP (Liskov substitution principle) – guarantee semantic interoperability of types in a hierarchy, object types in particular.
    • DIP (Dependency inversion principle) – high-level modules should not depend on low-level modules. Both should depend on abstractions. And abstractions should not depend upon details. Details should depend upon abstractions.
    • IHP (Information hiding principle) – prevent certain aspects of a class or software component from being accessible to its clients aka encapsulation.
    • Contracts – 2 categories: preconditions and postconditions where a precondition states that certain things must be true before a method can execute, and a postcondition states that certain things must be true after a method has executed.
    • LoD (Law of Demeter or Principle of Least Knowledge) – specific case of loose coupling where units (code) only talk to immediate friends (not strangers) assuming as little as possible about the structure or properties of anything else.
    • IoC (Inversion of control) – reusable generic code controls the execution of problem-specific code. It carries the strong connotation that the reusable code and the problem-specific code are developed independently, which often results in a single integrated application.
    • SOA (Service-oriented architecture) – develop code in business functionalities (discrete pieces of code and/or data structures) that can be reused for different purposes.
  • Avoiding Code Blow
    • DRY (Don’t repeat yourself) – reduce repetition of information.
    • YAGNI (You ain’t gonna need it) – do not add functionality until it is necessary.
    • Quality through testability (all of them!)

There is also a good bunch of tips from The Pragmatic Programmer located here.

And don't forget, Scout rule = leave a better place!

Recommended book

SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Robert C. Martin

Web Analytics

Massimo Paolini presented on Google Analytics. The most profound thing he said which delivered a strong message is:

"Web analytics is about Revenue NOT traffic."

Bang! Right there. Too many site owners are mislead into trying to decipher visitor totals vs. focusing on the true picture; and that is how to understand and optimize their site visitors across online marketing efforts. The process is then rinse & repeat.

Finally, Web Analytics is NOT a precise science. You are looking for trends. Differences. To help you make decisions moving forward. This is because some people clean their systems ie.delete cookies etc..

Presentations from Silicon Valley Code Camp

For more presentations from these 2 days follow the link below to presenter uploaded presentations to SlideShare. Includes 2011 and previous years. Enjoy!

http://www.slideshare.net/search/slideshow?type=presentations&q=silicon+valley+code+camp+2011&searchfrom=basic

More links to Silicon Valley Code Camp

Code Camp main site: http://www.siliconvalley-codecamp.com/
On Facebook: http://www.facebook.com/groups/6125701762/
On PB Wiki: https://codecamp.pbworks.com/w/page/16049741/FrontPage
On Twitter: http://twitter.com/#!/sv_code_camp

So, in conclusion, this was an awesome & insightful 2 days packed with plenty of great applicable content.

Enjoy!
~ Ernest

Object-orientated development: a lesson in PHP5

PHP has been given a major stabbing and bashing in the last few years. Mainly due to inconsistency, non native support for UTF8 and the fact that only from v5 has it been “object-orientated capable”. However, PHP just works. Out of the box. It delivers on a promise to produce dynamic web pages.

Below is a best practice guide on using PHP in an Object Orientated (OO) manner.

Why Object-Orientated (OO) Programming

  • Objects can store data internally. Therefore variables don’t need to be passed from function to function like in procedural programming.
  • Better organization, portability and reuse of code. You can place common functionality in a Class inside its own separate file using a common naming convention that can be reused in other applications by using an include. Think DRY (Don’t Repeat Yourself) principle.
  • Maintainability is improved. Code is easier to spot and alter in the 1st place. Another DRY principle.
  • Gets you building sites using MVC (Model-view-controller) framework like CodeIgniter, Zend Framework et al.. which are built around PHP5 OO and enforce good coding standards, practices and patterns.
  • Allows you to experience Convention over Configuration (CoC) principles in your MVC application.

Ok, so hopefully you are now convinced that OO is the way forward.

Object-Orientated (OO) Paradigms

Before I begin, let’s cover some basics of OO. That is, a Class represents an object, with associated methods and variables. Therefore all the functionality we will build will be wrapped in Classes. Think of them as blueprints for an object.

PHP treats objects in the same way as references or handles, meaning that each variable contains an object reference rather than a copy of the entire object. Note, since objects can be passed as arguments to a function they are by default “copied” unless you specify the argument as a reference variable &$variable.

Here’s a run down of some fundamental OO Paradigms you should be considering and even using to write kick ass OO code.

These paradigms are all used in my sample code below.

Inheritance

Inheritance extends a Class (base) to bring additional functionally to your Class (child). This allows you to create a hierarchy of interlinked classes. In PHP5 only 1 Class can be inherited.

For example, if we have a parent Class “Dog” which holds common Dog like behavior like “bark” we can extend that into our child Classes say “Poodle”, “Husky” etc… Therefore Poodle and Husky can both inherit the same method called “bark” which specifies the shared functionality without having to repeat it across other children Classes.

More on inheritance is covered here: http://www.php.net/manual/en/language.oop5.inheritance.php

Constructor and destructor methods

These are methods called upon creation or destruction of Class object. Typically if you want to initialize a certain property on the creation of an object or cleanup post use.

More on these methods is covered here: http://php.net/manual/en/language.oop5.decon.php

Member privacy (visibility)

This defines who has access to members and methods.

<strong opinion>I believe visibility is a lot of hog wash in PHP. PHP was designed by Rasmus Lerdorf for “web development to produce dynamic web pages” (ref: wiki). Member privacy is largely important when building components that are used by 3rd parties. Like something you would do in Java/C++ with dll/com objects. There is absolutely no good reason I know of why you’d want to hide certain Class functionality from your own developers. Use Interfaces if you must “guide” them on what they can and cannot use. Python got this right!</strong opinion>

More on member privacy is covered here: http://www.php.net/manual/en/language.oop5.visibility.php

Encapsulation

Encapsulation is a reference to well-defined interface to a set of functions in a way which hides their internal workings. The benefit here is it can reduce complexity for another developer by not exposing the whole inner workings of a class. This is achieved using member privacy (discussed above).

More on encapsulation here: http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)

Interfaces

Allows you to specify a Class templates for other developers to showing which public methods can be implemented without exposing how these methods are handled. Only methods can be declared in an Interface, not variables. More than 1 Interface can be extended in a Class.

More on interfaces can be found here: http://en.wikipedia.org/wiki/Object-oriented_user_interface

Overloading

Overloading allows you to dynamically create or extend public properties or methods. These dynamic entities are processed via magic methods.

More on overloading here: http://www.php.net/manual/en/language.oop5.overloading.php

Patterns

Factory: The Factory pattern allows for the instantiation of objects at runtime. It is called a Factory Pattern since it is responsible for “manufacturing” an object. A Parameterized Factory receives the name of the class to instantiate as argument. And;
Singleton: The Singleton ensures that there can be only one instance of a Class and provides a global access point to that instance. Often implied in Database Classes, Loggers, Front Controllers or Request and Response objects.

More on Patterns here: http://www.php.net/manual/en/language.oop5.patterns.php

Now let’s look at how all of this would fit into code.

Note that I have tried to fit all these practices into the 1 sample of code below. Read the internal comments I put in to understand what is going on. Any mistakes or questions please use the comments section below to let me know.

The CODE – in PHP

// Interface implementation
interface BaseInterface
{
	function method0();
}

// Class definition with keyword "implements" to implement BaseInterface interface above.
class BaseClass implements BaseInterface
{
	// property declaration
	private $attribute3 = "This is PHP5";

	// method declaration, by default this is public
	function method0() {
		print "This is Method0";
	}
}

// Always use Upper camel case naming notation for class names
// Inheritance is achieved by using the "extends" keyword with class you want to extend.
class ChildClass extends BaseClass
{
	// This variable is accessible without needing an instantiation of the class.
	public static $attribute0 = "Yes I'm visible";

	// This variable can only be accessed within this class
	// This is also an encapsulated attribute never exposed outside the class.
	private $attribute1;

	// This variable can be accessed outside this class
	public $attribute2;

	// Note the above visibility of the attributes.
	// There are 3 types and can be accessed - public (everywhere), protected (class & inherited) or private (only by class).

	// A class can only have 1 constructor
	// Suitable for any initialization that the object may need before it is used.
	function __construct($arg1, $arg2, …) {
		// Use operator arrow to access class variable
		// Note the lack of $ in front of attribute1. This is valid and also a common mistake among newbies.
		$this->attribute1 = "ABC";
	}

	// A class can only have 1 destructor
	// Called when the object is explicitly destroyed.
	private function __destructor($arg1, $arg2, …) {
		$this->$attribute1 = "";
	}

	// This method has no "visibility" declared so by default it becomes "public".
	function method1() {
		print "This is Method1";

		// Access to base class method / attribute using parent::
		// This call docent automatically evoke base class contractor / desconstructor unless called via parent::
		print "From BaseClass: " . parent::$attribute3;
	}

	// "final" stops this method from being overridden.
	final public function method2($a) {
		$this->attribute2 = $a;

		// Displays to screen the "encapsulated" attribute
		print $this->attribute1;
	}
}

// Accessing static attribute without instantiating a class
print ChildClass::$attribute0;	// Output: 'Yes I'm visible'

// Creating new instances of the child class
// Note that since ChildClass has arguments in the constructor function those need to be passed during this object's instantiation.
$foo = new ChildClass(1, 2, ...);
$bar = new BaseClass();
// Like functions, this instantiated object will have its own "class scope" so any method/variable is different to say $bar object.
$soap = new BaseClass();

// Accessing object members
$foo->attribute1;		// Output: 'ABC'
$foo->method1();		// Output: 'This is PHP5'
$bar = method0();		// Output: 'This is Method0'

I think that is enough to digest for now. If you want to read more on Object-Orientated PHP5 I recommend you visit PHP.NET here: http://www.php.net/manual/en/language.oop5.basic.php

Hope this post has shed more light on OO in PHP and you are ready to crank out some clean and usable OO code.

~ Ernest

ECMAScript: The history of JavaScript

JavaScript is a very interesting language that has caught my eye in the last year. Previously I blogged about the power of the Module Pattern in JavaScript; why it’s powerful and how to make sure your site complies to this great pattern. The language has come a long way and is growing up fast to be the defacto language of choice for all front-end UI/behavioral functionality. Flash, the old heavy dog, is on its way out. JavaScript, part of the HTML5 stack, is looking the most promising.

This post isn’t about how great JavaScript is, it’s about its history. Before one delves into anything one should always understand the basics. So let’s begin with some basics and then its history. The history is rather interesting.

What is JavaScript anyway?

JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions.

For the business guy

  • JavaScript is client-side language. Meaning anyone with a browser can view it in its entirely. Nothing is hidden. This is how we have access to any site’s code. Right click on any webpage and select “View Source” – Bingo!
  • JavaScript is downloaded via your browser and then executed within the browser. This is where performance bottlenecks are experience and browser compatibility issues.
  • JavaScript’s real name is actually ECMAScript.

For the tech guy

  • JavaScript is a “prototype-based scripting language” meaning it is object-oriented where classes are not present, and inheritance is performed via a process of cloning existing objects that serve as prototypes.
  • JavaScript is “dynamic”; meaning that it executes at runtime.
  • JavaScript is “weakly typed”; meaning you can cast memory to any type and
  • JavaScript has “first-class functions”t meaning it supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures.

History of JavaScript

There are many stories online but I think this one below (source) explains it nicely.

Here is something else you should know about Javascript that seems like it was almost designed to be confusing as possible:

  • There is a programming language called Javascript.
  • There is a programming language called Java.
  • There is an interpreter (‘thing that makes it go’) for the programming language Javascript built into most web browsers
  • There is an interpreter for the programming language Java that is sort of built in to most web browsers, or was.
  • THESE TWO PROGRAMMING LANGUAGES HAVE ALMOST NOTHING TO DO WITH EACH OTHER

Back in the olden days, there was a company called Sun that had invented a programming language they decided to call Java. It was very trendy and exciting. There was a company called Netscape that made the trendiest and excitingest web browser. Sun wanted Netscape to include the magical crap that would make Java work with their browser, because everyone was gonna get Netscape, so everyone would also automatically have the stuff that makes Java programs work. On the other hand, Netscape was saying, “but lets also make our own tiny programming language that runs right in the browser so instead of having to make up new html tags like ‘blink’, web authors can make annoying shit we haven’t even thought of yet!” So they said, “Sun, we’ll ship your ‘Java’, but we want to be allowed to call our other programming language, which has absolutely no relationship to yours and is intended to do completely different things, JavaSCRIPT.” And Sun said, “OK, swell. go nuts. That won’t matter to us. ONCE JAVA TAKES OVER THE WORLD!”

So Netscape said to a guy named Brendan, who worked at Netscape, “Please make us a programming language. Also, you have to call it Javascript. Also, if you can make some of it kind-of sort-of look a bit like Java, that would be even better. Also, you have only 10 days to do this so get cracking!”

Fortunately, it turned out that Brendan was a cool genius and he secretly designed a cool programming language and dressed it up in some vaguely Java-looking disguises, kind of like how children will sometimes wear a huge cloak and stand on top of one another in order to get into R-rated films.

But Brendan’s disguise worked too well! People were like “wtf is with this crap version of Java? IT SUCKS!” Also, even a cool genius like Brendan has some some limits, so he did make a few mistakes when he was making his programming language in only 10 days. Also, because Netscape had basically thrown down the gauntlet and said, “You think the blink tag is annoying? Marquee makes you want to rip your eyeballs out? YOU HAVEN’T SEEN NOTHING!” people did manage to find insanely annoying things to do with Javascript. All the cool people installed special software on their web browser JUST TO MAKE JAVASCRIPT NOT WORK. So it took many years before people started to figure out that Brendan’s language was wrapped in an elaborate disguise and that it was actually cool.

Weirdly, some of the main people who did this were people at Microsoft, who had tried to confuse this whole mess out of existence by coming out with programming languages named stuff like J++ and JScript. Netscape, at the time, was threatening to rip Microsoft apart, like a crab rips up a cuttlefish with his claws. So Microsoft, adopting the strategy of the cuttlefish, made a million confusing “J” programming languages, hoping to escape intact. A prophet by the name of Douglas started saying, “guess what nerds, it turns out Javascript is actually sort of awesome.” He managed to attract a fair number of acolytes, who fiddled with Brendan’s invention and realized that it was rather elegant and could certainly be made to do all sorts of useful, non-annoying things on webpages, if only people would stop blocking it.

And so the era now known as Web 2.0 began. There are a lot of things people associate with Web 2.0, but for people who make the internet, one of the biggest things was seeing sites like Flickr or Oddpost do cool stuff with Javascript and other technologies that had been previously considered lame.

And then, in a sort of poetic irony that makes this story almost seem like it was pre-scripted to Teach us a Lesson, JAVASCRIPT succeeded in doing what JAVA had intended to do. Microsoft, Java, Sun, Netscape, all were brought low by their hubris. But humble Javascript, the throwaway, ‘you get 10 days to make this’, blink-tag-replacing runt of a language was able to sneak onto every computer in the world thanks to its clever disguise. Servers are written in Javascript. Databases are built to talk Javascript. The people who build browsers and operating systems move heaven and earth to make Javascript just a tiny bit faster. Java’s still out there, of course. In various forms. It probably makes sure your account is updated when you pay your water bill. It’s making the underpinnings of your android phone work. It’s figured out a way to play host to a zillion new trendier programming languages. But Javascript won the original prize.

Anyway, I’m just pointing this out because I remember the time when I didn’t know the difference between Java and Javascript and I’d find a tutorial for one or an article about the other and I was like “wtf, how do these go together.” The answer is, “they don’t. Marketing people just tried to name them as confusingly as possible.”

JavaScript today is..

  • Used in every website you visit online.. like 99.9999% of them.
  • At the core of famous server-side Node.js, an evented I/O framework.
  • If you heard of beautiful frameworks like jQuery, YUI, and more recently SproutCore and Cappuccino (Objective-J).. all JavaScript.
  • HTML5? replacement for Flash and other slick interface functionality, yap you guessed it.. JavaScript.
  • It is the most important language today!

What next

Plenty more informative & juicy articles on this front are being lined up. Not to mention I am starting a fun project with few smart software engineers in the valley which aims to give back to the community around this most important language today, JavaScript. Stay tuned to find out more on what’s next!

~ Ernest