Thursday, December 13, 2007

Microsoft Process Explorer

Windows Process Explorer (download here) is an excellent utility to see information about what processes have a hold of files on your machine. It's most useful when you get strange errors with files, or are unable to save, edit, open or otherwise act on a file or folder.

When my computer is freezing up or even running slower than I think it should, my first instinct is usually to open task manager (hit CTL+ALT+DEL) and sort processes by memory usage, then start using the "End Process" button like the trigger on my XBox controller. The problem with this approach is not knowing exactly which processes I am stopping, more importantly, how to fix it through the next reboot.

I like the Process Explorer Utility because it allows you to take the opposite approach by finding the file or application that's giving you trouble, then locating which service has the lock on it. You can then go in much more surgically to the single source of the problem and stop it directly.

Additionally, when you can identify a service that is both problematic and unneccessary, you can go in to your Services Window (Control Panel > Administrative Tools > Services) and disable them by choosing either "Manual" or "Disabled" status.

Here's the link to Microsoft's site where you can read more or download the program:

http://www.microsoft.com/technet/sysinternals/utilities/processexplorer.mspx

Enjoy!

Monday, December 10, 2007

Flash Video Streaming and IIS

One problem that plagues Flash video development is when it simply won't work in production the way it does in development. In later articles, I'll go further into depth on getting it to work at all in Flash, but this article is for you if your .swf is properly streaming video locally, but hits a brick wall when you try and run it out on production.

The obvious thing to check is that you have your .swf and .flv files published to your Web server along with correct path(s) in your Flash file. So, if you truly think everything is in order and still can't get it working, open up IIS and read on.

From your IIS panel, Right+Click your Web site and select "Properties." Choose the "HTTP Headers" tab and look in the "MIME mapping" section for the "File Types" button.



From the "File Types" window you'll need to add a New Type, where you'll have two fields to enter. Carefully enter the following:

Associated extension = ".FLV"
Content type (MIME) = "flv-application/octet-stream"

Hit "OK" and your results will appear in the Registered file types window, like this:



Of course there are many reasons for Flash Video projects to fail, but I found this one particularly elusive, thus worth mentioning. Please feel free to post additional problems/solutions and I'll expand this tutorial further.

Saturday, December 8, 2007

Internet Speed Test - Know your Broadband Connection Speed

I'll bet you and I have one thing in common when it comes to our internet service... the bill. But despite the $40/month we all pay across the board for "high-speed" internet (what's that you say? You only pay $30? Well aren't you the clever little bundler. Now pat yourself on the back and keep reading), the similarities typically end there.

Finding out the connection speed of your computer to the internet is, in my opinion, very important to know. Your internet speed is not directly tied to your provider (despite what cartoon spokesmen tell you on TV), so it is important to regularly find out for yourself just what kind of upload/download speed you are paying for.

I find it even more important if you are trying to accomplish actual work from home via FTP, Citrix, VPN or simply getting your CEO's latest six-tab spreadsheet of sales figures through Web mail.

I'll briefly discuss a few free online tools I find useful, www.speakeasy.com, www.speedtest.net and www.toast.net.

** NOTE ** I'm making this addition to the article after its original publication. I recently found www.speakeasy.com, which is extremely useful, accurate, and just kinda cool. It takes a minute longer than the others, but that's because it separately runs your upload and download speeds to provide an excellent picture of your broadband speed. I'd also recommend running it periodically to first create a benchmark for your broadband speed so you can compare that with what your ISP is charging you for. The other helpful bit of info I'd keep an eye on is how much your up and download speeds fluctuate. Not a big deal to most people (as long as you happen to be on a spike more often than a dip), but I recently found out that an inconsistent download speed can cause havoc with your VOP router, if you happen to use a service like Lingo, Vonage or whatever.

I would strongly suggest sparing yourself my further analysis (and the next five minutes) and checking out www.speakeasy.com. Because if there's one thing I know about you, it's that you are into efficiency (oh, that and the cable bill thing we talked about earlier). If you are still unsatisfied, return to this article and read on.

* Note: back to original article.

The last one I picked up from a particularly helpful Qwest rep just before dropping their service. It's extremely simple, but doesn't seem to be all that reliable. You have the choice of downloading some very high-res photos, or simply a ton of text (in the form of the Telecommunications Act of 1996). To use it, simply go to toast.net and choose "internet speed test." Choose the size/format of what you want to download, and you will see a chart similar to this one:


Your connection speed will be represented by the blue bar across the top compared to a few other metrix. So, in this case you'd read that my download speed is almost 13 mb ["mega bits per second"] (sorry, I cut the screenshot off at 7).

It's helpful, but pretty limited as far as useful info. Also, as I mentioned earlier, I found drastically different results when you select anything other than text as your benchmark.

The second tool (which is my #1 recommendation), shows upload speed, download speed, along with a ton of other information and choices on how to run the test. It also archives and compares your past results (this is excellent, because testing on Monday evening will yield far different results from say, Monday Morning since your Cable connection is likely shared among your neighbors).

Anyway, the site is www.speedtest.net, and the results look something like the screenshot below:



You may notice that in this speed test, I'm getting around 17 mb and 550 kb upload. Those are results I really like to see, so I should disclose that my testing is fairly unscientific, unvalidated by any other tools, and not 100% objective (Which driving range do you prefer? The one where your 210 yard drive goes 210 yards, or the one where it's marked 240?)

Anyway, give these couple of speed tests a try, especially if you feel like you may not be getting what your provider promises. A lot of variables can affect your broadband speed, including your neighborhood hub being at capacity, how many people are currently on, how much resistance your home wiring has, your modem, firmware etc. What it does not take into consideration is how fast your computer is, any hardware devices added to your home network (wireless router, print server, switch, LinkStations, whatever).

Additionally, this can be very good information to have handy before calling up your overpriced provider. It just might be enough to quickly confuse phone monkey #1 and get you on the fast track to "Tier-Two" service where something might actually get done. Please feel free to post back here on your experiences with either of these online tools, or any others.

Tuesday, October 23, 2007

Rounded Corners with Nifty Javascript

I can't give this script a thumbs up or down just yet, but I'll be implementing it on an upcoming project, then I'll provide a review. I have tried a few other scripts that work well with prototype and rico, but when combined with asp.NET pages, they run into problems. Hopefully this one's different... if so, I'll update this post with the good news and some samples. In the mean time, visit their site:

http://www.html.it/articoli/nifty/index.html

Enjoy! And feel free to post your success story (giving the original authors full props, of course).

Friday, September 21, 2007

Latest Virus Threats

In addition to my article on virus and spyware removal from your PC, I neglected to mention my own site, http://www.pooledesign.net/ or www.pooledesign.net/safe, which shows the most recent alerts from the Symantec Security Threats database.

Security and malware removal

Protecting your computer(s) from viruses, malware, spyware and even self-inflicted system failures is more than a full-time job. Just like protecting your identity, finances or anything else, there is absolutely no one-stop shop. I don't care if you just bought Norton's grand new golden-boy do-it-all suite, nothing, and I mean nothing offers 100% protection from all the looming threats on the internet. Since threats come from so many sources, an equally unrelated set of tools overlapped across all the things you use is necessary. That's why I try to maintain a running list of effective tools that are certainly not limited to any virus in particular. Here is a list of tools I consider very powerful in assisting you whether you are in the prevention stage, or the "Oh Sh!t" stage of computer/internet safety.

* Please note, no single program will do it all for you. These are not meant to replace a current install of AVG Antivirus, Symantec, McAfee etc, with up-to-date virus definitions.

If you're wondering what spurred this article - I ran into the trojan.w32.looksky virus on a client's network recently and thought this would be a good opportunity to put a few links together in one spot that help deal with a man-down computer situation.

1. Trend Micro HouseCall
Trend Micro's HouseCall is an application for checking whether your computer has been infected viruses, spyware or other grayware/malware. This app does require a small Java plug-in install, which is a nice alternative to Symantec's ActiveX control, that is impossible to install if you have been infected.

2. Microsoft's OneCare Live
Microsoft's OneCare Live will run online system checks, detection and removal.

3. Microsoft's Malicious Software Removal Tool
Microsoft's Malicious Malware Removal Tool checks computers running Windows XP, Windows 2000, and Windows Server 2003 for infections by specific, prevalent malicious software—including Blaster, Sasser, and Mydoom—and helps remove any infection found. When the detection and removal process is complete, the tool displays a report describing the outcome, including which, if any, malicious software was detected and removed.

4. Spybot Search & Destroy
Where would we be without this one? If you don't have it, get it and run it often.

5. Advanced Windows Care
For a free program, I have been very impressed with Advanced Windows Care. It does a great job scanning and removing. Though you should have a Symantec or McAffee Security suite protecting your computer, I run this one along with AVG Antivirus on a couple of computers. That combined with unbelievable paranoia has kept those computers pretty safe so far.

I think getting into pros and cons of the various anti-virus programs is beyond the scope of this article, but having used the three major ones: AVG Antivirus, McAfee and Symantec, I think that's about the order I would rate them (with Symantec and McAfee at a very distant second and third). AVG is really an excellent product, which I'll try and expand on in another article.

Sunday, September 9, 2007

Setting image swap on your asp.NET Image Controls - Part 2

In part 1 of this article series, I showed you how to set an image rollover in your ASP.NET (2.0) app with asp.NET HyperLink and Image controls. It's a code behind solution that writes all the javascript for you, making you much more likely to use image rollovers, rather than make them "phase two" of any given project.

As promised, this article shows you how to make it more functional by wrapping the method in a class which is reusable and accessible across your asp.NET application(s).

I'll set up a very simple class in my namespace: Web.Classes.

namespace Web.Classes

{



public class Common

{



public Common() {



}



public static void setMouseOver(HyperLink lnkControl, System.Web.UI.WebControls.Image imgControl, string imgPath, string imgPathOver)

{

lnkControl.Attributes.Add("onmouseover", "document.getElementById('" + imgControl.ClientID + "').src='" + imgPathOver + "';");

lnkControl.Attributes.Add("onmouseout", "document.getElementById('" + imgControl.ClientID + "').src='" + imgPath + "';");

}

}

}

One thing you might notice (if for no other reason than it's highlighted in orange), is that I fully qualified the System.Web.UI.WebControls.Image which shows up as an argument in my method. I've noticed that even when I declare the WebControls Namespace at the top, the compiler can potentially still throw an error due to a conflict with System.Drawing.Image. For simplicity, I didn't use a shorthand in my using statement to solve this, but that's certainly a good option.

Finally, instead of reinventing the wheel on each codebehind, it is not as simple as calling Common.setMouseOver() and providing the appropriate arguments like this:

if(!Page.IsPostBack)
{

Common.setMouseOver(lnkLink1, imgLink1, "
/Images/my_image.png", "/Images/my_image_over.png");
}

My intent with this brief series of articles was to show a simple way of implementing rollover images on your asp.NET pages.

Thursday, September 6, 2007

Setting image swap on your asp.NET Image Controls

In this article, I wanted to archive a clean and quick way of adding mouse rollover image swapping to your asp.net (2.0) forms. Before you wonder why you wasted the last 20 seconds of your life, I'll show you in part 2 how to wrap it up into a class to make it more object oriented by developing a reusable mouse rollover control.

It would be really great if the .net HyperLink control simply had an ImageRolloverUrl property, to go along with its ImageUrl property (maybe in 3.0?). At that point, we'd be done, and you'd be back to reading about my cat (I don't own a cat, but somehow writing about your black lab seems even lamer).

Moving on, since we'll have to wrap our HyperLink control around an Image control, you'll notice I don't even set the ImageUrl property of HyperLink. Therefore, it will look like this:

<asp:HyperLink id="lnkPage1" runat="server" >
<asp:Image id="imgMyImage" runat="server" ImageUrl="~/App_Themes/Default/Images/my_image.png" />
</asp:HyperLink>


in the code behind:

string imgPath = "~/images/yourimage.png";
string imgPathOver = "~/images/yourimage_over.png";

lnkControl.Attributes.Add("onmouseover", "document.getElementById('" + imgControl.ClientID + "').src='" + imgPathOver + "';");

lnkControl.Attributes.Add("onmouseout", "document.getElementById('" + imgControl.ClientID + "').src='" + imgPath + "';");

So, pretty simle in all, though it's still just a little more code than a developer might be willing to write for each image link. That's why I'll show you in part 2 how I chose to wrap this in a Class for reusibility across your application(s).


Tuesday, April 24, 2007

What to expect from reading me

If I get moderately motivated, I'll use this space to refresh my own memory about links to useful Web design tools, asp.NET development, code samples including: C#, javascript, HTML, CSS, PHP, ActionScript and more, ways to solve problems, mostly relating to a current client's web site, etc.

If I get completely motivated, I'll provide real updates, solutions to problems I've solved, along with up to date analysis of what Microsoft is releasing, what Apple is up to, Oh, and I'll definately keep you updated as to how Perl 6 is coming along. We're all hanging on for that one...

Anyway, thanks for stopping by, and since you're here, no doubt one of the following events took place:

1) I actually provided Web building content someone can use, and somehow even found from a Web search
2) You are a potential employer or the FBI doing a background check. Seriously, I'm cool so ignore any political rants that might offend you, or categorize me as an enemy combatant.
3) You are stalking me. Please knock it off.

Regardless, I look forward to some meaningful discussion with you... even in the case of option #3.

First Post

Nothing like keeping it short:

What you should know before buying a car - beware of the four square approach, great articles along the lines of "confessions from a former car salesman."

http://www.mymoneyblog.com/archives/2007/03/confessions-of-a-car-salesman-beware-of-the-four-square.html