Wednesday, December 08, 2010

An Unfortunate Side Effect ...

Looks like another middleware provider is running into some hard times. http://www.gremedy.com/ looks to be having problems. That being said, it looks like they are releasing their gDEBugger tool for free: http://www.gremedy.com/purchase.php

If you're doing any OpenGL programming, this is a nice tool to add to your stable!

FYI: If you're having troubles installing the license key, simply unarchive it, install gDEBugger and then double click on the license file. You should then see the license manager. Save and you're good to go.

Sunday, November 28, 2010

OpenGL + C#

Today's goal is to try and mix OpenGL and C# together and see what I can come up with.

One of the projects I've got on the burner may possibly be multi-platform. And I'd really like to try to do it using C# (Mono on other platforms). DirectX is pretty much out the window in that case (especially if I want to go Mac).

So I'm giving C# and OpenGL (via OpenTK) a go. Will probably do a write up in the next couple of days.

Friday, November 26, 2010

I'm not dead! Really!

The new gig is taking a up a lot of my spare time, so I don't have as much as I used to. So updates will probably be more sporadic than in the past.

Additionally, the movers wrecked my home box. Wrecked as in "Throw away because it's not usable anymore". And I really don't have the cash on hand to build a new one. So the missus and I are sharing hers for the next little bit.

However, I am planning on doing a little work on some side projects. I'll be detailing them as time progresses.

Friday, June 25, 2010

Graphical P4 Login

Today I ran into an interesting little problem. Without going into too much detail (and too keep from getting my ass into trouble at work) I ran into a situation where it would be really nice to be able to log into P4 through a batch file. The issue was, I didn't want to have to store an MD5 hash of a password, or a clear text version of the password on the client's machine. What I really wanted was a simple, GUI version of 'P4 login -a'. But without the console based prompting for a user's password. There are options for doing it, but none of them felt satisfactory to me. For those curious, options include:

building a batch file that is essentially:




Not a fan of this method.

Or storing an MD5 Hash and passing that through a la: http://kb.perforce.com/UserTasks/ConfiguringP4/AvoidingTheP..rdInWindows.

A google search came up empty. This surprised me as I would have thought something like this would have been a common need. Who knew?

So, I figured that I'd just write my own. I mean, how hard can it be? All you have to do is pass in the password on the command line, right?

The other thing is that I want whatever app I create to be nearly stand-alone. The only thing that it should rely on is P4.exe. I don't want it to hook into the P4 API, or any other nonsense (being dependent on P4.exe is bad enough).

Wrong. P4 login doesn't work that way. You can't pass in the password, it has to come through Standard Input. Whut-oh.

Well, it's not that bad, actually. Using CSharp, it's just a matter of using the Process object and hooking into the StdInput. Surprisingly easy, once you find it.

The form is a simple layout. I don't even ask for a username (easy enough for you, dear reader, to add). But for my case, all I need is the password. So a quick mock-up of the GUI would look like this:
The Window Mockup

So, what's the code that does all this funky stuff?



Again, the big thing here is to use a streamwriter object as the redirection for STDIN. At that point, it a stream and you can do pretty much anything you want to.

Additionally, I've archived the project. You can access it here

Monday, June 21, 2010

Cheap debugging console

Something I keep forgetting and figured I'd put into my blog. If you're looking to add a cheap debug console to your app (just for spewing data) and you're a win32 app, this is a nice little code snippet:
#include "stdio.h"

// other window init code goes here

// sometime before the main message pump

// Create the debug window

if( AllocConsole() == true )
{
    freopen("CONOUT$", "wt", stdout);
    SetConsoleTitle(L"El-cheapo Debug Window");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);
}

printf( "Debug Window Created!" );

Friday, May 07, 2010

Blogging from my phone


So, for a while now I've been wanting to blog my ideas and thoughts while commuting from home to work (and back). But I don't actually own a laptop (please note, latptop donations accepted)! So I've been looking for an alternative.  And I may have found one.  It's called 'Blogaway'. So far, it seems to be a decent enough client.
Now, I wouldn't want to try and do any code based writing using it.  The keyboard on the Nexus One is good, but I'm not a thumb-typist.
More work this weekend is planned for my 'FailDroid' app. I'd like to get it up on the marketplace soon, to try out my idea of super-cheap apps to see if that can be any kind of a revenue stream.
So, my stop is next.  More cell-based blogging to come!
Location : Golden Ears Way, Pitt Meadows, BC V3Y,
Posted via Blogaway
Location : Golden Ears Way, Pitt Meadows, BC V3Y,

Posted via Blogaway

Thursday, April 29, 2010

Stuff I didn't know about Dev Studio Macros

So, I really need to spend more time reading the Visual C++ team blog. A friend of mine just recently pointed me at their site (http://blogs.msdn.com/vcblog/archive/2007/11/19/controlling-intellisense-through-macros.aspx) with a cool little article on giving Dev Studio the ability to control Intellisense. So instead of nuking the appropriate DLL, you can just use a Macro and the DTE environment setting to disable Intellisense (amongst other things).

And apparently this is also available in VC 2005 as well.

Thanks go out to Francis Boivin - lead 3D programmer at Ubi Montreal, who I just reconnected with through Twitter.

Now to go play around and see what other little nuggets are residing in the DTE.Properties for the TextEditor.

  • EDIT: So, after trying this, there's one big problem with it. If you use the macros to turn off IntelliSense (with a Solution loaded), restart Dev Studio, and load up the project, you'll see that it will update the NCB file. This isn't the intended behaviour (or at least not the behaviour I'm looking for). Looks like the tried and true method of renaming the DLL is the only sure-fire way of doing it.

Wednesday, March 31, 2010

AtomineerUtils for Visual Studio

I'm always on the hunt for tools that increase my documentation abilities in code.  Hitting the main Doxygen site today, I noticed a new link to Atomineer, a plug-in for DevStudio that touts increasing the speed to add comments to your codebase.

Been trying it out for the last hour and so far, I'm pretty impressed.  Seamless integration into DevStudio (2005/2008/2010). Fairly customizable, but I'm only trying the free version right now.  However, at a price point of 5$ for the pro version, I suspect I'll be picking it up (and forgoing my weekly Starbucks run in it's place).

Give the free version a try and let me know what you think ...

Thursday, March 18, 2010

Disabling Intellisense in VS 2005

So, I've been using Visual Assist for ages. I was introduced to it way back in 2003 and have been a faithful user ever since. But I've always been annoyed that I have to have it and Intellisense running at the same time.

Apparently no longer! It would appear that all you need to do is rename feacp.dll to something else (I renamed it to feacp.Not_dll). Restarting Visual Studio and loading a project was super fast, compared to what I was used to.

You can find feacp.dll in Microsoft Visual Studio 8\VC\vcpackages.
(if you're using VS 2008, it's in Microsoft Visual Studio 9.0\VC\vcpackages)

I don't recommend deleting the DLL, just in case you ever want to roll it back. But that's just me.

Enjoy!

Updating the blog with a new layout

It's always a fun exercise to update my blog. Mostly because I have to always remember to update my syntax highlighting code, which I forget to save somewhere for me to remember how to do it. So this time, I'm going to blog about it, so I can remember it. First off, I'm using the syntaxhighlighter provided by Alex Gorbatchev (). It's just awesome, pure and simple. But remembering how to add it to your blog isn't. So, the first thing that you have to do to add it to your Blogger blog is to update your template. I'm not going to detail how to do that, because it changes a fair bit. Once you have your template loaded, look for the /head tag and add the following before it:
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shCore.css' rel='stylesheet' type='text/css'/> 
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shCore.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushCpp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushCSharp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushCss.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushJava.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushJScript.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushPhp.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushPython.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushRuby.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushSql.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushVb.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushXml.js' type='text/javascript'></script> 
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushPerl.js' type='text/javascript'></script> 
<script language='javascript'> 
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.1.364/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
Now that you have this in your template (and have saved it) you can now start adding code to your site. In your page, add the following:
 

You can also use a more concise version using the pre tag:
<pre class="brush: html">
#include "yourcode.here"
</pre>
Note that there are a lot of different brush types that you can use:
  • actionscript3, as3
  • bash, shell
  • c#, c-sharp, csharp
  • coldfusion, cf
  • cpp, c
  • css
  • delphi, pascal, pas
  • diff, patch
  • erl, erlang
  • groovy
  • java
  • perl
  • php
  • plain
  • powershell
  • python
  • ruby
  • scala
  • sql
  • vb
  • xml, html
The source list can be found at http://alexgorbatchev.com/pub/sh/

Friday, January 15, 2010

So, I'm starting to play around with WPF

And if you're like me, you like a nice, clean roadmap/tutorial set. The WPF tutorial happens to be one of the better tutorials I've seen online.

Check it out here.

Thursday, January 07, 2010

God Mode for Windows 7

Found this on CNet this morning. Apparently you can create a nice little 'one stop shop' for setting computer propeties in Windows 7.

It's fairly trivial too. Create a new folder and rename it:
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

And voila, a control-panel-esque window where you can play. Nice.