Tuesday, August 14, 2012 7:03:30 PM UTC #

SAFE

Categories: .NET | Awesomeness
Technorati:  | 
Tuesday, August 14, 2012 7:03:30 PM UTC  #     |  Comments [1]  |  Trackback
Friday, November 11, 2011 11:07:42 PM UTC #

Every post I write should come with this standard disclaimer. If I ever re-do my blog, I’ll link to this standard disclaimer from the top of every blog post.

This Stuff Just Doesn’t Matter

This stuff, this software development stuff in and of itself, just doesn’t matter. It isn’t the end goal. There are bigger things in life.

All things being equal, it is better to be a competent software developer than an incompetent software developer. This is why I write posts about how to invest my limited time.

All things being equal, it is better to be learned rather than ignorant about software development practices. This is why from time to time I feel the urge to linkblog posts I find on twitter that I believe my blog audience (i.e. you) haven’t seen, and may benefit from. My linkblog posts are gold, I tell you, gold.

All things being equal, it is better to be intentional about your career path and career goals, especially when it comes to dealing with Microsoft’s endless framework lahar. I see a lot of time wasted on studying for exams, and attention given to half-baked frameworks that subsequently under deliver. And I don’t know why, but I have the urge to fix this problem. For those of you who could not care less about helping others make wiser choices with their learning investments, sorry, but it’s who I am, and it bothers me enough to blog about the topic…frequently.

All things being equal, it is better to go to work and experience less unnecessary pain. This is where a lot of my “written for the search engine” and “suriving TFS” posts come from, and where I hope most people find value. I write many of my blog posts with the singular goal of reducing pain. Pain isn’t the ultimate evil. (There’s a great discussion about pain in A Canticle For Leibowitz, which by the way is the first post-apocalyptic book, but I’m too lazy to find the exact quote. PS—dork alert)

All things being equal, it’s more productive for me to blog here than to sit on the couch on a Saturday and take a nap while watching college football. Though there’s nothing wrong with any combination of naps and college football. It’s also better for me to blog than to play video games; or browse the gaming subreddits; or watch someone on twitch.tv live streaming while they play video games; or best of all watch someone on twitch.tv live streaming while they browse the gaming subreddits, which frees you from the chore of browsing the internet yourself. You should probably visit that hyperlink, because it’s just perfect. It’s like watching Inception if Inception featured laziness as its major theme. It just makes sense. Go watch Inception, and go click that link.

I’m not a super expert genius ninja samurai ZeroCool hacker

If it appears that I’m presenting myself as an authority on any topic, make sure I back it up with personal experience. If I don’t have the personal experience to back up my claims, take my argument for what it is: an unsupported opinion. I know that I’m not an expert, and when writing blog posts my self-image doesn’t change—but maybe here on the internet, where they don’t know you’re not a dog, you don’t read my posts the way I intend for you to.

I’m not an expert, but if it so happens I am, I’ll tell you why.

This is a good rule in general. Given blog posts aren’t built off of months of investigative journalism or academic research, the best blog posts are harvested from personal experience (as opposed to blog posts written by pundits with no experience). And let me draw one more point from this: a lot of .NET experts aren’t experts either on the subjects they write about. They are no more an expert, no more experienced, no more capable and have no better software development experience than you or me. They’re just people like you or me with better communication skills. With that said, some of them are true experts. The difference between a good blog post and a great blog post is, in my opinion, the great blog posts are harvested from years of painful experience. Compare this great blog post to my post on the same subject, but clearly written from a newbie’s perspective for an example of this in action.

One additional point I’d like to make is that I feel like I’ve crested the hill and I get it now. Software development is a known problem for me. I’m comfortable with the things I know, and I’m comfortable not knowing the things I’m fuzzy about and still working on (see: estimation; finding out what the customer wants), and I’m comfortable with the fact that I may never learn Haskell, or SmallTalk, or BizTalk, or Joomla. This greater sense of perspective wasn’t always how I was, and I get the idea that most of the working world is full of people who don’t get it yet. So yet another of my part-time crusades is to get everyone up to speed, at least to the point where they get it. I’ve met people who (without some help) will remain forever behind, forever…for lack of a better word: incompetent. And I don’t see my “getting-it-ness” as unique expertise but simply what all software developers should have. I look around and I don’t see that…getting-it-ness. Find me a better word. I can’t write more explanatory text right now without repeating myself.

I will make every effort not to blog work arguments, or be passive-aggressive in general

My theory is most blog posts spring forth from blog arguments or work frustrations, as I feel this urge to blog work arguments from time to time. If I won’t say it in person, I shouldn’t say it on the blog. And even if I say it in person, some work arguments should be kept in the family.

Every now and then I step out of bounds.

And finally, this stuff just doesn’t matter

Software development is not important in the grand scheme of things. Being a bad software developer in and of itself does not make you morally inferior. To pick on something specifically: software craftsmanship is not a new morality, whereby you are righteous (professional?) if you write clean code and unrighteous (unprofessional?) if you don’t. Depending on the bigger picture, and I place emphasis on the phrase bigger picture, you may be doing serious harm by e.g. overdosing radiation therapy patients via your software, or more likely, putting your company out of business because of your incompetence—but in and of itself, being a bad (worse than average?) software developer isn’t evil.

This stuff just doesn’t matter.

Every post I write, no matter how passionate I may sound, no matter if in truth I get carried away and lose perspective and start believing it, this stuff just doesn’t matter.

Friday, November 11, 2011 11:07:42 PM UTC  #     |  Comments [1]  |  Trackback
Friday, August 19, 2011 5:32:02 AM UTC #

Having just lost my previous Windows 7 to what I hope is a freak accident that will never recur, and subsequently having reinstalled Windows 7 from scratch, the list of customizations and programs I install on Windows 7 is a particularly fresh memory.

This is a .NET developer-oriented build and some of the things I do may not make sense to you.

Hopefully one of these tidbits may prove useful to you.

Windows Customizations

  1. Set your keyboard repeat rate to the fastest setting. You’re not your arthritic grandmother, and you can handle the extra speed. I wrote six full paragraphs about this subject in 2007, so if you’re curious as to why you’d make this change, well, I explain keyboard repeat rates in as much detail as anyone else ever has or ever will. I even introduce a keyboard repeat-rate mascot!
  2. Make the same changes to Windows Explorer you’ve made a thousand times before, and will make a thousand times again:
    image
  3. I’m a little crazy, so I have created local accounts for my ASP.NET app pool and SQL Server service account. I know, it’s a little unhealthy.
    1. Get to Computer Management and from there, create your service accounts accounts.
    2. Now that you’ve created these accounts, they unfortunately show up on your Windows login screen. Clutter! To hide these service accounts from the login screen,  follow these instructions. No, I am not bothering putting together a PowerShell script to hide them—tag you’re it.
  4. Now for the dumb optional parts I do:
    1. Change Windows to the puke green I’ve demonstrated above, or if you don’t like my (delightful!) shade of puke green, feel free to choose your own shade of puke green. Your shade of puke green is clearly superior, I admit. To do this, hit the Windows key to bring up the Start Menu and type “glass” into the search bar.
    2. Change the Windows login screen. Choose something like this little piece of awesomeness for your login screen. Let the haters hate (and trust me, they will hate, often).
    3. For a little extra class, change your Windows login picture to be your avatar. Do it especially if your avatar is as awe-inspiring as mine. It won’t be, but you can try your best (and fail).

Windows Features to install

To bring up the “Windows Features” dialog, hit the Windows key to bring up the Start Menu and type “windows features” into the search bar.

  • Pretty much everything resembling the letters “I”, “I”, “S”. Everything IIS, just install it. Don’t install FTP. Note that even if you don’t want to install the server, all the management tools and PowerShell cmdlets are installed here too.
  • Telnet client – Telnet is admittedly horribly insecure, and you should use something more secure. But, I need this telnet client every blue moon to test raw TCP connections to SMTP servers or SQL servers. And yes, I know, there’s PuTTY.

Programs to install

Some of these will pass without explanation. E.g. it’s Firefox, you use it for browsing, no further explanation should be needed.

  1. Mozilla Firefox
  2. Google Chrome Beta – along with being an excellent browser, Google Chrome is also now my favorite PDF Reader. That’s right: no more Adobe Acrobat, no more FoxIt, no more PDF reader we all moved to when FoxIt turned into Acrobat. Just associate PDFs with Google Chrome. Now, the problem with associating PDFs with Chrome is that you can’t find that pesky Chrome install!
    1. To find the Chrome .exe file, the key is to understand that Chrome installs itself in your user profile, not in the traditional “Program Files” location. Without further ado, paste this in your Explorer address bar when prompted to browse for an EXE to associate with PDF:
      %LOCALAPPDATA%\Google\Chrome\Application
  3. Sysinternals Suite – I follow Mr. Rogers advice and make pretend there’s an installer for this, and manually copy this into my C:\Program Files\ folder. I don’t know what most of these do, but Process Explorer (procexp.exe) is a totally tubular Task Manager replacement. Use it as such. I keep Process Explorer running at all times in my system tray and it lets me know when my computer is slow. That sounds trite, but it’s true. It helps to know that I’m not going crazy and my computer is in fact slow.
  4. Git for Windows – Word got out early that git doesn’t work on Windows. As of 2011-08-18, that’s a lying lie from a liar, who lies, from whom lies spew forth. Lies. Git works great on Windows now, and has a painless installer. Download as instructed below:
    image
  5. Paint.NET – honestly, Windows 7’s paint has improved considerably, even to the point where maybe you don’t need to install Paint.NET anymore. But, I’m now a master of Paint.NET and must have it! With it I’ve created the screenshot masterpieces you see above, among other masterpieces such as this timeless masterpiece which is a master work of mastery and a masterpiece. Masterpiece.
  6. Pidgin for IM, assuming you aren’t labeled a corporate security  VIOLATOR by running CATEGORY:UNAPPROVED SOFTWARE – this is the only unobtrusive IM client left. If you (like me) can’t help but look at the ads in all 3 places in MSN Messenger, and don’t like Digsby, well, I guess you’ll like Pidgin. Warning: if there’s a problem with your IM connection or with adding friends, blame Pidgin. I’ve had problems. Even with the need for random reinstalls and short jaunts to MSN Messenger to add friends, It’s still worth it to me to use Pidgin for everyday use.
  7. Nothing says “Windows developer” quite like a Ubuntu VM running inside VirtualBox. I will take this opportunity to point out VirtualBox is free for non-commercial use. So far, so good. I want to emphasize that a) my Ubuntu VM cold boots in 5 seconds or so, and saves or restores a running VM also in about 5 seconds. It’s really, really, really fast, and runs comfortably with 2GB of RAM allocated to it. Disclaimer: I’m running on an SSD and it’s fast. Envy me.
    1. Once you get the VM installed, you must install the VirtualBox utilities, which notably install the flexible, virtual driver that lets you resize your Ubuntu window anytime. Without them, you’ll have a horrible experience and run in a tiny porthole.
    2. Note that anytime you update your Ubuntu install, you will have to reinstall the VirtualBox utilities to again get minimally bearable display drivers. I am not sure I care why.
  8. Skype + headset: If you haven’t been paying attention to Skype recently, it’s both getting bloated and awesome. I’ll just focus on the awesome part today: with Skype, you can make a landline-quality voice call over the internet, plus screen sharing, for free. In case you didn’t get that, I said

    signbot
Categories: .NET | Awesomeness
Technorati:  | 
Friday, August 19, 2011 5:32:02 AM UTC  #     |  Comments [2]  |  Trackback
Tuesday, March 22, 2011 3:23:38 PM UTC #

true-measure-of-productivity

This screenshot was taken in the wild by me, at my computer a while back.

Each Cassini tray icon roughly equals one standard unit of productivity. By this completely unbiased, objective measure, I’m about seven hundred times more productive than you. Give or take.

Categories: .NET | Awesomeness
Technorati:  | 
Tuesday, March 22, 2011 3:23:38 PM UTC  #     |  Comments [0]  |  Trackback
Wednesday, February 02, 2011 6:00:00 AM UTC #

Bullet point summary, for the skimmers

Your attention is already waning, so I’ll get with the bullet points:

  • Runas is useful in surprising ways, including troubleshooting build breakages, security testing, and running as your service account. This is the old, boring runas.
  • Runas features the /netonly switch, which makes the impossible possible on VMs and off-domain machines. I’ll save some of the thunder for later.

Introduction

You're welcome!I feel sorry for everyone who is forced to do their day-to-day work on a corporate machine. It seems that in the last few years, virus scanners have dug their filthy, performance-sapping claws into your network connection, your email, and your (Internet Explorer) browser. All this added to the “scan every file before it’s accessed” behavior we’ve all come to know and love.

On behalf of corporate IT everywhere: you’re welcome.

It’s brutal out there for those of us beholden to the dreaded corporate desktop image. Oops—did I say us? I mean you. You—you’re beholden to whatever IT gives you. I’m living the high life*.
* this is a metaphor 

At work we’ve run some tests (literally—we routinely run a pile of integration tests), and my old, busted laptop* is somewhere in the area of five times faster than the new hotness desktops running the corporate Windows XP image. But let’s not belabor the point.
* “What a piece of junk!” “She'll make point five past lightspeed. She may not look like much, but she's got it where it counts, kid. I've made a lot of special modifications myself.”

For those of you reading this on a corporate desktop, thanks for getting this far, but the following blog post probably won’t help you. You’re already on the domain, so you will rarely (if ever) need this trick! Enjoy running Windows XP for another five-to-ten years!

Now that we’ve gotten rid of the losers

…let’s get on with it. Runas allows you to impersonate another user while running most any Windows app.

For server admins, this means you can run with an unprivileged account for your day-to-day tasks (like waiting patiently while Outlook runs chkdsk on your 4GB PST file) and perform your catastrophic admin mistakes (like accidentally promote a domain controller) inside a management console or command shell running as a Domain Admin. You still make catastrophic mistakes, but not catastrophic mistakes specifically because you’re running a Windows account with full administrative privileges all the time. There’s a whole world of catastrophic mistakes for you to discover and experience as an admin. Moving along.

This Runas behavor is the plain, vanilla Runas , and you can get this behavior by SHIFT+RIGHTCLICKing on pretty much anything in Windows. To make things easier, you can also create shortcuts on your desktop to always prompt you to log in as someone else (AKA “run as” someone else).

For developers, this means you can run SQL Server Management Studio as your app’s service account so you can talk to your test database…your app’s test service account, I’m sure.

Also for developers, you can also launch a browser window as another Windows user. This is a great trick for testing out security on web apps that use Integrated Windows Authentication.

Also also for developers, you can impersonate your build service account to run your build so that your prompt runs 100.0% precisely the way TFS/TeamCity/Whatever runs it, in order to troubleshoot any weird problem with your build. <==THIS IS A LIFESAVER

For SP admins, you can launch browser windows as your farm account or whatever admin account you have, or of course, completely unprivileged accounts to test security trimming.

Let’s see this in action:

runas8

Let’s break down what just happened:

  1. I ran PowerShell as myself (username “P”). This is evidenced when I interrogate the USERNAME environment variable.
  2. From PowerShell, I perform a Runas cmd.exe. This launches the cmd.exe shell.
  3. From the impersonated cmd.exe shell, I interrogate the USERNAME environment variable. This shell is running as svc-sql. So smooth.

And yes, I give the SQL instance running on my laptop its own service account…what of it. I’m not crazy.

But I knew all that already—what if I’m not on the domain?

I’ll bring the thunder, I promise.

First of all, a slight technicality. Wherever I say “domain” in this blog post, I mean “AD forest”. Sometimes being precise with your vocabulary isn’t helpful.

So. There are two major scenarios wherein you need (absolutely NEED) to run as a user on a different domain.

ONE: you’re running a virtual machine running in its own little virtual world on its own virtual domain, and NEED to talk to the real domain, so that you can connect to the test database server and run some queries.

TWO: you’re running on a non-domain laptop running its own brand of non-corporate-imaged bliss, and NEED to talk to the real domain, so that you can connect to the test database server and run some queries. Maybe accidentally DROP some databases while your users are testing.

NEED. This is the face of NEED.

Also, more rarely, if you NEED to connect Microsoft Excel directly to your database server to run a query, but must authenticate with Integrated authentication as another user? And you’re running off-domain? Don’t puke: pivot tables are really, really beautiful, and I mean that sincerely. My love for pivot tables is pure as the driven snow. Anyway, I’m not here to defend my Excel+SQL abomination, I’m here to bring the thunder.

Enter the /netonly switch

Using runas /netonly allows you to run your app locally as you (in my case, the user named “P”), while authenticating over a network with another user. It’s like a rare kind of magic, like a hornless unicorn.

Also like rare magic, I have no idea how runas /netonly works. There’s probably somebody who knows how it works (someone who has gazed into Win32, and Win32 has gazed back into them), but not me. It’s good enough for me to know that runas works…somehow.

runas1

Let me try to break down what just happened in the screenshot above (and note the differences with between vanilla runas and runas /netonly):

  1. I ran PowerShell as myself (username “P”). This is evidenced when I interrogate the USERNAME environment variable.
  2. From PowerShell, I perform a runas /netonly cmd.exe. This launches the cmd.exe shell.
  3. From the cmd.exe shell, I interrogate the USERNAME environment variable. The impersonated shell is still running as “P”. However, were I to authenticate with resources on another domain, Windows would send the credentials for “OnTheINTERNET\NobodyKnowsYoureADOG”.
    1. This is the point where I should try to prove that, as far as authenticating over the network, your program behaves as if it’s the impersonated user. Unfortunately I just tried to connect to CodePlex’s TFS as my example, and the work involved connecting to CodePlex via TFS depressed me, so, I won’t be attempting this today. Just try out one of my sample scripts for yourself; it will take all of 10 seconds to verify. Side note: THANK YOU, CodePlex team, for first funding SVNBridge, THEN including direct SVN support, then providing direct Mercurial support.

Bringing the thunder: SQL 2005 management studio

REM the following script assumes a 64-bit system,
REM and assumes you installed SQL 2005 in the default folder
REM change the parts below in RED
runas /netonly /user:REALDOMAIN\YOURDOMAINUSERNAME "C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe"

runas2

Bringing the thunder: SQL 2008 (eight) management studio

REM the following script assumes a 64-bit system,
REM and assumes you installed SQL 2008 in the default folder
REM change the parts below in RED
runas /netonly /user:REALDOMAIN\YOURDOMAINUSERNAME "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe"

runas3

Bringing the thunder: Excel 2007

REM the following script assumes a 64-bit system,
REM and assumes you installed Office in the default folder
REM change the parts below in RED
runas /netonly /user:REALDOMAIN\YOURDOMAINUSERNAME "C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE"

runas4

Still not perfect

There are a few scenarios where this still doesn’t work:

  • TFS command-line client running from inside a cmd.exe prompt. To be fair to the TFS command-line client, it goes out of its way to let you type in credentials at runtime.
  • Remote debugging off-domain in Visual Studio is still a challenge. I just tried to set it up on my laptop this last week, and failed. Note remote debugging requires some firewall tweaking as well, so maybe this is a PEBKAC-type problem and not a runas /netonly problem.

You’re welcome

The pattern is simple: give runas your name, full path to the exe, and type in your password when prompted. If you have NEED to run the command frequently, create a batch file and quickly make a SlickRun MagicWord.

Or, let’s be honest, just drag a shortcut of your newly-created batch file to the Windows 7 start menu and be done with it. Searching for items in the Start Menu is almost as good as SlickRun—a good enough experience such that program launchers aren’t necessary anymore.

Credit where due…thanks, TWITTER! (and I guess, Ryan)

runas5

Categories: Awesomeness
Technorati:
Wednesday, February 02, 2011 6:00:00 AM UTC  #     |  Comments [0]  |  Trackback
Monday, January 17, 2011 4:00:00 PM UTC #

Welcome to 2011. It smells terrific here!

The problem

You may not know it, but you have a problem. You’re using the standard Windows command shell. This is a problem.

image

The problems are manyfold and boring, so I’ll briefly summarize:

  • Cutting and pasting is a problem.
  • The cmd shell’s default history is 100 lines. This is a problem.
  • DOS’s autocomplete featureset predates the word intellisense. It’s bad.
  • DOS hates double-quotes. A lot.
  • DOS also hates the less-than/greater-than characters. Try this on: runas /user:PC\windersUser /password:”I believe in using long passphrases and good security etc and so forth so I’ll throw in some special characters, like double-quotes (“) and a bunch of other random stuff: <>file1"
    • I waxed a little eloquent on the point above, and could go into futher boring detail, but just take my word for it. DOS doesn’t do windows, and DOS doesn’t escape special characters. Ever.

The solution

junk1

The solution is to launch PowerShell. For the privileged few running Windows 7, it comes pre-installed. For the rest of us, minus the crazy dude still running Windows 2000 for security/paranoia reasons, PowerShell can be downloaded.

A small aside: the Start menu in Windows 7 is excellent. I don’t maintain icons on my desktop, the quick launch, pin programs to the taskbar, clicking through the Start Menu. I just tap the Windows key and tap in a few letters. For PowerShell, WINDOWS, “p” “o” “w”, then ENTER. That’s it.

I rarely use SlickRun nowadays.

Ahem. Onward.

So now I’m running PowerShell…now what?

You get:

  1. Better autocomplete, especially with file and pathnames.
  2. Better default settings, including an output history that stores $HUGE_NUMBER lines.
  3. A shell that doesn’t hate spaces and double-quotes, and by extension, you.
  4. Little neat things, like dynamic vertical and horizontal resizing, and…
  5. Easy cutting and pasting. Allow me to give a full tutorial below:

Cutting to the clipboard

junk1

Pasting to the PowerShell host

junk2 

It’s The Little Things

Tonight I’m working through the Ruby koans. I know, who cares. But I’m here to tell you that, though there’s not all that much difference tonight between using the cmd shell and the PowerShell host, there’s a few little things that add up. Here’s a little thing: just now, I made this simple, tiny improvement that combined the cls command and the “run the koans” command into one line, which made iterating through the Koans that much more easier. Re-running the koans is now as easy as UPARROW, ENTER:

junk3

Footnotes

I haven’t bothered trying Console2 yet.

I know cmd.exe is technically not the DOS shell. Technically it still has all the interpreter problems DOS 3.3 had, so I’m calling it DOS, plus the full name for the built-in shell is probably something like Microsoft Windows Command Shell 2011 for the Microsoft Windows 7 Operating System Administration Pack R2 (KB994112). I just made that up, but if you think the name is a total exaggeration, go research why we call “VSTO” by a four-letter acronym.

Running cmd.exe inside PowerShell (strictly for the lazy)

If you love everything I’ve said, but can’t summon the mental energy to learn remedial PowerShell, that’s okay. You can still gain some benefit from the PowerShell host running the DOS command shell! Just type “cmd<ENTER>” at the prompt, to roll into the land of LEGACY.

junk4

Categories: Awesomeness | PowerShell
Technorati:  | 
Monday, January 17, 2011 4:00:00 PM UTC  #     |  Comments [3]  |  Trackback
Thursday, February 19, 2009 5:12:52 AM UTC #

Or, how two unlike things can seem alike!

A while back, I followed a fascinating link from programming.reddit titled Pablo Picasso's version of refactoring: Reducing a drawing to 12 perfect pen strokes.

As the story goes, Pablo Picasso created a series of eleven lithographs of a bull in profile. He first created a detailed, accurate image of a bull. Then, for his next lithograph (I don't know what a lithograph is either, let's just pretend these are drawings from now on) he changed some aspects of the bull, accentuating its bull-ness. As he progressed, he began to remove detail, slowly replacing photorealism with smaller expressions of the same aspect, retaining the bull-ness. His last drawing was twelve or so thin strokes, a stick figure still roughly recognizable as a bull.

As the programming.reddit title indicated, this sounds a whole lot like refactoring!

It's super impressive, and I dearly urge you to look at the progression of Picasso lithographs yourself (click link below):

Now for the dangerous part.

.

.

.

.

.

.

.

.

.

Extra space added so you follow the link before viewing the section below; you'll miss out on the full experience otherwise!

.

.

.

.

.

.

So you're with me, right?

.

.

.

.

.

I was feeling great until I read this, the first comment on the reddit comments thread:

image 

This is something with which I want to leave you. The next time someone makes a bad analogy, nail them with this Descartes quote. I can't pronounce Descartes properly, but that won't stop me, and it shouldn't stop you either. If in doubt, try a "dude, the French philosopher dude," sprinkle the word "dude" anywhere you're uncertain; they serve as TODOs for your vocabulary.

 

Aside: in true reddit fashion, this is the next highly-rated comment thread:

image

 

…and following that, unintentional, then intentional, references to realultimatepower.net.

Linking this discussion to the present day

This misuse of seeming similarity is (among other reasons) why a lot of us are bugged with recent CodingHorror posts. Specifically, let's take list a):

List A: SOLID principles et al

image

 

Here's list b), in The Ferengi Programmer (emphasis added):

List B: 285 Ferengi Rules of Acquisition

The Ferengi are a part of the Star Trek universe, primarily in Deep Space Nine. They're a race of ultra-capitalists whose every business transaction is governed by the 285 Rules of Acquisition. There's a rule for every possible business situation—and, inevitably, an interpretation of those rules that gives the Ferengi license to cheat, steal, and bend the truth to suit their needs.

And in case that was a coincidence, here's the list from his next post, responding to the standard rebuttal:

List C: processes and methodologies

image

 

So the question to you: are these three lists the same?

I win either way

My logic is inescapable. If you think the SOLID principles (list A) are in fact, as sneaky and extensive as the Ferengi Rules of Acquisition (list B), and are just the newest in a long line of fad methodologies (list C), then hey: I'll point you to the story about the bull, and how we all thought it was similar to refactoring. Except when you think about it, it's wasn't refactoring, it only resembled refactoring on the surface. I mean, come on, he drew pictures of a bull, it wasn't refactoring. I dare you to say the Picasso bull lithograph series was like refactoring.

And there I have you as well! Because if you refute my drawing-a-bull-isn't-like-refactoring argument, then by the very nature of your disagreement that "these two things aren't alike," you're proving that "these two things aren't alike!" Refute my "bull-metaphor doesn't apply to refactoring" argument to the "Ferengi rules metaphor doesn't apply to the SOLID principles" argument, and you've proven the very thing you're trying to argue against! I have you either way!

Next time I see you I'll collect the five dollars you owe me. And before you say to yourself "but I don't owe Peter $5," remember, my logic is irrefutable and you owe me a fiver*. Descartes says so. THE BULL! Pay up.
*this is a real word, people use it

Categories: .NET | Awesomeness
Technorati:  | 
Thursday, February 19, 2009 5:12:52 AM UTC  #     |  Comments [1]  |  Trackback
Tuesday, October 28, 2008 1:52:14 AM UTC #

Yes, I'm aware it's late in the year 2008, I'm aware this stuff isn't as fresh as WPF 3D or Ruby Processing.

As I've posted earlier, I've accrued some treasured junk. Now that I have all this junk, what am I to do? Well, um…I didn't really know either.

So I started messing around.

Messing around with System.Drawing: first, infrastructure

The first thing I did was to determine the average color for a single image. I'm not sure exactly where I'm going, but I figure, hey, if you want to get a rough "picture" of what an image looks like, it's not a bad idea to look at the average color value. And we're using the RGB breakdown for color, meaning white is #FFFFFF (256,256,256), black is #000000 (0,0,0), and everything else falls in between.

Note that in my case, performance is not a big deal; I'm doing all these calculations one pixel at a time which, as you might image, is suboptimal. Mostly a straightforward operation:

public static Color Average(Image image)
{
    using (Bitmap bitmap = new Bitmap(image))
    {
        int red, green, blue;
        long redRunningSum = 0, greenRunningSum = 0, blueRunningSum = 0;
        long numPixels = bitmap.Width * bitmap.Height;

        foreach (Color pixelColor in ImageHelper.GetPixelsFor(bitmap))
        {
            redRunningSum += pixelColor.R;
            blueRunningSum += pixelColor.B;
            greenRunningSum += pixelColor.G;
        }

        red = (int)(redRunningSum / numPixels);
        green = (int)(greenRunningSum / numPixels);
        blue = (int)(blueRunningSum / numPixels);

        return Color.FromArgb(red, green, blue);
    }
}

Ok, so why do we care—it's a function, right? Well, okay, yes—but here's a PowerShell function you may also find interesting:

function Average-Images ($filenames)
{
    [void][reflection.assembly]::Loadfile("C:\a\sandbox\ImgTest\bin\Debug\ImgTest.dll")
    $i = 1
    $total = $filenames.count
    $results = @()
    foreach ($filename in $filenames)
    {
        write-host "$i - $($i*100/$total)%- $($filename)"
        $i++
        $img = [System.Drawing.Image]::FromFile($filename)
        $o = new-object PSObject
        $avg = [ImgTest.ImageHelper]::Average($img)
        add-member -inp $o -membertype "NoteProperty" -name "Filename" -value $filename
        add-member -inp $o -membertype "NoteProperty" -name "Image" -value $img
        add-member -inp $o -membertype "NoteProperty" -name "Red" -value $avg.R
        add-member -inp $o -membertype "NoteProperty" -name "Green" -value $avg.G
        add-member -inp $o -membertype "NoteProperty" -name "Blue" -value $avg.B
        $results += $o
    }
    $results
}

So. This is getting interesting. What the "Average-Images" function above does is create a custom object with some useful properties: we've got the original filename, we've got a still-breathing reference to the System.Drawing.Image object, and we're storing the "average pixel's" red, green, blue values as individual properties. The resulting objects look something like this:
image

Maybe it's still not interesting for you. That's fine, 'cause this party's* just getting started!
*despite what I've just written, this is not a party

I have one more piece of "infrastructure" to explain, before we can get cooking: I've created a PowerShell function called "Make-Html," which creates a permanent HTML file listing all the images I want to see, in the order I want to see them. As an added bonus, the function immediately launches the newly-created file in my browser. Here's the code:

$startDir = "C:\a\ps1\scrape\"
function Make-Html ($fullfilenames, $resultingFilename)
{
    $files = $fullFilenames | % { $_.split("\")[-1] }
    $tags = $files | % { "<div style=""float:left;""><img src=""$_""/></div>" }
    $html = @"
<html><head><title>$($resultingFilename)</title>
</head><body>
$($tags)
</body></html>
"@

    $html > "$($startDir)$($resultingFilename).html"
    ii "$($startDir)$($resultingFilename).html"
}

Ok, I know, we're still not doing anything.

Let's warm up

Okay, as I say to everyone, the real power of PowerShell is its object piping. PowerShell pipes objects, not text; this is something best seen, not heard, and hopefully we'll see a little something today. The objects we'll be slinging through the pipeline today are, as mentioned above, custom objects that have a Filename, an Image, and the RGB values representing the image's average (mean?) color.

So, let's count how many items we have:
image

Awesome. Let's count how many items we have that are more red than any other color:
image

Hmm, that was unexpected, 359 red-dominant images out of 503, that's proportionally huge. I'll point out that I did some extra fanciness to get this count to evaluate on one line, but usually (i.e. when I'm not posting to my blog) I'll work my way in parts, not all at once. So the same thing, split out, would be:
image

That's more realistic.

Okay, one more thing before we go. Finding out most of my pictures are red-dominant has me wondering: what about the other two? Let's work with the objects a little* to massage the answer out of them:
*a lot; ugly function that pulls out the dominant color not shown
image 

Weird.

Skipping ahead to the end

This is the pattern: we'll ask a burning question, we'll form this question as a PowerShell pipeline, and we'll see the results.

Question: can we see the images in order of "redness"?

Pipeline:

$a | sort red | % { $_.filename }

Results:

Least red:

20080707024010
200549766 

Most red:

20080524165059
439193020

Summary: okay, that makes sense. We used a naive algorithm that simply counted the red value, meaning that a pure black image or a pure blue image would have the "least redness" and a pure white image would have as much "redness" as a pure red image. Hmm, we can fix this. Onwards!



Question: Okay, so we're looking for redness. Let's call this proportional redness. Hmm, here we go:

Pipeline:

$relativelyRed = $a | select filename, @{Name="redness"; expression={$_.red / ($_.red+$_.green+$_.blue) }}
$relativelyRed | sort redness | % { $_.filename }

Results:

Least red:

883437048
20080327175323

Most red:

899605173
20080418093945
20080524164842

Summary: now that's more like it. Our earlier naive results were instructive, but this is more what I was looking for.



Question: okay, so let's stop messing with redness. Instead, let's find out what images have the most variance between the colors. We're less interested in the white-gray-gray-gray-black spectrum, and are looking for more colorful images. Let's do this:

Pipeline:

$variance = $a | select filename, @{Name="Variance"; Expression={$avg = ($_.red+$_.green+$_.blue)/3; $var = [math]::Abs($_.red-$avg) + [math]::abs($_.green-$avg)+ [math]::abs($_.blue-$avg); $var} }
make-html -fullfilenames ($variance | sort variance | % { $_.filename }) -resultingFilename "variance"

Results:

Most balanced:

783914459
281592264
741444854

Most variance:

20080831161327
20080701085401
787193910
307907780

Summary: most interesting, besides a grouping of the "grayish" and "black and white" images all together, is the smattering of images that have color, but are so perfectly balanced they're nestled right in there with the pure black-and-white images. Neat.

Final bits

This post is already too long. There's not too much else to say, besides a) stuff is awesome, and b) with the aid of either PowerShell functions or .NET library calls, you can do some complex things. If you only remember one thing from this post, try and pick up the impression I'm trying to leave. This is how I see PowerShell: it's an experimental playground where I morph a thought, an idea, slowly into something workable, and in each step along the way, I'm getting feedback and refining, and in the end, I've satisfied my curiousity. Maybe it's something as useless as basic image analysis using System.Drawing.

Incidentally, if you want to see how the professionals do this kind of thing, check out Multicolr - an color search engine indexing 10 million Flickr pictures, which makes the stuff I did above kind of pitiful looking :) When I checked last, the Multicolr site was slow, otherwise it's neat; check it out.

Categories: Awesomeness | PowerShell
Technorati:  | 
Tuesday, October 28, 2008 1:52:14 AM UTC  #     |  Comments [1]  |  Trackback
Tuesday, October 21, 2008 11:58:07 AM UTC #

HOWDY!

This is a quick announcement to let you know that my site now runs on ASP.NET MVC. A few things have been updated:

(strike that) dasBlog 2.1 running on ASP.NET MVC Preview 5

dasBlog 2.2 running on ASP.NET MVC Beta

First thing I should point out is that I'm running under IIS7 Integrated mode on shared hosting. If you're attempting this, be sure you're running on IIS 7 in Integrated mode. If you're trying to test this out on your own machine, this means you must be running Vista or Server 2008, must create a fresh web site in IIS and make sure the app pool is running on Integrated mode. Let me be clear: you can't properly test on the Cassini web server running your Visual Studio project.

ALSO: Now that ASP.NET MVC Beta adds itself to the GAC, for a while (until you host loads the dll's to its server's GAC), you'll have to make local copies of each ASP.NET MVC dll. "Copy Local" a property under each assembly Reference—set it to True for each one of them.

Ok. There are three things you have to do to get dasBlog working underneath an ASP.NET MVC app.

First, in your MVC app, set Routing to ignore your blog's folder. Mine is called "/blog". Here's what it looks like (I think I stole this from a Phil Haack blog post, so if it looks familiar, it is):

code setting routes to ignore blog dir 

Second, and this won't be an option for all of you—I removed all the System.Web.Extensions (AKA ASP.NET AJAX, AKA "Atlas") from my root MVC app. This fixed the problem I was experiencing with my ASMX-powered RSS feed, which Atlas usurps by default (thanks Ben for the tip, that did the trick).

Third, we need to do some heavy work on the dasBlog web.config. First I'll say, thanks to Paulb on the dasBlog team for providing the starter IIS7 web.config. Big ups to changeset 14700.

Instead of attempting to explain in detail any of the nasty things I've done to make the dasBlog 2.2 web.config work under the most recent MVC drop, I'll just post my web.config directly for viewing. I don't recommend what I've done for others; instead I'll say that I got my web.config minimally working underneath a small MVC-based site.

If you're reading this blog post because no one else has provided a better explanation, then maybe perusing my web.config will help.

Without further ado, I present you: web.config of my dasBlog application running underneath an ASP.NET MVC site.

KNOWN ISSUE: http://www.pseale.com/blog (without the trailing slash) bombs out with an error. http://www.pseale.com/blog/ works fine. I assume it has something to do with the blowery.web component, something that I have no desire to fix; I'll work around the problem with a Routing fix/hack. Anyway, lesson learned: BEWARE TRAILING SLASHES!

UPDATE: apparently the blowery.web compression is somehow interfering with delivery of my CSS files. I say apparently because I didn't attempt to troubleshoot this, I just disabled the HttpModule…with extreme prejudice! As much extreme prejudice as one can muster against an HttpModule, anyway.
Categories: ASP.NET MVC | Awesomeness
Technorati:  | 
Tuesday, October 21, 2008 11:58:07 AM UTC  #     |  Comments [0]  |  Trackback
Tuesday, October 14, 2008 3:31:12 AM UTC #

 huge massive collage

Recently I've been trawling THE INTERNET for retina-dissolving or otherwise awesome images, and have programmatically collected/mushed them into the nuttiness above. More to follow soon, unless I'm lazy. So, uh, probably more to follow…eventually.

EDIT: reposted with an image that is NOT 3MB. Yes, the original image was 3MB, a catastrophically large file. I'm like the guy who sends a holiday greeting PowerPoint over email that brings down the mail server for two days. Thankfully no one subscribes to my blog, otherwise that could have created "heap big bandwidth bill." I blame Windows Live Writer and Paint.NET, daring me to paste directly from one program to the other. For shame, Paint.NET. For shame.

Categories: Awesomeness
Technorati:
Tuesday, October 14, 2008 3:31:12 AM UTC  #     |  Comments [0]  |  Trackback
Thursday, August 21, 2008 8:00:39 AM UTC #

Announcing: Houston Techfest 2008 – 09/13/2008 at U of H

image

The second annual Houston Techfest takes place on Saturday, September 13th, at the U of H main campus. This year the Techfest has expanded to over fifty sessions. Make the time to attend!

This is a free, community-driven event that (this year anyway) features mostly Java-related or .NET-related content, with a smattering of just about everything else.

This is your only chance to attend such a wide variety of in-depth sessions, in one place, without getting on a plane and flying somewhere. If you’re bored by flashy tech demos, attend the Methodology, Security, and ALT.NET (AKA Continuous Improvement) tracks. On the other hand, if you love flashy tech demos, we’ve got those too! Lots of them! I'm also happy to say that most of the sessions cover advanced topics, so if you're an information nut like me, you'll find something new at the Techfest. And it’s not all business either; there'll be fun sessions on XNA, Deep Zoom, and Robotics Studio. Don't forget, the price is right!

Houston Techfest 2008 Topics List

A Deep Dive in the ADO.NET Entity Framework Getting started with Linq Keynote: Having fun in building Web Applications using Ruby/JRuby/Rails LINQ to SQL and Gotchas manageability, operation and monitoring of .NET applications. Using the new Features in C# 3.0 ASP.NET AJAX and the Future of Web Development Creating Services which Rock DotNetNuke Dynamic Data A look into the Ajax Frameworks A Look into Windows Workflow Foundation in .NET Framework 3.5 ASP.NET 4.0 (Ajax Templeting, MVC Dynamic Data, MVC Ajax, etc) Developing with .Net and Oracle Technology Parallel Computing with .NET : Design Patterns in .Net Getting Started with NHibernate Intro to Test-Driven Development Mocks and Stubs TDD, DI, and SoC with ASP.NET MVC Improving Application Performance using Team Suite Oracle SQL Tricks and Traps Oracle URM (Universal Records Management) and Microsoft Sharepoint Robotics Studio – Interfacing with the real world. XNA and Game Studio Building a blog with ASP.NET MVC Cross-Platform .NET: Mono and Moonlight Parallelizing Mature Algorithms using OpenMP Virtual Worlds and Virtual World Evangelism: From Here to Eternity Java FX Scene Graphs Java Solutions to Capacity Issues Concurrent Programming Topics in Java Google Web Toolkit Instrumenting your code to reduce support headaches Bandwidth and performance considerations in Ajax/RIA/polling applications Eclipse RCP Managing Software Complexity Migrating to Maven 2 Demystified The Point of Exceptions Building SOA Applications using BPEL, Open ESB, JBI, GlassFish and JavaFX Script is a compiled, declarative scripting language that runs on New in Spring 2.5 and the world of Spring OSGi, Spring Dynamic Modules, and SpringSource Application Platform The Productive Polyglot Programmer Adopting Process One Bite at a Time Behavior Driven Design: OO Priniciples & the Cure for Badly Designed Applications Principles of Object Oriented Design Scrum-tastic Development with Visual Studio Team System and Light Weight Scrum Making Your Test Lab Obsolete with Virtualization Securing and Protecting Applications and Services Static Analysis Techniques for Testing Application Security The OWASP Top 10 WS-Federation 5 Things I Learned from Lean that Could Have Saved My Last Agile project Intro to Silverlight 2.0 Silverlight Deep Zoom WPF and Silverlight Data Binding WPF and Silverlight Styles and Templating

  ..oO( Full Houston Techfest 2008 Agenda )Oo.. 

==> To attend, you must register! <==

  1. Register as a user on the Techfest site. Here is a direct link to the registration page.
  2. Without closing the browser (and without losing your session) visit the Agenda page and select each session you'd like to attend.

Links

Finally, Lando

I don't know how, or why, but what I do know that I promised Lando, and so I must deliver. So, without further ado:

Lando.
Categories: Awesomeness
Technorati:
Thursday, August 21, 2008 8:00:39 AM UTC  #     |  Comments [0]  |  Trackback
Wednesday, August 20, 2008 8:00:12 AM UTC #

First off, I'll point out I'm not an SVN expert, nor am I a CodePlex expert. I've just figured out how to do the basics, and found that the process was way too complicated. It's like you need a diagram to figure out how to make it work! What I've created below is that diagram: here's how to do a checkout of your CodePlex project from SVNBridge!

Step 0: I assume you have installed SVNBridge and a SVN client (e.g. TortoiseSVN)

If not, make that happen first.

Step 1: Figure out where your CodePlex project is hosted

CodePlex - click on the Source Code tab; memorize your project name and Server URL.

Step 2: Figure out where your SVNBridge proxy is running

image

(NOTE: do not mess with the SVNBridge "Proxy settings" unless you're the one person in the world still running behind an authenticated HTTP proxy. You're not, so don't mess with it)

Step 3: Now we're ready to CONCATENATE!

image

+PLUS+

image

+PLUS+

image

Step 4: Let's try this URL in Tortoise!

mashed together CodePlex + SVNBridge URL

 

image

RESULT: Success!

Success!

Footnote: Authentication is another matter

If you need to do updates/commits/etc, you'll need to be sure you're authenticated properly. Use a slightly modified version of CodePlex username and password:

SND\cp_[[yourCodePlexusername]]

(yourCodePlexpassword)

Footnote: If you can't see the source code on the CodePlex site, it doesn't exist

If you're having problems accessing the source through SVNBridge, but it's not spitting out any errors, then consider the possibility that the source isn't public yet.

Categories: Awesomeness
Technorati:
Wednesday, August 20, 2008 8:00:12 AM UTC  #     |  Comments [0]  |  Trackback
Saturday, July 19, 2008 4:30:43 PM UTC #

This will be quick.

QUESTION: is there anyplace in, near, around, or even remotely near downtown Houston, where I can go get free wifi? Where they're not trying to shoo me out the door as soon as I walk in? The first person to say "Starbucks" gets shot; they don't give out free internet anymore, since 2000, or way long ago. Also in the news, they're closing a bunch of stores. ARE THESE TWO THINGS RELATED? You make the call!

Back to business.

I'm looking for something as awesome as a Panera. 1) Free wifi, 2) Encouraged/allowed to stay for 2+ hours, 3) Fountain drinks are a huge bonus, but not required.

And before you ask, no, for some reason there are no Panera's near me. Anywhere near me. Allow me to illustrate!

Categories: Awesomeness
Technorati:
Saturday, July 19, 2008 4:30:43 PM UTC  #     |  Comments [1]  |  Trackback
Wednesday, June 11, 2008 4:46:27 AM UTC #

Today's fun challenge on SPOT the TYPO will be a piece of a SharePoint deployment script!

Let's bring on the challenge!

SPOT the TYPO!

image
(line breaks added for readability; ignore them) 

Still can't find it?

Maybe there's a problem with the image…let's try plain text!

stsadm.exe -o deploysolution -name MySolution.wsp –immediate -allowgacdeployment

Wait, I think I saw something!

Here's the image, enlarged:

image

I definitely saw something!

Now let me highlight the important bits. Enhance!

 image

…enhance!

image

MYSTERY: why is this dash character wider?

Something is definitely fishy! Let's check out a hex dump and see what it says!

 image

Hey, now that doesn't look like the standard ASCII character for a dash! That's not like a dash at all!  In UTF-8 encoding (as this file is encoded), ASCII characters should look like ASCII characters! Right? Right!

Dude, where's my cardash?

It turns out, it's the endash, "&#8211;"—heretofore dubbed "the script ruiner." Read all about it (and I mean all about it) in this incredibly detailed article, about the endash. I'm serious, check it out.

OK, WE GET IT

As is always the case with these "why did my character magically become some other character" mysteries, we can safely blame Word AutoCorrect. When we're typing up technical documentation in Word: blame AutoCorrect. Even when we're typing in Outlook, where we think we're safe: we're not safe, Word AutoCorrect lurks in the shadows! It's hiding under that huge ribbon, waiting to pounce! Ha-ha, those three dots just became an ellipsis! You didn't even notice!

Let's say we're looking at a complex Microsoft Knowledgebase article, oh, say #934838. Let's just say. And let's say that on this article, there are lots and lots of commands just begging to be cut-and-pasted into your favorite text editor, Notepad. Notepad is your favorite text editor because you're not crazy enough to attempt to install another one on the production server. And when you paste this into Notepad, everything looks great on the standard Notepad monospace font. It's a monospace font, think about it.

And then you paste the text directly into the Command prompt, which spits out the generic stsadm error, which is hilarious, because they put the error at the TOP and immediately kick off a 5-page command listing, so you have to dig for the original error message. And yes, the error message says "Command line error." And you're studying, and studying, and you have no idea why this isn't working!

LET ME TELL YOU WHY IT ISN'T WORKING. Because when you zoom in, REALLY zoom in, you'll see that the dash character is exactly two pixels wider! And boy, let me tell you—those two pixels make all the difference! Get out your microscope!

Zoomed-in SharePoint art

If you look at the hyper-zoomed-in picture from above, it almost looks like some sort of awful abstract art. Noticing this, I thought—might as well go with it! Allow me to add a few touches here and there, maybe work with the interplay of light and form and structure, maybe add some tasteful emotion words…and give birth to the worst SharePoint-themed abstract art ever:

image

As with all true art, each person will take away something different from this piece.

Reader challenge

I dare you, dear reader, to take on the challenge: can you create something worse? You can! You have it in you! Believe in yourself!

Tiny PowerShell footnote

There is a systematic way to find Unicode characters in your strings—just check the integer value of each character. Should be easy, right? I'd say so, yes:

image

Note I used the "%" shortcut instead of "foreach", and "?" instead of "where". Read it as: convert the string to a char array; for each character, convert it to an int; now filter these integers down to only those with a large (non-ASCII) value. The remaining ints are returned to the prompt, which displays them as best it can. There happens to be only one character today, which is the endash, "the script ruiner."

Anyway, the point is you can guarantee your string is ASCII if you make use of PowerShell's (.NET's) built-in Unicode support and write a simple script.

Categories: Awesomeness | SharePoint
Technorati:  | 
Wednesday, June 11, 2008 4:46:27 AM UTC  #     |  Comments [2]  |  Trackback
Tuesday, June 10, 2008 3:54:44 AM UTC #

If you're thinking to yourself "dude, this is wasting my time just reading the headline; how much free time do you have to post about it?" Well, yes. I do waste a lot of time configuring my system, and further waste time thinking about configuring my system, and further further waste time reading others' thoughts when they write about configuring their systems. It's probably unhealthy, but if so it's widespread. Like the flu pandemic.

But I do have a good reason for this tweak.

Eyestrain is a serious problem

Laugh it up; when it's your turn to suffer make sure to let me know and I'll make fun of you.

So anyway, enabling ClearType aids readability and reduces eyestrain.

Plus, it looks cool.

Disclaimer: don't blame me

I've enabled ClearType on the VM running on my desktop. I don't have to worry about bandwidth or getting angry calls from the network folks. Your mileage may vary!

Steps to enable ClearType in Server 2003

  • Download the hotfix found at KB 946633. Unfortunately this isn't a direct link; you have to navigate the deadly DRM/registration obstacle course, Takeshi's Castle style. Many that begin the journey don't make it all the way to the end.
    image
  • Install that hotfix on your Windows Server 2003 machine.
  • Reboot as instructed by the hotfix installer.
  • Log in locally to the machine and enable ClearType (see these detailed steps if you need them).

BOOM! YOU GOTS CLEARTYPE NOW!

Ok, further steps for RDP

ClearType won't appear over RDP unless you set up your RDP client properly.

  • Ensure you have the Terminal Services (RDP) client v6.0. If you don't know, see the screenshot below. You'll need the "font smoothing" option.
  • Any time you connect to a server, ensure the "font smoothing" option is checked.

image

Categories: Awesomeness
Technorati:
Tuesday, June 10, 2008 3:54:44 AM UTC  #     |  Comments [0]  |  Trackback
Wednesday, June 04, 2008 4:15:51 AM UTC #

SharePoint disaster recovery site

 

 

The answer awaits you below the fold…

.

.

.

.

.

.

.

.

.

halfway…

.

.

.

.

.

.

Did you know that some feed readers give you a text-based preview of each post, and thus, if you're attempting to hide answers in your blog post by using whitespace…well…let's just say that this little meandering path, this seemingly useless little discussion we're having right now, serves a purpose.

Continuing…

.

.

.

.

.

Horrifying, correct answer: your SharePoint disaster recovery plan is stored on your SharePoint site! Uh-oh!

One act play

I've wrote a full-length, dramatic re-enactment of this situation, originally a 600-page manuscript. Which was way too big, so I ran Word Autosummarize on it, 40 times in a row. What you are left with is below:

 One act play; a work of genius

Um…branding?

Also, if you answered "the problem with this SharePoint site is that it looks like SharePoint," then you're technically correct, unless your SharePoint site already looks like hawaiianair.com, or is in fact hawaiianair.com. If you're not running hawaiianair.com, by now you've already been told that lack of branding is a 'problem'. So, anyway, good job on guessing "branding," which is so commonly the answer that you might as well throw it out there every time you're lacking ideas. "Um…branding?" is always a good idea.

Lesson learned: off-site backups

I'm not going to be any more specific, because I don't have any magic automation to eliminate this problem—I'm just saying do something.

Categories: Awesomeness | SharePoint
Technorati:  | 
Wednesday, June 04, 2008 4:15:51 AM UTC  #     |  Comments [0]  |  Trackback
Wednesday, April 23, 2008 10:56:08 AM UTC #

Update: welcome to the new-and-improved recap! This recap, unlike the last, weighs in at less than a million billion byes of text and code highlighting and will now load in your feed reader.

This is a recap of my entries into the 2008 Winter Scripting games. From, like, the winter. I know, it's April, we're already in summertime mode here in Texas, and it is quite clear that it is no longer 'the winter'. Let's move on, shall we?

I'm going to work through each of the following scripts illustrated in the table below (the counts for "Lines", "Words", and "Characters" mean what you would imagine they mean):

image

Compare the above table to MOW, who, for example, had a 1 line, 8 word, 58 character solution for #6. My solutions are (relatively) HUGE. So my recaps, which contain the full source, will necessarily be HUGE as well.

For each problem, I'm going to quickly sum up the interesting (at least TO ME) bits of each problem, then I'm going to post the full source.

2008 Winter Scripting Game Events: Index

Categories: Awesomeness | PowerShell
Technorati:  | 
Wednesday, April 23, 2008 10:56:08 AM UTC  #     |  Comments [0]  |  Trackback
Friday, February 29, 2008 5:01:58 AM UTC #

four variations of quote: pencil pointing diagonally upward, plus writing surface. And the PSPlus outlier icon.

I found this completely by chance.

In case this isn't obvious, let me "fix" it (see below):

image

AHH, BETTER NOW!

For future use, feel free to "fix up" any icons you come across with this helpful transparent graphic:

image

Categories: Awesomeness
Technorati:
Friday, February 29, 2008 5:01:58 AM UTC  #     |  Comments [2]  |  Trackback
Thursday, October 18, 2007 4:06:47 AM UTC #

This is a simple, quick tweak that you may or may not even agree is useful (and may even believe harms your computing experience). First, allow me to present this tweak (visually):

Control Panel - Keyboard properties - drag Repeat delay over to short, then click on OK

 

By default, Windows (every Windows I can remember, all the way to Windows 95 and possibly further back) sets the keyboard repeat delay to the third peg out of four. While this is probably the safe choice when deploying to a billion PCs, it's not the best choice for me. I don't need to slow down my keyboard; I don't have rickets (yet).

If I'm not being clear enough, the keyboard repeat delay determines how long you need to hold down a key before Windows registers this as 'repeating input.' Bah, this is best done by example.

Keyboard repeat rates: by example

Introducing the Napoleon Dynamite Demonstrates Your Keyboard's Repeat Rate mascot!

Keyboard repeat rate mascot

upwards-pointing arrowType 'Ye', then press and hold the "s" key!

The question is: how long did it take before the second "s" appeared on your computer? Half a second? I say to you: that's half a second wasted!

Lowering the keyboard repeat rate allows that second "s" to appear almost instantly! Because you're saving half a second at a time, this would seem like a trivial thing, but let me tell you: it makes a difference. You'll find yourself using the arrow keys and the "CTRL plus arrow keys" more. You'll tab through form fields by mashing your greasy thumb on the TAB key. You'll stop tapping on the keyboard so much. You'll grow an air of smug arrogance. Yes—all this can be yours!

Categories: Awesomeness
Technorati:
Thursday, October 18, 2007 4:06:47 AM UTC  #     |  Comments [2]  |  Trackback
Friday, August 24, 2007 4:52:41 AM UTC # Those of us local to the greater Houston area should be pleased to know that I've found RSS feeds for two Houston-area .NET-centric user groups. Email is so 1993! This is a quick post to point you directly to the feeds:

Feeds

Keep Houston Beautiful

Categories: Awesomeness
Technorati:
Friday, August 24, 2007 4:52:41 AM UTC  #     |  Comments [0]  |  Trackback
Tuesday, August 07, 2007 3:24:47 AM UTC # This post is awesome, but nowhere near as awesome as Vista from 5 minutes ago—so if you're skimming, skim down to the one with the pictures.

Cell Phone RF Interference

Have you ever left your cell phone next to an unshielded speaker and heard that awful buzzing noise? I'm sure you have. Do you wonder to yourself: what's causing that noise? Wonder no more. Do you further wonder: how can I make my cellphone emit this noise on demand?

Wonder no more! Featuring the first ever meta-cellphone ring! Upload this to your fancy $600oops $400 iPhone and impress the kids (albeit really dorky kids)!

cell_buzz.mp3
Categories: Awesomeness
Technorati:
Tuesday, August 07, 2007 3:24:47 AM UTC  #     |  Comments [0]  |  Trackback
Tuesday, August 07, 2007 3:06:11 AM UTC #

I WAS NOT AWARE we could do this with Vista! This is, and I'm not joking, the first awesome Vista feature I've discovered! And it's genuinely awesome!

DUDE




And by "this", in case it isn't clear: we can use sliders to change Vista's color scheme! Sliders! Aero! I made mine a disgusting maroon/rootbeer-flavored concoction!

Categories: Awesomeness
Technorati:
Tuesday, August 07, 2007 3:06:11 AM UTC  #     |  Comments [0]  |  Trackback
Wednesday, February 28, 2007 1:02:08 AM UTC #

I call this particular masterpiece "Two System Demo." Feast your eyes!
This modern illuminated manuscript is yet more evidence of my genius.

And to answer your question, yes, I'm perfectly aware of just how talented I am! You don't need to tell me I'm the greatest—I already know!

Categories: Awesomeness | tablet
Technorati:  | 
Wednesday, February 28, 2007 1:02:08 AM UTC  #     |  Comments [0]  |  Trackback
Tuesday, September 26, 2006 2:59:32 AM UTC #

That took bacon took forever!

bacon Code bacon Complete bacon Code Complete bacon bacon bacon

Why do I have the sudden urge to go to a gym and work out, run a while, or maybe swim a few laps? Was it because I just finished Code Complete? Yeah, that's probably it.

Categories: Awesomeness
Technorati:
Tuesday, September 26, 2006 2:59:32 AM UTC  #     |  Comments [1]  |  Trackback
Tuesday, August 22, 2006 2:56:52 AM UTC #

As much as I try, I can no longer find my favorite classic Winamp skin of all time anywhere else on the internet, so I'm posting it here for posterity.

Without further ado, I present to you: FrootyAmp - the Greatest Winamp skin of all time!
FrootyAmp: the greatest Winamp skin of all time!

FrootyAmp.wsz (25KB)
Categories: Awesomeness
Technorati:
Tuesday, August 22, 2006 2:56:52 AM UTC  #     |  Comments [2]  |  Trackback
Tuesday, August 15, 2006 3:37:17 AM UTC #

UPDATE GRAB BAG (2006-09-25): FoxIt has released v2.0, potentially fixing this bug! ALSO, FoxIt is not free for commercial use! So stop abusing the end user license agreement, you filthy pirate scum scumbag scum! Um, anyway, unless you're a big PDF user at home (and who isn't? Oh, I'm not. Yeah, I guess most of us aren't), you can't legally be using FoxIt. Sorry.

By now you've at least heard mention of an Acrobat Reader alternative named FoxIt.  I'm using it now, and for the most part, it's fantastic.

It's already better than Adobe's ever-ballooning product in several ways:

But, I'm here to tell you: it's not all gravy.  FoxIt reader version 1.3 crashes. I have proof! (shocking evidence below)
FoxIt 1.3 crashes

It's true—I've crashed FoxIt attempting to load two entirely different documents coming from separate sources.

This is something I've rarely (if ever) seen covered elsewhere: I'm here to report that, contrary to all the positive buzz, those oddball third-party products allegedly ten times better/faster/stronger than the originals do have flaws.  I know this is incredibly outrageous, but it turns out: FoxIt PDF Reader is, in fact, not all gravy.

I'll leave you some time alone to grieve. Once you've returned, we'll continue, okay?  Just take your time.

I know, I know; it was a shock to me too. Moving on:

When PowerToys Aren't

Getting to a point I'd like to make: not all productivity tools help. For an example, I'll pick on the Windows XP PowerToys ALT+TAB Replacement tool. To be fair to the original authors: I understand this was probably built off-hours as a labor of love, and I do understand a lot of work went into building this particular toy. Please excuse me while I rip on your creation.

As a short introduction: this PowerToy replaces the default ALT+TAB window with a larger window that shows screenshots of each of your windows. The idea is that you're given more information about each window at no cost—thus far, this sounds nice! Here's a screenshot of the Powertoy in action:
Alt-Tab PowerToy ClearType blurry



The problem is: using this PowerToy is actually worse than sticking with the standard Windows XP ALT+TAB behavior.  Let's do this by the numbers:

1. This Powertoy and Windows XP's ClearType do not play well together.  And by that, I mean that this looks brutally ugly with ClearType on. I've highlighted the important parts below, and no, you're not going blind—this is how it looks!
Alt-Tab PowerToy ClearType blurry - ARGH


2. Believe it or not, I could live with the fuzzy, unreadable text shown above. But I can't live with the fact that this ALT+TAB replacement is noticeably slower than the original ALT+TAB behavior! In other words, a simple one-step 'tap ALT+TAB' operation turns into the following:

  • press and hold ALT
  • press and hold TAB
  • wait for the ALT+TAB window to pop up,
    • After the window appears (Not before! Don't you dare let go of TAB before this is ready!), let go of TAB,
    • let go of ALT.
  • Alternately, live dangerously—go ahead and let go of TAB before the window appears!  "What happens then," you may ask?  Well, let's check out #3, shall we?

3. This PowerToy crashes.  Let me state this in unambiguous terms: it's not okay for a standard operating system feature to crash!  I know, I know, [[insert your witty Windows joke here]], but it's still not okay! Okay?

So what did we learn today?  Oh, I'm not finished yet—I'm just getting warmed up!  Let's keep rolling!

Why does live.com take seven (7) full seconds to load my search results?

I'll keep this short and sweet. Is there any excuse for this?  Why does the extremely web-one-point-oh non-AJAXified Google search load instantly, while the new and fabulous AJAX-powered live.com search require a noticeable delay? Want to know the answer? The full answer is complicated and full of technical jargon, but the short answer is this: I don't care at all why. I only care that I can literally run, read, re-run, read, and re-re-run searches from Google faster than using a single live.com search.  "instant=way better" is such a ridiculously simple concept, and yet no one seems to get it!

As an added bonus insult, searches from the live.com toolbar actually take longer—yes, I'm saying that the using the toolbar actually slows you down further.

UPDATE (2006-09-25): Thankfully Microsoft has removed the offending "enhanced search functionality" and both the toolbar and the search engine are (gasp) fast!

And that stupid XP search dog!

I'll keep this short, because everyone's already said it before, but: the out-of-the-box Windows XP file search experience is really, truly awful.  Let me do this purely by example.

I sometimes need to edit my HOSTS file for whatever reason; it doesn't matter why.  Unfortunately for me, I never can remember where that durned file is located! So what is any sane person to do?  Start->Search of course!

XP's search dog is so slow sometimes that I've actually kicked off a "XP dog search", then (while this is running!) taken the following steps:

  • Opened Start menu and clicked on Run
  • Typed "cmd" to open the command prompt
  • Typed "cd \" to go to the root folder of C:\
  • Typed "dir HOSTS /s" to do an old-school DOS search for the file
  • Watched the dir command finish and note location
  • Pressed START+E to load Explorer
  • Browsed out to %WINDIR%\System32\Drivers\Etc to find the file
  • Edited and saved the file

Is Rover finished by this time? Nope!  Can anyone explain why running dir /s is so much faster than Windows' search? Anyone?

Oh, I'm not finished yet!

Outlook 2007 Beta 2

I've read Chris Pirillo's 65 Outlook complaints, and I'd like to take a different approach.  Instead of focusing on the left-right-center-justify alignment of text and color coordinating and font design and Chris Pirillo's other OCD complaints, we'll work on just one thing.  Just one.

Are you thinking speed issues? Because if you are thinking speed issues, then you're dead wrong.

RESPONSIVENESS IS KEY.

For added impact, I'll attach some tasteful ASCII art and fly this statement around in a marquee. I'm not above using marquees, obnoxious colors and blink tags to get a point across (blinking effect subject to availability):

+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|
..oO RESPONSIVENESS IS KEY Oo..|
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

Why is responsiveness not priority #1? Or at least, high enough priority that they might, you know, tackle this problem within the first ten years of Outlook's first release?

If you've ever actually used Outlook (any version!), you'll instantly know what I'm talking about. This is so fundamental, and affects such a large user base—Outlook is the #1 Office application, and it's outrageously unresponsive!

Let me explain this by example.  This will only take a few steps, so you can follow along:
1. Click on a mail folder containing 200+ messages. Actually, any mail folder will do; the small ones lock you up too—yeah, even those.
2. Press CTRL+A (uh-oh!)
3. Try to do anything else while Outlook performs a Select All operation on your messages.  Years of experience has taught most of us to Just Don't Try That, Or Else.

There's no secret SHIFT+ALT+BACKSPACE keystroke to fix this; you'll just have to wait it out—or failing patience, kill outlook.exe.

This is ridiculous. Why, with my multi-billion instruction processor running at 10% capacity, with half a billion bytes or more of available RAM, and an incredibly huge and reliable network pipe, does my email application give me problems?

Now you may say: "Outlook loads Internet Explorer components in order to render HTML mail and RTF and Office Smart tags etc etc."  Let me borrow an argument from above: I don't care why. I don't care about the why, and after this many years and this many releases, I don't want to hear any excuses.

And let me state this again for the record: this is not about Outlook's speed. The 2007 beta actually runs faster than 2003 in several areas, including the CTRL+A scenario mentioned above, and including mail rules processing (yes, it's all much faster).  I don't care*!
*Okay, I do care about speed, and yes, Outlook can be unbearably slow. But today we're all about triage: responsiveness comes first!

In fact, I am willing to sacrifice speed for improved responsiveness.  This may not be a ridiculous trade-off as (for whatever reason) using multiple threads may be slower than sticking with a single thread.

Is anyone working on fixing this? Given Outlook's track record, the answer's definitely "no."

UPDATE (2006-09-25): This bit about Outlook must have been subliminally placed in my brain by Microsoft's marketing. Why, you may ask? Two reasons: 1. I keep sending Outlook beta error reports, and now that I think about it, those error reports are categorized as "Non-Responsiveness." 2. Vista's performance team is focusing primarily on consistent performance (AKA responsiveness), specifically mentioning that they are not focused on "small bursts of speed". So anyway, they're Working On It. 
But all of the above still applies—Outlook's still terribly unresponsive…at least for now.

Conclusion

I honestly started this off as a quickie writing about FoxIt crashing. I've certainly, uh, deviated from that.

If I can leave you with just one thought, let it be this simple series of SAT-style associations:

Adobe Acrobat : FoxIt
Live.com search
: all other major search engines
XP search dog : dir /s
ALT+TAB replacement
: ALT+TAB
Outlook : ???

Feel free to leave your own word-association games in the comments. Any day now I'll reach that "lifetime weblog stats: five plus comments" milestone, and with your help, that day could be today!

Categories: Awesomeness
Technorati:
Tuesday, August 15, 2006 3:37:17 AM UTC  #     |  Comments [0]  |  Trackback
Friday, August 04, 2006 3:23:55 AM UTC #

If you're going to waste your time, you might as well waste it on something totally awesome—something like this!

1. Download Microsoft's Font Tool for Tablet PC. Here's a direct download link.
2. Spend minimal time writing all the letters using your Tablet PC.  The program provides several tools to improve your budding font's quality, but for brevity's sake I'll just mention that they're available.
3. Briefly preview, then press the "export" button. Yes, this is as ridiculously easy as it sounds.
4. Step 4: upload a sample for the world to see!

Let's do this:
I am awesome

I know what you're thinking, and yes—yes, I am truly amazing sometimes. Instead of uploading my site logo, I could have just uploaded an image of the words "I am awesome", but that would have been…redundant.

Also, before you ask: I used WordArt.  Yes, WordArt—the industrial-strength graphic design tool that sets the standard against which all others are measured. Watch out, Photoshop!  More realistically: your days are numbered, PowerPoint-slide-distributed-as-poster!

Categories: Awesomeness | tablet
Technorati:  | 
Friday, August 04, 2006 3:23:55 AM UTC  #     |  Comments [0]  |  Trackback
Thursday, August 03, 2006 1:33:45 AM UTC #

I call this one NiceLogger Training.

My 'canvas', so to speak, was at first OneNote 2003 SP2. Yearning for artistic freedom and chafing at the restraints imposed upon me, I imported the captured OneNote image into Paint.NET 2.64, at which point I really went to town with the micro details, shading effects and transparent brushes.  I'm not 100% happy with the finished product, but what true artist is?

Anyway, here is the first in a series of my tablet masterpieces:

modern illuminated manuscript

Art criticism may be directed to the comments link below.

Categories: Awesomeness | tablet
Technorati:  | 
Thursday, August 03, 2006 1:33:45 AM UTC  #     |  Comments [0]  |  Trackback
Friday, June 30, 2006 4:21:05 AM UTC #

tablet PCs ARE AWESOME
Categories: Awesomeness | tablet
Technorati:  | 
Friday, June 30, 2006 4:21:05 AM UTC  #     |  Comments [0]  |  Trackback
Friday, May 26, 2006 4:06:22 AM UTC #

UPDATE 2007-09-09: Pretty much everything below this paragraph is now misinformation. I've laid out my site with Yahoo UI Grids and posted a brief, uninformed review at http://www.pseale.com/blog/YahoosUIGridsIDidntReadTheInstructions.aspx.


Yahoo's UI Grids layout is precisely 750 pixels wide, give or take precisely 0 pixels. If you're targeting a wide audience and really working to reach the low-end, this CSS template collection is far better than anything you or I could come up with—it's the perfectly good solution. But I'd like to, uh, maybe use more than precisely 750 pixels.

Let's try this visually:

Yahoo's concept of a standard user's browser window:
Yahoo! UI Grids - Yahoo!'s concept of a standard user's browser window

My concept of a standard user's browser window, circa 2007:
Yahoo! UI Grids - My concept of a standard user's browser window

So I'm using tables for layout. Sorry.

Here's the link to the site: Yahoo UI Grids

Categories: Awesomeness
Technorati:
Friday, May 26, 2006 4:06:22 AM UTC  #     |  Comments [2]  |  Trackback
Thursday, May 18, 2006 2:07:30 AM UTC #

UPDATED 2008-05-08: Removed the actual project. I never bothered to update it beyond the codename Atlas betas, and now that I've waited a few years, the ASP.NET AJAX pendulum has already swung! It's too late for AJAX; we gotta get on this Silverlight thing now! Everybody move!

In my never-ending quest to use the word "mashup" as often as possible, I've gone ahead and mashed up a traditional search box with Microsoft's Atlas framework (beta), producing:

Web 2.0 Search mashup [updated: repointed link; don't bother]

This is a tagsonomy-based, community-driven AJAX mashup that just oozes Web 2.0.  As an added bonus, I've mashed up rounded corners and an annoying image background tile into the HTML.  I've held off on gradients for now, but only because I'm partially blind from dogfooding this.

Give my enhanced search mashup a try! [updated: repointed link; don't bother]

Categories: Awesomeness
Technorati:
Thursday, May 18, 2006 2:07:30 AM UTC  #     |  Comments [1]  |  Trackback
Sunday, May 14, 2006 4:49:10 AM UTC #

A Word from your friends at Subversion and TortoiseSVN

Clicking on the "TortoiseSVN" icon from the Start Menu (shown below)…

TortoiseSVN on the Start Menu

 

…pops up the following message:

TortoiseSVN friendly message 1

 

Later, while browsing through the repository's home directory, I came across this helpful reminder:

TortoiseSVN friendly message 2

 

GPL Compliance

Since this is an open source project licensed under the GPL, I'm required to fully publish all changes I've made to the code.  In the spirit of full disclosure and in the spirit of the GPL, I present to you my modified documentation:

TortoiseSVN GPL-licensed friendlier message 1
TortoiseSVN GPL-licensed friendlier message 2

I Swear I Love You Guys

Their documentation is excellent, and I swear I love you guys. I swear it. Anyway, thus far they've been an excellent set of products.

Subversion (SVN) project home page
TortoiseSVN project home page

Categories: Awesomeness
Technorati:
Sunday, May 14, 2006 4:49:10 AM UTC  #     |  Comments [0]  |  Trackback
Monday, May 08, 2006 3:52:15 AM UTC #

These epic flash sagas built entirely with animation from NES games defy further explanation. Turn your sound up (absolutely essential!), press F11 to go into fullscreen mode, and check this out:

Click here for the Michael Forever flash movie!

My personal favorite is the second episode, "Michael Fantasy", wherein Michael Jackson "and all Famicom soft" help prevent planet-sized Zangief from jumpkicking the Earth into oblivion.  This is simply too awesome for words.  Let me try with a picture:
planet-sized Zangief jumpkicks the earth into oblivion

…still not good enough.  You simply must check this out: Michael Forever! And don't forget to turn on the sound!

Check out RSF's main page (Japanese)

Categories: Awesomeness | gamer
Technorati:  | 
Monday, May 08, 2006 3:52:15 AM UTC  #     |  Comments [0]  |  Trackback
Syndication

Search
Posts on this page
Categories
Sites I visit regularly
About

Powered by: newtelligence dasBlog 2.2.8279.16125

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2013, Peter Seale

Send mail to the author(s) E-mail



Sign In