martes, 12 de agosto de 2014

Yahoo, worst customer care ever

So I deleted my Yahoo account by mistake and now I have a problem with the BOSS billings. So I go to login and reactivate my account however I cannot since I don't recognize the identity questions (yeah... what?). So then I need to call there customer service number.


After 2 hours on the phone I still cannot get in touch with them. Also there message "due to the large call traffic it may be possible we do not answer your call" is not very encouraging to say something. Do not ever get in this situation since apparently there is no way out. Call their number, hold for 10 minutes. After it they finally let you enter your CS code, I guess they only let persistent clients go through the first filter. Customer care with client filters... this is so wrong. So then you get to hold indefinitely until someone answers (which I haven't had the pleasure of) or you simply get disconnected..

I have had to deal with bad customer care before, but Yahoo's is by far the worst.

lunes, 28 de julio de 2014

Analyzing logs

As I was coding my new server for apartmentsml I redirected all of my server's exceptions to the log file. After a while I remembered about the file and when I decided to check it it was already 30Mb long... So in comes linux tools to view logs. As of now the most useful is

tail -100f /myserver/logs/mylogfile

This command lets you view the log in real time as people hit your server. Well maybe not useful but quite interesting. The most traditional way to view the log is just to

cat /myserver/logs/mylogfile

However when the log is too long you might want to view it with

less /myserver/logs/mylogfile
more /myserver/logs/mylogfile

Well maybe just less since "less is more, and more". This will let you scroll up and down as if it were a read-only vim editor. Remember to exit by pressing 'q'!

If you just want to see the beginning or the end you can also do

tail -10 /myserver/logs/mylogfile
head -10 /myserver/logs/mylogfile

As you can imagine tail gives you the last n (10 in this case) lines and head the n first.
Now this is all fine but how about actually crunching some number on the logs? Imagine you logged for each call to your page the ip address as IP: xxx.xxx.xxx.xxx. So now you want to do some stats about your page. First let's count how many impressions your page has gotten:

cat /myserver/logs/mylogfile | grep -c "IP:"

For this example we used a new command called 'grep' which basically is designed to match lines of text based off on the regular expression you provide. This will then count the number of times 'IP:' occurs in the logs which will be the number of impressions of your webpage. Now more interesting yet let's grab all the unique ip's

cat /myserver/logs/mylogfile | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort -u

You can now use this ips to track where people are accessing your page from. This regex might seem complicated but it is simple once you understand that '[]' tells which characters to match and '{}' tells how many times these characters will appear. So in principle the regex used will also match 999.999.999.999 which is not correct but I think we can live with it. Finally sort -u sorts your IPs and deletes repetitions. If you do not want to sort them but delete repetitions then you can use uniq.

miércoles, 23 de julio de 2014

Apartment finder

So I decided, after having to look for apartments in the US, that there is no suitable tool to do this. So I wrote my own service which helps you find an apartment by maximizing whatever features you are looking for. Have a look at www.apartmentsml.com and tell me what you think!

martes, 3 de septiembre de 2013

Vacuum tube modeling

After doing some research into vacuum tubes I actually found out that TINA has some models for some basic vacuum tubes. So using the spice model of the WE300B vacuum tube:
* Connections:     Plate
*                            | Grid
*                            |   | Cathode
*                            |   |   |
.SUBCKT WE300B P G K
E1 2 0 VALUE={V(P,K)+3.87*V(G,K)}
Gp P K VALUE={119.5E-6*(PWR(V(2),1.5)+PWRS(V(2),1.5))/2}
Cgk G K 9.0P
Cgp G P 15P
Cpk P K 4.3P
.ENDS WE300B


 I managed to crunch the numbers for a simple circuit





 yielding the following equation:

 y+y^(2/3)/0.242-67.8-3.87x=0


where x is the input voltage and y the output voltage. After putting this into wolframalpha (http://www.wolframalpha.com/input/?i=y%2By^%282%2F3%29%2F0.242-300%2B232.2-3.87x%3D0) I got the following graph:





To my surprise it is exactly what I expected. Namely to have a nonlinear function which when plotted would seem almost linear. After running the model in TINA with a 5V pure sine input and doing a fourier series analysis on the output a 2.63% harmonic distortion can be observed. Another interesting and expected fact is that this distortion increases with the amplitude of the signal. Now I have built my own kit and have set it up:



 



I should start soon the analysis of the signal in Matlab and see if it checks with my observations. It should be noted however that the circuit for the real tube amplifier is much more complex. Simply by adding a rectified DC source introduces a new noise which would be very difficult to model mathematically. So I would expect a qualitative similarity rather than a quantitative one.

viernes, 22 de febrero de 2013

Javascript animation

Siguiendo el aprendizaje de js con typescript y html5 ahora les presento una animación hecha en javascript. Se trata de un simulador de "tiro libre" donde se encuentra numéricamente el mejor ángulo de disparo: CLICK AQUI PARA VER ANIMACIÓN

lunes, 18 de febrero de 2013

Javesp traductor

Acabo de terminar mi traductor de javesp a Java. ¿Qué es javesp? Javesp es código en Java pero donde todas las palabras clave como this, double, long, public están escritas en español: esto, doble, largo, publico... Aquí les dejo el editor hecho en javascript.