Have you tried working Less?

Let me just say this:  Stop working overtime on that project. Set your hours. Push hard at it and then rest at a pre-defined point. Enjoy life after working hard.

You’ve been pushing the hours on that project. The deadline is at hand. Just another hour you say. If you can push it for another hour you’ll surely reach the deadline, heck you’ll even finish earlier and have time for all those things that you’re not allowing yourself to get to now?

Lets take a step back. A few weeks ago you just started this project with a fresh vision, a mind to finish it all and on top of that you were so excited you could hardly wait to get started. And then with a clear slate you stepped into it promising yourself that it will be different this time and it never was.

Falling Short

We see the Marathon runners pushing themselves to the edge right through out the race and then collapse a few feet short of successfully completing the race.  In fact we have all found ourselves at a point we are simply unable to push further but the end is so close that if you took just a few more steps you would be victorious. Sadly you’ve pushed yourself so Hard that you simply don’t have enough strength to finish with your hands held high.

It’s ok to be hard on yourself

You always hear these words, don’t be to hard on yourself, but honestly you should be. You should be disciplined enough to stop at the predefined time. Set out your work hours. If that means you’ll work another 2 hours per day , do it but determine this before you start. Once you reach your cut off, stop and rest.

Finish strong, with your hands held high!

stop_working_and_rest_marathon

Let’s get this Hippo started

Ready set go, The Hippo’s party is starting earlier than what you might expect. WooCommerce 2.3 is readying itself behind the scenes for a few awesome leaps forward on the e-commerce dance floor. 

With this in mind a few of the WooThemes members have decided to take part in the Handsome Hippo blog competition. The winner this year gets … drum roll … nothing. We simply get a pat on the back and a few mentions on twitter, but beating the rest of the WooThemes theme is a reward enough.

I’ve decided to take part in this competition for a few reasons:

  1. I would seriously like to be more active on dwainm.com
  2. I think celebrating the release of the Handsome Hippo before it arrives is a great start to the party.
  3. I have a few draft posts in the bag (Don’t tell the others )
  4. I think it is a really awesome idea. We had a competition last year but I was not ready to take part.

The Rules of the completion are :

  • It starts today. Right now.
  • It’s until Christmas, so the last post should be on the 24th of December.
  • Posts can be scheduled for the future, but not back-dated.
  • Posts must be at least 250 words.
  • Can be about anything.
  • Bonus Points! You should try include a GIF in every post.

At the end I should have 30 plus new blog posts with awesome content related to Work/Life, WordPress, Development and many more interesting posts which I believe you’ll learn a lot from. 

Please follow me on twitter for daily updates and links for these blog posts. 

hippo-dance-o

Your guide to local remote git repositories.

Did you know that that git allows you to connect to a remote repository that is not so, remote ? I mean, you can actually connect to a repo in another folder and push and pull directly to and from it. I was recently faced a scenario where I had two working versions of the same repo in separate directories. I needed to make the changes in one place but then confirm the changes in a different context.

A Few Lines of Command Line

I’m not sure how this will work on a git GUI client but for those who love the command line follow my simple instructions below.

Understanding remotes

remote in simple terms is simply just a copy of the same repository, somewhere else( GitHub, Bitbucket, private git server ). Git hub allows you add multiple remotes via this command:

 git remote add <name> <URI>
 git remote add companyrepo git@github.com:company/repo.git

After adding this remote you can fetch all the branches from it so you can compare it locally. To do this simply run:

git fetch

Now to see all the branches that’s been added  after the fetch request run :

git branch -a

If you need to read up more about remotes checkout working with remote.

The Remote Repo Next Door

So I thought, if I can do that with a url to a git repo surely git must allow directories on my local machine as well? So it was, git doesn’t distinguish between my local directory and a repository on a distant planet. So to get this working the first thing you’ll need to do is: ensure that you have 2 (or more) of the same repositories. What I mean by the same is that they are both cloned from the same origin. Now open the command line and proceed to the directory where the main repo is. This is the place where you’ll be working on your feature branch and committing code changes. Type `pwd` and copy the full path to the current repo’s directory. In my case:

/Users/dwain/dev_repo_main/

Change directories and move to the other directory where you want to add the remote. In my case:

cd /Users/dwain/dev_repo_other/

Once you’re in the second repo simply run this git command:

git remote add repo_main /Users/dwain/dev_repo_main/.git

After doing this you can check if it was added by running the following command.

git remote -v

You should see this:

origin git@github.com:company/repo.git (fetch) 
origin git@github.com:company/repo.git (push)
repo_main /Users/dwain/repo_main/.git (fetch)
repo_main /Users/dwain/repo_main/.git (push)

From this point forward you can make change in the main branch and pull them into your local branch.

git pull repo_main

Please note that when pushing to the

main_repo

it is advised that you create a feature branch before making your changes

 git checkout -b new-feature-branch

After making and committing your changes you can push this branch to the main repo and then change to the main directory to merge the new changes:

git push repo_main new-feature-branch
cd /Users/dwain/dev_repo_main/ 
git merge new-feature-branch

Add WordPress post type content programatically

To load dummy content programatically load the content below into your functions.php.

This function runs on every page reload so be sure to run it only once and then remove it. Firstly setup the number of posts you need and then also specify the post type. After doing this proceed to your website front end  and reload the page.

After this your dummy posts should be added. Remove that code from your functions..php file and check your admin dashboard.

This is a modified version of Tom McFarlin’s post ( http://tommcfarlin.com/programmatically-create-a-post-in-wordpress/ )

WordPress, why we really need front end editing

We all know quite a few online website creation tools that lets one create a website without touching a single line of code, but unless your the end user, this kind of solution is not something you’ll recommend to your client. The current basic WordPress website workflow: Designer/Developer completes the implementation of the theme and a few plugins and trains the new user how to use the site.

Usability
The user goes into the admin makes some changes and refreshes the page/website and checks out the changes in another tab (the neat trick you showed them). So they switch between admin and the front a few hundred times before they are 100% satisfied. All is well, the website launches and now they get to feel proud, but this where we need to pause and think . Why does the user have to switch between the admin and the the front end so many times to manage their website ?

All we need is Edit and Save
If we could improve the lives of our users and take a little more hassle out of maintaining websites I suggest we shift our current focus from structure and design to simple front end content editing. And when I say content, I mean any content on the page ( page content, menu names, widget text ). Any content easily editable in the admin should be easily editable in the front end.

We need front-end-editing to remove the extra clicks synonymous WordPress website management and place more power in the hands of the end users.

Now There are already developers paving the way toward a better WordPress editing experience.

I know this will soon play such and integral part as to how we’re managing our websites that we forget the time when we switched windows to view the final result.

 

 

Internet at aboard the pacific pearl

Working remotely for Woothemes which allows me to change my office location like I change my shocks. With this benefit my wife and I decided to take the opportunity to work out at sea.

She is the crew doctor for P&O cruise-liner in the south pacific just off the coast of Australia. Working at sea comes with a dozen plus benefits, but these doesn’t always include a stable internet connection from which I work.

On the current ship , the Pacific Pearl, this issue has almost been removed thanks to P&O moving to a new service provider http://harris.com/ . With this provider I’m able to get download speed of 2mb p/s and upload of 1mb p/s . Now this is really very basic but it is not dial up speeds, and you can get a decent amount of Work done with this connection.

The connection is still very expensive and may be down at certain times but I find it to work wonderfully for 80% of the time.

Start your Journey now

At this point in my life I am happy. I have a relationship with my heavenly Father through Jesus. I have a loving wife with who’m I’m excited to share the rest of my life with and together we are working towards common goals.

This blog post will serve as the official starting point of my Journey. I publish this in faith as I believe there will be others asking me about my journey and how I made and and i’d like to share my ups downs and what I have done but more specifically the mind set behind my success as a Software Engineer. Continue reading Start your Journey now

Your story matters, share it

We all have those times when really need inspiration. Most times we find it in the simplest places. It’s in books, blogs, talks even the little children, other times we draw inspiration from our industry leaders and people we look up to.

The leader you choose not to see

When speaking about great leaders our thoughts often go out to great names like Nelson Mandela, Winston Churchill and like, but you often fail to notice the leader staring back at you in the mirror. This leader , the one you fail to see, has a lot more to give than you can currently imagine.

Lead from where you are

Often we look for the position and the acceptance from other people before we will take charge and lead from our current position. We sometimes pass on each great opportunity because of fear.

Show us what you’ve got

Consider this for a moment. No matter how you see yourself, Someone looks up to you. So do them a favour. Tell your story. Share your journey with them. Talk about your failures and success. Share the the gift of your precious life.

I’m slowly sharing mine, so go on share yours. Blog about it, make a video or add it to your about me page. Host a talk. What ever you do, share it !