@M.Doerner @Mat'sMug perhaps we need to update the version of Ninject?
Come to think of it, I think I saw something on their site that the branch we use has been abandoned or something to that effect. Maybe look into replacing it with something else? If something else even exists?
..and we need to re-think the IoC configuration anyway. If you branch and implement AutoFac (or whatever) and it works, I'll take the PR.
Ninject isn't the fastest framework, but I like using its API...
it's just some kind of comfort zone for me, I guess. that said I think we should reconsider using the IoC container for the critical COM stuff ...regardless of the DI framework.
The motivation for this question is to obtain a concrete example of what good, unit testable code would look like for modifying a document. By way of background I appreciate that classes are great for defining and validating things, like for example:
shapes - https://codereview.stackexchange.co...
@shadowofsilicon which verison and where may the libraries be located you think?
@M.Doerner may you know that we had to use the COM marshaller to release objects... I remember that Comintern tweaked it to ensure it releases its own garage collection when we create them...and was thinking is there any handling with nulls in there?
Question. When I install the most recent Rubberduck (v2.1.2031) and click the about menu I get a version number 2.1.0.9682 - this does not seem to correspond with any previous version :-/
@SlowLearner I believe that means you're going to see the version number @Mat'sMug has put in there, not the build number that you've currently got installed. I agree, that's a little confusing, especially with the "buildly" releases getting pushed out. I love the simplicity of testing the newest fixes, but remembering what version I'm actually on can be tough sometimes.
No, he updated the hard-coded version in the assembly, which is the number the about box shows. The bulid-number (last four digits) does no match because the installer has the build-number from AppVeyor.
@M.Doerner When I exit an Excel host (without RD loaded), there's a 0x0090 Unknown message (but Google tells me that is WM_UAHDESTROYWINDOW) that occurs just after the WM_PARENTNOTIFY (WM_DESTROY event) messages and just just before the WM_DESTROY message.
@SlowLearner I keep track by putting the v# in the filename when I download them. I'm running the newest one unless I'm specifically testing to find out where something broke.
Does anyone else ever have an issue in the VBE when debugging where you hit F8 to execute one line of code and the thing just takes off running like you hit F5? I've had this with and without RD installed, so it doesn't have anything to do with RD. Just wondering if it's a known issue or I'm just that special...
Funny, they're sunsetting documentation, but I'm still getting points for it... :) I guess not everyone's seen the notice.
@FreeMan I had that a while back. It's probably because you have an add-in that is handling the Application events, and that code is either locked in a protected project or is in a non-VBA add-in.
I just assumed it only happened with certain commands. For example, if I try to do Set Foo = Workbooks.Open(SomePath) or ThisWorkbook.FollowHyperlink(SomeFilePath) my code runs off on me.
@SlowLearner AppVeyor builds are Major.Minor.Build, with the Build portion being a sequential number incremented in the cloud. Local builds are Major.Minor.Revision.Build, with the Build portion being whatever value the compiler decides to use. As far as version is concerned, anything in this cycle (until next manual release off [master]) is 2.1.0 - rest is irrelevant.
@FreeMan the AppVeyor build# is more relevant for pre-releases; they tie back 1-to-1 with a specific PR, which links to specific commits, which link to specific issues. the MSBuild build# says nothing whatsoever. there is absolutely no possibility of having the AppVeyor build# in the about box.
for a green release off [master], the AppVeyor build# would be irrelevant, but the about box would say 2.1.0.[whatever-we-dont-care], and that's all we need to know.
I'm the author of the TPUG article.
The "BILL GATES SUCKS" message isn't really an Easter egg; that was just a conceit of mine to make the article a bit more interesting and to turn it into a bit of a puzzle. Here's how it works and how it was created:
In any given infinite sequence random num...
@FreeMan See the Bill Gates Rocks in the comments?
Hi, @NelsonCasanova.
This morning is slow.
Waiting for a meeting so I can start rewriting a huge section of code.
A 690-line method.
I think by the time I'm done, it will be over 1k lines, including all the new class definitions and stuff, but it will also be a bit more maintainable and testable.
So, it may be possible to find different seeds which produce BILL GATES RULES? Of course that would be dishonest and a waste of time. — DaveBoltman8 hours ago
@Hosch250 Okay, so first of all, I know car quality reputation is usually a bunch of propaganda, but I've heard differently than you on which manufacturers are best - I've heard the best things about Japanese cars.
@FreeMan There's an easy work-around: just shift-F8 to the next line rather than F8 for single-line execution.
@Hosch250 Speaking of GM in particular, they just settled another lawsuit for not disclosing issues with their vehicles. I personally don't want to deal with that kind of dishonesty if possible. Hopefully it's not an every-company's-doing-it sort of thing.
@Hosch250 If you havent checked it out, try CarGurus. You can find a dealership that is already at a good price, and then drive them down a bit more that way. I recently bought a used 2014 (33k miles) mustang for 3k under market value without having to negotiate at all.
> Over the last few years General Motors has paid out more than $2 billion in fines, penalties and settlements related to faulty ignition switches that plagued many of its vehicles for close to a decade, a flaw that led to vast recalls and at least 124 deaths.
" it does take only a few minutes to run the search." - maybe so, but one of the banes of my "day job" is people who write programs that run 1000 times or even 100,000 times slower than they need to, because the only algorithm they know to solve any problem is "brute force."
@Hosch250 Moving on to finances - car dealerships don't like it when you pay in cash. So don't expect to get concessions from them there. You are taking money away from them when you do that. I definitely would keep your strategy to not tell them about that until you are ready to pay. But if you expect to use that to get from acceptable price to preferred price, you will be disappointed.
@Hosch250 Car dealerships literally tack on a half percent or whatever to what some bank is willing to offer, and then sell the loan on to the bank. You're taking away their half percent.
@puzzlepiece87 I actually disagree on that. While they may be making less, money talks. If you've ever heard of Dave Ramsey (very well-known financial expert) he actually recommends just having the cash in your hand as an incentive to get them down on prive.
@Hosch250 And then I know @shadowofsilicon was happy with his 1.9% APR on not-so-great credit, but if you go to the bank beforehand, you could literally be pre-approved for 1.4% or whatever in his case, go to the dealership, get the car, and not need their financing.
@BrandonBarney Dave Ramsay's specialty is getting people out of debt, so I'm not surprised to here he recommends cash in hand, but I hear what you're saying.
When it comes to negotiation, his opponent is the salesman. Whatever gets the salesman to sign off is what will get him the car. Besides, if cash doesnt work at dealer A, there's dealers B-Z waiting and ready.
Again, it depends on the person. Yes, of course, when you analyze the data at a large scale you will see those small human behaviors slowly trickle out. He doesnt need to change the average of all the data. He needs to get it to work for him.
@Hosch250 You say you want to save for a car, house, then retirement. That makes intuitive sense, but it's unfortunately wrong.
@Hosch250 Retirement should be first, for two reasons: employer matching, which is often 50% free money. And the returns on investment in your retirement vehicle exceed car loan and house loan rates.
@puzzlepiece87 Assuming he pays for the car with a loan, when he has said he wants to pay in cash...and multiple analysts show that buying a house is the #1 path to increasing one's wealth.
@Hosch250 Then you should do mortgage, but ONLY if 1. You're ready to live in the house for at least 5 years (I'm guessing you're probably not ready to do that yet - you're single and starting your first post-school job) and 2. Only save enough for the down payment and minimum monthly payments.
Besides, it also depends on his company's retirement plan. His company could offer a really good retirement package he doesnt need to contribute more to.
@Hosch250 - having purchased quite a few used vehicles over the last 10 years (I've got 3 kids driving now), you'll get far better value for money if you can buy from a private seller than from a dealership. You'll have to do a better job of inspecting the car and, possibly take it to a dealership & pay out of pocket for a pre-sale inspection, or bring a "car guy" friend whom you trust along with you.
@Hosch250 And then finally car, where the rates are the lowest. You could be using the same money to get 5% gains in your retirement vehicle instead of saving 1.9% (hypothetically, whatever your rate actually is) on car loans.
I've got a good friend of mine who I brought along to take a look at a car. We walked up to the guy selling it and almost before the "Hello", my friend asked "What was the damage from the accident?" He could tell from 20 feet by the swirls in the paint on the hood that it had been repainted. Of course, he worked in auto-body & high-end custom paint for about 10-years... :)
What I mean, is if you are looking at the behaviors of dealerships at the larger scale (the generalized scale) then yes, you do see the average dealer becoming less-likely to take cash as an incentive due to their cut. The problem with that perspective though, is that at the large scale you normalize anomalies, so those dealers who are willing to take cash as an incentive all but disappear. The problem with data is that it can mask human behavior to the point that you forget it exists.
Hosch just needs to find the dealer willing to make that deal. And it is possible.
@puzzlepiece87 Again, looking at the data, the trend has held almost fully-true (with exception of the housing crisis). Further, if you are not owning your home, but paying rent, you are literally throwing money out the window (unless you are a very good investor in which case you can almost make the same returns over a 30 year period with the difference between avg. mortgage compared to avg. rent).
@BrandonBarney That doesn't make nearly enough sense to me. What I understand from what you're saying is: "I don't have any reason why a dealership would prefer cash, and salesmen are all versed in how the dealership makes money as part of their training, but somehow Hosch will pressure an individual salesman into preferring cash."
@puzzlepiece87 Because, while most dealerships may be well versed, it is always possible to find the guy willing to make a deal at that moment. It happens all the time, especially depending on the dealer.
@BrandonBarney I think you're conflating a salesman's desire to not want Hosch to walk away, which is a desire to keep him there, with a preference for cash, which he doesn't have. He just is willing to take his dispreference on finances so that Hosch doesn't walk away.
@BrandonBarney Also, I'm extremely skeptical in expecting a first time car buyer to magically trick a car salesman into anything that the buyer wouldn't have gotten already.
@BrandonBarney Also, your arguments make more sense if Hosch had some benefit to paying with cash, but I strongly suspect he doesn't.
@puzzlepiece87 A retirement account certainly isnt the best vehicle on return. There are plenty of other investment opportunities out there there are better than a retirement account. Few get rich on a retirement account. You are far more likely to make money off of actual, targeted investment. But beyond that, it requires an actual desire to do so. I would much rather enjoy the car I drive, and the house I own, than putting money into an account that will eventually be accessible.
All the while, I have an investment account that is growing reasonably well.
@puzzlepiece87 Again, you're assuming the salesman will be exactly like all the other salesman you are collecting your data from. The worst that can happen, again, is Hosch tries and ends up walking away.
@M.Doerner Is that good one to use for our application? I agree that the fact that a dependency already uses it gives it extra points for consideration... but I suggest that alternatives be researched first.
@puzzlepiece87 I mean it too. My investment account from my employer is already growing, and it is managed privately. Meanwhile, my wife and I are making investments on a home we have a mortgage for, and I have a car I dont have to work on every few months.
@BrandonBarney ^ This is a perfectly valid preference: "I want to enjoy life rather than save for my financial future." I support you in your preference! But it doesn't equal good financial advice. You're explicitly saying you're disregarding your financial optimal outcome. Which again, is fine.
Alternatively, by your mindset, I could funnel ~600/month into an account that I can use when I am 65.
No, you're confusing your financial advice for a good financial outcome. A managed portfolio, generally, will have higher returns than a retirement account.
@BrandonBarney Overall it seems like you are a pretty intuitive thinker and that you are preferring other things over financial outcome - which is great, I'm happy for you. :)
@Hosch250 My mindset is definitely more analytically-inclined, so that's where mine comes from. You may prefer @BrandonBarney 's style, it depends on your feelings and wishes for the present/future. It's a lot to weigh :)
@puzzlepiece87 Put it like this: if a retirement account was the #1 way to get a return on your funds why would anyone in their right mind put any money into shorter term investments? By your approach, I should just slowly trickle money into an account and wait for it to give me a return. It works, but it doesnt work quickly.
@ThunderFrame I can confirm this behavior. For me, Excel crashes on exit when closing the VBE window, then quitting Excel from inside Excel. Although; I wonder I the same thing happens when I close the VBE then wait a minute before quitting Excel...
Instead, there are plenty of investors out there who make money by making good,smart investments that pay on a shorter term, and then they reinvest that money.
And I am not saying discard a retirement plan. I am saying to use a wider spread of investments and strategies.
@BrandonBarney If they are frequency traders and willing to pay with their time (if they're investing for themselves) or their customers' money in the form of fees (if they work at a financial firm).
@Hosch250 No, you definitely have to have a car, and having a house is better than renting. My advice is not to skip a car or a house, but to make minimum payments on them after you have them, to the extent you are comfortable.
@Hosch250 Nasty thing about home loans - you have to keep making minimum payments even if you pay early.
@Hosch250 So you're basically counting on being able to pay off the whole house at once, or you'd need to make minimum payments and save extra separately.
@Hosch250 Also, I didn't mention this because I figured if you're thinking about paying for a car with cash you have this covered, but a 6-9 month emergency fund comes even before retirement contributions.
Not having a 6-9 month emergency fund gets very expensive, very quickly.
@Hosch250 Makes sense :) So most of my advice doesn't fit your preferences, but one thing that does - for that last 25%, get pre-approved from a bank rather than getting a loan from the dealership.
First, max out your retirement contribution. Do it yesterday lol. At least max out your employer's matching contribution, if any. Second, strongly consider future purchases, e.g. a mortgage AND a emergency fund. Third, take your fistful of cash and strategically go loan shopping. Many will lower interest rates if you pay a large portion as a down payment...
@Hosch250 Consider getting the car loan, even at 3% and even if you can pay cash. Then, make double or triple payments to pay it off in a year or so. It will cost you some in interest, but the good credit history will save you money when you get a loan for a house, even if you're only borrowing 25% of the cost of the house.
At the dealer, act like you're undecided on a purchase and keep it that way. Do you purchase over several trips, mention you're thinking about a competing brand, model, etc. Do it over a few trips over a week or two... Make them work for it.
@puzzlepiece87 single most devoted-to-site-quality CR user IMO. has been for years. excellent moderator, been one since late 2013, appointed by Stack Exchange community team, and then elected in the 2015 elections. why?
@Jamal Sorry, has this been frequently discussed on CR before or something? I'm not on CR often so I totally could have stumbled into a briarpatch unwittingly :) My comment wasn't advocating for separate tags, it was coming from a perspective that there are separate tags on SO, where I spend most of my time. I was making sure that I was including all the expected information. On SO, if you don't include version, you get immediate comments. — puzzlepiece874 mins ago
If you get a good loan offer, consider a combination of 1) a large down payment (no interest paid on that) 2) save enough to make double payments / keep minimum payments small enough just in case of life events (and remember, you always have to make payments over the life of the loan)
@Hosch250 also check edmunds.com and nadaguides.com All 3 will give you different prices. The dealerships use NADAs commercial services (and I'm pretty convinced they list different values there than on their retail side), but they're all well known and will give you some leverage.
But... if you get a loan, you build credit, which a mortgage company will certainly want to see on your credit report. Vehicle loans are prob the best indicator besides a previous mortgage to them
Well, if you guys are saying I should get a small loan, maybe I should buy within a couple weeks. I could wipe out my savings on half the car, pay the other half off within a year.
If I poured everything into it, I could pay it off within about 3 months, really.
No, no, he's fine, thanks for asking! He just prefers to make all his own mistakes. I told him he won't live long enough to make them all. He's getting better about learning from others...
@Mat'sMug the comments disappeared without feedback, so I'm not sure - did I stumble into a briarpatch by accident? Have separate SQL Server version tags been discussed endlessly before?
no, but these comments were obsolete and if a discussion about SQL tags needs to happen, it belongs on meta, not under some CR question - I removed them.
You'll possibly shave a few milliseconds splitting it into two different If blocks (because the 2nd one will only evaluate if the 1st one is true), but the point was that you need a boolean expression that does what you intend it to do. I'm pointing out a logical bug in your code, not a performance micro-optimization. If you want performance start with dumping your data into an array and iterate the array instead of the worksheet. — Mat's Mug1 min ago
#RookiesAndOptimization
1. make it work. ... 3. make it fast. in that order
@Hosch250 Do you have student loans? If you do, those can actually help your credit considerably. It wont improve your history as much (since they likely wont have years of good payments) but they can increase your overall score.
@Hosch250 The best debt-free way of building a credit score is to have a credit card you use for every purchase and auto-pay every month. It sounds like that might be a good fit for you.
There is a small part of me that wants to just go for it in VB.NET instead in the hope that it will be easier, but then I would never be able to do anything for RD lol.
I'm still stuck on the exact reason why DoEvents even needs to return the number of forms open. Shouldnt there just be a separate function that explicitly is named for that? GetOpenVBProjectForms or something?
Who the hell would innately know that DoEvents actually is DoEventsAndGetForms
@Hosch250 It's not that bad, we have three devs and are usually on very disparate sections of the project. We're also working on setting up a pre-prod area that can be used primarily, until the feature is done and can be moved to prod.
@Hosch250 No student loans? Excellent! You won't get affected by the pending student loan financial crisis (the outlook is worse than the mortgage crisis of 2008/9.) But, that means you have NO credit. :/
@EBrown We don't test in production exactly here (we have test and dev environments, UAT regimes, the works), but since I'm the lone automation expert and there's tons to do, I often get to delegate testing to the analysts :)
Yeah. Describing what something is only leads to 'WTF you talking about?' expressions from others. Using the correct name or one very similar to it helps to transmit ideas a lot better.
You-know-that-one-thing-that-does-the-other-thing doesn't get much help with tech.
@EBrown 3.5 hrs driving. Or... You could take the bus to Chicago then the train to Toledo in only 8.5 hrs! (it took a minute to realize what the heck google maps was doing with a route through Chicago...)
It was a wild guess lol. I just have seen FormValidation (or something like that) in other places. You would need to see if that control is the actual one you need.
But, if the same process is used in C#, there would be some kind of event for trying to navigate to the next form that would only successfully run if the first form validates properly.
@IvenBach The add node wizard? A lot of times they just say "I can't get past this screen". In my experience most users refer to form sections as "screens".
@IvenBach Usually I use 'Section', where there's a 'Section Validation' and a 'Section Selector' (left panel).