Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  A turing machine in 133 bytes of javascript

Multiply turing machineThe fact it took me 20 lines of javascript to implement a nondeterministic turing machine simulatorlast week kept me up at night. All weekend. Too much code for something so simple and I kept having this gut feeling implementing a basic version shouldn’t take more than 140 bytes.Sunday afternoon I sat down for about an hour, collected my thoughts, and started pumping out code with cryptic variable names. It was beautiful, first version ...

3,079 0       JAVASCRIPT TURING MACHINE SIMPLE CODE


  Software philosophy: Release early, release often vs polished releases

Release early, release often is a philosophy where you release the product as soon as possible and rapidly iterate it to perfection by listening to your customers. A polished release, on the other hand is where your product, in its initial version is solid, lacks obvious bugs and has just enough features to satisfy a majority of your consumers. Most software companies adopt either one of this and that choice is not superficial. In fact, it roots down to the heart of the company’s ideologies.Before you launch your next big product, website, app, read this and decide which side you are on...

2,761 0       DESIGN PHILOSOPHY RELEASE EARLY RELEASE OFTEN POLISHED RELAESE


  Importance of Side Projects

Side projects are important for a few reasons. Programming is a creative process. Side projects allow programming without deadlines or restraints. Side projects allow programming in an exploratory way.Explore new technologiesEvery day there are more and more bleeding edge technologies coming out. A side project is a great place to try them out. There’s no reason to worry about bugs or performance issues because it’s just a side project. You’re not depending on the project to pay your bills. It’s ok if the website crashes.Creating from scratchMost jobs I’ve ha...

2,258 0       SIDE PROJECT CREATIVE IDEA DEALINE SCRATCH LAUNCH


  One of the Best Bits of Programming Advice I ever Got

Years ago (early 1992), I attached myself to this crazy skunkworks project that was using this weird language called Smalltalk. "Object Oriented" was in its infancy as a "hot" item. High paid consultants. Lots of people laying claim to what this new object religion was all about. This was 5 years before Alan Kay would make the statement "I invented the term 'Object Oriented Programming' and this {Java and C++} is not what I had in mind."Shortly after hooking up with this whacky group with the whacky language, still confused about what the difference was between an instance variable, a class va...

3,451 0       PROGRAMMING ADVICE OOP SMALLTALK BETTER DESIGN


  The Ultimate GetElementsByClassName, Anno 2008

Two and a half years ago, I released the first version of getElementsByClassName. With how web browsers has evolved since, I thought I’d release a real ultimate version, dated 2008. Native Web Browser SupportSafari 3.1 has native getElmentsByClassName support, and upcoming Firefox 3 and Opera 9.5 will have it too. It only leaves out, you’ve guessed it, Internet Explorer.The Necessity Of This ScriptLiving in a world where Microsoft is halting every possible way the web could evolve, this means that you will need a custom script for this for years to come. Also,...

1,928 0       JAVASCRIPT IMPLEMENTATION GEELEMENTSBYCLASSNAME CROSS BROWSER COMPATIBLE


  Hash Tables in Javascript

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short example of a hash in JavaScript would be as follows:var myArray = new Array();myArray['one'] = 1;myA...

4,842 0       JAVASCRIPT ARRAY IMPLEMENTATION HASHTABLE


  Functional Programming For Object Oriented Programmers

After recently remarking about how I finally "got" functional programming I was asked by one of my millions of twitter followers... ¬_¬ to write up an explanation of a small F# program spoken in terms that fellow O-O programmers would understand. Before I become too entrenched into the functional programming way of thinking, that is, and can't explain it anymore. As a former tutor this is one of the major problems with being able to teach something once you understand it. You've forgotten how not to make sense of the concept and what finally helped you get over the me...

1,758 0       OOP PATTERN FUNCTIONAL PROGRAMMING F#


  UIWebView Secrets - Part1 - Memory Leaks on Xmlhttprequest

My first blog post on iphone subject reveal a big memory bug when using UIWebView component. This is the (only one) component to display some HTML content in an iphone interface. UIWebView object has a lot of differents issues and I’m going to highlight the biggest of them. Actually, all XMLHttpRequests used in javascript code are fully leaking!!! I mean when you do a request that retrieve 100ko of data, your memory used grow up for 100ko! This bug is not always active, but almost always. In fact the trigger to enable it is to simply open one link in your UIWebView. For example, clickin...

7,372 0       XMLHTTPREQUEST MEMORY LEAK MOBILE DEVICE UIWEBVIEW