There are some days you feel you are not going to do anything with zero plan and just blank entry to lab. And you end up doing something substantial!
Today morning, I was asked to diagnose a few errors for our assignment. We have a pretty cool game assignment where all groups pitch their game bots on our server. The script was in Python. Eventually, the error turned out to be that the MySQL server was not running. Apparently the relevant error in Python is displayed at the last line in contrast to the first line of Java. Feeling pretty smug about debugging, I had quite a happy start to the day.
Back on my system, I started working on simplifying linear equations to some canonical form. After collecting like terms together, I was able to work with + and -. In that process, I wanted a HashMap in a sorted fashion. I learnt that TreeMap is an elegant solution for that.
However, when it came to complex equations, it became pretty confusing. Then, I stumbled upon this pure gold mine - WolframAlpha. Eagerly, I started using its API. It was pretty non-intuitive to use in the beginning and googling an example for it wasn't helping. Finally, I came upon the GitHub account of the writer of this code and got a sample code. It did not work still. Then, I saw there were some packages to be included. After, all that I got the API running.
Only to see the sample program in my downloaded folder :P
I could still not use the output as it was not in the canonical form. After a bit of cleaning the string in the most childish high school fashion, I passed it to the old program I had developed for +/-. I was happy it was of some use. And then voila!, I got the required result.
Throughout, I made the most ludicrous mistakes which cost me a lot of time. And now I learnt that "costed" is not the past tense of cost. I am very surprised. Anyway, today depended completely on debugging and had a fulfilling day.
Tomorrow, I should see what other potentials I can tap from WolframAlpha.
Today morning, I was asked to diagnose a few errors for our assignment. We have a pretty cool game assignment where all groups pitch their game bots on our server. The script was in Python. Eventually, the error turned out to be that the MySQL server was not running. Apparently the relevant error in Python is displayed at the last line in contrast to the first line of Java. Feeling pretty smug about debugging, I had quite a happy start to the day.
Back on my system, I started working on simplifying linear equations to some canonical form. After collecting like terms together, I was able to work with + and -. In that process, I wanted a HashMap in a sorted fashion. I learnt that TreeMap is an elegant solution for that.
However, when it came to complex equations, it became pretty confusing. Then, I stumbled upon this pure gold mine - WolframAlpha. Eagerly, I started using its API. It was pretty non-intuitive to use in the beginning and googling an example for it wasn't helping. Finally, I came upon the GitHub account of the writer of this code and got a sample code. It did not work still. Then, I saw there were some packages to be included. After, all that I got the API running.
Only to see the sample program in my downloaded folder :P
I could still not use the output as it was not in the canonical form. After a bit of cleaning the string in the most childish high school fashion, I passed it to the old program I had developed for +/-. I was happy it was of some use. And then voila!, I got the required result.
Throughout, I made the most ludicrous mistakes which cost me a lot of time. And now I learnt that "costed" is not the past tense of cost. I am very surprised. Anyway, today depended completely on debugging and had a fulfilling day.
Tomorrow, I should see what other potentials I can tap from WolframAlpha.
You should start writing tests for your code. It would help you debug and re-use it in the future. Apart from that, when random person like me lands on your github repo from google, your tests will have usages that I would help me save time. Just a thought.
ReplyDeleteYa I got this feedback a long time ago, I am too lazy to do it as of now.. Will see to it when I gain more experience coding regularly.
ReplyDelete