Saturday, May 02, 2009

Molyneux vs. Bioware vs. Bethesda -- FIGHT!

So I was taking a Gamers Instinct survey, and it ended up being about "Evil vs. Good" character choices in RPGs and other games. The survey was presented in a very straightforward way, not comedic or silly, but one question came up with this at the bottom:

"Please note: if you are Peter Molyneux and are unhappy about being grouped together with Bioware games / a Bioware developer unhappy about being grouped with Peter Molyneux games / a Bethesda developer unhappy about being grouped with either, we apologize for the inconvenience."



A cute nod to the studios, or secret feud...?

Wednesday, April 29, 2009

Getting the Window Position in WPF

Sometimes you want to be a neanderthal. You want to use absolute screen coordinates, move things on a pixel basis, pretend you're coding back on Win95. That newfangled WPF layout engine can just go take a ULONG walk off a CHAR pier.

So in my travels I wanted to determine the actual on-screen location of my WPF window. Naturally, pInvoke, everyone's childhood friend and arch-nemesis, came to the rescue.

1. Define your own Win32 RECT (it's not compatible with WPF's "rectangle"...). Note that you can also use the formal interop definition for RECT (MS.Win32.NativeMethods.RECT) but it requires an extra chubby reference DLL, so this method is svelter.

      [StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
2. Add your pInvoke declaration for Win32's GetWindowRect function:
       [DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
3. Make your newfangled GetWindowPos method:
       public Point GetWindowPos()
{
// get the pInvoke-compatible HWND of the main window
IntPtr windowHandle = new WindowInteropHelper(myWindowInstance).Handle;
Point retPoint = new Point();

try
{
RECT windowRect = new RECT();
// call GetWindowRect in Win32 via good ol' pInvoke
if (GetWindowRect(windowHandle, out windowRect))
{
// it worked!
retPoint = new Point(windowRect.Left, windowRect.Top);
}
else
{
// bummer
Debug.WriteLine("GetWindowRect returned zero from its pInvoke...");
}
}
catch
{
// bummer
Debug.WriteLine("Someone tried to GetWindowPos and failed...");
}

return retPoint;
}

Monday, December 22, 2008

Microsoft... trouble ahead...

Microsoft has always been one of those companies that was more-or-less "recession proof". I guess the gravy days really are over. According to rumors posted to MiniMicrosoft, they are set for a significant layoff on January 15th:
http://minimsft.blogspot.com/2008/12/rumors-of-upcoming-microsoft-cut-backs.html

Excerpt:
"Just heard on the finance grapevine. MSFT layoffs are coming on January 15th.
They are substantial"

Yikes. Any Microsofties that are from the midwest or wouldn't mind the midwest, my company is hiring software devs. Contact me: myquih -at- gmail.com

Good luck all...

Wednesday, October 29, 2008

Microsoft: Don't hate them because they're beautiful...

(image from http://www.photowallpaper.co.cc/linux-burning-microsoft/)

At its somewhat-annual Professional Developer’s Conference in Los Angeles this week, Microsoft “announced” Windows 7 (though we’ve all known it’s been coming for some time). Notably, Windows 7 is… well, Windows 7 and most certainly not Vista 2.0, making the Vista-branded version of Windows this generation’s Windows ME (a largely broken version of Windows released in 2000 that was a hybrid of Windows 95 and Windows 2000). Arguably, Microsoft has already “fixed” Vista with the recently released Service Pack 1. In chatting with my various and sundry buddies in the IT world, they have all had a lot of success with the 32 bit version of Vista. That said, they also all mention that some of the user interface touches are nicer than Windows XP, but overall they find Vista to be no better or easier to use than XP. In addition, the 64 bit version of Vista continues to limp along, largely due to the horrifically small number of qualified 64-bit-savvy kernel mode developers attempting to port the 23894723894729 known Windows drivers from 32 bit to 64 bit versions. With Apple’s relentless beating of Vista’s already sore ego, Microsoft is wisely letting Vista slip quietly into the night. (Though to Microsoft’s defense, Apple could stand to apply the ‘people in glass houses’ adage…)

It’s easy to look at this as the latest misstep by the software giant as the continued death spiral of a once-proud industry leader. The last 10 years haven’t been exactly fun-in-the-sun for Microsoft:


We read a list like that, and it’s easy to say “things really went downhill when Bill passed the reins.” Yes, things have gotten hyper-competitive for the once near-Monopoly (maybe now more like near-Chutes and Ladders) Microsoft. But, if anything, these bumps and bruises has made Microsoft tougher, and I would gently predict we’ll see MS surge. (Of course, I’m the guy that has owned a Beta video deck, LaserDisc player, Commodore Amiga, MiniDisc equipment, and most recently Apple’s only failed iPod, the Mini.) They won’t climb quite as crazily as they did in the 90’s, but they are certainly no more likely to kick the bucket than Google or Apple.

Let's look at their recent positive news:
  • Vista, while falling short of expectations, still sells ridiculously well for a “failed” product. I would love to make a “failed OS” that sells 100 million units in 13 months. Sales of Microsoft operating systems have grown faster in the last year than sales of CPUs – so it’s not just the OS selling with a PC, it’s also selling on its own (upgrades, corporate license renewals, etc.).
  • The Xbox 360 appears to be far out-selling and out-fighting Sony’s competing Playstation 3. Yes, MS ate over $1 billion in replacing defective units, but in an industry expected to rake in $22B in 2008, despite a world-wide recession, that’s a drop-in-the-bucket to get a bigger piece of that BIG pie. Sure, Nintendo’s Wii continues to crush and eat all competition, but second place in this war is more than just a silver medal – it’s big bucks.
  • Microsoft’s stock is currently considered a “Buy” to “Strong Buy” by three major stock analysis firms. Time to move your “risk capital” from IRA’s to stock in tech companies. (That was a joke, not investment advice…)
  • Apple has been trumpeting how it is quickly gaining ground in the PC marketplace, yet MS still has a 90% market share of all computer operating systems.
So I’m not saying “strong buy” for Microsoft here, and I’m not suggesting that they are Super Awesome, but what I am attempting to counter is the culture of Microsoft Bashing that has become a national pastime. Economically, culturally, and in the worldwide technology supremacy competition, the United States NEEDS Microsoft – we also NEED Apple, Google, Yahoo, and other “high tech” companies to flourish to keep us from further sinking into the economic bog into which we seem to have our back wheels stuck.

Love ‘em or hate ‘em, Microsoft is, and needs to be, here to stay. If you’re looking for a broken, dying company, Microsoft is not the company you’re looking for.


Monday, October 20, 2008

Microsoft: Hey, what about Windows Mobile?


Apple has launched a counter-attack ad against the reasonably popular new "I am a PC" ads by Microsoft. In the new Apple ads, they pick on Microsoft spending ad dollars, which is amusing given that 3/4ths of Apple's buzz stems from their virtually constant barrage of advertising...

Something that's struck me as odd through this whole ad war is that MS hasn't even attempted to fight on one front where they could: Windows Mobile. WinMo has been around in one form or another (PocketPC) since the late 90's. It would seem MS could have launched a WinMo ad campaign to combat the iPhone. Really since WinMo 2003/PocketPC 2003, WinMo has had basically everything the iPhone only has as of their 2.0 firmware update last Summer:

  1. Email -- This includes MS Exchange support, which has been in for over two years.
  2. Web Browsing -- OK, it's not quite as spiffy as the iPhone's, but it's been there for a long, long time.
  3. Apps -- Apple's new App Store is hailed as a wonder, only because the iPhone was previously only "open" to those willing to hack their firmware. WinMo has been an "open" platform since it launched in '99.
  4. Touchscreen -- WinMo has always been focused on a stylus-based touch interface, so Apple gets kudos for making their touchscreen easier to use, but still, it's not exactly "new".
So I agree that Apple has gone one-better than the reasonably innovation-stagnant WinMo, and MS should be embarrassed that they have never taken WinMo to that next step. Instead they let Apple watch and learn, then improve.

As one who is generally a Windows proponent (though I do own both an iPhone and a Macbook Pro!), I'd love to see Microsoft get back on the offensive, and innovate as they once did, instead of the slow crawl of progress (and ocassional regression...) they've shown in the last decade.

Tuesday, September 30, 2008

Gaming Economy -- What a weird, weird world...

In a review posted on Touch Arcade, they picked on 'Kroll', a game they said has somewhat limited gameplay, yet is "one of the most visually appealing games on the iPhone". Their comment that brought me to further ignore real work and write a blog post? They suggest the game isn't that great for "its $7.99 asking price".

$7.99 for one of the best looking games on a platform? $8. Is that a lot?

Meanwhile, I paid 60 fuh-reaking dollars for Turning Point for the Xbox 360. At least 7x... the price for something that probably sucketh more. Ouch.

The whole idea of "value" in the gaming world is curious, indeed.

Square Enix gets slammed for charging $40 for Nintendo DS RPGs that provide dozens of hours of gameplay, and high production values. Deluxe editions of Dead Space are going for $150. Heck, people are paying $60 for the beta of LittleBigPlanet, with the official game due out in less than a month for that price!

Let's look at something more stable -- say, Puzzle Quest -- same EXACT game for every platform:

X360 - $10
PC - $20
DS - $30
PS2 - $20
Wii - $20
PSP - $20

I'm so confused... Maybe Tiger Woods 09 will clear this up...
PS3/X360 - $60
PS2 - $40
Wii - $50
PSP - $40

No, not much...

So what is the "value" of a game? Apple's iPhone/Touch apps store seems to have created the value system that $5 is the high price for an average game, while a $8-$10 game had better be life changing, or at least make your privates tingle. On the 360/PS3, every non-downloadable title is $60, while downloadable titles are $10-$15. For Wii, it's $30-$50 for an on-disc title. For PSP, it's $30-$40 for media and $25 for downloaded. For DS it's $20-$40. PC games are rarely over $30 because it's believed that PC games are so heavily pirated that they need to be cheap enough to become near-impulse buys.

These prices are rarely linked to quality -- rather, it's what's "expected" for certain types of games.

What you're thinking is right -- no, I don't make any real conclusions or points here. I just find this whole "gaming economy" to be interesting, and baffling. We are consumers, and we are a weird, unpredictable bunch.

HP Wireless Printer Offline Reset Tool

HP, bless them, makes some fine printers. They also make very helpful software, but it is, in my opinion, bloatware. Services, tray apps, drivers, and a slew of "helper" applications. The software developer in me loves that they employ so many devs, but the Windows user in me cries when one of those fine apps has issues.

So, my "HP Photosmart C4385 All-in-one" is a wondrous device, as it works generally very well over Wifi. However, my Vista computer occasionally decides it can't find the printer, or that the printer is perpetually "offline", requiring a reboot. I discovered that instead of rebooting, I could restart two particular Services ("HP Network Devices Support" and "HP Cue Device Discovery Service", in that order) and it was happy again. In fact, jobs stalled in my Print Queue would then immediately print. Woohoo!

After doing this for the 348923849th time this morning, I said "to heck with this, I'm writing an app to do it for me". So here, as quick and dirty as a little league shortstop, is a Windows console app that will reset those services. I can't guarantee with which HP models this will help, or if anyone else is having this exact problem, but if so, enjoy.

You just run it WITH ADMIN PRIVILEGES (notice "Privileges" contains the word "vile", and also "leg"...). It produces a console window that will appear and disappear quickly. When it's done, your printer will either then start printing, or it won't...

802.11 / Wifi -- one of the greatest, and most annoying, advancements in personal computing.

HPReset -- executable only (RUN WITH ADMIN PRIVILEGES!)
HPReset -- source code (RUN AWAY)