|
That was exactly my thought when I looked at getopt, but its somehow become the established standard for command-line processing on Unix-like systems.
But then, that's elegant compared to the dog's do-do that is autoconf and the m4 macro-processor.
Shudders.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Just found this:
private void App_Exit(object sender, ExitEventArgs e)
{
ConnectionManager.IConnectionManager.Shutdown()
Stopwatch sw = new Stopwatch();
sw.Start();
while (sw.Elapsed < TimeSpan.FromMilliseconds(4000))
{
}
sw.Stop();
}
Guess the dev didn't know about
System.Threading.Thread.Sleep(4000);
If it's not broken, fix it until it is
modified 13-May-16 14:04pm.
|
|
|
|
|
But with "Sleep" you get no Attention the Task Manager ...
modified 19-Jan-21 21:04pm.
|
|
|
|
|
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Shouldn't burden of waiting for the disconnect to happen be placed on the Shutdown method? At most the caller should specify the timeout:
ConnectionManager.IConnectionManager.Shutdown(4000)
|
|
|
|
|
I found almost this exact code in the splashscreen of an app I inherited responsibility for....
"The app takes too long to start" was the complaint from the customer. In fact the splashscreen sat there burning up CPU cycles as fast as possible performing "sw.Elapsed.TotalMilliseconds < 10000". Then once the 10 seconds had elapsed it closed the splashscreen and *then* started all the application init tasks (DB connection, load config etc...)
I replaced the stopwatch with:
- a background thread to perform the app init (which normally took about 7 seconds)
- a thead.sleep to "pad" the splashscreen's lifespan up to 10 seconds
Apparently a 10-second splashscreen was desired, but cramming the app init into that 10 seconds cured the customer's "slow app" nicely.
|
|
|
|
|
I always thought the purpose of the splashscreen was to distract the user from how long the app took to get initialised. Back in the day when I did such things, my strategy was for the mainline of the app to throw out a splashscreen, do the grunt work of initialisation then kill the splashscreen.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Intent and reality intersect far too rarely.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Just come across this one, apparantly copied/pasted direct from access....
SELECT stuff
FROM somewhere
WHERE (((aa.type)='word'));
does access always just bung brackets everywhere?
|
|
|
|
|
In my experience, no... that looks more like a human construct.
Probably started out with more in the 'where' clause, had issues, paired it down... added a few brackets to segment it... but never cleaned it up.
|
|
|
|
|
oh well, it gave me a good WTF moment and a laugh...
|
|
|
|
|
|
Yes.
The queries generated by the QBE-editor are sometimes a source of great wonder (and confusion).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes and No actually ...
... AFAIK Access versions prior to 2007 did do the crazy brackets thing.
But 2007 onwards did not.
I have a client (government department) stuck on Access 2003. Another client has Access 2007.
I noticed the difference in the brackets thing between those two versions.
Unless there is some setting somewhere I don't know about (I'm not an Access dev y'know).
|
|
|
|
|
would you admit to being an access dev?
|
|
|
|
|
I have admitted this in the past, but then I always say that it's not the tool that is used that's the problem, it is the tool that uses it.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Sure - at my age, I'm immune to peer pressure
I have been doing small contracts for various units of a State Government for about 5 years.
I charge them more than I do my regular clients. Nearly everyone employed full-time at this Dept is a lawyer or para-legal of some sort. They are cool with very high hourly rates.
And I definitely tell them "I am an Access developer". I would say I spend about 4 weeks a year being (posing as?) an Access Dev.
Officially, any custom-software they want must be built by the State Govt IT Dept (average delivery schedule: 5 - 10 years).
But they can get stuff done in Access, because according to MS, it's not "dev" software.
Often I work on Access DB's that were originally built by "actual" Access Dev's. I have seen their web-sites, and chatted by phone with one of them. So they are not "posers" like me.
The design and code of those DB's are ... interesting.
My work is easier in those cases, because I am constantly telling the users: "I can make this stuff a LOT easier for you". "No, you don't need to keep doing that, we can get Access to do it for you".
What happened, after the first job I did for a unit of this Dept, is that my users boasted about "their" Access guy around the water cooler, I got called in by another unit, etc.
Not a full time living there, but good pin-money.
I learned to program in BASIC on a Tandy TRS-80 in the late 70's while I was working as a Diesel mechanic in an iron-ore mine.
In the more than 30 years since then I have been paid to code in COBOL, RPG, Visual Basic, VB.Net, C#. And the SQL - don't forget the SQL. In all of those languages and environments SQL is the most useful tool you can have. Even in Access.
Back to the original question: When that stupid Query Builder tool in Access gives me the tom-tits, I just switch over to SQL View - suddenly everything is sweetness and light!
(once I've deleted all the brackets of course)
|
|
|
|
|
Are you sure you can exclude ((SQL Management) Studio) as the (source of (those brackets ()))))? I think the query designer there sometimes produces them too.
|
|
|
|
|
The guilty party said that he just copied/pasted the query from access. Trying to keep em away from things like the query designer though, I'm even getting em to make views with TSQL and not that bloody view designer...
|
|
|
|
|
I have been using MS SQL Server since it first came out (in the mid-nineties).
For the first few years we were using a set of Sybase manuals because we didn't have any SQL Server manuals (and Google was very unresponsive back then).
In those days, if you knew what the differences were between Sybase and SQL Server you were at Guru level.
But I have never used the "View Designer". The couple times I stumbled into it by accident, I got out of there ASAP.
To be honest, it's not that I disdain it's UI, SQL skills, or anything like that.
I just don't understand it. I have seen people who can go in there, make views, copy the SQL out to use elsewhere etc. I can't do that.
I have been coding SQL since the early 80's (DEC VAX RDB). I can code SQL queries faster than I can say what I am doing. But I don't get that View Designer.
|
|
|
|
|
LOL... feel that one, I started in Dataease and DB4...
|
|
|
|
|
I've seen the Access wizards generate SQL that looks like that.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
Gaaahhh!!!
I recently registered on a website that doesn't accept upper-case letters in a username/email-address.
So today I tried to log in -- all it does is tell me that the login failed. Over and over and over again.
Can't you at least do a freakin' ToLower on whatever the user entered?
|
|
|
|
|
|
den2k88 wrote: sent an e-mail with the registered password in clear-text (with all the implications on their storage method), Unicode-encrypted?
|
|
|
|