Archive

Archive for October, 2010

Spring MVC Redirect using “redirect:url” syntax.

October 27th, 2010 2 comments

I searched online for how to do redirects from a controller, and only came up with the RedirectView…

But I KNEW there was an easier way I had seen before…

The key is make your controller function return a string…  And then return “redirect:URL” instead of a view name.  Violaa!

Absolute and relative urls work great.

See: Spring 3.0.x docs for UrlBasedViewResolver

Categories: http, java, spring Tags:

Oracle has wasted no time in Rebranding Sun products.

October 26th, 2010 1 comment

Unless you’ve been out of touch for a long time, you’ve heard that Sun bought MySql, and was subsequently bought by Oracle.  If you use java, you’ve noticed that Oracle hasn’t drug their feet in rebranding sun products as Oracle…  java url’s are now download.oracle.com instead of download.sun.com.

MySQL appears to have escaped the re-branding at the moment.  It will be interesting to see what Oracle does with it in the future…  If they killed it, they would tick off half the development community in the world, making them less-likely to choose Oracle products in the future (let’s face it, there are LOTS of un-objective decision makers in the world).  But they could put some spin on it, and use it to build their market share…  Let’s wait and see…

Categories: community, java, oracle, sun Tags:

HttpFox Rocks!!! (Better than Tamper Data)

October 26th, 2010 No comments

I used to rely on the Firefox Plugin Tamper Data to get the nitty gritty deatails of http requests.  Firebug has a feature that is similar as well (the net tab).  But I find it buggy.  Recently, a fellow developer introduced me to the HttpFox Firefox plug-in, and it is awesome!

I now use it all the time.

The only caveat,  is only start it when you need it, and stop it when you are done.  Leaving HttpFox running and capturing for long periods of time slows Firefox a lot.

Check it out:  http://code.google.com/p/httpfox/

Categories: debugging, firefox, http, php, web Tags:

Uniserver – Things I Learned Today

October 26th, 2010 No comments

Uniserver on Windows REQUIRES the .htaccess file to have the “Options +ExecCGI +FollowSymLinks” line in it… Or else you get a 403 forbidden on every page you try to access.

Categories: apache, php5, web Tags:

Awesome Prototyping Tool!

October 25th, 2010 No comments

Check out this AWESOME free prototyping tool. Pencil Project.  (It’s a Firefox Plugin / XUL Application)

It let’s you mock up fully functional websites without writing any html code.  Then, you can export it as html, and use it as a starting point for a better mockup.  Or export all the pages to png’s in one shot, and use those as a starting point in Adobe Illustrator, or your design tool of choice.

It’s great for useability testing.  Mockup your ideas.  Put them in front of customers / users, re-prototype, and continue until you get it as good as possible, and meeting your cash cow customers’ needs.  THEN make it look good.

http://pencil.evolus.vn/en-US/Home.aspx

Blocking Webform / Comment Spammers…

October 20th, 2010 No comments

I found out about this site today, that hosts a sample .htaccess file that will block IP Addresses that are known spammer ip’s.  Not email spammers, but webform spammers…  (Very annoying!)

Check it out: http://www.wizcrafts.net/chinese-blocklist.html

Categories: Uncategorized Tags:

Troubleshooting By Dividing

October 19th, 2010 No comments

Troubleshooting…  When you are troubleshooting something, divide and conquer…  In a large system, choose a point in the middle of the system, and see if the problem exists there.  If it does, move backwards half way to the start of the system, and test again…  Continue….

This process allows you to find problems in large and complicated systems effeciently.

Good instrumentation in a large system makes this process even easier.  A blackbox system, in which you cannot look inside is extremely difficult to troubleshoot.  The same problem exists for systems that cannot be operated with it’s clothes off.  For example, Computer monitors.  I have tried to repair expensive computer monitors in the past with some success.  There are lots of little controls inside the monitor that can be adjusted.  You can also find bad solder joints by wiggling parts inside the monitor and see if it makes it start working.  However, many monitors cannot be operated with the cover off.  The same problem exists for code that cannot be debugged easily. 

So…  Next time you are trying to fix an annoying bug…  Divide and conquer.  If you don’t have good instrumentation, add it in!  In php, and easy way to add instrumentation is by adding your own custom header with debug information.

Categories: Uncategorized Tags: