There is a simple profiling capability in the ACE toolkit, the ACE_Profile_Timer. Easy to wrap in a class with basic Start, Stop, and Elapsed methods. If you can guess what function or two the bulk of your program's time is being spent in, this can help pinpoint the worst offenders within that section of code. If not, create several timers, and time each function in your main loop, and print the information after the loop is finished. Drill down into subfunctions as needed. See where the milliseconds tick away. You might be surprised.
And remember, in the immortal words of Michael Abrash, "Assume Nothing. Measure the improvements. If you don't measure, you're just guessing."
Garmin GPS receiver connected to the serial port, and a short script to ask it what time it is, and set system time accordingly. I'm not all that worried about the milliseconds of lag in actually setting the system time, but it doesn't require access to an ntp server, or even that my network be connected. Plus, once I programmed the data retrieval routines, what's programming one more unpacking routine for a data packet...
In the DC area (definitely east of DC), you may be able to pick up WRNR 103.1, which has as their tagline, "Everything under the sun, in no particular order." If you are *really* sick of alleged "alternative" radio, give them a listen. You will hear a wider variety of music than you could imagine from one radio station: blues, folk, jazz, etc. Hell, I've heard them play Zappa in afternoon drivetime.
If anyone is paying attention to the age of my slashdot ID, I just downloaded the windows installer from a mirror and also got an md5sum (cygwin) of: 684461f4bef2888271cb05bd3d80af28 *mozilla-win32-1.0-installer.exe
Of course, I *could* have just copied his numbers to throw you off the trail, but I encourage you to perform this experiment yourself.
Mozilla lost my mail. Although, I must admit, it took 5 years to do it, on folders shared by pine, netscape 4.x, netscape 3.x (on hp-ux, no less), and mozilla 0.9.x. I think one of the older netscape versions nailed the mail header cache info. O well, it had long since been time to clean the crap out of there anyway. =)
Hmm. I have the original releases on VHS, and the special edition releases. Anyone who can send me a TV-in card that works under Linux, and the UPC codes from the VHS tapes, I'll gladly digitize a copy for. =) VCD/SVCD format, unless you want to send me a DVD burner, too. =)
Now, if I could just get a reliable site for phantom edit part 2...
We use the same C++ foundation classes in ACE on WinNT, Win2k, Solaris, IRIX, HP-UX, and Linux. ACE is also supported on VxWorks, AIX, and a dozen other weird variants of *nix. It's a comprehensive real-time, networking, threading, and platform abstraction library. The stuff works great. Makes all platforms act the same. Takes a little work to get it compiled at first, though.
Expect to spend some time getting used to the toolkit, which ever one that winds up being. Every minute you spend initially studying example code, and learning the toolkit's way of approaching problems, is one less minute you will spend trying to beat their classes into doing something they weren't necessarily intended to do.
Unless you know what you're getting into up front, keep separate make strategies for Win and Unix. If you're feeling perky after a while, you may be able to migrate your windows build to the same makefiles as unix, but it'll take some work (and probably the cygwin toolset)
I recall a story online about what a few computer researchers considered their first computer game. It consisted of loading the computer full of NOP statements (no-operation, i.e. don't do anything this clock cycle), pushing the "RUN" button to start the program, and seeing who could hit the "STOP" button the fastest. Why let things like total lack of UI ruin the opportunity for a good competition?
I recently put a downpayment on a piece of property sight unseen, and found that it wasn't quite what we were expecting. Fortunately, I asked the seller to add a clause specifying that we had 60 days to see the property in person, and cancel the contract with full refund of downpayment, if desired. Get this clause should you decide to purchase property over the 'net, it's a life saver.
TCP is more overhead than you care about for streaming a lossy compressed audio stream. So what if you drop a few packets, the audio will skip, and you'll pick up where the packets start returning again. Not adequate for mission critical data, but streaming audio hardly qualifies.
However, 10 CDs at 400MB/CD (raw audio) would be about 4 GB. It would even take days to download one CD over a modem. Three cheers for mp3 compression, eh?
Standard contract law says that the deal happens in the state of the purchaser, for the purposes of litigation. I don't see how M$ can ask you to waive the entire Uniform Commercial Code (ok, I forget the actual name of the collection of laws governing commerce) and get it to stick in court. Maryland actually has some additional clauses to their version of that piece of law, too, specifically to afford their residents with additional protection under the law. E.g. companies cannot warrantees of merchantability in MD. This has the side effect of making most "service protection plans" a waste of money in Maryland. I don't care if I didn't buy the service plan, if my TV breaks "too soon", you pay to fix it. End of Story. One reason you have the "you may have other rights that vary from state to state" disclaimer everywhere is MD's little addition to those "uniform" laws.
IANAL, but I remember a little from my Consumer and the Law class in college (the best class you could possible take =). In this case, Uniform means 99% identical, with 1% well known local variations.
Oracle will provide you and your system with 24/7/365 support from highly trained individuals, for the "ridiculous" price you pay for it. Again, it's all a matter of how much your downtime costs you. If you're Ebay, Amazon, etc, downtime costs big bucks. It makes sense to have that level of support available for their business. If you're a weblog, downtime costs you very little, comparitively speaking. Paying for Oracle in that situation doesn't make a lot of sense. PostgreSQL, MySQL, etc. don't cost a lot up front, but if your business model depends on multiple transactions per second, aren't necessarily the best choice on the odd chance that things screw up.
A more applicable model might be similar to the way of the bard:
Seven years learning
Seven years playing
Seven years teaching
Repeat.
The idea is that the would-be bard spends some period of time under the apprenticeship of one learned in the art. After acquiring some basic skills (melody, harmony, scales, etc.), and some examples of how to combine those skills (a repertoire of songs), the bard is then sent off to earn a living in the world. While doing so, the bard experiments with new ideas, merging them with the body of knowledge acquired from the master. After some time, the bard takes on apprentices, and shows them what they've learned from their master, and from their own experimentation.
All too often, what's lacking in the free software world of half finished IMs and mp3 front ends, is the "combinations" of those skills. A lot of these programmers barely understand pointers and event driven programming, yet they're building full GUI programs as a method of learning more about how to program. Frequently, they bite off more than they can chew...
no police officer would ever claim you were speeding when you weren't - just because he wanted to search your vehicle
Sorry, the police need a reason better than a routine traffic violation to search your car. That's already been through the courts. The cops lost. Probable cause is a really useful thing.
Now, if you consent to the search, that's your problem. You *could* have told them to come back with a warrant instead. One of my college teachers is a lawyer, and delights in making the beach cops get a warrant to search his cooler for alcolholic beverages.
Does planting of evidence never happen? There are cases where it does, sure. Is this really going to change any of that? Probably not. Are the consequences going to be any worse than they are now? Probably not.
Personally, I prefer that law enforcement be the ones doing this, rather than private industry. At least there are limits to what the law is allowed to do...
From the article: When asked: "What do you do in cases where the subject is using encryption?" Thomas replied, "This suite of devices can't handle that". I guess they hand it off to the NSA.
The NSA is not chartered for domestic surveillance. End of story. If they capture any transmission or conversation with a bona fide U.S. citizen, the identity of the individual on the logs reads "U.S. Citizen". They don't outsource decryption capabilities to other agencies. They don't have the time. They're too busy looking for terrorists. Forget that Enemy of the State crap. Pure fiction. Hysterical. I live close enough to Ft. Meade to know what a joke that movie was.
Don't forget that whole probable cause thing, either. That *still* limits what they are allowed to collection. If they don't have reason to suspect you're a child pornographer, they have no legal means to collect random data from your machine, hoping to find some reference to illegal activities.
Not to mention it's a lot easier to hit a known target than to sift through all the crap that flows through my machine. A day of legwork and research could easily produce more useful results than sifting through otherwise random network traffic.
So we know the FBI wants to tcpdump at your ISP. What makes you think your ISP isn't doing this already? And for whose purposes?
Funny, I just ranted at someone about this yesterday. Here is the rant in relatively unedited form:
Esd was fundamentally designed just to handle making "plink" noises (window managers, IM clients, short term audio feedback in programs)
without interfering with mp3 players, live audio strems, internet telephony, or other "long-term" audio streams. If I could feed the audio into cthugha, all the better. These jobs it performs adequately.
I never intended for esd to be The Master Audio Control Program. If you have hard, real-time, guaranteed nanosecond response time requirements, *no* audio library that allows concurrent software access to the audio card (no guarantee that an audio card supports hardware mixing) will suffice. Such a program *needs* to talk to the bare
hardware at the lowest level possible. Fortunately, the need for such programs on a "standard" desktop machine is minimal. Esd can still support such programs, however. See the esd_standby() and esd_resume() functions. Don't want esd hogging the sound card? At least I let you take it out of the loop.
It is also some sign of acheivement on the part of esd that Lokisoft's games, and RealPlayer 7.0 support it "out of the box". At some point,
it just became easier to make it a program option, rather than a paragraph in a FAQ. Now if we can work on the Id guys...
But wait. Quake requires memory mapping the audio card's DMA buffers. Transferring data between esd client and server goes through a unix
domain (or tcp) socket. This should just be a memory copy on any reasonably optimized network stack, but might not be the case. By converting the server to using a shared memory buffer, as a circular data buffer with read/write pointers (and audio format metadata) within the buffer, we can avoid the data copy entirely. Someone suitably
devious could even update esddsp to wrap the OSS calls that return samples written, read/write locations within the DMA buffers. Voila!
esddsp q3arena! And you still get your IM chimes.
Think the interface to esd sucks? Why yes it does! With the shared memory transport, the standard api will need overhauling anyway. Esdlib should never have ever returned the raw socket id to the client program. That should have been a pointer to an opaque EsdConnection structure.
Live and Learn. C++ would also have arguably been a better choice for the server; at least would have made certain parts of the code a *lot*
cleaner. Live and Learn.
But wait. The mixing/resampling engine sucks. Grab a GPL'd mod player (e.g. http://xmp.home.ml.org) and "reuse" the engine in esd. It can be done. Someone sent me the patch a year ago, and my hard drive ate it. I never heard from them again. (sorry, whoever you were).
Yes. Esd sucks, but until another option arrives that generates *remotely* the same amount of stupid questions to application *writers*
(i.e. Loki, Real, Id, all the K's of programmers who ever answered the question "why doesn't your program work under Enlightenment/Gnome?")
esd is (I shudder to say it) the *de facto* audio server standard on Linux. Esd also runs on a wide variety of other Unix platforms, and can serve as a copatibility layer. Sad that my pathetic excuse for a couple months of boredom has
caught on so well, but there you have it.
I still accept patches, once every month or two, I even apply them.
The Simpsons are as mass market as it gets. They do feature a large number of "inside" jokes, and obscure references, however. I think you mistake these for esotericism.
However, Groening's first major accomplishment, Life in Hell...
"Akbar and Jeff, brothers, or lovers, or possibly both, whatever offends you the most."
And remember, in the immortal words of Michael Abrash, "Assume Nothing. Measure the improvements. If you don't measure, you're just guessing."
Garmin GPS receiver connected to the serial port, and a short script to ask it what time it is, and set system time accordingly. I'm not all that worried about the milliseconds of lag in actually setting the system time, but it doesn't require access to an ntp server, or even that my network be connected. Plus, once I programmed the data retrieval routines, what's programming one more unpacking routine for a data packet...
In the DC area (definitely east of DC), you may be able to pick up WRNR 103.1, which has as their tagline, "Everything under the sun, in no particular order." If you are *really* sick of alleged "alternative" radio, give them a listen. You will hear a wider variety of music than you could imagine from one radio station: blues, folk, jazz, etc. Hell, I've heard them play Zappa in afternoon drivetime.
If anyone is paying attention to the age of my slashdot ID, I just downloaded the windows installer from a mirror and also got an md5sum (cygwin) of:
684461f4bef2888271cb05bd3d80af28 *mozilla-win32-1.0-installer.exe
Of course, I *could* have just copied his numbers to throw you off the trail, but I encourage you to perform this experiment yourself.
Mozilla lost my mail. Although, I must admit, it took 5 years to do it, on folders shared by pine, netscape 4.x, netscape 3.x (on hp-ux, no less), and mozilla 0.9.x. I think one of the older netscape versions nailed the mail header cache info. O well, it had long since been time to clean the crap out of there anyway. =)
He could be added to the crowd in the Endor base strategy session with little difficulty, or loss of continuity.
Hmm. I have the original releases on VHS, and the special edition releases. Anyone who can send me a TV-in card that works under Linux, and the UPC codes from the VHS tapes, I'll gladly digitize a copy for. =) VCD/SVCD format, unless you want to send me a DVD burner, too. =)
Now, if I could just get a reliable site for phantom edit part 2...
She? I thought it was still going by "Walter" back then (before the new age years)
We use the same C++ foundation classes in ACE on WinNT, Win2k, Solaris, IRIX, HP-UX, and Linux. ACE is also supported on VxWorks, AIX, and a dozen other weird variants of *nix. It's a comprehensive real-time, networking, threading, and platform abstraction library. The stuff works great. Makes all platforms act the same. Takes a little work to get it compiled at first, though.
Expect to spend some time getting used to the toolkit, which ever one that winds up being. Every minute you spend initially studying example code, and learning the toolkit's way of approaching problems, is one less minute you will spend trying to beat their classes into doing something they weren't necessarily intended to do.
Unless you know what you're getting into up front, keep separate make strategies for Win and Unix. If you're feeling perky after a while, you may be able to migrate your windows build to the same makefiles as unix, but it'll take some work (and probably the cygwin toolset)
I recall a story online about what a few computer researchers considered their first computer game. It consisted of loading the computer full of NOP statements (no-operation, i.e. don't do anything this clock cycle), pushing the "RUN" button to start the program, and seeing who could hit the "STOP" button the fastest. Why let things like total lack of UI ruin the opportunity for a good competition?
I recently put a downpayment on a piece of property sight unseen, and found that it wasn't quite what we were expecting. Fortunately, I asked the seller to add a clause specifying that we had 60 days to see the property in person, and cancel the contract with full refund of downpayment, if desired. Get this clause should you decide to purchase property over the 'net, it's a life saver.
TCP is more overhead than you care about for streaming a lossy compressed audio stream. So what if you drop a few packets, the audio will skip, and you'll pick up where the packets start returning again. Not adequate for mission critical data, but streaming audio hardly qualifies.
However, 10 CDs at 400MB/CD (raw audio) would be about 4 GB. It would even take days to download one CD over a modem. Three cheers for mp3 compression, eh?
They already did. Even in Canada
How about this for a replacement for the CVS services...
Or maybe Kubrick was referring to his frequent soundtrack composer, Walter Carlos, who went to to have a successful new age career as Wendy Carlos...
Standard contract law says that the deal happens in the state of the purchaser, for the purposes of litigation. I don't see how M$ can ask you to waive the entire Uniform Commercial Code (ok, I forget the actual name of the collection of laws governing commerce) and get it to stick in court. Maryland actually has some additional clauses to their version of that piece of law, too, specifically to afford their residents with additional protection under the law. E.g. companies cannot warrantees of merchantability in MD. This has the side effect of making most "service protection plans" a waste of money in Maryland. I don't care if I didn't buy the service plan, if my TV breaks "too soon", you pay to fix it. End of Story. One reason you have the "you may have other rights that vary from state to state" disclaimer everywhere is MD's little addition to those "uniform" laws.
IANAL, but I remember a little from my Consumer and the Law class in college (the best class you could possible take =). In this case, Uniform means 99% identical, with 1% well known local variations.
Oracle will provide you and your system with 24/7/365 support from highly trained individuals, for the "ridiculous" price you pay for it. Again, it's all a matter of how much your downtime costs you. If you're Ebay, Amazon, etc, downtime costs big bucks. It makes sense to have that level of support available for their business. If you're a weblog, downtime costs you very little, comparitively speaking. Paying for Oracle in that situation doesn't make a lot of sense. PostgreSQL, MySQL, etc. don't cost a lot up front, but if your business model depends on multiple transactions per second, aren't necessarily the best choice on the odd chance that things screw up.
A more applicable model might be similar to the way of the bard:
Seven years learning
Seven years playing
Seven years teaching
Repeat.
The idea is that the would-be bard spends some period of time under the apprenticeship of one learned in the art. After acquiring some basic skills (melody, harmony, scales, etc.), and some examples of how to combine those skills (a repertoire of songs), the bard is then sent off to earn a living in the world. While doing so, the bard experiments with new ideas, merging them with the body of knowledge acquired from the master. After some time, the bard takes on apprentices, and shows them what they've learned from their master, and from their own experimentation.
All too often, what's lacking in the free software world of half finished IMs and mp3 front ends, is the "combinations" of those skills. A lot of these programmers barely understand pointers and event driven programming, yet they're building full GUI programs as a method of learning more about how to program. Frequently, they bite off more than they can chew...
Personally, I wouldn't trust someone claiming to remember the *old* slashdot, unless they either:
1) call it Chips & Dips
2) have a user number under 10K
3) complained because www.slashdot.org didn't exist
I *could* have landed a user number in the 2K's, but there was really no pressing need for my commentary on anything that early on.
Sorry, the police need a reason better than a routine traffic violation to search your car. That's already been through the courts. The cops lost. Probable cause is a really useful thing.
Now, if you consent to the search, that's your problem. You *could* have told them to come back with a warrant instead. One of my college teachers is a lawyer, and delights in making the beach cops get a warrant to search his cooler for alcolholic beverages.
Does planting of evidence never happen? There are cases where it does, sure. Is this really going to change any of that? Probably not. Are the consequences going to be any worse than they are now? Probably not.
Personally, I prefer that law enforcement be the ones doing this, rather than private industry. At least there are limits to what the law is allowed to do...
The NSA is not chartered for domestic surveillance. End of story. If they capture any transmission or conversation with a bona fide U.S. citizen, the identity of the individual on the logs reads "U.S. Citizen". They don't outsource decryption capabilities to other agencies. They don't have the time. They're too busy looking for terrorists. Forget that Enemy of the State crap. Pure fiction. Hysterical. I live close enough to Ft. Meade to know what a joke that movie was.
Don't forget that whole probable cause thing, either. That *still* limits what they are allowed to collection. If they don't have reason to suspect you're a child pornographer, they have no legal means to collect random data from your machine, hoping to find some reference to illegal activities.
Not to mention it's a lot easier to hit a known target than to sift through all the crap that flows through my machine. A day of legwork and research could easily produce more useful results than sifting through otherwise random network traffic.
So we know the FBI wants to tcpdump at your ISP. What makes you think your ISP isn't doing this already? And for whose purposes?
M-x spook
Funny, I just ranted at someone about this yesterday. Here is the rant in relatively unedited form:
Esd was fundamentally designed just to handle making "plink" noises (window managers, IM clients, short term audio feedback in programs)
without interfering with mp3 players, live audio strems, internet telephony, or other "long-term" audio streams. If I could feed the audio into cthugha, all the better. These jobs it performs adequately.
I never intended for esd to be The Master Audio Control Program. If you have hard, real-time, guaranteed nanosecond response time requirements, *no* audio library that allows concurrent software access to the audio card (no guarantee that an audio card supports hardware mixing) will suffice. Such a program *needs* to talk to the bare
hardware at the lowest level possible. Fortunately, the need for such programs on a "standard" desktop machine is minimal. Esd can still support such programs, however. See the esd_standby() and esd_resume() functions. Don't want esd hogging the sound card? At least I let you take it out of the loop.
It is also some sign of acheivement on the part of esd that Lokisoft's games, and RealPlayer 7.0 support it "out of the box". At some point,
it just became easier to make it a program option, rather than a paragraph in a FAQ. Now if we can work on the Id guys...
But wait. Quake requires memory mapping the audio card's DMA buffers. Transferring data between esd client and server goes through a unix
domain (or tcp) socket. This should just be a memory copy on any reasonably optimized network stack, but might not be the case. By converting the server to using a shared memory buffer, as a circular data buffer with read/write pointers (and audio format metadata) within the buffer, we can avoid the data copy entirely. Someone suitably
devious could even update esddsp to wrap the OSS calls that return samples written, read/write locations within the DMA buffers. Voila!
esddsp q3arena! And you still get your IM chimes.
Think the interface to esd sucks? Why yes it does! With the shared memory transport, the standard api will need overhauling anyway. Esdlib should never have ever returned the raw socket id to the client program. That should have been a pointer to an opaque EsdConnection structure.
Live and Learn. C++ would also have arguably been a better choice for the server; at least would have made certain parts of the code a *lot*
cleaner. Live and Learn.
But wait. The mixing/resampling engine sucks. Grab a GPL'd mod player (e.g. http://xmp.home.ml.org) and "reuse" the engine in esd. It can be done. Someone sent me the patch a year ago, and my hard drive ate it. I never heard from them again. (sorry, whoever you were).
Yes. Esd sucks, but until another option arrives that generates *remotely* the same amount of stupid questions to application *writers*
(i.e. Loki, Real, Id, all the K's of programmers who ever answered the question "why doesn't your program work under Enlightenment/Gnome?")
esd is (I shudder to say it) the *de facto* audio server standard on Linux. Esd also runs on a wide variety of other Unix platforms, and can serve as a copatibility layer. Sad that my pathetic excuse for a couple months of boredom has
caught on so well, but there you have it.
I still accept patches, once every month or two, I even apply them.
The Simpsons are as mass market as it gets. They do feature a large number of "inside" jokes, and obscure references, however. I think you mistake these for esotericism.
...
However, Groening's first major accomplishment, Life in Hell
"Akbar and Jeff, brothers, or lovers, or possibly both, whatever offends you the most."
I've always found perl code to be indistinguishable from "strings /dev/random", myself...