The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I was moved from a full wall height cube with lockable storage, a phone, a white board, and the ability to work from home when I wanted to a "collaborative space" where I have about 4 1/2 feet of table top space, no phone, no white board, no storage, no quiet, and must report to the office 5 days a week.
My back is to the majority of a wide open expanse where there used to be cubes, I really don't like having my back to the room, I jump easily.
Before, I had problems when I try to execute my SSIS package to SQL Job.
I've tried using different approach. I used batch file (executed in SQL Job) to connect to a remote server, then copy a file (thru psftp). With this, my command line needs to open another file that contains my original psftp command.
This is the example of command-line from my batch file
getFile.ftp (contains the 'get' command which will the psftp do)
After using batch file (which didn't work, too) I tried putting my psftp command to another filename (from getFile.ftp to getFile1.ftp)
Now, I can say that SQL Server 2008 R2 really has some issues when it comes to names.
Curse you SQL Server 2008 R2!
Don't mind those people who say you're not HOT. At least you know you're COOL.
I'm not afraid of falling, I'm afraid of the sudden stop at the end of the fall! - Richard Andrew x64
Running into a feature-by-feature language comparison made me think back of a feature I saw in one single langugage, but would fit very nicely into a lot of the pascal/c/java/... class of languages: Alternate loop exits.
When iterating through a list, an array or some sort of collection, objects are not all treated equally: You reach a sentinel, find the object you're searching for, reach the capacity of the bucket you are filling up, or whatever. The job has successfully been done, so you exit the loop. Or, you do not complete the job: There is no sentinel (because the buffer is completely filled), the desired object is not found, or the bucket has still some capacitly left.
Running through the collection to the end or not running to the end are different situations, frequently requiring different handling. In most languages, an early exit requires that you set some boolean flag decleared outside the loop, then break (or whatever the keyword is in your favorite language), and after the loop you add an if-statement, syntactically detached from the loop, to provide differnt treatment based on the setting of the flag.
I was programming in this language called Planc - "Programming LANguage for Nord Computers", a vendor specific systems implementation - remmebered by noone today. It had this nice syntactic sugar:
for listpointer in listhead:nextfield do
... processing list element as desired
while listpointer.keyvalue <> desidred_key
... porcessing list element as desired
... the desired list element was found,
write("list element was found and processed")
... reached end of list without finding the desired element
write("no element with the desired key was found in the list")
No need for any one-time-use bool cluttering up variable space. No need to introduce a separate block for testing and breaking out. No need for a detached if-statement - the different loop exit handling is syntactically integrated with the loop itself.
I never saw this sort of construct in any other language, but I have been missing it hundred of times. Are there other languages out there with something similar? Certainly not C, C++, Java, C#, Pascal, ...
And, by the way: The above specification of the iteration is a nice syntactic sugar for what would be in C-like languages:
The Planc syntax is certainly more readable and less error prone, but the two are functionally equivalent.
The exitwhile/exitfor mechanism was valid whether the iteration was over a list, an array or some arbitrary collection, and both were optional: if one (or both) of the loop exits required no special handling, you could leavie that entire clause out.
Gee, I wish I could get that mechanism into, say, C#! The "while" part would be simple: Just add an optional condition after the break ("break (listpointer.keyvalue == desired_key);". Adding exitwhile/exitfor would require two more reserved words, which always causes problems and protests (even though I guess that very few variables out there are named exitwhile or exitfor...).
I once tried to construct C #define macros to emulate it, but never succeeded (if I remember right, the problem was generating jump labels for the gotos). If anyone has tried something similar, give me a hint!