01 May
Posted by Stu as Tips (Little Bits Of Awesomeness), Must Read
As time passes, our brains develop routines for what we do. Development is no exception. My brain has half a hundred (or maybe more) little routines that it’s been trained to enact when certain requirements are fulfilled.
There are generic practices that hold across most disciplines. These are especially easy to see when working with […]
25 Apr
Posted by Stu as Coding, Tips (Little Bits Of Awesomeness)
When manipulating data files in code, you can check after each operation for errors.
Here’s an example:
1
2
3
4
5
6
7
8
9
10
11
clear(peo:Record)
peo:EnteredDate = _:FirstDayOfYear
set(peo:keyEntered,peo:keyEntered)
loop
next(People)
if ((errorcode() = 33) or (peo:EnteredDate > today())
break
elsif errorcode()
_AddError(_:ProcedureName,’routinename’,subject,body)
.
.
So what’s going on?
When you’re running an error check, there are certain errors that should be handled with special care, contextually based on the preceeding command.
After a next() I know […]
24 Apr
Posted by Stu as Templates, Tips (Little Bits Of Awesomeness)
The simplest template in my arsenal is the one you’d find most in the code.
I discovered early on it was a good idea to send the (offending) Procedure Name through to the error logging.
_AddError(’MyAwesomeProcedure’,'Stupid Error Subject’,'Stupid Error Body’);
After too long, I decided to do something about always having to string type as a parameter […]