Friday, 24 May 2013

Why does everything take so long?

Most of yesterday and today I just spent uploading some of my Vis-UV-IR flower photos to various websites (Wikimedia, Flickr, DeviantArt, Google (PicasaWeb). Most of the time was taken up writing the titles, descriptions, and tags for each photo. For some sites you can copy-paste the info (but that's still 3 things to copy-paste per image). Other sites use different text formats (e.g. no html allowed vs html allowed), different tag formats, and different max lengths for each of them. So some re-writing, trimming of tags, reformatting, etc. had to be done as well.

In the afternoon I found the map on my photo website was broken. I'm sure I checked it before, but it was most definitely broken and probably has been for a while. So I fixed that.

Then I validated the page and found some errors. I run the page through YUI compressor, and this had removed spaces between html attributes, which according to the W3C validator, is not valid HTML. After doing some checking, I found that the YUI compressor is only designed to minimize JS and CSS, not HTML. And further to that, it is no longer maintained by Yahoo, and they suggest using uglifyjs and CSSMin instead. (YUI compressor is still being maintained, just by volunteers rather than Yahoo).

So I tried installing uglifyjs, but then that needs node.js to run. So I've downloaded node.js, but haven't built it yet.

Right now, I'm going to clean out some of my open tabs from Chrome, so I might as well post the links here in the slim chance I want the same info again and find this blog post.

The first one was HTML5 DOCTYPE Declaration. I was modifying my XSLT the other day, and you need to specify "about:legacy-compat" as the doctype system when outputting html as html5. So that reference just shows that <!DOCTYPE html SYSTEM "about:legacy-compat"> is a valid doctype declaration for HTML5.

For my photo tips website I use a lot of CC licensed photos from Flickr. I create screenshots of the images as proof of the CC licence. But there is actually a free service you can use to store a proof of the CC license for free. Probably this would be more robust if you were taken to court, since it is a third party service, and with a screenshot it could be argued that you might have modified it. Here's the info: ImageStamper: CC license witness service.

I am a member of the Nikonians.org website, though not a paying member, so mainly I just get emails from them, and can download / view the Nikonians e-Zine magazine that they produce. It turns out that they have a partial rights-grab clause in their terms and conditions that means they can keep using any image you upload there for all time, and use it to promote themselves with no recompense to the photographer: Nikonians.org Rights Grab.

The Rights grab is not as bad as many websites, since they limit the usage to the service they offer and promoting that service. Many other websites grab full rights allowing them to use and sell the image for any purpose. But it is still bad that a website, designed for photographers (and supposedly run by photographers), would perform such a rights grab that you cannot remove your photos or stop them being used for promotional purposes.

Lastly, on sitepoint they had a bit of discussion about using a CSS pre-processor. But while they said how they can save a lot of time, were very helpful etc, they didn't actually explain how they are useful and save time. But someone did post a link to CSS-Tricks: Sass vs. LESS. And this does give a better description of how they might be useful.

I can't really see variables / mixins being too useful personally. If it was dynamic CSS, they would be. But LESS and SASS are both about building out a static CSS file, not dynamic.

What did look semi-useful was the ability to get all the different vendor-prefixed properties (which sometimes use different formats) from just writing one standard property. The other thing was that rather than having the rules for a class split across multiple media-query sections, you can specify the media-query parts of that rule within the main class (or whatever) definition. So it makes it easier to see what effect that declaration has, and how it changes depending on a media query.

I'm not convinced they would be useful for my work as I don't use enough properties that need all the different vendor prefixes to make it worthwhile, and I don't use media queries at all at the moment. But I can now see how they could be useful.

In the evening I watched James Bond with Mauser and Diddle Bo. We had Fish & Chips from the Chip shop. Yum! And I played on Civ IV a bit.

Wednesday, 22 May 2013

Metadataring

The last couple of days I have just been writing articles for my photography tips website. Yes, it took me a whole day to write each article.

When doing my backup each morning, I noticed that Synkron was all copying lots of files in my 'Internet Stuff' folder, even though these files shouldn't have changed. On looking into it, I found that Synkron was following symbolic links to files, and copying the file instead of the link. Next backup it would do exactly the same thing.

On looking further into it, I also found that Synkron was not backing up directories that were symbolic links, nor was it backing up the link to the directory. So there were a few issues for me here:

  • Links to directories not backed up (possibly because the links were pointing to directories that did not exist)
  • Linked files being backed up instead of the links
  • Files being needlessly copied every backup

I seem to be using the latest version of Synkron (1.6.2), and I couldn't find any info about whether it can be set to copy links and not follow them. So I am going to have to split my backup process into two, using Synkron for one part, and Beyond Compare for the other part.

The thing I like about Synkron is that you can backup from different locations on different drives to locations on a single backup drive, through it's use of tabs. Just set up a new tab for each location you want to backup from / to, and then choose 'Sync all' to run through all the tabs. All other backup software I've used assumes a straight sync with the same directory structure on your backup drive and a single drive you are backing up. One solution to this is the use of links, but since I don't want links followed, this wouldn't really work.

So I am splitting my backup process in two, I'll have to first use Beyond Compare to backup files from one disk that are have the same structure on the backup disk. Then I'll have to use Synkron to backup files from varied locations on another disk.

After sorting that out, I spent most of the rest of today writing descriptions and adding metadata to some photos.

In the afternoon and evening I also played on Civ IV for a bit and watched an episode of Sliders and wrote up a recipe.

Sunday, 19 May 2013

An SEO services spammer was actually helpful! (But not for SEO)

The past week I've been corresponding with one of those annoying people that spam you offering SEO services. I replied to their original email that said they would give me a website analysis just to waste their time more than anything else. In their analysis they said the following:

First of all your website needs to fix all On-page factors I mean proper title fixing, meta keywords and description fixing for all pages. You know Google gives more importance to meta elements. So we should fix all these points according to Google guidelines.

Also your website having no facebook fan page, twitter page and many more. If you do SMO work, you can get some traffic from Facebook, twitter and many more websites.

Your website having very very less backlinks. Also your main keywords are in TOP position in Google. If your main keywords will be in first page, you can get more traffic towards your website.

Also your website having no XML sitemap. Which is important at search engine point of view. Please let me know if you need any more information from our end.

Let's break that down:

First of all your website needs to fix all On-page factors I mean proper title fixing, meta keywords and description fixing for all pages.

I'm pretty sure all my pages have a 'proper' title. Admittedly, not all the pages have meta keywords and description tags. Adding them would be very time consuming due to the large number of pages.

You know Google gives more importance to meta elements. So we should fix all these points according to Google guidelines.

Well, Google doesn't give any importance to the keywords meta tag. Google does make use of other meta tags, but they won't help you rank better. A well written meta description tag could help with click-thru rate though. Maybe they should read the Google guidelines on meta tags.

Also your website having no facebook fan page, twitter page and many more

I do have a facebook page for the website and a twitter account (plus flickr, pinterest etc).

Your website having very very less backlinks

My understanding from the Google Webmasters forum is that creating backlinks for the purpose of SEO is likely to see your site dropped or banned from Google. There are plenty of people posting in there that hired a firm to do 'SEO' for them only to then find their site removed from the search index or having their position in results dropping a lot.

Also your website having no XML sitemap.

My site has an XML sitemap.

The bit that particularly made me think this SEO service was completely useless was that they said the site had no sitemap. Checking that is simple.

After a few back and forth emails, they sent me a screenshot to show the error with my XML sitemap. It was a screenshot of Firefox showing an error that stated the XSL stylesheet was served with the wrong mime type. (I use an XSL stylesheet for styling the XML sitemap for human readers. I hadn't noticed this error before as in Chrome the sitemap renders without any errors.

I looked into this, and found that the XSL was being served with a mime type of text/html. The XSL file on the server is actually a PHP file, so I opened it up in my editor, and it had near the top

header("Content-Type: application/xml; charset=utf-8");
. So I couldn't work out why the file was being served with a content-type of text/html. I thought that nginx (my web server software) must be overwriting the PHP generated header.

But after looking into it a bit more, I realised the problem. In the file I was starting an output buffer, including the file that has the top of my page template, and then emptying the buffer into a string, to use the file as part of the XSL. Now, in the top of the page template file, it sends a content-type header of text/html. The output buffer doesn't capture headers, so this header was replacing my previous content-type header of application/xml.

The solution was simply to move the application/xml content-type header to down below after the top of the page template file was included. This way the application/xml content-type header replaced the text/html content-type header, instead of the other way round.

So my email to the SEO shyster was actually useful since it helped me find a bug in my site I wouldn't have noticed otherwise. (The bug had been introduced when I switched my site from XHTML 1.1 to (X)HTML 5).

But they were still wrong about the site not having a sitemap. I'm pretty sure Google et al. don't care whether your sitemap has an XSL stylesheet, or whether that stylesheet is served with the correct mime type or not. Certainly, there haven't been any notices about it in GWT or BWT.

Saturday, 18 May 2013

Watching seminars

Yesterday, I was fixing a problem with my photography website to do with how the flash settings of the image were stored in the database. One of the things I noticed was that a lot of photos had Off, Did not fire as the flash value, when I knew that flash had been used. I checked the EXIF of the original image, and that had Off, Did not fire, so it wasn't a website related problem. I also checked the exif flash setting stored in XMP, as to be expected, it had the same value as the exif value.

Looking into this, it seems that when the camera fires a 'dumb' flash, it has no way of telling whether the flash fired or not, and so it records the flash value as being off. (See discussion here: Does my exif lie to me?). In my case I was using a 'dumb' radio trigger in the camera's hot shoe. So, there is not a lot you can do about this. I do try to record my camera 'setup' in the XMP metadata, so I can write there that flash was used.

But it is still a bit annoying, as it means there is no way to search through your images to find only ones where flash was (or wasn't) used. A hack to get round this could be to always set your white balance correctly e.g. use flash when shooting with flash, use daylight when shooting in the sun, etc. But would I remember to actually change it every time I change light source? No, most of the time I would forget.

The past week I have been watching photography seminars on Creative Live. Both of them are to do with portrait photography, which I am not particularly interested in, but I still enjoy watching them. One thing that does annoy me about them is that they keep asking questions from the chat rooms that the presenter has already answered. It seems to be a common theme in everything today that people just don't pay attention. If you're not going to listen to what the person is saying (or writing), why bother asking a question (or replying)?

The first set of seminars I watched was called 'Crazy, Stupid Light' with Scott Robert Lim. On one of the sessions he told a story, emphasizing the fact that for Creative Live to continue broadcasting free seminars, they need cash to survive (and so you should buy the seminar download). Creative Live makes money by selling downloads of the seminars. If you purchase while the course is running, the cost is $99. If you purchase after the course has finished, the cost is $150.

For three days worth of workshop teaching from an expert in their field, that seems like very good value to me.

But this did make me wonder why he had told that story. Did he just want to boost sales of his course? Or is Creative Live actually having financial difficulties and could actually be cancelled due to lack of cash? Their productions are pretty high budget, they have a nice studio, multiple cameras, two compères (that ask the questions from the internet and keep the show on time), and a whole host of other people behind the scenes.

One would assume that they must be making piles of money to afford all this. If they aren't making money, they could cut down on production costs significantly. People watch Creative Live (and most other learning / tutorial videos) for the content, not the production.

The second half of the week was 'Fine Art Portraits' with Brooke Shaden. Yesterday she was showing how she edits her shots, and to me (and from the sounds of it, many other people), her editing process is horrendous. But she is happy with how she does things, and gets great results.

As an example, she applies curves directly to the image, rather than using an adjustment layer. She wanted to brighten the models arm, so she selected the arm, feathered the selection, then applied curves to brighten. She than had a slightly bright halo on the wall around the arm, so she made a rough selection of the area, feathered, then went to curves and dropped down the white point of the curve.

Personally, I would have used a curves adjustment layer to brighten the image, then used a layer mask to paint the effect in over the arm. If I painted too much and created a bright halo, it's just a case of painting out the halo on the mask. However, her technique might actually work better, certainly her result looked nice and seamless with nothing obvious to show that the lighting had been manually adjusted in post.

Friday, 17 May 2013

I do not want them Sam I am

This morning I updated the CTH website and prepared my pog website update.

In the afternoon I finished preparing the pog website update, and fixed a problem with my photo website.

When trying to fix my photo website I would get an error errno: 150 in mysql when trying to drop then add a table. Eventually I tracked the problem down. I was changing the type of a column from INT(10) to TINYINT(2), but this column was referenced from another table with a foreign key constraint. The column type in other table was INT(10).

This thread on stackoverflow was very helpful in helping me discover the problem: MySQL Creating tables with Foreign Keys giving errno: 150. The column with the foreign key constraint and the column in the other table must have the same type (also including being unsigned or signed). Having FOREIGN_KEY_CHECKS=0 does not affect this.

The problem with this was, how do you change it? You can't alter either of the columns because the other column will be of a different type and cause the error. It's a bit of a catch 22 - You can't alter the referenced column type because it will mismatch with the column that has the foreign key constraint on it. But you can't alter the column that has the foreign key constraint on it because it will mismatch with the referenced column type.

The answer is to drop the foreign key constraint, modify your columns, then add the constraint back again. Info on that I found at stack overflow again: How to alter Foreign Keys in phpMyAdmin.

In the evening I watched For Your Eyes Only with Mauser and Diddle Bo. Very maniacal.

Monday, 13 May 2013

Dag Nabbit

I spent most of today writing an article for my photo tips website. In the evening I watched 'Crazy Stupid Light' with Scott Robert Lim on creative Light, a seminar on using speedlights. Although the info he gave out was fine, it was all too basic for me really. He also said Is that not correct? a lot, which I found annoying.

Saturday, 11 May 2013

Looking for arms

This morning I was feeling sleepy and forgot about making Melonpans for breakfast, so I didn't get up until nearly 8am. I started making the Melonpans about 9am, and then had them in the oven for rising about 10am. But they didn't rise very well (the dough had been frozen and then defrosted in the fridge). They needed about an hour to rise instead of the standard 40 minutes.

While I was waiting for the melonpans to rise I looked up arms for holding flashes. I had looked at flexible macro flash arms yesterday, but the max weight rating meant they were only suitable for holding small flashes. I wanted the arms to be able to hold my Vivitar 283 flashes for UV photography, and they weigh over 500 g each.

After a bit of searching I found this article: Flexible Friction Power Arms for DSLR accessories, which shows a strong arm that it jointed in the middle and at the ends. Unlike a macro bracket, which attaches to your camera, this arm needs to be attached to a clamp, which you would then clamp to your tripod (or anything else).

Looking on ebay, there are lots of very similar items, varying quite a bit in price. According to the article, the one they reviewed was produced by a company called Vibesta. Amazon sell both a 8.3″ arm and a 4.2″ arm made by Vibesta. However, the product linked to from the article has a 29.5 cm length (approx 11″). Most of the ones on ebay are 11″. So it's not very clear whether the 11″ arms are cheap knock-offs (that may not be as good as the Vibesta product) or are the same thing, just without the Vibesta branding.

Vibesta do have a facebook page. But this hasn't been updated since Feb 2011. So that doesn't give much help on what products they actually produce right now or where they can be purchased from.

Wednesday, 8 May 2013

Greenfronts

Today I was trying to fix my photo website so I could upload some new photos. After I fixed it then I uploaded some photos.

Tuesday, 7 May 2013

Writing

This morning I finished off a photography tips article that I had started writing yesterday.

After lunch I spent a couple of hours looking for a subject to write another photography tips article about.

I didn't find anything, but then thought of an idea myself. So the rest of the afternoon and most of the evening I was writing that article.

In the evening I also watched an episode of Africa (BBC Nature documentary) with Mauser and Bo.

Monday, 6 May 2013

Cooking without dog

This morning I started writing an article for my photography tips website. Then we all went out on a walk. We had a packed lunch in the car after the walk.

In the afternoon I finished putting together the Bee house, and it is very shoddily made (by me).

The rest of the afternoon, me, Mauser, and Bo made Chicken meatballs and Inarizushi. (Cooking with dog recipes).

We didn't have a lot of the ingredients, like Yam, Potato starch, Ginger root, Carrot, the proper type of seaweed and we ran out of Soy Sauce. Also the rice needed a lot more water and the wrong type of seaweed we used on it just dissolved (you are meant to remove the seaweed). The chicken meatballs got stuck to the pan when cooking them. We only had time to soak the dried mushrooms for about 45 minutes, when they were meant to soak overnight.

But despite all that, it turned out really nice. I don't actually like the seaweed rice that much, but it did taste like proper Japanese rice (Sushi rice was another thing we didn't have).

In the evening I tried to help someone with their printer that wasn't working. It was a wireless (WiFi) printer. The printer was connected to the router okay, and the laptop was connected to the router okay. The router showed that both were connected okay. But despite this, the computer could not see the printer. (It was working fine with the printer previously and the other computer had stopped being able to see the printer as well).

I tried re-setting up the WiFi connection on the printer, and various other things, but just could not get it to work.

Eventually I went on Kodak Live chat support, and their support agent took over control of the computer (with my permission). Then they asked us to switch the router off and on again in 30 seconds. So we did that, and then the computer could see the printer. I'm pretty sure they didn't make any changes on the laptop at all.

I really hadn't considered the router being the problem, since both the computer and printer could connect okay to it. But at least now I know for future reference.

Saturday, 4 May 2013

Bee house building

Today I made a couple of Bee houses by drilling holes in blocks of wood. I used the instructions here: How to make a Bee Hotel: a house for Mason Bees and other Solitary Bees. There are lots of red Mason bees that keep buzzing around the old bee house, which still has some tubes blocked up (either bees have died or not hatched yet). So I thought it would be sensible to provide some new homes for them.

I also did a bit of work on my photo website as some changes I made mean I can't add photos to it at the moment.

And I recorded a couple of records to my computer.