« first day (499 days earlier)      last day (3521 days later) » 
00:00 - 15:0015:00 - 00:00

12:33 AM
@RubberDuck funny, I'm hitting the same wall as this guy: zbz5.net/adventures-vb6-reflection-and-error-handling - basically I thought "hey I'll make Assert raise an error, and then I don't need the test methods to be functions anymore, and failed Assert calls will stop test execution like an error does".
his solution was... to make test methods be functions.
 
Well, I think..... it must have been an amazing answer ... ;-) 3 years, 7 months, and 1 vote.
Also, one-vote-short minus a few ....
 
@Jamal well it's... nested.. maybes..
 
@rolfl Holy crap. Did it really go down that much? I could've sworn it was at about 400-500.
 
apparently I have not voted on questions for a while..... :(
 
12:46 AM
I've mostly gotten into upvoting more answers. Sure, they're "harder" to upvote than questions, but I think they really deserve the rep.
 
I can point a few answers your way to vote on ... ;-)
 
Then you'll be needing the pimp cane.
 
I propose a goofy-wednesday community challenge.
 
it'd be goofier with the old tag/synonym ;)
 
Hmm, past 8pm EST,....
I propose a goofy Thursday community challenge.
18th September.
 
12:57 AM
care to expand a little?
 
Well, it is not because it is scottish independence referendum ;-)
It's because..... 1337
 
oh
I agree, let's celebrate beta day 1337!
 
Now, how?
 
I suggest posting all questions in oscar charly tango alpha zero format.
so that our posts are the longest in beta format.... ;-) Like our site ;-)
 
1:10 AM
> There seems to be no way to extract the names of public members from a class module.
But OH, there is a way!
 
yeah? export it and then parse the text file??
wait..
 
You don't even have to export it really.
 
didn't your VBEX code do exactly that?
 
0
Q: Highly performant action to track the link and forward to another url

shenkuI have a controller/action which should simply track the action has been hit (a click) and find the appropriate url to redirect to, and then redirect. I would like this to perform as quickly as possible, I am a bit rubbish at threading so could you have a look and let me know if this is actually...

 
Well, it inserts them, but it's only a step backward to parse the signature.
 
1:12 AM
lol export it and then parse the text file string content
 
Yeah. Here's the repo where the vbe stuff is.
brb
 
great, I solved it!
2014-09-14 21:18:00 TestSomething: [FAIL] - This result shouldn't be reachable
Public Sub TestSomething()
    Assert.IsTrue False, "This result shouldn't be reachable"
End Sub

Public Sub Test()
    TestClass.RegisterTestMethod Me, "TestSomething"
    TestClass.RunAllTests
End Sub
(uh, nevermind the assert message, make it "False isn't True" instead)
so it works, but it's a fugly hack. a few more tests, and ...@RubberDuck do you mind if I post it for review?
 
I'm happy to look. 9 bottles of beer on the wall.
 
1:32 AM
One last tiny little issue though... the failed assert will not halt test code...
 
Why would you want it to?
Your whole test shouldn't stop because one of them fails.
 
No, all tests still run.
But a test with 4 failed asserts will show 4 results
 
Ohhhhhh... Gotchya.
Simple solution, listen to uncle Bob and only Assert once per routine. =)
 
Yeah, ..but if it's a framework, I can't make assumptions on what the client code will or will not do...
 
Yeah. I know. Just trying to lighten the mood.
 
1:41 AM
hehe
there has to be a way
oh there is
 
1:57 AM
nope. doesn't work. crap.
 
0
Q: Simple QGraphicsScene program

neuronetAt the documentation for QGraphicsScene, there is a simple example that does not work. Hence, I've tried to incorporate their code into a minimal example that does work. I'm curious if I succeeded. From the docs (does not work): scene = QGraphicsScene() scene.addText("Hello, world!") view = QGr...

 
2:25 AM
hey all
 
hi!
 
hello
 
Hola
 
@RubberDuck is it just me or the Creatable attribute doesn't change anything - you can't new up a class that's in another VBProject?
    Dim methods As List
    Set methods = List.Create("TestIsTrue", "TestIsFalse")
^^ I can't create a New List :(
 
2:45 AM
0
Q: How to get values to output as a currency?

MorrisB--I am working on calculating change, and investment rates with java. My code gives me the correct values, but does not display them how I'd like. For the first part, when I calculate the dollar amount of someones change, for example if they have forty cents it gives me 0.4, instead of 0.40. Im not...

 
It's either private, or public not creatable @Mat. Either way, you can't directly create a new object from outside the project. You'll need a list factory.
Or Public not creatable global instance.
Yeah. .
Don't click that^.
Wanna see some ugly frakkin' code?
 
Well it's fine; I'll just make pretty much every type have a default instance and a Create method/"constructor"
 
Lol. "Fine. Frak it. I'll just do it this way then."
Seriously though, probably a safe bet.
 
@RubberDuck you know when you asked me how to test if a class implements a given interface?
 
Yeah. TypeOf right?
 
2:54 AM
TypeOf is for script kiddies.
> isTestable = comp.CodeModule.Find("implements ITestable", startline, startcol, endline, endcol, False, False)
^^ like, WTF?
 
Damn. Wow.
 
he's actually scanning the project for ITestable classes...
it spares the registration boilerplate I guess
 
I just glanced at the code and went "nope".
 
> found = comp.CodeModule.Find("Public Sub ", startline, startcol, endline, endcol, False, False)
 
I have the tests down to one line of boiler plate, and I insert the test class templates from a file.
CodeModule.AddFromFile(filePath)
Ughhhh. Noooo. No no no.
 
2:58 AM
    Dim methods As List
    Set methods = List.Create

    methods.Add "TestAreEqual", _
                "TestAreNotEqual", _
                "TestAreSame", _
                "TestAreNotSame", _
                "TestFail", _
                "TestInconclusive", _
                "TestIsFalse", _
                "TestIsNothing", _
                "TestIsNotNothing", _
                "TestIsTrue"

    TestClass.RegisterTestClass Me, methods
    TestClass.RunAllTests
 
0
Q: More efficient way to write the query?

jfalksonThis is sourced from the Stanford Coursera self study DB class SQL quizzes. Students at your hometown high school have decided to organize their social network using databases. So far, they have collected information about sixteen students in four grades, 9-12. Here's the schema: Highschooler (...

 
Same. Damn. I knew I missed something.
 
actually I'm not sure TestClass should be 1) called that, and 2) be used like this, off the default instance.
is it review-ready?
 
3:26 AM
@Jamal ...creeper.
 
You upvoted one of my posts, right? ;P
 
Nope, sorry.
If you saw it, and read all the relevant links, you'd know it, but I dunno how you would track it down in the first place unless you cheated and used mod tools.
 
we as a site feel special to have been blessed with one of your votes, @Pops
k
 
I was thinking about a hint I left in a profile.
 
Or, maybe Pops just gave himself the Supporter badge to confuse everyone.
 
3:37 AM
Not long after I joined the team, I heard another employee with mod powers (I don't remember exactly who anymore) mention a personal rule of thumb: not voting on a site until earning enough rep there to do so without the mod powers. It's not an official rule, but I thought it was a decent idea, at least for main sites.
 
But.... you only have 101 here... ;-)
 
Who says I haven't posted with a sock?
 
your sock
 
Wait, how can this 101-rep user answer a protected question?!?
 
Fair point, well made.
 
3:42 AM
@RubberDuck 9 questions to go!
oh wait, something's wrong. an error-failing test doesn't fail anymore.. deleted the post.
ah, just a minor refactoring glitch. I'll fix it in a minute and then TTGTB
fixed. 'night @all!
> I'd bounty an answer that finds a clean and clever way to avoid this:
> If currentTestFailed Then Exit Sub
 
1
Q: A hacked-up testing framework

Mat's MugInspired by this post, I wanted to be able, in any vba project I could be working on, to create a test class and write test methods. Like this: ThisWorkbook Workbook | class module (client code) Option Explicit Public Sub TestAreEqual() Assert.AreEqual 12, 34, "Values should be equal."...

0
Q: CodeEval C# 4.0 throws exception while the code on local machine does not throw exception, what is going on?

user843681Out of fun, I solved "Nice Angles" challenge on CodeEval in C# 4.0. My code produces correct output on my machine for any input, but on the CodeEval server, it produces an error. I have tried to dig in to this, but so far my conclusion is that there is something wrong on the CodeEval server. The ...

 
 
1 hour later…
5:28 AM
morning @all
 
monking @all
 
5:54 AM
back to work (writing how I see the application on DB level)
 
 
2 hours later…
8:16 AM
posted on September 15, 2014 by HelpNeeder

I was explained that first piece of code should be much slower than the other, but when I try to implementing it, I don't see any improvement. Any idea what went wrong with my code? Should be slower code: for (i = 0; i < 1000; i++) column_sum[i] = 0.0; for (j = 0; j < 1000; j++) column_sum[i] += b[j][i]; Should be much faster code: for (

 
8:43 AM
0
Q: Reduce CPU usage jquery .css()

George02I'm working on a jquery plugin. The problem is that when I use it I can see a high CPU usage in task manager. I think the problem is here . $elementTSMask.on("mousemove", function(event){ if(isMouseDown && isLeftButton){ var toScroll; if(endPosition != 0){ toScroll...

 
 
1 hour later…
9:47 AM
0
Q: Is this use of variables bad python?

JoeSmartI have a script that makes use of datetime in order to name files. Only business days (Mon - Fri) are used. Here is my part of the code that finds the last business day: lastBusDay = datetime.datetime.today() shift = datetime.timedelta(max(1,(lastBusDay.weekday() + 6) % 7 - 3)) lastBusDay = la...

 
10:01 AM
@rolfl Wow, that's quite interesting. Did you run it on the same analyze all the times?
 
0
Q: How can I make this program more efficient and Pythonic

anuragalI wrote this program for a code test on some website. This program do some predefined transformations (transformation can be horizontally, vertically or by shifting to given number of keys) for every char in a file. How can I improve the efficiency of this program. I only intend to change the Pyt...

 
10:19 AM
Hey @Simon, yes
Also, I have profiled it, and almost all the work is done in two methods....
 
FieldRule.simplify() and nCrPerform()
I was curious about the Combinotronics.nCr
It uses double, yet you have a BigInteger verion too.
 
It's mainly uses double because I think that's more efficient
 
the number of calls to nCr is about 40-times the number of calls to nCrPerform
 
Although there is a little loss in accuracy I guess
 
10:23 AM
The question is that double is using floating-point division....
biginteger uses integer division
One of them must be broken
 
So... would you recommend using BigInteger?
 
No, I would recommend asking why you can do integer division....
 
		for (int i = 0; i < r; i++) {
			value = value.multiply(BigInteger.valueOf(n - i)).divide(BigInteger.valueOf(i + 1));
		}
 
The result of nCr is always an integer
 
10:25 AM
OK, so then nCr could use long, instead of double?
 
Sure it could, but that would fail for big calculations.
256 nCr 51 is biiiiiiiiiig
 
Well, double has only 13 or so significant figures.... long has 18
 
But long doesn't go nearly big enough
 
2^56 is where double starts losing information
sorry, 2^48
 
And Long.MAX_VALUE is 2^63 - 1, right?
 
10:28 AM
yes
 
2^63 is 9*10^18.
 
correct.
 
256 nCr 51 is 2*10^54
 
me^lostInMath
 
so, what you are saying is that you don't need nCr to be accurate?
 
10:30 AM
I believe the numbers produced now are accurate enough
 
OK, I am OK with that, then (we are talking probabilities here...).
 
In a typical Minesweeper game, the board starts out as 256 fields, 51 mines. And then you make a few moves, and then you need to calculate the probabilities there. Those calculations involves something like 238 nCr 46 or something like that.
Ultimately, we are talking probabilities, yes. But I want to have some nCr methods that is using BigInteger as well, because on some occasions I want to regenerate a board (i.e. pick a random solution for the mines), and then I think it needs to be more exact.
 
OK, For the solve though, the nCr was surprisingly fast.
 
@rolfl FieldRule.simplify() is a very fast method I believe, I didn't expect that to be so big there. Although it does get called very very often which is probably what did it.
@rolfl yes, I can imagine that. What analyze was it that you gave it to solve?
 
The one from the test --- bastard-3's I think
 
10:35 AM
Ah, that one :)
Your machine is apparently much faster than mine then...
You didn't cheat and gave it to Watson, did you?
 
 
Ah, you got an i7. Mine is only an i5 :/
My experience index is 5.9 though, that's interesting...
And, my code isn't even multi-threaded (yet), I would guess that it would make it even faster.
I don't have as much experience as you when it comes to that though
 
I should update that... (the experience).
 
I don't think that before.splitFieldRules(); needs to be called every time, that only has a real effect the first time.
 
I create the board new each time through the loop
 
10:44 AM
Ah, right.
Of course. Silly me.
 
11:19 AM
0
Q: How can I fix my code?

user3717030First of all I'm still new to c# and still learning how things goes on. My problem is I have so many global variable and I know it was wrong but I don't know how to manage this in c#. This code is about a server client network multithreaded and it's not finish yet. And can I convert this code to ...

 
Greetings, Programs.
 
Greetings, Program
 
11:32 AM
@CaptainObvious looks like a off topic question by looking at the title
 
@chillworld At first look, true. I'm sort of on the fence on this one, in that his intent is within scope, though the question does issues.
He says the code is "not finished" but that's not the same thing as "not working".
 
I'm voting unclear what he's asking
See my comment
 
0
Q: Increase the performance my following code

sereneI have been using entity framework 5 as DataAccess layer for my application. I have a case where there are a set of 'Levels' offered. And I have a set of 'Colleges' offering the 'Levels'. Class Level: public partial class Level { public Level() { } public in...

 
12:01 PM
0
Q: Send Multiple data with AJAX and get it in Node js

user53100I would like to send let's say 2 variables to node js server. I know how to do it with one... But if I want to send two datas, which could be separately read in node and then written into xml file the method I used doesnt work. http.createServer(function (req, res) { if (req.method === "POST") ...

 
Monking @All
Does anyone know if OAuth 2.0 is free?
 
12:17 PM
@CodeX Well, the web site says it's an "open protocol". oauth.net
 
@Donald.McLean Oh, yeah.. Did you get any Scrumpy?
 
monking @all.
Just lurking......
 
monking @RubberDuck
Quack Quack
 
0
Q: Javascript script crashes Google Chrome

InternetSo there is a website that has 2 buttons (id of first is "player1" and the second is "player2"). I also have a textbox where you can enter number. When the button is clicked, it disables itself and it shows up again after some random time. I want to enter number in textbox and click on a button,...

 
@CodeX Well, from my research, there's Scrumpy, there's scrumpy, and there's Scrumpy. Two of them are not (so far as I have been able to find) available here, and the other is hard to judge. Efforts continue. I do have hard cider in the fridge though.
 
12:23 PM
 
@CodeX Yes, I already read it.
 
@Donald.McLean Ok, down in Devon UK you can get some Cider that's so cloudy and strong it makes you feel like you hit a wall at 100mph..
 
This is one I would like to try, if I can get it: organicscrumpy.com
 
@Donald.McLean I highly recommend Aspall Cider
As kids we used to drink Merrydown Dry
 
12:36 PM
 
LOL
If anyone can help..
http://stackoverflow.com/questions/25848567/pdo-update-1-column-multiple-rows-with-array
 
1:03 PM
I thought Java had type erasure at runtime... then what is this?
ParameterizedType genericType = (ParameterizedType) field.getGenericType();
Class componentType = (Class) genericType.getActualTypeArguments()[0];
Or is there no type erasure for fields, only for local variables?
 
@CodeX Importing cider across The Pond seems kind of silly.
 
@Donald.McLean Yep, cost wise anyway but Aspall Organic is an amazing cider
 
@200_success thanks for taking a look at that
 
Monking
@SimonAndréForsberg Black magic
 
@skiwi I suppose it is...
 
1:15 PM
LOL
4
5
A: What's a Zombie? And what are the many other memes of Code Review?

PhrancisMeme: hello / hi / hey there Originator: Bored Code Reviewers Cultural height: The 2nd Monitor Background: Core Reviewers like to greet each other in chat, and most of the time it's just a casual "Hello" then "Hi @someone". But on days of high activity, some unusual things can happen... Or....

 
@Donald.McLean your right, but they do really have to pay attention with the titles
 
1:33 PM
Thank you Santa(s) for [badge:beginner] [badge:necromancer] and [badge:nice question] and all the votes over the weekend that I didn't have internet!
it was hard but I survived I got lots of firewood, going to get more this week hopefully
 
monking!
 
Monking!
wearing my Superuser Hoody today!
drinking coffee from my StackOverflow mug!
good Monday!
 
I hope I get my box today :/
 
Still no swag @Mug?
 
nope
 
1:40 PM
lamesauce.
I looked at your question. I'll try to get to a review sometime today. We'll see. I haven't quite digested all of it yet.
I'm not a fan of the boiler plate though.
 
I have a mod hat, but that's all the swag I've gotten.
 
@RubberDuck an alternative could be a [TestMethod] attribute (yeah right), and some VBE/parsing to register all test methods in a class...
 
0
Q: Array-like container for uints shorter than 8 bits

ChristophFirst of all: yes, I need this kind of array to generate data for a piece of hardware, and it must be stored and manipulated somewhere. The general consensus regarding bit manipulation seems to be "if you need to do that, there's something wrong". The array-like container (PackedBitfieldArray) I...

 
@Mat'sMug it's worth the wait.
 
Monking!
 
1:46 PM
yeah, 4-6 weeks months
2
 
I got a leather notepad holder thing with a cool pen, nalgene bottle(superuser), hoody(superuser), T-shirt, the mug, and some stickers (I don't know where to put them).
 
last time I put the stickers on my laptop
don't know where I'm going to stick those
 
I started trying to download NuGet at work on 2010 and I think it is hung up
 
you're still on VS2010??
it's worth the wait ;)
 
I have 2013. but some of the projects I am working on, run better in 2010, scared to push them into 2013
 
1:49 PM
you shouldn't be - it makes a backup anyway
 
well I want to get that NLog you keep telling me about
@Mat'sMug you should one project that I took from 2005 i think....ugh. I have backups and copies of that thing all over the place..... it got ugly. but I finally got it into 2010 and it works....not touching it again until I have to
 
I deployed a little WPF app over here, whenever any user breaks it and the app throws an exception, I get an email with the full stack trace before the user even okays the error dialog.
 
@Mat'sMug Very nice!
I like that
 
@Mat'sMug Wow... Don't you make sure the user is okay with it?!
 
1:52 PM
good morning
 
Welcome @Christoph
@Mat'sMug how long should I have to wait?
 
well I don't get these emails very often. Only when refuses to connect, and I'm migrating to this week, so problem gone.
@Malachi 6-8 weeks
 
lol
I meant for the install of NuGet into VS2010
 
@Malachi lol!
 
it should have installed by now.. do you have a solution opened in VS?
 
1:54 PM
@Mat'sMug 3 of them
 
oh god
 
maybe I do it at the end of today
when I can close these solutions.
2 are the same project, website and windows service that feeds data to the SQL Table
 
..solution > project...
 
there was something hidden behind windows I needed to click before the install would actually start.
 
maybe it's waiting for you to okay a dialog that's behind something else?
 
1:57 PM
clicked it and it was instant.....
 
so done?
 
@Mat'sMug Well, that's A option, but not one I like.
 
I usually install plugins/add-ons without a solution opened in VS though
 
having asked a question and then coming here is a bit like waiting at the doctor's. Sit around, watch other people doing - whatever, not knowing what will happen and when.
6
 
@Christoph lol
 
1:58 PM
@Christoph I'd give you an answer but honestly, I'm...probably too drunk
2
 
oh crap, was going to give you an upvote, but :(
 
@Mat'sMug I need to do a couple of things before I can play with the project I need that in...
BTW.Work
 
@Yuushi shall I hold your hair? Is that even common in the culture you're drunk in right now?
 
@Christoph Uh...not as far as I know?
 
@Yuushi nvm then, have fun!
 
2:02 PM
@Christoph Why only std::forward_iterator_tag?
 
Australians have crazy hair, just ask Michael Hooper..... but, they don't throw up when drunk, they just tell crude jokes and then pass out (and how's that for many massive broad generalizations).
2
 
@rolfl ...Pretty accurate?
 
sounds legit
@Yuushi forward_iterator_tag just because I thought that I wouldn't need more. The use case is that I have an array of objects that can be converted to "uint4_t", and the desstination array of "uint4_t"s. For std::copy I just need a forward iterator
 
@Christoph Fair enough, although as far as I can see, there's nothing really preventing you from making it a random access iterator
also, you should have an operator++(int)
 
@Yuushi what would be the advantages of a random access iterator? Simpler code for the array::operator[]()?
 
2:08 PM
@Christoph constant time operator+= and operator-= (or std::distance which is probably what you should use)
basically, if anyone calls std::distance between any two of your iterators, it'll take O(n) time
 
constant time op+= and`op-=` would be much quicker if someone uses the iterator for something I didn't have in mind, right?
 
well, potentially
 
BREAKING NEWS: Microsoft is buying Minecraft.
(or perhaps you heard about it already, I just heard it now)
 
a lot of the standard algorithms use std::distance so they can work with a wider category of iterators
 
Getting back to the waiting room analogy: You also don't know who's your doctor. In my case it seems to be the guys who said "I'm...probably too drunk". This is great for a monday!
3
 
2:12 PM
heh, probably because none of the other regular C++ reviewers are around at the moment
I'm sure Loki will have something to say
 
Jamal is probably busy with his JAVA class
 
@Yuushi so to speed that up I should probably store an index rather than a data* and an offset?
 
in Game Development, Sep 10 at 12:23, by Jon
so what about this Microsoft buying Mojang?
 
@Mat'sMug going to ask you later about using that NLog, I have it installed in that project but I have to to some other things, might not be until tomorrow... but I am going to bug you about it and how to use it in my application and website.
 
@rolfl Now it's confirmed though that it actually happens.
 
2:14 PM
@rolfl CRAZY!
 
@Christoph Storing data and an offset should be sufficient, since you know the number of bits to increment
 
@SimonAndréForsberg Ahh, so you had heard the rumours, but now you have also heard the confirmation
I always knew MS was a company full of blockheads
5
 
so operator+=(std::size_t n) would be something like data + (bits * n)
 
@rolfl actually, no... I didn't even hear the rumors...
 
@Malachi you just add the configurations in the app.config xml, and then in your code you get a logger with LogManager.GetLogger() - I can show you how I've set up my mail logger if you want - make a chatroom and invite me, I'll get you started.
 
2:16 PM
Buying Mojang doesn't even make any sense...
 
@Mat'sMug I won't be able to do it right now, I have some testing that needs to be done right away for an update to the Case Management System
 
there's also NLog support for Ninject, through Ninject.Extensions.Logging.NLog
 
@Yuushi Their XBox division makes huge losses.
 
I don't know anything about Dependency Injection yet. one of the things on my list to research and learn
 
@rolfl I know. But how will buying Mojang make any difference there?
 
2:18 PM
@Yuushi it's not that simple actually because the (bits*n) might cross a boundary, and I'd need at least one statement to check that. comparing indices is faster, and here's the trade off: more space (data*, index* and offset) plus added redundancy, or remove one member and have more calculations to do
 
@Malachi just read Mark Seemann's book (Dependency Injection in .NET) - it's very, very well explained, with nice culinary analogies.
2
 
@Mat'sMug sounds yummy
 
Culinary analogies... interesting :)
 
@rolfl My brother's response when I told him what you said: "HahAHhAhahAHAHAHa"
2
 
@Christoph Sure it might cross a boundary, but the boundary is divisible by the number of bits (thanks to the static_assert)
so I don't really see the issue there
 
2:25 PM
@Yuushi I'm just thinking about speed issues, but I guess I'll have to run it on the target hardware to find out if I'm running into problems with this (or some of the possible random access iterator variants)
 
@RubberDuck the more I look at my code, the more issues I find
 
@Mat'sMug stop looking at it no problems....JK
2
 
like, if the test method doesn't call any Assert methods, it looks like nothing's going to be reported - damn... and the error-handling in TestClass.RunTest is a relic from the AssertError-based approach (which failed for the reasons explained in the blog I've linked to)... I shouldn't have gone to sleep last night.
I had even left a sentence unfinished in my post...
 
@Mat'sMug LOL. I noticed that.
I think what we're both missing is the concept of a TestMethod that gets registered in UnitTest and passed to Assert.
I kind of have that concept now, but it deserves to be it's own class.
 
the thing is that I like the way I have my API right now - I don't want to change it.. the client code just calls Assert methods and it just works, love it.
 
2:32 PM
Public Sub TwoNonEquatableObjectsAreEqual()
    test.Assert.Name = "TwoNonEquatableObjectsAreEqual"
 
but yeah, requires manual registration
@RubberDuck like, that's pretty intrusive isn't it?
 
This is how I'm registering them now, but the benefit is I can write a tool to create new TestMethods.
Not really, and it's a lot easier to spot if you forget to register it.
Public Sub TwoNonEquatableObjectsAreEqual()
    test.Assert.Name = "TwoNonEquatableObjectsAreEqual"

    Dim a As New MockNotEquatable
    Dim b As New MockNotEquatable
    Set b = a

    test.Assert.AreEqual a, b
End Sub
 
what happens if you don't assign Name?
 
Assert.Name should be Assert.TestMethod though. Or something.
I get something like this
TestAssertEquals. : Pass
Instead of TestAssertEquals.TwoNonEquatableObjectsAreEqual : Pass
No harm, no foul. The results just don't make a ton of sense.
Where as it's easy to miss registering a method when they're all registered in one big method you have to write by hand.
 
I think tests should fail by default.. or be inconclusive
 
2:44 PM
I agree, but that does you no good whatsoever if you forget to register it, and it never runs at all.
I could be mistaken, but that seems to be exactly what would happen in your version.
 
if you forget to register it, it... doesn't run at all ;)
 
Exactly. What good does that do you?
End user has no clue they did something wrong, because nothing looks wrong.
 
well they get no output whatsoever for that test
the test library doesn't know that method exists
 
Easy to miss if you have more than 3 or 4 testmethods in a test class.
idk. Just my opinion.
 
I think I'll resort to VBE "reflection" then
auto-register all methods in the specified class, that start with "Test"
basically I want the client's test code to be just that: the client's test method. no boilerplate, just a one-liner somewhere at the class level to say "here, this class instance, it's a test class. register all TestXxxxxx methods in it."
 
2:54 PM
I just got this notice from our IT department on fixing slow/timing out websites:
> Resolution: Fixed

We added memory to the VM, but it did not fix it. The fix was to create a couple of indexes for the SQL table storing the data
 
^^ damn right
 
@Phrancis Uhhhhhh, you think? I'm so sorry cuz.
 
why can't we use the same highlighting that wiki uses for our VBScript questions????
 
non-edit where
 
2:59 PM
@Mat'sMug That awful ancient language I use, I hacked it to give me green comments and blue keywords.....
 
Um... your edit to my answer made no change
You edited it once, then re-edited it?
 
return a > 0 && b > 0 && c > 0  && (a + b) < c && (a + c) < b && (b + c) < a;
 
@RubberDuck
 
00:00 - 15:0015:00 - 00:00

« first day (499 days earlier)      last day (3521 days later) »