Sorry I haven’t written anything in a while. I haven’t really got a good explanation why (not that I really need one) I’ve been so inactive here on my blog. Since handing in the final report to the University I’ve moved house among other things. I didn’t move very far, but it takes some time and energy to make the new place feel like home.
My friend Emil (@sparven_89 – go follow him on Twitter) introduced me to a new (well, it was new to me) text editor called Sublime Text. I’ve been using PhpStorm for php development, Visual Studio for .NET and Eclipse for most other languages, but Sublime really feels like the kind of text editor I could go steady with (so to speak).
I’ll try to post more short-ish updates on the blog, but I do say that a lot without ever doing so, don’t I? Oh well…
I’ve had so much to do these last few days and I haven’t really found the time to write anything. We’re in the middle of preparing a report for the University and at 38 pages, we’re still not there yet. The report is due Tuesday morning, but after that I’ll have a little bit more time on my hands.
I haven’t really got much to write about now that I think about it. I’ve been spending what free time I can find rewriting my IRC-bot to make it easier to test and I’ll probably upload the source code somewhere when it’s in a somewhat presentable state.
I’m going to grab a cup of coffee and watch the G-1 League. The Swedish team, Alliance, have been playing really well and have yet to drop a single point in the group stage. At the same time, Invictus Gaming, considered by many to be the best team in the world (at least prior to this tournament) have gone 1-3 and their play isn’t looking good.
For the past month or two, I’ve been almost completely absorbed by the idea of writing testable code. Dependency injection and unit tests have been on my mind a lot as I have tried to ensure that the code I produce is, not only of top notch quality to begin with, but easily testable.
Yesterday evening, when I got home from installing and demoing the system we developed as a school project (I might write something about that later), I signed on to YouTube and checked my subscriptions and recommended videos. One video in particular caught my eye – “The Clean Code Talks — Inheritance, Polymorphism, & Testing”. In the video, a Google employee called Miško Hevery talked about ways to keep your code clean and testable. He proposed that one should try to limit ones usage of IF-statements and, where applicable, utilize polymorphism instead. I found the video very intriguing and decided to search for more talks by Mr Hevery. Since yesterday evening, I have watched several of his talks and found his ideas really interesting, but coming from a coding background where I’ve been using patterns like Singletons and barely ever writing unit tests for my code, it will probably take some time for me to adapt.
In previous springs and early summers, I’ve had to take pills just to keep my sinuses from completely clogging up and my eyes from turning red and itchy, but for some reason, I have yet to experience any of those symptoms – even though I’m not on any medication. Maybe it’s because we’ve had such a weird spring here in Sweden (basically non-existent) and the trees (I think alder and birch are the main villains for me) haven’t gotten around to pestering my nasal passages. I’m not sure that I really care – I’m just happy I don’t have to eat pills every day just to keep from turning in to a big pile of mucus.
I think back on previous years and the only thing that I can pinpoint as being different this year is the fact that I’m no longer eating meat. I decided not to eat meat in August of 2012 (partly out of concern for my own well-being and partly due to the ethical implications of systematically breeding and slaying other beings for no good reason). I don’t want to say that it’s because I no longer eat meat that I haven’t been affected by the pollen so far this year, but it’s the only thing I can think of as being a possible cause for my “recovery”.
Regardless of what is responsible for making my springs and early summers more bearable, I’m just happy that they are.
Sorry for not writing in a while. My studies at the University has been taking up a lot of time these last few days and when I’m not working on school projects, I’m busy working on personal projects (like the “super secret” one). Today has been the first day in a pretty long time that I’ve actually just sat down and relaxed. I played some XCOM: Enemy Unknown and had a cup of coffee while listening to Mozart’s piano sonata no 16.
Tomorrow, the guy I’m going my “degree project” with and I are going to install and demo the system we’ve been developing for the company that we’ve been working for/with. That means travelling about 270 km (one way). We’re staying the night just to make sure that we have as much time as possible getting everything set up since we’re handing everything (Finished product, documentation and source code) over to the company after we’re done.
After we’ve delivered everything to the company, we’re going to write a report on these last 5 months detailing and evaluating our work process and the finished product among other things. Once that is over with, I’m ready to step out in to the world and make a difference and that feels really good.
I’ll try to post something more today, but we’ll see if I remember to.
Just fetched the laundry and I thought I’d post a song I’ve been listening to a lot lately. Actually, I’ve been listening to Sonic Youth quite a bit in general, but this song in particular. Hope you like it.
I’m in the middle of doing the laundry (got approx. 40 mins left on the last machine) and so I thought I’d give you a little update. A few days ago I found out through a friend that Valve has some web APIs through which you can access quite a bit of information about Steam users as well as what they are playing and how they are doing in those games.
Being somewhat obsessed with Dota 2, I decided to write a little python script that saves information on all the matches ever played to a local database so that I can query the database and determine rankings (using Microsofts TrueSkill algorithm or some such system) and other interesting data. I’m also thinking about writing a replay parser, though it seems there are numerous such projects available (under very generous licenses) on github and other open source sites.
Right now, I’ve saved about 0,2% of all Dota 2 matches ever played, but unfortunately I can’t speed up the process since I’m limited by the speed at which I can poll Valve’s servers for information. I’m thinking about modifying the script to run on several different machines (on different internet connections) and having them poll pre-assigned parts of the match sequence number spectra.
Wow, this isn’t going to be the short post I had planned to put together. Oh well, it doesn’t matter – I’ll just keep rambling.
I’ve been dabbling a bit in Perl and Ruby lately (for no real reason). I’ve never really thought about getting into Perl before since it just seems Python is pretty similar and is faster performance-wise. That doesn’t mean I’ve ever written off Perl – I’ve just been content with writing my small scripts in python.
As for Ruby (and by extension Rails), I’ve just had this deep rooted dislike for the language for no reason what so ever. I couldn’t explain why. There’s nothing wrong with the language really, but in spite of that, I’ve just never felt like getting into it.
Yesterday, I faced up against whatever malformed preconception I had of Ruby and set up the necessary tools for Ruby development on my laptop running Ubuntu 12.10. I’ve yet to write anything other than the token “Hello World!” snippet, but I’m sure I’ll get there in due time.
Whenever I can find the time, I think I’ll set up some sort of technical knowledge site where I can rate my knowledge of languages, frameworks and techniques on a scale of 1 to 10. Might be nice to use in conjunction with my projects site (projects.mastr.se) to sort of showcase my skills as a programmer.
Hmm… It seems my script just stopped since it was unable to fetch data from Valve’s servers. I guess this is a good a time as any to finish off this entry.
“Laziness, Impatience & Hubris”
I’ve found a new tagline for my blog (and for me as a person/programmer to some extent). While casually browsing YouTube I stumbled across some videos of Larry Wall, creator of the Perl programming language, talking about programming. In one of the videos he mentions how he, in the “Camel Book” (a book about Perl programming) had described the three virtues of a programmer as being laziness, impatience and hubris. At first, these may seem like bad things, but together with his explanation, they actually make a lot of sense.
Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labour-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer.
Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don’t just react to your needs, but actually anticipate them. Or at least that pretend to. Hence, the second great virtue of a programmer.
Hubris:Excessive pride, the sort of thing Zeus zaps you for. Also the quality that makes you write (and maintain) programs that other people won’t want to say bad things about. [Also, the thing that makes you write programs to do something that’s already been done, because you believe you can do it better — Wim.] Hence, the third great virtue of a programmer.
Sorry for not posting anything since Wednesday. I’ve been… actually I don’t really know what I’ve been doing. Thursday and Friday I was in school, then came home, worked on projects, ate, worked some more and then slept. Yesterday and today I have been programming and taking the occasional break to play some Dota 2.
I’ll try to get better at posting small-ish posts.
Much <3, Martin