Tag Archive | JavaScript

JavaScript: My Journey

So I finally jumped on the bandwagon. Two bandwagons, actually, but I’ll get to that soon.

I have a somewhat troubled history with JavaScript. You know those horror stories you hear from devs sometimes, the ones that make you shiver with fear? I lived through one of those, and it tainted my view of JavaScript from early on in my career. I saw JavaScript used (or more accurately, abused) in such a way that I was completely turned off from JavaScript, with an almost irrational hatred of the language.

I was encouraged to read “JavaScript: The Good Parts” to try and overcome my fears regarding JavaScript, and thankfully I managed to put my anger (and yes – it was genuine anger; that’s how bad this project scarred me) aside and plunged in headfirst. Very quickly I realised that JavaScript is actually pretty amazing. Prototyping languages are something I’d never really encountered before (I come from a .Net background). The JavaScript in my past was most definitely not how to use JavaScript, so it was fascinating to see JavaScript demonstrated in such a way that had me nodding my head and thinking “damn, that’s pretty cool”.

So bit by bit (ha, geddit?), I started to appreciate JavaScript… Not that I’d actually used it for anything else at that point, but my anger towards anything JavaScript was fading, so it was nice to come back to a slightly more balanced standpoint. Then, I discovered JQuery. Wow… just wow. JQuery is probably the single most important thing to ever happen to JavaScript… So many things that were previously tedious and terrible were single line, small character set calls. So my attitude towards JavaScript improved again.

Then, most recently, I had the pleasure of attending a presentation by a mate at work who was doing a live coding demo app (oh yes, live coding. Ballsy, right!?) to demonstrate some Windows 8, HTML5 and JavaScript goodness. I came away not only impressed (it was a good presentation), but inspired.

Which brings me to the second bandwagon; Windows 8 development. I’d tinkered with it a bit in the past, but nothing more than a bit of light reading. This was the first time I’ve actually spent any decent amount of time looking into it, and jumping straight into the Windows 8 JavaScript apps has been an absolute blast. So far, I’ve done the venerable “Hello World” tutorial, HW with navigation, and am currently working my way through the photo viewer sample application. And I’ve gotta say, using JavaScript is actually kind of fun especially with all the functionality exposed by the WinJS library. It’s been a while since I’ve picked up a completely new technology (no, I don’t count the previous experience I’ve had with JavaScript), and I can see some pretty awesome potential with JavaScript in Windows 8 development.

Come to think of it, its been a long time since I’ve coded for myself and actually enjoyed it this much. With my current job, I don’t get much time to play around with the new Shiny and now that I’m currently on holidays I think I’ll be spending some more time hacking away at JavaScript and Windows 8 in general. Once I’ve completed the tutorials I might try my hand at something small, maybe a blog engine or something to really solidify the knowledge in my head.

While I like what I’ve done so far in the WinJS world, I would be very curious to see what people have used for things like navigation and layout outside the WinJS realm. A lot of the stuff I’ve seen in Windows 8 Land, WinJS makes ridiculously easy (which is a good comment on the guys who developed the WinJS libraries), so once I’m done with the Windows 8 side of things, I’m going to delve into the other areas and see whats out there in terms of APIs and the like.

So this is my journey so far, and I hope you enjoyed the post. I think this might be Part 1 of a series… Not quite sure yet. Maybe a follow up post on my concerns with JavaScript development in general (because even with my new-found positive attitude, there are still a few!), and touching on some gotchas in the Windows 8 landscape.

Expect a follow-up post very soon with the resources I’ve used so far in my Windows 8 JavaScript learning journey.


The Messiah of Debugging

You know what Im talking about…

In Visual Studio 2008, Microsoft was kind enough to introduce Javascript Debugging. That’s right people! Gone are the days of the 5 million alert(‘your text here’) boxes to try and figure out what the hell is going on with the custom, propietary javascript control you were unlucky enough to inherit in a support project.

I thought I would share with you all the (wonderfully) basic steps in enabling javascript debugging on your machine.

In Internet Explorer, click Tools -> Internet Options.

Click the ‘Advanced’ tab (because developers are advanced users… right?), and untick the two boxes ‘Disable Script Debugging (Internet Explorer)’ and if necessary, ‘Disable Script Debugging (Other)’. Click the Apply button and restart IE.


Now, you will see little popup boxes every time javascript falls over asking if you want to debug (and that’s in ALL websites), so no doubt it will drive you crazy to the point where you want to turn it off again. 🙂

I know I did…

But thankyou Microsoft for giving us the tool to truly make our lives easier… Its about bloody time! And the bonus? It actually works as you would expect it to work… you get most of the functionality of the normal .Net debugger (intellisense, viewing variables via hover etc), but in javascript. I think im in heaven…

Til next time!

Note: You must have admin privileges to disable these options, as well as having Active Script Debugging installed on your computer. Active Script Debugging is usually automatically installed with Office or VS.NET. Alternatively, you can download Microsoft Script Debugger from the MSDN website.

%d bloggers like this: