Skip to content

{ Category Archives } Codeprix

My first Scheme program

I’ve just started experimenting with Scheme, specifically to follow Structure and Interpretation of Computer Programs. Here is a Scheme procedure that returns the sum of squares of two larger numbers out of the given three. 1 2 3 4 5 (define (sumLargeSquare a b c) (cond ((and (< a b) (< a c)) (+ (* [...]

Tagged , ,

‘protected’ implementation in Actionscript 3 is BROKEN

Consider following code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 public class BaseClass{ public function modifyProperty(property:String, value:Object):void{ this[property] = value; } }   public class SubClass extends SubClass{ protected var count:int; }   public function test():void{ var testObj:BaseClass = new SubClass(); testObj.modifyProperty(’count’, 3); } Theoretically, the call at [...]

Tagged

How Facebook (probably) implements SMS threads

A lot of web applications provides you the ability to receive or post updates using SMS (text messages). Twitter is the posterboy of such applications. But the feature that distinguishes Facebook SMS updates from any other service is that you can actually reply to individual messages and your message then becomes a part of the [...]

Tagged , , , , ,

Bing/Google toggle bookmarklet

I’ve been trying out Bing as my default search engine for last few months and the results are definitely at par with that of Google for most of the consumer categories. But sometimes you just need a quick toggle to see what Google would return for your query. So here is a small bookmarklet that [...]

Tagged , , , ,

Minifying Javascript/css without changing file references in your source

Rule 10 of Steve Souders High Performance Web Sites: Minify Javascript The most common problem faced while implemnting this is how you handle the full and minified version and how to change there reference in referencing documents. One of the easier ways to do this is to make it part of the deployment process. Here [...]

Tagged , , , , , , , ,