Thursday 26 September 2013

How to embed a Bootstrap carousel within another Bootstrap Carousel

As I type this, I can almost hear you asking, why on earth would anyone want to do this? Well, in my defence, I was working to a design and it makes sense in the context. We had a number of different features (the outer carousel) with a number of different images and videos associated with each feature (the inner carousel). Unfortunately, the normal Bootstrap carousel has naming conflicts if you try to do this, so I had to write a different version of the carousel that prevented these conflicts. Just in case anyone else has to work with a sadistic designer, I have made the source code available on GitHub at https://github.com/littleowllabs/nested_boostrap_carousel Enjoy!

Tuesday 24 September 2013

Recruiting front-enders

My personal preference is for full-stack development. I always try and keep abreast of emerging technologies in whatever area of programming they might arise. However, full-stack developers tend to come with a premium in terms of their cost, so at the company I am currently working, they are looking for a front-end developer who has the ability to take some crazy designs and turn them into reality. Unfortunately, we are struggling to find this person. There are 2 problems we are encountering. One is the location - we are in the middle of the countryside, but near enough to London to have many potential candidates sucked that way. The other is the type of people we are seeing. They tend to be people with big corporate backgrounds who have used a framework religiously for the last 5-6 years and now want to go contracting. Unfortunately, that kind of background and mindset doesn't show an aptitude for implementing the kind of cutting edge designs we are working on. I was asked to come up with a description of the person we wanted and I came up with the following:
I think that for the specific projects we are looking for we would ideally like someone with the following experience:
  • Working with video in HTML5
  • CSS animations/transitions
  • Using canvas in HTML5
  • Creating pixel-perfect layouts
I doubt that we will find a candidate who has experience in all these areas, particularly as some of them are quite new and emerging, but if they have strong demonstrable experience (either professional or personal) in some of these or in other cutting-edge front-end technologies (e.g. angular/ember, websockets or other HTML5 stuff) then that would show the kind of willingness to experiment that I think we are going to need for projects such as this.
What do you think? Can I improve upon that as a description? Will it attract the right type of people? Most importantly, do you know anyone who might be willing to come and work in the Oxfordshire countryside who has those types of skills? Please get in touch if you do!

Thursday 5 September 2013

Tuesday 13 August 2013

Heroku pipelines

After an incident this morning when I did a
 git push staging  
instead of a
 git push development  
I decided it was time to look in more depth at the heroku pipelines lab feature, and after a quick look I am very pleased I did. It allows me to just have one heroku remote which I have at the bottom of the pipeline, with staging and (eventually) production further downstream. When we are ready to release to the client for user acceptance testing then we can simply call:
 heroku pipeline:promote  
which sends the development version to staging. No need to retain separate development and staging branches in git now, we can just have the one which we promote.

Tuesday 6 August 2013

Bootstrap dropdowns with checkboxes

I needed to put some checkboxes in a dropdown (we're using Bootstrap so I based it on that) but I didn't want it to close when one was clicked and I wanted the button to update to reflect the values given so I came up with the following:



Works nicely!

Friday 2 August 2013

Chrome preloading webpages

I am probably very late to this particular party, but I just noticed that as I typed in my local web server address into Chrome that a hit was appearing on my web server before I clicked enter, and before any content was loaded onto my screen. It appears that this is a setting in Chrome (Settings > Advanced settings > Predict network actions to improve page load performance).

I was very impressed, but I did wonder if it might have some effect on analytics if the user starts typing in an address but changes their mind - does it run javascript on the page prior to load? Can analytics tell if it is a pre-render or a full render?

Tuesday 30 July 2013

Switching between Mongoid and ActiveRecord

I have recently been working on 2 projects, one using Mongoid with MongoDB and one using ActiveRecord with Postgres. Working so closely with the two pretty much alongside each other I have come to the following conclusions:

  • MongoDB should not be used for relational systems. It might seem obvious, but even if the min body of an application is not relational, there are often relational parts to it, and that can really counteract the benefits. Such relations might include user ownership, tagging, etc.
  • I like the declaration of fields within the model - no need to make external schemas.
  • Having said the above, I also like the discipline that creating migrations forces on you. You can really check each change you make to models and refine them, whereas the flexibility of Mongoid can allow indiscipline.
I think that, for the moment, in most projects I would still stick to a RDBMS unless there was an obvious document-style structure to the whole data that could really benefit from MongoDB.