Tag: daily

  • Can we take a joke? (apparently not)

    Can we take a joke? (apparently not)

    Len: ‘We should write a comedy one day’
    Bob: ‘Nah, no one would air it.’

    So the Daily Mail brigade is trying to derail another comedian’s career. Jack Whitehall‘s recent performance on The End of the Year Quiz Show was close to the mark at points but ultimately very funny. Which is the point…isn’t it? Comedy (like any art form) is intent on invoking an emotion (hopefully laughter) the more people that react the more popular the comedian. Jake Whitehall was crowned King of Comedy by viewers of the 2012 Comedy Awards. I’ve seen his DVD and its fucking hilarious. It’s therefore a fair assumption to make, that he’s good at his job and that people like what he does. I found his performance on The End of the Year Quiz Show entertaining and had to really rack my brains to see where he may have crossed any lines. I was definitely not ‘shocked’ by any of the jokes.

    Personally just because I feel something is distasteful or perhaps just not funny I don’t feel compelled to complain. Perhaps this is an age thing? Like most men, I don’t like complaining at the best of times. Perhaps when you get old this pent-up complaining comes out in streams.

    Agnes: ‘Albert are you ready with the email’
    Albert: ‘Yes Agnes’
    Agnes: ‘OK, it’s coming on now’

    They wait for the programme to start

    Agnes‘OK, Albert the introduction montage is too bright’
    Albert: ‘Disgraceful. How dare the BBC offend my intelligence as well as my delicate eyesight. From the opening sequence of over-illuminated flickering lights, I knew I was in for a torrid time’

    Albert awaits further direction from Agnes

    I haven’t watched the series Miranda because I just know I won’t find it funny. Does that mean I should complain? It’s a typical BBC funded by the taxpayer so better not push the envelope’ sort of comedy. I pay the same amount for the TV license as the next man so can I make a complaint about the niceness of these shows? Course not. I understand it’s a simple matter of taste. That’s the wonder of the remote control. I don’t have to watch Miranda or My Family. I simply turn it over. So what has The End of the Year Quiz done that’s wrong? It was after the watershed and its guests included the edgiest comedians around. It’s as far as I can gather quite ad-libbed so you can expect some close-to-the-marks gags. The format doesn’t even allow for things to be cut as it’s a quiz and you have to see all of the answers. A point made even clearer when Jack Whitehall attempted to hide a particularly risque answer. If the answers were that offensive turn over and never watch anything Jack Whitehall does again. Problem solved.

    Frankie Boyle is another example of boundaries being pushed. He’s even said things that make me blush! So what do I do about it? I accept that’s what you get with him and decide not to watch him or follow him on Twitter (by the way I do watch him and follow him on Twitter). Celebrity juice is another show where it’s completely crass and in bad taste. This is the point of it though. I’d hate to think the number of complaints it would get if it were to air on the BBC.

    So I have a solution. Anyone who reads the Daily Mail will get their TV for free but will only get 1 channel for comedies. Before the watershed, it plays endless re-runs of Last of the Summer Wine and after the watershed, it plays Allo Allo. This will allow the rest of us to enjoy the comedy that we enjoy.

  • SVN Magic

    My company recently hired a new developer which brought the number of developers to….(drum roll)…Four! OK, not a really significant amount but enough for us to need a more effective code change reporting system. We needed a way to alert developers of any changes made to their files. The system I managed to put in place has been running for about a week and I thought I would do a blog post to maybe help other small development teams to introduce something similar. The solution I set out to achieve was this …

    A daily email is sent to every developer with a list of files that have been changed the previous day. The list will only include files that this particular developer had previously added or changed. Attached to the email is an HTML file containing a more detailed view of the changes made to each file.

    If you think this would be useful for you then continue reading. The first step was to store the details of each SVN commit in a DB table. This was accomplished by creating a script that was called after every commit. SVN comes with a selection of ‘hooks’ which are executable bash scripts that run after (or before ) a specific SVN event occurs. Simply go to your SVN hooks directory and copy the template file post-commit.tmpl as post-commit. Add the shell commands required to call your script and make it executable.

    chmod +x post-commit
    

    My script uses the Repository and Revision variables passed via SVN to carry out an svnlook on the repository for that revision. I use the PHP system call to store the output in a variable (use square quotes “). I then use the PHP explode on the new lines (n) to generate a nice neat array of variables. I simply store each of the files involved in the commit in my DB table along with the revision number, the author, the comment, and the DateTime.

    My second script does the main leg work. I firstly added the script to our crontab to run every morning. The first thing the script does is return all of the commits for the previous day. For each file, it runs svn log and stores the output in a variable. By using some exploding and other PHP string functions the scripts gets the output into a manageable format. From this information, we determine who previously changed this particular file. We use the author name as the main KEY of a large array we’ll use later. In the array, we store all of the information we think may be useful to include in our final email.

    Now for the cool part. We export the previous revision of this particular file to a temporary directory and also the latest version of this file.

    svn export --revision 120 file:///my_repos/blog.html temp/temp1.txt
    svn export --revision 121 file:///my_repos/blog.html temp/temp2.txt
    

    We use a 3rd party Pear class to give us a comparison array of the two files (showing new code snippets, changed code snippets, and deleted code snippets). We add some final gloss to our email by using some 3rd party syntax highlighting.

    OK, at this point we should have our enormous array of SVN usernames and file details. All we need to do now is loop through each SVN username key and create our email. I have a template system in place that takes care of displaying the diffs between the files. I simply write this to an HTML file and attach it to the email. I have a list of email addresses in the database assigned to each SVN username. And you’re done.

    Please let me know if you would like any further details on this and I’ll elaborate on those points. Good Luck!