Pursuing Data

Article

What I've Learned So Far

Girl holding books in string

It has been around 4.5 months since I started properly coding. Sometimes that kind of amazes me, so I wanted to take some time to reflect on some of the coding lessons I have learnt.

  • My Number One Coding Strategy
    • I still feel like of all the elements of data analysis, the coding side is still my weakest
    • My primary strategy for overcoming this is to realize that there are possibly millions of people who are better coders than I am, and these people like to help share solutions with others
    • I've definitely said before that StackOverflow is a great resource, but honestly most of the time the reason I think I look like I know what I'm doing is because of all the great resources that others have made

  • Four Steps to Newbie Debugging
    • I think especially as newbies there are common mistakes that we make in coding and a lot of them can be quickly identified with these three steps (apart from learning how to read the error messages). My guess is that 7-9/10, when I encounter an error, one of these three things has happened.
    1. Did you spell everything correctly? The amount of times that I have just copied down the variable or function name incorrectly is a source of so many errors - always a good place to start!
    2. Are the inputs you added what you think they are? Sometimes we add things into a function assuming we know what our input looks like, but sometimes we were wrong - are you certain you know what your inputs look like?
    3. Does the function operate the way that you think it does? I think that this is especially the case when function contain multiple methods, etc - do you know what each piece of the function does and is it behaving as you expectted?
    4. Edit: Added a fourth (borrowed from discussion with one of my friends) Did you try to interpret the error message? I go to the end of the function to read the message, and the start of the function to see the reference line and see what I can figure out.

  • I learnt how to use R
    • Learning R was a bit clunky at the start and I was definitely missing Python
    • But I've become a huge fan of ggplot2 and the power it has - they layering concept really does make sense to me
    • And it can make SUCH pretty pictures

  • Accessing APIs and Scraping Webpages
    • This was something that I had heard people talk about, but had no idea how to do - I really felt like it lived within the land of "the coders' secrets"
    • But now I've done it and I already have plans for how to use it for some of the personal data analysis I do (I might show it to you sometime)

  • My Brain Was Born for This
    • That's honestly how I feel these days, and I'm truly grateful for it - not everyone gets to find something like that in their life
    • I continue to find that I have intuition about somethings that just 'make sense' to me - it's incredibly validating that things I've been doing on my own have value in my future pursuits
    • I can happily do this for hours and find that more than taking energy from me, it regularly calms me down and gives it back - cool to think I might get paid to do it
    • I've started the very beginnings of my predicting changes in homelessness project that I've wanted to do for a really long time