Thursday, 2010-03-11

*** harrykar has quit IRC00:16
*** nb has quit IRC00:52
*** nb has joined #cc00:57
*** nb has quit IRC00:57
*** nb has joined #cc01:00
*** JoiIto has left #cc01:12
*** JED3 has quit IRC01:24
*** mralex has quit IRC01:24
*** luisv has quit IRC01:41
*** JED3 has joined #cc01:43
*** nathany has quit IRC01:44
*** pyrak has quit IRC01:54
*** jgay has quit IRC02:13
*** JoiIto has joined #cc03:40
*** JED3 has quit IRC03:49
*** pyrak has joined #cc03:53
*** oshani has quit IRC03:58
*** oshani has joined #cc04:05
*** wormsxulla has quit IRC04:15
*** wormsxulla has joined #cc04:34
*** luisv has joined #cc04:40
*** luisv has quit IRC04:56
*** luisv has joined #cc05:00
*** oshani has quit IRC05:03
*** luisv has quit IRC05:09
*** nkinkade has quit IRC05:16
*** Kaetemi has quit IRC05:28
*** Kaetemi has joined #cc05:30
*** pyrak has quit IRC06:16
*** Kaetemi has quit IRC07:02
*** sama has joined #cc07:33
*** DyabLo has joined #cc08:35
DyabLoany cc here08:36
*** DyabLo has quit IRC09:32
*** tantek has joined #cc09:52
*** tantek has quit IRC09:59
*** wormsxulla has quit IRC10:48
*** wormsxulla has joined #cc10:49
*** anttil has quit IRC11:05
*** anttil has joined #cc11:22
*** oshani has joined #cc11:51
*** oshani has quit IRC12:02
*** JoiIto has quit IRC12:03
*** bassel has joined #cc13:23
*** oshani has joined #cc14:02
*** oshani has quit IRC14:08
*** luisv has joined #cc15:28
*** nkinkade has joined #cc15:40
*** parker-fcnyu has joined #cc16:00
*** nathany has joined #cc16:20
*** pyrak has joined #cc16:22
*** jgay has joined #cc16:28
*** Kaetemi has joined #cc16:34
*** stevecam has quit IRC16:45
*** luisv has quit IRC16:55
*** nb has quit IRC17:04
*** nb has joined #cc17:06
*** sama has quit IRC17:14
*** parker-fcnyu has quit IRC17:15
*** stevecam has joined #cc17:20
*** stevecam has quit IRC17:28
*** stevecam has joined #cc17:31
*** mralex has joined #cc17:47
*** akozak has joined #cc17:53
*** JED3 has joined #cc17:59
akozakanyone have any good ideas on how to get 7.5gb of flip video to our sj contractor in utah? i was thinking 8gb usb drive. thats about 48 kb/s if it takes 48 hours.18:13
akozaki could encode it too...18:13
akozakcould zip it, mark it as avatar 2, seed a torrent18:15
paroneayeaheh18:17
paroneayeamailing disks is a good technique if you don't have anything better.18:18
paroneayeaMaybe alternately we could compress the file and scp it to one of our servers and just give him the link to download it?18:18
paroneayeankinkade: ^18:18
akozaknevermind, i just realized hes going to be here in a week.18:19
akozakthanks though paroneayea18:19
paroneayeathat works too :)18:19
paroneayeathat's a really fast transfer rate, if you can put it on a disk and just and it to him18:20
paroneayea7.5gb/second18:20
paroneayea1 second transfer18:20
paroneayea*and hand it to him18:20
akozakbut thats not end to end18:22
akozakhes merely part of the transfer :)18:23
akozakunless he put it in right away18:23
akozak...18:23
paroneayeatrue :)18:25
paroneayeayou should make sure he brings his laptop18:25
paroneayeasay it's urgent18:25
paroneayea"I really need to plug this in immediately so I can brag about the transfer speed I'm getting here"18:25
akozakhaha18:26
akozakhmmm, test results from broadband.gov for the office: 5024 down/630 up, 20ms latency, 1ms jitter18:28
*** oshani has joined #cc18:32
*** oshani has quit IRC18:38
*** JoiIto has joined #cc18:42
*** oshani has joined #cc18:44
*** oshani has quit IRC18:49
*** luisv has joined #cc18:53
akozakim troubled by check images showing up in my online checking account history19:02
akozakif i cash a check, whoever gave it to me has my acct number from the back19:02
*** michi_ has joined #cc19:07
nathanyakozak, #cc is for Creative Commons, not check cashing; wrong channle19:08
nathany;)19:08
*** TDJACR has quit IRC19:09
*** NotADJ has joined #cc19:09
*** NotADJ is now known as TDJACR19:09
akozakhaha19:11
akozakim gonna bridge the gap between the two cc's one day19:11
akozakhaha oops19:12
akozakoh shit here comes an s19:12
*** bassel_ has joined #cc19:44
*** bassel has quit IRC19:46
JED3nothing better than a newly passing test suite19:55
paroneayea:)19:57
paroneayeawhat about world peace?19:57
JED3pssh19:58
paroneayeamaybe we just need to make unit tests for sustainability and world peace20:00
paroneayeaand keep massaging the code until they pass20:00
akozakthat's already what's happening :)20:01
akozakorganizations are like functions20:02
akozakor something20:02
JED3akozak: yeah but the coverage is god awful20:02
akozaki do not get that engineering joke20:02
akozakhaha20:02
JED3hehe, coverage is a percentage of the lines/files/packages of code that actually get executed when you run unit tests20:04
akozakohh20:05
akozakinteresting20:05
akozakgood joke then20:05
akozakso you don't unit test everything?20:05
akozakwhat do you test then?20:06
JED3akozak: well you do but often there are blocks and conditions that are overlooked20:07
akozaki get very confused thinking about code testing.20:07
*** JoiIto has quit IRC20:09
akozakto me it seems like testing a math proof after you've already proved it generally20:09
akozakbut then again i know nothing about it20:09
paroneayeaakozak: so, imagine you wrote a program, and it has tons of connections and dependencies on other libraries20:11
paroneayeawhat happens if one piece of code in your program, or in a completely separate library you depend on, changes how it works?20:11
paroneayeawhat if that breaks or changes the behavior of your other piece of code?20:12
paroneayeaor what if you need to refactor your codebase, change the database or something?20:12
paroneayeaunit tests make sure all the individual "units" of the code keep working as the rest of the structure changes around them20:12
akozakah i see. so tests are created and then reused20:12
akozakbut what about the tests? do you have tests for test?20:13
paroneayeavery rarely :)20:13
paroneayeaif you have a big structure that a lot of your tests use20:13
paroneayealike a fake database system to mock your real database working20:13
akozakthis reminds me of a paradox from game theory. wonder if i can find it...20:13
paroneayeayou may want to make sure the fake database keeps working20:13
paroneayeabut usually people do not test their tests.20:13
JED3akozak: here is a simple example http://code.creativecommons.org/viewgit/commoner.git/tree/src/commoner/works/tests/test_basic.py20:15
JED3this is a test that makes sure that the register works pages on CC Network are working normally20:16
akozakah20:16
akozaknot as complex as id have thought20:16
akozaki sort of thought unit tests were tests to generate every possible input and evaluate the limits of the code youre testing20:16
akozakas in consider all inputs, see where the code fails20:17
JED3yeah, here is another simple example that deals with the licenses http://code.creativecommons.org/viewgit/cc.license.git/tree/cc/license/tests/test_cc_license.py20:17
paroneayeaa really good example a friend was telling me about:20:18
paroneayeahe does contracting for some big accounting system20:19
paroneayeathey use some shitty proprietary database, and the vendor says "hey we made a change, just drop it in, you don't even need to test it rigorously, it's like a one line change"20:19
paroneayeamy friend said, "hold on, let me run my tests just to be sure"20:20
paroneayeawell, he had a test that made sure that it should return something like 284 accounts to have their accounts charged or something20:20
paroneayeawith the new database, it was only returning 40 or something20:20
paroneayeaso the test failed, and they were able to recognize that that "simple, no need to test database change" really actually made a significant difference for some reason20:21
paroneayeaso they contacted the database vendor and they fixed it20:21
akozakthats awesome20:23
JED3another example would be for test driven development, where tests are written first before all else and they serve almost like blueprints for your program20:25
JED3which is what made rewriting the rest api that much easier, i already had a test suite built for me from the previous api20:26
akozakweeiirrd20:26
paroneayeawhich makes sense in certain circumstances, although I think there are a lot of test driven-development blowhards20:26
paroneayeayeah, it's a lot easier when you already *had* an example of how it worked20:26
paroneayealike with the api, you knew how it was going to work20:26
akozakThis is the problem test suites remind me of, but on second glance it's only barely related: http://en.wikipedia.org/wiki/Two_Generals'_Problem20:27
paroneayeasame thing with the cc0 formatters, I wrote the tests first since I already knew how the old cc0's formatters outputs are20:27
paroneayeabut20:27
paroneayeaas said I think there are a bunch of TDD blowhards out there20:27
JED3paroneayea: i totally agree, TDD has only worked for me a few times and its only been for those certain cases like api's or spec'ed services20:27
JED3haha the cc.api test suite takes 10 minutes to complete, reminds of http://xkcd.com/303/ except s/compiling/testing/g20:28
paroneayeaheh, yeah20:29
paroneayeaI think 3d artists have the same excuse with "rendering"20:29
paroneayeahold on, rendering my image20:29
akozakI guess that the Two general's problem is related in that you might be uncertain whether your test was accurate20:30
akozakand develop a test for that test, and so on20:30
paroneayeaakozak: In most cases I think people know pretty clearly what they want for their output20:30
paroneayeafor example, a pluralize test:20:30
paroneayeaassert pluralize('dog') == 'dogs'20:31
paroneayeaassert pluralize('goose) == 'geese'20:31
paroneayeamost tests are just giving an input and making sure the output is as expected20:31
akozakbrb lunch, will continue this in a bit :)20:31
paroneayeathere are some more complicated test patterns such as testing the internals of a function by mocking up the internals and passing in the mockups20:31
paroneayeabut those are more rare20:32
paroneayeawell, for me anyway :P20:32
*** wer-ist-roger has joined #cc20:55
*** wormsxulla has quit IRC21:01
*** wormsxulla has joined #cc21:20
*** wormsxulla has quit IRC21:31
*** michi_ has quit IRC21:33
*** oshani has joined #cc21:35
akozak"In addition, writing code for a unit test is as likely to be at least as buggy as the code it is testing. Fred Brooks in The Mythical Man-Month quotes: never take two chronometers to sea. Always take one or three. Meaning, if two chronometers contradict, how do you know which one is correct?"21:36
akozakhttp://en.wikipedia.org/wiki/Unit_testing21:36
akozakinteresting21:36
*** wormsxulla has joined #cc21:37
akozakso here's another question about code testing: do you automate it so that every change in the repo gets checked against the code?21:39
akozak*test code*21:39
paroneayeaakozak: if both of them are broken you at least know that things are broken21:45
paroneayeathere are sytems to make sure the tests are always passing21:46
paroneayealook into "continuous integration"21:46
paroneayeawe don't do it here, probably should though :)21:46
greg-gThere is a launchpad/canonical project that won't allow commits to happen to trunk unless the code change passes all tests21:47
greg-git does this by everything going through their Patch Queue Manager (PQM)21:48
paroneayeayeah some people do that21:48
greg-gjust pushing myself into the conversation, don't mind me :)21:48
akozakheh, your tests better be prefect then.21:48
paroneayeaunit tests aren't the only answer to good code though21:49
paroneayeaI had to go through some pretty hardcore code reviews to get anything checked in at google21:49
paroneayeamaybe it wasn't as hardcore as I thought at the time since that was the first professional code I ever wrote, and never had gotten chastized on bad style, lack of tests, no docs before :)21:50
akozaki wonder if it might be better practice to have one person write the code, the other write the tests21:51
akozakanother*21:51
paroneayeaiirc someone else had to mark your code as reviewed for you to check in your code though, so there's another system.  Code reviews are huuuugely time consuming though21:51
akozakheh, im starting to see many similarities between publishing code and publishing academic papers21:53
akozakmaybe academics ought to start unit testing their arguments :P21:54
akozakor paragraphs21:54
paroneayeayes I suppose academics do code reviews already21:54
paroneayeacode reviews == peer reviews21:54
akozakand both get chastised for style even though it doesn't necessarily affect functionality, and documentation is kinda like the conference presentation21:55
paroneayeathat's the main reason we stopped doing code reviews at imaginary landscape21:56
paroneayeapeople were just bikeshedding about the style guide21:56
paroneayeainstead of looking at how things were actually running21:56
paroneayeaI guess that is inevitable whenever you have a standard of style and a peer review system21:57
paroneayeait's easiest to nitpick style, so that's what gets nitpicked most21:58
akozakyea21:58
*** wer-ist-roger has quit IRC22:05
*** bassel_ has quit IRC22:40
*** jgay has quit IRC22:40
*** JoiIto has joined #cc22:43
*** pyrak has quit IRC23:10
*** JoiIto has quit IRC23:39
*** pyrak has joined #cc23:39
JED3paroneayea: ping23:41

Generated by irclog2html.py 2.6 by Marius Gedminas - find it at mg.pov.lt!