Utility Function: ImageBlurMore()

OK, so up until now you probably can guess that the functionality I'm working on has something to do with drawing or moving a shape since I've posted math rounding functions and functions dealing with geometric positioning. Lets throw you a curve-ball: I also need the following function. What happens when ImageBlur(image, 10) just isn't enough? Well you're going to need to blur the image more!

 

Utility Functions: Geometry Functions

Today we've got a double header of functions dealing with Geometry. As I said in my last post, I've been spurred into action by a user's question, and in order to solve his problem, I'm going to need to be able to calculate some relatively simple geometry. Click "more" to see how to convert Degrees to Radians and how to calculate the position of a point based on a starting location, angle, and distance.

 

Utility Function: RoundToClosest()

Its been a while! I got an email from a reader who wanted some help with a bit of image manipulation that has roused me back into CF coding! The particular bit of functionality he wants is rather complex, and so its been forcing me to make a bunch of utility functions to piece it together. First thing I ran into: rounding a number in CF is a little tricky. If you want to round to 2 decimal places, you should multiply the number by 100, call Round() and then divide by 100 again. What a waste. Luckily a little trickery with NumberFormat() can get us what we want.

 

Learning UML

My recent job change has not only meant that I'm coding C# .Net rather than ColdFusion these days, but also brought with it a whole host of tools and concepts that I've been trying wrap my brain around. Case in point: UML. I learned basic UML back in college, but then spent 3 years in a development environment that was actively hostile to requirement gathering, so what little I knew was lost along the way. Now I'm trying to get caught up, and I'm finding that learning UML is a tricky thing.

I've searched for just about every phrase, keyword, or concept I could think of that would yield a decent guide to crafting UML diagrams, and all what I got back were pages and pages of explanations of the symbols on a given diagram. I can tell you what a Use Case looks like, and what things are on it, but I can't tell you how to get form a Use Case to an Activity diagram. I finally found a quote that enlightened me as to what was going wrong:

As a UML instructor, I find that learning UML presents a paradox: UML is not a process, but rather a notation that can be used in a process; and yet without a process, students don't know where to start with UML.

Thats from this random page that references a "Five Step UML" process for teaching the use and power of UML in software development. Unfortunately, like most old pages on the net, the link to the full text is broken, and I've been left without a process on which to base my attempts at learning UML.

Any one have any good recommendations on a simple process that would help illuminate the gaps between UML diagrams?

 

ASP.NET Error Message: Invalid postback or callback argument

If you're trying to create a post-back from Javascript in ASP.NET, you might have come across the following error:

Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

This message is caused because ASP is attempting to validate that a given post-back that was initiated from Javascript is really supposed to be happening; basically, it is an attempt to try to prevent cross-site scripting from issuing post-backs. You can do as the message says and register the callback, you can edit your web.config file, or you can do what I do, and add the following line to your Page directive in your .aspx page like so:

<%@ Page EnableEventValidation="false" ... %>

Be aware that by setting EnableEventValidation to false, you're opening a hole in your security. I'm using this in a situation where the risk has been minimized, but if you're including external scripts, you might want to actually go through the trouble of registering the event.

 

UX Videos Article on Smashing Magazine

Check out these videos on User Experiance at Smashing Magazine. I've not had the chance to watch many of them, but there are some gems in there.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.