SSH Alive 2

Perhaps this is an even better way of keeping things alive.

Use the following options either on the command line or in your /etc/ssh/ssh_config file (thats the path for Opensuse).

Host *
ServerAliveInterval 15
ServerAliveCountMax 4

I think this method might be more reliable.

SSH Keep Alive

Something that annoys me is when after a period of a couple of mins a firewall kills your ssh connection! Then you have a dead terminal that can take ages to timeout. So this is a solution, keeping it alive…

ssh -o TCPKeepAlive=yes user@some.host.com

Dead easy. I also have an alias in my .bashrc file in my home directory.

alias shortname=’ssh -C -o TCPKeepAlive=yes user@some.host.com’

So all have to do is type ‘shortname’ in the terminal and it would connect me to some.host.com. Much better. The big ‘C’ btw is for compression.

Slow day parametrising a simulation

Parametrising models is really dull sometimes. Its not so bad if the model runs quickly so that you can crank through it but this one is a bit of a slow one. I just need one more bit of data and then I can do a big run and it should be all done… slow day.

Facebook IPO Tanked

Yes, it did. The Facebook IPO valued the company at approximately $100 billion! Are they mad? What were they thinking? Easy to say that now but I think I have ranted at length to friends about insane valuations on Web 2.0 companies. These companies haven’t really proved that they can make all the much money off the many millions of users that they have. I for one can’t remember that last time that I clicked on a Facebook advert. I would like to say I never have but sometimes stray mouse clicks occur (I remember this causing accidental friend requests which is awkward and annoying). I can’t say I even notice them there much. I have definitely not bought any Facebook tokens/credits or whatever they call their attempt at a digital currency.

So what was the route of that crazy valuation? Web 2.0 companies burn cash at alarming rates. They have all that server hardware to keep running and must constantly innovate to remain relevant. Its likely that the venture capitalists behind building Facebook into what it is today wanted some of there money back. Not only that I assume that they too where taken in by that headline figure of 900million users or whatever it is. So based on promises of untold access to millions of people and pressure from venture capitalists the valuation had to be sky high. They didn’t have any other choice. Not to value highly would be to admit that the whole business plan wasn’t what they lead us all to believe. The problem is that it doesn’t matter how many users you have if all they do is turn cash into heat via looking at some pictures of their mates.

New use for post boxes…

I read on The Register that Spectrum Interactive are putting wifi hot spots into old phone boxes. Neat idea, not sure how useful it is unless you can sit somewhere nearby but it might work. However I had another idea. I’m currently sat in Starbucks where for the cost of a cup of coffee I am charging up my phone and laptop. So… why not public use power points in old phone boxes? You could sit squashed into a phone box doing some surfing while all the gadgets that you need to run your life get juiced up for another 8ish hours of 21st century life.

BT Infinity

I moved house to somewhere that has BT infinity. That sounds a bit like I didn’t it deliberately, I didn’t. Although, it was a contributing factor. It was finally installed today. Seems pretty good. I don’t know if its true that it it takes a week or so to ‘settle’ down to a stable speed but it does seem a little all over the place. First impressions are that the speed over the wireless network isn’t that impressive. I’m only getting around 10MB ish, up and down. Although the speed testing services didn’t seem to be very consistent. Plug the cable in and things get much quicker, to the point where it seems that the testing services can’t really keep up. I tried a more ‘real’ world test and got 3.5MB per second downloading Ubuntu from the mirrorservice.org.uk. So that suggests that my wireless devices can’t make a good enough connection to get the maximum speed.

Another real world test I tried was BBC iPlayer. In my old place this would constantly pause and need to rebuffer etc. Now I can click around in the play back position bar and the program starts straight away. This is the same regardless of whether I am using wireless or a cable. So where doesn’t that leave me. With a very good internet connections I guess. As long as it doesn’t ‘settle’ down to a speed that I could get without paying for Infinity its all good.

Journey

I’m one of those people who’s mind drifts off to thinking about things almost on its own (Maybe all people are like this, I have only been inside my own head after all). I’m either thinking about the task in hand or my thoughts drift off to analyse something else. Perhaps the people or situation around me, some event in the recent past, a new idea (new ideas come when washing up). As I write this I am on a train heading between Durham and York. My mind started mulling over how adaptable humans are to new and different situations. Its true that many people do not like change, but it is also true that many people are able to adapt to huge changes in their lives both very successfully and relatively quickly. I see this in myself and many of the people that are around me.

Recently something happened in my life that while it was happening it occupied most of my mental capacity. Almost my every waking thought and some of my dreams were focused on one particular event. Unpicking it, analysing it and the part that I may or may not have played. At the time it was difficult to see how this could ever be different. We have all been there. Not much time needs to pass however and things change. I still think about it a lot but by no means all the time. It might be triggered back into my conscious thought by something specific, but sometimes it just pops back up without a trigger that I am aware of. This is what happened on this train journey, and the trigger is an association of a place that I will pass by. A place I once loved to visit but now I doubt I will ever go back. The closest I will get is skimming its event horizon on my way up and down the East Coast main line.

Silverlight 5 nightmare…

I subscribe to LoveFilm and I have to say was pretty disappointed when they switched from Flash to Silverlight. Mainly because I can no longer stream movies with Linux, but also because I have had problems with Silverlight before. I wasn’t surprised therefore that when they made the switch my media computer stopped streaming films. I tried all the normal stuff, turned off the firewall, added *.lovefilm.com to the trusted website in the control panel. Uninstalled, reinstalled. Tried different browsers, cleared browser cache. Everything. Nothing worked. I even contacted LoveFilm support who asked me to do all that again and then pretty much gave up.

I then noticed that it was only DRM content that wasn’t working! Annoying, as I should have spotted that before. So some more digging and I found that the DRM licenses used by MS software are stored in “C:\ProgramData\Microsoft\PlayReady\mspr.hds”. So I renamed it. Bingo, DRM content including LoveFilm streaming now works! Doing this will mean you loose all existing DRM licenses, for me that wasn’t an issue as I didn’t have any. Frustrating! At least I can stream films now. Well, just need to encourage my ADSL modem to find enough bandwidth, it over heats poor thing and gets all slow and rubbish.

Text Message Alerts

I have long been interested in setting up my computer so that it is possible for it to tell me what is going on via sms messaging. This would be useful for both my day job and also to alert me to interesting things that it might detect. So I finally got round to setting it up.

Using an old Huawie E220 GSM modem and the linux package called gammu-smsd all of my software can now send me texts. I used to use the modem for mobile broadband but I upgraded to MiFi so I got an ordinary pay as you go sim card for the modem and set it up. These modems are perfectly capable of sending texts. I chose the gammu-smsd because it has the option of using a mysql backend. One tip is that the mysql tables are provided in a file which is included in the distributed source code. Also I ran tail on /var/log/messages (Opensuse – do the same for your version of linux) to see which device the modem is attached too. You can force it use the same one if you like. I might end up doing this if it causes a problem.

Using mysql is handy because you can send a message by directly writing the messsage details in the the outbox table in the database. Easy. I wrote a very simple Java interface to the mysql database that all of my programs can connect to. Any program can use the Java library to inject a message into the database and then it is promptly sent. The computer set up to send the sms messages doesn’t even have to be the computer that is running the simulation. One machine with an accessible database can provide a messaging service for any number of computers. There are alternative approaches but this seemed the easiest to set up quickly.

This is helpful because often simulations take a long time to run and it is useful to be able to leave them to it knowing that I will be notified when the task has completed, or if the task failed for some reason (there is nothing more annoying than finding out that a simulation stopped for some reason the minute you turned your back). I can then log back into the machine and either start the next simulation or whatever. I can also set it to alert me to interesting market events.

Data collection is still going…

I am still collecting lots of data. Nearly all day every trading day programs download market data at 5min intervals (for the FTSE100/250/TechMark, the S&P500 and the NASDAQ). At least I am covering a really interesting period of financial history. Even if I haven’t had any time to do anything with the data yet.

The flip side to that is that this is such an unusual period that techniques learn’t using this data might not be generally applicable. A friend that works for a systematic hedge fund told me that their models have changed completely since the crash of 2008. No way of knowing unless I actually get round to doing something with the data.