Mon Apr 24 11:12:32 EDT 2017
Yesterday did not go according to plan.
It took me 6 hours to get some semblance of working code, and that code didn't run fast enough. I then reread the problem statement, installed the available third-party libraries I could use, and redid the work whilst starting to grok a new library.
When I got that code working hours later... it was an order of magnitude slower than the original code.
I'm pretty excited to learn how to use pandas, and that I made a somewhat working solution with a library I didn't know existed the day before felt pretty good. But making it fast I do not know how to do.
So, this morning, around 0530, 3 hours before the test expired, I went about creating better fake data to test how fast my code ran.
I then tweaked a few things to my original code and suddenly it was fast enough.
Those things were:
- Printing to stdout in one chunk at the end of the program instead of at each calculated line
- I should really know better at this point to not do that but I keep forgetting
- Switching using Decimal objects back to float
- I didn't need the precision of the Decimal objects, I was being silly using them
Upon submitting the faster code, I no longer got a time-out error, I got a "Failed system test" error. I made some tests to see what I may be doing wrong but couldn't find anything. I may have exceeded memory limitations, though I think the online judge would've told me. I couldn't get my setup to spit out wrong answers with the input I created (though the pandas version certainly did). So, I gathered all the resources I developed in solving the problem, and zipped it all up for one final submission, so that a human grader could get a better idea of everything I did to tackle the problem, if they are so inclined.
Mon Apr 24 11:23:17 EDT 2017
I am so glad I did that coding test, and that I'm starting the interviewing process. Yesterday was engaging, fun, a wake-up call, and inspiration on how to start seriously developing my craft.
Mon Apr 24 11:28:40 EDT 2017
I have, for a while now, been wanting to start developing a list of programming problems to solve regularly. I have not been cultivating any such list.
Yesterday I have secured my first problem that I actively plan to solve regularly, and I'll be copying the problem here later for a variety of reasons.
Today, and tomorrow, I'll be doing a test for a different company I may be interviewing with. Rather, they have a sample test, and then the real test. The real test I will have 3 hours of time to complete. It looks like it'll be multiple questions, including some multiple choice. From here, too, I will probably gather some problems to add to my training regimen.
Also, this test will be through hackerrank, which I will devote some non-zero time to everyday during my funemployment, from now on.
Mon Apr 24 11:34:28 EDT 2017
A long time ago, I lamented to a friend of mine how I felt I was too slow at progress in my profession. He thought on what I said a bit, and asked me, "You like speedrunning, right? Why don't you speedrun work?"
This is a thought that has stuck with me for a long while. And it is an idea I have tried to implement, both with success and failure.
Regularly solving the same set of problems, from scratch, is a very good application of this thought.
With regular new problems, consistently being fast is difficult. I have things I need to learn and research, even relearn and re-research. Time gets eaten up at unexpected places, and the feeling of a "speedrun" is lost. It becomes a grind again. Regularly solving problems I've tackled before, however, and tracking time to completion, gives me a reasonable metric to gauge improvement or decay, and periodically adding new problems to this system allows me to practice getting fast at various types of problems that I can expect to run into again and again.
Thus, I should get faster at random programming projects and problems that come my way.
Mon Apr 24 11:47:01 EDT 2017
This is something I've said before, but getting started was difficult. I didn't know what problems to cultivate, and had no problems already to look at for inspiration on what else I wanted. Beginning the job application process has solved this problem for me. Problems given in interviews are a perfect starting point, and actually doing interviews forces the motivation necessary to do the problem the first time. No looking for other problems because reasons, the random problem given to me is the one I had to solve.
Exactly what I needed to get started.
I think.
I hope.
Mon Apr 24 11:50:46 EDT 2017
Anyways, I want to do a review of yesterday, and in that review, I want to do a post-mortem. I think what I'll do is write a special post just devoted to yesterday's review.