|
Wheany posted:commented out code (checked in version control), I can't loving stand this when I see it.
|
# ? Jun 7, 2011 18:41 |
|
|
# ? Jun 7, 2024 07:09 |
|
Ugg boots posted:I can't loving stand this when I see it. Which part bugs you the most? For me it's the unexplained lines of code cluttering up the project when you already have a revision control system in place. The rare times I do it I put a date stamp and a one line explanation of why at least.
|
# ? Jun 7, 2011 19:15 |
|
I love this /* [... commented out code ...] someVariable = someObscureFunction(); [... commented out code ...] */ When grepping trying to find references to someVariable or someObscureFunction.
|
# ? Jun 7, 2011 19:34 |
|
Received a library from a 3rd party today with a 'sample' program included called UniteTest_LIBRARYNAME.CPP... Open it up and it's barely an integration test. The entire thing is one pass through a transaction, create transaction, run transaction, cleanup transaction. There's no edge cases. There's no error cases, hell there's only the single 'correct' case. I've never gone so quickly from elation to depression. (Oh hey, Unit Testing! That's... not Unit Testing...)
|
# ? Jun 7, 2011 20:32 |
|
Hughlander posted:Received a library from a 3rd party today with a 'sample' program included called UniteTest_LIBRARYNAME.CPP...
|
# ? Jun 7, 2011 20:45 |
|
Scaramouche posted:Which part bugs you the most? For me it's the unexplained lines of code cluttering up the project when you already have a revision control system in place. The rare times I do it I put a date stamp and a one line explanation of why at least. I really enjoy deleting these blocks. My favorite is when the file is 90% commented out code from a year ago that isn't relevant to anything at all in the current version. Brecht posted:While I agree with you that what you described totally sucks, testing one code path exclusively is precisely a unit test. And integration tests are the next level "above" unit tests, not below. So I guess the point of this post is I'm confused by your terminology. The thing he's describing is an integration test - an end-to-end integration test specifically. And at best a BVT. All that test does is say "Yup, you didn't break the universe". It doesn't tell you what "unit" broke, just that "it's broken". Unit tests don't test one "code path", they test one "unit of code", which is usually a single method (or object), and generally test that unit multiple ways, hitting all the possible edge cases. Failing (well-designed) unit tests usually give you a lot of detail on what exactly broke. Dessert Rose fucked around with this message at 20:53 on Jun 7, 2011 |
# ? Jun 7, 2011 20:49 |
|
Ryouga Inverse posted:The thing he's describing is an integration test - an end-to-end integration test specifically. And at best a BVT. All that test does is say "Yup, you didn't break the universe". It doesn't tell you what "unit" broke, just that "it's broken".
|
# ? Jun 7, 2011 20:59 |
|
Brecht posted:While I agree with you that what you described totally sucks, testing one code path exclusively is precisely a unit test. And integration tests are the next level "above" unit tests, not below. So I guess the point of this post is I'm confused by your terminology. My terminology probably sucked. All they did was call 3 functions in their API with a single argument list and called it a unit test. It was something like: code:
This was the tests to a library of thousands of lines of code, tested in a module of under 100 lines. When I write unit tests, it tends to be about 30% more lines of code then what's being tested.
|
# ? Jun 7, 2011 21:38 |
|
Scaramouche posted:Which part bugs you the most? For me it's the unexplained lines of code cluttering up the project when you already have a revision control system in place. The rare times I do it I put a date stamp and a one line explanation of why at least. No, this is fine, and I do it when it is like this: code:
|
# ? Jun 8, 2011 20:09 |
|
Ugg boots posted:But seeing 100 lines of code wrapped with #if 0 that was written 5+ years ago and is still in the code makes me furious. If it's like "hey we might need this later" then it should be deleted, but if it's only genuinely temporarily commented out pending further changes/investigation, then that's fine. We use SVN where I work. Depending on your team, it's actually mandated that you comment out code you wish to remove instead of just removing it. You will be called out in code review for not doing so.
|
# ? Jun 8, 2011 21:11 |
|
BP posted:We use SVN where I work. Depending on your team, it's actually mandated that you comment out code you wish to remove instead of just removing it. You will be called out in code review for not doing so. Wh... why? Does the entire team work off the same checkout?
|
# ? Jun 8, 2011 21:19 |
|
BP posted:We use SVN where I work. Depending on your team, it's actually mandated that you comment out code you wish to remove instead of just removing it. You will be called out in code review for not doing so. That's horrible. We actually will call people out in code reviews for leaving in chunks of commented out code. I very proudly removed several thousand lines of commented out code when I was recently making some tweaks to an older application. The culprit for all of those commented out lines? Me. I felt a great weight lift off my shoulders. The thing I wish more than anything else in the world is that people would be more verbose in their check-in comments. I hate it when I get a user saying "hey, process A used to do X, Y, and Z. But I just noticed it stopped doing them at some point." I check source control, and sure enough, a 2 year old checkin from a guy who left long ago. The comment on the checkin says: "Changed process to not do X, Y, Z" No explanation for why the change was made, so the best I can say to the user is "Yep, you're right, it did used to do that stuff. Timmy removed it on 3/28/2009. I have no clue why. Sorry." New Yorp New Yorp fucked around with this message at 00:35 on Jun 9, 2011 |
# ? Jun 9, 2011 00:33 |
|
Ugg boots posted:No, this is fine, and I do it when it is like this: At the job I just quit, I left blocks like this in commits: code:
|
# ? Jun 9, 2011 02:57 |
|
Lumpy posted:At the job I just quit, I left blocks like this in commits: I'm sorry to say I've worked projects where I'd see a comment like that and nod understandingly. And then I'd tell marketing that their request would take four days, blame half of it on you, and use the other two days to look for a new job. And those assholes wonder why their "enterprise solution" is falling behind the curve.
|
# ? Jun 9, 2011 03:11 |
|
DaTroof posted:Wh... why? Does the entire team work off the same checkout? Around here (which I fear may actually be the same place) people generally do things like that out of many years of habit from the days before SVN usage, or because they don't understand that it was only done that way in the past because there was no SVN, or becuase they don't understand how to use SVN so don't really feel they can get it back.
|
# ? Jun 9, 2011 04:46 |
|
one of the developers at my jorb used to insist on doing seperate commits on every single file he modified
|
# ? Jun 9, 2011 06:15 |
|
MOOMIN.EXE posted:one of the developers at my jorb used to insist on doing seperate commits on every single file he modified
|
# ? Jun 9, 2011 06:25 |
|
MOOMIN.EXE posted:one of the developers at my jorb used to insist on doing seperate commits on every single file he modified Right when we introduced SVN here, one guy took it to mean it was replacing his FTP client. Every time he wanted to see his changes run (this is PHP), he would commit from his local machine and update on the server. This went on for a couple weeks before I noticed. Also, I have lots of SVN ignore rules like '*.001' or '*.bak' to keep people used to the old way that we used to do 'version control' from adding the copies of modified files they still inexplicably make from adding them to the repository.
|
# ? Jun 9, 2011 14:47 |
|
Munkeymon posted:Right when we introduced SVN here, one guy took it to mean it was replacing his FTP client. Every time he wanted to see his changes run (this is PHP), he would commit from his local machine and update on the server. This went on for a couple weeks before I noticed. They probably just have a script of: svn update | grep -v ^? | cut -f 2 | xargs svn add svn commit -m 'Committing' that they run everytime they change something.
|
# ? Jun 9, 2011 14:49 |
|
Hughlander posted:They probably just have a script of: Wishful thinking. They all run Windows and I was the only one who had ever heard of CygWin when I got here. People around here are so used to obtuse, convoluted manual processes that he probably didn't think anything of using Tortoise's commit workflow every time he wanted to upload his changes. Munkeymon fucked around with this message at 15:49 on Jun 9, 2011 |
# ? Jun 9, 2011 14:53 |
|
I'm always getting asked in emails why I made a change to a certain file in SVN. I think I'm the only one who uses comments.
|
# ? Jun 9, 2011 17:27 |
|
sund posted:I'm always getting asked in emails why I made a change to a certain file in SVN. I think I'm the only one who uses comments. When I had that problem I just replied back with $ svn log FILENAME <pasted output of log>
|
# ? Jun 9, 2011 20:10 |
|
MOOMIN.EXE posted:one of the developers at my jorb used to insist on doing seperate commits on every single file he modified My last SVN commit was number 524193.
|
# ? Jun 10, 2011 01:22 |
|
1337JiveTurkey posted:My last SVN commit was number 524193. My last changelist number committed was 685093
|
# ? Jun 10, 2011 01:33 |
|
I did a query on the repository, next ID will be 31304. We're efficient yo
|
# ? Jun 10, 2011 01:48 |
|
Ugg boots posted:My last changelist number committed was 685093
|
# ? Jun 10, 2011 04:25 |
|
Janin posted:21759446 Holy poo poo
|
# ? Jun 10, 2011 16:54 |
|
Janin posted:21759446
|
# ? Jun 10, 2011 17:24 |
|
Janin posted:21759446 No loving way. Pics or it didn't happen.
|
# ? Jun 10, 2011 18:50 |
|
Janin posted:21759446
|
# ? Jun 10, 2011 19:49 |
|
Standish posted:that's 5,400 commits every single day since subversion was released back in 2000, what are you doing? All I can imagine is some app backed by a flat file database. Eventually they need to scale, enterprise style. Rather than spend 10 minutes rewriting the app to use SQL, they write to the file and check it into SVN. Every time the app goes to read the file it calls svn update first, and every time it writes it will commit those changes. The Überhorror.
|
# ? Jun 10, 2011 20:07 |
|
Did somebody write a script that commits literally every time they hit the space bar? Jesus.
|
# ? Jun 10, 2011 20:10 |
|
Janin posted:21759446 I just hit 5000 today!
|
# ? Jun 10, 2011 20:12 |
|
Came across this yesterday. Is using LINQ to parse XML a horror?code:
|
# ? Jun 10, 2011 21:43 |
|
That's exactly what LINQ-2-XML is for, so no. t.Details = taskInfo.Where(x => i.Name == "details").First().InnerText; is shorter though.
|
# ? Jun 10, 2011 21:50 |
|
Neat, never seen LINQ used for XML before
|
# ? Jun 10, 2011 21:56 |
|
PrBacterio posted:Yeah I've always assumed that working at ginormous projects for humungeous corporations like that must suck. Makes me glad to be working for a small embedded tech startup, my last commit was #209 Standish posted:that's 5,400 commits every single day since subversion was released back in 2000, what are you doing?
|
# ? Jun 10, 2011 22:00 |
|
Janin posted:Well it's not like I'm by myself; plus, we use Perforce, not subversion. I think the current change rate is 20 commits per minute. Google?
|
# ? Jun 10, 2011 23:10 |
|
DIW posted:Neat, never seen LINQ used for XML before Every time I see LINQ to XML, it makes me want to go back and rewrite a specific XML-parsing application we have. It uses DataTables. It's horrible. I just put the whole thing under test, too... maybe it's time to do some stealth refactoring.
|
# ? Jun 10, 2011 23:54 |
|
|
# ? Jun 7, 2024 07:09 |
|
SavageMessiah posted:Google?
|
# ? Jun 11, 2011 00:49 |