|
The Undefeated wrote: Pete O`Hanlon wrote:
the number I'm thinking of
42
Like there is another number
codito ergo sum
|
|
|
|
|
Quantum cryptography makes use of light waves and optical fibers. Firing up Visual Basic 1.0 isn't going to get you there.
Suggestion: Get a flashlight and manually flip the light on and off (1 for on, 0 for off).
ROFLOLMFAO
|
|
|
|
|
|
Once you get some code written, modify your your post and add some code so your post will be in the proper forum.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Although I also have a hard time taking this seriously, here goes a shot at a serious answer. Quantum Cryptography usually signifies two things, as far as current tech allows: (1) generating truly random numbers, via Quant. Phys.; (2) sending keys securely, by using quantum physics to recognize a tap on the line. MagiQ sells VPN hardware that does both of these things. Their RNG alone creates up to 100 unpredictable keys a second.
So, what do you need to do? Get some of that hardware. Write VB wrappers around all pertinent API functions. Generate keys with the Quantum RNG, and use them with a good encryption algorithm, like AES. If you are transmitting data, send it using Public Key cryptography, with at least the private keys generated from the quantum hardware. You can do the key-exchange part over quantum hardware, to detect taps. Operator should be notified if line is breached regularly. Just be sure to ask MagiQ (or the other unknown one) for technical documentation, to be sure this would work. Oh yeah, if you build a VB Quantum CryptoAPI, I will be expecting a free copy.
-Nick P.
|
|
|
|
|
I hate posting this, since probably 85% of general population actually love using #if and #ifdef and even see that's the only easy way to do "cross-platform". I don't, BTW.
Here is my gripe.
One #if is fine. Nested #if is nasty (I've seen #if else nested 8 level deep, with structures whose definition has more #if in it).
Problem is #if begets another #if. I work in a company that has at least 90 conditional compile flags set into either makefile or command line. BTW, my Unix terminal has to scroll 4 pages for the complete build commands (and yes, mostly are the -D define flag). The worst part is the flags are peppered all over the code, maybe 2 millions LOC. And nobody bothers to consolidate them.
I've seen a Linux distro that has parts of files that is different between platform stored in different directory. I couldn't remember what the Linux flavor was. They choose between target sources in makefile, instead of in the code. And the differences are stored in different dirs for ex. /x86 /alpha /risc, and these files have exactly same files with different content.
I think this is a much more cleaner and maintainable approach. The key is to identify what would be different and consolidate it in one area.
Any other ideas?
|
|
|
|
|
crewchill wrote: I've seen #if else nested 8 level deep, with structures whose definition has more #if in it
Well, that would certainly be a programming horror. Please, feel free to post it up so that we can all gasp in dismay and horror at the sheer beastly inhumanity of it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Then you have for every platform own code, which will do the same. One change and you work in every file. I hate nested #if but this seems not to be better.
I try to be prepared for this via structuring classes for use with or without API and MFC.
Greetings from Germany
|
|
|
|
|
I Have put on hold certan project, i am using nested #if. I am using for a feature and permision to be build or not. I chose this aprouach, so it woudnt be hacked.
Also an option to hardcode a connection string, or specificy manul.
Another reason i have chosen is because i wanted to make open source, so if someone woud modify, then they coud get direct database accsess.
But i have put it on hold, Because i am doing asp.net version, And when it will be finished, i woud have appropriate schema. The way it is currently progresing, i think i won't need nested #if statments, Instead if i woud put script betwen application and server.
|
|
|
|
|
I maintain a thin client which was originally designed for Symbol Series 3000 DOS-based handheld computers. Over time it's been ported to desktop Windows (for testing), Palm (for Symbol's relatively short-lived Palm devices with integrated scanners), other DOS-based handhelds and a variety of Windows CE and Pocket PC-based devices.
The device-specific stuff tended to be implemented originally with #ifdefs but where possible I've replaced that with separate implementations, where the code needed to be completely different. In some places, I've replaced platform defines with feature defines, and added a configuration header which sets the feature defines up appropriately per-platform (unfortunately Microsoft C 6.0 . Finally, to try to keep the number of builds manageable, in some places I've used dynamic loading on CE using LoadLibrary/GetProcAddress to detect whether a feature is supported. This can happen if you're trying to use some manufacturer-specific APIs, for example we try to determine whether a Symbol MC3000 has full waveform-audio support or simply a beeper. The waveform-audio version supports the beeper API but with a significant amount of latency, so we use our own waveform-generator where possible (and of course it's necessary on the non-Symbol devices anyway).
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
can't you just replace a nested if with case statement in many cases?
|
|
|
|
|
It's not nested if... it's nested #if.
And the reason they have to do #if, is that in certain platform the function or even the structure protected inside the #if is not available (not compiled).
|
|
|
|
|
An example of a conditional compile would be:
|
|
|
|
|
The use of good cross-platform libraries and API's helps reduce or prevent much preprocessor ugliness. If you do it like one person said, with a project/program for each platform, you can simplify that by encapsulating core functionality whenever possible for reuse with many platforms. I often do what I can to separate program logic from GUI code, so that I could port the software to many platforms, while leaving the main logic untouched. (Of course, wxWidgets or Qt with ANSI C++ often means I hardly change a thing, but most people aren't using such libraries...)
-Nick P.
|
|
|
|
|
I have this actuarial software project in which I have to code some crazy looking actuarial formulas and frankly I have no idea how I can do that?!
Any suggestions appreciated!
Best regards,
k3n3dy
|
|
|
|
|
k3n3dy wrote: Any suggestions appreciated!
Any suggestions? Even the anatomically improbable ones?
I've developed actuarial software in the past - you really need to work with an actuary on this. More importantly though, you need to realise that this is the coding horrors forum - where ungodly code is held up to the sunlight of derision where it bursts into flames. Tell you what, when you've finished your code hold it up for us to have a deride.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: ungodly code is held up to the sunlight of derision where it bursts into flames
PMFSL... that's all kinds of funny...
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
try breaking it into many subprograms.
wont make u lost
-
|
|
|
|
|
jglim1994 wrote: breaking it into many subprograms
Divide and Rule?
Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
sort of- at least you dont get lost in a huge pile of code
-
|
|
|
|
|
Sounds like you are on your way to creating a coding horror of your own!!
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
Use the fast C++ in a dll and watch out for precision details. And better disable optimization until you proof that there isnt going something wrong. Use 64bit values int64 and double. Check that the values dont go near 0 or get really big, because it harms precision. First multiply than divide.
Greetings from Germany
|
|
|
|
|
You forgot to tell him to stiffen his sinews and gird his loins. I know that you would expect him to be using the Manly macros, but I suspect that he's actually using the Wimpy ones. But good catch on the first multiply then divide. It's a mistake that people often make.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: tell him to stiffen his sinews and gird his loins.
Because:
"Its fun to charter an accountant, and sail the wide accountan-see!
Its all tax deductible, we're fairly incorruptible
and sailing on the wide accountan-see!"
Please excuse these attack by our introductory film
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
KarstenK wrote: First multiply than divide
That happens all too often nowadays. People should work harder at fulfilling their commitment.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|