Monday, February 11, 2008
Another Nice Piece of Software
I'm not opposed to buying software when it works well, but I decided to look around for a simpler, faster alternative to Total Commander. It did a good job of copying files, and it also appears to do a ton more. Most likely I would never use many of it's features. In my search for a simple way to copy files as fast as possible, I came across TeraCopy. I'm now using it to finish the copying of files to one of my NAS boxes, and it is consistently pushing the data at 4MB/s. That's pretty fast when considering that the target is an Infrant ReadyNAS NV running XRAID. It's about twice as fast as what Total Commander was able to average. Plus, it's free for home use and couldn't be simpler to use. It just integrates itself into Windows Explorer and shows up as an option whenever you do a right-click drag (TeraCopy and TeraMove the selected folder(s) and/or file(s)). I'm running 2.0 Beta 2, and it's working beautifully so far. What did we ever do with computers before the internet and google allowed us to find really nice applications to satisfy every need? Well, maybe not every need. I still have to write the occasional tool to do some random task, but that's what keeps things interesting. At some point, I'll put a list of little applications I've written up here to share with anybody who wants them.
Sunday, February 10, 2008
Thumbs Up To Seagate and Total Commander
I just wanted to take the opportunity to give a big thumbs up to Seagate. I recently sent in a 400GB drive that was maybe 18 months old for warranty replacement due to some SmartDisk errors I was getting. Yesterday, the UPS guy dropped of a 750GB drive that they sent me in return. Always nice to get a free upgrade, and I needed another 750 for one of my NAS boxes. So, it worked out perfectly. Thanks, Seagate!
So, I somehow managed to configure the RAID level wrong on said NAS. So, to add the new drive, I had to rebuild the whole thing. That meant transferring a few hundred GB of files off and then back on to the NAS. In trying to perform this task through Vista, it was constantly stuck for up to 10 minutes just analyzing and trying to determine the time remaining. When it finally did start copying the files, it was extremely slow with remaining time measured in days (up to 17 at one point) instead of hours, and this was with a folder containing only 1.9GB or so. In an effort to avoid using Vista for these large file transfers, I did a search and found Total Commander. I'm still in the process of moving files, but it took little time (maybe 10 seconds) to analyze the same folder and only 25 minutes or so to transfer the files. If this ability exists, why does the file management functionality in Vista need to be so bloated and slow? At any rate, I highly recommend Total Commander even though the interface isn't great. It does exactly what I wanted and does it well. That's good enough for me.
So, I somehow managed to configure the RAID level wrong on said NAS. So, to add the new drive, I had to rebuild the whole thing. That meant transferring a few hundred GB of files off and then back on to the NAS. In trying to perform this task through Vista, it was constantly stuck for up to 10 minutes just analyzing and trying to determine the time remaining. When it finally did start copying the files, it was extremely slow with remaining time measured in days (up to 17 at one point) instead of hours, and this was with a folder containing only 1.9GB or so. In an effort to avoid using Vista for these large file transfers, I did a search and found Total Commander. I'm still in the process of moving files, but it took little time (maybe 10 seconds) to analyze the same folder and only 25 minutes or so to transfer the files. If this ability exists, why does the file management functionality in Vista need to be so bloated and slow? At any rate, I highly recommend Total Commander even though the interface isn't great. It does exactly what I wanted and does it well. That's good enough for me.
Monday, December 10, 2007
Another nice shortcut in .NET 2.0
OK, who can tell me what's wrong with the following VB.NET code?
Public Sub MyMethod(ByVal inputString As String)
Try
' Validate input
If inputString Is Nothing Or inputString.Trim.Length = 0 Then
' However you want to handle the error...
End If
' More functionality here
Catch
' Error-handling code
End Try
End Sub
[Jeopardy theme plays...]
Basically, the line where we check the "nothing-ness" or "blank-ness" of inputString will always error-out if the string actually is nothing. This is because And and Or in VB.NET are not short-circuited. Both sides of the operator always run, and Nothing.Trim.Length will cause an invalid object exception. Technically, it's not worth checking the right side of an And if the left is false nor the right side of an Or if the left is true, but VB.NET does it anyways by default. If one argument in an And statement is false, the whole statement is false. If one argument in an Or statement is true, the whole statement is true (not counting exclusive or). To achieve this level of functionality, an earlier version of VB.NET introduced the AndAlso and OrElse operators. Basically, they will stop evaluating if the outcome can be determined after looking at just the left side of the statement. So, our code above would become:
If inputString Is Nothing OrElse inputString.Trim.Length = 0 Then
Now, with VB.NET 2.0, we have a new operator that achieves the same code as above. So, it can be further reduced to:
If String.IsNullOrEmpty(inputString) Then
Microsoft must have realized that people were having issues because they may have been used to languages where And and Or are short-circuited by default. It's a nice shortcut if you can remember to use it!
Public Sub MyMethod(ByVal inputString As String)
Try
' Validate input
If inputString Is Nothing Or inputString.Trim.Length = 0 Then
' However you want to handle the error...
End If
' More functionality here
Catch
' Error-handling code
End Try
End Sub
[Jeopardy theme plays...]
Basically, the line where we check the "nothing-ness" or "blank-ness" of inputString will always error-out if the string actually is nothing. This is because And and Or in VB.NET are not short-circuited. Both sides of the operator always run, and Nothing.Trim.Length will cause an invalid object exception. Technically, it's not worth checking the right side of an And if the left is false nor the right side of an Or if the left is true, but VB.NET does it anyways by default. If one argument in an And statement is false, the whole statement is false. If one argument in an Or statement is true, the whole statement is true (not counting exclusive or). To achieve this level of functionality, an earlier version of VB.NET introduced the AndAlso and OrElse operators. Basically, they will stop evaluating if the outcome can be determined after looking at just the left side of the statement. So, our code above would become:
If inputString Is Nothing OrElse inputString.Trim.Length = 0 Then
Now, with VB.NET 2.0, we have a new operator that achieves the same code as above. So, it can be further reduced to:
If String.IsNullOrEmpty(inputString) Then
Microsoft must have realized that people were having issues because they may have been used to languages where And and Or are short-circuited by default. It's a nice shortcut if you can remember to use it!
Sunday, December 2, 2007
Visual Studio 2005 Debugging Bug
I suppose one might say that the title of this entry is somewhat ironic. Regardless, I'm not bashing Microsoft. Indeed, I am actually very fond of Visual Studio and all the features it provides. The problem I recently encountered, though, was a bit of a nuisance. I've gotten in the habit of running the websites I'm developing with Ctrl-F5 to start without debugging when I'm fairly certain there won't be any issues. Internet Explorer opens a little faster and you can continue to edit in Visual Studio even if the browser window is still open. However, I occasionally encounter a flaw in my code during this debugger-less browsing and decide to start the site with debugging to get more details. Here-in lies the crux of the problem. If you forget to close the original browser window that was started with you were running without debugging, the new session with debugging will actually time-out with an error message that your action failed. Even if you then go back and close the original browser window, all subsequent attempts to run with debugging will fail in the same manner. Performing an IIS reset does not solve the issue. The only thing that seems to work is to close and re-open Visual Studio. At one point last week, I actually had to re-boot to get things working again. So, remember to always close any browser window previously spawned by Visual Studio prior to hitting F5 to launch the site you are developing with debugging enabled.
Monday, November 5, 2007
My Latest Favorite Keyboard Shortcut for Visual Studio 2005
So, the Visual Studio 2005 IDE offers a really nice smart tag feature for renaming your variables, constants, methods, etc. Instead of doing Ctrl-H to find and replace (possibly changing more than you planned), you can simply go to the location where the item is defined and type a new name. When you are done, the smart tag for that item becomes active as indicated by a little, red line that appears under the end of the word. You can move your mouse over the red line and the smart tag will expand and give you the option to rename. Selecting this option renames all uses of the item you are changing as opposed to simply changing everything with the same name like replace does. This is a very nice, time-saving feature, and I just recently figured out how to do it without the mouse. Pressing Ctrl-. also makes the smart tag expand with the rename option already highlighted. Then, you can simple press enter. This makes the process a little easier since you don't have to reach for the mouse. If you want to make a custom shortcut (Tools/Options), the command can be found under "keyboard" and is called "View.ShowSmartTag".
Sunday, October 7, 2007
Las Vegas Activities
I know there are some folks from my company planning to attend a conference in Vegas in the near future. For them, and for any other interested parties, here's my list of tips.
The erupting volcano in front of The Mirage Hotel and Casino

Inside part of the Miracle Mile shops attached to The Planet Hollywood Hotel

The free Pirates of TI show in front of The Treasure Island Hotel and Casino

The Paris Hotel and Casino

Planet Hollywood Hotel and Casino

The fountains at The Bellagio - probably the coolest free attraction in Vegas

A sleeping lion at The MGM Grand - I was standing in a glass walkway upon which a pair of very large males were sleeping.

New York New York Hotel and Casino - I've heard that the roller coaster is hard on your neck

The Excalibur Hotel and Casino - Attached to The Luxor, the two seem to offer the most family entertainment if that's what you're looking for. Keep in mind, though, it's definitely not Disney... :)

I apologize if any of this information is inaccurate. I've tried to ensure that the hours and locations are accurate but things may change.
- Allow for an extra 10 minutes to find your way out of your hotel on the first morning. Since you have to pass through the casino, they don't really make the path to the front doors very obvious.
- Bring some business casual clothes. I wore shorts and t-shirts most of the time, but you feel oddly under-dressed in that attire.
- Get up early and walk or jog around the town. It's nice to be able to see many of the sites with very few folks around. Note that most things, i.e., fountains and free shows aren't running in the morning, though,
- For Food Network fans, several of the TV chefs have excellent restaurants there:
- Mesa Grill in Caesars Palace - Bobby Flay (excellent food, had lunch there twice)
- Delmonico in The Venetian - Emeril Lagasse
- B & B Ristorante in The Venetian - Mario Batali
- The gelato at The Bellagio is excellent even if it does cost $6.50 per cone.
- You can buy discount, same day tickets to many of the shows and attractions from a few different places. They open around 11:00 AM and close by 9:00 PM. Your best bet is to run out to one at lunch.
- Tickets2Nite - Showcase mall near MGM Grand
- Tix4Tonight - Fashion Show Mall
- Shark Reef at Mandalay Bay (10:00 AM - 11:00 PM)
- White Tigers, Dolphins, etc. at The Mirage (11:00 AM - 5:30 PM Monday - Friday and 10:00 AM - 5:30 PM Saturday and Sunday)
- Lions at MGM Grand (11:00 AM - 10:00 PM) FREE as close as would ever want to get to a lion
- Fountains at The Bellagio (every 15 Minutes starting in the afternoon and going until late evening) FREE and very cool
- Amusement park rides at New York New York (10:00 AM - 11:00 PM)
- Crazy rides on top of the Stratosphere Tower over 900 feet in the air
- Carnival Midway and brief trapeze act at Circus Circus FREE
- Dragon battle and Motion Simulators at The Excalibur
- Las Vegas Mini Grand Prix Go Karts (10:00 AM - 11:00 PM)
- Imperial Palace Auto Collection (9:30 AM - 11:30 PM)
- Desert Passage Thunderstorm at Miracle Mile Shops attached to Planet Hollywood Hotel FREE but kind of lame
- SPEED rollercoaster and Nascar Simulators at The Sahara (10:00 AM - 11:00 PM)
- Sirens of TI show at Treasure Island FREE and mildly entertaining
- Erupting volcano at The Mirage (every 15 minutes starting in the afternoon) FREE
- King Tut's Tomb, IMAX, motion simulators, worlds brightest light beam, etc. at The Luxor
- Star Trek Experience at The Hilton expensive at $50 or so, but discount tickets are available from the previously noted ticket places (11:00 AM - 8:30 PM)
- You have to be sure to go inside all the various casinos. In particular, The Bellagio, Luxor, New York New York, Paris, and Venetian are pretty cool to see.
- You can print off a very good map of The Strip from here.
- You can still get free drinks even if you're only playing the penny slots. You just need to find a spot that's visible to the waitresses serving the higher rollers.
The erupting volcano in front of The Mirage Hotel and Casino
Inside part of the Miracle Mile shops attached to The Planet Hollywood Hotel
The free Pirates of TI show in front of The Treasure Island Hotel and Casino
The Paris Hotel and Casino
Planet Hollywood Hotel and Casino
The fountains at The Bellagio - probably the coolest free attraction in Vegas
A sleeping lion at The MGM Grand - I was standing in a glass walkway upon which a pair of very large males were sleeping.
New York New York Hotel and Casino - I've heard that the roller coaster is hard on your neck
The Excalibur Hotel and Casino - Attached to The Luxor, the two seem to offer the most family entertainment if that's what you're looking for. Keep in mind, though, it's definitely not Disney... :)
I apologize if any of this information is inaccurate. I've tried to ensure that the hours and locations are accurate but things may change.
Wednesday, October 3, 2007
SANS Network Security 2007 (Post Conference)
Well, I'm back from Vegas, and I've finally found a few minutes to post. The Securing Critical Web Applications and Web Services class was quite good. Interestingly enough, it wasn't actually a SANS class. Instead, it was taught by Jeff Williams, the founder and CEO of Aspect Security and the current chair of the Open Web Application Security Project (OWASP). Basically, we covered the security vulnerabilities in the OWASP Top Ten list plus some discussion specifically about AJAX and web services. We also used an intentionally very poorly written web application called Web Goat and a proxy tool called Web Scarab for some hands-on experience. Both are available for free on the OWASP site. At the very least, I highly recommend that anybody doing web development should thoroughly read and understand the vulnerabilities noted on the top ten list. It's a little frightening to see what a decent hacker can do and the complexity of the tools readily available to them. For anybody that uses the internet, here's my tip of the year:
Never use tabbed browsing to open any other website at the same time as one that contains any secure information or has the ability to perform transactions that involve anything important like money or your identity. Keep in mind that once you log in to the secure site, the sites in other tabs can access the secure site because they are open in the same browser. For more information on how this is done, check out the OWASP page on cross-site request forgery. To be even safer, use the profiles feature of Firefox to run under a limited profile with scripts disabled when accessing a highly secure site.
Since we often reference OWASP where I work, it was very interesting to meet and converse with the chair of the project. He was excited to hear about somebody actually making use of their work. As he noted, there must be many people doing the same because the traffic on their site is high. However, he seldom gets the opportunity to meet most users. If anybody is interested in the field, he did mention that Aspect Security is hiring, and it seemed like it would be a good company to work for. Certainly, Jeff knows his stuff and would be a good person in the industry with whom to connect.
That's it for tonight. I'll post again soon and share some tips on things to do in Vegas if you're there for a couple days at a conference.
Never use tabbed browsing to open any other website at the same time as one that contains any secure information or has the ability to perform transactions that involve anything important like money or your identity. Keep in mind that once you log in to the secure site, the sites in other tabs can access the secure site because they are open in the same browser. For more information on how this is done, check out the OWASP page on cross-site request forgery. To be even safer, use the profiles feature of Firefox to run under a limited profile with scripts disabled when accessing a highly secure site.
Since we often reference OWASP where I work, it was very interesting to meet and converse with the chair of the project. He was excited to hear about somebody actually making use of their work. As he noted, there must be many people doing the same because the traffic on their site is high. However, he seldom gets the opportunity to meet most users. If anybody is interested in the field, he did mention that Aspect Security is hiring, and it seemed like it would be a good company to work for. Certainly, Jeff knows his stuff and would be a good person in the industry with whom to connect.
That's it for tonight. I'll post again soon and share some tips on things to do in Vegas if you're there for a couple days at a conference.
Subscribe to:
Posts (Atom)