Time |
S |
Nick |
Message |
14:39 |
|
pdurbin |
helpful: How can I delete all documents from my index? - http://wiki.apache.org/solr/FAQ |
14:40 |
|
pdurbin |
it's super useful to have mockups to work from now. i have a better idea of what my solr facets should be |
14:42 |
|
pdurbin |
this is for https://github.com/dvn/solrpoc |
15:43 |
|
|
spilth joined #sourcefu |
15:57 |
|
semiosis |
pdurbin: reminds me of... "Engineers study interesting real-world problems, but fudge their results. Mathematicians get exact results, but study only toy problems. But computer scientists, being neither engineers nor mathematicians, study toy problems and fudge their results." -Gary W. Flake |
15:58 |
|
pdurbin |
oh, the theory/practice thing? |
15:58 |
|
semiosis |
yep |
15:58 |
|
pdurbin |
it's good stuff: http://irclog.greptilian.com/sourcefu/2013-01-26#i_2173 |
20:04 |
|
pdurbin |
more playing with solr: http://dvn-5.hmdc.harvard.edu:8983/solr/collection1/browse |
20:04 |
|
pdurbin |
per the update i just made: https://redmine.hmdc.harvard.edu/issues/2656#note-4 |
20:32 |
|
|
raprasad joined #sourcefu |
20:34 |
|
|
raprasad_ joined #sourcefu |
20:40 |
|
|
raprasad_ joined #sourcefu |
21:19 |
|
spilth |
Do other people struggle with "I know I should write a test for this first... but I'm not sure how to test the results of what I'm trying to do."? |
21:26 |
|
pdurbin |
nope. java struggle at the moment |
21:28 |
|
spilth |
I meant in general. Not at the moment :-) |
21:30 |
|
pdurbin |
:) |
21:39 |
|
|
raprasad left #sourcefu |
21:55 |
|
semiosis |
spilth: all the time |
21:55 |
|
spilth |
do you figure how to do it first and then add the tests in that situation? |
21:56 |
|
semiosis |
often that leads to untestable code |
21:56 |
|
semiosis |
so i will do an exercise like that, to figure out what i want to do, then either refactor or rewrite completely to achieve the result in a testable way |
21:57 |
|
spilth |
exercise meaning a self-contained version outside of your project to learn by? |
21:58 |
|
spilth |
self-contained code |
21:58 |
|
semiosis |
not usually |
21:58 |
|
spilth |
experimental branch? |
21:58 |
|
semiosis |
sometimes you have a vague idea of what needs to happen but can't see all the details & gotchas |
21:59 |
|
semiosis |
so hacking a solution in to the existing code can help bring out those details |
21:59 |
|
semiosis |
but that leadss to unmaintainable spaghetti |
21:59 |
|
spilth |
and a bunch of stuff you have to undo |
22:00 |
|
semiosis |
yeah, i usually just get my conception clear, then revert the code & start over |
22:00 |
|
semiosis |
if it's big stuff then yeah a branch |
22:00 |
|
spilth |
ok, i guess me figuring this out being in a local branch is helpful then |
22:02 |
|
spilth |
i'm still struggling with "well i sorta know how to do this... but I don't know how to test it... so that's gonna make this take even longer" |
22:02 |
|
semiosis |
is this an OO language? |
22:02 |
|
spilth |
Yea, Ruby |
22:02 |
|
semiosis |
yeah i need to get up to speed on testing in ruby |
22:03 |
|
spilth |
I just need more experience and practice really |
22:03 |
|
semiosis |
me too |
22:04 |
|
spilth |
I guess the underlying issue is that I feel like I have to struggle to defend TDD and the time it will take me |
22:05 |
|
spilth |
I actually spent part of my weekend figuring out how to do something and went in with a TDD approach. Worked in a new sandbox project and got it working. But then brining it into the my real work app brought up some additional suprises/catches. |
22:07 |
|
semiosis |
such as? |
22:08 |
|
spilth |
This is a Rails project. The project at home was just a simple "Library" apps. Books with titles and prices (I even used integers instead of decimal) |
22:08 |
|
spilth |
At work... there are a lot more fields, a lot more field types and associations to consider |
22:09 |
|
spilth |
I'm working on "mass edit" forms so people can update mutliple records at once with the same information |
22:10 |
|
spilth |
So one gotcha is that I had an integer field with a default of 0, which mean when instantiating this "blank" object to build the form off of, that field would end up defaulting to 0 and potentially overwrite what was previously in each record's field |
22:11 |
|
spilth |
Every other field had a null value and I just ignore and fields that don't have a value set for the mass update. |
22:13 |
|
spilth |
My app at work also maintains version information for each record, which I have a partial for (shared HTML with a comment field and some JS). I only show the "version comment" field when it's not a new record. But when drawing the form for multi-edit I'm using a dummy object which is a new record. So this prevented the comment field from showing up. |
22:18 |
|
semiosis |
these are the kinds of things i meant by details & gotchas... maybe your initial approach wasn't viable & this can help you to find another way |
22:18 |
|
spilth |
Really I just got the basics working at home so I understood what I needed to do minimally |
22:18 |
|
spilth |
yea |
22:22 |
|
spilth |
But it DID give me a jump start to understand the essentials without getting tripped up on all these other issues. |
22:22 |
|
spilth |
So I think there's value in that. |
22:27 |
|
semiosis |
my first rule of software development (for years) has been "the first one's always crap." |
22:27 |
|
semiosis |
expect to throw it away & start over |
22:27 |
|
semiosis |
applies big & small |