Yes, you read the title correctly. Bear with me, it's not a marketing ploy.
IE's history is a sour point in the memory of any legitimate web developer. But in all honesty there are quite a few things I would love other browsers to have them as well.
So without further due, let's start with sweet point number 1:
Major updates, especially for the corporate world, are not always an option. I love the fact that IE allows you to pick from its developer tools the version of IE to target. This can also be controlled via request headers, meta tags, or company policy, and it's reasonably easy to set-up. Comparing with Firefox ESR - which is the only other option (why?) that offers stability over upgrades over years, IE is a breeze.
Check this HTML:
The beautiful thing is that you don't need to use a timer, and keep checking if the element changed its position. Sweet, sweet, sweet.
How do you do that?
For example if you want to disable resizing of images in content editable regions you need a CSS selector:
and the noresize.htc:
Now even if you add a NEW image, this code will be executed for every instance. How amazing is this?
Sample 3 courtesy of this nice post: http://nickw101.wordpress.com/2011/02/25/disabling-image-resizing-in-ie-contenteditable-elements/
Aren't you tired of editing <pre/> tags just to add a trivial code sample into your article? Or escape it as HTML? Or escape characters like < from it?
Wouldn't you want buttons like these into your editor, that just open you a dialog to simply add your code sample into the article?
Something like, you click the button, a dialog opens, you select the programming language and get stuff like this:
Click update and you get this output:
No seriously, that's all I did.
It brings me great joy to announce the availability of this application.
Available as both a plugin for Wordpress or Joomla, it's available to download at: http://codeeditor.ciplogic.com
Whenever you want to add a custom style to your's site CSS, I generally see the general "solution" to add the CSS to the template itself, eventually add some extra custom PHP inside your template from the templates folder. I dislike this solution, because then you need to remember that your template is actually tainted, and you can't just install the template and your CSS, you again need to fiddle with its internals.
Obviously it can be seen that I can add multiple custom CSSes, but generally I preffer only one. Since the node is appended to the head later that the head element that was outputted by Joomla, I also get my custom CSS last, which helps when it comes to CSS rules priorities, since the last rule wins for the same selector precision.
I hope it helps, and have fun designing your Joomla site.
And it's not only that, timer events, and others are really tricky to debug, and you would generally just want to trace expressions, preferrably without changing the underlying code.
How can you then create trace calls, to see various variable states?
Well it's relatively simple, we will add tracer breakpoints:
First we will simple evaluate the previous function in the web console of your favourite browser.
Now we can simply add a conditional breakpoint, with a condition such as:
Since the breakpoint is evaluated in the context of the current stack, variables such as node will be accessible, if they are present in the code.
Also, since the function always returns false, the debugger won't stop there, thus no blur/focus events will be triggered.
If you also need a conditional breakpoint exactly at the line where the log is you can use as expression something along these lines:
Thus the log will take place, and since it's false, it will fallback in evaluating the actual value that you want the debugger to stop.
Have fun debugging.
I remember once when we needed to deploy an application to a customer on two nodes using its RedHat Enterprise Linux, using JBoss 5.
Because Java - compile once, run anywhere, right?
The customer comes back at us telling that our application deploys fine on one node, doesn't start on the other node - some really random runtime error deep inside JBoss.
"What the hell!" moment.
Obviously an environment difference, but which one?
Ok, can we get SSH access to investigate?
Ok, we start ping-pong-ing emails with commands to give on the command line. Let's get the environment:
Same RHEL version.
Same exact version.
Working node: OpenJDK. Failing node: GCJ.
I'm baffled. Does the GCJ project still exists? Is anyone else beside Stallman still using it? Why is it installed?
I check their website thriving with news activity:
September 22, 2009
GCJ support on Windows (Cygwin and MinGW) targets has been enhanced with a number of bugfixes, and the option to build libgcj in DLL form for dynamic runtime linking.
Well, isn't that swell? Three years of nothing. Amazing.
I contact their admins and tell them to switch the failing node to OpenJDK.
What's wrong with this Java? they ask. Because it's in the repository, as java-gcj-compat.
A single tear rolls down my face, while I start typing a document explaining why GCJ is not really Java-Java, and how to upgrade it.
It was a bad day overall that day.