Thursday, January 17, 2013

Introduction to Algorithms, 3rd edition - Chapter 2

Switching to the third edition, just because.

Exercises

2.1-1  Using Figure 2.2 as a model, illustrate the operation of INSERTION-SORT on the array  = < 31, 41, 59, 26, 41, 58 >
Note: solution produced via free tool LucidChart

2.1-2  Rewrite the INSERTION-SORT procedure to sort into nonincreasing instead of nondecreasing order.

INSERTION-SORT(A)
1. for j = 2 to A.length
2.   key = A[j]
3.   // Insert A[j] into the sorted sequence A[1..j - 1].
4.   i = j - 1
5.   while i > 0 and A[i] < key
6.     A[i + 1] = A[i]
7.     i = i - 1
8.   A[i + 1] = key


2.1-3 Consider the searching problem:
Input: A sequence of n numbers A = < a1, a2, ..., an > and a value v.
Output: An index i such that v = A[i] or the special value NIL if v does not appear in A.
Write pseudocode for linear search, which scans through the sequence, looking for v. Using a loop invariant, prove your algorithm is correct.

LINEAR-SEARCH(A, v)
1. i = 1
2. while i <= A.length
3.   if v == A[i]
4.     return i
5.   i = i + 1
6. return NIL 



Loop invariant: At the start of each iteration of the while loop of lines 2-5, the algorithm has yet to find value v in subarray A[1..i - 1], which represents the searched elements of array A.

Initialization: We start by showing the loop invariant holds before the first loop iteration, when index i = 1. Since the algorithm has yet to begin searching for value v, subarray A[1..i - 1] correctly consists of zero elements and therefore cannot contain value v. Therefore, the loop invariant holds prior to the first iteration of the loop.

Maintenance: Next, we tackle the second property: showing each iteration maintains the loop invariant. The body of the while loop tests whether value v equals array element A[i] (line 3). If so, it exits with an output of index i. Otherwise, incrementing i for the next iteration of the while loop preserves the loop invariant, as the algorithm will now have fruitlessly searched subarray A[1..i - 1] for value v.

Termination: Finally, we examine what happens when the loop terminates. Condition i > A.length = n causes the while loop to terminate. Since each loop iteration increases i by 1, we must have i = n + 1 at that time. Substituting n + 1 for i in the wording of the loop invariant, we have the subarray A[1..n] consisting of the searched elements of array A. Observing subarray A[1..n] represents the entire array, we conclude v does not exist in A. At this point, the algorithm returns the special value NIL. Hence, the algorithm is correct.

2.1-4 Consider the problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum of the two integers should be stored in binary form in an (n + 1)-element array C. State the problem formally and write pseudocode for adding the two integers.

Input: A sequence of n binary numbers A = < a1, a2, ..., an > and B = < b1, b2, ..., bn >, representing binary integers A and B, with binary numbers a1 and b1 representing the least-significant bits of each sequence, respectively

Output: A sequence of n + 1 binary numbers C = < c1, c2, ..., cn+1 > representing the sum of binary integers A + B, with binary number c1 representing the least-significant bit

BINARY-SUM(A, B, C)
1.  carry = 0
2.  for i = 1 to A.length
3.    if (A[i] + B[i] + carry) == 3
4.      carry = 1
5.      C[i] = 1
6.    elseif (A[i] + B[i] + carry) == 2
7.      carry = 1
8.      C[i] = 0
9.    elseif (A[i] + B[i] + carry) == 1
10.     carry = 0
11.     C[i] = 1
12.   else
13.     carry = 0
14.     C[i] = 0
15. C[i] = carry


2.2-1 Express the function n^3 / 1000 - 100n^2 - 100n + 3 in terms of Θ-notation

Θ(n^3)

2.2-2 Consider sorting n numbers stored in array A by first finding the smallest element of A and exchanging it with the element in A[1]. Then find the second smallest element of A, and exchange it with A[2]. Continue in this manner for the first n - 1 elements of A. Write pseudocode for this algorithm, which is known as selection sort. What loop invariant does this algorithm maintain? Why does it need to run for only the first n - 1 elements, rather than for all n elements? Give the best-case and worst-case running times of selection sort in Θ-notation.

SELECTION-SORT(A)
1.  for i = 1 to A.length - 1
2.    min_index = i
3.    // Find the smallest number in unsorted subarray A[i + 1..n]
4.    for j = i + 1 to A.length
5.      if A[j] < A[min_index]
6.        min_index = j

7.    // Exchange current and smallest unsorted element
8.    key = A[i]
9.    A[i] = A[min_index]
10.   A[min_index] = key


Loop invariant: At the start of each iteration of the for loop of lines 1-10, the subarray A[1..i - 1] consists of the i - 1 smallest elements of A, in sorted ascending order.

It only needs to run for the first n - 1 elements of A because upon termination, index i will equal (A.length - 1) + 1 = n. The loop invariant guarantees subarray A[1..n - 1] will consist of the n - 1 smallest elements of A in sorted ascending order, which implies the remaining original element not only resides in A[n], but it also represents the nth smallest element of A.

Best and worst case: SELECTION-SORT(A) performs the same, in terms of Θ-notation, regardless of input. For example, the algorithm executes the same number of steps with a sorted or reverse-sorted array as input.

The algorithm runs in Θ(n^2): The outer loop takes n - 1 iterations. The inner loop takes


iterations. Together, both outer and inner take


where c equals the number of incidental, non-comment lines of code in SELECTIOTN-SORT. This simplifies to


which equals a running time of Θ(n^2).

2.2-3 Consider linear search again (see 2.1-3). How many elements of the input sequence need to be checked on the average, assuming the element being searched for is equally likely to be any element in the array? How about in the worst case? What are the average-case and worst-case running times of linear search in Θ-notation? Justify your answers.

On the average, assuming the element being searched for is equally likely to be any element in the array, LINEAR-SEARCH(A, v) will check the i-th element of input sequence
A.length - (i - 1) 
times. For example, if A.length == 100 and we call LINEAR-SEARCH(A, v) 100 times with the same inputs, it will, on the average, check element #1 100 times, element #2 99 times, element #3 98 times, and so forth, checking element #100 only 1 time. So, on average, we will check
(A.length + A.length-1 + A.length-2 + ... + 1) / A.length
or

So, on the average, assuming the element being searched for is equally likely to be any element in the array, LINEAR-SEARCH(A, v) will check


elements of the input sequence, or a little over one-half of all elements.

In the worst case, when value v matches the last element in A (or matches no elements in A), LINEAR-SEARCH(A, v) will check all elements in A.

Therefore, both on the average and in the worst case, LINEAR-SEARCH(A, v) runs in Θ(n) time. As n represents the leading term in each case, given large enough array sizes, it dominates the order of growth calculation.

2.2-4 How can we modify almost any algorithm to have a good best-case running time?

We can modify almost any algorithm to have a good best-case running time by ensuring it runs in constant time for at least one input.

2.3-1

Using Figure 2.4 as a model, illustrate the operation of merge sort on the array A = <3, 41, 52, 26, 38, 57, 9, 49>


Note: solution produced via free tool LucidChart


2.3-2

Rewrite the MERGE procedure so it does not use sentinels, instead stopping once either array L or R has had all its elements copied back to A and then copying the remainder of the other array back into A.

MERGE(A, p, q, r)
1.   nsub1 = q - p + 1
2.   nsub2 = r - q
3.   let L[1..nsub1] and R[1..nsub2] be new arrays
4.   for i = 1 to nsub1
5.     L[i] = A[p + i - 1]
6.   for j = 1 to nsub2
7.     R[j] = A[q + j]
8.   i = 1
9.   j = 1
10.  k = 1
11.  while nsub1 > 0 and nsub2 > 0
12.    if L[i] <= R[i]
13.      A[k] = L[i]
14.      i = i + 1
15.      k = k + 1
16.      nsub1 = nsub1 - 1
17.    else A[k] = R[j]
18.      j = j + 1
19.      k = k + 1
20.      nsub2 = nsub2 - 1
21.  if nsub1 > 0
22.    do
23.      A[k] = L[i]
24.      k = k + 1
25.      i = i + 1
26.      nsub1 = nsub1 - 1
27.    while nsub1 > 0
28.  else
29.    do\
30.      A[k] = R[j]
31.      k = k + 1
32.      j = j + 1
33.      nsub2 = nsub2 - 1
34.    while nsub2 > 0

2.3-3

Use mathematical induction to show that when n is an exact power of 2, the solution of the recurrence


is T(n) = n lg n (where lg = log base 2).

Base case: Let n = 2. Then T(n) = 2, which equals T(n) = n lg n, as 2*log2(2) = 2*1 = 2.

Inductive step: Assuming T(n) holds, for some unspecified value of n where n =  and k > 1, we must show T(2n) holds, as 2n represents the next valid input. In this case, .

We want to show

This simplifies to 

Since we assume T(n) holds, we substitute in n lg(n) for T(n), which results in 


Via associative and distributive properties, this simplifies to


Our proof only concerns cases in which n represents a multiple of 2. Specifically, the case in which . Substituting  for 2n and  for n allows us to rewrite the formula as


Simplifying via logarithmic identify  reduces this to:


thereby showing inductive step T(2n) holds.

Since both the basis and the inductive step have been proved, we have therefore proved T(n) holds for all n where n =  and k >= 1. Q.E.D.

2.3-4

We can express insertion sort as a recursive procedure as follows. In order to sort A[1..n], we recursively sort A[1..n - 1] and then insert A[n] into the sorted array A[1..n - 1]. Write a recurrence for the running time of this recursive version of insertion sort.


INSERTION-SORT(A, n)
1.  if n > 2
2.    INSERTION-SORT(A, n - 1)

3.  INSERT(A, n - 1, A[n])

INSERT(A, sorted_end, el)
1.   // Insert el into the sorted sequence A[1..sorted_end].
2.   // Assume total buffer equals A[1..sorted_end + 1], with
3.   // el initially at A[sorted_end + 1]
4.   i = sorted_end 
5.   while i > 0 and A[i] > el
6.     A[i + 1] = A[i]
7.     i = i - 1
8.   A[i + 1] = el


As with the non-recursive insertion sort, a reverse-sorted array represents the worst-case scenario, while a sorted array represents the best-case scenario.

2.3-5

Referring back to the searching problem (see 2.1-3), observe that if the sequence A is sorted, we can check the midpoint of the sequence against v and eliminate half of the sequence from further consideration. The binary search algorithm repeats this procedure, halving the size of the remaining portion of the sequence each time. Write pseudocode, either iterative or recursive, for binary search. Argue  represents the worst-case running time of binary search.

The iterative case:


BINARY-SEARCH(A, v)

1.  l = 1
2.  r = A.length
3.  while l != r
4.    mid = l + CEILING((r - l) / 2)
5.    if v == A[mid]
6.      return mid7.    elseif v > A[mid]
8.      l = mid
9.    else
10.     r = mid
11. return NIL  



The recursive case:


BINARY-SEARCH(A, v)
1.  return SEARCH(A, v, 1, A.length)

SEARCH(A, v, l, r)
1.  if l == r
2.    return NIL
3.  else
4.    mid = l + CEILING((r - l) / 2)
5.    if v == A[mid]
6.      return mid7.    elseif v > A[mid]
8.      return SEARCH(A, v, mid, r)
9.    else
10.     return SEARCH(A, v, l, mid)


We can express the recursive case with recurrence:


where the constant c represents the time required to solve problems of size 1.

Note: solution produced via free tool LucidChart

We can construct a recursion tree to see why BINARY-SEARCH runs in worst-case lg n time. In (a) and (b), above, we see T(n) progressively expanding. In (c), we see the fully expanded tree, which has lg n + 1 levels and each level contributes a total cost of c. The total cost, therefore, is c lg n, which is .

2.3-6

Observe that the while loop of lines 5-7 of the INSERTION-SORT procedure in Section 2.1 uses a linear search to scan (backward) through the sorted subarray A[1..j - 1]. Can we use a binary search (see Exercise 2.3-5) instead to improve the overall worst-case running time of insertion sort to ?

INSERTION-SORT(A)
1. for j = 2 to A.length
2.   key = A[j]
3.   // Insert A[j] into the sorted sequence A[1..j - 1].
4.   i = j - 1
5.   while i > 0 and A[i] < key
6.     A[i + 1] = A[i]
7.     i = i - 1
8.   A[i + 1] = key  ,'''''''''''''''''''



Previous - Chapter one
Next - Chapter three

Saturday, January 12, 2013

Free digital copy of movie after viewing at the theater

Why not offer people a free digital copy of the movie they just watched at the theater?


Radio songs

Heard on KPFA 94.1 FM out of Berkeley, CA on Saturday, Jan 5:
ORQUESTA LA MODERNA TRADICION's "Juarez" from their album Goza Con Migo on the Outman Records label.
Heard on KDVS 90.3 FM out of Davis, CA on Wednesday, Jan 9:

Julia Holter - Marienbad
http://www.youtube.com/watch?v=QukVgY8I_nA

Dash camera

Thinking about getting one, if for nothing else than the beautiful sights of driving in California.

Wednesday, January 09, 2013

Installing Ubuntu to Dell Inspiron 15r

Lots of fun (ha ha, joking) this evening installing a copy of Ubuntu to a Dell Inspiron 15r via USB:
  • USB partition must be FAT16 to avoid boot failure
  • Use 1GB (of 8GB) partition to avoid weird "out of disk space" error when writing the ISO to the USB
  • Have to reinstall GRUB after the install
Oy.

Wednesday, December 26, 2012

Introduction to Algorithms, 2nd edition - Chapter 1

Notes

1.1 Algorithms 

Algorithm = Inputs -> Outputs (Specific procedure)

Computational problem = desired I/O relationship (general)...an algorithm defines a specific relationship

Nondecreasing = same or greater

Define computational problem by specifiying I/O

Instance = One input

Correct algorithm = halts on all inputs with correct output

Correct algorithm solves a problem

Specification = Precise description of guts

"Incorrect algorithms can sometimes be useful"

Problems solved by algorithms:

  • Determining sequences (Human Genome Project)
  • Finding good routes; quickly find Internet pages
  • Negotiate and exchange electronic commerce
  • Allocate scarce resources
2-D -> 3-D mapping?

Given = inputs
Wish to find = outputs

Two common characteristics of algorithms:
  1. Many candidate solutions
  2. Practical applications
Data structure = store and organize data to facilitate access and modifications

Problems without published algorithms

Efficiency

Interesting NP-complete properties:
  1. it is unknown whether or not efficient algorithms exist
  2. If an efficient algorithm exists for any one of them, then efficient algorithms exist for all of them
  3. Several NP-complete problems are similar, but not identical, to problems for which we do not know of efficient algorithms
Real world NP-complete problems arise in real world

Traveling salesman

1.2 Algorithms as a technology

Terminates with correct answer

What if infinite speed and free memory?

Good software engineering practice = well designed and documented

Bounded resources (like computing time) should be used wisely

Algorithms are greater than hardware and software considerations

Insertion sort

Merge sort

Constant factors versus input sizes

Running time

Crossover point

Algorithms are important

Algorithms = core of contemporary technology

Algorithm knowledge technique = truly skilled programmer


Definitions


  • Concave polygon (one of the angles surpasses 180-degrees)
  • Permutation (a rearranging of terms)
  • Linear programming (Linear programming (optimization)  is a specific case of mathematical programming (mathematical optimization).
  • Graph
  • Product
  • Vertex
  • Associative
  • Dynamic programming (a method for solving complex problems by breaking them down into simpler subproblems...The word dynamic was chosen by Bellman to capture the time-varying aspect of the problems, and because it sounded impressive.[3] The word programming referred to the use of the method to find an optimal program, in the sense of a military schedule for training or logistics. This usage is the same as that in the phrases linear programming and mathematical programming, a synonym for mathematical optimization.)
  • Constant not dependent on n
  • Pipelining (a set of data processing elements connected in series, so that the output of one element is the input of the next one)
  • Superscalar (a form of parallelism called instruction level parallelism within a single processor. It therefore allows faster CPU throughput than would otherwise be possible at a given clock rate. A superscalar processor executes more than one instruction during a clock cycle by simultaneously dispatching multiple instructions to redundant functional units on the processor.)




Exercises 1.1

1.1-1 Give a real world example in which one of the following computational problems appears: sorting, determining the best order for multiplying matrices, or finding the convex hull.

  • Sorting
    • Sorting files in a directory by creation date
    • Sorting various paper denominations of money
    • Sorting tax return forms by form ID number
  • Determining the best order for multiplying matrices
    • ???
  • Finding the convex hull
    • Identifying area of forest burned by fire

1.1-2 Other than speed, what other measures of efficiency might one use in a real-world setting?

  • Storage requirements during runtime
  • Power consumption
  • Size of hardware
  • Size of software at rest

1.1-3 Select a data structure you have seen previously and discuss its strengths and limitations.
Stack

  • Strengths
    • Simple to implement: two operations, push and pop
    • Push and pop operate in constant time
  • Limitations
    • Not elegant way to traverse elements, since have to pop and store elsewhere in order to inspect and preserve order

1.1-4 How are the shortest-path and traveling-salesman problems given above similar? How are they different?

  • Same
    • Both want shortest path, per constraints
    • Both seem like NP-complete problems
  • Differences
    • Traveling-salesman requires begin and end at same node
    • Shortest-path goes point-to-point

1.1-5 Come up with a real-world problem in which only the best solution will do. Then come up with one in which a solution that is "approximately" the best is good enough.

  • Only the best solution
    • Note: best means no cutting corners, not necessarily "perfection"
    • Everything comes down to acceptable tolerances, in the real world
    • Typically, anything involving human safety in life and death situations
      • Space station airlocks (opening and closing)
      • Airplane auto-pilot systems
      • Traffic control systems (for example, traffic lights)
    • Financial transactions
      • ATM
  • Approximately the best is good enough
    • Pretty much everything else ; o )
    • Point-to-point driving when time not of the essence...probably OK to get reasonably close to a location and then figure out parking, eating, and so forth
    • Pouring a beer...OK to have a bit of foam at the top
Exercises 1.2

1.2-1 Give an example of an application that requires algorithmic content at the application level, and discuss the function of the algorithms involved.
Section 1.1 of this book defines an algorithm as "any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output." Given this broad definition, I suggest the example of a web-based SQL formatter. As input, it takes a sequence of characters representing a SQL query. As output, it produces formatted SQL code, per constraints specified by the user. The algorithm functions as a set of rules which transform the input into the output based on the constraints specified by the user. For example, if the user selects "DB2" SQL as the input and C# as the output, the algorithm logic would transform the inputs into outputs conforming to C# rules.

1.2-2 Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For inputs of size n, insertion sort runs in 8n^2 steps, while merge sort runs in 64nlgn steps. For which values of n does insertion sort beat merge sort?
We wish to find the greatest value of n for which 8n^2 < 64nlgn. Since this seems to represent a transcendental function, I have elected to plug and chug to arrive at the answer. I used OpenOffice.org Calc to calculate the results below:
  • When n = 2, we have 8(4) < 64(2)(1) => 32 < 128, which is true.
  • When n = 4, we have 8(16) < 64(4)(2) => 128 < 512, which is true.
  • and so forth, until n = 44, when we have 15,488 < 15373.8, which is false
Therefore, in this particular implementation, insertion sort beats merge sort for values of 2 <= n <= 43.
1.2-3 What is the smallest value of n such that an algorithm whose running time is 100n^2 runs faster than an algorithm whose running time is 2^n on the same machine?
We wish to find the smallest value of n for which 100n^2 < 2^n. Since this seems to represent a transcendental function, I have elected to plug and chug to arrive at the answer. I used OpenOffice.org Calc to calculate the results below:
  • When n = 1, we have 100(1) < 2^1 => 100 < 2, which is false.
  • When n = 2, we have 100(4) < 2^2=> 400 < 4, which is false.
  • and so forth, until n = 15, when we have 22,500 < 32,768, which is true
Therefore, in this particular implementation, the algorithm with running time 100(n^2) runs faster than the algorithm with running time 2^n for values of n >= 15.
Problems

1-1 Comparison of running times
For each function f(n) and time t in the following table, determine the largest size n of a problem that can be solved in time t, assuming that the algorithm to solve the problem takes f(n) microseconds.

Note: I found this problem statement confusing, initially. The authors treat the computational problem and algorithm as a black box. The black box can solve an input of n items in f(n) microseconds. The authors ask the reader to calculate the largest size n the black box can solve on or before various times (t). For example, for f(n) = n, the black box can solve an input of 1 item in f(1) = 1 microsecond and 2 items in f(2) = 2 microseconds.

We first convert the times in the header row into microseconds (one microsecond = 1/1,000,000 of a second):
  • 1 second = 1 * 10^6 or 1,000,000 microseconds
  • 1 minute = 6 * 10^7 or 60,000,000 microseconds
  • 1 hour = 3.6 * 10^9 or 3,600,000,000 microseconds
  • 1 day = 8.64 * 10^10 or 86,400,000,000 microseconds
  • 1 month = 2.592 * 10^12 or 2,592,000,000,000 microseconds (assuming 30 days per month, on average)
  • 1 year = 3.15576 * 10^13 or 31,557,600,000,000 microseconds (assuming 365.25 days per year)
  • 1 century = 3.15576 * 10^15 or 3,155,760,000,000,000 microseconds
Second, for each cell, we need to calculate the largest size n the black box can solve on or before the specified number of microseconds:


Notes 1 second 1 minute 1 hour 1 day 1 month (assume 30 days, on average) 1 year (assume 365.25 days) 1 century
lg(n) Put both sides on base 2; this converts 2^lg(n) to n. 2^(1 * 10^6) 2^(6 * 10^7) 2^(3.6 * 10^9) 2^(8.64 * 10^10) 2^(2.592 * 10^12) 2^(3.15576 * 10^13) 2^(3.15576 * 10^15)
sqrt(n) Squaring both sides solves for n. (1 * 10^6)^2 = 1 * 10^12 (6 * 10^7)^2 = 3.6 * 10^15 (3.6 * 10^9)^2 = 1.296 * 10^19 (8.64 * 10^10)^2 = 7.46496 * 10^21 (2.592 * 10^12)^2 = 6.718464 * 10^24 (3.15576 * 10^13)^2 = 9.9588211776×10^26 (3.15576 * 10^15)^2 = 9.9588211776×10^30
n 1 * 10^6 6 * 10^7 3.6 * 10^9 8.64 * 10^10 2.592 * 10^12 3.15576 * 10^13 3.15576 * 10^15
nlg(n) Put both sides as an exponent on base 2; since nlg(n) = lg(n^n), this converts 2^(lg(n^n)) to n^n. Transcendental...so we have to do things the hard way. 6.2746 * 10^4 (link) 2.801417 * 10^6 (link to get approximation, then manual refinement) 1.33378058 * 10^8 (link to get approximation, then manual refinement) 2.755147513 * 10^9 (link to get approximation, then manual refinement) 7.1870856404 * 10^10 (link to get approximation, then manual refinement) 7.98161 * 10^11 (link to get approximation, then manual refinement) 6.86565x10^13 (link to get approximation, then manual refinement)
n^2 Taking the square root of both sides solves for n. sqrt(1 * 10^6) = 1 * 10^3 or 1,000 sqrt(6 * 10^7) = 7.745966692 * 10^3 or 7,745 sqrt(3.6 * 10^9) = 6 * 10^4 or 60,000 sqrt(8.64 * 10^10) = 2.939387691 * 10^5 or 293,938 sqrt(2.592 * 10^12) = 1.609968944 * 10^6 or 1,609,968 sqrt(3.15576 * 10^13) = 5.617615152357805 * 10^6 or 5,617,615 sqrt(3.15576 * 10^15) = 5.617615152357 × 10^7 or 56,176,151
n^3 Taking the cube root of both sides solves for n. cuberoot(1 * 10^6) = 1 * 10^2 or 100 cuberoot(6 * 10^7) = 3.914867641×10^2 or 391 cuberoot(3.6 * 10^9) = 1.532618865×10^3 or 1,532 cuberoot(8.64 * 10^10) = 4.420837798×10^3 or 4,420 cuberoot(2.592 * 10^12) = 1.373657091×10^4 or 13,736 cuberoot(3.15576 * 10^13) = 3.1601×10^4 or 31,601 cuberoot(3.15576 * 10^15) = 1.46679335×10^5 or 146,679
2^n Taking lg of both sides solves for n. log(1 * 10^6) / log(2) = 1.993156857×10^1 or 19 log(6 * 10^7) / log(2) = 2.583845916×10^1 or 25 log(3.6 * 10^9) / log(2) = 3.174534976×10^1 or 31 log(8.64 * 10^10) / log(2) = 3.633031226×10^1 or 36 log(2.592 * 10^12) / log(2) = 4.123720286×10^1 or 41 log(3.15576 * 10^13) / log(2) = 4.484305×10^1 or 44.84305 log(3.15576 * 10^15) / log(2) = 5.1486909×10^1 or 51
n! Plug and chug...Wolfram Alpha helps 9 11 12 13 15 16 17

Speeding up playback rate for online videos under Linux

Seems like every link I have found to-date shows how to increase playback rate for online videos under Windows/Mac using Enounce MySpeed plugin or recommends downloading the video to local storage and using a client-side app like mplayer/VLC/and so forth.

Will keep looking.

Friday, December 14, 2012

Time to get classy

From Reddit:

Good evening gentleman/ladies.
  1. Get out your drink of choice.
  2. open 3 tabs on your favorite browser.
  3. On the first tab
  4. On another tab
  5. On the last
All on one page.

Thursday, December 06, 2012

Wool navy trench coat - purchased

Found one after years of looking...for $70 on eBay! : o )











UPDATE: it's a very nice coat. It turned out a bit darker than expected, so more formal than something I would want to wear every day. So, still looking for a grayed navy trench coat. This one looks very nice, though--no complaints.

Clothing measurements

Circa 2012:

Chest: 38"
Neck: 16"
Sleeve: 26"
Shoulders: 19.5"
Waist: 34"
Inseam: 32"
Thigh: 23"
Belly: 38.5"
Torso: 29"
Arm: 12"
Hip: 43"

Reyn Spooner (c. 2024)

Tailored Fit XL Aloha Shirt fits shoulders the best...but this leaves the length too long and the chest a bit baggy

  • Shoulder: 20.3"
  • Chest: 50.6" (slightly baggy)
  • Bottom opening: 48.6" (slightly baggy)
  • Length: 31.8" (slightly long)

Blue Ginger (c. 2024)

Men's medium aloha shirt: fits OK. Shirt measurements of the men's aloha shirt (Taro / Navy-Blue-Multi)(taken while not worn):
  • Shoulder: 21"
  • Chest: 21.5" x 2
  • Length: 26"
  • Bottom opening: ~23"

Sunday, December 02, 2012

Christopher Hayes

Heard Christopher Hayes speaking on NPR a few months ago and he seems like a clued-in progressive.

Proud to be Sanatan

Saw this on a bumper sticker (or something like it) a month or two ago.

This refers to Hinduism. From Wikipedia: "Sanātana Dharma, a Sanskrit phrase meaning "the eternal law", or the "eternal way"."

Cafe Yesterday photos - Berkeley, CA

Some striking photos installed earlier this summer at Cafe Yesterday in Berkeley, CA:

celsa.dockstauer@berkeley.edu

In addition, they have a sandwich named "The Schultz". Nice.

Shower curtains


Looking for a purple and/or gold shower curtain in a traditional Japanese style.


Revenue streams

Earlier this year, I wrote down this pledge:

"I will create a new stream of passive income by Dec 31, 2012, that generates at least $50 per month on average and endures for a minimum of five years."


Thursday, November 29, 2012

Midikat

http://www.midikat.com/

I saw the MidiKat car on the way home a week or two ago.

Radio songs

Heard on 88.9 FM KXPR out of Sacramento, CA:

Alan Hovhaness: Symphony No. 2 "Mysterious Mountain" Opus 132 - Royal Liverpool Philharmonic; Gerard Schwarz, conductor; Label: Telarc; Number: 80604 (audio). The intermittent xylophone sounds like the Legend of Zelda secret passage music. : o D

Audio:
http://www.youtube.com/watch?v=vlXBmIjjzAc (part 1 of 3)

Sunday, November 25, 2012

Putting my head through the firmament - GTD

"A traveller puts his head under the edge of the firmament in the original (1888) printing of the Flammarion engraving."

Via Carl Sagan's Cosmos: Vangelis' Heaven and Hell
http://www.listenonrepeat.com/watch/?v=qDvKsQAafGU (image above appears at 3:51 mark)

A part of me seems to harbor a distrust of "drinking the Koolaid", which has delayed my adaption of GTD.

It seems like taking a leap of faith. When I came back from a summer vacation in 2011, I began focusing on working smarter, to get myself better cope with the heavy workload my position demanded.

Fast forward 14 months--I have read the GTD book, watched a few videos, and am in the process of re-reading it, underlining key phrases and noting critical points.

It feels like standing on the high dive for the first time, looking down at the water, rationally knowing the jump will not kill me, but fearing the unknown and increased risk.

Maintaining a consistent system for both home and work seems to represent the point of procrastination. Do I need a complicated system to track my projects or will a simpler system suffice? David Allen himself seems to make clear the person needs to figure out the complexity needed after collecting everything for the first time. So, now that I have everything collected, I need to process everything for the first time and figure out how complicated a system I need.

Will I see the bang for the buck in using the system? If I adopt something, I want to look smart doing it.

Will I feel the emotional benefit of the weekly review? If I do not, the effort to invest and dedicate time up-front will fail as the review portion becomes the weak link. David Allen recommends thinking about it like brushing one's teeth...after a period of forced habit, it begins feeling "right" to have clean teeth.

Have I invested enough money to purchase the tools I need to succeed? I have a stackable three-level shelf from IKEA, a Brother P-Touch labeler and extra label tape cartridges, a folder holder from Target, the GTD book, paper pads and pens. David Allen uses a few other tools: a BlackBerry, a voice recorder, a scanner, Lotus Notes...none of theses seems like necessities, and I think he would probably agree.

Do I understand the process fully enough to begin the Process phase? After watching a few videos and re-reading the book, the process flow seems straightforward enough....figuring out if I need to take action on each item, doing it if less than two minutes, otherwise deferring it, delegating it, or archiving it.

Can I imagine myself successfully implementing GTD? Yes, I think so, but I have not really thought about how it might feel to have a system in place to move my brain to function primarily as a decision making tool rather than a tool for remembering priorities and actions. I imagine manilla file folder containing...what? Next actions, I suppose, if I choose a paper-based system. A folder for active projects. No, the manilla folders would contain the support material for each of the ongoing projects. With the tiered folder hold showing those I am currently engaged in on a regular basis. I think the Next Actions lists for each Project folder probably deserve a digital format.

Psychologically, having physical folders seems very important, to me. My PhD folder: boom. My @Errands folder: boom. And so forth.

As an aside: people reading this obviously cannot see this, but I have a purple throw on my lap and a very content cat sleeping on it. :3

It seems to come down to: my lazy side complaining about the extra work needed to learn a new habit. Like exercising a muscle. I think I want some reassurance I will feel the emotional benefits of using the new system. From my research, it seems reasonable to feel cautiously optimistic the GTD system will help bring structure to the way I collect my thoughts and process those collections into actionable projects. I will trust my system and lean on it to support my intuitive judgment calls on what to work on next...or what not to work on. I look forward to capturing as much as I can into the system, so I can live my life focused on actions rather than to-do lists.

UPDATE: important to note David Allen does not say this will make life easier...it does not represent a silver bullet...it simply represents a tool to allow people to focus fully on the challenges one identifies as the most important to focus on, at any point in time...it "clears the decks" of the mind, so to speak.

Saturday, November 24, 2012

Vision

The Zendone GTD workflow overview

Thinking through a lot of options for managing GTD; something workable at both home and at the office where corporate IT limits my options (for example, EverNote).

It all boils down to list management; getting everything out of my head and into Collection dumps; then a Process and/or Organize phase for each of the Collection dumps to figure out whether to take immediate action or to Organize it for later or to trash it ... and so forth.


GTD web software

Some web-based vendors:

  • Nirvana
  • Doit.im 
  • ToodleDo
  • ZenDone (wow, beautiful)

Friday, November 23, 2012

Notetaker wallets

Some variations on taking notes while away from a PC:

Principles

"A great way to think about what your principles are is to complete this sentence: "I would give others totally free rein to do this as long as they ..."--what?

David Allen, GTD

Thursday, November 22, 2012

Inuyasha anime run

Chibi Koga, Kagome, and Inuyasha

Hachi (flying form), Shippo (balloon form), Kirara (normal form)

Dawn and I spent the last month making a run through Rumiko Takahashi's Inuyasha.

167 first run episodes + 26 final act episodes + four movies later, we completed the run on Wednesday evening.

Random notes (SPOILERS)
  • Shippo's drawings of Kagome and Inuyasha in Episode 38 (~15:50) at the beginning of Episode 39 looked great
  • Episoe 53 ("Father's Old Enemy: Ryukotsusei"; 父の宿敵 竜骨精) represents one of my favorite mini-clips: Miroku, Sango, and Shippo riding on Kirara...the demon cat sort of just moves statically across the screen...just looks sort of silly, contrasted the audio of the demon cat roar at the same time
  • Episode 68, (""Shippo Receives an Angry Challenge"; 七宝へ怒りの挑戦状) has a cute-looking mini-dragon demon named Koryu...plus more kid drawings by Shippo and Soten.
  • Episode 106 ("Kagome, Miroku, and Sango: A Desperate Situation"; かごめ、弥勒、珊瑚、絶体絶命) shows Shippo's full bag of tricks around the 13:16 mark
  • Episode 130 ("Shippo's New Technique, The Heart Scar!"; 吠えろ七宝奥義 心の傷!) with the young fox demons, was cute
  • Episode 3 of The Final Act ("Meido Zangetsuha"; 冥道残月破), where Shippo advances in rank by pulling tricks on Inuyasha, also was cute
  • We noticed a steady improvement in the production quality as the seasons progressed
  • Hachi, the Tanuki demon, transforms into a floating bus...one of our favorite characters, even though he seems to show a general character flaw 
  • Buyo the family cat seemed really nice...Inuyasha seemed to really like playing with him
  • In the final episode, Inuyasha dumps the twins on Shippo, saying, "Slay the fox"
  • It was weird watching Sesshomaru in the second ending credits in such a melancholy attitude, after watching him as a pseudo-antagonist
  • Ugh, English dub...thankfully, we watched all as English sub...they even say the names of the characters wrong x_x "Kuh-GO-mey" instead of "KAH-go-mey", "Nah-RAH-koo" instead of "NAH-rah-koo" , "Seh-SHO-mah-roo" instead of "SESH-oh-mah-roo"
  • A lot of beautifully-done incidental artwork and audio ... pictures of feudal Japan life, such as cooking, vendors, dress, mountains, shrines, statuary, buildings
  • I think Kagome's mom comes across wonderfully understanding and supportive...almost to the point of incredulity...I suspect she harbors secret superpowers. ; o )
  • Totsai's three-eyed cow seems like a really inventive addition
  • Sexual advances of Miroku really awkward and struck me as not aging well...
  • Favorite song: "Come" by Namie Amuro. (audio)
  • Banzai! Banzai! Banzai! : o )

Tuesday, November 20, 2012

Teeth

Cannot stop looking at them in the mirror after getting them cleaned...so white and perfect. : o )


Adam Savage on learning

Via:

  1. I don’t know how
  2. I can’t afford to pay someone else to do it
  3. I have to do it
  4. hey, that wasn’t so hard!
I have experienced this many times this Fall...heater core, carpets, EGR, and HVAC unit.

It helps to see things as systems, as Adam says.

Thursday, November 01, 2012

Graduate studies applications - computer engineering

Georgia Tech
ECE graduate admissions: http://www.ece.gatech.edu/academics/graduate/apply.html
Online application: http://www.gradadmiss.gatech.edu/apply/apply_now.php
Deadline for Fall: December 1
Letters of recommendation: three (online)
Offers: Starting in late January for U.S. citizens with the vast majority completed by late March for fall semester.

University of Minnesota - Twin Cities
ECE graduate admissions: http://www.ece.umn.edu/ProspectiveStudentsGraduate/index.htm#phd
Online application: https://app.applyyourself.com/AYApplicantLogin/ApplicantConnectLogin.asp?id=UMN-GRAD
Deadline for Fall 2013: December 1
GRE: no minimum
GPA: ?
Letters of recommendation: three (online)

University of California - Berkeley
EECS graduate admissions: http://www.eecs.berkeley.edu/Gradadm/
Online application: http://grad.berkeley.edu/admissions/index.shtml
Deadline for Fall 2013: December 13
GPA: 3.0 minimum
Letters of recommendation: three (online)
Offers: All of our decisions will be sent by e-mail by April 1st.

Carnegie Mellon
ECE graduate admissions: http://www.ece.cmu.edu/programs-admissions/admissions/index.html
Online application: https://www.ece.cmu.edu/prospective/graduate/application/
Deadline for Fall 2013: December 15
Letters of recommendation: three (online)

MIT
EECS graduate admissions: http://www.eecs.mit.edu/academics-admissions/graduate-program/admissions
Online application: https://apply.eecs.mit.edu/apply/login/?next=/
Deadline for Fall 2013: December 15
Letters of recommendation: three (online)Offers: mid-February
GPA: ?
GRE: no minimum

University of Texas - Austin
ECE graduate admissions: http://www.ece.utexas.edu/graduate/admissions.cfm
Online application: http://www.engr.utexas.edu/graduate/admission/apply
Deadline for Fall 2013: December 15
Letters of recommendation: three (online)

University of Wisconsin - Madison
ECE graduate admissions: http://www.engr.wisc.edu/ece/ece-future-graduates-main.html
Online application: https://www.gradsch.wisc.edu/eapp/eapp.pl
Deadline for Fall 2013: December 15
Letters of recommendation: three (online)
GRE: no stated minimum; admitted had 154 (verbal) and 163 (quantitative)
Offers: about two to three months after we receive a completed application.

University of California - Santa Barbara
CE graduate admissions: http://www.ece.ucsb.edu/academics/grad/
Online application: http://www.graddiv.ucsb.edu/eapp/
Deadline for Fall 2013: December 17 (priority); January 15 (admission only)
GPA: 3.0 minimum
GRE: no minimum
Pre-application: No

Stanford
EE graduate admissions: http://ee.stanford.edu/admissions
Online application: http://studentaffairs.stanford.edu/gradadmissions/applying/start
Deadline for Fall 2013: December 18
Offers: by the second week of March
GRE: no minimum
GPA: no minimum
Letters of recommendation: three (online)

University of California - San Diego
ECE graduate admissions: http://www.ece.ucsd.edu/grad_overview
Online application: https://gradapply.ucsd.edu/
Deadline for Fall 2013: January 7
Letters of recommendation: three (online)
GPA: 3.0 minimum
GRE: no minimum
Offers: (First round) January/February; (Second round) March/April

University of California - Davis
CE graduate admissions: http://www.ece.ucdavis.edu/research/compeng.html
Online application: http://www.gradstudies.ucdavis.edu/prospective/applicationlanding.html
Deadline for Fall 2013: January 15 (priority); April 15 (admission only)
Letters of recommendation: three (online)Offers: between March and May
GPA: 3.5 minimum
GRE minimum: 163 (verbal); 155 (quantitative)

Graduate admissions financial support

Via


Financial Support
Highly competitive fellowships and teaching and research assistantships are available through the
Highly competitive fellowships and teaching and research assistantships are available through the
Department of Electrical and Computer Engineering. Offers are generally for the academic year and
in some instances include summer support.  Priority for support is given to PhD applicants.

Your application file is also available to faculty members for consideration for Research Assistant
positions.  Faculty will contact applicants directly with questions and information about their research
group.

We also encourage applicants to apply for external fellowships.
Below are links to some programs that provide fellowships:
AT&T Labs Summer Internship Program 
Department of Energy Computational Science Graduate Fellowships 
Fannie and John Hertz Foundation Fellowships 
Ford Foundation Fellowship Program
GEM Fellowship Program (open to underrepresented groups (African Americans, American Indians, and Hispanic Americans)
The Integrative Graduate Education and Research Traineeship (IGERT) Fellowship 
National Science Foundation (NSF) Graduate Research Fellowship Program 
National Defense Science and Engineering Graduate (NDSEG) Fellowships 
National Physical Science Consortium Fellowships 
The Paul and Daisy Soros Fellowships for New Americans 
Semiconductor Research Corporation (SRC) Fellowship 
Symantec Graduate Fellowship Program 
U.S. Department of Homeland Security Fellowships

Other Funding Opportunities (list provided by the Graduate School) 

Sunday, October 28, 2012

Cleaning car carpets



"Only stumper I had was that the carpet goes around the dash mounts under the console.
Since you will be pulling the dash for the heater core, this should be no problem.
I just made a cut and slide the carpet around the mount. I was going to put some tape under it but it layed flat and was no problem." (via)

---

"Not getting it TOO wet, just scrubbed my carpet with bucket after bucket of dish soap and water. (lots and lots and lots and lots and lots of rags) Also used an industrial strength degreaser, keeping it off the metal floor underneath. Wear gloves by the way. You don't want any of these chemicals, grease on your hands." (via)

---


"Pull the seats and carpet after work the day before and soak with Simple green and water (I use it because it works and I don't get 3 days of industrial cleaner smell when done).

Fix a bite to eat, load the seats and carpet into the Ranger and hit the car wash.

Hang the drivers side down off the tailgate and blast till happy...then the passenger side.
Turn it upside down and hang on the truck bed side.

Lay the seats back and stand them on the sliders with the headrest up...again, blast till happy. back seats, just blast till happy.

Take home and lay in a breeze or wherever some nimrod won't mess with them and let them drain. The foam and fabric really don't hold water well so drain is more appropriate than dry. " (via)

---

"I like Simple Green to clean the interior. I don't leave it on the dash or vinyl, I get dry and follow with protectant. It works well on the fabric. If it is a greasy spot on carpet or fabric, I have used brake clean, it dries fast and removes darn near anything, even pen. Never got it on vinyl, I would get it would discolor it at least." (via)

---

"I used Meguiar's Carpet and Upholstery Cleaner #D10219 on the carpet and fabric. You just spray the foam on and wipe at it with a towel. One warning....use a white towel. That stuff worked wonders. I cleaned alot of the carpet in the car this way until I decided to strip the interior out and then I power washed the carpet with good results. You should have seen the brown water coming off it. My interior was not torn nor was there spills and stains, I just dont think the past owner ever cleaned it. So all the plastics had a sticky residue. All plastic parts I just used Simple Green and a scrub brush and rinsed with water. Carpet doesnt look new but much better than it did." (via)

---

"To get carpet out, you will have to remove the front seats, the rear seat bottom(two push clips one on either side), the center console(6 phillips screws), front seat belt pretensioners, and the kick and sill panels(clipped in place). If you wanted black carpet, other have put the carpet from a MX3 in their scorts, dying is always an option. I have one, just waiting for right time to install." (via)

---

"I like to use brake cleaner and Simple Green degreaser to get stuff out of the carpet. Unsure of color-fastness on the blue carpet, but had no issues with the gray carpet, so test cleaners in a inconspicuous spot. If removed, it will be easier to clean, could even pressure wash it. The padding may get compromised, could always remove it fully and install fresh pieces. It would be a good time to spray down some "lizard skin" or other sound deadening substance or material. It's dirty, but looks pretty clean overall." (via & via)

---

Needs: 
Metric socket set, screwdrivers 
SIMPLE GREEN cleaner (I used about a half gallon of it, buy it buy the gallon & buy a spray bottle) $10 
Aerosol vinyl & carpet paint/dye (I used 1.5 cans of Duplicolor) $5/can 
(color of your choice, I got some tan that matched my factory carpet fairly well) 
1. Remove seats, front & rear 
2. Remove console & door jamb trim 
3. Unscrew seat belts from front (torx bits needed here) 
4. Cut center portion by console (stock carpet runs under dash & would require removal of center dash section...not worth it, just cut the edges loose) 
5. Remove carpet all in one piece (fold it up before removing and all the loose crap will come with it), dump crap out & shake out any loose bits. 
I chose to remove the foam padding & cut new ones from extra padding I had. You can clean them in place, or peel it off & clean it separately. 

6. Soak carpet with a hose for a while 
7. Drain off excess water, SOAK everything in SIMPLE GREEN (this is the key) 
8. Get a stiff nylon scrub brush and scrub until you start to see the original color...then scrub some more. 
9. Rinse off with the hose for a while. Be sure to get all the cleaner out so it's not sticky. 
10. Find somewhere to hang the carpet & leave it out in the sun. I setup a folding ladder in the driveway & just draped the whole thing over it. Took a few hours to dry reasonably. 
11. Be sure it's dry; mine was still a little wet in spots & it worked fine anyways. It was 90+ degrees out tho, so it was drying really quick. 
12. Shake up your paint & get to work. I sprayed the entire thing in two full coats. Any bad spots I soaked with it. It helps if you take your nylon scrub brush between coats & fluff up the pile a bit. 
Now reverse the assembly steps in the car to get the carpet back in. 
I've had it on there a full week (I've driven almost 1k miles this week mind you), and it's shown zero signs of wear, seems to be very durable, and completely soaked into the fiber. I even painted the heel pad, and it has no wear at all, seems to have completely soaked in/dyed it. 
I got the idea originally from a guy who worked at a detail shop & told me it was his 'little secret'  
It's definitely a bit stiffer at first. If you take a wire brush & go over it a few times, it loosens up. I soaked it quite a bit, though. I'm sure if you were just spot fixing it it wouldn't be as much.

---

"I found a can of multi-purpose foam cleaner called Tuff Stuff. It works really good. My floors look like new and so do my seats. All you need is a scrub brush and Tuff Stuff and you can get your floors and seats to look like new again." (via)

---

"soaking it in the bathtub in simple green. (It was nasty to begin with) Carpet is looking good but underneath the carpet on the floor was some painted "tar paper" looking stuff...the "tar paper" stuff and also the rubber thing on the firewall are merely sound deadening material to reduce road noise. you can just rip them out and not replace them, or replace them with some sort of aftermarket sound deadening like dynamat or similar. personally i'd just rip it out... its not like escorts are real quiet luxury cars anyway lol" (via)

---

"I love Dynamat for what it does but hate the price. I would feel I got a better deal with one night in jail as a boy toy rather then buying a 100 ft roll of this black gold at the local sound shop. I seriously looked into who made dynamat and who thought of it. (where did it come from before it was sound proofing for cars).



End result, is the composite of Stormseal for roofing is pretty much the same stuff. Difference is the Stormseal is not as thick (in some spots you should double the sheets) and it's not as pretty. But how many people will see the dynamat? The Stormseal was about $35 for 100 ft. At that price slap on as much as you like. I used one full role. (NO problem with it going on as long as you do this on a warm summer day and it will stays on, Its been 6 months and its cold here, no problems at all). If use this stuff do not put it on an area unless it is clean. Make sure to push it on good, the same rules apply as if you are using Dynamat. (Hot day, may need to lay the glue side up in the sun for alittle bit, etc.)" (via)

Saturday, October 20, 2012

Stern Grove Festival - I gave at the grove - 75 years


Dawn and I attended a July 8 performance of the San Francisco Symphony at the Stern Grove Festival this year, the Festival's 75th anniversary.

Donors received the above sticker, which reads, "Stern Grove Festival - I Gave at the Grove - 75 Years."

Sunday, October 14, 2012

Car maintenance

Some upcoming items:

  • Plastic, black washers for under hood liner
  • Liquid silicone spray for (otherwise known as "belt dressing") With a rag, spray and wipe down all rubber seals with the lubricant. Best done annually. (before they dry out) (via)
  • Clean carpets
    • Vacuum 
    • Wash
  • Purchase dash cover (for example)
  • Radio removal tool (dealership?)
  • Radiator grille locking clips
  • Wiper arms need touch-up paint
  • Clean engine bay
  • Clean headlamps

Saturday, October 13, 2012

P1405: DPF EGR Sensor Upstream Hose Off or Plugged"

Our car threw code P1405 last night: "DPF EGR Sensor Upstream Hose Off or Plugged".

  • DPFE represents an initialism for "Differential Pressure Feedback of EGR." 
  • EGR represents an initialism for "Exhaust Gas Recirculation."
  • EVR represents an initialism for "Electronic Vacuum Regulator"
  • Possibilities:
    • "Most than likely the port behind the intake manifold is clogged" (via)
    • Although, "Usually plugged supply hoses generate P0401 codes" (via)
    • Upstream hose for DPFA sensor had just popped off (via)
  • All hoses seem connected OK
  • The mounting bolts for the DPFE seem to have sheared off, though, which might cause the tubes to compress?
  • So, need to replace the foam and bolts for the DPFE sensor
  • May as well pull the EVR and EGR valve at the same time
  • Check the port behind the intake manifold as well when replacing
  • Went to a local auto junkyard and pulled a DPFE sensor and an EVR.
  • Tried to remove the mounting but could not get enough torque to remove the final 10mm nut...a 10mm deep socket might have worked
At home, installed the salvaged DPFE sensor and EVR. Re-attached the battery cable. So far, no check engine light...which may indicate a bad EVR? Or I just have not driven it enough, yet.

I succeeded only in taking the broken bolts out of the DPFE mounting...I could not remove the DPFE bolts from the DPFE sensor itself. So I ended up using the salvaged DPFE sensor.

Got everything back together again.

Also:
  • Installed salvaged windshield wiper fluid reservoir cap 
  • Installed salvaged battery cable clamps and positive battery cover
  • Installed salvaged steering wheel plastic bolt cover
  • Installed new blower motor resistor
  • Found a leaf on the resistor, which might explain why it had problems?
  • Installed a new blower motor connector 
    • Snipped old connetor off
    • Stripped wires and re-soldered wires onto salvaged connector
    • Taped with electrical tape
  • Accidentally dropped the old positive battery cable clamp down into the area near the driver-side wheel well...oh well x_x
  • Cleaned the rear hatch area above and around the weatherstripping of dirt and debris
  • Cleaned the engine compartment area near the windshield of dirt and debris
  • Washed and cleaned the front, driver-side, and passenger windows
  • Messed around a bit with the HVAC control arms which operate the baffles within the heater box

Wednesday, October 10, 2012

The Call of Cthulu

Reading H.P. Lovecraft's The Call of Cthulu.

MiddleInitial + NULL is NULL

I thought this represented a clever way to add an extra space to the end of a possibly NULL middle initial:

ISNULL(MiddleInitial + ' ', '')

If MiddleInitial is NULL, then any attempt to concatenate will also result in NULL, which will then trigger no space consumed.

If MiddleInitial is not NULL, then you get the middle initial plus an extra space.

Via: http://stackoverflow.com/questions/2699833/combine-first-middle-initial-last-name-and-suffix-in-t-sql-no-extra-spaces

Voter guide

President and Vice President: Roseanne Barr, Cindy Sheehan, Peace & Freedom Party...not a big fan of either of them, personally, but the party seems to resonate most with my values

United States Senator: none...just not a Feinstein fan

United States Representative, Congressional District 7: Ami Bera

Member of the State Assembly, Assembly District 8: Ken Cooley

San Juan Unified School District Governing Board Member:
  • Pam Costa
  • Mike McKibbin
  • Lucinda E. Luttgen
San Juan Unified School District Measure N: Yes

California State Propositions

Prop 30: Yes
Prop 31: No
Prop 32: No
Prop 33: No
Prop 34: Yes
Prop 35: No
Prop 36: Yes
Prop 37: Yes
Prop 38: Yes
Prop 39: Yes
Prop 40: Yes

Saturday, October 06, 2012

Heater core repair, day 9

I completed the job today. : o )

Work log

  • Visited a local auto dismantler and pulled the following parts:
    • Upper steering column shroud
    • Lower steering column shroud
    • Multi-function switch with clock spring and wiring harnesses
    • New center console insert which goes around the emergency brake handle
    • Steering wheel
    • Various bolts and screws
    • Instrument cluster dimmer switch (just in case)
    • Air box lock-down latches
    • Fuses
    • Total cost: ~$90
  • I looked for a nice looking driver-side sun visor but did not find any
  • Almost all center console inserts seemed cracked and broken
  • At home, popped the steering wheel, removed the multi-function switch and clock spring
  • Removed the plastic wiring harness supports from the metal tabs
  • Noticed one steering column support bolt had squashed the wiring harness for connector C269 x_x
  • Freed the squashed wiring harness 
  • Inspected the wires: found the green and red wires completely squashed; the ground wire looked OK
  • Re-installed the multi-function switch and clock spring
  • Re-taped the wiring harnesses to the plastic wiring harness supports
  • Re-installed the plastic wiring harness supports
  • Re-installed the steering wheel
  • Re-installed the upper and lower steering column shrouds and the ignition key light
  • Re-installed the air bag onto the steering wheel
  • Re-installed the dash panel under the steering column
  • Removed and re-installed the center console insert which goes around the emergency brake handle
  • Zip-tied the speedometer cable to the battery cage...hopefully this will minimize the fluctuating of the needle on the speedometer
  • Zip-tied the under-hood light to the hood
  • Grounded loose wire to a grounding point under the dash
  • Washed and cleaned a few random parts
  • Tested everything works: instrument cluster panel illumination, headlamp switches, rear lamps and brakes, fog lights, radio
Post-work beer: Eel River California Blonde Ale

Sunday, September 30, 2012

Heater core repair, day 8

Work log

  • Drilled out two new holes in the steering wheel aluminum using a rechargeable DeWalt drill
  • THIS TOOK SEVERAL HOURS x_x
  • Had to wait one or two times for rechargeable batteries to recharge
  • In retrospect, seems easier to drill out and re-tap puller holes...but did not have parts available to do so
  • Put in the hook puller bolts
  • Successfully pulled the steering wheel...this took a lot of oomph...finally popped off! : o )
  • Paused to celebrate moment of triumph
  • Taped the clock spring
  • Removed the clock spring and let it hang
  • Tested the resistance between connector C269 and the main light switch
  • Did not really find anything conclusive
  • Cut existing wire #7 between connector and close to main light switch
  • Spliced-in new wire from C269 pin #7 to the main light switch red wire to bypass the existing wire
  • Headlamps do not come on when battery cable re-attached : o P
  • Not sure how to interpret this result
  • Replaced everything but the air bag
  • Washed car exterior
  • Shook out car mats
  • Replaced air filter
  • Pulled the fuse for the headlamps under the car hood...that seems like a reasonable fix until I can identify whether the multi-function switch represents the problem
  • As a side note, the radio display seems OK, now
Next steps
  • Pick-n-Pull sells part "Switch Headlight/Wiper" for $13
  • They also seem to sell part "Steering Wheel" for $16
  • Figure out what steering wheels work on our car
  • Miscellaneous Parts needed:
    • A few non-stripped dash bolts
    • Rear center console
  • Pull the part(s) after work someday in the near future
  • Tools needed:
    • Steering wheel puller
    • Socket set (side bolts x 2)
    • 15mm wrench (steering wheel bolt x 1)
    • Box cutter (cut zip ties)
    • Phillips-head screwdriver (remove clock-spring, upper & lower shroud)
  • Bring in car to mechanic and ask for coolant flush before re-attaching hoses to heater core
  • Ask for advice on the headlamp wiring 
  • Ask where the unattached vacuum hose goes
  • Zip-tie the speedometer cable to the battery cage

Saturday, September 29, 2012

Heater core repair, day 7

Work log
  • Replaced the headlamp relay with a new part from a local auto parts store. 
  • Headlamps still stay on.
  • Purchased a steering wheel remover.
  • Stripped the puller bolt holes while attempting to get the steering wheel off x_x
    • Per the puller instructions, I put a small cylinder over the bolt hole, then put the middle bolt into the small cylinder
    • I should have put the bolt into the hole, then put the small cylinder on top of that
    • Options:
      • Drill out and retap the puller bolt holes
      • Replace the steering wheel
      • Tack weld a puller bolt and get the steering wheel off,
      • "here is the quick way to take one off... (i do it at work, instead of getting a puller).. unplug the connectors from the clockspring, take the main bolt out, that holds the steering wheel to the steering shaft. put the bolt back in about 3/4 of the way in... sit straight in the seat, plant your feet in the floorboard, and pull/wiggle the steering wheel back and forth up and down with some force ( dont go crazy, just real frim steady pressure) after a few seconds itll come loose, and the loose bolt will keep the wheel from flying off and hitting you in the face. then take the bolt back out and take the wheel off." (via)
  • Re-installed the glove box
  • Attempted to replace the air bag module
  • Restoring power sounds the horn x_x
Next steps
  • Drill out new holes
  • Try using just the bolts, ala this link.
  • Drill out the holes a bit bigger and use the hooked puller bolts

Friday, September 28, 2012

Heater core repair, days 4-6

Work log - Wednesday
Work log - Thursday
  • Continued reviewing the Electrical & Vacuum Troubleshooting Manual.
  • Performed a few basic tests in an attempt to narrow down the location of the issue:
    • Disconnecting the headlamp 30A fuse : no headlamp 
    • Disconnecting the headlamp relay : no headlamp
    • Disconnecting connector C269 : no headlamp
  • Labeled a few connectors and wires with a Sharpie permanent marker to keep things straight
  • Connector C269, on the steering column, represents the last connector before the multi-function switch (that is, the steering column switch you use to select off/parking lights/head lights). 
    • One C269 wire goes to the parking lamp relay and another wire goes to the headlamp relay
    • Depending on the position of the multi-function switch, current either does or does not flow through the relays, which in turn control the flow of current to the respective lamps. 
  • If I have connector C269 connected, I can use the high/low switch to get low/high beams just fine. So that switch seems OK. 
  • The hi/lo switch should get power downstream from the headlamp relay, after the Off/Parkinglamps/Headlamps switch activates it. 
  • However, in this case, it does not seem to matter what position I turn the Off/Parkinglamps/Headlamps switch to--the relay powers the headlamps. 
Work log - Friday
  • Continued reviewing the Electrical & Vacuum Troubleshooting Manual.
  • I would suspect the headlamp relay itself was stuck in the closed position, except for a few facts:
    • The headlamps turn off when I remove connector C269
    • If the headlamp relay was stuck, it should not matter, and it would still deliver power to the headlamps, if I am thinking correctly. 
  • I have shifted my working theory to a ground short in the red wire #7 from the multi-function switch (a.k.a. main light switch) to pin #7 in connector C269 (male side).
    • That represents the wire which current flows through to activate the relay. 
    • A ground short in that wire would seem to allow current to flow through one side of the relay, which would trip the other side of the relay and allow current to flow through to the headlamps. 
    • And a ground short would seem to ignore the setting of the multi-function switch. 
  • Replacing this wire seems to imply removing the steering wheel to get at the multi-function switch
Next steps
  • I will need to borrow a steering wheel puller from a local parts store
  • It turns out Section 17 of the Helm 1996 Escort/Tracer Shop Manual contains pinpoint tests:
    • 17-01-11, Pinpoint Test B: Headlamps on Continuously
    • 17-01-12, Headlamp switch wire resistance table
  • The pinpoint tests largely seem to confirm I am on the right track with my current working theory


Wednesday, September 26, 2012

Heater core repair, day three

Finished the bulk of putting everything back together. Remaining: glove box, left bottom panel, kick plates.

And my lights will not turn off....

Work log
  • Worked from 6:00-11:30 p.m.
  • Able to work after sunset after I remembered my Petzl headlamp x_x Doh.
  • I decided to detach the dash once more to double-check I had not missed a connector on the passenger side
  • Turns out I had, so I am glad I did
  • Re-attached dash and secured with four bolts to the tunnel
  • Re-attached blower motor connector--have to remember to troubleshoot due to corroded lead
  • Re-attached center console
    • Had a lot of trouble re-attaching the cigarette lighter connectors
    • Shorter wires, which meant I had to hold the center console with one hand and reconnect with the other
    • Decided to re-attach the HVAC control cables later
    • Took quite a bit of trial and error to figure out how to route the HVAC control cables, but finally figured it out: the left side has a cable channel and the right side just goes over the heater box tube
  • Vacuum connectors took a bit of looking at before realizing it does not matter what way they go on (I think)
  • Re-attached the instrument cluster
    • Had to really yank on the speedometer cable to get it back through the firewall 
    • Then I had pulled it too far, not leaving me enough room to re-attach to the instrument cluster
    • Finally got it just right
    • Then realized I could pull the speedometer cable from the engine compartment and simultaneously pull the instrument cluster into place : o )
  • Re-attached the cluster bezel
  • At this point, realized I had forgotten to re-attach a little metal plate on the right side of the cluster bezel and the left side of the center console
  • Detached the bezel, added the plate, re-attached the bezel
  • At this point I felt a shock: the rear of the steering column had detached from the mount plate
    • Taking the advice of a FEOA post on a possible shortcut, I had removed the steering column support bracket
    • This allowed the steering column to drop freely all the way to the floor
    • Unfortunately, in my moving the steering column back and forth during repairs, I ended up detaching the steering column from the mount bracket x_x
    • I felt a bit of relief after realizing I had not sheared off any metal bits
    • I had bent one of the brackets, however...eventually I bent it back into shape with a pair of pliers
    • I CANNOT TELL YOU HOW MUCH TIME I SPENT ON THIS
    • Each of the two brackets has a clip
    • The steering column weighs a bit
    • It swings awkwardly due to weight and cables
    • The clips love to detach when attempting to put the brackets onto the mount plate
    • The clips love to detach when tightening the 10mm nuts
    • The brackets love to shift when tightening the 10mm nuts
    • The brackets love to come loose after tightening one side
    • I tried re-attaching from outside the car with a 10mm wrench
    • Then I tried re-attaching while attempting to hold up the steering wheel with one hand
    • Then I tried re-attaching the support bracket
    • After this, I got on my back and stuck my head under the dash
    • I FINALLY figured out a way to tighten the bracket/clips to my satisfaction
      • Screw two steering column support bolts loosely into the dash
      • Get the clips onto the brackets
      • Swing the brackets into place
      • Tighten with a 10mm socket with an extension
    • I think this represents the solution anyway...I kid you not this took me 90 minutes to resolve x_x
  • Re-attached the clutch pedal chain I had detached while messing with the steering column
  • After this point, I re-attached the steering column shroud, the middle and rear console, re-attached the front seat
  • I re-attached the HVAC control cables--will test out when I drive the car
  • Re-attached the negative battery cable
  • Noticed my head lamps come on! : o (
    • Does not matter what position the light switch is on...they still are on
    • Turning the light switch does turn on/off the running lamps
    • Fog lamps go on/off OK
  • Started the engine: success
  • Stripped some wire and twisted together the wires I had cut, then wrapped with electrical tape
  • Head lamps still light up when the negative battery cable applied
  • Noticed some loose tubes under the hood
  • Figured out two of them but not a third one, a vacuum hose...cannot see where it goes, and it seems pretty long : o P
  • Cleaned up
Next steps
  • Figure out why head lamps stay on all the time
    • Probably a limited number of things which I could have messed up
    • It seems like the head lamps get power without considering the steering column control
    • I guess I may have to bust out the electrical guide to refresh my memory on what I did when I wired the fog wiring
  • Figure out where missing vacuum tube goes
  • Likely something to do with the wires I cut...but maybe something else?
  • Replace glove box
  • Replace kick panels
  • Replace lower driver side panel
  • Replace side sail panels
  • Clean 

Monday, September 24, 2012

Heater core repair, day two


Began the process of putting everything back today.

Work log

  • Worked from ~6:00-7:15 p.m., at which point I called it a night on account of darkness (shaded driveway means cooler but gets dark faster).
  • Took some time to properly re-route the wiring for the fog lamp to the fog lamp switch...will have to re-solder another wire, but worth it, for me, to do it in a cleaner fashion
  • Looked inside the A/C Evaporator Core Case (#19850) at the evaporator core, which looks similar to the fins of the heater core : o ) Want to read more about this and learn how it works.
  • Looked inside the heater box (HVAC Heater Assembly, #18478) and played with the controls to watch how the various pieces work together to route air
    • The hot-cold control seems to simply move a cover up or down over the heater core, which allows more/less hot air into the cabin
    • The control on the other side has several different positions, each of which lift/close various flaps within the heater box : o )
    • Getting interested in the engineering behind all the various parts really represents the most time-consuming part of the process, for me ; o )
  • Re-installed the heater box, almost forgetting to re-attach the Heater Core to Dash Panel Seal (#18529), which I had left on the passenger mat : o P
  • Re-attached the HVAC Outlet Duct Extension Center (#18C505) after rinsing out coolant residue and drying
  • Re-attached the left and right Windshield Defroster Nozzle Connectors (#18A435) to the heater box
  • Dusted off a lot of the interior pieces with a shop towel
  • Re-installed the dash into the cabin 
  • Re-attached the blue cable and companion electrical connectors to the dash
  • Bolted on the two driver/passenger bolts and the three under-windshield bolts.
  • Made sure to re-attach the dash to the left and right Windshield Defroster Nozzles (#18490)
  • Made sure to route the instrument cluster electrical connectors and the speedometer cable through the proper holes in the dash
  • Managed to get everything back on without cracking the dash any further....
  • Feeling paranoid I am missing something, or I will miss a connector, or forget to route it properly and have to retrace my steps...I think that probably seems normal though, the first time. Next time (next time!?) I will probably feel more confident and miss something due to lack of attention ; o )
  • Almost forgot: I noticed my rear-center console, which covers the emergency brake, broke a plastic piece inside of it. x_x
  • At the same time, I noticed an unused connector under the rear-center console which the emergency brake had sheared two of the wires in half : o P I wish I knew the purpose of the wires!
  • Noticed the air box next to the blower motor...I want to know more about that as well.
* all parts Motorcraft unless otherwise specified

Next steps
  • Bolt on the four 10mm "tunnel" bolts
  • Replace green connector to fuse box
  • Replace driver's side console kick plate
  • Replace blower motor electrical connector
  • Replace vacuum line behind glove box
  • Replace electrical connector to blue plastic box 
  • and so forth... 
Not sure I will finish it all on Tuesday night. 

Blog Archive