Saturday, August 18, 2012

JavaScript For Cats

http://jsforcats.com/

I'm pretty much posting this for the picture at the end.

Thursday, August 16, 2012

Hiding multiple results from the same domain in google search

A few months ago Google changed their search result behavior.  Before, it would display one or two results from a single domain, and then give a link for more.  After the change, it simply displayed all of them.  This was made much worse by setting your results per page above the default 10.  This was ridiculously annoying, to the point where I'm inclined to believe the conspiracy theories I read that Google did it to discourage people from setting the results higher than default and thus seeing less ads.  I simply can't believe that Google thinks this is a legitimate improvement.

At this point, I should point out that all this really only applied if you turned off that crazy automatic search thing, and set your results per page to something high.  I had pretty much assumed that everyone on Earth did this, but the fact that there wasn't a solution online after months tends to suggest that they don't.

I asked about this on stackexchange, but was surprised to get no solution.  Although the fact that the question got a few votes suggested that other people were annoyed by this as well.

So, I decided to learn some more javascript by making a greasemonkey script to fix the results.   I was almost deterred by the lack of formatting in the Google search results page, but a quick online formatter made it workable.  Then, I had to figure out more of that javascript dot notation that I hate.  All in all though, it went well.  I wrote a basic script and uploaded it to userscripts.

http://userscripts.org/scripts/show/141480

As of now, it just looks at each result and if it's the same as the previous result it hides it.  This means you will get less results displayed on a page than whatever you have it set to.  I wrote a second version that counts how many duplicate domains there are in a row and hides them if there are more than a set limit, but I kind of like the simplicity of the current version.  I will try to use it for a while and see what improvements I could make, as well as if anyone actually uses it.

How to (unsucessfully) reflow the solder on a motherboard

The HDD in my 7 year old laptop died recently.  Todd was nice enough to give me 2 old laptops he had laying around, one of which was much nicer than the one I had been using.  The catch was that neither of them worked.  I managed to salvage the HDD from the one, and put it in my laptop, which is now going strong for another 7 years.

The other laptop was a HP Pavilion dv6000.  When I turned it on the lights came on, but nothing else, no beeps or screen output, then it began to cycle endlessly.  It turns out this is a common problem with that model, due to faulty solders.  There had been much success online with people fixing this by heating the motherboard up hot enough to melt the solder and let it reflow.  As I had my other laptop working, and nothing to lose I decided to try it.

My first step was to disassemble the laptop gradually over a few days without following any guide or taking any pictures.  While taking it apart I kept noting how there was no way I would remember how to reassemble this thing, but I never let that distract me.  Once I had the motherboard removed, I had to remove everything that could possibly be removed.  Of particular importance were the motherboard battery and paper stickers.

Eventually, I had the bare board.  I decided to use my toaster oven as my regular oven is gas, and there seemed to be concern about airflow moving tiny components around while the solder was liquid.  I also read it was a good idea to cover most of the board in tin foil and only expose the parts you want to reflow.  I didn't do this, because there was no tin foil in the first place I looked.  One helpful tip I found online was to put a piece of solder on one of the exposed screw-in pads, and place that where you can watch it.  This serves as a useful temperature monitor.  I put a piece on each forward corner.

I placed it in the toaster oven and set it to toast at 400F.  It only took about 5 minutes for the one piece of solder to melt, however, the other piece remained solid for a minute longer.  I let it sit molten for about 5 minutes, and then shut it off.  Right after I shut it off I heard a lot of crackling sounds.  I suspect this might have been due to the board cooling very fast in the toaster oven, as opposed to a real oven that would have cooled much more gradually.

I let it sit for 30 minutes and then opened the door and let it sit for about 10 more.  I removed it and nothing seemed like it had burst into flames or exploded.  When I lifted the board up I noticed some solder on the pan, in a splatter like pattern.  I also noticed a tiny component that had fallen off.  I tried to match up where the part was and what part of the motherboard had been above it.  I spent about 5 minutes trying to find a spot it could have came from, but to no avail, not that there was any hope I was going to resolder this flea sized thing back on even if I did know where it came from.

Still, I figured it was possible that it would still work without it.  After all, the tinier something is the less important it is, right?

I reassembled the laptop only as far as I figured it would need to be to get any sort of screen output.  I put in the CPU and RAM and connected the power and power button connector.  I pluged it in and turned it on... and... it did the exact same thing as before.  I was somewhat surprised, with that missing part, but then again I guess if the solders were already bad then a missing part was pretty much the same thing.  I guess I should have flashed the bios instead.

I didn't really care, as I had already gotten my laptop working and spent days researching Linux and setting everything up.  But here are some protips for anyone else that may be trying this and actually wants to succeed:
  • I think I should have used the regular oven instead of the toaster oven.  Even with the gas, I don't think it would be a problem, and I think the fast cooling of the toaster oven was worse.  Also, the fact that the two test pieces of solder melted at different times told me that it wasn't a very even heating.

  • I probably should have wrapped the board in tin foil.  Perhaps this would have helped keep that other random part from falling off.

  • I definitely should have opened windows from the start.

  • There was red glue of some sort around the solders on the chipset.  Someone mentioned that you should carefully remove this.  That was probably good advice because it was charred black.

Wednesday, August 15, 2012

Mountain Dew let the internet name its new soda

http://hypervocal.com/news/2012/dub-the-dew-update-mountain-dew-lost-to-the-internet/
Top-voted names for the soda’s new green apple flavor were Hitler Did Nothing Wrong, Diabeetus, Gushing Granny and Fapple.

Thursday, August 9, 2012

With All The Suffering in the World, Why Invest in Science?

http://scienceblogs.com/startswithabang/2012/08/07/with-all-the-suffering-in-the-world-why-invest-in-science/
Before trying to describe in more detail how our space program is contributing to the solution of our earthly problems, I would like to relate briefly a supposedly true story, which may help support the argument. About 400 years ago, there lived a count in a small town in Germany. He was one of the benign counts, and he gave a large part of his income to the poor in his town. This was much appreciated, because poverty was abundant during medieval times, and there were epidemics of the plague which ravaged the country frequently. One day, the count met a strange man. He had a workbench and little laboratory in his house, and he labored hard during the daytime so that he could afford a few hours every evening to work in his laboratory. He ground small lenses from pieces of glass; he mounted the lenses in tubes, and he used these gadgets to look at very small objects. The count was particularly fascinated by the tiny creatures that could be observed with the strong magnification, and which he had never seen before. He invited the man to move with his laboratory to the castle, to become a member of the count’s household, and to devote henceforth all his time to the development and perfection of his optical gadgets as a special employee of the count.

The townspeople, however, became angry when they realized that the count was wasting his money, as they thought, on a stunt without purpose. “We are suffering from this plague” they said, “while he is paying that man for a useless hobby!” But the count remained firm. “I give you as much as I can afford,” he said, “but I will also support this man and his work, because I know that someday something will come out of it!”

Indeed, something very good came out of this work, and also out of similar work done by others at other places: the microscope. It is well known that the microscope has contributed more than any other invention to the progress of medicine, and that the elimination of the plague and many other contagious diseases from most parts of the world is largely a result of studies which the microscope made possible.

The count, by retaining some of his spending money for research and discovery, contributed far more to the relief of human suffering than he could have contributed by giving all he could possibly spare to his plague-ridden community.

Tuesday, August 7, 2012

Astronomy Wallpapers

I was looking for a new wallpaper.  I figured I'd pick something from the APOD, and downloaded a bunch that looked good.  Well I decided to just crop them all, and set up random wallpapers.

I uploaded them in case there was any interest.  There are about 100 all 1440 x 900 (16:10), which I realize is a somewhat uncommon resolution.  They are mostly galaxies and nebulae, but there is some stuff from the solar system too.

Gallery:
https://picasaweb.google.com/DaleSwanson/AstronomyWallpapers?authuser=0&feat=directlink

Download:
http://www.mediafire.com/?3zl3nk4cxxe2493 - 30 MB

Random samples:





Monday, August 6, 2012

An Unexpected Ass Kicking

http://joelrunyon.com/two3/an-unexpected-ass-kicking/

Javascript Color Picker

I made a quick javascript color picker.  There are about a bajillion of these already, but that has never stopped me before.

http://daleswanson.org/things/color.htm

Friday, August 3, 2012

Two Ridiculous Stories

http://www.bbc.co.uk/news/world-us-canada-19112837
A farmer in the US state of Vermont who was facing a minor drugs charge is now in more serious trouble after driving a tractor over seven police cars.
http://www.bbc.co.uk/news/entertainment-arts-19109309
Los Angeles police and rescue crews surrounded the fomer Hannah Montana star's house in Hollywood on Wednesday, while helicopters circled the property. But they soon discovered there was no one in the building. Police say the incident may have been part of a trend of prank calls, which has been dubbed "swatting".