|
baka kaba posted:Cheers, I posted that in completely the wrong thread so uh thanks for the genuine reply! I've just been trying to get into the 'don't have tests relying on other tests' mentality, and this feels like it completely violates that idea. The thing is, having a test that calls multiple methods isn't a test that relies on other tests. It's actually difficult to have a test that only calls one method, unless you're asserting that an exception is thrown or not thrown. Also, this probably IS the better thread to post your question in, rather than the java thread.
|
# ? Jul 14, 2014 22:06 |
|
|
# ? Jun 1, 2024 15:28 |
|
baka kaba posted:Cheers, I posted that in completely the wrong thread so uh thanks for the genuine reply! I've just been trying to get into the 'don't have tests relying on other tests' mentality, and this feels like it completely violates that idea. It seems mostly harmless when your methods are simple, but when they're not (or if they get more complex later) it could introduce problems where the cause isn't immediately obvious. That's what I'm worried about really. But yeah, wrong thread! Yeah, it seems like something that's tripping you up is that "don't have tests that rely on other tests" in no way means "if one thing in the program is broken than only one test should fail." It's perfectly normal to have multiple tests fail when one piece of functionality is incorrect, since of course modules are going to depend on other modules in order to do their work properly. If storing a value is broken, then not only will the storing and retrieving test fail, but tests involving other modules that expect the value to be stored properly can also fail since they aren't getting values they expect.
|
# ? Jul 14, 2014 22:23 |
|
Subjunctive posted:I think *most* ordering you encounter in communication is unlabeled, because sequence of reading or hearing carries the ordering information. "Today we're going to 1) finish the code review, then 2) have lunch, then 3) write a witty post on SA" wouldn't be totally awkward, but is uncommon. You need a 32bit compiler, version of qt and debugger available to create a 32bit kit.
|
# ? Jul 14, 2014 22:24 |
|
hobbesmaster posted:You need a 32bit compiler, version of qt and debugger available to create a 32bit kit. Yeah, I have those things (msvc and msvc_64 or whatever directories, VC Studio can produce both outputs and I have both cdb flavours installed) but it for whatever reason refused to show up in the selection list. I think I should probably start over, because it's clear I don't know what state I'm in at this point.
|
# ? Jul 14, 2014 22:26 |
|
Subjunctive posted:I think I should probably start over, because it's clear I don't know what state I'm in at this point. Better yet, start over in C#.
|
# ? Jul 14, 2014 22:28 |
|
Volmarias posted:Also, this probably IS the better thread to post your question in, rather than the java thread. Yeah I see what you guys are saying - obviously I already have tests that involve multiple methods, even where I'm only explicitly calling one, so there's probably no actual difference here. I guess it's the extra layer of abstraction when setting up the test or asserting the results that's making me (unreasonably) suspicious about all this. A lurking horror, if you will
|
# ? Jul 14, 2014 22:28 |
|
JawnV6 posted:Better yet, start over in C#. I really don't want to go down the rewrite hole, especially since it's under active development and I don't want to keep maintaining a fork, buuuuuuuuuut. Don't encourage me, jerk.
|
# ? Jul 14, 2014 23:19 |
|
Subjunctive posted:Yeah, I have those things (msvc and msvc_64 or whatever directories, VC Studio can produce both outputs and I have both cdb flavours installed) but it for whatever reason refused to show up in the selection list. Yes but do you have separate qt version entries for 32bit and 64bit? And do you have the 32bit and 64bit kits showing up?
|
# ? Jul 14, 2014 23:27 |
|
hobbesmaster posted:Yes but do you have separate qt version entries for 32bit and 64bit? And do you have the 32bit and 64bit kits showing up? The 32-bit kit wasn't showing up, no, though I selected it in the installer and it was in the directory and the components.xml or whatever. I'm sure I screwed something else up during the install, I'll try again later in this week when I have some spare time.
|
# ? Jul 15, 2014 00:08 |
|
Subjunctive posted:I thought it was choking on the "slots: " pieces in the C++ files, but as has become eminently clear I may in fact be the Qt PEBKAC hazard. Tool ergonomics are still lovely, though. I've found that this can happen if you forget to include the Q_OBJECT() macro in your class header. Also your class must inherit from QObject if you want to use signals and slots.
|
# ? Jul 15, 2014 09:36 |
|
Subjunctive posted:The 32-bit kit wasn't showing up, no, though I selected it in the installer and it was in the directory and the components.xml or whatever. I always found it easier to compile it yourself. You need to have perl, ruby and python (2 only?) for qt5. Theres also a tool called jom that is basically a thin wrapper around nmake that adds support for multiple threads. You can download jom here: http://qt-project.org/wiki/jom I'll quote from my local instructions, you'll only have to do this for 32bit if you already have 64bit working: quote:copy jom.exe into the qt folder You'll almost certainly have different versions of everything or want to use different paths, feel free. You can set your prefix to whatever folder you want, however paths will be screwed up if you move it from there afterwards so do it right the first time. After this completes (should be less than an hour on a modernish computer) go into Qt creator, options, build and run, then Qt Versions. Manually add the path to qmake (C:\Qt\Qt5.2.1\5.2.1\msvc2013_32_opengl\bin\qmake.exe for my example). Go back to kits and add a kit using that version of Qt and the appropriate version of msvc. You should be good to create new build configurations with the new kits.
|
# ? Jul 15, 2014 15:02 |
|
I reinstalled everything with only 32-bit stuff, and it seems to be working. I'll keep that stuff in mind for a grim future in which I need it, though. Thanks!
|
# ? Jul 15, 2014 15:57 |
|
Just found this in a very simple DB retrieval methodJava code:
|
# ? Jul 15, 2014 16:34 |
|
That's a pretty concise way to create a mutable copy of a list with duplicate items removed. Which doesn't make sense in the context of DB retrieval
|
# ? Jul 15, 2014 16:42 |
|
fritz posted:He pushed the same broken branch and now it's broken again in exactly the same way, and I'm not gonna fix it this time. Sounds to me an awful lot like your CI system is broken and maybe you should fix that.
|
# ? Jul 15, 2014 17:18 |
|
Steve French posted:Sounds to me an awful lot like your CI system is broken and maybe you should fix that. It's jenkins, and it does a build on all commits pushed to a remote server that it tracks, the problem was that there was a build artifact that he removed from the index, but did not clean it up after the build, so: * the bad branch would run * it would leave the artifact around * also the other changes in that commit meant the artifact was different than it used to be * the next commit comes in, jenkins tries to 'git checkout' * git won't overwrite the untracked file with the tracked one * build fails * repeat I guess the horror could be that it doesn't scrub the directories clean before starting, but I don't think I have control of that part of the jenkins process. I'm open for better practices here if y'all have suggestions.
|
# ? Jul 15, 2014 18:07 |
|
Not building from a clean environment each time does in fact mean that your CI setup is broken.
|
# ? Jul 15, 2014 18:13 |
|
Plorkyeran posted:Not building from a clean environment each time does in fact mean that your CI setup is broken. Uh, yeah this. If you're not cleaning the environment every time you're going to get everything from checkout failures to the compiler loving up and not recompiling files it previously compiled. Nuke everything all the time always.
|
# ? Jul 15, 2014 18:31 |
|
If you want to avoid rebuilding things that haven't changed between revisions, then ccache is a better solution than keeping artifacts around in the source tree. If you aren't always cleaning your source tree between builds, you have no proof that you can build from source.
|
# ? Jul 15, 2014 18:45 |
|
Plorkyeran posted:Not building from a clean environment each time does in fact mean that your CI setup is broken. I've encountered the exception to this: Continuous delivery builds with terrible structure leading to gigs of uncompiled content living alongside the application code. The solution to that is, of course, to split the content from the code and have a separate, incremental deployment process for the content. Binary deployment doesn't touch content, content deployment doesn't touch binary.
|
# ? Jul 15, 2014 18:48 |
|
fritz posted:I guess the horror could be that it doesn't scrub the directories clean before starting, but I don't think I have control of that part of the jenkins process. https://wiki.jenkins-ci.org/display/JENKINS/Workspace+Cleanup+Plugin ?
|
# ? Jul 15, 2014 18:51 |
|
ultramiraculous posted:Uh, yeah this. If you're not cleaning the environment every time you're going to get everything from checkout failures to the compiler loving up and not recompiling files it previously compiled. Nuke everything all the time always.
|
# ? Jul 15, 2014 18:51 |
|
Doctor w-rw-rw- posted:Or if you're working with git, and your checkout is too large to quickly re-checkout, then use git clean -f. This is the *simple* solution, but perhaps a better one would be to fetch commits into a bare repo, and always check out from that repo into a new working directory. The repo can be updated without much incident with new commits, and doesn't have to be re-cloned, but the folders where your project under test will live should definitely get nuked on each run. Yep, we have an aggressive script at work that keeps evolving as we find newer and better ways to gently caress things up. It does something like: code:
|
# ? Jul 15, 2014 18:57 |
|
The fact that you needed to write that script is a coding horror. I've ran into similar issues with Git in the past. Seems like SVN is worse though.
|
# ? Jul 15, 2014 18:59 |
|
revmoo posted:The fact that you needed to write that script is a coding horror. I've ran into similar issues with Git in the past. Seems like SVN is worse though. The "emulate clean checkout" option from the SVN plugin seems to work fine? I can't comment on jenkins+git.
|
# ? Jul 15, 2014 19:03 |
|
Ithaqua posted:I've encountered the exception to this:
|
# ? Jul 15, 2014 19:17 |
|
I guess I've been hoisted by my own petard here. Thanks for posts and info yall.
|
# ? Jul 15, 2014 19:22 |
|
Does pulling into a local repo and then cloning in a new directory from there not make things clean enough? Do you have artifacts in the repository that make it infeasible?
|
# ? Jul 15, 2014 19:27 |
|
I found this gem in some Java code that was submitting infinite requests to a BPEL queue a while back:code:
I also found some Java code that had a break statement in a finally block. This one really seemed dangerous and capable of causing all kinds of weirdness with execution flow. I decided to write a little method to test this out: code:
|
# ? Jul 15, 2014 22:53 |
|
dealmaster posted:I also found some Java code that had a break statement in a finally block. This one really seemed dangerous and capable of causing all kinds of weirdness with execution flow. I decided to write a little method to test this out: Trepanation sounds like a good solution for all parties.
|
# ? Jul 15, 2014 23:02 |
|
dealmaster posted:I found this gem in some Java code that was submitting infinite requests to a BPEL queue a while back: i = i++ is undefined behaviour in C, so Java could have inherited that feature.
|
# ? Jul 15, 2014 23:27 |
|
Edison was a dick posted:i = i++ is undefined behaviour in C, so Java could have inherited that feature. It didn't. I poked around a little after seeing that since sequence points come up in our interviews, and Java doesn't leave any ambiguity in these cases.
|
# ? Jul 15, 2014 23:45 |
|
Hughlander posted:Yep, we have an aggressive script at work that keeps evolving as we find newer and better ways to gently caress things up. It does something like: This is why you just use a VM and start from the same image each time. Have one jenkins job that builds the image with all the build dependencies, and another that just spawns the VM from the image and checks your repo into a bare directory. Run the second one on every build, run the first one if you have to add new build dependencies. Copy your binaries off and trash the VM afterward. That way you can give the image to the devs and mandate that their poo poo builds on the current image before they submit it for review. It also makes it pretty easy to parallelize your builds. Jenkins is a creaky piece of poo poo, so it will take way too long to set this up, but it's totally worth it.
|
# ? Jul 16, 2014 00:17 |
|
Someone just handed me a ~7000 line javascript thing to look at and make major changes to by tomorrow at the latest. Every variable and method has a two or three character random name. For example something I might call getElementId is called sn. I'm legitimately thinking of just pretending this conversation never happened and/or just killing myself so I don't have to deal with this.
|
# ? Jul 16, 2014 00:22 |
|
EAT THE EGGS RICOLA posted:Someone just handed me a ~7000 line javascript thing to look at and make major changes to by tomorrow at the latest. Every variable and method has a two or three character random name. For example something I might call getElementId is called sn. Did they give you a minimized version? That's actionable in civil court in many jurisdictions.
|
# ? Jul 16, 2014 02:32 |
|
Subjunctive posted:Did they give you a minimized version? That's actionable in civil court in many jurisdictions. No, this is how this was written in the first place.
|
# ? Jul 16, 2014 02:36 |
|
EAT THE EGGS RICOLA posted:No, this is how this was written in the first place. Do what you must. No jury in the land would convict.
|
# ? Jul 16, 2014 02:48 |
|
I found a line in some academic C code just now that has 5 "="s, two arithmetic operators, and a [].
|
# ? Jul 16, 2014 02:52 |
|
fritz posted:I found a line in some academic C code just now that has 5 "="s, two arithmetic operators, and a [partridge in a pear tree].
|
# ? Jul 16, 2014 04:07 |
|
|
# ? Jun 1, 2024 15:28 |
|
fritz posted:I found a line in some academic C code just now that has 5 "="s, two arithmetic operators, and a []. Please, share!
|
# ? Jul 16, 2014 08:54 |