These are chat archives for ushahidi/Community

10th
Jun 2015
Robbie Mackay
@rjmackay
Jun 10 2015 01:04
@hollycorbett one complication I forgot to flag on the sets view. The API is now split into /collections and /savedsearches
Collections has a posts endpoint too (ie. /collections/:collectionid/posts)
saved searches doesn’t since the filter can just be applied to the existing post endpoint.
So you might need to rearrange a little. Potentially just build for collections to start with, then extend to saved search in a second diff.
hollycorbett
@hollycorbett
Jun 10 2015 02:13
ahhhh
:)
life makes sense again
np :) although in a ‘passive’ sense they’re kinda the same thing, they’re really not.. so prob makes sense all-around
Robbie Mackay
@rjmackay
Jun 10 2015 02:37
Yea.. it got tricky when wrangling the backend. So now they have the same base: Saved Search extends Collection.
But Saved Searches doesn’t have a magic /posts endpoint.
hollycorbett
@hollycorbett
Jun 10 2015 02:38
(y) globalfilter makes magics… all peachy :)
Robbie Mackay
@rjmackay
Jun 10 2015 02:38
Because you can logically do /collection/1/posts?q=extrafilter
and the results make sense
hollycorbett
@hollycorbett
Jun 10 2015 02:38
ah
Robbie Mackay
@rjmackay
Jun 10 2015 02:39
but if you do /savedsearch/2/posts?q=abc123
but the original saved search already had a keyword filter.. which takes precendence?
We could filter one within the other.. but thats a giant ugly query
I figured we’d auto populate the filters from a saved search in the client.. and then you can edit those. When you edit them you get an option to save changes, or just reset.
Seemed like a better experience all over.. since it makes editing a saved seach really smooth
hollycorbett
@hollycorbett
Jun 10 2015 02:40
it could well be one giant ugly query.. but with the magic complexity of layers of JS… no frontend hacker wold ever need know ;)
Robbie Mackay
@rjmackay
Jun 10 2015 02:40
^ except it’d also be super slow
hollycorbett
@hollycorbett
Jun 10 2015 02:41
details ;)
Robbie Mackay
@rjmackay
Jun 10 2015 02:41
yup
hollycorbett
@hollycorbett
Jun 10 2015 02:41
yeah nah it makes sense… prob what i’d have insisted on if I’d done back-end
;)
oh oh
Robbie Mackay
@rjmackay
Jun 10 2015 02:41
yea. Splitting them properly ended up simpler.. otherwise everything had if..else conditions everywhere
hollycorbett
@hollycorbett
Jun 10 2015 02:41
"precidence" reminds me..
goes to edit diff
Robbie Mackay
@rjmackay
Jun 10 2015 02:46
heh
I’m just trying to unpick all the bits of the post type editor.
Once this is in we might need to go on a spree building better test data..
.. with more zombies
hollycorbett
@hollycorbett
Jun 10 2015 02:47
one day very shortly I plan to teach myself about the nitty-gritty of angular execution and optimization/profiling
nods
there are always more zombies
Robbie Mackay
@rjmackay
Jun 10 2015 02:48
Yea.. if you figure out anything useful on optimizing angular let me know.. I’m still a novice
and there are some slow pages already
Robbie Mackay
@rjmackay
Jun 10 2015 02:53
Did I mention I built myself a standing desk? balanced on speakers.. only problem is its in the little back building which gets terrible wifi coverage
hollycorbett
@hollycorbett
Jun 10 2015 02:54
yeah… and gulp is starting to anger me with how long its taking to build the js… I can’t help but notice its correlated to slowness of the code :S
Robbie Mackay
@rjmackay
Jun 10 2015 02:55
ah.
hollycorbett
@hollycorbett
Jun 10 2015 02:55
standing desk? excellent.. I on the contrary have built myself many “lying desks” … my bed (the obvious)… the hanging chair on my patio.. covering the sunny-breakfast-nook with cushions… and I’m planning a hammock as soon as I can afford to buy enough thread to knot myself one
Robbie Mackay
@rjmackay
Jun 10 2015 02:56
ah I may have forgotten to mention this.. but if you disable uglifyjs the build is much faster
add a .gulpconfig.json file
{
    "nodeServer": true,
    "uglifyJs": false,
    "backendUrl": "http://whatever”
}
Yea I figure I can alternate working from a couch and standing..
though this room currently has a bean bag and no couch. But thats good too
hollycorbett
@hollycorbett
Jun 10 2015 03:01

uglify - yep pretty sure it was in the docs… should do that.., you guys are way better at keeping uglify-format-ready.. my own website code breaks uglify

this may just be my internal laziness speaking, but I hear that ‘going for a couple of minutes walk every hour’ is the new ‘standing desk’…http://www.sciencedaily.com/releases/2015/04/150430170715.htm.

In Australia, we were banned from sitting on swiss-balls at Uni (if you wanted to buy a standing desk, you had to pay ~$1890 to ensure the surfaces matched the surrounding office and that it could be converted back to a non-standing desk for the next user… not f*ng kidding… I tried)

Robbie Mackay
@rjmackay
Jun 10 2015 03:02
browerify makes this stuff easier. Proper modules mean its pretty hard to munge uglify
hollycorbett
@hollycorbett
Jun 10 2015 03:02
interesting
lol this was one of my many ‘confusions’ - …. wtf are all the npm modules for?
(of course it doesn’t matter… but its just one more thing to ‘process’ first few times through)
Robbie Mackay
@rjmackay
Jun 10 2015 03:03
yea. I looked at the fancy expensive standing desks.. and figured I could make something myself
hollycorbett
@hollycorbett
Jun 10 2015 03:03
much better idea
Robbie Mackay
@rjmackay
Jun 10 2015 03:03
hehe. there are a lot of npm modules. In theory: dev dependencies are stuff we use to build the app, dependencies are things in the app.
Theres not that many
hollycorbett
@hollycorbett
Jun 10 2015 03:03
:) yes I know that now
and i know what (most) of them do now
lol but actually (since we’re on the topic) it wasn’t immediately clear to me (as a first time nodejs/angularjs user) that I could just go “npm install” and have it work itself out
first time around I made an effort to manually install each thing and its dependencies
Robbie Mackay
@rjmackay
Jun 10 2015 03:04
good point. I think the docs mention everything.. but aren’t clear which things matter for you right now
hollycorbett
@hollycorbett
Jun 10 2015 03:04
well… leave it to sort out its dependencies.. but at least check it all worked
yeah lol it was funny actually
the backend had great docs/methods for setting up
but was really confusing to code with
(so much of it is redundant and it isn’t immediately clear what is still in use or not)
on the contrary, the frontend had mediocre docs (for someone new to angular etc) but is much easier to navigate for coding purposes
Robbie Mackay
@rjmackay
Jun 10 2015 03:07
.. I should possibly add exactly that note somewhere for new devs.
hollycorbett
@hollycorbett
Jun 10 2015 03:08
hah :) yes.. just like all along I was thinking “I should really be making a list of this since they’re hiring new devs soon” …
but thats probably the major actually
Robbie Mackay
@rjmackay
Jun 10 2015 03:09
oh well
yup
hollycorbett
@hollycorbett
Jun 10 2015 03:09
:)
Robbie Mackay
@rjmackay
Jun 10 2015 03:09
I know I fixed something in the vagrant config for you.. and several others in the same 2 weeks
But I don’t remember what anymore :/
hrm 500 errors from the attributes API :/
hollycorbett
@hollycorbett
Jun 10 2015 03:10
and perhaps if there were a “not-best-but-reasonable principles” guide to dealing with the git repos… that might help too… I mean, perhaps I’m an unusual case, but I’m so used to being on either extreme - the sole dev or so far removed from whateveryone else is doing - that it doesn’t really matter what I’m doing relative to the rest of the repo and/or wtf arcanist is
500 now?
curious
I thought I got 400
Robbie Mackay
@rjmackay
Jun 10 2015 03:11
going to prod the logs regardless
Yea I need a step by step: clone repo, install arc, etc etc
"2015-06-10 03:02:35 --- EMERGENCY: …” <- gotta love that error
hollycorbett
@hollycorbett
Jun 10 2015 03:14
okay yeah thats the “final” thing (no doubt actually a major)… in my “list of holly’s confusions”… the relationship between “bits” isn’t always clear to someone coming in for the first time.. like remember the discussion we had about the “visible_to” thing for posts? (i.e. “can a post be visible_to several different user groups, or just one at a time - is there a ‘hierarchy’ where everyone ‘above’ can see, or are there distinct and different roles that are independent?) Yep… but extend this to much of the object model. I was kinda working it out by reading kohana db relationships (which was relatively english-like - "class Blah hasMany littleStuffs”), but soon learnt these could well be completely irrelevant :D so yep.. could potentially largely be copied from those :) at least as a start
Robbie Mackay
@rjmackay
Jun 10 2015 03:15
yea. So DB schema? .. and probably architecture diagrams..
hollycorbett
@hollycorbett
Jun 10 2015 03:15
yeah
that’d be the major
The lovely thing about the frontend interface (esp with the new design) is that it gives lots of clues as to the behavior to expect… but of course, from code (if its even named the same hahahahaha) its not necessarily clear
nonetheless :) I know I’ve only been about for a couple of months, but I’m excited :) its all coming together and looking pretty!
Robbie Mackay
@rjmackay
Jun 10 2015 03:18
yup. Naming is slowly getting consistent too though
hollycorbett
@hollycorbett
Jun 10 2015 03:20
I’ve been thinking lots about my ultimate vaccine plan (http://archivehiv.com for lurkers - yes I know my CSS is funky ;) ) and about mapping vaccine coverage.. how amazing would it be to have QC codes on all of the vaccine packages we distribute and be able to map it back (through an android app and photo/country-health-DBs) to actual patients and health-records all over the third-world?
Robbie Mackay
@rjmackay
Jun 10 2015 03:20
QC ~ QR codes?
hollycorbett
@hollycorbett
Jun 10 2015 03:20
re: naming - yes for sure. I should also mention… I was thinking today that although I grumble alot about lint/naming - I’m glad its enforced- either by lib or by leadership… it’d be a collossal mess if it weren’t!!
lol yes
my brain momentarily flipped
Robbie Mackay
@rjmackay
Jun 10 2015 03:21
QR scanners are super simple too. You can even cheat and just embed a URL.. then skip a custom app
hollycorbett
@hollycorbett
Jun 10 2015 03:22
lol.. yeah… something tells me the HIV vaccine will be harder than that bit ;)
Robbie Mackay
@rjmackay
Jun 10 2015 03:22
just a little
hollycorbett
@hollycorbett
Jun 10 2015 03:22
ahhh ffs… website broken
Robbie Mackay
@rjmackay
Jun 10 2015 03:22
are you still hosting your own node server?
hollycorbett
@hollycorbett
Jun 10 2015 03:23
yep
and I’m foolhardy enough to not check it routinely
or put monitoring… or analytics on it blush