Reading list of 2016-01-07

Hello,

I thought I would start sharing some articles where I have found them to be insightful, thought-provoking, maybe controversial or funny. Don’t mistake “reading list” as “book reading list” that is! I do have some books in my to read list. 🙁

I read plenty of articles from Vox and other news sources on a daily basis, so here’s this week links.

I went on vacation alone. Why do people think that means I’m disturbed? by Catherine Andrews

This is the most common response — so common it seems to be mostly automatic. You’ll be chitchatting with somebody and mention that you’re taking off to the beach for a few days. Out of politeness they’ll ask who you’re going with, and you’ll tell them, “Just me!” Then it happens. Their eyes skitter everywhere. “Oh … wow … that’s so … cool!” they say — when in reality every twitching facial muscle is shouting, “Yeah, you definitely need to go on vacation. To a mental asylum. Why, oh, God, why would you ever go anywhere by yourself? You could get murdered! Worse, you might be bored! And you definitely are going to have to spend an extended amount of time alone with your thoughts — a fate worse than the random serial killer you’re sure to come across.”

Pretty darn on point. I’ve gone to the theaters alone and people look at me rather puzzled by it. Catherine really nails it down:

There can be a paralyzing sense of shame about doing activities alone that we’ve been told by society should be done with others — a shame that results from the assumption that anybody who sees you doing these things alone is judging or pitying you.

Which holds true in today’s society. As a person who enjoys doing plenty of activities alone I really recommend giving it a try.

Here’s Marvel’s new teaser trailer for Daredevil season 2 by Alex Abad-Santos

I have a little secret… well, not much of a secret. I didn’t enjoy Daredevil that much as many others have. I’m willing to give it a second run when the next season starts. That said, I’m looking forward to House of Cards new season.

I lost 100 pounds in a year. My “weight loss secret” is really dumb. by Alasdair Wilkins

(interestingly the article was written in the July 7, 2015 but somehow ended up in my feed reader in January… I guess the bump is real? Nevertheless, a great article)

The Hateful Eight, Quentin Tarantino’s new film, is a deeply interesting failure by Todd VanDerWerff

You know, this is an interesting time to release a film that many–who I dare say consciously practices political correctness as a lifestyle–find offensive, repulsive, or both. I didn’t particularly found the film to be thought-provoking, neither did I find it good or bad. I love Tarantino’s storytelling most of the time but in terms of plot it’s just a bag of mixed feelings altogether. Either way, I wasn’t offended nor disgusted… I do I agree with Todd VanDerWerff:

Pay attention to how the story works, though, and you’ll find that Daisy is granted almost no backstory beyond the bare minimum needed to set (or keep) the plot in motion. We know she’s a murderer — there’s at least a semi-convincing warrant for her arrest — but we don’t know anything about which murders she committed or why there’s a $10,000 bounty on her head.

While I don’t agree on the whole “society treatment of women” line (mostly because it’s far-fetched, and because Daisy is practically the only female that’s alive (not considering the three women Daisy’s gang members killed to get her out @ Minnie’s mostly because there wasn’t a modicum of development in any of them); the film is truly messy in terms of conveying the message to the audience. Personally, I was just indifferent to any of the characters in terms of connection or feeling anything for them as most of their conflicts were too brief, and to know it was just 3 hours long.

The fight isn’t over yet

So… after writing Onward, I say! I spent pretty much all day looking for answers. And I found them. Turns out how I was interacting with the database was sort of wrong, I need to tweak some things:

ta-da!

I was able to maintain a pretty responsive UI while the internals worked as hard as it can to make data available. Then I ran into a threading issue where quite frankly I had to rewrite the parser two times. Most of the rewrites were because I failed to understand how the stream parser worked rather than the source being faulty. Turns out that the threading issue was caused by a while never ending loop due to the parser never moving to the next element so it always gave me the same one.

All in all. I managed to solve the database issue, refactored the mechanism that gets the data and it’s oh so much better now; I managed to remove the complexity of it and now I just do a few conditional checks to see if everything’s okay.

The new parser seems pretty stable, rather… it’s probably the most stable parser I have written… so hopefully I won’t have to do any serious changes.

I think I can finally take a breather…

Onward, I say!

Writing this as a relief and to vent a bit… I guess.

So first of all Happy New Year! Hopefully this year will be filled with pure awesomeness. Secondly, my god managed network requests can really burn you.

I stumbled upon two serious bugs, one being that Atom reader wasn’t doing its job properly and I ended up writing it completely thus now it shouldn’t have any problems. Now, parsing through content can be sometimes tedious but manageable. I have done it so many times in the past in unrelated projects that I more or less know how to handle certain issues.

Networking sadly… is a new issue for me, but see my conclusion wasn’t that the tool was bad… rather that my application’s design is not bad but doesn’t really adjust to how QNetworkAccessManager plays. The designed classes to read Atom and make requests were both really bad designs as in, at least in the network part, was naively crafted. I had this great idea of stress testing my application to see how it would handle large amount of requests, in turn I had to implement around 300 line of codes to fix a few annoying issues and thus took care of:

  • Web servers don’t play nicely, don’t expect it to accept your request if your request don’t have headers like Accept, Accept-Encoding, User-Agent. I then by mistake added gzip in my Accept-Encoding which forced me to remove it as I currently have no interest in reading compressed content (yet).
  • No timeout. No timeout is just that. If your request doesn’t make it don’t expect the reply to erase itself. I didn’t have any timeout management
  • No supervision on how many requests to make per… … per what? there wasn’t any restriction thus it made the QNetworkAccessManager behave completely different.

The solution I have created felt so hack-ish I’m not slightly happy about it thus I’ll have to redesign how the network part interacts and how the network part interacts with the database.

While I was testing I ran into another problem: there’s no way to prioritize signals in Qt so I have to do the abstraction myself, which I don’t mind. To me providing a responsive interface is more important than the availability of data (which should fall into a “normal” priority). So in that department … I literally have to refactor a large portion of the application which is scary itself.

But… I must cut my losses and carry on. Most of the problems have been bad design itself… which is good and bad. Good because most of the logic is sound, bad because the design is a clusterfuck to manage.

Aight, well… go me, I guess.