Creating a sticky note app with HTML5, CSS3 and Javascript

I saw this tuto­r­i­al the oth­er day, it’s cool but I fan­cied tak­ing it a step fur­ther and make it use­ful as an app rather than just a fan­cy way to show some struc­tured data on the screen. Here’s a list of the fea­tures which I want­ed to add: being able to edit the title …

Cre­at­ing a sticky note app with HTML5, CSS3 and JavascriptRead More »

Having fun with HTML5 — Canvas, part 5

In part 4, I put togeth­er the foun­da­tions for a mini shoot­ing game, with tar­gets mov­ing on the screen and you can ‘hit’ them by click­ing inside the tar­gets, etc. etc. I promised an update to make it feel more like a game, so here it is! Adding a back­ground The black back­ground was more …

Hav­ing fun with HTML5 — Can­vas, part 5Read More »

Having fun with HTML5 — Canvas, part 4

Fol­low­ing on from part 3 where we basi­cal­ly made a lit­tle app that lets you scrib­ble with HTML5’s can­vas ele­ment, let us push on and see what else we can achieve with the can­vas ele­ment. The log­i­cal next step would be to made ani­ma­tions, and give you a way to inter­act with the ani­ma­tion. So …

Hav­ing fun with HTML5 — Can­vas, part 4Read More »

Closure in Javascript vs C#

Java vs C# As Jon Skeet point­ed out in this excel­lent arti­cle on clo­sures, the strate­gies of cap­tur­ing the exe­cu­tion con­text which the behav­iour is bound to dif­fer­ent between Java and C#. C# cap­tures the vari­able itself, where­as Java cap­tures the val­ue of the vari­able. To illus­trate the dif­fer­ence, here’s Jon’s orig­i­nal exam­ple in C#: …

Clo­sure in Javascript vs C#Read More »

Currying and Partial Applications in F#, Javascript and C#

In my last post I explained the dif­fer­ence between the tech­niques of Cur­ry­ing and Par­tial Appli­ca­tion, fol­low­ing on where there let me show you how you might apply these two tech­niques in F#, Javascript and C#. F# Start­ing with F#, being a func­tion­al lan­guage it makes cur­ry­ing and par­tial appli­ca­tion dead easy (con­sid­er­ing that they …

Cur­ry­ing and Par­tial Appli­ca­tions in F#, Javascript and C#Read More »

Currying vs Partial Application

Recent­ly I have come across some real­ly inter­est­ing ques­tions and debates around these two terms and how they dif­fer from one anoth­er. There seems to be wide­spread con­fu­sions with many exam­ples demon­strates one whilst intends anoth­er, and some sim­ply uses the terms inter­change­ably. Whilst admit­ted­ly not being a func­tion pro­gram­ming expert, I’ve spent a bit …

Cur­ry­ing vs Par­tial Appli­ca­tionRead More »

Creating a link swipe effect with Javascript

I saw this in last month’s .Net mag­a­zine and thought it was pret­ty cool and worth­while shar­ing. With­out giv­ing away too much of the intri­ca­cies (see­ing as this is not my own work), this tech­nique essen­tial­ly boils down to using Javascript to append a <span> ele­ment to mask over each of the links on the …

Cre­at­ing a link swipe effect with JavascriptRead More »

Javascript’s prototypal inheritance, for a C# developer

The oth­er day I put up a post with some quick bul­let points about objects in javascript to help some­one from a sta­t­ic, strong­ly typed lan­guage (like C# or Java) back­ground under­stand javascript’s dynam­ic and loose type sys­tem. One impor­tant thing I haven’t talked about yet is the way inher­i­tance work in javascript, which again, …

Javascript’s pro­to­typ­al inher­i­tance, for a C# devel­op­erRead More »

Javascript objects, for a C# developer

Com­ing from a C# back­ground, the thing that has struck me the most in learn­ing javascript is its com­bi­na­tion of dynam­ic and loose type sys­tem and pro­toy­pal inher­i­tance mod­el (more on this lat­er). Objects in javascript are very dif­fer­ent from those in C#, though the ExpandoOb­ject type in C# 4 offers sim­i­lar abil­i­ty to add/remove …

Javascript objects, for a C# devel­op­erRead More »

Having fun with HTML5 — Canvas, part 3

Fol­low­ing on from part 2 where I wrote a sim­ple page with a can­vas area where you can scrib­ble, I thought I’d add a cou­ple of new fea­tures: abil­i­ty to show the image as PNG image so user can save it change the line cap change the line join change the shad­ow set­tings (colour, off­set, …

Hav­ing fun with HTML5 — Can­vas, part 3Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.