Archive for July, 2007

Grindhouse

Friday, July 27th, 2007

A grindhouse is an American term for a theater that mainly showed exploitation films. It is also a term used to describe the genre of films that played in such theatres. Grindhouse films are also referred to as “exploitation films.” Grindhouses were known for continuous programs of B movies, usually consisting of a double feature where two (and very often three) films were shown consecutively.
 

As I am a big fan of all Quentin Tarantino’s films, I was looking forward to the date of Grindhouse’s premiere. As it is a double film (or a ‘grindhouse‘), it consists of two movies (no shit!) - Death Proof written and directed by Tarantino, and Planet Terror written and directed by Robert Rodriguez.

M4A1 leg

Internationally (i.e. all countries except DVD region 1, that is the US and Canada), the movie - despite its name - is split into two films. At first, I thought it’s just a theft - they’re stealing our money by forcing us to pay twice to see a movie that Americans pay for only once. But now, as I’ve seen the film before it was released in Europe, I can say that it’s an ill wind that blows nobody good, and the Death Proof segment is being screened in all European cinemas in an extended version, which gives us about 27 minutes more of the film (including the scenes like the lap dance or the girls’ visit to the shop before they pick ZoĆ« up, which have been replaced by a “missing reel” title cards or just passed over in the US!).

(more…)

Cyanide and Happiness

Friday, July 27th, 2007

Unfortunately, the boredom mentioned in the previous post hasn’t gone away and I had enough time to write another PHP script for comics displaying. This time it’s about Cyanide and Happiness, one of the funniest web comics on the Web.

The Lol! Fag!! superhero from C&HIt was much more difficult to write this script, because the comic isn’t categorised by date nor are its image files. I had to use cURL and even get the latest strip’s number from the C&H’s feed (although accessing explosm.net/comics redirects you to the latest one, it’s impossible to do such thing with cURL). It’s quite more complicated than the Garfield script and it (unluckily) takes more time to load. Also, because of the C&H authors’ carelessness, there are some gaps between episodes (e.g. after episode 15, there’s a huge gap until episode 39). I hard-coded a solution for one gap only, hope you won’t find it very annoying (the script displays an error message if there’s no strip with the requested number). The script has similar functionality to the Garfield one - it displays all kind of possible errors, has a simple yet sufficient menu.

All feedback is welcome, although - as with my previous ‘comic script’ - I’d prefer not develop this script, everything’s in your hands.

Enjoy. Here’s a working example, and the source code.

Garfield

Thursday, July 26th, 2007

Garfield
Summer. The hottest and the most boring time of the year. There’s literally nothing to do, so I decided to read all Garfield’s episodes. After an hour I found it extremely boring, and then I got another great idea: let’s write a script allowing you to show some Garfield’s episodes on your page.

And here you are. It allows you to display an episode of Jim Davis’ comic for any day since 19 June 1978, displays error messages when you do something wrong (enter the date in a wrong format, enter a date before 19 June 1978, enter a date after today). It displays links to get to the previous or next comic, as well as a small form to enter a requested date. If you want to display a random strip, enter the script with $_GET['date'] set to ‘random’ (e.g. garfield.php?date=random).

Hope you enjoy it and maybe make something useful with it (e.g. write some kind of plugin for a social networking site?). I don’t really want to develop the script futher, so I leave it all to you. I even release the script under no license - if you want, you can show it off to your friends saying that you made it all by yourself.

If the boredom won’t leave me alone, maybe I’ll write some other scripts like this. But I really hope I won’t be forced to do so.
Have fun with the Garfield’s PHP script. Here’s a working example, and the source code.

jQuery

Friday, July 20th, 2007

I’ve always been using script.aculo.us to handle all the fancy JavaScript and AJAX stuff on my site. Recently, though, I noticed that regua.biz takes a terrible lot of time to load, due to the size of the framework. I’ve tried jQuery and it works nice for me (so far).

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

 

jQuery.com

 

jQuery code is easier to write than script.aculo.us’ in my opinion. In the latter, the dollar sign ($) was just a shortcut to getElementById function, whereas in jQuery the dollar function works like a CSS selector - you write $('#div') to select the element with ‘div’ id, $('div') to select all div elements, and $('div li') to get all the li elements inside a div or even $('a[@href*=/content/gallery]') to select all links containing “/content/gallery” in their href attribute. I really like the idea. Writing any code is easier when you don’t have to use functions like getElementsByClassName() or getElementById() (who’s invented such long names and what for?), not to mention implementing the CSS-like selectors in JavaScript.

The jQuery JavaScript library contains the following features:

  • DOM traversal and modification (including support for CSS 1-3 and basic XPath)
  • Events
  • Effects and animations
  • Ajax
  • Extensibility

Wikipedia

jQuery allows you to use brilliant event-related function, like $(document).ready() which is a better form of window.onload (the latter waits until all images have been loaded, the former doesn’t). Also, it solves the old problem of altering CSS properties in JavaScript by giving you a great css() method. For instance, $("p").css("color","#f00"); would change the font color in all paragraphs to red. As simple as it is.

The effects, which are kind of a standard among JS libraries nowadays, are done good (just good) in jQuery. There’s nothing wrong with them, but there’s nothing unusual either. I have to admit that script.aculo.us has a bigger collection of effects available, but I still prefer to get a little bit less animations than use a 60 kB framework.

Among other jQuery’s advantages are a great co-operation with other libraries (prototype, YUI), great DOM traversing and manipulation, plugin support… oh, just try it yourself, I assure you it’s great fun to use it on your website. You can admire jQuery in use here, in the site preferences settings (accessible via the main menu) or in the AJAX-based comment posting.

Another break

Thursday, July 19th, 2007

regua.biz was offline for another couple of weeks, and this wasn’t generally my fault, but Movable Type’s. I mean it just broke down an hour before I went on a two-week trip, so I just couldn’t fix it in any way.

Now the site is powered by Wordpress. Yeah, I know some of you may say ‘it sucks! it’s a crap!’ and I also used to say things like that, but the number of plugins to install is just enormous, and the community is great, so I think I’ll stick with Wordpress for at least few months.

As you can see, the layout’s been changed as well. Why? Just because I wanted to do so :P If you have any comments on the new design, please do not hesitate to share them with me.

Thanks to everybody who’s been waiting for the site to be opened. And sorry for all the breaks that you’ve experiencing recently.