Tuesday, February 26, 2013

GE Oil and Gas has the best PR department.

What if I said that in Jan 2013 that there was a fluid leak from an oil well into the Gulf of Mexico? It is mentioned here, but it was much worse than advertised. There are some flawed bolts... and they are on everything.

All this, of course, knowing that the BP trial is upcoming. GE's PR department needs a raise.

Human's a batteries.

I find it interesting that you get things advertised as "revolutionary" when you need a good press release. In this case, FUJIFILM's Peltier film. Documented since 1834, and done with ceramic grids. I have seen a few human-powered MCUs that used this effect. I see the FUJIFILM technology as a progression.

Saturday, February 16, 2013

3 to 8 decoders, why are there 3 enable pins?

I still use that 7400 series. The 74138 , 54SN138, and every IC that has *138 in it is a 3-8 decoder that has 3 selection, 8 output, 2 power and 3 control pins. I do not understand is why there are 3 control pins. One is active low, and the others are active high. Why can I not get a 3-8 decoder that has one control line and is in a 14-pin package? Someone made a decision back in 1970, and I just want to know what it was that required 3 control pins. :/

Friday, February 15, 2013

usleep(1000) does not sleep.

I just discovered that usleep(1000) is not equal to msleep(1) on Mac OS. If you do a usleep(1000), it returns immediately without sleeping!

Saturday, February 9, 2013

Geolocation and finding a radius on a sphere.

A discussion came up today of why some location calculations where always off by 40% for geolocation.
Basically, we were converting it incorrectly; however, more interestingly is a page about geolocation and SQL. Things that developers often take for granted is the problem of database-side sorting.
Outside of Geolocation, "infinite scrolling" on web pages just makes me wonder how the SQL is handled. What if a record gets inserted between the scroll calls? How does one keep track. If you search online, there are many resources of how to scroll infinitely using jQuery and browser-side calls, but I'm sure there's one genius that has designed how the database handles the actual creation of the data.

Friday, February 8, 2013

The missing Javascript prototypes.

Javascript is missing some prototypes, and so is jQuery.
The following relate to strings, and are heavily inspired by Java methods. This is what I use to trim strings and clean strings of HTML entities.
String.prototype.othertrim = function() {
    return this.replace(/^\s+|\s+$/g, "");
};
String.prototype.endsWith = function(suffix) {
    return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
String.prototype.fulltrim=function(){
    return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' ');
};
String.prototype.replaceHtmlEntites = function() {
    var s = this;
    var translate_re = /&(nbsp|amp|quot|lt|gt);/g;
    var translate={"nbsp":" ","amp":"&","quot":"\"","lt":"<","gt":">"};
    return(s.replace(translate_re, function(match, entity) {
        return(translate[entity]);
    }) );
};
These are for jQuery. The first is a POST method that is similar to $.getJSON. The other tells you if a tag exists. You can then do a $('#tagcheck').exists(); and it will return 0 if the tag is not present.
$.postJSON = function (url, data, callback) {
   $.post(url, data, callback, "json");
};
jQuery.fn.exists = function(){return this.length>0;}

Thursday, February 7, 2013

MacOS 10.8 is terrible

Well, so much for improvements in software. This chat log pretty much sums up the state of MacOS these days.
Robert:  and i'm having a problem

me:  okay
what's not in the path? git?
do a "where git"

Robert:  when i try to download get
git - it says it cant open it bcause it is from an unidentified developer
note this is on my mac

me: ah?
I disabled that at some point.

Robert:  how do i disable that

me:  Security & Privacy in preference

Robert:  that did it
i just did the right click open thing
so much for not needing right click in mac
the only thing OS X 10.8 has going for it is that Windows ME and Vista were produced.
without those attrocities i would list it as worst OS upgrade ever.

Monday, February 4, 2013

Language unite disparate groups.

Language unites people.
This is why the Japanese forced the Tokyo dialect on everyone.
This is why the communist Chinese forced Mandarin on everyone. (even if Mandarin is not Han)
The American's force nothing upon anyone linguistically. I speak English, and I am fine in the USA as long as the person who wants to interact with me speaks English. I have found that I do not like black English, because it is expected that I understand it. I do not understand it, so I did some research into it. Formally, called African American Vernacular English, I strongly question the value of the study or use of this type of speech as a language unless it is also spoken concurrently with proper English. "Proper", of couse, is relative; however, my interactions with AAVE have been based around harassing the listener, and I do not feel that I need to accommodate those who chose to force something upon me. I would much rather try to hash it out with someone in Spanish.

Saturday, February 2, 2013

Space Shuttles

I very much like space, and the idea of space travel. All-in-all, the Americans have done very well. I have tried to watch all of the space launches and re-entries.

On the 10th anniversary of the Columbia breaking up, I remember watching it. I will never forget that night in 片町 because I convinced the bar master to turn the TV to the NASA feed instead of football, and then the whole bar watched it burn up. This was terrible, but substantially better than the only time that I got to see a launch live, ST-51-L.

The list of heros who risk it all and lose gets longer, but I want to thank:
"Gus" Grissom
Edward H. White
Roger B. Chaffee
Greg Jarvis
Christa McAuliffe
Ronald McNair
Ellison Onizuka
Judith Resnik
Michael J. Smith
Dick Scobee
Rick D. Husband
William C. McCool
Michael P. Anderson
Kalpana Chawla
David M. Brown
Laurel Clark
Ilan Ramon

...and all those who wish to touch the stars.