10/04/2015

远交近攻

Robb让Theon当使者是他一连串错误的开始。Robb刚被加冕的时候,面临主战实力不够,主和内部压力太大的问题,考虑到Winter is coming的背景,在大的战略上逼Tywin签立城下之盟是正确的。但是在战术上,他选择了给Cersei开了个不可能答应的条件,然后送Theon回The Icon Islands。前者可有可无,但与其让主张更软一点的Catlyne和更硬一点的Karstark两边都不满,不如选择试图和Renly、Highgarden结盟(Stannis试都不用试,但是也应该排遣使者说明自己无意染指Kings Landing,自己虽然称王,但愿意为南方诸国挡在The Wall和Riverrun之间),在军事上配合Renly,让Tywin无法兼顾Riverrun和Kindslanding;后者则是最大的失误,一是不应该派人质当使者,二是不应该对Balon居高临下地说什么Give him a crown这种屁话,相反对Balon应该比Renly更加恭敬,因为如果能说动Balon牵制Casterly Rock,作用比攻占Kinds Landing更大,能主动出击的Tywin显然比只能被动防守的Kinds Landing更为重要,毕竟北军的目的并不是统一全国。

如果真的这么做了,Balon可能会起到更好的作用,自己大本营Winterfell也不会被冲动男Reek一锅端;和Renly的联盟会在Stannis暗杀成功的时候瓦解,但Highgarden会有机会联手北方而不是Lannister,因为如果Lannister被Balon和Stark夹攻,Highgarden就不会那么明显地去选择Lannister结盟了。

总之欧洲土老冒就是不明白中国人两千年前远交近攻的智慧。

4/15/2015

I Decided to be AFK from Diablo 3... Unofficially

As the clan leader of Australian Gamers, which is the largest Diablo 3 clan in Australia, I decided to unofficially be AFK for a while. The reason was that I made a big mistake, but here's briefly what happened in the start of Season 3:

Day 1: Reached level 70 in 6 hours as always (could be 5 with a good team) and being able to do 2 player T6 at the end of the day with charge set.

Day 2: Being able to farm Greater Rift lv 40 with waste set at the end of the day.

Day 3: I thought one of the conquests was levelling a legendary gem to level 40, but actually it was 6 gems... Found out when I levelled bane of the trapped to 40 and was so frustrated and decided to be AFK since I feel like I should start to do something constructive, for example work overtime. 

Basically I'm hitting the bottle next in some conquests, for example:

- I won't be having enough time to level 6 gems to level 40, which may cost 2 or 3 nights.

- Gem of the hoarder only drops in vault in season 3 and I don't have time to farm for it, so no 50M gold conquest. It can be painful to try to look for the vault and may take 2-3 nights to complete.

- I've completed GRift 40 with IK and charge sets, but tried several times with charge/IK + earth and failed, and I don't have time to build another class (though this would be the easiest one for me it's still going to take a whole night).

- Other conquests are even harder or impossible for a single player, and I prefer solo a lot (our clan members are quite active though it's just my personal preference).

The game is still great (much better than Hearthstone and Heroes of the Storm) and it's even greater in Season 3, but I simply don't have enough time. Too bad. BTW thank you Vlad for helping manage the clan! Wish all of you the best of luck and I'll be back... Soon.

4/14/2015

IBInspectable Cannot Be Optional

Not sure if Swift 1.2 fixed this but

@IBInspectable var title_align_center: Bool?

Works in Interface Builder but the app crashes without warning. IBInspectable cannot be optional.

4/09/2015

Switching from Tab to Buffer in VIM

When I started using VIM I didn't realize that tabs were supposed to be used as different window layouts, and buffer serves the role for multiple file editing / switching between each other. Actually in the beginning tabs are not even there before v7.0 and I just opened one VIM inside a terminal tab (I was using gnome-terminal at the moment), and switch between tabs using alt+numbers, since I thought using commands like :buffers, :bn and :bp were too much for me. When VIM 7.0 was released I find it's easier to manager a lot of files and switched to it, but recently I just realized that buffers should always be the way to go, unless one thing: you need to configure it to make it works right.

So I tried vim-airline and enabled the visual on-top tab-like buffer bar, but graphic was having problem with my iTerm2, so I tried a couple of others and it seems that MBE works the best for me. I also set shift+h/l as shortcuts, since the original ones (moving to the head/tail of the current page) is not very useful to me.

map <S-h> :bprev<Return>

map <S-l> :bnext<Return>

It seems to be even easier than gt and gT, and :e is easier than :tabnew too. I find :bd is not as convenient as :q though (MBE is having some problem with it) but I can live with all files in buffer I think. Glad to learn more things when I'm getting old.

This is not Cool, Dude

Recently I've been working on some code wrote in 2013 by some dude, and I kind of feel it's funny due to the quality of the code. Yes there are some more advanced topic about how to write good code but you don't really see example of bad code everyday, for example:

[[[[self tabBarController] tabBar] items] objectAtIndex:3]

And I'm about to change the order of the tabs.

UIViewController *viewController5 = [[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:nil];

Nice variable name.

Duplicated code.

It's hard for us to totally avoid duplicated code (especially for those 2-line codes), but copy/paste the whole login code/xib into 2 places is just... not very common.

CGRectMake(0, 0, 320, 44)

It used be everywhere but not anymore, so hi old buddy! Actually you don't need to use things like UIScreen.main_width, self.view.w should be fair enough (+main_width and -w are from LCategory) in most cases. 

Why, oh why?

    if (selectedScope == 0) {

        distanceToFilterResults = filterDistance500M;

        [[QCDTaskMaster sharedInstance]setFilterDistance:filterDistance500M];

    }else if (selectedScope == 1) {

        distanceToFilterResults = filterDistance5KM;

        [[QCDTaskMaster sharedInstance]setFilterDistance:filterDistance5KM];

    }else if (selectedScope == 2) {

        distanceToFilterResults = filterDistance50KM;

        [[QCDTaskMaster sharedInstance]setFilterDistance:filterDistance50KM];

    }else if (selectedScope == 3) {

        distanceToFilterResults = filterDistanceALL;

        [[QCDTaskMaster sharedInstance]setFilterDistance:filterDistanceALL];

    }

I totally don't understand why someone would write code like this. There are more than 5 ways to make the code cleaner.

...

There are a shit load of stuff like this, and guess who's not cool? It's me 'cause I'm making fun of other people, which is totally not cool. Don't do it kids.

4/04/2015

No Surrender Option in Heroes of the Storm? OK Let's FEED!

Today I read an office blog from blizzard at http://us.battle.net/heroes/en/blog/18543837 since they "believe the game is never officially over until the core is destroyed", and linked a match video to back it up. For those who don't have to time to watch it, I'll explain what happened:

  1. This match is between blue team "Tempo Storm" and red team "BarrelBoys" on the graveyard map, which are 2 professional teams that every member of them knows how to cooperate with the other members, while in the normal match making we usually face players who don't even know how to play the game properly and refuse to take advice.
  2. In the beginning of the game, Red dominates the game, got a couple of kills without being killed, and got a 60+ skulls. However, until level 10 Red was just one level ahead, while in match making you always find yourself 2 levels behind when you're in a really bad team.
  3. Red made the first mistake by not entering mine for the 2nd golem in time, which resulted them in a position with a 30+ skulls golem. And then they made the 2nd mistake by pushing with the weak golem while all 5 Blue members were there. So they failed and the levels were even.
  4. Red made the 3rd mistake by entering mine in the 3rd time too early - at 00:30 seconds mark and spread which was bullshit. Blue easily came in with a better team formation and got a 100 golem. This kind of mistakes can only happen in professional matches because all members have to blindly follow the leader, which is not the case in match making, and it's pretty rare to make 3 big mistakes in a row TBH.
  5. Here's the real turn around. Red made the only right and final decision: a final push. They ended up killed the whole blue team and ignored the 100 golem, and won the game with only 2% health in its own core. I admit it WAS a turn around, but it's still only 1 level difference between the 2 professional teams, while in match making it's easily seen 3 or even more level difference between a good team and a really bad team.  

So this match just proved the contrast: there are not that many come backs in match making. Of course I played a lot of matches with come backs but firstly it has to be the case that everyone seems to know how to play the game, and secondly, it's not too behind. For noob vs noob it would be fine for me because I can deal with 2 or even 3 noobs in a match. For average vs good it's hard but we still have chance because I'm good myself. For noob vs good it's really painful, especially noobs always ask for strange things and dont' take any advice. In this case a surrender option is not going to help too much because noobs would like to continue anyway, but it'd still be good to have it there because sometimes there are noobs with good attitude. And finally there are cases that we are in a good team but the enemy team is elite. They may be a good team themselves with cooperation etc. and everyone in our team would surrender due to the shitty match making system.

So you see, the core of the problem is match making. Since they can't make it even for now (it has to be hard and I wouldn't expect it) they should admit it and add the surrender option. This is the problem of Blizzard: they thought they were better than the players to make decisions, but in the fact they are just some awful designers sometimes. There are a lot of mistakes made by Blizzard. For example, in Diablo 3 it's not hard to calculate the in-theory max output of a build, since the set items are already there. But they still make some numbers really off and adjust them quite randomly, e.g. they nerfed the Immortal King set from 500% damage enhance to 100%. For a game designer you should at least do some calculation and found how off it would be to put a 500% damage enhance there in the first place, but they simply didn't. And as technicals and businessman they made some awful decisions too, my favorite one was that they thought Healthstone was going to be a small game and had chosen Unity as the engine of Hearthstone, while looks like shit and produced countless graphic problems later. Even now in the early-mid 2015, the newest patch still introduces ridiculous bug like showing "ghost" cards in deck making, and even I wouldn't make this sort of stupid bugs there if I've done it with my own engine, needless to say for Blizzard because they are really good at game engines. So back to the topic, they can introduce some punishment in surrender etc. but they just simply refused to admit that they FAILED to make the game even. It's perfect fine no one would expect 100% even matches in match making, but at least you should add surrender there so that I'm not going to do something I don't want to do, but I'll have to do when I feel it's all Blizzard's fault, which is simple: feeding.

Blizzard is able to know whether I'm playing the game or not, but it can never know if I play it in a good or bad way because there are so many shit players there. So I would just attack click enemy core every 3 to 5 minutes or so and write some blogs at the same time. Anyway, what's so hard to feed? It would be even better if I just wrote complain letters to their customer service and use their human resource but that would be too harsh. It would be more effective though if that can make them realized how silly they are, but anyway I don't care.