Posts

Showing posts from August, 2011

Rapid prototyping in Fireworks

Well its an expensive toy but pretty cool I must say. I've never used Fireworks before but have used Photoshop some. I was trying to understand a wireframe flow for a new microsite and decided the best way to validate would be to create an image with screen flow on it to review with the designers. Then I thought why not a working prototype? I have a trial Adobe Fireworks so I decided to try it. Well as my kids program "yo-gabba-gabba" likes to say: I tried it and I like it. Approach: - I took screenshots of each of the Wireframes, pasted each on as a separate page into Fireworks - add hotspot links from buttons to pages. - save, File->export - go to file system and open the first page into browser, click on links, it works! Pretty dang cool! Here's the tutorial I followed More usefil info - to add a new page, click Edit->Insert->Page - to add a hotspot link, click the toolbar hotspot link, then draw a box around the button, then on the bottom p

bash scripting

A favorite resource: Another  for ifs More scripting Here's a snippet of a simple script I wrote recently for checking logs, outputting errors or counting frequency. can be used like:    ./cl.sh accepts count    ./cl.sh accepts Uses fgrp for faster searching. Some content changed for privacy reasons. Can also be piped to file using >output We plan to put on a chron and could perhaps add in some email alerts #!/bin/sh #if passed no param then grep for exception (no case sensitivity, then exit) if [ $# -eq 0 ] then    fgrep -i "Exception" mylog.log    exit 1 fi echo "$1 passed as argument, so using that" echo "$2 2nd argument" # search for that login exceptions # if test $1 == 'login' then   search_str='....' # seach for all rejects # elif test $1 == 'rejects' then   search_str="..." # seach for all accepts # elif test $1 == 'accepts' then   search_str="....&quo

Linux Top for monitoring

Linux command top is a great powerful tool to see server load and even manipulate processes.   Type top on command line to start. Type q to quite The load average top right show 3 numbers: current load, recent load and past load. The number is a measure of load where >3 is not so good and 5 is bad Also shows tasks running, sleeping etc Shows CPU Shows Swap Shows processes running. For example as Apache receives requests you can see more Apache processes being spawned and then disappearing. For each process you can see the CPU and memory it's using. Keep an eye out for Java/Tomcat processes as they often consume alot. More here

Debugging in IE including Firebug like element highlighting and real time css editiing

There are ways especially with IE8 (which you can also run in IE7 compatible mode) Javascript debugger You can step through javascript and have IE break on failing js line. On IE8 hit F12 and the debugger opens. - click Script tab to get to the html - click Start Debugging button on toolbar - to the right of Start Debugging button is a dropdown to select script - click left column of js code to add a breakpoint (red ball). You should see breakpoints listed on the right. Works well, I've used this to debug and find a number of issues. Html element and css editor IE8 offers a pretty good html element highlighted and editor too. On IE8 hit F12 and the debugger opens. - click HTML tab to get to the html - expand the html to get to your html - clicking on an html node should highlight it on the browser page (useful to find where things are positioned) - on right side is css applied which you can edit - you can edit the html and add css styles real time, tab off to

New Benefit US site launched today

We launched Benefits new US website today The US release is built on the same common codebase and paltform as Benfits  China site launched last  March. As Tech Lead for both launches I've been lucky to work with some great developers and teamates.  We developed the US site in approx 2.5 months, then tested and tuned for approx 1 more month. For US I worked on designing and coding including: integration with the new Payment Gateway for PCI compliant credit card processing changes and consolidation for US and rest of world addresses for single and multi shipments Cybersource integration for address validation adding Ajax interactivity to checkout pages so pages show impact to cost as changes are made We split my work into 6 sprints over a 2.5 month period and except for the Payment Gateway integration most everything was on time. The Payment Gateway integration as expected had some surprises. Other members of the team worked in parallel on UI changes. A great team effor

Symfony redirect throws an sfStopException so don't wrap the redirect in a try catch

This is a strange one but when in an action and you call the symfony redirect, $this->redirect(module/action), symfony will redirect and also throw an sfStopException exception! Here's a link with more We had the redirect call within a try catch and thus the symfony exception was caught (which is not what we wanted). The fix was to move the redirect call outside the try catch, another option in the post is to call $this->getController()->redirect()