Archive for the 'geek out' Category

Audi A3 Radiator Problems

July 08th, 2010 | Category: geek out

My 2006 Audi A3 has been leaking coolant for many months now. Usually it had been a slow leak, and I would need to top off the fluids about once a month. This is not standard – in most radiators the anti-freeze should stay level indefinitely.

My problem was that on long road trips, the coolant would disappear at a much higher rate. If I left from Boston at 10am, by the time I hit New Jersey around 3pm, the coolant indicator would be on and the coolant reservoir would be totally empty. This could be very dangerous and cause the engine to overheat, causing permanent damage and more importantly stranding me on the road. That would be a huge pain in the ass.

I’ve been reading around the interwebs and heard nightmare stories – A3′s apparently have a tendency to have leaky head gaskets and / or cracked cylinder heads. It is less than thrilling to have the engine of your 4-year old auto, just off warranty, dismantled and reassembled. The mechanic’s bill would make anyone cry. I was scared for my car.

Well, the resolution was a good one. This radiator was another casualty of I-93 and the shitty job the road crews did to clean up rock chips and asphalt while they resurfaced it last summer. While I worked at LogMeIn, I’d drive up 93, way too fast, on my way to work. For 2-3 months, the road was milled and shaved down, but not repaved. There was an unbelievable amount of debris on the road and my windshield was cracked in 3 places by flying rocks.

Turns out one of the flying rocks destroyed my radiator too.

The radiator. Obvious marks from dried / burnt coolant leaking for a long period of time. It was necessary to remove the radiator to see this damage. Two mechanics looked at it for estimates and couldn’t see the source of the leak.

Point of Impact. Probably a stone chip or bit of flying asphalt.

Wide open for easy access. The radiator is right behind the grille without any protection.

Another casualty of I-93 rocks. I’m going to need a new windshield soon.

No comments

Netflix Streaming Error 8156-6003, Silverlight Update

June 08th, 2010 | Category: geek out

I’m getting a streaming error “DRM Error” while trying to stream netflix. I watched an episode of Lost when I got home last night, soon after midnight, and it worked fine. What could be causing this error today?

Since everyone knows that Microsoft Silverlight is a piece of crap, it is the immediate culprit. I noticed that a Silverlight update was installed by Microsoft today or last night.

The Update number is KB982926 and it seems to have broken Netflix’s Streaming capabilities. It contained Silverlight Version 4.

FIX:
1. Go to Windows Update Settings and change it from “Automatically install updates” to “Download updates and ask me when to install” (otherwise silverlight will reinstall itself again)
2. Close your web browser
3. Go to Control Panel -> Uninstall a program -> Remove Silverlight
4. Go to netflix.com and start streaming a movie. It will prompt you to go to microsoft’s site and install Silverlight Version 3.
5. Restart your browser and it should work. Just worked for me on Windows 7.

I use ad revenue to pay for my hosting. So if you found my tip useful please …

1 comment

Concept Map in Processing Library

May 05th, 2010 | Category: geek out

This code makes a Concept Map with the Processing library / Java. Processing library makes it easy and quick to make graphical representations and animations, among its many features.

    /**
     * setup is called implicitly by the library when rdraw is called
     * it sets the size, drawing method, then in this case draws the graph
     */
    public void setup() {
      size(boxSize,boxSize);
      smooth();
      drawGraph();
     }
    /**
     * Draws the graph. req and neighbors must have been
     * previously set through the construtor or the setters
     */
    public void drawGraph()
    {     
        int halfBox= 150;
        //processing uses radians, not degrees
        float angle = 2*PI / neighbors.size();
        for(int i = 0; i < neighbors.size(); i++)
        {
            float cur_angle = i*angle;
            String s = neighbors.get(i);
   
            //calculate an even dispersal around the central objet
            //it depends on how many objects are in your list
            float xpos = halfBox*cos(cur_angle)+center;
            float ypos = halfBox*sin(cur_angle)+center;
       
            //color=black, draw a line to new item
            stroke(0);
            line(center,center, xpos,ypos);
            //put the item last, on top of the lines
            drawCircle(xpos, ypos, s);
        }
        //put the item last, on top of the lines
        drawCircle(center,center,result);
    }

    /**
     * draws a circle with specified text at (x,y)
     * @param x the x position of where the circle will go
     * @param y the y position of where the circle will go
     * @param word the word that will go in the middle of the circle
     */
    public void drawCircle(float x, float y, String word)
    {
        fill(255);
        ellipse(x,y,word.length()*10, 40);
        fill(0, 102, 153);
        textAlign(CENTER);
        text(word,x,y);
    }
/**
     * Makes a graph with req in the middle, surrounded
     * by neighbors n. calls the library's super, Papplet.main
     */
    public void rdraw(String req, ArrayList<String> n)
    {
        result = req;
        neighbors = n;
     
        PApplet.main(new String[] { "--bgcolor=#ECE9D8", "BrainH.client.ConceptMap" });
    }

Compete Source here [ConceptMap.java].

public class ConceptMap extends PApplet {

/**
*
*/
private static final long serialVersionUID = 690002409249816629L;
private int boxSize = 500;
private int center = boxSize / 2;
private static String result = “”;
private static ArrayList<String> neighbors = null;

public ConceptMap() {};
public ConceptMap(String req, ArrayList<String> n)
{
result = req;
neighbors = n;
}

/**
* setup is called implicitly by the library when rdraw is called
* it sets the size, drawing method, then in this case draws the graph
*/
public void setup() {
size(boxSize,boxSize);
smooth();
drawGraph();
}

public void setNeighbors(ArrayList<String> arg)
{
neighbors = arg;
}

public void setObject(String req)
{
result = req;
}

/**
* Draws the graph. req and neighbors must have been
* previously set through the construtor or the setters
*/
public void drawGraph()
{
int halfBox= 150;
//processing uses radians, not degrees
float angle = 2*PI / neighbors.size();
for(int i = 0; i < neighbors.size(); i++)
{
float cur_angle = i*angle;
String s = neighbors.get(i);

//calculate an even dispersal around the central objet
//it depends on how many objects are in your list
float xpos = halfBox*cos(cur_angle)+center;
float ypos = halfBox*sin(cur_angle)+center;

//color=black, draw a line to new item
stroke(0);
line(center,center, xpos,ypos);
//put the item last, on top of the lines
drawCircle(xpos, ypos, s);
}
//put the item last, on top of the lines
drawCircle(center,center,result);
}

/**
* draws a circle with specified text at (x,y)
* @param x the x position of where the circle will go
* @param y the y position of where the circle will go
* @param word the word that will go in the middle of the circle
*/
public void drawCircle(float x, float y, String word)
{
fill(255);
ellipse(x,y,word.length()*10, 40);
fill(0, 102, 153);
textAlign(CENTER);
text(word,x,y);
}

/**
* Makes a graph with req in the middle, surrounded
* by neighbors n. calls the library’s super, Papplet.main
*/
public void rdraw(String req, ArrayList<String> n)
{
result = req;
neighbors = n;

PApplet.main(new String[] { “–bgcolor=#ECE9D8″, “BrainH.client.ConceptMap” });
}
}

No comments

An Amazing feat of Engineering

April 09th, 2010 | Category: geek out

Who says geekiness can’t be cool? Even the biggest Luddite should appreciate this.

A Japanese company, Daishin, made this video to commemorate their 50th anniversary. Their milling machine spins on 5 axis. I can’t get over the way the platform and drill head move in synchrony in this video.

Machining Aluminum: How a large block of aluminum is “milled” or sculpted into a finely detailed part. Usually for a mechanical part. You wouldn’t machine a fork or tin can, but there is no other way to make a part for an aircraft or automobile engine.

1 comment

Installing Ruby and Rails 1.9.1 on Ubuntu 9.x

February 05th, 2010 | Category: geek out

One would think that installing Ruby & Rails on Ubuntu 9.X would be cake, right? WRONG. It is a lot of unexpected work and package additions. It no longer works “out of the box”.

Important Note: Install as many packages as you can before trying to run your Rails project. Once you type “ruby script/server” , the weaknesses of your configuration will be exposed, and who knows how the system will behave. Fill in the missing packages before this happens.

From the beginning

Your best bet for getting started is to use Synaptics Package Manager to install this package that supposedly contains everything you need:
ruby1.9.1-full
While you are at it, get the following dependencies that WILL come back to haunt you later:
rubygems1.9.1
libopenssl-ruby1.9.1
libruby1.9.1
sqlite3 (omit if you’re using MySQL)
libsqlite3-dev (omit if you’re using MySQL)

Accept all of the dependencies that Synaptics asks you for. More is better!

Symbolic Links

Do you want to type “ruby1.9.1″ each time? Nah i don’t think so. Make some symbolic links to help you out.

sudo ln -s /usr/bin/ruby1.9.1 /usr/bin/ruby
sudo ln -s /usr/bin/gem1.9.1 /usr/bin/gem
sudo ln -s /usr/bin/rake1.9.1 /usr/bin/rake

ln makes symbolic links. Check out the man page on it. You can delete the symbolic links when Ruby1.9.2 or whatever comes out.

Rails

Why doesn’t this come standard? Boggles my mind.

sudo gem install rails

Sqlite3

Status: 500 Internal Server Error
no such file to load -- sqlite3

Use Synaptics and install : libsqlite3-dev to get sqlite3.h header file

Then:

sudo gem install sqlite3-ruby

Scrapers

If you use hpricot or any kind of scraper, use Synaptics package manager to get:

libxml2
libxml2-dev
libxslt1-dev

sudo gem install hpricot
sudo gem install mechanize

Random Stuff

Problem: NameError (uninitialized constant ApplicationController)
Fix: sudo rake rails:update

Problem: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when "rated" : @movies = Movie.paginate(:al...
Fix: In Ruby 1.9, colons in a case statement are disallowed. Replace them with a "then" statement.

Turns out that the new rails renames app/controllers/application.rb to application_controller.rb. This cute rake task will take care of it for you.

sudo gem install hpricot


No comments

Can’t compile the example WordCount.java (Hadoop)

December 02nd, 2009 | Category: from the road,geek out,popular

http://mail-archives.apache.org/mod_mbox/hadoop-common-user/200907.mbox/%3Cd6d7c4410907201717t672e4caet3f369d7e4327ff7b@mail.gmail.com%3E

Seen this?

Rajat@rtde ~/java
$ javac -classpath /home/Rajat/hadoop-0.20.1/hadoop-0.20.1-core.jar -d
wordcount_classes WordCount.java

WordCount.java:5: package org.apache.hadoop.fs does not exist
import org.apache.hadoop.fs.Path;

WordCount.java:6: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.*;
^
WordCount.java:7: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.*;
^
WordCount.java:8: package org.apache.hadoop.mapred does not exist
import org.apache.hadoop.mapred.*;
^
WordCount.java:9: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.*;

And running CygWin on Windows? Tried everything for your classpath
huh? Try this:

$ javac -verbose -classpath C:\\cygwin\\home\\Rajat\\hadoop-0.20.1\\hadoop-0.20.1-core.jar -d wordcount_classes WordCount.java

(Change your cygwin path, obviously)

Use the -verbose flag to show the entire class search path.


No comments

Next Page »