Posts Tagged ‘rant’

Development directors?

I’ve worked with (for?) several development directors. Some have been talented individuals, some incompetent. But invariably, the role has (in my experience) been useless. I’ve always seen it as a needless position on the producer/PM hierarchy. And oftentimes an add-on position due to explosive producer/PM headcount growth.

I understand what creative/technical/art/design/qa/(product|game) direction is. I have no idea what “development direction” is. And if I do, I have no idea how it’d be beneficial. I mean, the few decisions like “we are using Hansoft for scheduling and backlog management” can be made at the project producer level, and most other ‘development direction’ I can think of negatively infringes on team autonomy.

Has anyone actually had success with the role of development director? Not just a super-talented individual who happened to do a good job, but an actual use for the role?

Python Singletons

In my opinion, good python libraries and frameworks should spend effort guiding you towards the ‘pit of success’, rather than trying to keep you from failing. They do this by spending most effort on things related to the critical path- clear interfaces, simple implementations, thorough documentation.

Which is why singletons are, to me, the worst form of framework masturbation in python. You will never be able to stop people from doing something stupid if they’re determined (in pure python). In the case of a singleton, that means instantiating more than one instance of a type. So spending effort on ‘designing’ singletons is not just a waste of effort, but actively harmful. Just provide a clear way to use a single instance, and your system should fail clearly if it detects an actual problem due to multiple instances (as opposed to, trying to detect multiple instances to keep said problem from happening).

The best method for singletons in python, then, is- whatever is simplest!

  1. Some form of module or class state is, to me, the clearest. It requires someone reading or using your code to know nothing more than the most basic python. Just prefix your class def with an underscore, and expose an accessor function to an instance stored on the module (or on the class). The capacity for failure is minimal and the behavior is clear (it requires no behavior modification to the type itself).
  2. Overriding __new__ is pretty bad but OK. It requires someone to understand the subtleties of __new__, which is a useful thing to teach someone but, are singletons really the time and place?
  3. Using a metaclass is a terrible solution. It has a higher likelihood of failure (how many people understand the nuances of metaclasses!?). Misdirection even for people just reading your code, trying to understand your type’s behavior. Avoid.
The question to ask yourself before doing any of this is, “is a singleton a technical requirement or an architectural preference?” Ie, a single instance of an application event loop (QApplication, etc) I’d consider a technical requirement and make it foolproof (in C?). But technical requirements are few and far between and should be driven by underlying system/OS requirements rather than your code’s design or architecture. If it’s an architectural preference- “there should only be one instance of this manager/window/cache”- there’s absolutely no reason to confuse your code (especially you object’s behavior!) to achieve it. Just use design, documentation, and examples, to show people the right way to use it.

Decisions, decisions

Some people can find me a bit over-earnest in my quest for automation. I’ve finally figured out how to know whether something is worthwhile to automate.

Are you making any decisions when you do this?

And if someone is making decisions that may be unnecessary:

Can we get from A to B without making any decisions?

I value the people I work with and I want them to be more effective. Sometimes people are afraid I’ll automate them out of a job, or they like a manual part of their workflow. More often they take pride in being the manual bottleneck behind a tricky or brittle process.

Humans are valuable because we can make complex decisions very quickly. When I automate an area someone isn’t immediately comfortable with, it’s not because I don’t value what he or she does. On the contrary: because I value their skills and time, I want to see them doing something that requires their unique abilities.

Why I hate Test Driven Development

I have no problem saying that I write good code. I place a focus on TDD and thorough unit and integration testing. I document everything I write (not just function documentation- I document classes, modules, and systems). The fact is, since I’ve been doing these two things somewhat religiously, the amount of time I have spent debugging code has gone down dramatically. There are just not many bugs to find in most of the code I write, they are easy to narrow down when I find them, and they rarely regress.

This is a good thing, isn’t it? So why do I hate TDD?

Because debugging is fun. There, I said it. I love debugging. I think lots of clever people like debugging. I love someone having a problem, coming to me, looking at it together, getting up to walk around, look at the ceiling, talk to myself, stand in front of a whiteboard, draw some lines that spark some idea, try it, manually test a fix out, slouch down in my chair staring at my computer lost in thought, and repeating this until I actually find and fix the problem. Not just think I fixed it, but really sure that I fixed it because suddenly it all makes sense. At which point I spring a terrific boner for my obviously superior brain power that was able to find this problem that plagued mere mortals.

So the sad fact is, since I’ve been doing TDD, I haven’t been able to go on this ego-trip a single time in our TDD-written codebase. Sure, sometimes we get a bug in the UI, but those usually manifest easily. Oh, and I’ve definitely used some frameworks and API’s improperly and caused bugs because of that. But those are the annoying types of debugging we all have to do, not the  magical mystery tour described above.

I didn’t realize how much I missed debugging until it was gone. Fortunately, there’s still lots of legacy code and API’s to get my fix from.

Some tipping tips for non-American GDC/PyCon attendees (and American ones too)

Games Developers Conference and PyCon are both coming up, which means lots of familiar international travelers in the US. A post on G+ asked about how the tipping system works in the US. I’m not going to list the percentages and people (though I will say aim for 20% and always tip taxis and servers), but I will explain three very important things about ‘how the tipping system works.’

The first thing to understand is, tips are generally a part of wages. The federal minimum wage is $7.25, but may only be $3 or so for an employee that earns tips, because the rest of the money ‘must’ be made up in tips. Tipping is never “extra” money to a tip earner (takeaway, baristas, etc., are generally not ‘tip earners’).

Second is, servers do not generally declare how much they made- there is a standard percentage of sales they must be declare as tips (differs per state but generally something like 10-13%). So if they make $1000 of sales and make $250 in tips, they are allowed to say they only made $130 (%13) in tips and only pay taxes on that (I say allowed, this is ‘illegal’ but everyone does it and there is no expectation to report everything you earn). However, this has an inverse- if you make $1000 in sales and only make $100 in tips, you pay taxes on the $30 you didn’t even make! So if you tip someone 10%, they may be paying taxes on money they didn’t make- you are taking money out of their pocket.

Last and most important is, many servers need to ‘pay out’ to other staff, such as bussers and food runners. This can often be 5% of sales or so. So they may only be taking home 10% of your 15% tip. And the blowback from not tipping is far worse here- if you tip 5%, that server may be earning exactly zero dollars from your table. If you skip on the tip entirely, you are taking money out of your server’s pocket.

So, Europeans, and Americans too, please understand- tipping should never be considered optional, even for bad service. Unless you think it is OK to take money out of someone’s pocket for a job poorly done, or even just if they made some mistakes. Imagine if your pay was docked for each bug you wrote! The only time I would ever not tip is if you were to walk out of the restaurant (for lack of service or some other dealbreaker). Likewise, your server is almost never getting as much of your tip as you write (taxes, payouts to other staff). So if you get good service, tip generously, then add a dollar or two. And if you get bad service, tip anyway.

Enjoy the conferences!

PS- laws are different in each state and restaurants are different. These are just general guidelines. Please don’t nitpick exceptions.

A few blog site guidelines

Adding feeds to Planet Tech Art, it became clear that not everyone studies great bloggers like Scott Hanselman or Dave Winer. Here are some rules:

  • Your full name should appear somewhere on your main page. Prominently if you are advertising yourself, but at least somewhere in the footer or header. There were some blogs where even a first name was absolutely nowhere to be found. Unacceptable.
  • A link to your feed should be somewhere on your main page. In order of preference- top/top of sidebar, sidebar, bottom. I visited several blogs that did not have an RSS feed anywhere. Again, unacceptable.
  • Make your first few works count. Many more people will see an excerpt than read your entire post, make sure the first couple sentences don’t say ‘Sorry I haven’t posted for a while’ or something similar.
  • Make sure your name is in your blog feed. Or something to identify you. For Planet, this is taken care of automatically, but subscribe to your own feed and make sure it is recognizable.
  • Speaking of subscribing to your own feed- subscribe to your own feed and make sure your posts are formatted in RSS properly. I’ve seen more than a few with missed code samples and other plugin-dependent data.

Happy blogging.

Why I will never develop for a big company again

I had this post written up for a long time, and it was much more ranty. But now I’ll just give you some facts (all of which are public) and let you fill in the blanks:

Your bonus is based on “Target Bonus %” x (“Your Performance” + “Company Performance” + “Studio Performance”) x “$ Your Salary”

So if company performance is crap, your bonus can be hurt substantially. I won’t say what a normal target is but it isn’t that high- the CEO’s is only about 100% so you can imagine a normal dev’s is only a small, small fraction of that.

Company sales up from previous year, but a net loss because it pays $682 million+ to buy the studio you just started working for, so your bonus gets hosed. CEO owned lots of money in the company that was bought out so he makes out like a bandit.

I don’t know how that shit is legal.

World financial crisis is in full swing and company clearly will not be profitable. So he cancels merit increases but keeps bonuses.

Well no duh- if your max bonus is 10% of your salary, a modest 2% merit increase is 1/5 the size. If your max bonus is 100% of your salary, it is 1/50 of the size. Manipulating to line his pockets.

After a failed acquisition that cost the company $22 million, the expenses were ignored for performance considerations of the executive team, who set the rules for bonuses and have a clause that they can ignore “non-recurring” expenses such as acquisitions (as if acquisitions were “non-recurring” there!).

I will tell you right now. If our CEO did some shit like this he’d be tarred and feathered. It is a great feeling to work in the same building as your CEO. To know that the only reason he doesn’t know your name is because you haven’t figured out a reason to talk to him at the bar. To know his sweat and blood helped build your company and he didn’t hop over as an executive from some multinational baked goods giant.

Taking pride in your work is a great thing, being able to take pride in the place you work feels even greater (at least for me, since I feel like it adds value to my work). I can’t say I’d categorically not work for another large company, but, not one with a CEO like that.

There’s idiomatic, and there’s just being respectful

I work in mixed language environments. Python, C#, C++, and more, can all make their rounds. It isn’t uncommon to have someone focused on C++ have to write something in another language, and it isn’t uncommon that I come across their code some point in the future.

It is easy to learn a language’s syntax but difficult to learn its idioms. Good luck trying to explain what ‘pythonic’ means to someone who is new to python or programming! So I forgive the transgressor when I see non-idiomatic code.

Usually.

There are some errors I find unforgivable. Errors that indicate a complete lack of understanding of the platform you are writing on. Errors like this (C#):

var foo = new Foo()
if (foo != null) {...}

Creating an instance is probably the most basic operation you can perform in an OO language, and the author clearly did not understand it.

Another unforgivable type of error is when someone tries to fix a bug but does not bother to understand what’s actually going on.

class Foo {
private bool _somevar;

...
}

There was some bug in the code somewhere, I can’t remember what. A developer changed ‘private bool _somevar’ to ‘private bool _somevar = False’ and declared the bug fixed (spoiler: it wasn’t).

Probably the best example comes from memory management, as the least understood things in programming tend to:

try { someUIControl.SetText(someGiantString); }
except OutOfMemoryException {
someUIControl.Clear();
GC.Collect()
someUIControl.SetText(someGiantString);
}

The only thing this did is change the stack trace. The problem was due to a .NET garbage collection implementation detail- the Large Object Heap and huge strings- and the ‘fixer’ just tried something every authority tells you not to do, which is catch an OOME.

If you’re going to leave your domain to write code in another language- I applaud you. It can show an endeavouring personality! But please have some respect for the language you are writing in- read a book, read a blog, ask for help. It’ll make you a better programmer, I promise.

Autodesk, leading the back of the pack!

A recent discussion on G+ prompted this blog post (which I’ve edited to make more sense in this context and took out the rant target’s name).

His insistence on using MEL over python isn’t “sticking to his guns”, this is harmful conservatism. It would be one thing if a TA said, ‘I don’t want to code in python.’ I’d say, “Fine, that’s foolish, here’s why python is better, you’re going to have trouble finding a job, but whatever dude.” But he isn’t a regular TA, he is a Senior User Experience Designer at Autodesk. His actions, inactions, preferences, and opinions, ultimately impact me directly. When a middleware company releases new technology, I expect thorough tutorials, I expect support, and expertise. I expect technology companies to lead a path forward- I am presumably using their technology because they can do a better job creating it than I can and I should have faith in them to understand the space. When senior personnel who are supposed to be experts in user experience provide none of this, because they have avoided learning and embracing the necessary skills, that is, to me, no longer just kidding and becomes a cause for real concern. It’s yet another symptom of the instituional incompetence (or malevolence?) that has characterized Autodesk over the past several years.

Could things be worse? Yes, he could be yet another Autodesk manager that comes out only to post a link to some shitty tech we never asked for. Instead, he at least is part of the community. That, to me, is the most important thing. But it doesn’t obscure the serious issues with his exclusively MEL approach.

To Verizon and Motorola: Let me use my own goddamn property

My first cell phone was a Verizon phone, and when I moved out after college I stuck with Verizon.  The only reason I cancelled my Verizon plan was because Casady and I moved to Iceland, where our CDMA phones do not work.  (CDMA is a type of cell communications that is only really used in America so you can rarely use your American cell phones overseas).  We brought my Droid, and Casady’s Droid X, with us, planning to use them as Wifi-only computers.  This morning, I factory-reset Casady’s Droid X, since my Droid is feeling its age and Casady isn’t using her Droid X.  I powered the phone back on and was taken to an activation screen.

Except, wait, of course my phone can’t activate, because I am in a GSM country (like every sensible country) and the Droid X’s silly CDMA doesn’t work.  I can’t get past the first screen.  Ruh-roh.

So I spend a few hours figuring out how to root my phone.  Except, I can’t even get into the phone to enable USB debugging, so I can’t use it with the Android SDK.  And obviously I can’t download anything from the phone itself to do it.  After fighting for a few hours (did you know Windows Vista/7 Home doesn’t have Group Policy Editor?  WTF!), I called up Verizon Customer Support.

The nice woman I spoke to didn’t have any concrete advice to offer but gave me Motorola’s number.  I called Motorola and the guy I spoke to told me I needed to call Verizon for an unlock code.  Ah, I was trying to root when I needed to unlock.  I’m so dumb sometimes ;)  So I called Verizon Customer Service again and another nice woman gave me a number for Verizon Tech Support.  I called Tech Support, and the man I spoke to put me on hold to do a little research about my problem.  He then transferred me to Leon in Global Tech Support.  We argued for a little while because he said Verizon only activates active/programmed phones.

I cancelled my account with Verizon because I don’t live in the US anymore, so the phones are not active on my account.
My entire family (included Casady’s side) are all Verizon customers, but we’d need to bring in the phones to get them programmed.  Of course, the phones are in goddamn Iceland, so that is impossible.
He stopped short of telling me I just needed to find an unlock code but I took the hint and thanked him and hung up.

So it turns out you cannot get unlock codes for the Droid X.   I looked and looked but no one seems to offer them.  It is rare for CDMA phones at all and I have not seen a single one for a Droid X due to the enhanced security features.  I’m open to tinkering but have made literally zero progress despite trying everything I could find (on a positive note, my patience has definitely improved).

So, the next thing I’m going to do is call Motorola and talk to whoever I need to talk to until I’m satisfied.  And then, when they won’t do anything, I’ll talk to Verizon and do the same.  I paid I think $200 USD to buy the phone and then another $300 or so for early termination.  I own this phone but am locked out of it.

Any ideas or support is appreciated.  This sort of corporate shit really grinds my gears and I’m not going to take it lying down.

Return top
 

Switch to our mobile site