Starting to speak

March 21st, 2013

I never thought I would write a blog post about this, but last week I gave my first ever talk!

It was a presentation for work about structured data markup as part of our regular frontend forums. As most of the audience were people that I work with on a regular basis I knew that they would be on my side, but I was still terrified of getting up in front of them all and talking for 45 minutes. I don’t like being the centre of attention, it’s not what I do, and due to a lingering case of imposter syndrome, I’m only just accepting the fact that I am actually pretty good at what I do.

So being the focus at the front of the room presenting a talk of my own devising was probably about the last thing that I wanted to be doing.

So why do it?

Conversely I mainly agreed to do this because I knew it was so far outside of my comfort zone. It was a non-technical challenge that would test me in very different ways, and I was intrigued whether I’d actually be able to pull it off or not.

It’s also never a bad thing to put your name out there and improve your visibility within a community or organisation. By nature I am an introvert who is much happier working in the background, and in the short term this isn’t a problem and works pretty well for me. But to move to the next level or to be thought of when a cool opportunity or project comes along, you need to make sure people know who you are and what you do. You need to make some noise even if it goes against the grain. No one else is going to do it for you.

Knowing and sharing are different things

It’s one thing to know what you are talking about. It’s a very different thing to share this knowledge in a concise, instructional and engaging way. I can’t say that I achieved all these things but I tried. It certainly adds to the challenge as well as the fear as you sit there staring at your slide deck, wondering if it’s good enough.

At least the nerves serve a purpose by pushing you to constantly improve your talk as you want to ensure that you’re going to measure up.

Another added bonus is that with all the research and clarification that you do, you end knowing a lot more about the topic than you knew at the start, sometimes more that you actually expected. You may well even gain more knowledge from your audience through their questions and feedback.

How to help yourself

First of all, keep everything in perspective – You are doing this for a reason. You are doing this when others haven’t been brave enough to accept or put themselves forward.

Put yourself in the audience - Think about what you would want to see if you were watching the talk. What questions would you want answered? What areas would you want covered?

Do as much research as you can to make sure you cover all your bases. Preparation is key.

Watch out for scope creep – Recognise when you are trying to cover too much. Don’t be afraid to limit and restructuring your talk if necessary to keep yourself on track.

Breathe and don’t panic – Don’t let your nerves rule you. Always keep your talk outline in mind, then focus on one section at a time and think about whether you’re successfully and simply getting your point across.

Practice, practice, practice! Practice in front of a group of people before the big day. This goes with any form of public performance and is something I actually learned from singing. It allows you to work through the kinks in your talk and you can make changes based of the feedback before taking it a wider audience. You’ll also have taken the first hurdle when it comes to nerves as the next time won’t be “the first time”, you’ll have a better handle on the flow and you’ll have noted any potential stumbling points to be aware of.

Resources

There are many different resources out there that are worth taking a look at.

There are lots of interesting blog posts out there. A really helpful one that I read recently is from Sandi Metz who wrote about dealing with fear for Gorucco.

For the book lovers out there, I’ve heard Confessions of a Public Speaker is a really great read.

This is a very timely post as Day Camp for Developers are holding their fifth online conference tomorrow, all about Public Speaking for Developers. All the speakers are well known on the conference circuit, and if you can’t make the date itself then you can buy a video ticket so that you can watch all the talks later at your convenience. If you’ve ever thought about presenting or speaking, or have already started but want to improve then I would really recommend this.

If you have any other resources that you’ve found useful then let me know and I’ll add them.

So get out there and start sharing your knowledge. Good luck!

Share

Add structured data to your html content

March 20th, 2013

Structured data markup for html has been around for a while, but it can be confusing and isn’t always seen as a priority to implement.

Its usage by the big search engines and other organisations is only going to increase though, so it’s well worth getting your head around it and start marking up as much content as you can to take advantage of the current and potential future benefits.

It seems clear to me that this kind of markup will play an increasingly bigger part in seo as well as allowing the data to be used in other ways, such as a wider variety of rich snippets on the search results pages.

From the schema.org FAQs: “over time you can expect that more data will be used in more ways. In addition, since the markup is publicly accessible from your web pages, other organizations may find interesting new ways to make use of it as well.”

Presentation

Last week I gave a presentation at work to try and spread the word, and at the same time discovered just what a large and interesting topic this is.

I intend to write more on this topic but in the meantime here are my slides. The topics that I cover are:

  • why adding structured data markup is a good idea
  • specific benefits gained
  • the different types of markup – RDFa, microformats, microdata, schema.org
  • some general implementation guidelines
  • helpful tools
  • links to some bit.ly bundles <– some of these are really interesting, I urge you to check them out

Note: I do feel bad blogging about this without having markup on my own blog. I am currently working to redo the design and templates though, so will remedy it soon!
Share

git error setting certificate verify locations

March 11th, 2011

I came across this error having setup a windows vista machine to clone a github repo using msysgit:

error: error setting certificate verify locations:
  CAfile: /bin/curl-ca-bundle.crt
  CApath: none

It turns out it’s just a problem with the path, all you need to do is reset this info and it should be alright:

git config --system http.sslcainfo /bin/curl-ca-bundle.crt

If you run got config -l you can check the git configuration to see exactly what all the settings are.

Share

Magento – product zoom for tall thin images

December 15th, 2010

Current version : 1.4.2.0

While reworking a 1.3.2.3 magento template to work for magento 1.4, I had an issue on a product page where a tall thin image was not being resized correctly by the product zoom javascript. The script seemed to think that the image was small enough to fit inside the image container and so the image was not shrunk and the zoom in bar was disabled, despite the fact that around a third of the image was hidden behind the zoom bar itself.

Digging into it, it turns out that the width of an image is the main dimension used to calculate if the image is oversized or not. But as my image was tall and thin it was the hieght causing the problem and not the width.

I fixed this by simply amending the javascript in /js/varien/product.js.

In the scale function, which is around line 128, change the line that calculates the variable ‘oversize’ from this:

var overSize = (this.imageDim.width > this.containerDim.width && this.imageDim.height > this.containerDim.height);

to this:

var overSize = (this.imageDim.width > this.containerDim.width || this.imageDim.height > this.containerDim.height);

This makes sure that an image is marked as oversize if either the width or hieght exceed the container size, rather than both. Then in the if statement below, amend the first if from this:

if (this.imageDim.width > this.containerDim.width) {
     this.imageEl.style.width = (this.imageZoom*this.containerDim.width)+'px';
}

to this:

if (this.imageDim.width > this.containerDim.width) {
     this.imageEl.style.width = (this.imageZoom*this.containerDim.width)+'px';
} else if (this.imageDim.height > this.containerDim.height) {
     this.imageEl.style.height = (this.imageZoom*this.containerDim.height)+'px';
}

This then resizes the image based on the height of the image if the width is not the reason for the oversize.

Share

Magento payment broken continue button

October 15th, 2010

Current magento version: 1.4.1.1

We recently upgraded a magento site to version 1.4.1.1 as part of moving the site to a new server. Everything seemed to run smoothly with no issues, job done.

However it didn’t take long for  the customer to ring up – ‘My site’s broken, no one can make payments anymore’. Once customer had entered their credit card details they found that the continue button did not work at all, they were stuck on the payment screen. Uh oh, time to dig around checking the server setups, looking for any reported issues with authorize.net (the payment engine being used) and checking into the changes made in the magento upgrade.

Amazingly the problem turned out to be that in latest version of magento, they had included a new javascript file for validating the payment variables input by the user and without this file the payment process would just stop at the card input screen and refuse to go any further.

The solution is simple. Just add the following line of code to your themes page.xml (in the layouts folder) and all should be fine:

<action method="addJs"><script>lib/ccard.js</script></action>

Everything would have been fine if we’d been using the default theme, or if we hadn’t had to override the default page.xml with our own version for our theme.

It just makes me wonder if there was some way that developers could be notified when key changes are made to files, especially to theme files that are overwritten in most installs to avoid such head scratching and long periods of debugging in the future. As far as I can tell this wasn’t even mentioned in the release notes. Do let me know if I’m wrong though and varien do actually release such useful information!

Share

Day Camp For Developers 2010

September 22nd, 2010

On the 6th of November there’s an interesting new online event happening that I wanted to draw your attention to.

Day Camp 4 Developers is an event aimed at all programmers regardless of your favoured language of use, as it focuses more on soft skills rather than specific technical ones (which I’m sure we all like to think we rock at anyway). Soft skills often get overlooked though, which is possibly foolish as they can be key factor affecting our career progression and ability to become a valued well-rounded team member.

I’ve heard most of the speakers speak before and can highly recommend them for their ability to present information in an interesting and engaging way. Even if you can’t watch them live on the day, the sessions will be available for you to watch anytime at your own convenience, so there’s really nothing to stop you!

Check out the sessions here and book here to reserve your place.

Share

jQuery slideToggle and ie7

July 26th, 2010

I had an interesting issue where in ie7, the element that I was displaying using the jQuery slideToggle function, would seem to jump out of place once the animation had finished.

As I was displaying a list, I first assumed that in ie7 the element was adding in the default list margins and ignoring my css. However no amount of fiddling with adding css margins in the slideToggle callback function seemed to sort the problem.

Googling allowed me to find a solution here that worked, although I have no idea why it works.

Basically I needed to add a min-height of 0px on the parent element, and set the height of the ul that I was trying to display to 100%.

Problem sorted!

Share

Magento Products Inc Tax Issue

July 2nd, 2010

I’ve recently been working on quite a complex magento setup, that involves a number of different stores based in different countries.

A problem was reported where some stores appeared to be adding the tax twice in the shopping cart. The product prices had been setup including tax but the tax was then being added again in the cart, despite the tax settings in the admin clearly stating that the product prices already included tax and the cart subtotal should display excluding tax.

So for a moment I panicked thinking that this was going to be some overly complicated bug that I’d need to fix (not what I needed on a Friday).

So in a desperate effort to avoid that I looked around and fiddled with as many settings as I could think of, hoping that one of these would solve the problem, meaning that there was no horrible bug but just some obscure settings conflict. This was a good plan!

Although the tax calculation settings seemed to be correct, the ‘Default tax destination calculation’ was still set to the default country ‘USA’ so I changed this to the correct country for that particular store. I also changed the shipping origin under ‘Delivery settings’ to be the country rather than the default of ‘USA’ and this is what actually solved the problem.

I know this seems like a really simple thing, but hopefully it’ll save someone else a lot of searching around. I also thought I’d better post this incase I come across this problem again and can’t remember what I did to fix it last time! A blog can be a very useful memory tool!

Share

PHP Rounding Issue

June 25th, 2010

So today I came across a wierd rounding issue in PHP, where the round function was just not returning the result that I was expecting. It seemed to be rounding the value down rather than up.

Passing a float value of 14.875 (generated by a multiplier calculation) I was expecting the result 14.88 but was actually recieving 14.87. Reading around I know that there are a few issues and difficulties when it comes to dealing with float numbers, precision and rounding, though later versions of php may well handle these slightly better (on this project I’m using php 5.2.6, running on Ubuntu 4.6).

The easiest way that I found to get around the problem was to turn the number that I sent into round into a string, simply by concatenating an empty string on the end, eg round($value.”). I think that this then makes the value a simple string of 14.875 that can be easily rounded rather than a float that is susceptible to the nuances of precision rounding, though I’m really not an expert and simply speculating here.

This also may not be the best or most elegant way to sort this problem but it worked for me.

If you know of a better way to get around this then do please let me know, I’d be really interested to hear how other people have got around this issue.

Share

Rendili Web Writing Tips

March 29th, 2010

As my blog has been relatively quiet recently, I thought I’d take this opportunity to let you know that an article I’ve written about how to write for the web has just been published on my company’s website.

I work for a small company called Rendili, and you can find my article here.

I hope that it’ll prove useful, and if anyone wants to make any comments or add anything then please feel free to post your comments here on my personal blog.

Thank you!

Share