Wednesday, June 27, 2007

A bug in validation of methods' access modifiers and class abstract modifier

While testing the new feature of Tabax plugins today, discovered a bug in access modifiers validation.

It is performed only at compile time.
Which means, that if the compiler doesn't know what object the method belogns to, than the validation is skipped.
And you can run protected and private methods from whereever your code is executed.

Here is a simple example: (press cancel in the dialogs, otherwise you will get a RunTime error, because the method pack is not implemented in RunBase)

static void tutorial_AccessModifiersError(Args _args)
    Object runBaseObj;
    SysDictClass dictClass;
    runBaseObj = RunBase::makeObject(classNum(RunBase));

    dictClass = new SysDictClass(classNum(RunBase));
    dictClass.callObject(methodStr(RunBase, promptPrim), dictClass.makeObject());

setInPrompt and promptPrim are both private methods. so they should not be allowed to be called this way.

The same thing can be achived by using DictClass.

The funny thing is:
while writing a test example for this post, I stumbled upon another bug - now it's about the abstract modifier of a class.

You all are probably aware that RunBase is an abstract class and cannot be initialized.
Well, in the example I showed this is done using 2 methods again :)

I guess someone should register these with Microsoft.

Tabax plugins' update - RecentWindows, RecentProjects

After developing 3 great tabax plugins I was feeling a little unsatisfied, because I wanted to add images to the popup menues.

AndyD has developed a class that allows me to do this now.

The project containing the class with the images is "shipped" separately. Depending on where you want to see images in your popups menues or not, you will be able to import it separately if you do.

You can use the following links to download the projects (version 0.1.1) and the MenuImages class.

RecentProjects v. 0.1.1 -download
RecentWindows v. 0.1.1 - download
Class MenuImages - download

Alternatively you can download them from their homepages on Axaptapedia.

RecentProject - homepage
RecentWindows - homepage

Screenshot: (RecentWindows)

Tuesday, June 26, 2007

AxPaint - make your DAX look cool :)

A couple of months ago I asked Alex Kotov from AxForum to modify a project he wrote for fun half a year ago or so. Today he sent me an e-mail with the project.

A short description of what the tool can do for you: :)
Basically, it just changes the backcolor of your DAX 3.0 (it does not work for DAX 4.0) installation.
You can choose a simple custom color you would like to use, or select an image from your hard drive to use as the background image.
you can select a couple of settings as well (ALL the settings are accessed by pressing Alt + S in DAX after launching the AxPaint form) - like stretching the image or using a 'transparent' background, showing your desktop (you have to set the image path to a specific location for that).

Nothing much, you'd say. But it sure is fun to work in DAX when a nice picture is seen in the background. :)

Installation instructions:
  1. Unzip the archived files.
  2. Place the .bat and .ocx files somewhere where you won't delete them accidently.
  3. Run the .bat file, which will register the .ocx
  4. Import the project into Dynamics AX - the project contains one form AxPaint.
  5. Run the form. It will automatically hide from view. Press Alt + S to run setup.
Custom settings (my preference):
  1. The image path is setup to C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Wallpaper1.bmp - this is the path to the current wallpaper in Win XP (without active desktop)
  2. Show desktop (like Delphi) option is set in the setup dialog.
  3. In the startupPost method of the Info class the following lines are added:  
  4. An external application is used to change the wallpaper on system startup. So every day I have a different look in my DAX :)
Project archive download link:

Custom code for the info.startupPost method:

 if (curUserId() == 'ikash')

Link to the external WallChanger application:



Monday, June 25, 2007

3 Dialog extensions

Performing one of the modifications on the project I am currently working on, I had to modify the behavior of one of the basic classes using the RunBase framework.

Anyway, what I needed to do was:
  1. Override the basic lookup for a specific control on the dialog.
  2. Prevent user interaction with other forms until the dialog is closed.
  3. Make some of the controls in the dialog mandatory.
Well, the perfect solution here would be to create a Form, and use it as the dialog.
But the code was very highly customized, so it would be a hard job.
So I decided to go another way, using what I have on hand, and that is the Dialog class.
For that, I needed a couple of modifications to the Dialog class, as it does not allow any of the 3 features I neded.

But what any developer should clearly understand when using dialogs is - this is just another form. Simple as that - Dialog is just another AOT form. What this means is that with a dialog we can do all the things we can do with a form.
Also, which is very nice and I thank DAX Developers for that, RunBase framework uses DialogRunBase class for showing forms, and this class is extending from class Dialog, so changes made to Dialog will also be available in RunBase framework.

Here is a small explanation of what has been modified:
  • Added a class Dialog variable showModal, which controls the modal state of the used dialog. 
  • Added a parm method to set the value of the showModal variable. So, basically, to make a modal dialog you simply have to call this method passing true as the parameter.
  • Added a method SetFormModal, which actually does all the enabling/disabling of windows (DAX 3.0 only, as DAX 4.0 already has built-in modal forms)
  • Modified runOnClient() method to allow server dialogs to run modal as well
  • Modified wait() method, which calls SetFormModal method (DAX 3.0 only)
  • AddField and AddFieldd modified to allow specifying a specific name for a control.
  • DialogField class was modified to allow setting the mandatory property (mandatory(), unpack() methods) and specifying a specific name for a control (new and fieldname methods)
The project contains 4 objects:
  • Class\Dialog - only modified methods
  • Class\DialogField - only modified methods
  • Class\Tutorial_RunBaseForm
  • Jobs\tutorial_DialogModalMandatory
The tutorials show the features added to the Dialog and DialogField classes (one of them is present in the basic application and is extending from RunBase, using an AOT form, the second is a job, showing the use of Dialog class)

DAX 3.0 Download link (was created in DAX 3.0 SP5 KR2) - DOWNLOAD
DAX 4.0 Download link (was created in DAX 4.0 SP1 EE) - DOWNLOAD

After importing the project do not forget to compile forward the Dialog class and to restart the DAX client.

Certain Issues you should know about:
  1. InfoActions, if present, will allow to access forms, if the infolog window with them was opened before the modal dialog was called.
  2. Mandatory property starts working only after a value is entered into the control. What this means is that if you simply press OK right after the dialog is opened, you won't receive an error (regular forms works this way too)
The modification allowing to specify a specific name for a DialogField was originally posted on the Russian Axapta forum

Sunday, June 24, 2007

Guy Kawasaki for Microsoft's Next CEO

So my first reaction at Terry Semel be booted from Yahoo! after shareholders complained about lackluster results was, "What, you mean you just have to demand accountability?!?!" What a concept! Hopefully any of our Microsoft shareholders who have done even the most shallow technical analysis of MSFT will start clearing their throats and find their voice, too.

But it seems for now most analysts are in the "eh," stage of looking at what Yahoo! decided to do post-Semel, though re-orgs seem to be popping up here and there. I was hoping for something bolder that would cause YHOO to shoot up, just to serve as an example of good decision making. Part of this criticism was choosing Yang to step into the CEO role.

It made me wonder about who would be my choice for our next CEO, when that day comes. Maybe that day will be soon, maybe that day will be far, far from now. Will it be someone from the inside, accustom to our culture and well-connected through-out the company? Or an outsider? Someone with a clear, focused vision not blurred by years of integrated, innovative Kool-Aid splurting out the sun-shine product pipeline? Who do you think it should be?

Who do I think?

Guy Kawasaki. Someone suggested this recently and it stuck in my little head. Crazy to the Mac-head world, I know, but what would Guy Kawasaki do? Like Brian Boitano, I imagine he would kick an ass or two. Built in BS meter, a committed focus on passionate users, a deep desire to break out of any hegemony, and ready rules for firing people. Someone like Guy would serve as a nice sledgehammer and bring a fresh air of start-up fever to Microsoft.

I've very tempted to ask Mr. Kawasaki to be my friend on Facebook - wait... maybe... maybe if a bunch of Microsofties launched a be-my-friend surge on Facebook, we could start a Be My Guy! campaign to warm Mr. Kawasaki over to the idea. You know. Should opportunity come a knockin'.

Speaking of Facebook: I'm still loving it. Come on, be Mini's friend. I'd also invite you to be my enemy, if they had that feature, for you folks - like the orange-scarfed-dementor-brigade - who aren't that cool on me. Actually, an enemies list feature isn't all that bad of an idea. Hold your friends close but your enemies closer, eh? I didn't really (holding my hands up and making air-quotes) get social networking sites until the latest Facebook iteration. The applications layer is brilliant and provides rich interaction between my content and what my friends are doing. My Facebook page is practically my new desktop. I futz with it endlessly. There's so much potential, like if they go and add private groups then - bang - suddenly they have a collaboration space. Roaming synchronization of Facebook application content for off-line access?

Woof! I haven't been this excited since I learned C.

So who knew? Crazy Uncle Mark Canter was right about opening it all up.

Speaking of opening up: while enjoying some nice Redmond Saturday Market food on a recent Saturday, I overhead a lunch conversation with someone from a company's HR department: what's the first thing they do with a promising potential hire nowadays: zip over to Facebook or MySpace looking for them, and quickly drop the applicant if there's anything fishy or disturbing associated with them. You'd better be careful how you end up being tagged (and have real fun tagging your enemies with crazy photos) and ensure what ever you're building in Facebook puts your best forward. If you care.

I'm sure Caustic Phil wouldn't care, and he'd explain in deeply profane and eloquent prose just how much he didn't care about Facebook and if he had a Facebook account. Never read causticTech? Oh, you're in for a treat, because Caustic Phil has a new one up: the interview zoo - a must read for anyone doing technical interviews, covering both sides of the process.

And speaking of interviews, Packet Storm has a link to a must-read story off of Worse Than Failure: Does this remind you of Microsoft - actually, it makes me appreciate that our bureaucracy isn't that bad and that there is actually a fate worse than being stuck in your current sucky job. But that doesn't mean we shouldn't change what we have. People need to be able to find their new spot in Microsoft easier than just deciding to interview outside, as this comment illustrates:

Permission to interview always caused me anxiety, even after the 10+ years I've been at Microsoft. Even considering that I've moved groups several times.

I've been at my new group less than a year and don't like it (micromanagement and bureaucracy are the main issues). Rather than wait the full year to ask permission to interview, I am leaving the company. I now realize that it was easier to ignore all the nonsense when the stock was moving up.

I was nervous, but in the interviews outside the company I blew them away. Microsoft alumni are well respected and valued outside the company, I can tell you that for sure! I was surprised that some companies have better benefits, too.

MSFTExtremeMakeover posted Who us - leadership Nah, we just vest here as a review of the various odd leadership-less decisions Microsoft has made. I'm telling you, Guy would kick some ass here. We at least wouldn't have to deal with Fake Steve Jobs calling us a pussy when we blinked at Google's pulling on our consent-decree nipple ring. And guess what? Looks like Google is ready for another yank or two.

Speaking of vesting: so we know about the urban legend of Microsofties with buttons decorated with FYIFV. I guess nowadays, looking at all the expiring options that die underwater, it'd be more appropriate to have a FMIFV button. Anyway, I was thinking of this for two reasons: (1) Ben Smith popped up here briefly and posted a comment about the Mini-Microsoft site here that was also cross-posted on some internal mailing list. (2) A comment made the observation that when things were good for employees (financially) that they were fearless and not so review and reward focus. It didn't matter. It was a completely different culture than today.

Ben's comment covers a good amount of ground looking at things here over time, including the negative implications of transparency. The culture part is near the end: aspect of Mini that I find very troubling is what I see as a culture of victimization and disempowerment. At Microsoft, this is the beginning of a vicious feedback cycle because we have a culture and comp system that favors creative, ambitious, results driven technical and management leaders. Frankly put, people who are self-disempowering aren’t going to get a lot of helping hands (maybe to a fault). Microsoft is a company of opportunities if you don’t take them, someone else will. As a lawyer here once told me, Microsoft’s internal slogan would aptly be “Who’s eating your lunch today?” To be clear, this does not mean we each need to be sharks looking for the bloody water; rather to excel at Microsoft each of us must find our own way to contribute to the great products and services we build.

MSS provides this insight:

Yesterday I had an interesting conversation with a manager here (not at Microsoft). He said, essentially, that if you have large compensation changes between levels, it causes politics.

There's two ways this works. First, it makes people badly want to be promoted, and therefore more willing to engage in behavior that is destructive to the organization if it helps them individually. Second, it gives the managers great power - they get to choose the lucky ones. From both sides, this drives toward political behavior.

Now, in the past at Microsoft, this was mitigated by everybody having options and the stock climbing through the roof. This meant that employees didn't have to have the promotion, because the stock was going to take care of them. They were better off just helping the company as a whole do well. But when the stock went flat, it also quit being a counterbalance to the steep compensation curve, and political behavior ran wild.

If this is the correct root cause of the politics, the only way to fix the situation - and save Microsoft from what it is becoming - is to flatten the compensation curve.

I certainly don't see myself as the patron saint of the disempowered victim. I understand some steam gets let loose here, much like when InsideMS went through a meltdown. But there's plenty of productive conversation, too, and I don't understand if you can fix a problem without calling out there's a problem first. I do now recognize, however, that change - like corporate culture change - is irrelevant unless you can identify where your culture is, what problems it has, what change you intend to make, and why that change will be beneficial.

As a small example: it would be good to drive away anything justifying fear within the company. Fear of changing jobs because of your H1B status. Fear of providing frank feedback about your management hierarchy. Fear of sharing constructive criticism regarding why you're leaving Microsoft for another job. Fear leads to silence. And silence leads to fortifying the status quo, stagnation, and competitive disadvantage.

Fear is not a Microsoftie trait. Nor a trait of any corporation that aims to be a success. If we accept there are people being silent due to fear then we can reassure that it's not justified, that their insight and feedback is important and that their input be used to make the company better. And successes here would lead to trust.

Oh, and memo to Microsoft PR: stop worrying about me and pay a little closer attention to any pieces you approve for BusinessWeek, perhaps thinking it's quite the coup. Holy crap. Look at that comment stream. Did we just pants ourselves?

That takes talent.

Really, really bad talent.

Saturday, June 16, 2007

Ballmer, Bozos, and Crazy Sweet Facebook Yang

Oh, another Fremont Solstice festival where I stay off of my bike, keep my clothes on, and enjoy being a spectator. One of these days, I tell you! At least I know what piece of art to paint on my back when that day comes.

Ballmer Ballmer Ballmer! MSFTExtremeMakeover is some kind of fired up:

I agree that it's amazing that Microsoft shareholders continue to bear and grin it through the flat stock price versus calling for accountability. This is a sobering observation:

MSFT's leadership can continue to run the company - as they have for this entire decade so far - as their private fiefdom and for their personal enrichment versus as a public company charged with rewarding its shareholder owners.

That and the vague talk of muscles leaves me a bit on the pissed-off side of life. And in D5 Microsoft CEO Steve Ballmer on the hot seat:

Microsoft CEO Steve Ballmer said that his company was a lot more nimble today than when it had 30 people. He was responding to a question from conference co-host Walt Mossberg how the company deals with huge scale of the company, with 78,000 employees. "The people we had then weren't as good, weren't pushing that hard." Mossberg asked about Microsoft co-founder Paul Allen. Ballmer came back, "Paul and Bill were good…the rest weren't, and they are gone."

All we had to do was get rid of those 28 and replace them with 78,000! Yes, I see the nimble-math equation right now! It's... so... obvious...

Bob Herbold weeps. Perhaps fake Steve Ballmer could at least follow-up on the commentary here. The Secret Diary of Steve Ballmer.

Bring Out The Crazies: Now then, interestingly enough, there's the technical analysis article Sell Apple, Buy Microsoft by Alan Farley. That was a delightful surprise to see. And to the Mac faithful: (1) Please follow-up with Fake Steve if you feel passionate about that article, and (2) This is not a dig at Apple - I want to make this clear because I know anything that sniffs of an insult always bring the crazies out. And watching the poor Microsoft journalists pounded on by the crazies this past week was almost too much:

Post aQuantive: if I could do an acquisition right now, it would be Facebook. Goodness knows I'm having fun with it (drop on by - I'll do the occasional profile update [jamie, I hope it's okay I snagged my profile picture from C9park]). It makes me wonder, given the acquisition, what the benefit would be of switching our users in Spaces over to Facebook. It could be in stages... first open up all of Spaces so that porting from Spaces to Facebook would be an API 2 API matching. Then, just walk away from Spaces and send everyone to Windows Live Facebook. I know, we have a bajillion Spaces users. I've got to say, though, they'd be a bunch more happy if they had Facebook as their foundation. Snappy.

You're The Salty Yin To My Sweet Yang: another Test versus Dev spat erupted in the comments for the last post, but it brought out some good points, especially around considering what the career path for Test is and should be. One rumor that I like:

Good news on the STE front...fairly reliable sources have confirmed that they will be coming back!

Looking at the short-term results, I can get behind the return of STE for QA and cheer. I really don't know where the automate-everything religion came from, but I saw some mighty-good testers who came up with excellent issues and that drove customer-focused quality disappear from Microsoft. Now we have fragile automation and less testing to make room for repairing automation breaks from period to period. I see more and more late minute bugs where the incredulous triage team usually starts with, "...and how the ____ is it that we haven't found this until now?!?" Well, you know, no one had written automation for it yet.

Over There: a comment regarding pending Microsoft hires getting unhired:

You can see blogs of people hired by MS but screwed by the H1B, popping up all over:

I am now a US citizen, but came here on an h1B.. I shudder to think about what these people are going through.. any managers out there that can help people like these out?

Internal Job Transfers: a while back, before the myMicrosoft 2.0 announcement, I put on my wish list a further simplification to the Microsoft internal transfer policy. Pretty much, if you wanted to join a different team and it was mostly a direct match to what you were currently doing, you could join the new team with the blessings of the hiring manager.

You know, not such a popular idea.

Both here and when I mention it at work, the first reaction I get is, "No way! We'd end up with a bunch of bozos! Haven't you ever done an internal interview?"

Yes, I have, and yes, we do have a bunch of bozzz- er... - lower-than-expected-quality-employees working for Microsoft. I write about that from time to time. So what do you do? We have overstaffed teams. We have understaffed teams. We have teams slogging on making work for themselves even though their team members should be distributed away and matched up with positions that best suit their skills. We have folks who still guilt their unsatisfied team into staying together, telling them that, hey, they "signed up" for the next release and even if everything is going to hell in a handbasket, they're expected to grab on hard, suck it up and stay.

To hell with that.

That just allows people to get away with bad decisions and with no consequences to the leadership. If your team disappears from underneath of you, hmm, that looks like a consequence you're going to have to deal with. I want it to be easy for you to find the best position for yourself at Microsoft. You know, I'm not asking you to reach personal fulfillment via your job at Microsoft. Nor to define yourself as an individual just based on your Microsoftie contributions. I'm not in to that. But I'd like for you to like your job. And enjoy your team. And heck, even be proud of your product. And feel that your job is the best match for you. And for that, it needs to be easy for you to find that job, see if you're the best fit, interview, accept the position, and move.

I love the dropping of permission to interview for folks who have been in their current position long enough. And I love HR's fervent support for this policy - I know of a particular HR generalist that I'd want by my side in any knife-fight. I think it needs to go further, though. I want folks to be able to interview without even notification. If they get the job, two weeks notice and they are starting their new position. Just as easy as if you were interviewing outside of Microsoft. Bang! It should be at least that easy, right?

Ideally, easier.

One of the internal business cycles we have is people waiting for the review model compensation and promo to be locked in and then looking to join another team so that they can start on their new team and pretty much have a full-year on that team by the next review cycle, and not get screwed by the transfer. I guess those discussions and interviews usually begin in earnest come mid-August. Are you ready? Are you researching groups, building your network, having informationals, putting together your resume, etc. etc.? If you're writing your review you might as well update your resume. It would be great if, come the review model lock-in, we had a further simplification to the internal move process to help defrag Microsoft, from the bottom up.

And of course, if your resume is up to date, nothing is stopping you from looking outside Microsoft, too, and seeing what's-what in the post-Blue Badge world.