Windows 7 solution to "My Documents" pollution.

16. April 2010

I have 26 folders in my My Documents folder. Do you know how many of those I intentionally created myself? Nope, lower. Okay, I'll tell you: zero. Applications dump their garbage in there like crazy, and it's annoying as hell, I thought this was where I put my documents! Windows is designed for users to save here, they've made it quite convenient. If only it wasn't so damn polluted!

I'll be honest, when I first saw Libraries in Windows 7 I thought, "Uh oh." Then after hearing Joel Spolsky talk about it on this Stack Overflow podcast I thought, "Oh no."

Well guess what? Libraries in Windows 7 might actually be quite the clever and elegant solution to User Space Pollution, and that, my friend, is a very good thing.

It's simple really, the Common Dialogs of Windows 7 (open/save file...) are designed for conveniently saving to libraries in general now, and no longer My Documents.

common dialog

So the solution is simple. Create a new folder in %UserProfile% (that's C:\Users\<Name>), and name it something like Own Documents. Now click on your Documents library, and then where it says Includes: x locations. Add your new folder, and right click it and set it as the default save location. I strongly recommend removing My Documents from the list entirely.

Documents library as 'Own Documents'

Applications don't use the library interface, they will pollute "My Documents" specifically, and you no longer have to see it! Furthermore, the Documents library with now point to and hold your actual own documents. ;) Eureka.

Note: I haven't ran with this configuration for too long, so it hasn't been thoroughly tested. Worst case scenario is junk in your new folder, which is no worse than before. ;)

Getting the most out of your webcam: tinychat, screen capture, and picture-in-picture.

4. March 2010

04-16-10 Read a valuable addition in the comments.

tinychat, broadcasting a screen capture with picture-in-picture portrait, hand aflame

You want to show off your craptastic code while you sling fireballs at the camera BioShock style don't you? Of course you do. Let's get started.

Download and install the following:

Let's walk through a setup using the phenomenal tinychat.

Tinychat is a 100% free, no downloads or signup required website that lets you easily video chat with others. You can create a video chat room and invite up to 10 thousand people to join in with you. Even though tinychat is simple, it's still powerful and you can easily customize and moderate your rooms with skill.

Only the room creator need login (with TinyChat, Facebook, MySpace, Twitter, etc.). Jump into a room, like tinychat.com/anything_goes_here_whee. When you click Start Broadcasting always choose VHMultiCam. This is the selection you will always make in every application. Proceed.

Save yourself some future work and right click your video and select Settings. Specify that you want your browser to remember to always give tinychat permission to access your mic and camera.

Adobe Flash Player mic & camera settings

So VH Multi Camera Studio launched automatically, this is good. This is the one being utilized (by tinychat). Opening it manually wouldn't have the desired effect. This is where we can create fun and magical combinations and presets.

VH Multi Camera Studio

In the View menu set the resolution to 320 x 240, this is what tinychat and such want to see. Add sources with the menu, position them and resize them, drag and drop them in the list to adjust z-ordering.

The only obnoxiously technical part here is adjusting the settings for each source you add. Right click them and enter Video Capture and/or Video Capture Format under Setup. Unfortunately the Output Size of my camera always defaults to 160 x 120, which is a horrible image. I can get 30 FPS up to 640 x 480, so I have to adjust this each time it's added. Switching to presets that use the camera keep the settings though, so a secret is to add my camera even to presets that don't use it, just hidden behind.

Webcam Video Capture Format Properties

So now let's get VH Screen Capture Driver configured ideally for mouse tracking screen capture. (It can capture and resize windows and other neat things too.) Add VHScrCap to a preset somewhere and enter its settings dialog. Here is what I use:

VH Screen Capture Driver Settings

Check the box Track screen under the Capture tab as well. The notable setting here is output size at 400 x 300. For other 4:3 settings I found 320 x 240 to be too zoomed in, and 640 x 480 too zoomed out. This setting requires you re-initialize VHScrCap to take effect, so jump to another preset and back.

You may have noticed the Show frame option too. This paints a nice red box to illustrate what part of your screen you're capturing. Unfortunately the borders are quite thick, and the box can glitch and freeze. My friend and I (mostly him) wrote our own: RedBox.zip (16.11 kb). That's the code and .exe. No command line just GUI, add one yourself.

Finally, ManyCam. ManyCam is a free program with lots of fun features and effects. It's awesome really. You can pick from any source in ManyCam to represent it in Multi Camera Studio (and thus tinychat). Often you'll want ManyCam set to your camera itself. When doing so you'll get a better image if you force the size to something higher your camera supports.

ManyCam source selection ManyCam output size ManyCam flame effect ManyCam fire setting

You're probably thinking, "Ooh! So I don't really need presets in Multi Camera Studio for my camera itself, just ManyCam!" That's true, except in my case the quality is a bit worse through ManyCam, observe. (ManyCam is on the right.)

Quality comparison between camera direct in Multi Camera Studio and camera through ManyCam in Multi Camera Studio.

So I have extra presets instead. That's about it! There's definitely a ton to figure out yourself. For instance when it comes to FPS I've let everything hover around 30, often sticking to defaults. I've tried to be brief here, feel free to ask me questions in the comments.

Hulu.com, I love you, and I'm blocking your ads.

31. January 2010

An advertisement has never persuaded me in my life. Okay, I'm lying. When I was a wee little boy I distinctly remember seeing Batman and TMNT toys, and LEGO bricks, and other fantastic things on television and begging my mom to buy them for me, and she did. Even then they were never as fun I was manipulated into believing. So, they got me there, and then I grew up.

Beyond that, I'm being honest and forthright. I have never bought something from a commercial, and I wouldn't even say I've been persuaded by a commercial. Influenced? Yes. I've been pissed off (no not at something they intended), and I've had my train of thought and viewing experience interrupted.

Let me tell you how much I love to see televised material that is strictly relevant to my interests, and yes, let us phrase it this way. I will speak of that which I love, staying constructive. Attention is creation. I didn't name this blog Code Optimism for nothing. ;)

Everything I watch on my television is through the DVR system. Yes, that's right, everything. If I bump into a show airing I enjoy, I schedule it to record and I watch it an hour later, where I can hit that wondrous fast-forward button. I'm so good at it I count and automatically average the number of large forward skips between my material on a per-show basis for rapid precision. How I love being constructive with my entertainment time! :) If it's a live show? Same thing. Important news relevant to me? Same.

Now Hulu, I love your service, and I understand the advertisement based model. I'm glad there's such a model (though I contest most is utterly broken in their interest-based irrelevance) and that it can support you (I hope it's enough for you, perhaps not!). Additionally many of the things I love rely on advertising. Favorite websites, and consumer goods too.

That said, I have never clicked an ad seriously. ;) Never. This is a pull society, not a push one. Sorry, welcome to the future. I don't watch the news. I don't read the newspaper. When I wish to know something, or what's happening in a particular field, I perform a search, just when I want to. I use Google Voice for my cell phone. I sign things with disposable email addresses, I don't get coupons in the mail. I even do my cleaning this way. Why would I want all of this garbage when I can seek it out precisely when I need it?

So I use Adblock software. So I screen my calls. So I only fake sign-up for subscriptions. I don't mean to be rude by blocking your ads, advertisers. I'm saving you bandwidth! I'm not ever going to click one of your ads. I'm never going to watch one of your commercials. I don't even second-hand listen or watch your commercials when someone else is. I wear headphones and listen to Sirius BPM, pop dance station. You know what's so wonderful about it? Loud, fast, energetic music, with seamless track changes. The music consistently peaks, no low acoustic style pauses where background noise bleeds through, these are dance mixes! Constant changing wonderful music that makes me smile.

I imagine those remarks about the headphones might seem facetious, but no, I'm quite serious. :) Not only do I avoid something that makes me unhappy, its replacement actually makes me happy! It's fantastic, and I really recommend everyone try it. SiriusWM6 for Windows Mobile, right on my cell phone.

So, I'm passionate about this. I'm so passionate I spend hours, even weeks programming around these sorts of things. :) The payoff is immensely worthwhile to me when I can watch entertainment without my mood ruined with advertising drivel, and emotions are highly important! Good feelings get to keep flowing. :)

So, Hulu, I blocked your ads. I blocked them in the most reliable "you can't do anything about it and you never will be able to" sort of way. I screen scraped your advertisement notice and you'd do far more inconvenience to your users by discarding it, which I'm sure is quite obvious. That simple fact means I will always be able to detect ads. If you let the user know, you let me know. If it's on the screen, I can see it. It's like trying to prevent someone from copy-pasting your text or saving an image from a website. It can't be done. Once it's on my screen my computer has it, and everything else is a completely pointless waste of resources in an unending war of escalation. This is all easily grasped for those in the know.

I don't think you'll mind though, that I'm opting out. I'm not the issue though am I? Someone may package my code in a tidy little consumable and disappear your ads with nary a consideration. The occasional or rare advertisement sucker may cease being suckered altogether, or miss something they'd enjoy. There must be enough of these characters to make a difference, maybe even the ones that knowingly use an Adblocker! I can safely say I'm not one though, no not even the rarest of clicks or purchases that would still soundly register from me. Zero.

So here I offer my crude and personal, barely working code for those like me. I'd love to refine it, to present it neatly with simple instructions and ironclad reliability, but this is my blog, you get the crap I'm working on in its crappy probably can't make it work unless you're a developer anyway state or you get nothing, and it's better the internet get something. ;)

If you're not like me, if you'd rather watch an ad than black nothingness (later I'll add fun replacement things), or if you occasionally are persuaded by an advertisement, or they simply get into your awareness and on your tongue and you do not mind, then enjoy your advertisements and support Hulu, because they deserve it.

Crappy code available here. ;)
Install AutoHotkey... double click main .ahk file

Blanked out Hulu.com advertisement.

Coders: better gamers than you. Take FreeSpace 2.

18. January 2010

(Because we cheat!) Well that's the theory anyway. Except then we stop gaming because we're bored and we go back to coding our cheats.

So I recently dusted off the game FreeSpace 2. Still fantastic, and thanks to the FreeSpace 2 Source Code Project it has new and pretty graphics and mods. Metacritic thinks it's awesome too... if that means anything.

MediaVP updated graphics screenshot, enemy ship targeted at 367 meters.

In a space combat sim, deftness and accuracy are your best friends. Unfortunately in FreeSpace it didn't seem that you could have both. With the sensitivity maxed you could pivot, bank, and pitch with maximum speed, but your target would bounce around your reticle, and you'd miss most of your shots.

Perhaps a very nice gamepad joystick would register a wider range of the slower, gentler movements. Mine certainly didn't, and that may be the most likely scenario. A standard computer mouse absolutely doesn't work, as there's no "center" to return to, you're constantly turning.

I of course thought, "Ha ha! I can fix this" and turned toward AutoHotkey. I was going to code an ugly hack, and have a button or joystick open the key configuration and adjust the sensitivity in a lightning quick second, preserving the state of my other buttons and ship movement.

That is until I spotted an example script in the (very awesome) help file for using a joystick as a mouse. Programmatically controlled sensitivity, some significant rewriting, and yeah. Dominating.

I have one joystick for movement, the other to adjust the sensitivity/speed of that movement for excellent ship tracking, and a button which brings it to the absolute maximum for rapid orientation changes. Also many other intuitive combinations for interacting with enemy/friendly/escort ships, such as targeting, targeting attacker, and so on.

Have at the AutoHotkey script here. Code skillz required, sorry.

Mouse gestures: too awesome for you... until now!

19. November 2009

Mouse gestures are awesome. They're incredibly convenient, powerful, simple, and intuitive. I personally would be no where near as efficient without them. It's when you hold down the right mouse button, and drag the mouse in a particular direction or draw a particular shape to perform an action.

Of course it's apparent that mouse gestures must be too awesome, because you're not using them, are you? In fact, no one seems to be. Sure, the web browser Opera makes fair use of them. There's more than one Firefox extension which does the job too, with pitiful download numbers.

You'd even be hard pressed to find a gesture program for Windows. Though you would find StrokeIt, an entertainingly named little application so awesome I found it invaluable even when it wasn't updated for 4 years and had Vista bugs - but all of that has changed! A version .9.6 is here to release us of such troubles, it's time to rekindle the gesture revolution!

I'm not sure why mouse gestures have received such a poor welcoming, though I have a few ideas. It could be that you think they're slow, requiring convoluted ridiculous wrist gyrations. Is that it? Perhaps certain wonderful applications are even guilty of such default configurations. It sort of makes a difference, you know?

Here's your solution. Install StrokeIt, delete all the default configurations and add the following Global Actions:

  • / Up, Max/Restore
  • / Down, Minimize
  • Right, Move to Next Monitor
  • Left, Move to Previous Monitor
  • MButton, Launch Explorer
  • Up, Close Window

There you go, you just became incredibly more productive. Now enjoy the rest of your life. :)

8664 gestures performed

Note: If you're worried about closing a window accidentally with the Up gesture, don't be. For at least a few years now I've used this gesture and triggered it on accident maybe once, and even then was able to cancel closing my program. Is accidentally triggering gestures one of your fears?

Powered by my custom BlogEngine.NET. Content © 2010 Christopher S. Galpin