Wednesday, March 3, 2010

YAHB

private class YAHB {
StringBuilder buf;
LinkedList openTags = new LinkedList();
boolean hasIncompleteTag = false;

public YAHB() {
buf = new StringBuilder();
}

public String toString() {
return buf.toString();
}

// Requires close
public YAHB tag(String tag) {
if (hasIncompleteTag)
endTag();
buf.append("<");
buf.append(tag);
openTags.addLast(tag);
hasIncompleteTag = true;
return this;
}
// Requires close
public YAHB tag(String tag, String name) {
return tag(tag).attr("id", name).attr("name", name);
}

public YAHB endTag() {
assert(hasIncompleteTag);
buf.append(">");
hasIncompleteTag = false;
return this;
}

public YAHB close() {
if (hasIncompleteTag)
endTag();
String tag = openTags.removeLast();
buf.append(" buf.append(tag);
buf.append(">");
return this;
}

// Full close
public String done() {
while (openTags.size() > 0)
close();
return buf.toString();
}

public YAHB attr(String attr, Object value) {
assert(hasIncompleteTag);
if (value == null)
return this;

buf.append(" ");
buf.append(attr);
buf.append("='");
buf.append(value.toString());
buf.append("'");
return this;
}

public YAHB text(String text) {
if (text != null)
buf.append(text);
return this;
}

// Closes
public YAHB value(String text) {
if (hasIncompleteTag)
endTag();
text(text);
close();
return this;
}

// these conveniences may not work for everyone
// if you add to this, be sure they're actually convenient
// these progress from most general to least


// Requires close
public YAHB form(String name, String url) {
return tag("form", name)
.attr("method", "POST");
}
// Requires close
public YAHB form(String name) {
return form(name, "#");
}

// Requires close
public YAHB input(String name, String type) {
return tag("input", name).attr("type", type);
}

// Makes a label and opens a <p>
// Requires close
public YAHB field(String fieldId, String label) {
return tag("label").attr("for", fieldId).text(label).text(": ").close()
.tag("p").clazz("field");
}

public YAHB clazz(String clazz) {
return attr("class", clazz);
}

// labels and values are processed in lockstep ("dual comprehension")
// the word 'value' is overloaded, yes it's confusing
public YAHB select(String selectId, String def, List

Wednesday, February 24, 2010

New way to write MVC apps?

Seems like you could write a pure XHTML page and insert dynamic elements with XSLT. Writing XSLT is a bitch, so you could use a domain-specific language to declaratively specify which divs to fill in on which events. I'm thinking like:

onload {
'mainbody': "<h1>Huzzah</h1>"
}

action {
'post': doWork();
}

-- continue later --

Lets say CSS selectors or XPath or both.
Since apparently I have the hots for JSON, why not use CSS rules as JSON object keys and pass JSON to a piece of static JS+HTML for construction?

-- continue later --

Tuesday, February 23, 2010

How to DPS for dummies

This post is for people doing 4k dps in their mainspec, and maybe as a secondary benefit people can have a bit more fun with alts and offspecs. I know some of you can't spend the time outside the game I can, so I thought perhaps I could bring some of the info to you. We have a saying in England, "You can lead a horse to water but you can't make it drink". I'm expecting the standard wall of silence but as always I'm happy to talk performance with anyone. Please note we are on the brink of disbanding and consider the contributing factors, our progress has not been good and we have significantly strayed from the "hardcore casual" mandate into plain old casual. If anyone actually finds this useful, some encouragement would really be appreciated! I can do something like this for healers if desired, even have a stab at a tank one.

Gear and tiny optimisations like speed pots are debated so fiercely by the top crowd because a perfect rotation is assumed, at our level (and I very much exclude myself from that top crowd) there are much bigger fish to fry. In light of that I am not including any info on gear. Similarly I am trying to control my know-it-all side and exclude "pro tips" which are likely to hurt more than they help at low skill levels. For example the cat rotation is stupidly hard and a proper treatment wouldn't help anyone, besides there's an EJ article for pros. What I'm really aiming here for is something *short*, which takes only a minute or two to read and is easy to comprehend, yet covers enough to give you 6k dps.

~99% of the info is from EJ, maxdps.com or my memory of reading those sites.
If the acronyms are too hard to understand, I can go through and expand them.
I put a request for help at the end!


[size=150]Cross-class[/size]

Use wow.com, blog sites or (my preference) wowpopular.com to find a good talent build and glyphs. Use that exact build, if something doesn't make sense try to find out why - you are likely to learn something about spell/talent interactions. Don't make little compromises for heroics, they're so easy already. Same for AOE talents, single target dps is always more important - although get them if you have spare points!

Put a little TLC into your UI. It's your primary interface to the game and a poor UI will cost you more DPS than anything else through gaps between abilities and missed procs. You need easy access to not just your rotation abilities, but also all the little things that you use once in a blue moon, like distracting shot or gouge. Rotation abilities need to be a single keypress - you will regret abusing your hands with modifier keys later. I'm a big fan of putting them on the mouse buttons. More rarely used abilities can soak a modifier but go easy, if you're using ctrl-shift buttons something is probably wrong!

You also need need need a buff/debuff (aura) monitor, NeedToKnow is very good then pick one of TellMeWhen or Auracle. NtK gives bars, these are ideal in most cases. You can set it up to have a fixed duration, I'm using 9sec on my affl lock so I get a decent warning and good resolution. TMW and Auracle give boxes, these have a bit more visual impact when they suddenly light up so I like to use them for procs. I've moved away from PowerAuras since I had trouble remembering what everything meant.

Most classes use a priority system now so I'll just list out priorities. Any ability with a dot or debuff component should be used to maintain that and generally not more often. I'm listing cooldowns but it's quite likely I'll forget some, usually I only remember them myself because I see them on my bar. Ideally you'd learn how all your cooldowns interact with heroism, but that's advanced material and totally not necessary for doing 6k dps.


[size=150]Macros[/size]

Macros aren't strictly necessary, but used properly they make your rotation simpler AND increase DPS. I'm going to give some macro "templates", I hope they help you build your own.

#1: Melee, macro /startattack onto all or at least your most common attack. We've all had that moment when you notice several seconds into a combat or after a target switch that autoattack hasn't engaged - macros like this prevent that. This means more white swings, more rage, more procs, more damage.
[code]/cast bloodthirst
/startattack[/code]
#2: Trinkets. When you're just starting out, worrying about trinkets can cost DPS. This macro ensures high uptime, even if that uptime isn't perfectly timed. Many people will see a DPS increase from using a macro like this. Even pros can benefit from macroing their trinkets onto their big burst cooldown (like Arcane Power or Berserk).
[code]/use 13
/use 14
/cast moonfire[/code]
#3: Stopcasting. For when you absolutely gotta cast something RIGHT NOW. Usually if you try to counterspell in the middle of a cast, you just get a nasty message. With a macro like this, it will abort your current cast then instantly counterspell. Also useful for eg purge, cleanse, spellsteal etc.
[code]/stopcasting
/cast Counterspell[/code]
#4: Cooldown fallbacks. Careful with these, they can make you rather inflexible. They don't work well with three spells, trust me on this. 144 is the number of seconds dash takes to cool down, ie 2:24. I use this technique for ABarr/Fireblast and Mana Tide/Mana Spring - cases where the second ability is essentially a weaker or more expensive version of the primary.
[code]/castsequence reset=144 dash, swiftness potion[/code]
#5: A couple of classes, mainly arcane mages and spookies, have to channel their spells. Channeled spells are awkward because if you mash the key too long, you can find yourself restarting the cast. This costs time, doubles the mana cost and loses your next-spell buffs.
[code]/cast [nochanneling] Arcane Missiles[/code]
#6: STFU. Spamming dps keys can cause a lot of unwanted error noises and messages. This macro makes them STFU, simple as that.
[code]/console Sound_EnableSFX 0
/cast Blood Strike
/console Sound_EnableSFX 1
/script UIErrorsFrame:Clear()[/code]
Here's an example of how you might combine some of these. The ! means "cast this even if I already asked to".
[code]/console Sound_EnableSFX 0
/use 13
/use 14
/startattack
/cast !Rune Strike
/castsequence reset=3 Icy Touch, Plague Strike
/console Sound_EnableSFX 1
/script UIErrorsFrame:Clear()[/code]
Of course there's more you can do, but I hope I've covered the most generally useful DPS macros. There are plenty of good macro guides out there, this is just a taste!


[size=150]DK - unholy[/size]

Special: DK is hard. Seriously, this isn't a class for noobs, which is why all the noobs playing DKs stand out so much. I actually use the AOE build and glyphs since the gain from the single-target build is meant to be very small. I recommend singletarget glyphs though, I should switch.
Priorities: IT/PS for diseases, desecration (blood strike), scourge strike, death coil, horn of winter. Don't forget the damn ghoul.
Cooldowns: Gargoyle, AMS and IBF are all very strong. Try to keep bone armor up but don't screw your rotation for it, blood tap can help not mess up your frost+unholy pairs.
Monitor: diseases, desecration. Optionally, bone armor.
AOE: diseases, D+D, desecration, blood boil. Try to notice when D+D is coming off cooldown and save runes for it.
Comment: desecration debuff might actually be called desolation, can't remember.

[size=150]Druid - cat[/size]

Special: omg is this one hard. You NEED a dedicated cat build to get even half decent cat dps, King of the Jungle is a surprisingly huge deal and the expertise is pretty big too. Get FeralByNight mod, turn off everything except move prediction and time-to-live. I even turn off 'suggest berserk' as very occasionally I like to save it. At low skill levels, ignore clearcasting procs and spam abilities as fast as you can. Don't stress if FB comes up but disappears before you can use it.
Priorities: SR, Mangle (IF trauma or mangle(bear) isn't up), Rip (5 pt only), FB (if you have 5 pts or mob will die in <10s), Shred (on CC), Rake, Shred, Tiger's Fury. <5 pt SRs are fine, refreshing SR early is also fine, just don't let it drop! FBN will manage all of this for you and much more.
Cooldowns: Berserk, this is an odd CD as rather than increasing your dps directly, it reduces your energy cost. To maximise this you need to be as near to 85 energy as possible before using it, but not above. You can't use TF under zerk but it still cools down, so try to use TF at about 20-25 energy then zerk. Barkskin is amaaazing and I <3 it 4evah. Feral charge is very good to regain contact.
Monitor: SR, Rip, Rake, Mangle/Trauma
AOE: Use mangle to generate CPs, SR, swipe spam. Cat swipe hits 180 degrees in front of you, unlike bear swipe which is 360 degrees. Zerk + swipe = pwnage, just mind aggro!
Comment: Don't target switch if you can possibly avoid it, our abilities synergise so much and we're so reliant on CPs. If the RL asks "all dps" to switch - don't until they start turning purple. Muti rogues are the only other spec I would accept this from, even spookies suffer less.

[size=150]Druid - Balance[/size]

Priorities: FF, Treants, MF, IS, Starfall, spam. 'spam' means wrath or starfire, start with wrath and switch every time Eclipse procs.
Cooldowns: Barkskin is love. Starfall is a bit better with 2 targets than 1, but it's worth using on CD regardless. Do NOT use on heroic trash, it just isn't worth the risk of pulling adds. Treants can die, avoid using during heavy incoming AOE.
Monitor: MF, IS, Eclipse (Solar), Eclipse (Lunar)
Comment: You might like the Squawk and Awe mod, Van does. I prefer to track Eclipse with the same aura monitor I use for everything else. Eclipse is very variable and vulnerable to movement, if you must move reapply dots while you do.

[size=150]Hunter - survival[/size]

Priorities: explosive shot, black arrow, serpent sting, aimed/multi
Cooldowns: rapid fire
Monitor: Explosive shot, black arrow, serpent sting, Lock and Load
AOE: 3+ just volley. Yawn. For two you can sting the off mob, but stay on primary so you benefit from the damage increase component of BA and SrS.
Comment: Explosive shot actually does its damage over a couple of seconds so don't spam it when L+L procs. Instead, alternate ES with other abilities. Flip to viper between trash pulls, even just for a single tick, and drink up before bosses.

[size=150]Mage - arcane[/size]

Priorities: ABx4+, (Missile Barrage), AM.
Cooldowns: arcane power, icy veins, PoM. Macro PoM to AB, it's not worth stressing over.
Monitor: Arcane Blast, Missile Barrage proc.
AOE: Blizzard :|
Comment: Never use AM when MB isn't up. If you hit 4xAB and have no MB proc you have to decide if you have spare mana (more AB) or not (cut your losses with ABarr). 6-8 ABs is usually the max you should cast in a row. 2t10 burns mana, so if you have to, use as little as ABx2 per cycle.

[size=150]Paladin - retlol[/size]

Priorities: ensure mask buff is up then spam faceroll. Reapply mask buff whenever it drops, hurts a lot otherwise.
Seriously now: SoV, HoW, judge, CS, DS, Exorcism (on proc). Usually you want to apply JoW but if there's no other paladin, JoL can be good.
Cooldowns: AW, bubbles, hand spells. Use 'em. No way I'm going through all those. At low skill levels, just spam AW and let healers know if you have raidwall.
Monitor: Art of War, optionally SoV
AOE: 4+ mobs, consecrate then normal rotation. DS might move up a place but it's so weak and you'll use it 1-2 GCDs later anyway.
Comment: Paladins use a FCFS (first come, first served) rotation. So just smash your face against any button with the temerity to be available. /point /snicker

[size=150]Rogue - Mutilate[/size]

Special: Open from stealth with garrotte if you can, otherwise just mutilate + 1 pt rupture. During combat use mutilate to gen 4+ CPs before any finisher.
Priorities: ToT, (Rupture), HfB, SnD, (Expose Armor), Envenom. Rupture and EA are both DPS losses and can be replaced with Envenom if a bleed or major armor debuff (sunder) is up.
Cooldowns: Sprint, CloS, Feint as appropriate. Vanish (for Overkill) and Cold Blood on CD. Try to CB when you have 1 CP (on Mutilate) or 4 (on Envenom).
Monitor: Envenom buff, Slice And Dice, Expose Armor/sunder
AoE: FoK spam little adds. For bigger adds, slip 2xFoK into your normal rotation just after an Envenom.
Comment: Don't let Envenom buff drop, or waste ticks by refreshing early - but never have 100 energy. You can macro Cold Blood onto Envenom and lose very little dps.

[size=150]Shaman - elemental[/size]

Priorities: flame shock, lava burst, chain lightning, lightning bolt.
Cooldowns: elemental overload, heroism. Safe option is to NOT stack them.
Monitor: flame shock, clearcasting. Optionally, water shield and flametongue weapon.
AOE: Usually I cast CL to get it on CD, flameshock as I run in, drop magma and start running out, use fire nova GCD to keep running then CL is off CD again. Prio firenova then CL. Elem AOE is not easy or strong, accept it and set your meter to bosses.
Comment: Elem clearcasting includes a sweet damage buff, use it on chain lightning. If you can afford the mana, always prefer CL to LiB.

[size=150]Shaman - enhancement[/size]

Priorities: maelstrom proc (CL or LiB @ 5 stacks), stormstrike, flame shock, earth shock, lava lash. (not sure where lightning shield goes, I'd guess just above LL)
Cooldowns: feral spirits, shamanic focus. Wolves are a big piece of dps, don't save them! Focus is a survival cooldown as well as mana regen, save it if you have a serious fear of death (Pungent Blight at FGut is a great time to blow a survival CD)
Monitor: maelstrom, lightning shield, flameshock dot. Optionally, windfury (mainhand) and flametongue (offhand).
AOE: use maelstrom procs on CL, magma, firenova. Keep smacking stuff with bricks on sticks.
Comment: if you screw up and go OOM, drink a mana pot, don't sit on autoattack waiting for focus. Alchemy offers an endless mana pot, same return as a super, which personally I adore as a retlol.

[size=150]Warlock - affliction[/size]

Priorities: Life Tap buff (glyph), Shadow Embrace debuff (haunt), Corruption, CoA, UA, haunt, shadowbolt. Drain soul at 25%.
Cooldowns: none I noticed...
Monitor: DOTs, Life Tap buff (glyph), Shadow Embrace, Nightfall, Eradication. Yeah that's a lot. Optionally, spellstone and fel armor (the SP one not the PvP one)
AOE: SoC (could be wrong here). For a two mob pull, just multidot. You can have two corruptions and CoAs up at once, but only one haunt or UA.
Comment: Affliction is all about not wasting dot ticks. Get good at estimating how long things will live and switching targets early. Still, don't overlook shadowbolt, if you get lost and don't know what to do, lob one out while you get comfy again.

[size=150]Warrior - arms[/size]

Priorities: Rend, MS, Exec, Overpower, Slam. HS or cleave if rage > 50.
Cooldowns: Bladestorm, not good for single target. Sweeping strikes, same. Recklessness - use it! Get a stancedance macro if you like.
Monitor: Rend debuff, MS, execute, overpower. Might be useful to be able to see if HS/cleave are lit.
AOE: Limited. Wait for aggro before bladestorm. Pop sweeping strikes AFTER BS, using it before is a big loss of sustained dps.
Comment: Battle stance. Use bloodrage nearly on cooldown, <20 rage works for me. Use berserker rage frequently, especially if there's incoming aoe. Arms is not an easy spec to play and it falls behind at higher gear levels, the only real reason to play it is to provide the Trauma/Blood frenzy debuffs which may help provide more raid dps than you lose by going arms.

[size=150]Warrior - fury[/size]

Priorities: Whirlwind, BT, Execute, Bloodsurge proc (Slam!). HS or cleave if rage > 50.
Cooldowns: deathwish, recklessness. DW is a lot less dangerous than it used to be.
Monitor: Slam! Might be useful to be able to see if HS/cleave are lit.
AOE: standard rotation
Comment: *so* much easier than arms! And aoe is built in you don't have to muck with BS/SS. You might hear using rend is a dps boost... don't bother unless you're seriously pro.


[size=150]-- Request for help --[/size]

I'm missing combat, destro, fire, spooky, marksman and blood DK. The rest are currently uncompetitive afaik, so while I may include them sometime, they're not a prio.

Sunday, January 4, 2009

A good day

Today we killed heroic malygos and I was paid a huge compliment by my heal leader.
I am awesome.

Sarth +1 down, hopefully +2 on Tuesday.

Wednesday, September 3, 2008

Druid for mage

Jive has a mage friend asking how healing differs from DPS

---

Hey there. Snap, I played frost all through MC-T5! I'm a warlock now with priest and druid alts who tend to get called into BT for Gertie + Council.

The main difference between DPS and healing is that when healing, your output is capped. There's only so much healing to do, but you have to do it FAST.

On a basic level, healing is reactive. Raid-regrowth tends to be like this, eXtreem whack-a-mole. This mode is not about high heal-per-second (HPS), it's about people not dying RIGHT NOW.

As you get more experienced you'll be able to watch the field more and predict who'll take damage. This is how those paladins get anywhere raidhealing - they're casting before damage even happens. You don't have to be psychic to heal, but it helps :D

Druids have an extra little thing you may have heard of, called HOTs. These are a lot more like a standard DPS cycle, especially if you have experience keeping up DOTs or debuffs. It depends on your assignment, but usually you want to have between one tank lifebloomed, up to full hots on two tanks. HOTs give awesome HPS+HPM and cushion spikes but have to be put up ahead of time.

Great druid healing comes from being able to flow between reactive OMG healing and stabilising the fight through the insane HPS of HOTs.

Ideally you also need to understand the strengths and weaknesses of your other healers. That's a whole extra subject though :)

This is all for 25-man raiding. Frankly, for 5-man, there's a much simpler plan. 1) Get 1600 +heal, 2) roll lifeblooms on 4 people, 3) cackle wildly.

Tuesday, July 1, 2008

Best Practices

http://eatingbees.brokentoys.org/2008/06/30/best-practices-part-2/

I’m sure some of these will seem naive or cookie-obvious. Maybe a different few to each reader.

Read books. The Pragmatic Programmer, Mythical Man Month, Refactoring. Learn a new language, methodology or framework every quarter.

Cycle people, don’t let them overspecialise or silo. You’ll get broader more useful employees. Their CVs will look nice, which should compensate for the extra challenge. Maintainability will be closer to the hearts of every developer. Consider how resilient your schedule is to a double-decker (”bus impedance”).

Overtime takes a toll. After eight hours you are not doing your best work. An overtime culture will cause employee throughput, fragmented design and many bugs reaching production. I bet Tseric put a lot of hours in. Having said that, a release push won’t kill you. Just not constantly.

Users are great at describing problems, not always so great at picking solutions (not that you should ignore those). Listen, bring in requirements, write usecases, iterate, run the tests, release, reexamine. Anyone should envy Blizzard the Elitist Jerks forum.

Admit mistakes. Confirmation bias is the root of evil. Identify the drivers and facts, don’t allow elegance as a driver but do allow maintainability and flexibiliity.
Tackle risk early, do design carefully but don’t gold plate. Identify the most likely causes of change and allow for those, instead of making the most general solution possible.

Keep people motivate through attention and constructive feedback. Bored/frustrated people cause problems, responsibility can transform them.
Keep visibility through the management chain, ensure those you lead understand your drivers clearly.
When appropriate, praise employees cc your manager. Help overcome challenges privately.
Ask employees to mail you about their successes or those who especially helped them and keep a record.

Don’t use stack ranking for more than two years.

Tuesday, June 17, 2008

Healatica Principia

This started as a response to an Ego post on downranking, but grew well out of scope. The short version:

For raiding, you do have to offset damage taken against the healing you expect them to receive from other healers.

---

For raiding, the key points are:
#1. There is a minimum amount of overheal required to keep a raid tank alive
#2. The goal is to run out of mana exactly at the end of the fight
#3. Mostly, healers have SICK amounts of regen now. We aren't in MC any more. Eldr has nearly 600 mp5 oo5sr and he's far from leet.

Healing by prio is very effective:
#1. Can you CoH 3+ people?
#2. Does anyone need a shield+pom?
#3. Does anyone need a flash?
#4. Is PoM on CD? If not send to tank.
#5. Is a tank healer having trouble keeping up? GHmax
#6. Is renew up on tanks?
#7. Do you have <10% mana? Take a spirit break
#8. Chaincast GH1, even if the tank is full

Besides this, there has to be awareness of the other healers. Paladins are spike saviours, let them do it. Druids prevent spikes, Shaman spam CH4 - help with spikes more. Even if you have paladins, if there's spiky damage on ranged they may be FoLing, watch where others are healing and be cautious - better to waste mana than lose the tank.

We rarely allocate dedicated healers (and my priest is an alt), so I prefer to help out all over rather than try to muscle in on a specific area. Everyone is better at something than priests, I see it as my job to keep the toys going (coh, pom, renew) and help out as necessary. When flashing, I often target the person second-most in need of a heal, as my heals are smaller than others' and the other healers are very, very fast!