Navigation

Search

Categories

On this page

go somewhere new
Placate vs Educate
Front Page Macro to remove pfhover applets

Archive

Blogroll

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

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 120
This Year: 1
This Month: 0
This Week: 0
Comments: 40

Sign In
Pick a theme:

# Friday, October 27, 2006
Friday, October 27, 2006 12:32:26 PM (Mountain Daylight Time, UTC-06:00) ( )

Open your command shell in Windows.

Start -> Run, CMD, <enter>

Go to a different drive, say, the D: volume, to a folder called \foo\bar

this might look like cd D:\foo\bar

Wait, I thought I said, CD, change directory.... what gives, I didn't go anywhere. When I say go, I mean go.

Here's how I go..

GO.CMD


@ECHO OFF
:: Change to 1 to display messages
SET DEBUG=0

:: Make sure there is a parameter
IF [%1]==[] GOTO MissingDir

:: If parameter 1 is a directory, it will have a nul file in it
:: If there is no nul, it's a file, not a directory
IF NOT EXIST %1\nul GOTO NotDir

:: Change working drive
:CWD
IF %DEBUG%==1 (
  ECHO %~d1
)
%~d1

:: Change working path
:CWP
cd "%~pn1"
GOTO :EOF

:: Missing a parameter
:MissingDir
ECHO You did not specify a place to go to
GOTO :Usage

:: Invalid Parameter
:NotDir
ECHO You specified a file, or an invalid directory
GOTO :EOF

:Usage
go.cmd DRIVE:\FULL\PATH\TO\FOLDER
GOTO :EOF

:End

Now, you can go anywhere, really...


Edit (12/18/2006)

This is really helpful, but I found myself using far too many keystrokes to open a console at the location in my clipboard.

Start + R -> cmd -> {ENTER} -> GO{SPACE}, ALT + E + P, {ENTER}... thats 12 keys to press to do this

Added an additional file to my %USERHOME% to automate this.

%USERHOME%\cgo.bat

cmd /k "c:\utils\go.cmd %1 && cls"

Now we're more like

Start + R -> cgo {SPACE} CTRL + V {ENTER}... Thats 9 keys. Thats a 25% reduction, and well worth my time in the one line script & the time documenting.

This saves me 1-3 seconds time I use it (average of 32)... amazing.

 

 

Comments [0] | | # 
# Friday, October 13, 2006
Friday, October 13, 2006 4:43:18 PM (Mountain Daylight Time, UTC-06:00) ( )

Here's the dealio.

We1 have a bad habit of placating the customer instead of educating them. 9 times out of 10, our customers don't know what they need. If they think they know what they want, they can't express it. Even when we've already built something, they can't express how they want to reuse it.

ed‧u‧cate –verb (used with object) ( http://dictionary.reference.com/browse/educate)
1. to develop the faculties and powers of (a person) by teaching, instruction, or schooling.

pla‧cate –verb (used with object) ( http://dictionary.reference.com/browse/placate) to appease or pacify, esp. by concessions or conciliatory gestures.

It's no suprise why there's a great deal of frustration from both parties. What would happen if we took our jobs as an opportunity to educate people, as to what was going on, by giving them rich tools with which to express what we were doing. If we could put tools in their hands to describe in their language, what we're doing, we could re-use the tools we build much quicker. Simply amazing.


1We refers to humanity in general. Especially those of us that work with any kind of customer.
Comments [0] | | # 
# Wednesday, September 27, 2006
Wednesday, September 27, 2006 10:53:20 AM (Mountain Daylight Time, UTC-06:00) ( )

I can't really take credit for this. I found it somewhere on the net, and wanted to make sure I kept it around.

Sub HoverRepair()

Dim applet As IHTMLElement
Dim param As IHTMLElement
Dim paramStr As String
Dim Text As String
Dim URL As String
Dim target As String

For Each applet In ActiveDocument.all.tags("applet")
If applet.getAttribute("code") = "fphover.class" Then

Text = ""
URL = ""
target = ""
paramStr = ""
For Each param In applet.Children
If param.tagName = "param" Then
'paramStr = paramStr & param.outerHTML

If param.getAttribute("name") = "target" Then
target = param.getAttribute("value")
End If
If param.getAttribute("name") = "url" Then
URL = param.getAttribute("value")
End If
If param.getAttribute("name") = "text" Then
Text = param.getAttribute("value")
End If

End If
Next

paramStr = paramStr & "<a href=""" & URL & """"
If target <> "" Then
paramStr = paramStr & " target=""" & target & """"
End If
paramStr = paramStr & ">" & Text & "</a>"

applet.outerHTML = paramStr


End If

Next

End Sub

Comments [0] | | #