Sunday, January 30, 2011

AutoHotKey and Pandora

AutoHotKey is a scripting software for Windows... Wait... I should say a KICK ASS scripting software that basically allows you to control the PC the way you wanted :). YEIH!! Thank you to the authors (Chris Mallett and the rest of the team).

Anyhow, if I didn't touch the PC, Pandora would stop playing songs after 2 songs or so. After trying to debug this issue for a while (maybe I'll go back to it some day), I simply wrote a short script that tricks Pandora on me being there. Basically something that moves the mouse every 10 seconds or so. It works great!

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;    Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

while 1=1
{
Mousemove 0,0
Sleep, 10000
Mousemove 600,600
Sleep, 10000
}

Everything is actually so easy!! I think I'll donate something to those guys right now! I just love that spirit...

Saturday, January 29, 2011

Electricity costs

Just minor thing I did to check how costs move over time:
Reliant:
May 2008: 15.2c/KWh. Oil price: ~$121/barrel     Gas price: $91      
June 2009: 18c/KWh     Oil price:  ~$61/barrel      Gas price: $3.4
Switch to Stream:
Oct 2009: 12.5c/KWh   Oil price:  ~$67/barrel      Gas price: $3.8
Dec 2010: 11.5c/KWh   Oil price: ~$87/barrel      Gas price: $3.3
Jan 2020: [UPDATE] 14.1c/KWh Oil price: $59/barrel    Gas price: $2.2

Notice:
  1. How Oil price and what I was paying on the same company had little to do with each other! In Reliant, price of oil went down by half while price of my electricity went up 20%. In Stream actually with oil prices rising, I pay less today than a year ago.
  2. The savings by switching company. Even with higher oil prices I got way cheaper price.
  3. The KWh prices were obtained directly from the bills value. The fix/government stuff was not included by even Reliants look a bit bigger than Stream's (both about $10)
  4. Oil price may not be that significant on this study, though, as 62% of Reliant's source was natural gas. The funny part is that Stream's plan is green, which is supposed to be more expensive!
Bottom line, stay on top of your bill... And to be honest I haven't shopped around to see what would be today's Reliant prices, to say one... Lazy, ha!

Sources:
Oil and gas prices: https://www.bloomberg.com/energy

Wednesday, January 26, 2011

Pre-assignment of Inventions - SOLUTIONS

This is a follow up post to the previous post on Issues of Assignment of Inventions (AOIs). My point there was that AOIs hurt the companies applying them as much as they hurt the employees. It is a lose-lose situation.

The question is if there is a better system than this? And as the company is the one imposing these today, a better question would be "Is there a system that benefits more the company than the current one?" Here is what I think would be a potential formula, based on 3 pillars:

1. Restrict the ideas protected to ideas related to current or past positions of the employee. I.e., with the most aggressive terms used today, if the employee works in a broad multinational company, in say, the medical department, but comes up with an idea about a bathroom product, the company has all the rights as long as bathroom products are part of the company interests. With my proposal, unless a clear link was established, the default is that it would have employee ownership.

2. Even when outside the case #1, employee has to grant to the company a free non-exclusive license to the idea, in exchange of being able to work on it while in the company. If the idea can bring benefits to the company, a program could be in place where the company offers help to the inventor in exchange of a share or even incorporates that as part of their products in exchange of a reward. That way, this becomes a win-win. Company getting ideas from their employees beyond the people working on those teams, while employees getting in exchange an easier path to commercialization than going solo.

3. If the idea outside case #1 is related to any of employer's customers, employee should quit to pursue it. Company lawyers admit that AOIs are there to protect company customers from getting sued by/competing with the company employees. For instance, imagine the case where an employee working for National Semiconductors sues Apple for an idea he had patented, and Apple was one of National Semiconductor's customers. This could hurt the employer business with that customer. I don't feel this is a strong legal, moral or ethical reason whatsoever for the AOIs used today, but still, a clause could be added that in such a case the employee should quit the company.

With what to me looks like 3 fair rules, besides the immediate rewards for the company described above, there would be two more positive side effects:
  1. Competitive advantage when comes to recruiting creative people. I.e., better talent.
  2. An ethical practice/culture always pays off, likely resulting on employees sharing even the very good ideas they got as long as they are related to the line of work they were or are involved with. Today, even those (which the company is actually paying for) are sometimes hidden as a retaliation practice.
Thoughts? Why this wouldn't work? Why it is not there today? Is it because "everybody" does it?

Sunday, January 23, 2011

Do the search engines look/index my posts?

I guess the answers in yes. That if somebody looks for information and my blog explains that, he/she will find it. Of course, doesn't have to appear at the top of the search if other places have the same explanations, but at least, is not simply ignored.

So, in order to prove, that I am going to create a dummy word, something that Google would return zero hits and I'll search for it later to see if it comes up. The word I came up (typing random :) ) was "ijlahwkt". So, there you go, my first fake post:
ijlahwkt is a random word created to check if Google indexes my pages. I post this here 1/23/2011 10:20AM CST.

GOOOOO!!! :)

PS.:  Notice that, furthermore, this blog is hosted by Google!!
And it should be indexed: http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=41957

UPDATE!!!! So, I've been checking these days and it didn't show up on Google search, till just today! 2/1/2011! So, that is about 9 days... :). And Yahoo engine doesn't show it yet, ouch! (although, remember that this blog is part of Google).

Tuesday, January 18, 2011

Speeding up your PC (Windows XP based)

Everybody complains about how the PC slows down over time. Here are some steps I recently discovered on how to speed it up (thanks to all the people that posted this info previously on the web, I just compiled it...). Basically, the idea is:
  1. Clean stupid stuff that is running in your computer without any need (eating away useful bandwidth from your processor)
  2. Clean up and sort the hard disk, so, that when Windows needs to access the drive, it can do it as fast as possible.
 #1 Remove programs that the processor is running unnecessarily

Press Windows key + R and type "msconfig"
You can see the list of Services and when they start (automatic/manual/disabled...). Also the list of programs to be loaded or not at Startup. Go through both a disable those not needed. After reboot, do CTRL+ALT+SUP and check that all those unwanted process are really dead.

Note1: A lot of these processes stay there for periodic actions (windows update, backup, iPassDirectory update...). It would not be bad to have a macro or something that runs them when I want, so, I have the updates but it is not running continuously. The same macro could run a lot of the stuff on this list (like defrag, disk cleaner, etc...)

Note2: Check out this tool: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx to analyze the processes on your machine...

#2 Clean up and sort your hard drive (make it easier to access)

Start by cleaning old programs that are not used.
Use CCleaner (see note 3 below) or simply (without having to download anything) Start >> Programs >> Accessories >> System Tools >> Disk Cleanup
There you can clean all temp files and also reduce the amount of old restore files. Remember to check both tabs (including the system restore on the second tab). This can be a huge saver of space.

Then Start >> Programs >> Accessories >> System Tools >> Disk Defragmenter
This will not do almost anything to the Outlook ost and pst files. For that, the best is to Press Windows key+R and type CMD. On the window, move to the directory where the pst files are and run "contig"
See more details at http://searchexchange.techtarget.com/tip/0,289483,sid43_gci1245588_mem1,00.html


And example of command would be: contig outlook.ost

After this, if you run defrag, you should see on the log that everything has been defrag. Only one file is left (the indexer file, created by the indexer process (I need to check this further):
 \Program Files\Connected\HASHES.DB
 \System Volume Information\catalog.wci\00010006.ci

The first I think has to do with the backup. The second with the last restore point (or more than one if you have allowed for it). From what I read, you shouldn't mess with them, at least not directly, through command prompt kind of interface. Maybe with the right utilities. In my case, I left them there but please let me know if there are better ways...

Note 3: CCleaner helps clean up temp. files, registry stuff left behind, etc... but not sure it is really necessary to be run/downloaded.

Extra Notes:

Note 4: A good thing is to create an image of the HDD when it is clean and running and save it, to do a restore eventually purging all messed up things...

Note 5: A lot of this can be accessed also through right click on the PC icon >> Manage and through Properties >> Advanced tab. Notice that these windows have a lot of the info of the PC, like environment variables, etc... Stuff that can be adjusted there: on Advanced one can click on performance, Visual effects set to "adjust for best performance").

Note 6: In the Advanced/advanced tab one can find the Virtual memory allocation, set to 2GB.
I have DEP on.

Note 7: On System Restore, one may want also to reduce the amount of disk space available for restore (how many system restore points you have... or how back you can go in time...). I put 1G (it was 10G!).

Note 8: Removed also the automatic updates (which will have process running in the background). Just remember to run that every now and then...

Sunday, January 16, 2011

Pre-assignment of Inventions - THE ISSUES

Usually, assignment of inventions are presented as hurting the inventor/employee of a company. I say that they hurt, in equal size the revenue of the companies which use them (the vast majority). The issue is that either no one cares in a big company ("it's not that individual's problem") or maybe they are the less bad of all solutions. I have not thought that far, so, on this post, let me just prove why they are such a bad solution:

[Note: The thought is to follow up with a 2nd posting with potential solutions]. In the interest of time I won't explain here what this document is but feel free to Google it (and also, scroll down this posting to read the main paragraph of the one I had to sign).

- Unethical practices: say you are in a foreign country and get this nice employment offer letter from a well respected Fortune 500 US company, including salaries and a bunch of conditions that you have to meet for the offer to be valid, like passing a future drug test, proof that your qualifications are real, etc... but one little paper is missing: the assignment of inventions (AOI). The paper is then presented to you on your orientation date after you had quit your job and moved to US. And either you sign it or you can go back to your home country! Believe it or not, this is actually not a strange practice (I know for a fact). Note though, that actually. this has little to do with the AOI and has more to do with simple ethics. The issue is that not many pay attention to this and as such, things are ugly maybe without real intention behind. Curiously, we are talking about companies that rank very high, if not the highest, on ethical practices. The funny part is that when I brought this fact up with the ethical officer on my company he simply choose to ignore the email! Bottom line, this hurts the relation between company and employee, and as such, the outcome for both.

- Unfair: On what grounds can somebody ask you to give them any idea your brain has, as long as it is interesting to them, specially if it has nothing to do with the work you are getting paid for, even if it is coming from a discussion with 3rd parties, even if "whatever", for FREE. Yeah, you will get paid the same regardless you give them an idea or not, regardless of the relevance/creativity/value..., regardless if they do anything with it or not!.

- Stupid: regardless of anything, the idea is not going to get explained unless the inventor decides to and no one would ever know! What kind of contract would rely on that? Actually the contract practical application says more like: "if you have a really good idea, please, quit our company and go do it outside"

Therefore, the result is that the better the idea is, the less likely to end-up inside the company, hurting the company who created the AOI in first place. On a future post I'll try to find out if there is a better practice around this...


A sample of an AOI:
"I agree to disclose completely, promptly, and in writing to employer and I hereby assign and agree to assign and bind my heirs, executors, or administrators to assign to employer or its designee, its assigns, successors or legal representatives, any and all inventions, processes, methods, apparatus, diagrams, or any improvements (all hereinafter collectively called “inventions”) whatsoever, discovered, conceived and/or developed either individually or jointly with others, during the course of my employment with employer (including any and all inventions based wholly or in part upon ideas conceived during my employment with employer), or using employer’s time, data, facilities and/or materials, provided the subject matter is one within a field of interest of employer. My obligations under this paragraph apply without regard to whether an idea for an invention or a solution to a problem occurs to me on the job, at home, or elsewhere. I further agree that all such inventions are employer’s exclusive property, whether or not patent applications are filed thereon."

Saturday, January 15, 2011

Stitching pictures together to create a panoramic

Few years back I had an application that worked lovely, that came with my Canon. Unfortunately, I can't find it anymore and sure enough, I making this a research project. All what I want is something simple that allows me to stick pics side by side to create a bigger pic or panoramic.

Found this site with general tool reviews:
http://graphicssoft.about.com/od/panorama/Panorama_Creation_and_Stitching_Tools.htm

I want something free, so, I end-up here:
http://wiki.panotools.org/GUI_front-ends

Seems that there is an underlying routine and few GUI tools that use that to create the final application. I got first Hugin but after few attempts, it does not look as simple as I want. Unfortunately this is going to go two ways. Learn it or do the research to find another tool, and I am thinking that as it looks a pretty powerful tool, I'll go with the former. Site here: http://hugin.sourceforge.net/

30 minutes later, I start getting a handle of it and I see why it can become a complicated software, specially when you leave a lot of options to the user. Basically, I would start from the left tap, load the images, align them (hopefully you don't need to enter control points), then go to optimize and keep going to the right. There is a 2nd window that shows you what the result would be (and you can move the images there to center them/rotate them as whatever you like). When you are about to stitch them, you can tell the software to do all automatic (click all the optimize buttons, like crop...) and the result, again, should be on the other window. Should be looking good and ready to stitch!

Example tutorial:
http://hugin.sourceforge.net/tutorials/two-photos/en.shtml

If you have doubts, just follow their documentation/tutorials. Thanks a lot to Pablo d'Angelo and all other authors!!

Kayak story

Kayak is one of those ideas (I may post here others) that I had long time ago but never got to do. As foreigner living in US, I used to travel every year back to my country and I still remember the pain of checking different airlines/combinations, etc... I still remember checking Travelocity and Expedia, and then, using Orbitz when it came up, and all that time thinking: what the heck, can't you guys do that simpler?

Note: somehow I think Orbitz came after the other two, but not sure why made so much news... It is the same kind, isn't it?

Anyhow, this post wants to be a lessons learned so that I can apply this to future ideas. Mental note: one day hopefully I'll stop learning lessons and move my ass. But anyhow, let's analyze what went on my mind and why I didn't do it, and what if I would have...

1/ The idea came from a basic need and suffering. I.e., when you find something that bothers you, instead of getting upset at it, think that this may be your opportunity to create a solution. I actually think that this is a great source for ideas. Only issue is that it is not really creative, so, out of all the other people getting bothered by the same issue, few ones can come up with the idea and become your competitors.

2/ So, who become my competitor? You can find their story here:
http://bostinnovation.com/2010/10/25/boston-tech-mafia-mondays-the-kayak-crew/

Interesting to see that:
  1. This were really experienced people on the travel agency field.
  2. Lots of funding went behind to start this. So, my biggest question is why? Why so much funding? I can't see really why some of these ventures take so much money. Look (ignorant myself) that one could program an application like this really easy. Yeah, I agree that you would have to have access to the database but still. And I agree the filters are nice and the application fast, but still, we are talking about 100's of million of $$$$.
3/ And myself was trying to do this on my spare time!!

Oh well, I don't think I regret not to have done this myself. I probably would have failed as I have little experience on this field. The biggest lesson is probably that I should have approached some deep pockets with the idea, and probably they would have said "thank you", give me something, and let me move to something else. Again, back to #1, I don't think the idea was that "creative", so, maybe I would not have got even change, but at least, I have to thank Kayak for their site and making my life much easier, because I know that years would have past for me to move and do anything about it (probably the biggest lesson of all).

Mental note: I've never approached external funding, so, that is something I haven't learned (no experience).

Create movie from sequence of pictures

So, you have taken a series of pictures of something. Maybe the pictures were one after the other (a surfer over the waves, shots in high speed camera mode), or they actually were spaced in time (one every day, of a building under construction) but, bottom line, you want to create the final effect of a movie. I remember doing this before in GIMP, but today I just found this free software, really small and really simple to use, but does nicely the trick:
http://home.hccnet.nl/s.vd.palen/index.html

Seems to be working fine. Just put all the pictures of the sequence (and only of that sequence) on a directory (otherwise it will start by getting in the program all the pics of the directory, which slows down operation) and then tell it to create a movie, where to save it, choose the encoder (anyone probably works, I used Microsoft Windows Media Video) and that's it!

Thursday, January 6, 2011

When do you know you are getting old?

Long time ago, I heard somebody say that "you know you are old when your idols are younger than you". Or maybe he was saying that you know you are not young :). Anyhow, I past that already some time ago and as such, I don't really like the definition... :)

Yesterday I heard Mario Conde (a famous guy in Spain) say that "you are old when your memories outnumber your illusions". Nice one.

PS.: (update 1/30/2011) I just found something very similar from Gabriel Garcia Marquez:
"It is not truth that the people stop pursuing their dreams because they grow old, they grow old because they stop pursuing their dreams".

Saturday, January 1, 2011

Browsing stops when using my SpeedTouch 585 v6 (I)

PROBLEM:

Browsing is working fine (wireless through the SpeedTouch 585 v6) and suddenly stops. The browsing error appears when looking for the address (see your status bar).

Further research (see below) shows that it seems that it doesn't get to the DNS (can't get the physical IP address for the name we are looking for).

SOLUTION:

Initially, the only simple way to fix it looked like re-starting completely the router.

Nevertheless, I found a different/simple "patch". Entered the DNS server in the TCP/IP configuration (see steps below). I used directly the one that the router should be returning by default to my PC: 62.36.225.150 (as per my ISP configuration). And also this one (openDNS): 208.67.222.222. Either one works. Browsing will never stop again.

Only issue is that we have not really solved the real underlying issue. The computer stops getting "automatically" the right DNS server and as such can't get the IPs to send the browsing requests. I haven't found a solution for this.

Well, hopefully this will help somebody. Didn't find this solution searching in the Internet last year so, this one I decided to dig deeper and this is what I came up with... On a different note, this is my first post on this blog. Not even a personal intro or why the name of this blog... I'll talk about it another day and probably you will thank me for skipping it now, anyhow :)

Cheers!

Other clues (irrelevant for most of the people unless you want to continue the investigation further)
=================================================================

- If you remove the manual entry of the DNS, it fails again. Who is failing? The router to send the DNS or the PC to request it? I would think that the router, as re-starting the PC doesn't seem to help but it does re-starting the router. When it fails, checking ipconfig /all, one can see that the DNS server is wrong (local network gateway address: 192.168.0.1, for instance). If we force it by hand (as in our solution), the right one shows up.
- Nevertheless, the BlackBerry browsing through Wifi works even when the PC stops working, so, somehow, he is getting the right DNS. Maybe it has a DNS manually configured (?).

Setting up DNS server (for Windows XP, others check web...)
=========================================

Double click on the icon of the wireless connection (on the task bar) to see its status. Click properties. In the General tap, select the TCP/IP and click properties. In the General tap "Use the following DNS server addresses" and enter one DNS server in there. Click ok...

Phase 1. Other stuff that I did before I found the above solution
===========================================

Things that work:
- Wireless connection to router.
- Ping to bberry (internal in WLAN)
- I was downloading something and that worked too even when the connection failed in the middle!! So, the connection is not actually dead. It is the new requests that fail!!
- Ping to DNS server below (172.31.255.254) works always (when the browsing is working and not working).
- Ping works to IP number, not to name. Tried 74.125.230.84 (Google).
- Entering the IP address on the browser works too

Things that do NOT work:
- It is the connection outside, tested with Web browser.
- The router has a function (accessible when you are logged into the router) to check the connection outside by connecting to the address 172.31.255.254 and fails, BUT this always fails, when browser working and when not working. What a lame check!! Notice, though, that the predetermined gateway is actually this one, so, if this one fails what are we supposed to do?
- Ping to this gateway also fails, even when everything else seems to work.

Things that do NOT fix the issue:
- Simply reconnecting with the router to Internet (when connected with the browser to the router utility).
- A repair on the PC connection to router does not solve the problem.
- Fix IP for PC doesn't solve the problem. In fact, non fix to Bberry seems to work fine.
- LHMHOST setting doesn't solve the problem.

NOTE: something quite useful is to TELNET to the router. Here are some commands:
http://www.kitz.co.uk/routers/speedtouch585.htm