agentcooper

Need some help in mongo design by agentcooper

50a1c1f2651b478f8cb8bff34ad41515?size=52

I need to store lots of data and with each entry there is a Facebook user id to whom data belongs to. What is the best way to store this in #mongodb?

Is one collection with entries like this will be fine?

{
  "stuff": { ... },
  "id": "<facebook-user-id>"
}

Later I will need this do display his own stuff to the logged in user.

Clojure! by agentcooper

50a1c1f2651b478f8cb8bff34ad41515?size=52

#Clojure is awesome. This is my first lispy language and I really got a "wow" moment. When writing in Clojure after Ruby of Javascript you need to completly change the way you think about programs. Remember 'everything is an object'? Now everything is a function! More under the cut

Javascript coding checklist by agentcooper

50a1c1f2651b478f8cb8bff34ad41515?size=52

Use jshint. It is available for all platforms (Textmate, Sublime, etc.). Real-time error highlighting will save you a lot of time.

debugger; statement. Insert it in suspicious places, same as breakpoint, but is not affected by code changes. The killer feature is scope access: use console to output 'this', which will be bound to the scope you're in. More under the cut

unix ls by agentcooper

50a1c1f2651b478f8cb8bff34ad41515?size=52
alias l='ls -trlah'

more productive ls:

  • -tr to sort modified asc, last modified will be in the end of output
  • -l for permissions
  • -a for hidden 'dot' files
  • -h for human readable size

#unix #bash