Archive for the ‘Tech Talk’ Category

JavaScript Debugger and Developer Tool

Thursday, June 26th, 2008

 Life as a modern web developer would not be bearable without a decent debugger tool such as Firebug for Firefox. It allows you to debug your JavaScript, inspect XMLHttpRequests, the DOM, CSS, and edit them.

While I love Firefox and Firebug, there are other browsers out there that I also have to develop for, the dearth of decent debugging tools these has often left me grumbling and lamenting.

But on one of those procrasting whims, I started googling. And much to my suprise I discovered that the latest version of Opera, 9.5, comes with a built in debugger called Dragonfly.

Dragonfly is only in beta, but what it offers so far is very promising indeed. It may not have all of the features that Firebug currently has, but it is certainly a very useful tool as it is. With the addition of this feature to Opera, the browser is now a serious contender as a developer tool. One thing that was a little annoying, was that Opera's Dragonfly web page doesn't clearly state that, you only need to be using the latest browser, and can activate it under the menu option Tools / Advanced / Developer tools.

My curiosity then led me on to look at Safari next. And yes, there appears to be a similar tool also, but after server attempts at following the instructions from multiple websites I can't activate it. The steps one has to go through to enable it are counter intuitive. With both Firefox and Dragonfly, they are easily accessible via a menu of icon. So I've given up on Safari's development tool until they make it easier to access.

Now there is one browser yet to mention, and I hear the collective groan, Internet Explorer. Once the darling, it is now the millstone around the necks of developers across the world. For years they have had a developer tool in beta, that just has never progressed anywhere. It doesn't even offer an integrated JavaScript debugger.

The future of browsers is becoming very competitive again, with those clearly moving in the right direction, the others that need to pick up their game or be left out of it.

 

Unofuscate Javascript

Sunday, February 24th, 2008

I have always learnt how to code by example. I find some one else's code open it up have a look around, and start hacking. But every once in a while I'll come across some code that has been obfuscated. It has never stopped me in the past, and usually I've taken a long and laborious way to make it readable again.

Well today, I was feeling particularly impatient with the JavaScript I wanted to open up. I looked through my Firefox plugins and found nothing, so I then googled for a solution. To my surprise I found something extremely simple and elegant.

alert(function showMeTheCode() { yourJSgoesHere });

The "yourJSgoesHere" is of course replaced with the code you want to unobfuscate. Firefox will then print you an alert with neatly formatted JavaScript. Enjoy! 8)

HTML Canvas and Javascript

Tuesday, January 15th, 2008

Firefox Rendering Bug Fixed in Record Time - by Kevin Yank

http://www.sitepoint.com/blogs/2007/12/03/firefox-rendering-bug-fixed-in-record-time

When Mozilla released Firefox 2.0.0.10 last Monday, the release notes
made it out to be a relatively minor update correcting, as usual, a
small number of security issues. As it turned out, however, the release
contained a nasty surprise for developers whose sites relied on Canvas.drawImage, a JavaScript feature of recent browsers that lets developers display images with effects like rotation and drop shadows.

Firefox 2.0.0.10 completely broke this feature, causing images to
disappear from sites that relied upon it. JavaScript effects libraries
like instant.js
suddenly stopped working, and developers had no way to fix the problem,
because, as far as Firefox was concerned, everything was working
perfectly.

http://minijoe.com/samples/tutorial/3_1_canvas_drawimage.html

http://developer.apple.com/documentation/AppleApplications/Reference/SafariJSRef/Classes/Canvas.html

http://canvaspaint.org/

http://simile.mit.edu/timeplot/

http://www.abrahamjoffe.com.au/ben/canvascape/

http://www.abrahamjoffe.com.au/ben/canvascape/textures.htm

http://www.whatwg.org/specs/web-apps/current-work/#the-canvas

Google Works As A Password MD5 Hash Cracker

Thursday, November 22nd, 2007

Careful what you post online, be very careful.

Steven J. Murdoch , a security researcher at the University of Cambridge Computer Laboratory recently had his WordPress blog hacked. The hacker created an administrator account on the blog. However Steven quickly deleted it. He then began investigating how this happened. In the process of doing this he was curious about the password that the hacker used.

WordPress stores raw MD5 hashes in the user database. It is believed to be computationally infeasible to discover the input
of MD5 hash from an output. Someone would have to try out all
possible inputs until the correct output is discovered.

Steven looked at various lengthy methods of uncovering the password, but in the end he turned to Google. It seems that many sites use hashing for query strings. His search led him to a genealogy page with the surname of Anthony. Bingo, this was indeed the password.

More detail can be found in his original posting about Google as a password cracker.

Firefox 3 Coming Soon.

Saturday, September 22nd, 2007

Firefox 3 Coming Soon. Firefox 3 is in its final stages of Alpha development with a host of new features and improvements.

Mozilla has unveiled for the first time several security features it's talked up for months. Among the security provisions are built-in anti-malware warnings and protection against rogue extension updates. 

Debuting is Places, the name given to the new unified history and bookmark manager. Unlike current browser bookmark tools, Places will use a database — the SQLite database engine powers it — so users can search for saved pages. Places will also support the use of tags, or user-defined labels that are applied to categorize bookmarks and make them easier to retrieve via searches.

On offer is also a new download manager that will integrate with third-party virus scanners and malware protection.

The graphical rendering of Firefox also gets an update with the Cairo rendering engine and animated PNG image files. The versatile Cairo graphics library is a vector-based drawing API that supports a wide variety of backends. Cairo can take advantage of hardware acceleration where available and simplifies cross-platform graphics application development by providing an internally consistent and cohesive framework that emphasizes platform-independence.

Thanks to this new graphics infrastructure, boxes with corners rounded by the pre-CSS 3 property border-radius are rendered with beautiful anti-aliasing (currently accessible as the non-standard -moz-border-radius and soon -webkit-border-radius). Cairo also provides smooth scaling of images. Up until now scaled images looked jagged.

The new improvements in Firefox 3 will finally enable it to pass the Acid 2 test, a CSS test case developed by the Web Standards Project to illuminate flaws in HTML/CSS rendering engines. To pass the Acid 2 test, browsers must comply with W3C standards and provide support for a wide variety of features that are considered relevant by web designers. The Acid 2 test has been passed by several other browsers, including Safari, Konqueror, and Opera, but not Internet Explorer. Passing Acid 2 is considered to be a significant milestone in Firefox development.

Firefox 3 has particular implications for the development of the Mac version of Firefox, as it provides support for the use of Cocoa Widgets.

One downside of Firefox 3 is that several older operating system versions are no longer supported: Windows 95, 98 and ME and OS X 10.2 Jaguar. 

Mozilla has not officially committed to a release date for the final version of Firefox 3.0. 

WordPress 2.3 Beta 1

Thursday, August 30th, 2007

WordPress 2.3 Beta 1 is now available for download and testing. Some of the features of 2.3 include automatic notification for plugin and core code version updates, built-in tags support, faster javascript, and SEO-friendly URL redirection.

There have been reports of compatibility issues with a few plugins due to the changes to the category system (plugins that only used the API functions should be okay, but those that used direct SQL queries may break). Also, some file moves in the admin area have affected a few other plugins. Please report problems on Trac, and document compatible plugins on the Codex.

I've already installed the beta on one of my blogs and quite like some of the new features, such as tags and automatic notifications. In fact I already found the plugin notification useful, and upgraded one. I have also however seen some bugs. I'm looking forward to the final release. 

Web 2.0 Mashup Treasure Trove

Saturday, July 28th, 2007

I am currently researching a project concept to integrate a number of web based Open Source applications. In my googling I came across Mashable.com a Web 2.0 Mashup Treasure Trove. They are currently running a series for WordPress.

With in excess of 4.5 million monthly pageviews, Mashable is the world's largest blog on social networking.

It covers sites like MySpace, Facebook, Friendster, hi5, Piczo, Bebo and YouTube, but also other independent web applications.

The Silver Bullet for Spam

Tuesday, June 12th, 2007

I have a client Rebecca Caroe of Rowperfect that I work closely with on her blog. She will often send me little tip bits of information that she comes across when surfing the internet, and asks whether it is of any benefit for her site or my other customers. There have been many times that this has been invaluable. An extra pair of eyes on the internet never goes astray.

On this occassion I was directed towards Andy Beard's post "Akismet False Positives & Spam Karma Configuration". While Andy does not actually say Spam Karma is the be all and end all for blog spam, his enthusiasm does. It may indeed warrant a closer look, however as I've noted, many people are looking for that holy grail of the ultimate spam killer, a "set it and forget it" solution.

The sad reality is that because bloggers are using freely available plugins, the very same plugins are also freely available to the programmers working for the spammers. The plugins become victims of their own success. The more popular they are the more targeted they will be. 

Towards then end of his post, Andy goes on to suggest a combination of spam filter plugins. This the best solution, a combination of filters makes your defenses less predictable and more complex for the spambots, especially if you choose your own cocktail of spam filters.

WordPress Admin

Wednesday, March 28th, 2007

I'm a fan of WordPress. It produces clean extensible markup. It also has huge user base, and consequently a developer base also.

However, I've always found the admin rather ugly, and its navigation menu rather annoying, as I miss having the easy access to sub-pages via a drop down menu system. So after doing a little googling, I finally located two plugins which give me a look and feel that I've been craving. Tiger Style Administration by Steve Smith provided the slicker look, and Admin Drop Menus by Andy Staines provided the drop down menus

On first activation of both WordPress plugins, they don't appear compatible. After closer inspection, the solution to their happy co-existence lay in making modifications to the Tiger Style Administration CSS.

After activating the two plugins, and implimenting this modification, my client feedback was overwhelmingly positive, making WordPress far more intuitive to navigate.

 I'll post the CSS solution soon.