Thursday, September 10, 2015
One handed programming and other things you didn't expect to read about in this blog
It's really been a while since I updated this blog. I've been dealing with difficulties balancing the work demands of writing editorials in topcoder and etc.
Tomorrow we have a new SRM, 667. It's going to be a very special SRM for me although not for happy reasons. You see; last September 1st a car hit me and I got a shoulder fracture. It was described as a lucky outcome and it seems like conservative therapy that consists of immobilization and waiting for the bone to heal on its own is the best approach. As a result, tomorrow I will only use one hand, my left hand (I am right-handed) in tomorrow's SRM. Let's see what happens.
Of course my real concern is about how it will affect my performance writing the editorial. As of late and after finally dealing with the old delayed problems that stacked up since last year. I've been really trying to get the editorials back to their former quick publishing glory. It kinda worked with 666's editorial. But of course the issue at hand might slow me down. I am optimistic, however. I was able to solve and write the editorial for the TopCoder Open round 2D after the accident. I just needed longer breaks after each problem.
In happier news: I have recently started a Patreon . It's focusing on my computer art and twitter anti spam work. I wonder if I can expand it for explanations of algorithmic problems? Maybe.
Thursday, June 12, 2014
Around 2010 I started using twitter. That old account has turned into something. I participate in twitter a lot and I am very opinionated so it has taken a direction that may not be liked by everyone who just wants to talk topcoder stuff.
I really started to feel the need for a new , more professional / respectable twitter account, so I started a new one that will be focused on programming and mostly contests (you know, my job). My old account will probably just retweet those things. But if you want to follow me on twitter and only get programming (contests) opinions and updates and links to updates to this blog, you should follow the @fakevexorian account.
Sunday, May 11, 2014
The greatest topcoder t-shirt never made
The other day I received my SRM 600 t-shirt. If you kept attention you'd remember I did terribly in SRM 600 / SRM 600.5 , so you are wondering what's up with that? Simply, turns out all the problem setters / testers who worked in SRM 600 got their t-shirts too. And I was the editorial writer, so this is actually the first t-shirt I got because of writing editorials rather than because of competing.
If you are wondering how the SRM 600 t-shirt looks like. In the front it says [SRM 600] in large letters the back , it has the new Topcoder logo. It is black.
But this blog post is not about that t-shirt. But about this old TC forums bit:
forums linkMembers, admins, country wo/men:We're trying something a little different for the TCCC T-shirt this year.
Thanks to the thread about best member quotes, http://forums.topcoder.com/?module=Thread&threadID=512175&start=0 we thought, "Wouldn't it be cool to see a member's quote on the back of the TCCC T-shirt?"
So, here's what we'd like you to do. Search your little hearts out for your favorite member quotes. Post each one individually, so the member community can use the feedback symbols (+/-) to show their like or dislike of each quote.
Then, on September 11, TopCoder will select the top five quotes. A quote will be chosen if it meets all of the following requirements: member popularity, originality and TopCoder/programming subject matter. On September 18 everyone (admins included) will vote from the chosen five for their absolute favorite.
There won't be any prize money given, but won't the winner feel warm and fuzzy knowing a little part of him or her is being worn by 2000 people? I know I sure would.
To get the ball rolling, I've posted a few of my favorites below.
C'mon, let's see some more now!
(This was eons ago, back when TCCC was a thing)
And the reply:

sql_lall wrote:
I have this quote on my wall at home :) I'm wondering though, how long it'll be until someone changes their quote just for this thread. i.e. ""I memoized inside a ternary search and all I got was this lousy t-shirt" ;)
[Edit: removed my member quote suggestion, as I'm guessing most people are voting for the quote mentioned above. But then again, I could be wrong :p]
So, this is awesome, what happened with this t-shirt idea? Back then, topcoder decided t-shirt contents using the Schulze method. (Topcoder actually deciding anything using a poll now sounds too Alien of a concept). And another idea won: doh
I mean really, An Edison quote? EDISON?? Nobody likes that guy anymore. Disappoint.
Saturday, February 08, 2014
vexorian FAQ
I keep getting some questions so I am gonna leave answers here.
Q: What tool do you use to draw your images?
Whenever I have no idea how to explain a problem, I use images in the editorial / problem statement. My images tend to look pretty darn good. So it is not uncommon I get this question. The short answer is : I use inkscape.
The long answer is, that as you might figure out, inkscape is actually just a simple vector graphics software that is not even a full tool like Adobe illustrator. I use Inkscape because it is free and cross platform. Cross platform is important because I use Linux. Free is important because I avoid promoting proprietary software and a very effective way to avoid promoting proprietary SW is not to use it. I am not a graphical designer, so I can easily afford using Inkscape instead of a costly tool with ethically dubious licenses.
But I think the question is really: How do I make images look so good in editorials. Well, first of all, I have had plenty of Inkscape practice before becoming an editorial writer. I had to learn a ton of Inkscape when I was making graphics for a game that is called Xye, eventually, I made my brother the graphics designer make a new, more advanced skin, but I still like the graphics I was able to make... Of course, when I started writing editorials, my inkscape skills weren't so good either. I still needed to have more and more practice. I am far of being an inkscape expert, but I did end up making quite a large number of images that explain algorithms. So there is that.
The other part of the equation besides practice is that I make sure that the images are rendered as vector graphics instead of bitmaps. This makes the images look good regardless of scale. My editorials have plenty of javascript and CSS tweaks that make the images use SVG format and scale them up or down depending on the user's resolution. Albeit, it is a bit pointless at the moment because TopCoder's wiki site does not have a mobile mode :/ But if your PC uses very large resolution, you might notice something :)
Q: Do you even have a job?
(Or variations like "where do you work?", "Do you work for Google"* , "Do you study?" )
I have a job, I am the editorial writer at TopCoder.com !. Really, that and the occasional SRM problem set is all I am doing for a living right now. It is not the most profitable job ever. And I am only an "independent contractor" of TC, meaning I have no fixed salary, benefits, protections or responsibilities (besides delivering "deliverables" in a decent time) In fact, it is getting extremely time-consuming lately with SRMs getting a lot harder and more frequent than they used to be. But it is okay to me, and it fixes my needs. It allows me to earn money by programming in mostly c++, programming cool little problems as opposed to software (I HATE software development).
I also supposedly study. In my case University was a terrible, terrible thing that didn't work out very well. I am extremely late in graduating. I don't even care anymore, to be honest.
* Actual question happened at least 6 times, for some reason.
Q: Why don't you have a red rating in topcoder?
I am just not that good during contests. I actually constantly struggle to solve the division 1 hards and mediums before being able to explain them. Specially lately, every tutorial has been a little miracle. In this very moment I am facing issues solving a division 1 EASY problem!
Q: Why don't you participate in Codeforces / Codechef / ACM / etc
- I try to participate in Codeforces. I don't love it that much but I sort of like codeforces. The contests are more challenging (because Codeforces' division 1 has higher density of uber good coders than TopCoder's division 1 has). Although the probability to find problems that are repetitive or annoying is also slightly larger. The main reason I don't join more Codeforces contests is time availability. Specially with TC editorials taking a lot of my time. When I am not writing editorials I am a bit tired to be participating in more contests :/. Also, about 1/2 of the time, the time slot is quite incompatible with me. Sunday matches, for example, are very hard for me to do.
- Codechef has similar issues. It is in third place so it has much less priority than Codeforces - If I only had time available for one contest and I had to choose between Codeforces and Codechef, I would choose Codechef - so it is less likely I'll participate. And the times Codechef picks ARE TERRIBLE FOR ME! Like I mentioned, Sundays are a big no for me, so that means no Cook-Offs. Solving the 15-day monthly challenge sounds like a Herculean task considering I possibly already spend 15 days a month writing editorials :/. I am also not a big fan of them using ACM rules for cook-offs (see below).
- ACM / ICPC / their online judges. Did I ever mention I hate the ACM contests? They have these terrible format/scoring rules where problems letters are randomly-assigned. The time you take in the first problem is weighted excessively in the final rank; Groups are mandatory; The problems are low quality (They have been improving a bit , but not enough); etc... :/
- Hackercup: I would need to join facebook to participate in this one. And that's not going to happen.
Q: How do you solve $HOMEWORK_PROBLEM?
I am not a forum, I barely have time to solve problems that I get paid to explain. Could you avoid contacting me personally to solve a specific problem? Unless it is a problem I wrote and no one has submitted a correct solution in the practice room / spoj... Well, I am not saying that you should *never* send these problems, but don't expect me to be very helpful. Many times I do try to solve whatever problem people sent me, but remember: I am not that good at solving problems! Many times I have no idea how to solve the random problems you send me :/
Wednesday, October 09, 2013
So, TCO 2013 video contest
Yeah, I am not going to the TCO this year, at least not through a video contest. That was far-fetched. Anyway, I take this opportunity to say that some videos in this contest are really great, are actual videos and deserve votes. I suggest voting on the ones you like the most. The raw number of linkes determines the winner (and yeah, I am not sure that's a good selection method)
I like the first one because it really shows how it feels to be a TopCoder.
Friday, May 31, 2013
Script to recover the old gmail favicon
Update: I've noticed this is getting many page views lately. Unfortunately, it no longer works. Google learned about leaving their old icon in the servers and changed it too. The only solution I can think of is hosting the old icon somewhere else and changing the url in the following script to use that hosted icon.

Yesterday gmail changed the favicon.
I don't like the new one. I wonder if the designer has ever witnessed the effects of lightning in a real life envelope. Shadows don't do that :).
This is serious business for me, because I am in front of a computer most of my life. And most of the time I am in front of a computer, it is looking at my browser window. And most of the time I am looking at my browser window, the gmail icon is the one in the first pinned app.
But I am a programmer, and I know how to workaround issues. I always have greasemonkey installed in firefox. It is an addon that allows me to specify some javascript scripts to run when visiting specific pages. All I had to do was to create a script that could change the favicon...
With some research, I found out that when google changed the icon, they didn't replace the old file. Instead they just created a new one. So all that the script needed was to change the address. A google search for "Change favicon with javascript" took me to a stackoverflow thread: http://stackoverflow.com/questions/260857/changing-website-favicon-dynamically/260876#260876
So here is the link to the userscripts.org entry: http://userscripts.org/scripts/show/169207. And here is the script itself:
// ==UserScript==
// @name old favicon
// @namespace nouglyenvelopeshadow
// @description Changes gmail's favicon back to the old one
// @include http*://mail.google.com*
// @version 1
// @grant none
// ==/UserScript==
(function() {
var link = document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = '/mail/u/0/images/favicon.ico';
document.getElementsByTagName('head')[0].appendChild(link);
}());
Tuesday, April 09, 2013
A public service announcement from vexorian
Note: I just finished typing this. I notice that it is very long. So I am finding it difficult not to be embarrassed by this post.
This post is very personal, but I have this urge to share. It also has a (very small) relationship with coding contests performance.
There are two things that I think would be instantly evident to those who have met me in person and are not so evident to those who have only read me: 1) I am overweight. 2) I am as socially awkward as heck. The social awkwardness and my discomfort in social settings are something I shall worry about another day. This post is mostly about weight.
I think I have been overweight for most if not all my conscious life. There anecdotes of me having quite the appetite when I was 3 years old asking to eat 3 or 4 boiled eggs in a morning if given the chance. My appetite has been like this for various reasons. For example, the best way my family has to do things together and communicate and enjoy each other is to have a good breakfast, meal, lunch or dinner. It helps that both my parents are great cooks.
For most of my life I also never cared that much about it. Thinking that the pursue of a better body shape was a banal goal. This was a mistake. Like most (I imagine) people that read this blog, the being relatively good at programming and math stuffs has led me to believe that I am a smart and intelligent person, but what I've been doing all this time was pretty stupid and self-destructive. The link between being overweight and being at risk to have health issues was never a secret to me. But I took it lightly. Fooling myself to think that, I was doing fine overall. I have never had a loss of energy, I almost always go to the university and back home on foot (totaling about an hour of walking).
Indeed, It seems that my body is currently "healthy" but full of risk factors that would make this stop.
What happened
More than a month ago, my brother (an adult) got Chicken Pox (He was vaccinated, but it is possible). Chicken Pox is said to be much more dangerous on adults than children. I had made the mistake to learn too much about this disease through google and wikipedia walks. I have learned of all the risks, including the ultra rare ones. During that period I was very worried, worried that my parents could get infected, worried that I could get infected; and that anyone of us would get the worst complications. My brother ended up just fine, with nothing severe but having to stay in bed for more than a week was probably not that great for his university responsibilities.
I was enjoying the relief. Until March the 13-th, a Wednesday. I had an editorial whose completion that was very delayed. I also had homework for Thursday. I stayed until late at night doing the homework. I would then use the post-class morning and afternoon to finish the editorial. All was going fine, except for a feeling of tiredness during Thursday... I also tried to sleep during the day when the editorial was finished. I couldn't do it, It seemed that the climate was too hot and couldn't sleep... So I decided to wait till the night and went to sleep. Then we had an SRM late in Thursday night.
I remember I slept that night, but it was a sort of partial sleep, because I woke up even more tired, but with the most terrible headache. I usually have headaches once per 1.5 weeks but they are mild and just go away. This one was like the mother of all headaches. It never occurred to me that I had Chicken Pox, but I went to the doctor because the ache was impossible to stand. At the hospital, my blood pressure and weight were measured (routinely). I was told that I had very high blood pressure. That was the diagnosis that day: High blood pressure is usually a source of headaches. I was told to have analgesics, avoid salt food and pay the Cardiologist a visit on Monday.
Once again, I went to google university and learned all about blood pressure. The potential risks are quite scary. But the analgesics kind of calmed me down. That afternoon , I had to go to a class. I am on a Compilers class, to win my last credit... This class is a huge waste of time. I wrote compilers for two languages. They were very ad hoc compilers, and very lame ones with tons of workarounds. So I thought an actual compiler course would be a good idea - It wasn't - The final objective of the curse is to write a compiler that is even more precarious and ad hoc than those I already wrote. But since I should do this thing or wait 6 more months, I am doing my best to pretend like the course is difficult. Coincidentally, the last two scheduled classes were suspended. When I arrived to Friday's class, I noticed that I had forgotten that it was the day to show the lexer (No, we are not even using grammars to decompose tokens, all has to be ad hoc). I didn't have the lexer with myself because I forgot. So I had no choice than to use the hour or so to write the lexer again from my head. Note that I was with the headache, and that the computers barely have code::blocks in windows as an option for c++ code.
The next day, the headache was gone and I felt good or so until the afternoon when I decided it was a good time to make the editorial for SRM 573. For some reason I felt some urge to finish it fast. I was lucky that the hard problem was not too difficult, so I could finish it. But I kept feeling weaker and more flu-like throughout the process. I really did my best efforts to complete the editorial that day.
That Saturday afternoon was the worst. I had heart palpitations, which were very noticeable. I was also feeling like everything was too hot. I wondered if something bad was happening to my heart. I couldn't sleep even though I was tired. The Sunday morning, we finally noticed : I had Chicken Pox. I went to the doctor, but failed to mention the palpitations... I was a bit afraid. The Chicken Pox standard treatment: Bed time until it dries plus some medications to treat fever and lower the reproduction rate of the virus.
My Chicken Pox turned out to be very mild (Probably because I am vaccinated?). Except for the awful headache on Friday and the Palpitations on Saturday. I postponed the date with Cardiologist for a week because I had to stay in bed. Staying in bed is not that hard when you have a laptop. I was also very lucky that there were no SRMs (And no editorials to write) that week. I think that I subconsciously saw that coming and thus the reason I rushed the editorial for SRM 573.
What was not mild
The Chicken Pox was mild, what wasn't mild was the stress I started getting. I was not even aware of it. But I was very worried about my parents. The palpitations episode from Saturday was also scaring me. During the nights during that week, I didn't have palpitations, but I was paing more attention to my heart and it is possible to hear it beat when you press your ear to the pillow. The heart beat made me nervous. But what really scared me off was the ... shaking. I started to shake my right arm and it appeared that it was because my heart was beating too strongly. (All of this was my brain fooling myself)
Date with Cardiologist, everyone in the world was worried about my high blood pressure (Not normal at 28 years old). But I was more worried about the heart issues and finally explained what was happening. It turns out that right arm shaking is a clear sign of stress issues. And that my heart was very healthy but was beating strangely because of..stress. After that day I noticed that my arm shakes were unrelated to beat rhythm. I was being the victim of an imaginative brain.
So then they focused on the high blood pressure. It seems that Chicken Pox did raise it to crazy levels on Friday, but my normal (no fever, no disease) pressure was still higher than what you should expect on a 28 years old. Very risky because it would mean that when I go older I would have really high blood pressure. I started a treatment. My weight was the first to blame. Then they measured my cholesterol levels - very high. Now I have three very relevant risk factors for heart disease. I was put on medicines to lower the pressure and a very strong thing to reduce cholesterol levels.
The stress and the arm shaking didn't go away. In fact, at times it got worse. When I saw how high the cholesterol and lipid levels were and when I researched the side effects for the cholesterol-lowering drug... Since last Thursday I've been experiencing discomforts in the chest. But they turned out to be muscular-related and most likely caused by ... stress. My heart is still healthy, but unfortunately, my mind is not so much. It is difficult to relax about your heart risks if at the same time your stress causes you to shake and have chest aches. I mean really, stress is a Jerk. All this anxiety and paranoia about my heart is what has been causing delays in editorials lately. Round 2A was difficult to me, but the admin explanations I received were good. But I have had difficulty to focus. Do you remember I forgot to register for SRM 575? In part was because I have to focus very strongly on an editorial if I want to ignore the stress and anxiety. Thanks to all this I did something I never thought I would do - reject making an editorial. What's worse is that this time, the div1 hard in SRM 575 is not so hard :(
I currently think that Dr. google is a terrible doctor. Regardless of good intentions and that there is accurate information out there, there is also inaccurate information, and overall, even accurate information may not be understood by people with no medicine knowledge. It gives you reasons and excuses to panic. Also, be a critical thinker. Reports from internet users about drug side effects are most likely to be negative. When a person takes a pill and has no side effect, she has no reason to say anything about it.
Weight loss
I am feeling better. As part of a weight loss initiative, I have begun to eat half of what I used to eat at lunch, breakfast and diner. And will not eat outside of schedule. I am also waking up at 6:00 to go take a walk and attempt to run. I am already losing weight, but I know that this will be a long-term project.
What I had was mostly hysteria. But I think that feeling proximity to heart disease, even though it is imagined (although the risk factors are not). Was what I really needed to make changes to my life style. For a small time, the risk really felt real to me.
For the public service announcement part. Don't neglect your health. I also think that my prospects would have been much better if I made these life style changed far earlier than 28 years old. Have routine checks, eat healthier and avoid a sedentary life. Because one night, your health neglects might hit you like a brick. If you take a proactive role instead of waiting to get hit, you will most likely have less stress issues when dealing with it. Also, it is not that bad. I really didn't expect that I could just halve my portions and I don't feel hungry or anything.
Update: I intended to write this paragraph since I started this post, but it seems I forgot: Not only will your neglected health hit you like a brick, when it happens, it will cause discomfort to your life and make you unable to do the things you like (at best for a while). So just focusing in the things you like to do and not leaving time for your health (because you feel you don't have enough time) will eventually be counter-productive.
I had multitude of signals that I needed to change; and I ignored them. For example, last year when I went to the TCO, it was clear that almost everyone (finalists, sponsor employess) was at least relatively fit. I am starting to suspect that better body health might play a factor in coding contest performance. I even remember reading more than one interview with high level coders suggesting physical exercise, but I can't find them.
Thursday, February 16, 2012
ListedLinks 2012-02-16
Please note that the following two days there we will have Codeforces and a TopCoder SRM. The Codeforces match is the first division I match in some time and the SRM will be "Thanks to google". That's relevant because there will be the usual question about whether you want to share your data with the sponsor for employment opportunities when registering for the SRM - And this time the sponsor is Google, do the math.
As for links.
- 6 Terrifying user agreements you've probably already accepted. - Cracked.com
- Lousy Random Numbers Cause Insecure Public Keys
- Clearly you have some sort of issue with gender (webcomic)
- Second city in China halts sales of apple ipads Poor little apple going through the same thing they did to Samsung in Germany.
Saturday, February 11, 2012
Google autocomplete awesomeness

It is gratuitous bragging day!
* The optimizer is a tool I made for warcraft III maps. Actually used by just about anyone who wants to save up some map size and "protect" the map. And yes, that includes DOTA, which is not a game that uses blizzard's graphics, it is a mod for Warcraft III.
Saturday, February 04, 2012
ListedLinks 2012-02-04 - Censorship edition
Richard Stallman about that very topic.
This can be dangerous for the same reason Twitter's per-country censorship is dangerous.
EFF: What Does Twitter’s Country-by-Country Takedown System Mean for Freedom of Expression?
For now, the overall effect is less censorship rather than more censorship, since they used to take things down for all users.
RMS' response
Now, however, there is nothing to discourage Twitter from opening an office in Turkey and censoring people there, opening an office in Thailand and censoring people there, and opening an office in the next Egypt and censoring people there.
The one common defense for these moves is that sites have to abide to local law. I don't really agree that much. I don't think it is proper to abide to laws that are not fair. I also think that twitter/google could just avoid to make new offices in countries that force them to censor.
Note, however, that this is nothing new once we remember that google's search has been doing this in China for years.
---
Speaking of censorship, please do remember that we are back to the age of library burning.
Megaupload's Innocent Users Deserve Their Data Back
Thursday, February 02, 2012
ListedLinks 2012-02-02
---
I am sorry, but I can't resist the urge to share links anymore. Ever since google (GOOG) removed the reader sharing feature and I couldn't find any good alternative. I have no choice but to post the links in a blog post.
Speaking of google, it seems that they lately are doing something that I find pretty ominous. Their urge to "unify" all their services. It became clear when they crippled google reader. First, they imposed the same visual style and then making all their services subservient to pushing google plus. Now they are unifying all the ToS and ... all the information they have about you.
It does not really bother me enough in the privacy sense to quit using their services on which I have already gotten horribly locked into. Google are not going to be getting more information about me. And they already had ways of knowing that all the information they had from multiple sites was mine. The real change is that now the automated search.
What I really dislike about all this is that Google is finally becoming a corporation. Long gone are the days in which google was a bunch of hackers maintaining different sites and services with little intro-mission from the top. Now all services have to be part of giantic google and serve their information to giantic google. Google is feeling a lot more bloated than before.
Anyway: First link.
What Actually Changed in Google’s Privacy Policy :
It Shouldn't Take a Letter from Congress for Google to Give Straight Answers About Privacy Policy Changes
-----
Second link:
A case study of the tactics of climate change denial, in which I am the target
I will admit the irony of this attack amuses me greatly; Briggs accuses me of many things he himself is doing. That is standard fare from antiscience group: creationists, global warming deniers, and alt-medders, for example, all seem to project their own tactics on the scientists with whom they disagree. Don’t like real medicine? Accuse scientists of being in the pocket of Big Pharma (and forget about the millions being made by quacks on useless "remedies"). Don’t believe in evolution? Accuse scientists of being too dogmatic. Don’t think global warming is real? Accuse scientists of misrepresenting the data.
---
Microsoft woos disgruntled Google users in full-page newspaper ads — here’s the first one I liked this, because it was a message of optimism. I was depressed of google's action but then MS came to remind me that I got to cheer up, it could be worse, I could be using hotmail. By the way, it would be a little lame to decide to switch to MS' services because of google's new privacy statement, considering that MS' is definitely not really better.
Saturday, January 07, 2012
About The 5 most annoying things about sports (To non sports fans)
cracked.com - The 5 Most Annoying Things About Sports (To Non Sports Fans)'
Thank you cracked, for expressing my feelings in the perfect manner once again.
Sunday, December 25, 2011
It's unnamed holiday day
Don't forget what Christmas is all about: http://www.calamitiesofnature.com/archive/?c=470
Sunday, December 11, 2011
No more link spam, for now
Update: Lol, now feedly has stopped allowing sharing. That's right, just 4 days after I began using their service, they removed exactly the one reason that made me use them.
It is a relief to be honest, I wasn't getting used to their interface. It has tons of issues like requiring tons of clicks and not allowing you to setup a default format option.