Tools of the Trade

code-complete

Wednesday, July 30. 2008

A List Apart 2k8 Survey

This is the second year for the A List Apart survey of web development professionals, and it helps us all learn more about who we are and how we work. It only takes a few minutes and there's no personally identifying questions.



Hopefully next year there will be more questions around RIA development specifically and possibly something more around tech stacks and platforms.



Posted by thaddeus in Tools of the Trade at 14:08 | Comments (0) | Trackbacks (0)

Wednesday, February 6. 2008

Nearly done with Vista, and with SP 1 so close..

After Using Vista as my primary OS for just over a year I can say without a doubt that it has hindered my productivity and caused more heartache that any other OS I've ever used. I am running the 32-bit version of Vista Ultimate on a gateway laptop with Turion64 Processor and 2.5 gigs of RAM. The Vista I'm working with is the result of and upgrade install from XP Media Center 2005, which may be part of the problem, and it was probably stupid to do the upgrade rather than a clean install, but I was lazy and didn't want to have to reinstall all my progs.

I am going to enumerate all the problems:


  • Slower launching all programs

  • Initially, I could no longer use a cisco VPN client because their vista-compatible client was not vista upgrade compatible

  • Now can use the cisco vpn client, but when it's installed on the system it breaks my wireless so I have to uninstall it after I use it to get wireless working

  • Have to run many progs as admin for them to function - packet sniffers, SQL Server Manager, lots...

  • Annoying UAC pop ups require more clicks to get things done (ended up disabling User Account Control)

  • Cannot move files > 3GB to local machine over the network.... WTF?!?

  • Moving files over the network is much slower than xp/linux/macOS (even after turning off Vista -TCP Auto Tuning)

  • All MS product short cuts in quick launch and recent programs on the start menu stopped working

  • My volume control mixer in the status bar area periodically disappears

  • Intermittent crashes of windows explorer at least one or two times a week

  • Outlook often hangs/crashes even with all mailbox maintenance performed

  • TortoiseSVN status cache crashes daily

  • Windows gets my monitors confused when switching between my home and work configuration about 50% of the time

  • Acrobat reader 7 posts application warning before starting regarding compatibility issues



The list could probably go on, but just those issues have made me want to move on. So yesterday I bought a Lenovo 3000 Y410 dual core 2G RAM laptop (which will come loaded with Vista Home Premium) and a 250GB laptop sata drive both on fire sale from compusa. I will be pulling the OEM drive, dropping in the 250GB drive and loading up Fedora 8. This will become my primary work computer, and I'm going to see if I can get away with not running windows at all, but I think I'm probably going to have to run XP under VMware because we use a lot of features from Office 2007 and I do use Visual Studio to create dtsx packages pretty often. Then there's Mapforce and Motorola phone tools and probably a bunch of other stuff. Oh and I'll have to somehow get 10 years worth of emails into mbox format somehow. That'll be ugly.

Well, I've almost talked myself out of it - maybe SP1 will solve all my problems. Ohh the pain.


Posted by thaddeus in Redhat Linux, Tools of the Trade, Vista at 12:00 | Comments (2) | Trackbacks (0)

Thursday, January 24. 2008

Always know your DHCP Assigned IP Address whereever you are

I could use a static IP address for the broadband connection at my cabin because I have a webcam in place up there so that I can check in on the place when I'm not there. Well today I went to check the webcam and could not get a connection. That could mean a few things: the house burned down, the power went off, the computer bluescreened, or my router got assigned a new IP address.

I called comcast and yes, my router had gotten a new IP. So I asked about getting a static IP and that was about 3x the cost of my current service so instead I put together 10 lines of code in 2 files that, if you have curl installed on your system, will let you set up a scheduled task that generates a file called ip.html containing IP information and timestamp and uploads the file to an ftp server.

Now I'll always know my IP. Unless the house burns down, the power goes off, or the computer bluescreened...

Get the scripts here: ftpYourDHCPaddy.zip

Posted by thaddeus in Tools of the Trade at 12:44 | Comments (2) | Trackbacks (0)

Wednesday, November 14. 2007

Google limits search results when searching for resumes - WTF??

There was a thread on another blog a couple of weeks ago about someone being approached by google and encouraged to apply for a position. I too was contacted by a google recruiter last year and after some back and forth I determined that he found me by using google, (Duh!) So since then I have been using google to proactively seek out local talent by using an advanced query like this one:

coldfusion develop (“Denver” | 303 | 720) -intitle:job (“colorado” | co) -intitle:jobs (~resume | ~cv) -job -intitle:training -intitle:sample -intitle:solutions -intitle:classifieds -intitle:group -intitle:forums -intitle:opportunities -intitle:openings -intitle:titles


Unfortunately, I can't take credit for making up the query - I found it in the google analytics search refer terms for this blog. Now however, it appears that google doesn't really want people to use google for headhunting because today when I ran the query, google politely allowed me to browse results through the first 11 pages, then puked up the error here ("your query looks similar to automated requests from a computer virus or spyware application") and wouldn't let me proceed with the result set . There's no way the traffic pattern that I was generating could look like a bot, a virus, or spyware as I was clicking on a link in the result set, reading a resume, clicking back, next page, look a few more resumes, etc. Normal search result user pattern.

So I tried changing the query to look for flex developers: again, trying to click through to the 12th page (without going through the pages in between) threw up the error.

So, who knows why google is limiting result sets on this kind of query? Is it b/c recruitment firms have been running automated queries through google to collect resumes? Is that somehow outside of googles use agreement? It kind of makes me wonder: WTF?


Posted by thaddeus in Tools of the Trade at 13:50 | Comments (0) | Trackbacks (0)

Monday, October 15. 2007

Naming Directories Using Dots and IIS Security Lockdown

The other day one of our developers was migrating a client site to a new dedicated server that the hosting company had just built. The application being migrated was an instance of our Enterprise Site Manager application which runs under CFMX 8. It had been running fine, and we were just switching boxes so we were puzzled by the fact the implementation was severely broken on the new server. Our developer was able to trace the issue to the fact that certain CFCs seemed to be inaccessible, specifically, CFCs that lived in a directory that used version numbers with dots. (for example /sitemapeditor1.1/index.cfc, or /autocompleter1.2/index.cfc)

When trying to access these files directly via a web browser, the server was returning a 302 error, then a 404 error. Strange. Remove the dot from the directory name, and the CFCs came up fine. So at first I thought there was something up with our ISAPI_Rewrite configuration, which we use to provide clean URLs on the client site. But that checked out fine. So I did what I usually do when I'm completely stumped and fired up Mark Russinovich's great utility called Procmon, which shows which processes are accessing which files in realtime. So I noticed that when trying to pull up the URL, the w3 service was accessing a a file called UrlScan.101107.1916.log. When I looked at the file, I saw this line:

[10-11-2007 - 13:48:36] URLs must not contain any dot except for the file extension.

Furthur down, lot's of entries like this:

[10-11-2007 - 13:48:37] Client at 127.0.0.1: URL contains '.' in the path. Request will be rejected. Site Instance='1456874306', Raw URL='//validator1.0/'
[10-11-2007 - 13:54:43] Client at 127.0.0.1: URL contains '.' in the path. Request will be rejected. Site Instance='1456874306', Raw URL='//validator1.0/'
[10-11-2007 - 13:55:10] Client at 127.0.0.1: URL contains '.' in the path. Request will be rejected. Site Instance='1456874306', Raw URL='//validator1.0/'
[10-11-2007 - 13:55:30] Client at 127.0.0.1: URL contains '.' in the path. Request will be rejected. Site Instance='1456874306', Raw URL='//validator1.0/'


AHA! The hosting company must have installed the IISLockdown Tools! by opening up the urlscan.ini file and setting the following parameter, all was good with the application:

AllowDotInPath=1 ; If 1, allow dots that are not file extensions.

Posted by thaddeus in Tools of the Trade, Win2K3 Server at 10:59 | Comments (0) | Trackbacks (0)

Wednesday, August 29. 2007

Blog Mirroring Tool

In the process of setting up blogs for the management at my company SpireMedia, I ran into a bit of a problem. That's that I really like my existing blog and tools, and I sure don't want to manage a second blog with similar content to this one. The solution I thought would be to mirror code-complete over to my shiny new SpireMedia blog.

We're using presstopia, for now and I considererd finding or writing a simple .NET component to grab the rss feed from this blog and just drop that into the presstopia template. I figured that would take an hour so, but there's a much simpler/faster solution to implement a blog mirror:

The Javascript RSS Box Viewer had my blog mirrored in less than 5 minutes simply by generating the mirror script code and making a post to the presstopia blog with the following code in it:


<script
type="text/javascript"
src="http://p3k.org/rss/?url=http%3A%2F%2Fwww.code-complete.com
%2Fcode%2Findex.php%3F%2Ffeeds%2Findex.rss1
&align=center&width=560&frameColor=white
&titleBarColor=orange&titleBarTextColor=black&boxFillColor=white
&textColor=black&fontFace=arial&maxItems=50
&compact=&showXmlButton=&javascript=true">
</script>

Posted by thaddeus in Tools of the Trade at 11:09 | Comment (1) | Trackbacks (0)

Tuesday, August 21. 2007

Illustrator CS2 Corruption

For the second time in 6 months Illustrator cs2 shit the bed on one of my designers machines. The symptoms are that when starting up, Illustrator would pop a dialog box saying "Not enough memory (RAM)" - hit OK and the app continues to load. Once loaded no pallets are visible and the app will not open illustrator files (or will say it cannot open the illustration, then opens an empty version of the file. You are able to create a new file, but when you go to save the file all the menu items go gray, but you cannot see a save or save as dialog box.

The solution is that the dialog box is actually popping somewhere off-screen. To move it select save or save as then hit ALT+Spacebar hit enter then use your keyboard arrow keys to move the box onscreen.

Next issue is that when closing the application, the app would through another memory error.

By simply deleting the Documnets and Settings > UserName > Application Data > Adobe > Adobe Illustrator CS2 directory and letting Illustrator rebuild it, all the problems were solved. But for how long, I wonder...
Posted by thaddeus in Tools of the Trade at 13:12 | Comments (11) | Trackbacks (0)

Thursday, April 19. 2007

Vista + (Virtual Clone Drive * 2) = BSOD

Virtual Clone Drive from SlySoft.com is a great utility that allows you to mount .iso files directly as virtual drives. I like it and use it a lot. But, today I was bringing up a new vista developer workstation and got vista, SQL Server, Visual Studio, updates, and patches all installed. I was logged in under my account and Clone Drive worked great. When I rebooted and logged in under the developer (also an admin) account, i went to mount an .iso image by right clicking on it. Well, the Clone drive mount option was not available. So I reinstalled Virtual Clone Drive, but when I did, the machine Blue Screened. I restarted, it blue screened, i restarted into safe mode, it blue screened. I was not happy.

However, by booting up with the install dvd for vista and selecting the option to repair, the machine was able to revert to a restore point just before the 2nd VCD install, but after the Updates installed, so all was good again.

Moral - don't install VCD twice!
Posted by thaddeus in Tools of the Trade, Vista at 18:05 | Comments (5) | Trackbacks (0)

Wednesday, April 18. 2007

Restarting CFMX via http remotely and automated

In working with an under-memoried server and a cfmx application that would hang JRUN periodically, I decided to come up with a way to remotely restart cfmx via a URL call. My first thought was to write a simple ASP page that made a system call to a restart bat file like Pete created a while ago (Batch files to restart cfmx). However, I soon remembered that the added security in ASP these days precluded that solution. So I went old school and fell back to perl. I wrote the following perl script to make a system call to the VBSscript file that follows:


(you can download a zip with all the needed files here)



#!/bin/perl

# SpireMedia, Inc. Thaddeus Batt thad@spiremedia.com
# perl script that calls VBscript to restart the coldfusion services
# Date: 02/23/2007

$| = 1;
print "Content-Type: text/html\n\n";
@args_exe = ("%COMSPEC%","/C","cscript","C:\\cfusionmx7\\bin\\restartcfmx.vbs");
system(@args_exe) == 0
or die "it didn't work: @args_exe";

# and comment out the print section for go live version
print <<HTMLDOC;
<body >
<h1>restarting services</h1>
<PRE>
<p><hr>
</PRE><HR>

HTMLDOC
exit;



And here's the VBScript:


' SpireMedia, Inc. Thaddeus Batt thad@spiremedia.com
' vbscript that calls wmi service to restart the coldfusion services
' this script can be called via the associated perl script
' the default location of this file is
' C:\cfusionmx7\bin\restartcfmx.vbs
' Date: 02/23/2007
Option Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService, intSleep
strComputer = "."
intSleep = 15000
WScript.Echo " Click OK, then wait " & intSleep & " milliseconds"

On Error Resume Next
' NB strService is case sensitive.
strService = " 'ColdFusion MX 7 Application Server' "
WScript.Echo strService
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name ="_
& strService & " ")
WScript.Echo colListofServices
For Each objService in colListOfServices
objService.StopService()
WSCript.Sleep intSleep
objService.StartService()
Next
WScript.Echo "Your "& strService & " service has Started"
WScript.Quit



Now, I can point by browser to call the .pl script whenever i want to restart the services, or I can create a page like this in ASP, which makes a URL get to a CF page and checks the status then programatically calls the restart services if needed:

<%@ LANGUAGE="VBSCRIPT" %>
<%Response.Buffer = True %>
<%
dim url, strstatus, strhealth
url = "http://beta.xxxx.org/applications/heartbeat.cfm"
set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send()
strstatus = xmlhttp.Status
if strstatus = "200" then
strhealth=xmlhttp.responseText
response.write strhealth
response.write "<br />" & strstatus
else
dim url2
strhealth = "dead"
url2 = "http://beta.xxxx.org/applications/restartcfmx.pl"
set xmlhttp2 = server.CreateObject("Microsoft.XMLHTTP")
xmlhttp2.open "GET", url, false
xmlhttp2.send()

response.write strstatus
response.write xmlhttp.responseText
end if
%>


Finally, I would create a scheduled task using curl to call the ASP page once an hour.

Posted by thaddeus in Coldfusion Server, Tools of the Trade at 15:28 | Comments (2) | Trackbacks (0)
(Page 1 of 1, totaling 9 entries)

About Me

Thaddeus Wakefield Batt
Thaddeus Wakefield Batt

blogging from: denver, co.

blogging about: web technologies

Links

Tech Blogs
Fullasagoog - RIA
John Wilker
William .NET
Graphex

Links
SpireMedia, Inc.
The CMS Matrix




Lijit Search

Archives

  • September 2010
  • August 2010
  • July 2010
  • Recent...
  • Older...

Categories

  • XML .NET
  • XML Apollo
  • XML Coldfusion Programming
  • XML Coldfusion Server
  • XML Flex
  • XML Information Architecture
  • XML Java
  • XML Livecycle
  • XML postgreSQL
  • XML Redhat Linux
  • XML Silverlight
  • XML SpireMedia
  • XML SQL Server 2k5
  • XML Tools of the Trade
  • XML Vista
  • XML Win2K3 Server
  • XML Windows Server 2008
  • XML Zimbra


All categories

Syndicate This Blog

  • XML RSS 0.91 feed
  • XML RSS 1.0 feed
  • XML RSS 2.0 feed
  • ATOM/XML ATOM 0.3 feed
  • ATOM/XML ATOM 1.0 feed
  • XML RSS 2.0 Comments

Blog Administration

Open login screen

Thaddeus Batt

Creative Commons License - Some Rights Reserved
Original content in this work is licensed under a Creative Commons License