August 2010
3 posts
2 tags
Name that code - Online programming quiz
Created by OnePlusYou - Free Dating Sites It’s a bit too easy, but fun anyway …
Aug 16th
4 tags
Thingler →
A really simplified collaborative todo list written entirely in JavaScript using node.js and CouchDB.
Aug 6th
3 notes
3 tags
9 Notes for Developers
fuckyeahcomputerscience: wedothingsinc: In any creative discipline, it’s good to have pointers that can keep you on the straight and narrow. Developing is one of these disciplines. From my experiences, I’ve put together 9 quick notes which can improve the way you code, and the way you see developing. It’s a valuable read, especially for anyone starting out or for programmers looking to refine...
Aug 2nd
24 notes
July 2010
6 posts
3 tags
How to choose your first programming language
Everyone has to start somewhere and of course that applies to programming, too. But getting started in programming puts you in front of one important question right at the start: What language should I start with? There’s a gazillion of languages that are fitted for beginners. Some of them may prove to be your tools of choice even when you’ve gathered some experience. Others, well,...
Jul 28th
3 tags
Adding .indexOf() to arrays in Internet Explorer
Most of you will already know this but hey, it doesn’t hurt to tell the tale again. Looking up an array elements value by key is trivial: var bar = someArray['foo']; In actually working javascript implementations the reverse is simple, too: 'foo' == someArray.indexOf(bar); //will be true after the above code snippet The actual API docs can be found over at Mozilla.org. However, there...
Jul 28th
1 tag
The Time Zone Converter →
onethingwell: Does what it says on the tin.
Jul 28th
14 notes
Jul 17th
117 notes
Jul 17th
135 notes
Jul 1st
June 2010
3 posts
6 tags
Harry Potter on the UNIX Shell →
Spells from Harry Potter and their corresponding Bash commands: Accio: wget (Pulls an object to the caster.) Alohomora: chmod +rw (Unlock a door.) Avada Kedavra: rm -rf / (The killing curse.) Colloportus: chmod uo-rw (Prevents a muggle from openin a door.) Deletrius: history -c (Deletrius clears a wand’s spell history.)/li> Episkey, Reparo: fsck (Heal minor injuries./Fixes objects.) ...
Jun 19th
8 tags
PHP style date formatting in JavaScript
A lot of people probably already know PHPs date formatting system and are quite familiar with it. Using formatting strings like “Y-m-d H:i:s” makes it really easy to produce nicely formatted date strings in a way that is relatively easy to remember since you probably use the same few formatting strings all the time. In combination with the much improved DateTime class in PHP 5.3 this...
Jun 12th
3 tags
“Saying “I know <programmingLanguageX />.” is like saying...”
– This especially applies to languages that are easy to get into.
Jun 1st
May 2010
14 posts
May 26th
180 notes
9 tags
How asynchronicity gets you a nice girl
I just made myself some pasta. Ok, nothing spectacular so far, just pasta with plain tomato sauce. But while doing so, I thought about the way I was acting and recognized the similarity between my pasta cooking and … … JavaScript. Yes, JavaScript. Let me explain. What’s the “algorithm” for making pasta with tomato sauce? It’s something like this (may vary...
May 26th
5 tags
“Software development over the past decade was pretty much ruled by Java. I...”
– My cerebellum just said that …
May 20th
8 tags
Precise finance in JavaScript
JavaScript knows only one number type: signed 64Bit floating point. That is pretty cool most of the time because you can’t run into strange type conversion issues when every number is already of the exakt same type. However, as soon as you do financial mathematics in JS, you’ll run into pretty bad mojo. Money does not have more than two decimal fractional digits and it’s always...
May 20th
May 19th
13 notes
5 tags
May 15th
7 notes
4 tags
May 15th
7 tags
Protect your late statics!
In PHP 5.3 we got a great feature called “late static binding”. If you don’t know it yet, read about it here. However, there’s a little problem that may confuse some people and that may also lead to quite unexpected behaviour, if you don’t pay attention to it. Let me demonstrate: <?php class Foo { static public $foo = 23; } class Bar extends Foo { public...
May 12th
2 notes
3 tags
A Brief, Incomplete, and Mostly Wrong History of... →
fuckyeahcomputerscience: 1801 - Joseph Marie Jacquard uses punch cards to instruct a loom to weave “hello, world” into a tapestry. Redditers of the time are not impressed due to the lack of tail call recursion, concurrency, or proper capitalization. 1842 - Ada Lovelace writes the first program. She is hampered in her efforts by the minor inconvenience that she doesn’t have any actual computers...
May 10th
34 notes
3 tags
May 9th
3 tags
APRESS.COM : Pro JavaScript Design Patterns →
Now reading …
May 9th
3 tags
The World's Most Misunderstood Programming... →
This essay by Douglas Crockford may be a little bit older and most people who (really) know JavaScript also know this already. Everybody else should read it, like … NOW! Especially the part about the books is, well, sad but true. You mostly just can’t find JavaScript books that don’t teach you incredible crap! The essay is also available in many other languages (German, French...
May 4th
8 tags
Douglas Crockfords "Object.create()"
I think I’ve seen this before, but probably forgot about it somehow. Today I noticed it again somewhere on stackoverflow.com (That’s me over there.) It’s a neat little technique developed by Douglas Crockford to quickly inherit an object from another one as its prototype: if (typeof Object.create !== 'function') { Object.create = function (o) { function F() {} ...
May 4th
May 2nd
240 notes
April 2010
6 posts
5 tags
OAuthentica.js
After a lot of trial and error and two complete rewrites, I’m proud to announce the release of ma OAuth implementation in JavaScript: OAuthentica.js 1.0.0 It covers the complete authentication workflow from entering the provider supplied application credentials to requesting the authenticated acces token and secret. It also supplies the standard methods to make further requests to an OAuth...
Apr 26th
9 tags
Crypto-js by Jeff Mott
I’m currently working on an OAuth library for JavaScript environments like Adobe Integrated Runtime, Appcelerator Titanium or Palm WebOS. While that is not the point right now, it’s why I got into cryptography in JavaScript at all. For OAuth, you always need some sort of signing method, mostly HMAC-SHA1 and many programming languages have build in implementations of these algorithms...
Apr 25th
6 tags
Anything can be ... actually anything
Ok, this may seem pretty silly. But I think it demonstrates an interesting point: Not only is everything an object in JavaScript. A single object can also be anything in itself. //Let's create an object ... Anything = function ( food ) { var text = 'Something really meaningful' this.toString = function () { return text; } this.constructor.number = 42; ...
Apr 23rd
7 tags
The Instant JavaScript Sandbox
I don’t know about you, but I’m really annoyed by the fact, that I always need to create a blank HTML file or copy an existing template, if I just wanted to quickly try something in JavaScript. Also there’s the annoyance of either mixing HTML and JavaScript which is not only inherently evil but also distracting and messy by nature or to have at least two files (.html and .js)...
Apr 23rd
6 tags
It does Ajax, nothing more, nothing less - Teucer
For a long time, if i needed Ajax functionality in a HTML/JavaScript Application I’d just have thrown in the current release of jQuery and used its very nice Ajax methods. Well, jQuery is in fact totally abso-f***ing-lutely awesome as a complete JavaScript framework. It given you every tool you need to build really great user interfaces for web appllications. But what if you just need...
Apr 17th
Apr 6th
30 notes
March 2010
13 posts
4 tags
“If parameters of functions are also called “arguments”, can calling...”
– self
Mar 26th
404 Page using CSS3 transforms/transitions
webkitbits: This 404 page on idzr.org is one of the best concepts I’ve seen to date — using CSS3 transforms and transitions to create a particle system.  The Javascript which powers it is fairly straightforward as well.
Mar 23rd
49 notes
The hgroup element →
webkitbits: The HTML5 Doctor is in, and he’s explaining <hgroup>.
Mar 23rd
6 notes
8 tags
Base64 problem in jsSHA
jsSHA is a very nice library for the SHA family of security algorithms. I used it to calculate the HMAC-SHA1 hash needed for OAuth signatures. But there’s a problem: For OAuth, you need to encode your signatures in base64. jsSHA supplies a method for this, which is nice, except that it “forgets” to pad the base64 string with “=” characters if needed. Without that...
Mar 17th
7 tags
Searching for stuff in the DOM
McBachmann and me just discussed regular expression literals in JavaScript and came up with a nice little tip: If you want to search a web page even if it’s DOM has already been changed via JavaScript routines, you can use the ability of modern (as in Firefox/Opera or Webkit based) browsers to execute custom Javascript on any web page to match any DOM elements HTML representation against a...
Mar 16th
3 tags
php-excel-reader →
If you ever have to read data from Excel sheets (up to Excel 2003), this really comes in handy. It’s easy enough to get started immediately.
Mar 13th
1 note
7 tags
Twitter Locations via cURL
Just a quick little piece of command line code to mess with the Twitter location API: curl -u [username]:[password] -d "status=[statusText]&lat=[latitude]&long=[longitude]" http://api.twitter.com/1/statuses/update.xml Just replace the [placeholders] with the appropriate data and have fun pointing your location data on Twitter wherever you want. This will work on any system that has a...
Mar 12th
6 tags
A short note on FeedWriter and IDs
As I previously mentioned, I used this neat little class called FeedWriter again for my EtherFeed script. Despite of its general usefulness I ran into a curious problem with it because the link contained in every feed item point to the exact same URL (the one of the Etherpad). FeedWriter uses this URL as material for UUID generation. See the problem? Right, all feed items had the same ID field...
Mar 11th
6 tags
EtherFeed v1.0.1
Recently I started to use Etherpad for anything where more than one person was involved because communicating with multiple people by Email is just plain AAAAAAAARRRRGH! The problem with Etherpad is, that it doesn’t send any notification to it’s users when something has changed. You have to check the pad manually and probably someone will forget to do so and won’t be up to date...
Mar 11th
9 tags
Multiple inheritance in PHP with the decorator...
The concept of multiple inheritance in commonly known from C++. It can be a useful feature as well as a path to really messy code that is prone to unexpected behavior if one uses it without caution. See the Diamond Problem for a common example. As you probably know, PHP does not support real multiple inheritance and if you ask me, that’s a good thing. But there are times when you may want a...
Mar 11th
“I propose a new expansion for TDD: Thought-Driven Design. It’s a very...”
– I just found this here on Twitter and I have to say that a lot of software projects would be a whole lot easier, cheaper, faster, more stable and generally better if the people involved would use the thing between their ears from time to time.
Mar 10th
10 tags
Doctrine ORM as model layer for Zend Framework
In my opening post, I mentioned a new project that I’m working on which is a fairly simple web application with a few database tables for user management and the usual stuff. It’s exact nature and purpose is not important here. Anyway, I had worked with Zend Framework before and while it’s an awesome application framework, the database abstraction provided by the Zend_Db classes...
Mar 7th
1 note
5 tags
echo "Hello World";
So, I’m starting a new blog about application development. I’m a web developer from Germany, specializing in PHP (ZCE) and JavaScript and I decided to begin blogging about that when I recently started working on a new project. I’d like to share the experiences made during that project and to help others avoid making the same mistakes, that I made. When I encounter anything...
Mar 7th