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;

fatal: could not read Username for 'https://github.com': No such device or address

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

git config --global credential.helper 'cache --timeout=3600'

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.

synclient TapButton3=2

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

August wp-hooked Widgets Admin Write-Up

At the August Meet-up of the London based wp-hooked I talked on the topic of WordPress Widgets, and in particular the admin area for them (slides can be found here). The talk came from the view of a user (read not developer) of WordPress who wants to take advantage of all the wonderful chunks of code that already exist in the WordPress widgets ecosystem. This ecosystem is a constantly growing one with Widgets being developed and released on the WordPress.org repository all the time. For website users (e.g. site owners, authors, etc) to actually make use of these great blocks of logic it’s not a friendly place sadly. The legacy idea of Sidebars is one that still has a place but it’s the use of Widgets outside of these well-trodden widget areas that things start to get tricky.

Let’s CMS it ALL

Users are wanting the freedom to add widgets into posts and pages as inline content; they want to easily add widgets to footer areas for things such as recent post lists, location maps and recent tweets. All these things are available as widgets but for users are heavily theme-reliant when it comes to how many widget areas are available to them and where those areas are on their site. In my talk (it could hardly be called a presentation) I suggested several plugins that can help users on their way to achieving these things;

During the talk several other plugins were discussed;

  • Dynamic Widgets – Control which widgets to display in the sidebars for pages
  • Widget Logic – Control which widgets to display in the sidebars for pages
  • Multi Edit – Not really widgety but adds extra content blocks to posts and pages admin screens
  • Page Layout - Page Layout allows to define a page layout using widgets
  • Carrington Build - A premium build tool which gives an advanced admin “layout” UI which enables users to add “content modules” to pages which could be widgets.
Screenshot of the Carrington Build in action

 

What Next?

Although all these plugins seem to add some great support to users when it comes to having control of their sites’ layouts and in particular the use of widgets they all seem to be a bit lacking. As a group we discussed what the solution would look like if we were designing from the ground up… especially now that we knew there was a demand to have this extra level of control and advanced use cases… something that the WordPress guys wouldn’t have known about when initially thinking about widgets. We came up with the following points which would hopefully spur on some further thought and potentially create a great solution;

  • Users want to add widgets to posts and pages on the fly.
  • Do widgets need to belong to sidebars? My personal thinking here is that CPT could be used to replace sidebars altogether.
  • Perhaps Widget attributes could be stored in post meta data if that Widget instance belonged to a particular post.
  • Having a drag and drop, minimal interface via the editor would be good… we would want to avoid the use of shortcodes. Perhaps in a similar way to the method used for images?
  • Users want to easily add widget areas to existing themes
  • Users want to be able to control the layout of widgets within their posts and pages.

And so there we have it… we have essentially a loose spec for a killer plugin or modification to core.

And what of wp-hooked?

For my part I really enjoyed the opportunity to vent some frustrations I’d been having personally as well as seeing over and over again in the WordPress.org support forums. It was great to have some expert feedback from like-minded WordPress folk. Once again, of course, thanks go to Emily and Ross for organising and chairing and of course the Dachis Group for hosting us. I’m already looking forward to the Sept ’12 event… what can I say, beer, WordPress and friendly geeks are excellent bed-fellows.

Possible Erlang Bad Transform Function Solution

Just a quick thing to try if you’re running round in circles trying to work out why your mnesia:transform_table(Tab, Fun, NewAttList, NewRecName). isn’t working and returning you with something like this;

{aborted,{"Bad transform function",test,...}

Now, if you’re table is distributed then make sure the beam file has been loaded onto all nodes first.

This particular one had me for almost an hour before I sussed it, so I hope this quick blog post saves some of you some time too.