|
Count to three...
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
What? I gotta RTFM now?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
First shalt thou take out the Holy Pin. Then, shalt thou count to three. No more. No less. Three shalt be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, nor either count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then, lobbest thou thy Holy Hand Grenade of Antioch towards thy foe, who, being naughty in My sight, shall snuff it.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Them critters probably are not poisonous but don't worry, Australia probably has the largest collection of poisonous creatures on the planet so they are not going to be wanting.
I have been there and really liked it. It was odd though when the hotel manager said not to just stick your feet in your slippers at night. Instead he advised stepping on them to be sure any spiders inside would be crushed. I am still not sure whether or not he meant it or it was supposed to a joke, but he was not laughing though when he said it.
|
|
|
|
|
Very true.
I shake my shoes out each time I put them on. And yes, I've had a spider fall out once or twice.
// TODO: Insert something here
|
|
|
|
|
Interesting. But the size kept getting compared to "common brush-tailed possum" - as though everyone knows what size that is, out of hand.
I had to get up and go to the fridge to check what they meant . . .
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
fake news (sorry)
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
That is how Gremlins started : With a cute looking plush animal. ˙˙˙ɐᴉlɐɹʇsn∀ ɥɥɥ∀
|
|
|
|
|
I got some VBA code from business analyst and try to convert them into C code.
just did some quick research and it seems not that hard...
diligent hands rule....
|
|
|
|
|
It all depends on what it does. If it's automating Excel it would be kind of hard to use IDispatch and such from C. C++ would be somewhat better at least.
But if it's just business logic or something that seems easy enough.
And to answer your question, no I haven't, but I use both languages.
Real programmers use butterflies
|
|
|
|
|
most of them are algorithms and formula.
diligent hands rule....
|
|
|
|
|
ah, good deal. that's easier to port.
Real programmers use butterflies
|
|
|
|
|
I felt encouraged from you
diligent hands rule....
|
|
|
|
|
There is no "conversion", it's a straight porting. It depends on what it does, if it interacts with OLE/ActiveX there will be blood to pay, otherwise it depends on scope and size of the application and hoqw badly it had been coded originally.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Same for C# as well.
I also spent 6 months a while back manually porting over VB6 code to C#. That was very tedious and time consuming. ugh.
|
|
|
|
|
If time is not an issue I find it better / faster to rewrite. But if you do try and port it you will read the code lots of times and will have a good understanding of what it does - for when the time comes to rewrite it.
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Porting production apps over to another language is very much like an art restoration expert, restoring an old painting. You want to preserver as much of the old stuff as possible, with little to no personal introductions, as to compromise the original.
If I happen to see a crack in the painting, I fill it, seal it, then paint over, but only the crack.
Why preserve the old stuff (the logic)? Because it works, and has been tested, and has been used for n-Number of years. You want to reduce the amount of bugs you introduce into the logic/code.
I never "re-write" it, ever.
modified 9-Nov-20 7:46am.
|
|
|
|
|
Good points but any commercial software relying on VBA is open to question in my book
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Sorry, I was talking about VB6, and other languages I have had to port. I have never ported VBA, as mentioned in the OP.
I always looked an VBA as more of scripting language anyhow...macros and crap.
I would use Visual Studio Tools for Office then and C# if I had to do anything in porting VBA, etc.
|
|
|
|
|
Yes, I did such a thing last year (Excel VBA to MFC, actually). One piece of code went from about 75 minutes (while also tying up the CPU to where nothing else could run) down to less than 10. The decrease in time and demand on the CPU were amazing.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
Quote: converted some VBA code to C
Coder-speak for "out of the frying pan into the fire."
|
|
|
|
|
Done a ton of VBScript to C#. This site, actually. Was great fun!
cheers
Chris Maunder
|
|
|
|
|
|
It's like that question "How do you eat an Elephant?"
Answer: one bite at a time.
Better answer is that you need someone who knows C well. C has no seatbelts or airbags like VBA so be gentle with that accelerator - it's twitchy!
cheers
Chris Maunder
|
|
|
|