VisualPerceptions

Contributors


Studio Session :: Self

Posted By: Cat Ashton on February 28, 2010 09:05 PM

This week I ended up in the studio on recommendation of one of my tutor. To get comfortable about going into the studio before taking other people in there for a project I’m currently doing for my degree.

I was given the choice of two cameras, a Fuji 6×9 (which I used in first year) and a Mamiya RB67. I thought I’d play with something I’d yet to have time with so chose the Mamiya with a 120 back.

The exercise started with me shooting a film with my eyes closed.

Self portrait in studio

Self portrait in studio

Self portrait in studio

By the end of the exercise I had my eyes open and trying to pose - you would not believe how hard I find it to pose in front of a camera!

Self portrait in studio

The lighting was setup in this way so that it would not distract from the simplicity of the photographs themselves.

The aim of the session was to get me to look at simple lighting akin to David Bailey, Sally Man and Richard Avedon to try to open up the possibilities of a series of portraits I’m currently shooting. I may have more from this set (I’ve got photographs of two other people too and if they will let me post them I’ll share them with you lot!).


Blog Maintenance :: Portfolio

Posted By: Cat Ashton on February 28, 2010 08:36 PM

This afternoon and evening I have been doing some light maintenance on the site - removed the old Print Sale page and added some new things to the Portfolio page

Hope you have a look over there. Got a few things to write about - hopefully I’ll get time to get them online tonight!


Pink Tentacle

Posted By: Cat Ashton on December 08, 2009 10:49 PM

Recently I’ve been knitting toys - little toys. I’ve also been making my own patterns up. The patterns are going to be made available at somepoint.

Pink Tentacle

May I introduce Pink Tentacle (they will be renamed I’m sure by the final owner!) - this is the only Pink Tentacle.

Bill Detail

This tentacle took a few hours to make. I’m quite proud of this one - the wool isn’t the easiest to work with and its much finer double knit than I’m used to working with.

Sucker Detail

These suckers are just fantastic if I do say so myself!

I hope that Pink Tentacle is happy in their new home after the 25th December.


Contact Theatre Project - #follow_me

Posted By: Cat Ashton on November 23, 2009 04:32 PM

A couple of weeks ago I was at Barcamp Manchester 2. We were wonderfully hosted by Contact Theatre. Since BCMan2 they have started a project for a new show #follow_me.

To quote @contactmcr

“Are you going to join in? You need your face,paper,pen&camera”

I think that everyone should get involved - Contact are a great venue and wonderful people. Its also a very simple project to get involved with.

This is my offering

#Follow_me

The rest of the photographs are on Flickr.


An Android App In 20 Minutes

Posted By: Kian Ryan on October 19, 2009 12:48 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.


Wikimedia Photo

On Saturday I presented a short talk on building a basic android application in 20 minutes. This was the full process, from generating the shell project, to writing the code, generating the layouts, testing on the emulator, signing the application and uploading the binary. I wasn’t able to do this as “live” as I would have liked - I’ll perfect the routine in time for Barcamp Manchester, but the group did a good job of being a dummy audience.

For those interested the application is called “Barcamp Blackpool” (available on the Marketplace). It downloads the latest 20 tweets with the bcblackpool hash tag and displays them as a list. Clicking on an individual item will then launch a browser session showing the tweet on the twitter website. Basic but functional. The source code for the application is available on Google Code.

If there are other things people would like to see in a 20 minute Android demo - please feel free to comment on this post and I’ll see what I can do for Barcamp Manchester.


Social Bookmarking


Barcamp Blackpool

Posted By: Kian Ryan on October 19, 2009 12:47 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.


Photo by Josh Semens

This weekend saw the first Barcamp Blackpool, held at the Blackpool Pleasure Beach. Many thanks go to @ruby_gem for organising the event, and to the various sponsors, including Yahoo for sponsoring the all important bar and Pixel Programming for ensuring we had a venue and noms. My apologies to to all those I may have caused hangovers to for the following day. We also managed to lose Phil Winstanley for a few hours.

Talks were wide ranging, from some light-hearted ones on upcoming social network Pokebook through to code reviews of the new W3C website and my own talk on building and publishing an Android application in 1 hour 30 minutes 20 minutes (code to follow).

Evening entertainment was provided by Paul Sylvester, who provided the BEST MAGIC SHOW I HAVE EVER SEEN (don’t let the website fool you). So much so, there’s speculation about hiring him for one of the next Geek Girl Dinners.


Social Bookmarking


You know, XKCD is right…

Posted By: Kian Ryan on October 19, 2009 11:05 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

XKCD - Bag Check

You know, it’s absolutely right. We’ve got so obsessed over security of liquids, toothpastes and belt buckles that people appear to have overlooked that laptops, iPods and mobile phones are potentially a hell of a lot more lethal. Maybe we should just point to all people with beards and laptops and scream “terrorist” instead.


Social Bookmarking


Food :: Cooking and Photography

Posted By: Cat Ashton on October 14, 2009 03:50 PM

Pork Wontons

Recently I’ve been on a bit of a splurge on cooking real food. Kian’s dad took me to Wing Yip’s Manchester store just before university term started. I picked up many things including stuff to make wontons.

If you fancy some let me know - I’m happy to make more here at Tentacle Tower.

I’ve started a gallery for Food photography. I’ve been doing much of it lately. I seem to be enjoying cooking and the photography that goes with it.


Lactose Free* Hot Chocolate

Posted By: Cat Ashton on October 14, 2009 03:14 PM

Lactofree Hot Chocolate

For months I’ve been trying to find something I could claim as a “Cat Safe” Hot Chocolate. Now, most cafes pile on cream, most powder versions have enough skimmed milk powder in them to trigger my intolerance and most chocolate bars I have to consume in moderation so I can’t use it to make a Hot Chocolate. Well that changed when I found that I could eat Aero - I somewhat love Aero. Somewhat hate Nestle, but I can’t do much about that.

Dried Skimmed Milk itself doesn’t seem to affect me much.

Ingredients for “Cat Safe” Hot Chocolate
Aero 4 mini treat size bars (around 40g) (of which is ~6g milk solids of that between 0.12g and 0.48g may be lactose)
a mug full of full-fat milk (lactofree or normal)
a tiny grating of nutmeg
a handful of marshmallows

Method

  1. Heat the milk and chocolate over a gentle heat - DO NOT BOIL! Keep on heat until all the chocolate is melted in.
  2. Once the chocolate is combined with the milk grate in as much nutmeg as you like (you can leave it out if you don’t like it!)
  3. Pour into mug (for preference a Large Mug).
  4. Cut up some marshmallows and top. (May need a spoon to consume this awesome drink/dessert.. )

*It may not be strictly Lactose Free, but it hasn’t upset my body so I’m happy to say I can make it again for me.


Manchester Geek Up October 2009

Posted By: Cat Ashton on October 14, 2009 11:53 AM

Paul Robinson and Orange Tentacle

Last night was this month’s GeekUp Manchester. Due to a few issues with the venue (including GeekUp being double booked, shifted around at a drop of a hat, and last night being told as we arrived that they had a private party until 10:30pm!) we’ve moved to Pitcher & Piano, Deansgate Locks. That’s right, we’ve moved next door. Better WiFi, nicer snug, better lighting and less music!

I’ve put a selection of my photographs from last night.


Fundamentalists Welcome

Posted By: Kian Ryan on October 11, 2009 05:45 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Our industry is passioned and opinionated. This is a statement of fact. Be it Emacs vs Vi, Linux vs Windows, iPod vs … errr[1], people often fall in love with tools, philosophies and companies. And this is fine. Within the industry we call them “holy wars”, since the genuine fundamentalists have gone long past the tenets of logic and rationale (at least to the naked eye).

And like all good religions, their virtuous leaders are exalted[2]. Ballmer, Jobs and Stallman, each seen as personifications of the ideals they represent. Ballmer identifies with the corporate world, where big commercial software dominates. A big man with a bald head and a known temperament, he’s a figure people associate with boardrooms and big money. Jobs appears as a slight of a man, usually seen at keynotes with a trademark roll-neck and jeans he’s become the representative of design and cool, embraced by the younger generation. Stallman is another large guy, but rather than corporate groomed appears in t-shirts with long ragged hair and beard to match. A visual throwback to the hippy days, he comes with the embodiment of “free”, leading the free software revolution.

As any good personification of an ideal, their attitudes and ideas tally with their images. Ballmer has spoken repeatedly about the values of the corporate workplace and denounced free software as evil, Jobs speaks regularly on the functions of design and Stallman denounces any software or standards not truly free as evil.

And this is fine.

Because these contrasting attitudes set up a triangle of views with these figureheads and beliefs as cornerstones. There are those that will naturally gravitate towards these polarising opinions and those that will middle around the centre, or leaning between two points of view, subscribing to different tenants of each.

Some people will insist on using nothing but free software. Some people will insist on using nothing but beautiful, design driven products. Some people are driven by the business world and purely by suits and management. Some people may be primarily driven by business, but enjoy rollneck sweaters and iPods at the weekend. Some people may use free software on top of their proprietary systems. Some people may use free software on top of their business OS to talk to their design driven MP3 player[3].

And this is also fine.

The strength of a community is based upon the mix of people within it. Even within domain-specific communities, there will be a range of philosophies and beliefs which everyone will not subscribe to. And although we may occasionally decry these firm believers, and believe them to be as much a fundamentalist as their own religious leader we should respect (even if we disagree) their position because they provide the cornerstones of diversity for the community. The more diverse a community, the larger the range of interests and the higher the liklihood of intelligent (if sometimes a little crazy) discourse. The better the quality (not necessarily quantity) of debate, the more life exists within a community, and the higher the longer the community is likely to last. I would like to see those communities I take part in last for a very long time.

Humanist vs Belief
Free vs Commercial
Pragmatic vs Puritan
Emacs vs Vi

So I say welcome to the fundamentalists.
I say welcome to the middlers.
All communities need both.


[1] I’m kidding, there’s plenty of alternatives. I use a Sansa Clip myself. [2] For the sake of simplicity, I’m restricting the set to three. I realise that in reality the triangle is more like a multi-sided polygon, but it creates a more dramatic image this way.
[3] Did I get all the combinations there?


Social Bookmarking


Internet Explorer User-Agent Strings

Posted By: Kian Ryan on October 01, 2009 05:38 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Internet Explorer can be a right PITA when it wants to be. I’m using Thickbox to render on page dialogues in one of my projects. Thickbox relies on testing $jquery.browser.version for determining the version number of Internet Explorer.


!(jQuery.browser.msie && jQuery.browser.version < 7

Apart from the fact that it doesn’t always work. Below is what you would expect to be presented as a user agent string for IE8:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; 
.NET CLR 4.0.20506; InfoPath.2)

So far today, I’ve seen three customers with the following string

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; 
.NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 
3.0.4506.2152; .NET CLR 3.5.30729)

Somewhere, somehow, the user agent string has become corrupted (and hence the MSIE 6.0). There’s some information on this available on Microsoft communities.

The way around this is to do some explicit regular expression checking on the useragent string. For those that didn’t know about this previously, it’s demonstrated by Jamie Thompson. He introduces a new property called $.browser.msie6 which is used to check for the presence of the IE6 string without the IE7 string.


$.browser.msie6 =
    $.browser.msie
    && /MSIE 6.0/i.test(window.navigator.userAgent)
    && !/MSIE 7.0/i.test(window.navigator.userAgent);

You then adapt thickbox.js to test for this new property.


if ( !(jQuery.browser.msie6)) { // take away IE6
    $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}

Which works great for IE6, great for IE7, fine for vanilla IE8 (which doesn’t suffer from the above bug), but falls down on corrupted IE8. Not to panic, simply adjust $.browser.msie6 to look for this additional string.


$.browser.msie6 =
    $.browser.msie
    && /MSIE 6.0/i.test(window.navigator.userAgent)
    && !/MSIE 7.0/i.test(window.navigator.userAgent)
    && !/MSIE 8.0/i.test(window.navigator.userAgent);

The downside to this fix is that if and when Microsoft comes out with Internet Explorer 9, then you’ll need to adjust this script again to take this into account. I therefore propose a slight departure, using regular expressions to test for values above 6:


$.browser.versionOver6 = function() {
    var re = /MSIE (\d+)/ig;
    var match;
    while (match = re.exec(window.navigator.userAgent)) {
        if (match[1] > 6) {
            return true;
        }
    }
    return false;
}</p>

<p>$.browser.msie6 =
    $.browser.msie &amp;&amp;
    $.browser.versionOver6();

This modified version should work on all future versions of IE. Browsers which report a MSIE 6.0 as well as a MSIE 7.0, MSIE 8.0, MSIE 9.0, etc will now also report as not IE6, which should make filtering off IE6 fixes a little easier.

Enjoy.


Social Bookmarking


ScottyGu :: The Guathon

Posted By: Cat Ashton on September 29, 2009 08:52 PM

Firstly, I would like to thank Phil Winstanley and Mike Taulty for hosting and arranging today’s showcase and pubbing (with a big thank you to Phil for letting me know about it and letting me come along with cameras in tow!).

So, at the Printworks Odeon, Manchester today I went to Guathon. I was there to see a showcasing of ASP.NET MVC2, Visual Studio 2010, .Net 4.0 and SilverLight 3 given by ScottGu. Honestly, I’ll leave folks with much more knowledge and with interesting things to say discuss those (although there seemed to be a few cool things that are coming in the new shinies)- I went along to photograph the event.

After the showcase I managed to get a quick photoshoot in (around Scott answering further questions about his various projects…).
ScottGu
Scott Gu
Single strobe (Canon Speedlite 580EXII with built in fill card used) camera left ~1-2ft off subject on the desk set @ 1/32th power.

The rest of the gallery from the Guathon.


Guathon - After Tea

Posted By: Kian Ryan on September 29, 2009 03:44 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Here we go Visual Studio 2010 & ASP.NET 4.0

[Please note these posts are done from my G1. Typos and errors may/will/are included].


Social Bookmarking


Guathon - Before Tea

Posted By: Kian Ryan on September 29, 2009 01:17 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Covered so far:


Social Bookmarking


First Techcrunch - Now Forbes

Posted By: Kian Ryan on September 28, 2009 09:53 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Polanski

Apparently, hitting the “publish button” on articles that aren’t finished, or in some cases even started is all in vogue this year. First of all techcrunch manage foot-in-mouth syndrome over Spingate, and now Forbes has managed one, publishing an internal memo or note over the Polanski affair. Link available as long as it’s live.

This begs several questions:


Social Bookmarking


Fencing for Geeks

Posted By: Kian Ryan on September 23, 2009 08:06 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Sheffield Open 2006

Since a few people have been asking recently… I am currently coaching at two clubs in the North-West: Manchester and Altrincham. Beginner geeks are welcome to turn up to either, and will be welcomed by a smile and a circuit board.

Manchester - Manchester Fencing Club
This club caters for all fencers from beginners to international.
I’m here every other week (other coaches are availible at other times). Ping for details.
West Hill School, Stalybridge, SK15 1LX
Thursday 1900-2130

Altrincham - Salle Kiss This club is a new club, currently catering to beginners. A good environment for beginners to feel comfortable.
Altrincham Grammar School For Boys, Altrincham, WA14 2RS
Wednesday 1900-2100

Fees vary from club to club. For your first session, stick a tenner in your pocket and you’ll get plenty of change (I don’t handle money and can rarely remember what fees are from one week to the next).

I’m horribly unfit!

Isn’t that the point? Seriously, we cater for all shapes, sizes and fitness. Turn up and give it a try. The sport is fun, addictive, painless (mostly) and we provide all the kit you need. Just bring yourself, a pair of trainers or squash shoes, tracksuit bottoms and a t-shirt. You’ll want some water and a towel as well.

To make it a bit more fun (and to leave out those first week blues), why not organise a couple of you to turn up together?

Oh, and you’ll get to hit me in a large leather jacket repeatedly. What could be more fun?

Interested?

Drop me a quick e-mail or comment to let me know you’re coming. It’s also useful to know how big you are (chest size and height) so I know if I need to grab some larger jackets from elsewhere.

But I’m a Foreigner!

Not a problem - there are plenty of clubs out there. Have a look at the British Fencing Club directory, and contact the club secretary (using that old-tech thing called a phone). That’s why they’re listed.


Social Bookmarking


Ecommerce Headaches - Prices &#038; VAT

Posted By: Kian Ryan on September 21, 2009 03:05 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Hector the Tax Inspector I felt this warranted a blog post.

I’m currently writing an e-commerce system for some very nice people which is quite literally all-singing, all-dancing. When we originally wrote the prices part of the system, we had a very serious conversation about how pricing and VAT would be handled. It went something like this:

Client) We want to store prices inclusive of VAT.
Me) Are you sure? Inclusive of who’s VAT?
Client) We want the prices to be nicely rounded, and then we take the VAT off the total price.
Me) Are you sure? This has some interesting international implications.
Client) Yes, we’re sure. Here - go do pretty things.
Me) Ok.

Seems fair enough. They want pretty rounded prices on the site which meant they didn’t have to think about VAT. Which is great for working in the UK. Then I received a change request asking us to display the VAT dependant upon which country the user was purchasing from. This would still be calculated as a percentage of the earlier specified total price.

Me) So if the user’s country has a VAT of 90%, you’re happy to only receive 10% of the total sale value?
Client) Erm…. Ah.

This is a little extreme, no-one as of yet uses a VAT of 90%. The UK has a rather modest 15%, but countries such as Norway have a rather more eye-watering 25%. Admittedly, if you’re shipping to Panama, you’re quids in, since VAT is only 5%.

There are several different ways pricing and VAT can be managed on an e-commerce site. When I brought this topic up in an IRC channel I frequent, I thought the following exchange illustrated the complexity and confusion rather nicely:

15:17 <@ccooke> kian: you need to store the VAT on the exact item at the exact moment it was stored.
15:18 < kian> ccooke: no you don’t.
15:18 < kian> ccooke: hold. for which scenario. a, b or c?
15:19 <@ccooke> which one’s which?
15:19 < kian> ccooke: a) static price, flexible VAT b) static base price + UK VAT, remove VAT add countries VAT, c) Price Ex VAT + WhateverVAT, d) sod this - pub.
15:20 <@ccooke> d!
15:20 < kian> I’m with you. Be there in three hours.

So, for your interest and ponderings, here are the three options I see:

Fixed Price, Flexible VAT

Price is stored, inclusive of VAT. VAT is calculated as a percentage of the price at point of sale with respect to the user’s country. So if you buy from the UK, you’re paying £100 of which 15% is VAT and if you buy from Norway, you’re paying £100 of which 25% is VAT.

Pros: Nice pretty prices. Cons: The amount of money you return from each sale is dependant upon where the user purchases your item from.

Price + “Home” VAT, Flexible VAT

Prices are stored, inclusive of “home” VAT. When calculating prices for foreign countries, the VAT for the home country is deducted before adding on the VAT for the user’s country. So if you buy from the UK, you’re paying £100 of which 15% is VAT, and if you buy from Norway, you pay £108 (100 * 1.25 / 1.15 ) of which 25% is VAT.

Pros: Pretty prices for home country, protected base price for foreign country. If home VAT rate changes, prices remain same (gain or loss dependant on home VAT). Cons: You could end up with some odd prices for non-home countries.

Price Ex VAT, Flexible VAT

Prices are stored, exclusive of any VAT. VAT is calculated on the shop at run time dependant on the user’s country. So if you buy from the UK, you’re paying £115 of which 15% is VAT, and if you buy from Norway, you pay £125 of which 25% is VAT.

Pros: Your base price does not fluctuate, therefore the value of the VAT is irrelevant. Cons: Potentially ugly, non marketing friendly prices. Price changes on VAT changes.

We’re still debating which one of these is the best option for the system we are currently building. We are currently using “fixed price, flexible VAT”, but this position may change as we delve into the implications more deeply.

If you’re still with us at this point, well done. I’ve spent an hour trying to get my head around this rather prickly topic, double checking import/export and VAT regulations as I go. But its a good example of how something so initially clean-cut as product pricing can lead into a headache of trouble.

It’s all about scope.


Social Bookmarking


Android 1.6 - Brings Awesome Bar

Posted By: Kian Ryan on September 21, 2009 08:40 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

The Android 1.6 API has now been released, and with it is coming one feature which outshines all others. The “Quick Search Bar” provides instant access to local phone and Google results in near real-time.

Basically, it’s spotlight for Android, launched as a widget from your home screen. I can see this really becoming the central hub of any phone.

The new marketplace looks a hell of a lot better as well.


Social Bookmarking


Last Of My Kitties My Flash

Posted By: Cat Ashton on September 17, 2009 11:59 PM

Just after dinner this evening Apollo came in from the cold. Thankfully I had some chicken leftover and he was quite happy to pose for the chicken.


Apollo (aged 4 years 3 months)


My Kitties My Flash

Posted By: Cat Ashton on September 17, 2009 08:16 PM

In recent weeks I realised that I had no up to date photographs of the cats. Recently we got some “Yongnuo” CTR-301P Wireless Flash Trigger, which frankly they are the best set of triggers I’ve had my hands on.

So I’ve been playing with the new triggers and off camera flash. At the moment I’m only playing with a single flash gun (although I can up to a second thanks to the Vivitar 285HV working happily with the triggers).

In no particular order


Hannah (aged 12 years)


Hathor (aged 6 years)


Henery (aged 8 years)


Seti (aged 6 years)


Squeaker (aged 4 years)


Walnut (aged 16 months)

That’s all the cats, bar Apollo (aged 4 years) who hasn’t been around to photograph for a few days. I’ll be getting a photograph of him as soon as I possibly can.

Each of these photographs was taken in the cat’s favoured place. Hannah being in bed, Seti near my dad in the living room, Walnut on the stairs, Henery on top of the fridge, Hathor under the bed and Squeaker at the top of the stairs (well he likes to hide..). So I hope you like them.


New SelfPortrait

Posted By: Cat Ashton on September 17, 2009 04:46 PM

Next week I start my third year of degree at Manchester Metropolitan University. This afternoon I got my hair cut, ready for the beginning of 3rd year. Been told to update my twitter icon. Here it is.

So yes, there it much talk of what I’m planning for the next 8 months. I have a 5000 word essay due in January 2010 (which I need to get the first 1000 words written by the 30th September). I’m going to be writing about the value of a photograph. Not just “oh I want you to pay me £foo for this photograph”, but also discuss the value to others sentimentally or the value to a collector. Beyond that I’m not too sure what my photographic work is going to be this year - just yet at least - but I’m sure I’ll let you lot know as it happens!

I have some cute photos of my cats and those that live with my parents to show you lot later!


Log Parser Is My New Best Friend

Posted By: Kian Ryan on September 11, 2009 11:37 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

SEO may be something of a dark art, but even if we don’t practice it, as web developers we’re usually responsible for putting into place the mechanisms that allow the Mouldy-morts to practice their forbidden forms. Recently, that usually consists of dropping analytics code onto a page to track your users every move, but what do you do when someone’s “forgotten” the analytics code, or it fails for some unknown reason?

Step up to the plate server logs! Both IIS and Apache quite happily dump their site logs for you to parse through them. But this is where the fun bit comes in, since they can get quite large. How large? This morning I’ve had to wade through 102GB of logs. Most unix monkeys will probably laugh at their windows using counterparts, and with their long hair and sandals decry, “102GB! Hah, I eat 102GB of server logs for breakfast with my organically grown shredded wheat!”. And yes, with Perl, awk and sed, 102GB is pretty much nothing. But you don’t tend to have these tools easily accessible on a window box, and if you’re messing around on someone else’s Windows box, you want to create the smallest footprint possible.

And here’s where Microsoft has been quite clever with a little known, but very powerful tool called LogParser. Log Parser provides you with SQL-style syntax access to the data contained in those log files and can output it in a range of formats from CSVs through to charts. I’ve been playing with it most of the morning. It’s nice.

Install it, add it’s location to your path variable and the log world is your oyster. Open a command prompt and traverse to your IIS log directory (mine is at c:\iislogs) and execute the command using the following:

logparser -i:iisw3c -o:csv "{insert-sql-query-here}"
or
logparser -i:iisw3c -o:csv file:query.sql

-i:iisw3c tells log parser its looking at w3c formatted log files, -o:csv to output as CSV and you can either present your sql inline or reference an external file. I’ve listed a few examples below to get you started:


-- Return page hits for all aspx pages handled from the beginning of the year to today in a given directory.
SELECT COUNT(*), cs-uri-stem 
INTO hits.csv 
FROM *.log WHERE EXTRACT_EXTENSION(cs-uri-stem) = 'aspx'
AND cs-uri-stem LIKE '/subdirectory/%'
AND date between timestamp('2009-01-01 00:00:00','yyyy-MM-dd hh:mm:ss') 
    AND timestamp('2009-09-11 00:00:00','yyyy-MM-dd hh:mm:ss')
GROUP BY cs-uri-stem</p>

<p>-- Return number of hits for different query string tokens
SELECT COUNT(*), EXTRACT_TOKEN(cs-uri-query, 0, '&amp;'), EXTRACT_TOKEN(cs-uri-query, 1, '&amp;')
INTO search.csv 
FROM *.log WHERE cs-uri-stem LIKE 'Query.aspx'
AND date between timestamp('2009-01-01 00:00:00','yyyy-MM-dd hh:mm:ss') 
AND timestamp('2009-09-10 00:00:00','yyyy-MM-dd hh:mm:ss')
GROUP BY cs-uri-stem, EXTRACT_TOKEN(cs-uri-query, 0, '&amp;'), EXTRACT_TOKEN(cs-uri-query, 1, '&amp;')

And here’s a few links to other people who’ve done more with it than I:


Social Bookmarking


A few changes

Posted By: Cat Ashton on September 02, 2009 11:11 PM

Over the last 24 hours I’ve been changing things around on here and in the gallery. I now have a running colour scheme throughout and typeface. The gallery now works relatively close to what I wanted 18months ago…

In addition to the redesign stuff I’ve added a Print Sale where I’ve chosen my favourite images and more (go have a read for details!). I also have updated the gallery with a wedding section from the recent wedding work I’ve been doing (now taking bookings for the remainder of 2009 and throughout 2010).

TessaTiger

Reminder:
I’m available for events, portraits, fine art commissions, weddings, food and product shots. Email or phone me for a chat about anything you’d like me to help you with.


Bolton Bazaar (7th - 8th August 2009) - Free Tickets

Posted By: Kian Ryan on August 03, 2009 09:33 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

My partner, Cat Ashton is doing the photography for the Bolton Bazaar this year. The bazaar is a celebration of the cultural mix of Bolton’s communities. You can see some of the photographs from the rehearsals on this link.

There’s some coverage from the Bolton News in the run up to the event and there’s a Youtube video of the 2007 (no idea why there isn’t one for 2008).

The event runs over two days (7th - 8th August 2009), with “Walk The Talk” on Friday (entertainment, food and debate) and the actual Bazaar on the Saturday. The Bazaar is held at the Victoria Hall, in Bolton starting at 1830 (arriving from 1815) It gains a little coverage from the local press, but that’s about as far as media attention goes.

Bazzar

We’ve got 9 tickets for the Friday event and 9 tickets for the Saturday event to give away. I’d like to see bloggers attend the event and help gain some extra publicity for it. The more publicity, the more likely community driven events like this will continue.

Bloggers may cringe at this bit, but there is a dress code - “smart”. I’m taking this to mean smart jeans, jacket and shoes, make of it what you will. I will be attending both evenings, and will happily meet people in the MacDonalds around the corner from the Victoria Hall before the event to abuse their Wifi at around 1800. Although I’d like to see people attending both days, the focus is on the Saturday event.

If you would like to attend, holler as a comment here or reach me on twitter.


Social Bookmarking


This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

This just dropped into my RSS reader. By the look of the title, people weren’t supposed to know just yet. It’s still on the cached RSS feed, but not on the website so by now its probably common knowledge.

Spinvox

Notable highlights: [snipped since no longer relevant]

The row over Spinvox is something I may comment on at another time. I use Spinvox for my voicemail service, it’s brilliant and means I’ve got a more useful form of a voicemail in the form of a text message. I don’t really care if it’s handled by an offshore call-centre or using automated software, it fits a gap in my workflow perfectly. And that’s good enough reason for me to keep supporting it.

[UPDATE] It turns out it was all just a big whoopsy on the part of (Techcrunch)[http://uk.techcrunch.com/2009/08/03/an-apology-for-an-accident-of-publication/]. Mike Butcher claims it was a draft obituary which somehow managed to leak on to the RSS feed. James has not left Spinvox, and the Techcrunch article was entirely speculative. The lesson to be learnt here is if you don’t want it on the internet, don’t put it there. Anywhere.


Social Bookmarking


Livejournal iGoogle Gadget

Posted By: Kian Ryan on August 02, 2009 09:32 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Livejournal Gadget

For the past few weeks I’ve been using Google’s “iGoogle” service, a customisable home page with widget support. Gadgets are HTML/Javascript and fit in nicely with Google’s philosophy of everything on the cloud. If you’re running other chunks of Google Apps, such as Google Calendar or Google Reader, you’ll find iGoogle a nice unified dashboard to work from.

I’m an avid LiveJournal user, and have been since January 2004, but the lack of portability of the friends page - arguably the most vital resource for a LiveJournal account has griped me. You can’t access entries as an RSS feed, and until a few days ago there was no decent mobile solution.

This morning I received a nice e-mail from LiveJournal notifying users they’ve updated their mobile site to be more inline with the current crop of mobiles. It’s nice, displays full entries and has a straightforward UI. I like it. I liked it so much I wanted it on my iGoogle page.

So after a bit of griping with the Google Gadgets documentation I finally came out with the following code which works quite nicely. I present it to you in all its majesty:


<?xml version="1.0" encoding="UTF-8" ?>
 <Module>
   <ModulePrefs title="LiveJournal Friends"
        height="400"
        scrolling="true">
        </ModulePrefs>
   <Content type="url" href="http://m.livejournal.com/read/friends/"><br />
   </Content>
 </Module>

Impressive, innit?

Strangely, although Google provide wizards and templates for generating boiler-plate gadgets they don’t provide a way for embedding remote HTML content. There’s probably a very good reason for that, but I’ll be damned if I know what it is at this time of night.

If you want to add the gadget to your own iGoogle page, click on the button below. If you know anyone who does use LiveJournal, pass it on.

Add to Google


Social Bookmarking


This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Back in April, I discussed my epic plans for the garden in an attempt to put some genuine home-grown food on our plates. Well dear readers, the garden has somewhat flourished since that post, and we now appear to have a good run of crops in potatoes, shallots, and tomatoes. For a full list of what’s growing in the garden, click on the landscape garden image to view the notes on Flickr.

Has it been worth it? Yes. It’s been a fun exercise and we’ve learnt a lot of lessons about how much effort and time it takes to grow your own food and the restrictions of working in a terraced yard. If you do plan on doing this yourself there are a few things to bear in mind:

  1. Get a greenhouse. Just a small £20 one. It helps to germinate the seeds quickly, and who knows how long it would have taken to get some of the plants going without it.
  2. Get lots of cheap containers. The dirt the food grows in has to grow in something. Oddly, most people seem to overlook this when budgeting. It doesn’t have to be elaborate - the basic requirement is that it adequately holds dirt. We’ve got a range of containers, from wooden tubs which were on special offer at a tenner a piece, to garden rubbish buckets currently holding the potatoes. We made an extravagance on two galvanised steel containers which to be quite frank are rather rubbish. Keep them basic and large.
  3. You will spend an extraordinary amount of money on dirt. By dirt I mean compost, but when you get down to it, it’s glorified dirt. If like us you live in a terraced house, your yard contains no natural dirt and you’ll have to import all of it. Vegetables on the whole are relatively unfussy things. They do not care if you use miracle grow or Uncle Pete’s wholesale budget compost at a tenth of the price. Save the cash for more containers.
  4. You will spend most of your money on 2 and 3. The rest pales into insignificance by comparison.
  5. Get a book that you can understand on the subject.

In your first year, you are not expecting to become a master gardener. Your aim is to put something in the ground and make it grow. As such, your first reference book needs to be something with bright colours, simple instructions and guidance you can understand. My recommended reference for the novice would be Plot, Pots or Growbags available from Amazon for under £7.

I don’t need to say much about this book, the reviews on the Amazon page tell it all. It’s such a straightforward and useful book, you really can’t fail with it. We bought most of our seeds from Suttons online shop and were surprised with how slick an operation it was.

Cat is currently cooking a chicken, mushroom, leek and shallot pie to celebrate some of the early harvest. Today we shall ignore the diet. Now, time to plan for Autumn planting…


Social Bookmarking


Trucking Hell &#8230; In Bits

Posted By: Kian Ryan on July 27, 2009 06:26 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Back in January, I wrote about Trucking Hell, a entertaining book by “Bowen T Hunter” available through Lulu. It’s an entertaining book, if a little rough around the edges.

Mr Hunter went around the block trying to get the book published after his original intended publishers went into the big corporate heaven in the sky. After some frustration, he’s finally decided to serialise the book with chapters being uploaded on Tuesday and Friday. Add it to your RSS reader, and if you like what you read consider buying a copy.


Social Bookmarking


Photography Ebay Listings

Posted By: Kian Ryan on July 19, 2009 08:34 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

There’s something of a clear-out going on. Some of it’s mine, some of it’s being sold for a friend. Listed for your pleasure.

Photography - Minolta

Minolta X-300 35mm Film Body
Minolta SRT-101 35mm Film Camera (MC/MD Mount)
Minolta MD 28-70mm f3.5-f4.8 (Minolta MC/MD Mount)
Minolta X-300 35mm Film Body (Minolta MC/MD Mount)
Tokina SD 70-210mm f4-5.6 (Minolta MC/MD Mount)
Minolta 2x Teleconverter
Minolta X Series Power Winder (X-300/X-700/XG/XG-M)

Photography - Pentax

Ricoh KR-5 35mm Film Body (Pentax K Mount)
Chinon 50mm f1.9 Lens (Pentax K Mount)

Photography - Canon

Canon AV-1 35mm Film Camera (Canon FD Mount)
Canon FD 70-210mm f4 (Canon FD Mount)
Canon MD 50mm f1.8 (Canon FD Mount)
Canon 1000F 35mm Film Camera (Canon EF Mount)
Canon 3000N 35mm Film Camera (Canon EF Mount)

Photography - Nikon

Nikon FE-2 35mm Film Camera (Nikon Mount)
Nikon EM 35mm Film Camera (Nikon Mount)
Sigma UC Zoom 27-70mm f3.5 - f22 (Nikon Mount)

Photography - Flash

Jessop 300 TTL Flash (Minolta/Nikon/Pentax)
Cobra MD-210 Flash (Sigma/Olympus/Minolta/Nikon/Canon/Pentax)

Non-Photography

Pioneer TSG1001i 100W 10cm Dual-Cone Car Speaker
Nokia E61 Mobile Phone Dock
Dell Laptop Docking Station


Social Bookmarking


Northern Geeks Has A Website!

Posted By: Kian Ryan on July 05, 2009 09:05 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

This took me long enough. It’s not much of a site yet, but it does have the basic information for the project.

Spread it around! Shout it out from the moutaintops!

http://www.northerngeeks.info/

We’ve even got a Twitter account…

http://twitter.com/northerngeeks


Social Bookmarking


I Want To Ride My Bicycle

Posted By: Kian Ryan on July 05, 2009 08:18 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Pennyfarthing

My bike is dead. I was asked to sign its death warrant yesterday. It was in pretty poor shape. It was the best thing I could do for it.

I admit I’ve not cycled for over a year. The bike I had been using was donated to me by Cat’s dad. It was rather too large for me, but it was a touring frame and rode well. Unfortunately I don’t agree with non-indexed shifters located on the bike frame, and this cough may have cough caused a few cough slips. Nothing epic, just a few occasions where I may have been forced to cough stop, due to a lack of chain on gear.

Oddly though, I’ve not suffered a serious crash on it, which I can’t say for my beloved pearlescent-yellow Muddy Fox MTB, on which I was hit by an ASDA lorry, side-swiped by a car on an estate, knocked flying by a pair of yobs in a white Fiesta into a bramble bush and finally, hit an unseen grate and slid for 25m on my face. That particular bike was nicked from my parent’s back yard when I came back from university and I was absolutely devastated.

Now I’m needing a new bike. I’m looking for a second hand road/race bike, 50-54cm frame size, drop bars and shifters on the bar. The last point is rather important (see above). I’ve missed two bikes in the past week that fitted the bill on Ebay. I’ve got a budget of around £150, if you know anyone selling, or if you’re selling yourself, drop me an e-mail.


Social Bookmarking


Tweetup Manchester

Posted By: Kian Ryan on June 24, 2009 10:39 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Well that was a fun evening.

Just a quick note to say we’re back from the Tweetup hosted by Sweet Mandarin. An absolute damn fine way to spend an evening: good food, good weather and good company. Lisa and co provided dim sum, a half dozen of us decided to stay for a full meal.

This is a brilliant example of how to use social media to promote your business and get it right. A few messages in the right place, and a genuine interest in people. No high and mighty pretentions, but simple ideas promoted well. I applaud you girls.

One trick they have missed… Sweet Mandarin does a £10 all you can eat Dim Sum at the weekends. I think they should be pushing this more, If the rest of their menu is anything to go by, this is superb value for money. If you’re in Manchester this weekend, drop by and give them a try, you won’t regret it.


thumbnail

Social Bookmarking


Kian&#8217;s Rules For Freelancing

Posted By: Kian Ryan on June 23, 2009 11:01 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

I occasionally make insightful, if somewhat obvious posts to the GeekUp community. One of my most linked to and pointed posts was in response to a common thread: “how to set up a freelancing business”. I formed “Kian’s Rules For Freelancing”, and present them here for your consideration. The old footnotes are recorded with numbers, the new footnotes are recorded with roman numerals.

Kian’s Rules of Freelancing

  1. Try and hit the ground running.
  2. The customer is not always right. They are, in many cases wrong.
    • The customer is rarely right. Often they’re very wrong.
    • The customer is never right. They are always wrong.[i]
  3. There are approximately 9 usable business hours in a day. Any more, and you’ll kill yourself.
    • Those are 9 business hours. Not necessarily 9 hours coding. Some days, you will do bugger all coding.
    • That is an average. There may be the occasional “oh shit” race condition which means that there becomes 26 business hours in a day. Remember to balance it out.[ii]
    • If you’re working less than nine hours a day, make sure the money is still coming into the pot.
    • As Paul Robinson has observed, GeekUp, open-source projects and community are often “business”. Remember to factor that in. [iii]
  4. Try not to bite off more than you can chew. [iv]
    • You are a developer, not a designer. If you need designs, hire a designer.
    • You are a developer, not a network engineer. If you need network support, hire a monkey.
    • You are a developer, not a 24-hour on-call support service[1]. If you need a 24-hour on-call support service, hire a minion.
    • You are a developer, not a one-man army of God. You are not going to single-handedly end poverty, restore world peace and produce cool music[2].As such, if the project looks like it needs an army, consider hiring an army.[v]

Footnotes

[1] Unless you’re stupid enough to sign up for that.

[2] Unless you’re Bono.[3]

[3] Or me.

New Footnotes and Annotations

[i] Usually this boils down to “the customer does not know what they want”. The sign of a good freelancer is the ability to beat the client’s real requirements out of them. A stick is a tax-deductible tool.[vi]

[ii] See the past three weeks of my life for a good example of this.

[iii] When you attend these events as a regular “Joe Blogs”, an employee for something-corp, you treat these events as learning experiences, possibly networking, but generally for fun. When attending these events as a freelancer, yes you’re doing all of the above, but you’re keeping an ear/eye open for new opportunities. That takes energy. Factor it in.

[iv] Refer to One Another As I Have Referred You (refer work to others, and hopefully they will refer back to you)

[v] Projects have costs. A business has to spend money. Spend money to make money. Learn. This. Lesson.

[vi] This is not a slight on businesses. Requirements capture is by its very nature hard.


Social Bookmarking


Conferences, Geek Events, etc.

Posted By: Kian Ryan on June 11, 2009 10:36 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

I admit that I have been somewhat absent from community offerings for the past few months. The projects that I am currently working on have been a little hectic, with some appropriate last minute deadlines changes.

But

I’m hoping that July is going to be a free month. Completely free to do with as I please. As such, I am planning on taking it easy, pimping for some new work to start in August and catch up with those community events I managed to miss since Christmas.

So the question to you lot is - where would you like to see me over the next month. I can turn up and talk on a topic, or just turn up and be generally awesome. Tell me where you would like to see me over July, and I’ll try and book it in.

Oh and whilst were here, please take a look at this post by The Hodge. He could do with your support.


Social Bookmarking


Northern Geeks

Posted By: Kian Ryan on June 11, 2009 10:14 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

photo-13

Now my new larger easel has finally arrived, I can announce one of my new projects. “Northern Geeks” will be a series of portraits of geeks in the north, showing them in their natural habitat and “at play”. I want to show geeks are people too.

The final images will be put into an exhibition, put online and be made available as a book.

So I need volunteers. If you would like to be part of this project, please send an e-mail to kian@kianryan.co.uk with the subject “Northern Geeks” or comment on this post. Please enclose a small “geek bio”, and what you do for kicks (this can be something tech related or completely different). Sport, gaming, gardening, gerbil farming, anything. I’m looking to shoot and print in July with an aim to exhibition in August/September. If your natural habitat is a company office, please ensure you can gain permission to be photographed there before applying. All volunteers will be given a copy of the book as thanks.

Go on - be a part of something special.


Social Bookmarking


Manchester Geek Girl Diner 3

Posted By: Cat Ashton on June 09, 2009 06:06 PM

Last Thursday I went to the Old Abbey Inn in the Manchester Science Park for the third Manchester Geek Girl Dinner. I took Kian as my date – its a women only event unless the men are brought as a date.
Ruby_Gem organised a lovely venue for the “BBQ” and talk. Sadly on the day the BBQ broke so dinner was oven cooked instead – still good food though.

The speaker was Lesley Allger from BAE Systems. She spoke about her various roles during her ~30 years that she’s worked with BAE Systems. From “shop floor” engineer to team management to head of her own team. She spoke of key mile stones which effected her time with the company and how she has learnt to manage geeks (and manage her own shiny lust!).

At the end of her talk she mentioned some of the company stats which illustrated how few women go from engineer to “executive engineer” (a broad term used for a specialist or project manager, I believe).

The discussion that followed the talk was broken up by diner – burgers, chicken, stuffed mushrooms, corncobs and veggie kebabs. Al of the food I had was lovely (definitely worth going there again!).

After food was consumed and drinks were had we continued discussing how to change the perception that women were only there to fill quotas. My personal opinion on this is that I think it really does revolve around getting into schools at an early point (say around Year 4 – Year 6 [8-11year olds]) and educating kids about what interesting things they could do – not just girls do art/beauty treatments/teaching and boys do science/tech/building. Doing workshops and activities that get kids involved could well be a good foot in the door to getting more women interested in the future.

I would like to add many thanks to BAE Systems for sponsoring the event and *squishes* to Ruby_Gem for organising a great night out!

Hope to see some of you tonight at Manchester GeekUp!

My gallery.


Geek Girl Dinner - Manchester

Posted By: Kian Ryan on June 05, 2009 08:35 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Last night Cat took me to the Geek Girl Dinner in Manchester. What’s a Geek Girl Dinner? Well most tech events have a heavy male ratio and bias. Geek Girl Dinners (GGDs) aim to change that balance by only allowing boys to attend that are invited by the girls as dates. In a non-poly recognising environment, each girl is allowed to invite one boy.

Discussion was varied last night, ranging from female attitudes in the workplace, to what women bring to the workplace, why on earth does it all matter anyway to problems with the education system and nurturing the geek spirit. The evening was kicked off with a talk by Lesley Allger from BAE Systems. Although I thought the conversation was positive, not everyone agrees.

Food was excellent from the “Old Abbey Inn”, paid for in part by BAE. We were all sent home with “breakfast bags” of tea and marmalade, currently being consumed while I’m writing this post.

Many thanks to Gemma Cameron for organising the evening.

GGD-1

GGD-2

(Apologies for the quality of the photos, Cat will be posting better ones later.)


Social Bookmarking


UK Votes

Posted By: Kian Ryan on June 03, 2009 10:24 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Reposted with permission. I believe in this strongly:

If you do one thing tomorrow make sure it’s that you go to vote. I don’t care who you vote for, that’s your choice, I don’t care if you take the ballot paper home to use as loo paper. What I do care is that people turn out, that they register that they’ve turned up to vote and that if they don’t vote for a candidate it’s an active choice rather than

“Don’t trust any of them, can’t be bothered going to the polling station”

Make it an active choice, show these weasels that you’re not disconnected, that you do care, and if you’re anything like me it’s that you don’t care for any of the current bunch of self-serving w*kers.


Social Bookmarking


Because Good (Free) Fonts Are So Hard To Find

Posted By: Kian Ryan on May 29, 2009 12:52 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Those who have to dip their toes into the life of a designer once every so often understand the importance of typography. One of the hard parts of typography is finding the right typeface that isn’t going to break your piggy bank (or your client’s piggy bank).

This morning Tamara pointed me to Font Squirrel . To quote from Font Squirrel’s website:

” We know how hard it is to find quality freeware that is licensed for commercial work. We’ve done the hard work, hand-selecting these typefaces and presenting them in an easy-to-use format.

It’s a simple directory of excellent, high quality, free fonts. Well done guys and keep up the good work.


Social Bookmarking


ASP.NET - Forms Inside Forms.

Posted By: Kian Ryan on May 18, 2009 11:51 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

“It is a truth universally acknowledged, that an ASP.NET page in possession of a component, must be in want of a form.”

I’ve just come across this sticky little scenario in one of my projects:

ASP.NET components need to be wrapped in a form tag for their post-back magic to happen. As such, the form tag is usually as high level as it can possibly go (usually just inside the body tag). Some mailing list (sorry - mail marketing) companies provide you with a HTML form to integrate into your site so users can subscribe to the site’s mailing list. Sometimes these forms also come with a little chunk of Javascript to perform some page validation before performing the post.

So what we’ve got looks like this:


<script src="somethirdpartyvalidator.js"></script></p>

<form id="Form1" method="post" runat="server">
    <form id="MailingForm" method="post" action="somethingremote.pl" onSubmit="validate(this);">
        <!-- Insert some form components here -->
        <input type="submit" value="Submit" />
    </form>
</form>

<p>

And here’s the fun. When you click the submit button, it doesn’t perform the expected behaviour and perform a post to somethingremote.pl. Instead it performs a regular post-back to your site and (most likely) will do diddly squat. The culprit is __doPostBack, injected by ASP.NET at runtime, which hijacks the onSubmit event of the parent form to provide the post-back functionality. Your poor little mailing form doesn’t even get a look in.

The answer is to provide a little roll your own javascript for your own submit functionality. This article demonstrates a version of this technique. My version of the is shown below:


<script language="javascript" src="somethirdpartyvalidator.js"></script></p>

<script language="javascript">
    function submitForm() {
        var theForm = document.getElementById('signupForm');
        if (validateForm(theForm) != false) {
            theForm.encoding = 'application/x-www-form-urlencoded';
            theForm.action = 'somethingremote.pl';
            theForm.submit();
        }
    }
 </script>

<form id="Form1" method="post" runat="server">
    <form id="MailingForm">
        <!-- Insert some form components here -->
        <a href="javascript: submitForm();">Submit;</a>
    </form>
</form>

<p>

The variation from James Byrd’s original article comes from which form we submit. In the original, James posts the global form (in our example Form1) and instructs the reader to simply blank out any values they may not want to communicate to the third party. This seems overly permissive to me, especially in a potentially dynamic environment where you may have hundreds of components and as such my version simply selects the target form from the page before passing it through the validator and performing the submit action. The postback event is avoided, the third party only gets the data they need and the world is a happier place.


Social Bookmarking


A Simple Generic Repository for Linq to SQL

Posted By: Kian Ryan on May 07, 2009 05:02 PM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

Two code posts in one day, aren’t you lot lucky?

I’m currently working on a small project working with Microsoft ASP.NET MVC. I admit I’m rather enjoying the experience, it’s nice to get back to proper bare metal GETs and POSTs with non of the fluff of normal ASP.NET getting in the way. Since this is a relatively simple project I’m using Linq to SQL rather than the Entity framework. Whilst putting some boilerplate code together (after following the excellent NerdDinner tutorial) I realised there was a lack of a simple generic repository for common object operations. So I present to you my basic, generic repository:


using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using BrandingScience.Models;
using System;</p>

<p>public abstract class Repository<T, C> where T : class where C : System.Data.Linq.DataContext, new()
{
    private C db = new C();</p>

<pre><code>// Query Methods
public IQueryable&lt;T&gt; FindAll()
{
    return db.GetTable&lt;T&gt;();
}


public T Get(int id)
{
    MetaTable mapping = db.Mapping.GetTable(typeof(T));
    MetaDataMember pkfield = mapping.RowType.DataMembers.SingleOrDefault(d =&gt; d.IsPrimaryKey);

    ParameterExpression param = Expression.Parameter(typeof(T), "e");
    var p = Expression.Lambda&lt;Func&lt;T, bool&gt;&gt;(
          Expression.Equal(Expression.Property(param, pkfield.Name),
          Expression.Constant(id)),
          new ParameterExpression[] { param });

    return db.GetTable&lt;T&gt;().SingleOrDefault(p);

}

// Insert/Delete
public void Add(T t)
{
    db.GetTable&lt;T&gt;().InsertOnSubmit(t);
}

public void Delete(T t)
{
    db.GetTable&lt;T&gt;().DeleteOnSubmit(t);
}

// Persistence
public void Save()
{
    db.SubmitChanges();
}
</code></pre>

<p>}

T is the table class you want to create the repository for, C is the DataContext created by Linq to SQL. Pretty straightforward. A typical implementation looks like this:


public class JobRepository : Repository<Job, MyDataContext>
{
}</p>

<p>public static void Main(string[] args)
{
    JobRepository jobRepository = new JobRepository();
    List<Job> allJobs = jobRepository.FindAll();</p>

<pre><code>// Return a single item and change the title.
Job job = jobRepository.Get(1);
job.Title = "Mutated Gerkhin Production";

// Create a new item.
Job newJob = new Job();
newJob.Title = "Mutated Gerkhin Anti-Coagulant Production";
jobRepository.Add(newJob);

// Delete an old item.
Job removeJob = jobRepository.Get(2);
Console.WriteLine(removeJob.Title); // Output: Survival of human race.
jobRepository.Delete(removeJob);

// Save all changes to the repository.
jobRepository.Save();
</code></pre>

<p>}

This version currently does not support dependancy injection, which is something I’ll be looking into shortly. But for now, it saves a heck of a lot of time to just get the simple stuff done. I’m surprised MS didn’t actually ship Linq to SQL with something similar.


Social Bookmarking


This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

I’ll make no bones about it, VS08 SP1’s Javascript Intellisense saves me from having to dive into the docs every five seconds. Not having that fingertip intelligence to my hand would probably cost me quite a bit of time each day. However, since I often end up using multiple frameworks in one project, I tend to use the jQuery.noConflict(); to avoid it conflicting with the other frameworks. Unfortunately, the moment you stick var $j = jQuery.noConflict(); into the top of your javascript file, your intellisense will break for the rest of your script. I’ve currently got two methods for handling this:

1 - Create a “preload” file

This is a small script that sits in between loading jQuery and loading your page scripts. All it contains is the following statement:


    var $j = jQuery.noConflict();

Save it as preload.js and you can then sandwich this in between loading the jQuery framework and loading the page scripts as so:


<head>
    <script type="text/javascript" src="scripts/jquery-1.3.2.js"></script>
    <script type="text/javascript" src="scripts/preload.js"></script>
    <script type="text/javascript" src="scripts/whatever-you-want.js"></script> 
</head>

In your actual work scripts, you can then reference jQuery and the preload using the standard VS reference notation:


/// <reference path="jquery-1.3.2.js" />
/// <reference path="preload.js" />

Visual studio will have sorted out it’s type resolution for $j meaning that so long as you also have the jQuery .vsdoc file in the same folder as jQuery you get this glorious view:

Noconflict

The pros of this technique are that you can drop in new versions of jQuery at a whim and not have to worry too much about having to update preload.js. Of course the downside is that preload.js then needs to be sent to the client, with all the associated overhead of a get request.

2 - Append noConflict onto jQuery

There are those that will believe that the jQuery file is sanctimonious and should never be tainted by a developer’s touch. As it is I’m already using ASP.NET and cursed for all eternity, so how much worse could it be? So path two is pretty straightforward, open up the jQuery and jQuery.vsdoc files and add var $j = jQuery.noConflict(); to the bottom of the file. Again, this will sort out all the resolution gubbins while you’re working away in your own scripts.

Just remember that if/when you update your original jQuery files to also replace the noConflict statement at the bottom.


Social Bookmarking


At This Space - Last chance!

Posted By: Cat Ashton on May 01, 2009 06:34 PM

Tomorrow (Saturday 2nd of May) is the final day of the photographic exhibition At This Space. I hope you all get chance to drop by and I really hope that you enjoy it.


At This Space Exhibition

Posted By: Kian Ryan on April 28, 2009 07:35 AM

This post appears on kian ryan - code, photography, bob available here. If you want to leave a comment, please do so on this page.

The “At This Space” exhibition is opening on the 26th April, at 5pm. I’m invited to the private viewing and you’re not, so neerrrr. If you want to try and bribe your way in (there’ll be free drinks, and people, and cheese[1]), then drop Cat Ashton a line and she’ll try and weasel you in. Cat’s work is being exhibited there as part of the exhibition.

Otherwise please, please, please drop by Tuesday to Saturday, 10am til 6pm. These are young, upcoming, budding artists who need all the support they can get. Hell, one of them may even be the next Henri Cartier-Bresson or Richard Avedon. The exhibition is being held at the rather fancy-pants Urban Splash location in Castlefield:

Urban Splash (Mooch)
Worsley Street
M15 4LD

I was there today helping put up some of the work, and occupying space at other times. The exhibition looks great, the space is superb and there’s some excellent work on the walls. All very much worth your time.

At This Space Poster

[1] I may be lying about the cheese.


Social Bookmarking


Project 365 Days 27 to 38

Posted By: Cat Ashton on April 23, 2009 04:50 PM

So, with all this exhibition prep you’d be right to think my other projects are getting squeezed for time. In this selection there are two photos that were taken on Why Photography shoots - you’ll have to guess which!


This is Nick Harris, a GeekUp regular.


Newly fixed pinhole camera cap for my Canon bodies. Just in time for Pinhole Photography Day - this coming Sunday.


Kian took me up Rivington - ended up getting a dent in the driver’s door on the car that day! But also went up Rivington for the first time (nevermind living here for 3 years nearly!)


This is my friend Jenna. She’s somewhat shy around cameras..


Walnut has turned rather photogenic lately - not like she hasn’t been all along - just more so recently!

The rest of the gallery.

Right I’d better go get ready for We Will Rock You!(be warned there be music!).


New Theme - Sliding Door

Posted By: Cat Ashton on April 22, 2009 07:18 PM

Today a new theme has gone live on my photoblog. It is Sliding Door by Wayne. Thanks to NovaWildstar for pointing me at it.

All this is a face lift that’s been on the cards for a while - the exhibition opening Monday was just a kick up the butt to get it done!

Now I just need to sort my gallery theme/solution.

Also done some general rejigging of the categories and pages - also all my linked pages now resolve(even if there’s nothing in one of the files!)!


At This Space Exhibition Featuring Why Photography?

Posted By: Cat Ashton on April 21, 2009 11:44 AM

On Tuesday 28th April 2009 will be the general opening of At This Space. We will be at Urban Splash, Worsley Street, Castlefield, Manchester. General opening hours will be 10-6 Tuesday until Saturday.

If you want to come to the private viewing - drop me a line and I’ll see what I can do!

Here’s a sneak preview of my series “Why photography?”


Project 365 Days 18 to 26

Posted By: Cat Ashton on April 10, 2009 11:43 PM

Over the last week I’ve been a little busy - last Saturday I went car shopping, Sunday I bought a car and Monday my sister and nephew came to stay for a few days. Now, of course its Easter weekend. Today (Good Friday) bought new Red Dwarf. This had me somewhat excited!


April 7th 2009 (spring cleaning!)


April 5th 2009 (ice cream at Fredrick’s post first real drive!)


April 10th 2009 (shot after dark in the garden)

All in all its been a busy few days. The next few days I’ve got a few shoots going on for ‘Why Photography?’. Anymore volunteers for it would be great! Especially if you’re not too far from Manchester!


Project 365 (Days 4 - 17)

Posted By: Cat Ashton on April 01, 2009 09:17 PM

Been a little busy with the end of term, my birthday party and fund raising for the exhibition next month. Still doing my project though!


April 1st 2009 (if you look carefully you can see me!)


March 25th 2009 (outside the exhibition venue!)


March 28th 2009 (Cookie at my birthday party)


March 31st 2009 (Hannah is a poser atm!)


Today’s Project 365

Posted By: Cat Ashton on March 18, 2009 09:00 PM


March 18th 2009

This is Walnut - she’s growing up too quickly! She’s about 10 months old.


Project 365 beginning

Posted By: Cat Ashton on March 17, 2009 11:52 PM

Well, yesterday was my 21st birthday. Thank you for the lovely messages! I started my new Project 365


March 16th 2009


March 17th 2009

Today I have been sat in the office trying to get prints done for a print sale fund raiser for my exhibition next month. If anyone would like a card with this on the front then let me know. Also if there are any others on the site you’d like then drop me a line.


Birthdays..

Posted By: Cat Ashton on March 16, 2009 01:50 PM

Today is my 21st birthday. This means pretty much one thing - starting my “new” project - Project 365 is starting again. Since the last one was derailed thanks to the break-in.

I’m currently scanning negatives from my last few shoots today. I’m quite happy atm. Also writing about the photographic books I’ve been reading recently.

Also if you fancy dropping by, tonight there is cake and games.


Why photography? First day of shooting

Posted By: Cat Ashton on March 07, 2009 09:57 PM

Today was the first set of shoots for my project “Why Photography?” which will be exhibited in late April/early May.

Tootdood’s metaphoto (photograph of a photograph being taken…etc..)

The first person I was intending to see was Tootdood. He was the first person I could arrange to see about why he does photography. I was very pleased that Tootdood introduced me to AirAdam. Adam agreed to join the project too. Which makes him another of my favorite people!

While photographing AirAdam, Pixel.Eight wandered across us. Once AirAdam wandered to do some more photography, myself and Pixel.Eight wandered around Market Street, Piccadilly Gardens and upto Victoria train station too, chatting and discussion photography.

Today I have shot 18 frames on the Mamiya C220 with either the 55mm or 80mm lenses. Been using Kodak Tri-X 400. Gonna dev in Kodak TMAX when I’ve finished the second roll.

Looking forward to further shooting!


Exhibition Season!

Posted By: Cat Ashton on February 25, 2009 02:57 PM

In April/May I will be exhibiting in Manchester. The venue is still to be determined, but the opening night will be the 30th April.

Now this is your chance to get involved.

Are you a photographer?

Would you be willing to give me 30 minutes with you, your thoughts and camera for a photograph and interview?
(and are somewhere relatively close to Manchester or going to PhotoCampLeeds this weekend)

If yes, could you email me on cat@catashton.co.uk


Break-in

Posted By: Cat Ashton on February 25, 2009 02:48 PM

On the 28th January we were broken into. Sadly, my laptop, Wii and 360 were taken. They also tried to take the film scanner, but left it without a power supply. They have also damaged the TV amp.

This does however mean that I’ve lost about 6 months worth of work.  Everything I’ve done since about August (except certain shoots that have been printed off-site) is gone. This also includes my Project 365 which I was about 8 weeks from concluding!

In the past month we have replaced the scanner power pack, my laptop, the kitchen window and we’re in the process of sorting the other stolen things. Project 365 will restart on March 16th - my 21st birthday!

Also got a back-up solution being tested atm. Now time to get on.


This term I have been working on getting my work into photographic competitions. Tonight one of them closes - The Renaissance photography competition. I have entered 4 photos in 3 categories.


Happy Birthday (Emotions)


Dancer’s Heart (Emotion)


Ready to Dance (The Human Body)


Roma (The World We Live In)


">
">
">Competitions gallery


New Printer: Epson R1900

Posted By: Cat Ashton on January 07, 2009 04:38 PM

So a few months ago my Epson R340 gave up the ghost. The yellow print head clogged and the paper feeder claimed it was blocked when part way through a print. Epson customer services told me that it was going to be more cost effective to get a new printer rather than to repair this one, they offered me an all-in-one unit that didn’t really do photos, but at a reduced price.

At this point we gave it up for dead and started looking at new ones. Of course, to go with the Epson V700 we purchased earlier in the year we wanted to stay with Epson and I wanted access to larger scale prints at a reasonable price.

That’s where the Epson R1800 stepped in. Only to find that the ones that were still being sold were going fast and it would soon be easier to get replacement compatible cartridges for the new model R1900. Sadly that meant that it was going to cost about the same as the scanner and we simply couldn’t get it then.

Yesterday (6th Jan) Orange Tentacle bought the Epson R1900 from Parks. It takes up almost the whole desk it is on leaving enough space for the Epson V700 and the in and out post trays.

The print quality is wonderful once the print heads are fully charged (took about 3 prints to get the heads charged with ink). Comes with colour profiles for Photoshop and glossy prints that you can see reflections in!


What makes a house a home?

Posted By: Cat Ashton on January 06, 2009 12:35 AM

What would you say makes your house a home?  Or any house a home?

Hopefully its an object and not *huge*… I’m wanting to take photos similar to Irving Penn’s Cigarette series:

Please leave a comment.


Bolton Big Switch On

Posted By: Cat Ashton on November 23, 2008 09:08 PM

This afternoon I had a press pass for the Bolton Big Switch On.

Bolton Big Switch On Gallery

Photographed the event for APNA News. Met a fair few of the local freelance press photographers in the Manchester area (sadly didn’t get any contact details for anyone) and some of the staff photographers from various news papers. Have to say they all seem a rather friendly bunch!

There may be more photos at a later date - got so much to share!