A friend of mine recently wrote to me:
"I just spent 2 hours on the phone with Apple to get Outlook to sync calendars with my iPhone (still not done but I hope successful); now that will get you confused and wondering about your sanity for wanting that sexy phone..."
I wrote this response to her (then sensibly chose not to send it - no need to be rude!):
Ooooooh, an IPorn....:-) Sorry, silly "typo" - it does seem to me, though, that Apple products are essentially techporn. So sexy and cool - feeding our narcissism and absorption with superficial applications of technology. And the sleek, minimalist, modernist lines? I am sick of them. Give me some "good, old-fashioned" ornamentation.
I am not really a Luddite, but I have become decidely (or, at least, relatively) low-tech in my view on life. I have a cell phone, but it is just a phone - no camera, no MP3 player. I don't want a PDA, I don't want to stick things into my ears, I don't want to wall myself off from the world around me, escaping into a private space of infinite playlists, twits, and life-as-iPhone-app.
"Wow, I can blow into an iPhone and make it sound like a flute."
That is incredible, don't get me wrong. But really who cares? Or to put it a better way: is this really what we should be caring about these days?
Capitalism is Dead, Long Live the iPhone!
Thursday, April 30, 2009
Wednesday, April 22, 2009
An interview with yours truly
In case you simply can't get enough of Steven Feuerstein (no, I don't generally talk about myself in the third person and definitely never in the royal "we"), I invite you to check out this interview. I had an awful lot of fun answering the questions, and you might be entertained reading them.
Monday, April 20, 2009
Need to parse a delimited string? Use this package!
For several years now, anyone who was interested could download my "demo.zip" file, which consists of some 2000 files that I use in my trainings. This zip contains demonstration scripts, but also some generic utilities, like the parse package, which parsed a delimited string and returned a collection of the individual elements.
I recently enhanced the package to allow me to easily parse lists of lists, and even named lists of lists. Rather than just "bury it" inside the demo.zip, I thought I would tell you about it on my blog and give you a direct link to the code.
My objective is to reduce the possibility that any other PL/SQL developers will ever need or want to take the time to build their own parsing utility. Oracle PL/SQL should, of course, provide such a program for us. Sadly, it does not. Or, rather, it offers DBMS_UTILITY.COMMA_TO_TABLE, which is so eccentric and limited in its functionality that I find it embarrassing.
So....the parse package offers three different overloadings of the string_to_list function:
PACKAGE parse
IS
SUBTYPE maxvarchar2_t IS VARCHAR2 (32767);
TYPE items_tt IS TABLE OF maxvarchar2_t INDEX BY PLS_INTEGER;
TYPE nested_items_tt IS TABLE OF items_tt INDEX BY PLS_INTEGER;
TYPE named_nested_items_tt IS TABLE OF items_tt INDEX BY maxvarchar2_t;
FUNCTION string_to_list (string_in IN VARCHAR2, delim_in IN VARCHAR2)
RETURN items_tt;
FUNCTION string_to_list (string_in IN VARCHAR2
, outer_delim_in IN VARCHAR2
, inner_delim_in IN VARCHAR2
)
RETURN nested_items_tt;
FUNCTION string_to_list (string_in IN VARCHAR2
, outer_delim_in IN VARCHAR2
, name_delim_in IN VARCHAR2
, inner_delim_in IN VARCHAR2
)
RETURN named_nested_items_tt;
END parse;
Here are examples of using each one:
DECLARE
l_list parse.items_tt;
BEGIN
l_list := parse.string_to_list ('a,b,c,d', ',');
END;
DECLARE
l_list parse.nested_items_tt;
BEGIN
l_list := parse.string_to_list ('a,b,c,d|1,2,3,4', '|', ',');
END;
DECLARE
l_list parse.named_nested_items_tt;
BEGIN
l_list := parse.string_to_list ('letters:a,b,c,d|numbers:1,2,3,4', '|', ':', ',');
END;
The package also contains helper programs to display the contents of lists and compare collection records for equality. This latter function is utilized by Quest Code Tester to automatically test the package. The zip file contains a Code Tester export file (.qut) that you can import into Code Tester 1.8.3 or higher and verify the behavior of these programs. Currently, 1.8.3 is in beta and you can download it here.
I hope you find them useful! If, of course, you find a bug, please let me know so I can fix it. Even better, add the test case that reproduces the bug to the Code Tester test definition, then fix it yourself and send me all of the modified files.
That would be a really friendly thing to do. :-)
I recently enhanced the package to allow me to easily parse lists of lists, and even named lists of lists. Rather than just "bury it" inside the demo.zip, I thought I would tell you about it on my blog and give you a direct link to the code.
My objective is to reduce the possibility that any other PL/SQL developers will ever need or want to take the time to build their own parsing utility. Oracle PL/SQL should, of course, provide such a program for us. Sadly, it does not. Or, rather, it offers DBMS_UTILITY.COMMA_TO_TABLE, which is so eccentric and limited in its functionality that I find it embarrassing.
So....the parse package offers three different overloadings of the string_to_list function:
PACKAGE parse
IS
SUBTYPE maxvarchar2_t IS VARCHAR2 (32767);
TYPE items_tt IS TABLE OF maxvarchar2_t INDEX BY PLS_INTEGER;
TYPE nested_items_tt IS TABLE OF items_tt INDEX BY PLS_INTEGER;
TYPE named_nested_items_tt IS TABLE OF items_tt INDEX BY maxvarchar2_t;
FUNCTION string_to_list (string_in IN VARCHAR2, delim_in IN VARCHAR2)
RETURN items_tt;
FUNCTION string_to_list (string_in IN VARCHAR2
, outer_delim_in IN VARCHAR2
, inner_delim_in IN VARCHAR2
)
RETURN nested_items_tt;
FUNCTION string_to_list (string_in IN VARCHAR2
, outer_delim_in IN VARCHAR2
, name_delim_in IN VARCHAR2
, inner_delim_in IN VARCHAR2
)
RETURN named_nested_items_tt;
END parse;
Here are examples of using each one:
DECLARE
l_list parse.items_tt;
BEGIN
l_list := parse.string_to_list ('a,b,c,d', ',');
END;
DECLARE
l_list parse.nested_items_tt;
BEGIN
l_list := parse.string_to_list ('a,b,c,d|1,2,3,4', '|', ',');
END;
DECLARE
l_list parse.named_nested_items_tt;
BEGIN
l_list := parse.string_to_list ('letters:a,b,c,d|numbers:1,2,3,4', '|', ':', ',');
END;
The package also contains helper programs to display the contents of lists and compare collection records for equality. This latter function is utilized by Quest Code Tester to automatically test the package. The zip file contains a Code Tester export file (.qut) that you can import into Code Tester 1.8.3 or higher and verify the behavior of these programs. Currently, 1.8.3 is in beta and you can download it here.
I hope you find them useful! If, of course, you find a bug, please let me know so I can fix it. Even better, add the test case that reproduces the bug to the Code Tester test definition, then fix it yourself and send me all of the modified files.
That would be a really friendly thing to do. :-)
Sunday, April 19, 2009
What a strange life I lead
I am flying back to Chicago after a week in Europe (more or less). Monday and Tuesday in Istanbul, teaching a two-day course for Oracle. Zurich on Wednesday, Munich on Thursday, Frankfurt on Friday - presenting "Guaranteeing Application Success with the Toad Development Suite" for Quest Software, my employer.
So I am in seat 31B of an American Airlines 777. That means it is an exit row coach seat with a big open space in front of me. Even better, 31A is empty, so I have "spread out", my laptop is plugged into the power outlet, and I am very pleased with myself.
What? Pleased? Having to sit in an enormous metal cylinder hurtling through the air at 542 miles per hour?
Yes. I just realized that I am actually enjoying myself, because I am getting a lot of work done. Specifically, I am editing chapters for the fifth edition of Oracle PL/SQL Programming (available in September 2009, covering all features of Oracle PL/SQL through Oracle Database 11g Release 2). Earlier, I fixed several bugs in Quest Code Tester, revamped my Best of PL/SQL course materials in advance of my two day training on this topic in Salt Lake City next week.
On an eight hour flight back to Chicago, I probably manage to get about 5-6 hours of work accomplished. I am actually more productive on the plane than I am in my own home office. Why? Fewer distractions - most notably, I cannot check my email. So I can't respond to my emails. I can't go online and play my games of chess (at GameKnot.com, a really wonderful site if you happen to enjoy chess).
Given how much I travel on American Airlines (over 230,000 miles in the last two years), I can get upgrades pretty much whenever I want. But I also realized recently that as long as I can get one of these row 31 aisle seats (31B or 31H), I'd rather not upgrade. If I do, I am fed more often, it takes longer to eat, and I am more tempted to drink alcohol. I get less done and in no more comfortable an environment.
This is what my life has come to.
Well, I suppose it could be worse. :-)
So I am in seat 31B of an American Airlines 777. That means it is an exit row coach seat with a big open space in front of me. Even better, 31A is empty, so I have "spread out", my laptop is plugged into the power outlet, and I am very pleased with myself.
What? Pleased? Having to sit in an enormous metal cylinder hurtling through the air at 542 miles per hour?
Yes. I just realized that I am actually enjoying myself, because I am getting a lot of work done. Specifically, I am editing chapters for the fifth edition of Oracle PL/SQL Programming (available in September 2009, covering all features of Oracle PL/SQL through Oracle Database 11g Release 2). Earlier, I fixed several bugs in Quest Code Tester, revamped my Best of PL/SQL course materials in advance of my two day training on this topic in Salt Lake City next week.
On an eight hour flight back to Chicago, I probably manage to get about 5-6 hours of work accomplished. I am actually more productive on the plane than I am in my own home office. Why? Fewer distractions - most notably, I cannot check my email. So I can't respond to my emails. I can't go online and play my games of chess (at GameKnot.com, a really wonderful site if you happen to enjoy chess).
Given how much I travel on American Airlines (over 230,000 miles in the last two years), I can get upgrades pretty much whenever I want. But I also realized recently that as long as I can get one of these row 31 aisle seats (31B or 31H), I'd rather not upgrade. If I do, I am fed more often, it takes longer to eat, and I am more tempted to drink alcohol. I get less done and in no more comfortable an environment.
This is what my life has come to.
Well, I suppose it could be worse. :-)
Subscribe to:
Posts (Atom)