@MathieuGuindon Thanks for the invite. I had to think a bit before accepting. I'm not a professional programmer, just dabble as a hobby. However I'm in the last stages of retiring so will have some free time and am willing to learn. Happy to be told to just sit on my hands.
@INOPIAE I think a good philosophy is that code that returns an error for testing should be avoided. Instead you would be wrapping the code that generates the error in a Try function so that you only test for true/false and in the case of True, the returned value. There is a rubberduck blog article on this issue.
Refractured: The feeling you have when you add the last refactor for today and slowly realise that it allows you to delete 50% of the code you've painfully written over the past 3 months
You know you are on a loser when the poster starts with 'I am new to VBA"( especially if the add a 'lol') which is short for I've started messing about with VBA in excel but haven't bothered to work my way through a VBA tutorial or do any other reading which might help me. Please write my code for me/ I found this code which nearly works etc etc etc.
@Freman it also says that the cyclomatic complexity is dependent on the number of decisions so how do they get 2 as the minimum case when in the code shown there are no decisions?
Measuring means that performance will tend towards minimising the gap between performance and what is measured. So make sure that what you are measuring is related to perfomance and not making your spreadsheet look nice.....
@this Yes, the like most problems, once you know what is causing the problem its easy to solve. Elucidating the problem is the skill. It doesn't stop you the rolling of the eyes and prefixing Microsoft with a variety of Anglo Saxon crudities.
SO I'm sat here scratching my head during a debugging session only to find that vartype(<stack>) returns the value 8 (as string) and that if I debug.Print <stack> I get "System.Collections.Stack" and consequently the code to filter out objects with a default string property is failing (Case VarType(p.Input) = vbString And IsObject(p.Input)). I don't get this issue when I pass in an <arraylist> or <queue>.s
To get a learner permit to drive a car one of the qualifying tests should be that you have ridden a bicycle over a distance of 5000 miles in the past two years (on roads used by cars). Only then will you have a true understanding of the utterly abysmally low standard of driving prevailing (even here in the UK).
Hi Guys. I have a test which is giving a pass in VBA but a fail in twinbasic (and I think twinbasic is correct). Rubberduck assert.sequenceequals says 10,20,30,40 is the same as 40,30,20,10. Is this down to a difference in how the ducky does the assessment.
From a medical perspective there is sufficient genetic diversity between groups originating from different parts of the planet that indicating your genotype origin can provide very useful input to a treatment plan. Race is a bad word for Genotype.
Noooooooo! Another one of those interesting bugs where code works fine when you step through but crashes when you run normally (I mean crash as in taking out the application).
Where is this Rubberduck Import located. I've never seen it. I can see that in syncronise project I can update files and select which files I want to update.
32909 error. This error is persisting even after rubberduck exporting the active project, importing into twinbasic, correcting the visible compile errors, then exporting from twinbasic , and dragging and dropping the project into a new word template.then finally adding the needed references before debug.compile.
@MDIsmailHosen Based on the code example you provide you'd probably be better using a scripting.dictionary rather than a two column array. Then you'd have no issues converting to collections because you won't need them, and you can use the .Sequenceequals assertion on the .Keys and .Items properties of the dictionary.
As I'm getting older the incidence of me transposing two letters as I'm typing is increasing. Its worse with certain words. Guess who has spent the afternoon trying to work out why a class with a '@PredecalredId wan't being seen by intellisense.
@Freeman Any drug submitted to the FDA is no longer experimental. Expedited review by the FDA means that the risks that they can deduce from the provided data are less than the risks associated with not allowing the vaccine, but that the review process is not complete. The expedited review will be under strict review in case there are pharmacovigilance signals that were not evident in the data that has been assessed to date.
I'm playing with twinbasic. I converted a solution to Project Euler Question 14 from VBA to twinBasic (I just had to change debug.print statements to Msgbox due to preview restrictions). The VBA code takes 51 minutes to run to completion. twinBasic took just 3 seconds.!!!!!
@MathieuGuindon re s and p. I reserve (s) state for those things that are used internally to the object, or which arise as an intermediate state or support a property but which are not directly accessible as a property. There is no public access to s variables. all p variables are public properties. I find the distinction helpful, others may not.
Of course, in VBA, you can be more sophisticated than just using 'this' In my code I came to the conclusion that 'this' was perpetuating limitations in other languages and so spread my wings to use s and p type variables to encapsulate Private Type State and Private Type Properties
Am I a deluded fool in thinking that if you evolve VBA sufficiently you'll end up with typescript. Would I being cruel to Wayne to suggest that a fantastic opportunity for twin basic is not so much twin basic but as a front end of a translator to typescript?
If sharing makes the class 'global' then probably not at this time as this is likely linked to the PredecalredId thing. You could always ask Wayne directly. I got a pretty fast response to my PredeclaredId question yesterday.
No. I've paused evaluation as you can't yet declare constants or set the predeclared attribute. The former I can get around by converting to function but the second has me stumped for the trial project I was looking at. Wayne has said these two items should be along in a week or two.