Hitflip – Auto-Unpause Greasemonkey Skript

Was ist Greasemonkey? Ein Plugin für Firefox und Chrome, wodurch man JavaScript einsetzen kann, um die Präsentation einer Webseite  zu beeinflussen.

Und die Erstellung war viel einfacher als erwartet. Habe es gestern den ganzen Tag getestet, und es funktioniert problemlos. Das Skript stellt jede volle Stunde ALLE Eure pausierten Artikel wieder ein, also aufpassen, dass ihr das auch wollt. Effektiv ist das so, als wenn ihr das selbst per Knopfdruck machen würdet.

Ihr müsste dazu Greasemonkey installiert haben und dieses Skript installieren. Dann einfach einen Tab oder Browser geöffnet lassen und bei Hitflip einloggen und auf die Bibliothek gehen. Das Skript wird jede Stunde alle Artikel wieder einstellen. Die Last für die Server von Hitflip ist dabei sehr gering, es ist genau eine Anfrage pro Stunde.

Hitflip AGB: Ich habe die Hitflip AGB durchgesehen, und es gibt nichts, was das verbietet. Genaugenommen ist das auch nichts weiter als Browserautomatisierung. Ich könnte genausogut jede Stunde selber klicken. Das wären dann genaugenommen sogar mehr Requests …

Warum ich plötzlich so vorsichtig argumentiere? Weil ich die Skripting-Pläne in deren Forum kundgetan habe und prompt rausgeworfen wurde. Das ist zwar totale Willkür, aber eigentlich mag ich Hitlip ja. Da ich aber auch gerne wieder “viel zu teure” Artikel ertauschen würde (wobei Hitlip ja jedes Mal 2€ mitverdient), hoffe ich, dass auch andere so wieder ihre Artikel “legal” einstellen können. Und vor allem auch jene, die eigentlich ganz friedliche “fairtauscher” sind, die trotzdem ihre Artikel nicht mal für den gleichen Preis vertauschen dürfen, zu dem sie ihn ertauscht haben.

Liebes Hitflip-Team

Falls ihr das hier lest, die Lösung eurer Probleme liegt in maximal zwei Arbeitsmonaten eines PHP-Programmierers und ist in diesem Artikel beschrieben. Wenn ihr das doof findet, sagt doch einfach Bescheid oder ändert eure AGB aber werft mich bitte nicht gleich wieder ohne Angabe von Gründen raus.

Superb WordPress Plugins – Speed, Easy!

At the beginning, there was the memory explosion of my old blog. I just had to replace it. Luckily, as I’m very happy with the new installation. At first it looked really easy – invest some hours to pick a nice style, backup the old DB in case anything would go wrong, install wordpress over my old installation, see that nothing went wrong. But then came the tricky part – customizing it.

Twitter Plugins

First, there were the plugins. I wanted Twitter, but I had to acknowledge that all Twitter-plugins I tried were incredibly slow. Sad, as there were some nifty functions and nice styles included, but I wouldn’t want my pages to load 5 seconds longer because of that. So I ended up with the really nice and fast Tweetmeme-Button and the not so nice but fast and easily customizeable Xhanch – My Twitter plugin to show my lastest tweets. Xhanch needed some customization, and I’ll likely make it look a little fancier by jQuery when there’s time.

Must Have Plugins

Then there’re some must-have plugins: Google XML Sitemaps thats unbelievably important for the pagerank. Gurken Subscribe to Comments, as you just need as subscribe-to-comments-plugins anyways, and this one does double-opt-in, which is sadly a law-enforced necessity here in germany.

Akismet is included into WordPress anyways, and your Blog wouldn’t survive without it anyway. I wanted to install the Math Comment Spam Protection plugin too, but forgot that you need to include code into the pages to show the mathematical question (like “type in the sum of 2 and 6″), so I deactivated it for now. Maybe it will already be active when you read this post.

The All in One SEO Pack plugin is a no-brainer too – it optimizes META-tags, generates descriptions of your post if you’re too lazy to write one and generally is a good thing.

Speed Plugins

Sadly, Worpress was developed on PHP. This means, WordPress is pretty slow. You want to add some plugins, that help you with the speed as the visitor’s time is very valuable – don’t agrue with me here. To speed things up, you could install a lot of plugins, that help you.

First said, loading pictures is a pain for the browser, especially if you have a lot of tiny pictures for all the soicla networks you want the visitor to share your post – each of these usually uses another HTTP request, and those are damn slow. The jQuery lazy load plugin helps you A LOT here. It basically makes the browser only load pictures that your visitors can see, loading other pictures when the visitor is browsing down the site and reaches the point where the pictures are shown. One Gotcha here: the sidebar pictures were only loaded when you scrolled to the bottom, as the HTML code for that is below all the other stuff. But you can define a CSS class within the plugin, that get loaded the usual way. Putting this class in your image-tags will help you here.

For the same reason as above, the WP CSS plugin is pretty nice, as it includes all your CSS import into one file (meaning there’s only one HTTP-request for the CSS-files) and even gzips them, so they use up fewer space while getting downloaded to the visitor’s browser. Neat. (Update: Does not work with the @font-face CSS-stuff needed to embed a webfont – as that used on this site.)

Another plugin that strips out whitespace and compressed the generated HTML is WP HTTP Compression. No configuration needed — this just works, so use it.

The speed-bazooka after all is WP Super Cache of course. This plugin makes everything superb – the site that goes out to your visitors will be stored, and should another visitor want to see the same page, he will just get the stored copy, so PHP doesn’t need to use its slow braincells for putting the site together again. This one’s just perfect, I would only advise to disable it while you’re working on the design of your blog, because *deleted for obviousness*.

Then you can just Google for “improving wordpress performance” or “speeding up wordpress”, there are a lot more hints out there for stuff you can do without plugins. Like modifying your .htaccess file to stop hotlinking or keep spambots and other unwanted crawlers out.

Other Plugins

Efficient Related Posts is like the best plugin I wished everyone was using – so put it into your blog NOW. It uses the tags you put under your posts to look for similarities and puts the “related posts” part under the post. I often read a lot more that I wanted on other blogs, just because of me thinking “well, that post could really be nice too”. You can watch it in action if you’re on the posts single page below.

Zero Conf Mail is just the most simple solution to putting a feedback-form on your blog, in case someone wants to ask you something directly. I put mine in the about-page, in case you want to use or see  it.

Shadows is a plugin that will underlay all pictures on your site that you add a certain CSS-class to with some sort of shadow. I’m still experimenting with this one. If you want to use it with Zemanta (as I clearly want to), you’ll maybe have to hack a bit in your CSS files, as Zemanta adds some CSS that interferes with the picture’s shado and makes it look weird. If you want to see it in action with another picture I included, you can see that in the post What is Viral Marketing? for example.

When I have some more nice stuff to show off, I’ll post another one. Hope you like this post.

Utopire – Coding a Browsergame with Java

I’ve got a new hobby. Its called Utopire and is a browsergame. Its basically a clone of “Utopia” which was run by Swirve till it made no more profit and was ported from perl to php by some clueless fans. The new people (and PHP) made the game suck more than ever, but as the concept of the game is simple & great, I decided to rewrite it.

I’m using Struts2, Hibernate + MySQL for that, with jQuery added to JSPs for frontend flavour. So far, everything’s nicely set up. For the timing, I’ll resort to the Quartz-library.

As this is pretty time-consuming, I don’t know when I’ll have something testable or mentionable, but its fun so far and I’ll let you know. By the way, doing a lot of blogposts is also pretty time-consuming … I guess it could be called a hobby, too. But at least I now have a good method of doing this in time.

Big Fonts and Clean Design

Using a big fontsize for a blog makes it better readable, especially in times of smartphone websurfing. And this is the main purpose of a blog, getting read. But there’re more advantages.

First, the author (thats me) get to concentrate on the content more. We all know that content is king, but when you’re having all these neat JavaScript and jQuery scriplets flying around, and pictures and badges and links all over the place, its easy to get distracted from that principle. The author also must not fear now, that his post is too small or too undiscoverable to make an impact on his own site, as every post is really BIG now.

Second, with less clutter on the page, the reader can better concentrate on the content. Additionally, the load times are faster, as most JavaScript does something that needs additional HTTP-requests, and thats bad for loading times. Faster loading times means less annoyed readers too. Also the rest of your blogs links and scripts are seen more, as there’s less noise. As I use a related posts-plugin, this means more readers can discover the content they look for more easily.

Whats up next: Having new motivation, there’s a lot to write about. I’ll try to optimize my blog more by decluttering it even more (I’ll make a static page for my recommendations, e. g. blogs, podcasts, posts, software and so on) and I’ll list up my new plugins and tell you why they’re AWESOME. I’ll also have a second look at the plugins I got, and maybe choose some that make the site load faster. That said, I’ll also analyse how I can make the site load faster in general. And look upon how you can blog easier by using simple GTD principles. Stay tuned.

Update: I just included a new font and reduced the font-size for not too big fonts. What you you think? Will post soon about using the new @font-face css styles and the problems with it on different browsers and with CSS compressing plugins.

Which JavaScript-Framework?

If the question is, what JavaScript-Framework you should use, finding an answer is usually all about finding out what you already use and what seems to be the feature-richest, fastest and best supported frameworks. If you already use a Framework, just take that one if you’re not only using it for some easy simple stuff like a popup or something. Otherwise, think about what you’ll need the JS-library to do and consult the web. What I have done:

Some Quotes:

“You can save a tremendous amount of time and effort by using the browser-independent framework that JQuery has spent untold man-hours testing, debugging, and proving in the field. While there’s nothing wrong with writing JavaScript, why not speed your development time by writing to the library instead? As I’ve always said, don’t reinvent the wheel, unless you plan on learning more about wheels.” – Jeff Atwood

“A JavaScript framework may not make you a better programmer, but it will make you more efficient. That alone should be reason enough to choose a JavaScript framework, or library if you prefer. Unless you decide to build your own, there are plenty of options available to developers. However, choosing the right framework can be tricky, and weeding through a mess of opinionated fanboys (myself included) is intimidating.” – Brian Reindel

Features-comparison:

http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks

(pretty much tells us that Dojo and jQuery rule)

Speed-comparison:

http://www.domassistant.com/slickspeed/

My test resulted in: jQuery fastest, Dojo was close … Protoype and Moo were pretty slow (used Firefox 3.5)

Research and advise:

http://www.dannydouglass.com/post/2008/04/Comparing-Popular-JavaScript-Frameworks.aspx

Conclusion

Think for yourself. I’d always recommend jQuery, as every single developer that has ever used it has fallen in love with it, and it just always ranks best – everywhere. You got all features, high speed, short syntax, small filesize, very good documentation, unnumerable amounts of plugins, tutorials – and a low learning curve. If you can’t trust EVERYONE ELSE, you’ve got to have good reasons to.