Do-Less JS Tooling Workshop

On my journey to beefing up my Frontend development skills (primarily Javascript) I’ve also been trying to get up to speed with some of the tools that are commonly being used to improve workflows and encourage development best practices. To a relative newcomer I feel that it was all a little overwhelming… the number of package managers, development and testing frameworks and task-automation tools was (is) just quite amazing… and to be honest it left me fairly confused as which tool I should be using to do which job.

I was relieved then to see an Embracing Javascript Tooling workshop date pop up in my twitter stream… looking at the details for the event I was please by the topics covered, which included npm and bower, grunt and gulp, these were tools I’d been playing with but was still unsure as to which to use and when. The workshop was the very first one being run by Jack Franklin and Ollie Jennings under the Do-Less banner and I was pleased to give them support so thought I’d put my name down.

The one-day workshop took place in Bath at The Guild co-working space, a really beautiful building that suited our needs just fine. On arrival I was treated to a small but welcoming goody-bag which included a bottle of pop and some haribo, an ideal sugar-rush or two for whenever I need it. The workshop essentially ran through a couple of small projects and tasks, with the morning session covering them using Grunt and the afternoon re-doing them with Gulp, with both sessions making use of npm and bower. The workshop really expected at least some minimal knowledge of JS. And being comfortable with git and the command prompt was certainly useful since the pace was quite stiff, thankfully this suited me just fine. As well as this we also briefly covered Yo and Yeoman and there was ample time for questions as we went.

All-in-all I was very pleased with what I got from the workshop and wish both Jack and Ollie well with any future events they hold. And personally it certainly helped clear up a few queries I had, although I think that perhaps coming to the workshop without any experience of at least some of the tools might give attendees a very steep learning curve.

As a small take-away, it does seem that to a frontend developer, every possible issue is a nail that and be bashed with a Javascript hammer (and perhaps they’re right?).

Easy coloured tail output

As part of my job I’m often watching the output of a tail -f <filename> command run down my terminal window… and on my development and quite testing machines this is all well and good.

But what if the system is a pretty busy one? Well here it can be hard to spot the messages that might be of interest to you. And that is why I use a little trick to highlight a specific word in the output.

How to highlight words in tail output?

1) Basically add the following lines to your .bashrc  file

This adds a function available to you in bash that can be then be used to do exactly what you want. Say for example you want to highlight all instances of Error when tailing a file called foo.txt you can run the following.

Rebar/Git Error and Solution

Just a quick one… for my benefit as well as perhaps yours.

I was trying to use rebar to pull in the dependencies on one of my Erlang projects but it kept failing with the following type of output;

I believe rebar doesn’t know how to ask for github credentials and I solved this by using the git credentials helper.

WordPress London – March Meetup

It had been quite a long time since I last attended a WordPress  London meet-up, so I was very excited about going along again and getting a good fix of WordPress geekery (as well as chatting to folk and drinking beer of course). The event was held at Shoreditch Works Village Hall for the first time and it provided ample space and the required tech. The venue and pizza was sponsored by the following kind orgs;

The Talks

Joel Hughes – The Business of WordPress

Joel gave a passionate and honest account of his move from permanent employee, through contractor and freelancer and onto running his own agency. He covered some of the key mistakes that folk (including him) make when starting out in alone, and some notes on avoiding them (the second time perhaps). They include;

  • Undervaluing Yourself : On a personal level right through to pricing
  • Clients from Hell : Educate the good ones, they’ve probably not bought a website before. Fire the bad ones.
  • Business is Personal : If you’re a freelancer, BE a freelance; don’t pretend to be an agency if you’re not. If you do you won’t be authentic, and this will show.

Joel also did some shameless pimping of his The Business of Web Design conference, which I have to say has a nice looking line-up of speakers. I’d probably be going if we weren’t due a baby the week before.

He also asked for freelancers of all sorts to get in touch with him. Looks like business is good.

David Coveney – Let’s Move It

I have seen one or two of Dave’s talks before at various WordPress (un)conferences and after seeing his take on Baz Luhrmann’s “Everybody’s Free To Wear Sunscreen” I wasn’t sure what to expect next. He didn’t disappoint by starting the talk with some kind of body convulsions which, I think in popular culture, could be described as dance moves.

He then proceeded to talk us through some basics behind running a WordPress migration with as few hiccups as possible. He discussed various migration types (server to server, multisite to singlesite, domain swapping) and their various pitfalls. He also talked through a few tools which can make life easier. These included MySQL Workbench and his company’s Search/Replace plugin.

In true Coveney style he then plumped for a live demo of a site migration (server to server and domain swap)… the audience, of course, new the perils of live demos and were all waiting for the inevitable.

Don’t work with computers – Dave Coveney

And of course the inevitable happened. So much so infact that Dave’s new database that he was using in the demo ended up being named fuckit. He rode out all that the live demo-gods could throw at him with it finally succeeding. His parting words of advice were “Don’t work with computers”.

Stiofan O’Conner and Tim Clark  – GeoDirectory

Stiofan and Tim talked to us about GeoTheme and the move to a new GeoDirectory plugin that will be appearing on WordPress.org very soon.

They briefed us on the history and the direction they think the plugin is headed. How they want it to become and extendible product with multiple revenue streams. The plugin looks like it’ll be very powerful and is well worth looking at if you’re interested in building up any kind of location-based directory.

Parting words

The standard post-meetup beers were had in a hipster-filled pub just around the corner, and I had some lovely chats with old friends and new from the WordPress community. I heard from a couple of the guys and gals that there was a lot of work out there for a WordPress freelance dev… this is certainly good news with my resignation notice period winding down.

I certainly can’t wait for the next one.

Adding a mobile number to Twitter

For a side project I’m currently working on (codenamed Shedwina, more details to follow later) I wanted to set up a Twitter NodeJS bot. On logging into https://dev.twitter.com as my bot account and trying to create a new app I got the error message that the account needed to have a mobile number associated with it. This in itself shouldn’t have been an issue but to set up a mobile number you need to send an SMS to a shortcode… sadly there was no option for EE in the UK and the long number option failed to work even after a few attempts.

I then come up with an idea… and it worked. Basically I installed the official Twitter client on my phone and checked the box which allowed the use of my phone number in the set-up phase. This has the desired affect and upon the next attempt at creating the app over at https://dev.twitter.com all worked like a dream.

From a Problem to 100,000 Downloads

It was 1054 days ago that I first wanted to place a WordPress widget into a post I was writing. Whether it was for a client site or personal one I can’t remember… the important thing is that out of the solution I came up with emerged the Widgets On Pages WordPress plugin.

The plugin has undergone very little change since it’s 0.0.1 check-in to the WordPress.org plugin repository but since then it’s had very favourable reviews and been included in several blog posts and conference talks. But more importantly, for today at least, it’s now been downloaded over 100,000 times!

It has a current rating of 4.7/5 and at the time of writing sits as the 105th most highest rated plugin on the WordPress.org repository. 105th might not seem too good but it should be noted there are over 23,800 plugins in the repo.

Goals for 2013

Well 2012 was a good year I’d say… in fact with the birth of little Rafferty I’d say it was a great year. But onto 2013; what am I hoping to achieve this year…

Lose a little weight

As per every year I’d really like to be lose a tad more weight. I seem to fluctuate between 11.5 stone and 12.5 stone but I’d to make this more a 11-12 stone window. Hopefully with the Badja being given the all-clear to start excercising again from the doctors in a couple of weeks we’ll start back on with our fitness DVDs. Doing these together is great fun and should hopefully help with this goal.

Give Blood

I know, I know… this has been on my list for the past Lord-knows-how-many years… I must really try to get the ball rolling on this. Bad Todd!

Release a Side Project

Having a couple of side-projects partially designed and developed I really should focus on one and get it released. I already know which one to work on, I just need to spend my time on that rather than being beat by American and French kids on COD Black-Ops II. The side-project I have in mind is an Android app to pair with an existing web service which will also require a web site. This will have a free lite version as well as a paid version so hopefully this’ll actually give me some insight into what to expect from paid apps in terms of revenue, marketing, support etc.

Run a Code Club

I have been meeting with my local Junior school Cunningham Hill about starting an after-school Code Club. They are very receptive to the idea and hopefully this will all kick-off in the first term or two. I’ve already attended a Code Club workhsop on Scratch and have starting the CRB process by registering as a STEMnet ambassador.

Ubuntu 2d – Some tweaks

Recently my install of Ubuntu on my work desktop started complaining about now being out of support… so I decided to upgarde to the latest LTS version (Ubuntu 12.04). Overall the install went fine apart from a couple of little things that I needed to address

Desktop size to big for Unity 3D

Sadly my graphics card did not support running Unity 3D across my dual-head setup (2 x 24 inch monitors). This, I didn’t feel, would be too much of an issue as I wasn’t too interested in all the desktop eye-candy. All I did here was then choose the Unity 2D option at the login prompt.

The 2D setup itself was not hassle free though;

Quick Synergy, Very Laggy

I noticed that for some reason the usually great Quick Synergy (which I highly recommend if you want to share mouse/keyboard across multiple PCs… including different OS) was very laggy. This was not the case if I used Unity 3D in mirrored monitor mode or if I used any of the other Gnome desktops at login. I had no luck in finding a solution to this… that was until I decided to solve my next issue… read on for the Quick Synergy lag issue solution.

Terminal Window Always on Top

I found that the Terminal windows always remainded on top (in front of) other windows I had opened. Now I’m the kind of guy that uses the Terminal a lot, so this was going to be a show-stopper if I couldn’t find an answer.

After a brief search I came across this link which details a solution. In essence it just tells you to disable metacity from being the composting manager (and how to do it too).

I’m not sure what adverse side-affects might be suffered from this… so far I’ve not noticed any. One good bi-product of this chnage though was that Quick Synergy sped right back up again and became super-responsive once more… WIN!

Web Celebs and Sasquatches

Since my first forays into the world of Web design and development I was actutely aware of what seemed to be a circle of folk who were everywhere. There were those that were involved in The List Apart empire, those that contributed to .net, those that had authored books on the subject, those who spoke at conferences and so on. It was very common for those who were involved in one of the above to be actually involved in many.

Bigfoot Sighting by JD Hancock, on Flickr

Starting out, these were the folk I kept an eye out for; if they were doing something new with JS then I should take a look too… and if they had a view on clients then I should probably read up on what they were saying. They were our leaders, our chiefs.

Slowly it dawned on me (perhaps I’m not the sharpest tool in the box after all) that these chaps and chapesses were all quite well acquainted with each other.  After some time I formed the opinion that this smallish circle were actually very tight-knit. It appeared to be like some kind of site-cross-linking that had managed to manifest itself out of the virtual web. If one of the members had written a book then others of the group would be very quick to back it up… and sometimes this support seemed to be there regardless of how poor the material was. The pat on the back was always there… even for the most mundane insight or mediocre execution.

I remember one Boagworld podcast (a Christmas special I think) when some dude came on and started talking about a new approach to building sites. He was shouting about it like he’d had some crazy dream and now he had to teach the world. He was, however, just regurgitating the well-known verses of Graceful Degradation and Progressive Enhancement but trying to re-sell it. I was bemused at this.

Please excuse me if you think I’m saying that everything I received from this Web Celeb group was all drivel, it most definitely wasn’t. It was through these dabblers that I first learnt of media queries; it was this circle that brought the wonderful Silverback parallax affect to my attention… and it was these guys and gals who introduced me to cheese and Marmite on toast. I have a lot to thank them for.

And so it was that yesterday, the Responsive Day Out was mentioned on twitter by Jeremy Keith. An instant backlash of “it’s the same folk as at every other conf” appeared… and thus ensued a lovely conversation between Jeremy Keith and Zack Inglis. It was this conversation that sparked me to write my thoughts on the Web Celeb (non)existence.

Having been to a few conferences (note, not a lot) I can say that I’ve enjoyed the whole experience of meeting new folk, chatting about geekyness and drinking beers just as much as I’ve enjoyed the talks. And in general the talks have been good too. I was pleased to catch Jeremy at DIBI as I was initially sure it was he who had babbled on about re-inventing Progressive Enhancement… though I was proven to have made a mistake and loved his talk. I have also enjoyed talks by other Web Celebs but equally have been bored by some. In the same way I have very much been grateful to be in the audience for non-Web Celeb’s talks… as I have also been sad to be for others.

I suppose I should try and bring some clarity to my ramblings (too late, I hear you cry)… and I think it comes down to a couple of points;

What do we mean by Web Celebs?

Are these just anyone who’ll get a retweet by Elliot Jay Stocks or Jeffrey Zeldman. Are these people who we’ve seen on a handful of conference line-ups? Are these the people who appear on Boagworld or have A Book Apart published?

Why are the Conferences full of them?

The answer to this question, although is an easy answer, isn’t the one we all want. Surely a conference organiser wants to break-even if not make money, so why not get a Web Celeb on the line-up? It was these people I wanted to hear from when I was starting out… so surely these folk now starting off on their journey into web design and dev also want to see them too… and are more than happy to part with some cash to see them.

What makes a Web Celeb?

So a Web Celeb probably needs to be good at speaking and getting their point across. Those that don’t will probably fall out of the higher tier quite quickly.

Are they the best at what they do? If we mean designing, writing, developing, etc then the answer is “Probably not”… but that doesn’t mean they’re not good at selling their knowledge and experiecnce.

They also appear to need to work hard on getting where they are. I’ve never written a book (though I was a technical reviewer on Rachel McCollin’s WordPress Mobile Web Dev) but have been told by all who have that it’s very hard work. I’ve also never spent the time writing an article for .net or a tutorial for Smashing Mag. And I’ve never put in the hours needed to record a Podcast. But these Web Celebs have.

The Bottom Line

Do Web Celebs exist? Damn straight they do… but they’re there because in general they’ve grafted away. Perhaps they’re lucky to have a good personality or to know someone on the inside as well… but I can’t knock them for that

What about these conferences full of them? Try not to begrudge the organisers for this. It’s what a lot of people want. If you don’t then perhaps look to attend the smaller conferences… or get involved in organising one.

Do I like it? Nah, but that’s life… and to be honest that’s why I really like the Build It  track at the DIBI conferences. Full of folk who really know they stuff.

So Web Celebs and Sasquatch… let’s just say I believe in one of them.

Ubuntu & Windows 8 Dual boot on Asus ux31a

Having been in the market for a new lightweight laptop for some time I pounced on the Asus ux31a Ultrabook when it dropped £300 last week (it has since gone back up to its original price). And being an avid Linux fan the end-plan was to wipe the pre-installed version of Windows and have the whole thing running Ubuntu.  When it first arrived though I thought of trying out a dual boot of the stock Windows 8, which I can have a play around with, and also the recently released Ubuntu 12.1o. This wasn’t completely plain sailing as I ran into some issues with the booting of the live USB… anyway, these instructions document what I did to solve the problems I was having and led me to having a running system.

Creating the Windows 8 Recovery Disk

I essentially followed the instructions here but have added some screenshots here too as they show what my system looked like. NOTE: I have not tested my recovery disk

Bring up the run dialog by pressing the key combination [WinKey]+[R] and enter the command RecoveryTools, then OK

In the next Create Recovery Drive window check the Copy the recovery partition from the PC to the recovery disk and click Next

The next window to appear asked me to choose the destination device… I only had the one USB drive inserted so this was the only option.

The process took quite some time (at least an hour) and ended up using just shy of 10GB of space on the USB drive.

Decrease the Windows 8 Partition Size

The next task was to reduce the amount of disk space the Windows 8 was using so I could free some space for the Ubuntu install to sit alongside. Since my dual boot setup was to be fairly temporary I took the option of just using the majority of one of the 2 SSDs for Ubuntu.

Again I brought up the run dialog by pressing the key combination [WinKey]+[R]. I then then entered the command diskmgmt.msc, then OK to run Windows built in Disk Management tool.

This is what the partitions looked like out of the box.

I simply reduced the partition on the 2nd SSD (D) by 97280MB (95GB) which left me with this;

Trying and Installing Ubuntu on the Asus ux31a

Now comes the fun bit… and also the bit that caused me to run through some trial and error steps. Oh, I won’t go into details about creating a bootable Ubuntu USB as this has been covered many times.

So anyway, I plugged the USB into the ux31a (which was off) and pressed the power button. Then, holding down [esc] to enter the boot menu, I saw the options to boot from the USB drive (prefixed with UEFI which is some secure boot stuff… this is what foxed me). After clicking the option to boot from the USB I was given Ubuntu options menu screen which has the familiar Try Ubuntu, Install Ubuntu etc items. However, on clicking any of these all that happened was some brief USB activity and then the screen would go black/blank… nothing more.

After some hunting around I found an option called Secure Boot from within the BIOS Security tab in the BIOS setup (which you can get to by holding down [esc] during boot. This setting was originally set to Enabled so I swapped it to Disabled then saved the changes, exited the BIOS setup and the rebooted. This time, after clicking Try Ubuntu I was greeted by more USB activity and then a running Live Install instance of Ubuntu… perfect!

I then ran the Ubuntu install making sure to check the Install Ubuntu alongside Windows 8 option. This install went without any issues.

Repair the boot of the Computer

I had already read that the first boot back into Windows 8 might fail, which it did due… throwing some UEFI path error. This was no concern as I already knew that this could be fixed by downloading, installing and running the Ubuntu Boot Repair tool. This I did and that fixed my boot into Windows 8 (not that I’ve used Windows again since installing Windows).

Other Small Tweaks

Getting USB Ports Working Again

I had noticed that when I plugged in USB flash drives that they won’t showing at all. It wasn’t that they weren’t mounting (I don’t think) but actually that the ports were not enabled. To get them working again I had to change the “XHCI Pre-Boot Mode” from auto to disabled in the BIOS. Once this was set any devices inserted into the USB ports were auto mounted.

Middle-click Mouse Button with the Trackpad

One other thing I did was to modify the multi-touch settings so that the 3-finger-click was handled as a middle-click on a conventional mouse. I had grown very use to this middle-click for pasting over my time with Ubuntu on my other machines. This setting is handled, quite crudely by having the following in my ~/bashrc file. I know this isn’t pretty but I always have terminal windows open so it does the trick.

And that is it… for now… and I’ve got to say I’m really enjoying it.