Posted by Phil on July 11, 2008 under Training Sessions, Web Development |
Short post… because the full post is a minisite. The goodness of sprites cannot be discounted. They make for a faster site and a better user experience (except for your poorly cache-managed mobile devices… and for that the site really should implement agent identification and direct them to a smaller version of your site anyway). Anyway you can get the full scoop out on the tutorial-minisite.
Developer Training – Sprites (sponsered by Team Awesome)
Enjoy, and feel free to drop a comment or two
Posted by Phil on July 2, 2008 under Web Development |
I just thought I’d post a list of the tools that I use whenever I web develop. You may be using some of them, or you might not. Some of them probably don’t even fit under the “web development” category, but that’s the beauty of the DevBlog, I’m just throwing out what I use and you’re free to take it or leave it (also if you have a tool that is awesome that isn’t listed, throw it in the comments).
Browsers:
- Firefox 3 – Great browser, much better than the bloated version 2 release.
- Safari 3.1.2 – awesome browser, lacking in tools
- IETester – uses the IE5.5. IE6, IE7, and IE8b1 rendering engines
- Opera 9.5 – when I have a ton of ram and cpu to kill – see previous post
You can use Firefox as a standalone browser through a usb stick by going to portableapps.com and downloading the standalone version. They have some tutorials there on how to move your profile etc. There are many other good apps there as well.
Browser Specific Plug-ins/Add-ons:
IE:
- IE Developer Toolbar – The wannabe firebug utility for IE
- Fiddler2 – shows all of your http requests (helpful for finding leaks, or where files really are).
- IEPro – Firefoxerize your IE… well kinda
Safari/any browser:
FireFox:
*Honorable Mention: YSlow is a Yahoo tool that tells you how well your site performs based on speed standards formulated by Yahoo. Since Yahoo was one of the first sites to use sprites for all their images, they may just know what they are talking about. This tool will tell you how long it took to load your page, and grade it. It gives you a ‘report card’ that you can use to make your page better. I don’t use it all the time, but it’s a nice little addition to the portable Firefox3 usb stick I have…
Color/image Tools:
- ColorPic – Really nice color selection/palette utility
- Gimp – like photoshop, only really different
- colorwizard – I have a feeling adobe ripped this off for Kuler, but I can’t prove it…
- adobe kuler – I actually found this at adobe labs before the color wizard, so my suspicions on who made what first may be based on the quality of them…
Measuring and Screenshot Tools:
- jRuler – Fantastic pixel measuring tool.
- fsCapture 5.3 (last freeware version) – My favorite Screen Capture utility.
- ScreenHunter – Screen Shot util (one of Dustin’s fav’s).
Misc Tools:
Completely unrelated to web developing sites/tools:
- SpiralFrog – PC users (with “playsforsure” media devices) rejoice!
- Songza – Everyone rejoice! (internet jukebox)
- LastFM – personalized radio station
- Pandora – LastFM was kinda based on this… so was songza… hmm…
- imeem – Like the 3 above, and yet more, social
- lifehacker – A great site for information and tutorials on hacking your life
- netvibes – Fantastic RSS collection util, all the sites you read on one page, fantastic (kinda like igoogle, yahoo, etc.)
That about wraps up the tools that I currently use when developing, but feel free to throw more suggestions in the comments. Who knows, maybe I’ll have to do a follow-up post with all the goodness that gets suggested.
Posted by Phil on April 7, 2008 under Websphere Commerce |
This post is brought about after having Ninja come over and look at my code and making me realize that while what I was doing was good, I had not used a try catch and as such would never find exactly why my code was generating over 1500 lines of errors in my server log (ouch). Here is the way of Scriptlet (aka ninjascript) Try Catch-ery.
<% try { %>;
<%-- code goes here --%>;
<% } catch (Exception e) {
e.printStackTrace();
Thread.sleep(20000);
} %>; |
You can further mod this to make it possibly more helpful by adding/replacing the last line so you end up with something like:
<% try { %>
<%-- Code goes here --%>
<% } catch (Exception e) {
System.out.println("Exception caught in NameOf.jsp");
System.out.println(e.toString());
e.printStackTrace();
} %> |
Now for those people who are purists and understand that scriptlets really are not up to par, and that they are ugly and screw things up and are not elegant in the least, there is another way to Try Catch on your JSP. Simply use a JSTL Try Catch. Here I’ll set up an example:
<c:catch var ="catchException">
<wcbase:useBean id="category" classname="com.ibm.commerce.catalog.beans.CategoryDataBean" >
<c:set value="${WCParam.parent_category_rn}" target="${category}" property="categoryId" />
</wcbase:useBean>
</c:catch>
<c:if test = "${catchException!=null}">
The exception is : ${catchException}<br /><br/>
There is an exception: ${catchException.message}<br/>
</c:if> |
We set up a variable (catchException) and then what we want to do inside that c:catch. So we are trying to instantiate this bean and we want to make sure it doesn’t throw an error (which as part of the joys of websphere if that bean throws an error your page will fail and you’ll either get a portion of your page with nothing else, or you’ll get a series of dreaded CMNxxxx errors). Right after the c:catch block we set up a c:if with to test value of ${catchException, if it’s not empty, then an error was thrown and we should kick out what the error is so that we can fix it (without digging through 1500 lines of error-logged code).
Tags: catch, cmn, debug, error, help, jsp, JSTL, try, try/catch, websphere sucks, why me
Posted by Phil on April 3, 2008 under Javascript, Training Sessions, Websphere Commerce |
It’s time to learn how to get the bugs out. This week we covered basic debugging (from starting the server) to using some external tools (such as the fantastic Firebug plug-in). For the full show you can check the audio clip at the end (I’ll post it when I’m done ‘cleaning’ it).
Highlights:
- Rational debugging mode
- Firebug (for both CSS editing and javascript debugging)
- Drew’s fantastic commentary as nothing works the way he intends (for the first 20-ish minutes)
- My extremely long pause… that I think I may still be on.
On a side note, there are two other tools that are very helpful when trying to debug or develop on IE, Safari, Linux browsers, etc. They are XRAY and Aardvark, and both are bookmarklets (meaning you bookmark the javascript itself and run it when you need it, similar to a bookmark).
XRAY can be found here http://www.westciv.com/xray/.
Aardvark can be found here http://karmatics.com/aardvark/bookmarklet.html.
Audio clip will be here when I’m done editing it… UPDATE: Or it won’t, looks like my sansa destroyed the file, I mean it’s still there, just not in a format that any program can read… I may still play with this, but I’m thinking it’s a lost cause… sorry
Tags: aardvark, debug, debugging, drew, firebug, help, Javascript, plug-in, plugin, plugins, rational, tools, training, weekly, xray