HOC

A Simple higher order Component example

I have been factoring my code and have decided that I need to build a few higher order components.

Why?

I have four components that are very similar and all require some data manipulations to be carried out on the props so I figure I can remove all this duplication with a higher order component that takes in the props , runs some functions and then presents the updated props to the components.

What I have done

To help me get my head around higher Order Functions I created a simple example and have put it into codesandbox.

AppSwitcher.js

I have also created a component called AppSwitcher.js that toggles between the app and specific components I am developing. I have found that this can be quite helpful for sandboxing new things in my app and thought I’d include it here in case anyone else find it useful. The flow of the app is like this

index.js -> AppSwitcher -> App.js or {Components to be tested}

iphone auto correct

iPhone autocorrect fun

I am actually writing this blog post on my iPhone. Isn’t technology amazing! I love my iPhone how’ve ever it can be annoying occasionally and one of the most annoying functions is auto correct. I have sent a few bloopers in the post caused by the over zealous autocorrect. I found this site and thought you may find it as amusing as I.

20121008-124846.jpg

seosmartlinks_

SEO smartlinks

I have just installed SEO Smartlinks wordpress plugin on this wordpress site. I like it because it makes it really easy to link to your own content. Linking to your own content has the advantage of increasing search engine traffic and also presenting the reader with relevant further reading. All the links on this page are done using SEO Smartlinks. It is really quick and easy to use. I got this tip from Five Minutes with Jack podcasts which is one of my favourite internet marketing podcasts.

I am optimizing the keywords on this post for the keyword “SEO Smartlinks” using another plugin called Yoast. Below is a quick video on SEOsmartlinks

Word of Warning
On installing SEO Smartlinks I have now noticed that the “featured image” functionality in wordpress has stopped working. I will be talking to the developer about this and I’ll let you know how I get on.

Two-Servers-for-wordpress

Backup and Webserver Setup

I have recently updated my whole server setup and its now costing me less and giving me better performance and security. I now have a very efficient setup for my podcasts, wordpress and webserver backups. I have my wordpress site hosted on hostgator and a second web server for a second account for hosting my backups and any podcast files hosted with webhostingpad.

This is a great approach for backups because then you have two different locations and companies which spreads risk. From a podcast point of view it is great as it means that people downloading your podcasts will not harm the performance of your website.

For the hosting

I have been using hostgator for some time and have found the support good (they have alot of staff and can get to you quickly). My only gripe is that the chat window has no way of sending screenshots. (For this reason I reccomend to anyone who is talking to hostgator support to email thier support desk with screenshots of your problem so you can refer to it on the chat )

I have just started using webhostingpad as they have had really good review and seem very well priced.

For the backups

I use backup buddy and I’d recommend it to anyone as it backs up everything on your site (including images) and it is easy to setup , supported and you are also able to use it to migrate wordpress site with (a task that can be very painful without it).I have a post that explains more about about how to backup using backup buddy wordpress plugin

zoom-h4n

Zoom H4 vs itouch mic

Lapel and zoom microphones

To help me with my podcast I have bought a couple of microphones one lapel and another from Zoom

The itouch mic $13 US (which is a lapel mic for the iphone)

and a Zoom H4n (a bit over the top for podcasts perhaps but I’m also in a band so have used it to record demo tracks) $450

I have used them to record my latest podcast on my bands website www.jimmyyukka.com I used the iphone mic as a backup mic (which was just as well as the Zoom H4n filled up halfway through the recording).

My Opinion on the itouch mic
cheap and easy and sounds better than the iphone headset mic (worth the $30)

My Opinion on the ZoomH4n
Gorgeous as a portable recorder or an small a/d for my laptop it even has gates

iphone

iphone synths and sampler tunes

I have been dying for a decent sampler on the iphone (I tried beatmapper) but all of the apps have disappointed until now. This thing is just sooo good!

It is called nanostudio it costs money but it really is breathtaking

This is the muts nuts. I can create tracks on the way to work! I  have created a bunch of tunes my favourite a couple are below. The interface is so slick.

Virgin Outbound (recorded whilst waiting for a flight to sydney)

Theres something going on outside recorded using the iphone mic for vocal samples. It is track 3 on my new concept albumn.

1998_google2

Gmail spam

I was almost tricked by a very convincing spam that I received this morning claiming to be from gmail.

“Due to the congestion in our Gmail servers,there would be removal of all unused Gmail Accounts.You will have to confirm if your E-mail is still active by filling out your login info below after clicking the reply button, or your account will be suspended within 24 hours for security reasons.”

It then goes on to ask you DOB and some other details.

This is spam ignore it