• 30 Sep 2009 /  Life

    Pop quiz: I am
    a) an expert on earthquakes
    b) an expert on tsunami
    c) from the US west coast
    d) none of the above

    If you guessed d, you’re right. I’m none of those things. However, I do live in San Diego, California now. Shortly after moving here from the US eastern seaboard, I started checking out the US Geological Survey’s World Earthquake Map on a somewhat regular basis. If nothing else, it’s kinda neat. Something that caught my eye was that the western side (Asia, Australia) of the ring of fire has much more large earthquakes than the eastern side (US west coast). Granted, the earthquake maps only show large earthquakes world wide, while showing all of the smaller ones stateside. However, if they were to only show large ones period, there would be next to none in the US.

    Recent Earthquakes in the Australian Region

    Recent Earthquakes in the Australian Region

    Recent EarthQuakes in the United States

    Recent EarthQuakes in the United States

    You may have also heard about the 29 September tsunami causing earthquake in the south pacific. The details of this are still coming in, so the Wikipedia page linked to above is a work in rapid progress; if you read it, it probably won’t be what I read a few minutes ago.

    Recent earthquakes in South Pacific. Red are within past hour, blue within past 24 hours.

    Recent earthquakes in South Pacific. Red are within past hour, blue within past 24 hours.

    Now, living in San Diego, whilst there is a tsunami warning – perhaps not something one might take shruggingly.However, the tsunami danger is relatively low, mostly due to the underwater terrain and the sort of geological activity that occurs in this part of the planet. Shortly after the 2004 Indonesian tsunami, which claimed 230,000 people, the San Diego Union-Tribune ran a story detailing the low tsunami danger. As I write this, I’m reading twitter updates that the first tsunami waves hit the SD coast a few minutes ago – and they were little more than a ripple. I’ll try to update this post in the morning with exact wave heights.

    cortesbank

    The sea floor off the SoCal coast, riddled with valleys & mountains.

    The sea floor off the coast of southern California and northern Baja California is riddled with underwater mountains and valleys. These mountains and valleys sap tsunami strength. In fact, on underwater mountain chain known as the Cortes Bank rises from 5,000 feet to within 5 feet of the surface 115 miles off the coast. As such, this the home to some fantastic surfing waves! Surfing waves – awesome; tsunami waves, no so great. Luckily however, tsunami’s are not much a concern in southern California.

    Surfing on the Cortes Bank

    Surfing on the Cortes Bank

    Tags: , , , , ,

  • 27 Sep 2009 /  Technology
    Microsoft's BarrelFish Multi-Kernel Operating System Architecture.

    Microsoft's BarrelFish Multi-Kernel Operating System Architecture.

    Microsoft has a new pet-project: Barrelfish, a multi-kernel operating system (via OS News). As a bit of back story, a kernel is the meat of an operating system. The kernel is largely responsible for enabling other software to make use of hardware.

    In the research team’s article The Multikernel: A new OS architecture for scalable multicore systems they write “We investigate a new OS structure, the multikernel, that treats the machine as a network of independent cores, assumes no inter-core sharing at the lowest level, and moves traditional OS functionality to a distributed system of processes that communicate via message-passing,”.

    This is really good stuff! From a hardware perspective, this is exactly where the future is headed. When I took “Distributed & Network Programming” I remember the class getting Dr. Allan off on a tangent about how a single computer these days is really a distributed system.

    A “distributed system” is generally thought of multiple computers networked together and working together. This idea was popularized when “a computer” was a pretty straight forward idea. A computer consisted of a processor, some main memory, possibly some persistent memory, and some input/output. Today’s computers are much more complex. A video card often has it’s own dedicated main-memory and set of multiple-processors. Hard disk drives are beginning to contain embedded systems to encrypt data saved on the disks. Even main memory is not a straightforward concept these days, not with virtual memory which requires and additional piece of hardware called a memory management unit. A “personal computer” is a series of smaller computers (video cards, hard drives, processors, etc…) networked together. This will be a continuing trend, which will require much more complex operating systems to manage the hardware. This is why I’m so excited over BarrelFish!

    I think the Dinosaur Book will be needing a new chapter! (aaaaawww yeeeaaahhh… the Dinosaur Book – you know it!)

    I hope Microsoft Open-Sources BarrelFish like they did Singularity, which was their research OS
    in which the kernel, device drivers, and applications were all written in managed code.

    Tags: , , , , ,

  • 27 Sep 2009 /  Code, Technology

    Vi and Vi-Improved (Vim) are a couple of text editors that many people use frequently on Linux systems. When I first was introduced to Linux I didn’t have to worry about all the setup stuff, and I learned Vim. Typing “vi” from the command prompt took me to vim. Vim was also configured to color computer code, as in the screenshot below.

    Vim with Syntax Coloring on For Programming Languages

    Vim with Syntax Coloring on For Programming Languages

    After installing Linux on my personal machine, I was aghast that the color schemes are not the default in Vim. This had to be rectified. I’m running Ubuntu 7.10 – Gusty Gibbon. (At the time of this blog post, the current version of Ubuntu is 9.04 – Jaunty Jackalope)

    I found that the Vim command for syntax color is :syntax on . However, with the default installation of Ubuntu, I received the following error:

    [cc]Sorry, the command is not available in this version: syntax on.[/cc]

    This means that you don’t have the full version of Vim installed. I searched for this error and found a variety of commands to try – none of which worked; there were various install errors. The command that worked I found on the Ubuntu Vim Tip of the Week and it was
    [cc lang="bash"]$sudo aptitude install vim-full[/cc]
    Now the command should work. However, it’s a pain to run the command every time I fire up Vim. Instead, you can make this automatic by putting the commant in the file
    [cc lang="bash"]~$ ./vimrc[/cc]
    Many of the sites on which I saw reference to the file didn’t mention it’s location. I searched tirelessly for this file. Turns out, be default, it does not exist. Vim runs just fine without it. To save Vim configuration settings, such as color schemes or tab-sizes, create the .vimrc file in your home directory.

    In addition to simply turning the syntax color on or off, you can even install new themes. A collection of themes are available from Vim.org Scripts

    The theme that I found that I like is the OceanDeep.

    After hours of playing around on my Linux, my finaly .vimrc file looks like (*note: remove comments to make work)
    [cc lang="csharp"]
    syntax on // turn color scheme on
    colorscheme oceandeep // set the color scheme
    filetype indent on // the next three lines auto indent while programming
    set autoindent
    set nu
    set ts=4 // set tab size to 4 spaces
    [/cc]

    Tags: , , , , ,

  • 22 Sep 2009 /  Code, Technology

    Here’s yet another old C# code snipped from my antiquated and dead blog. But throwin’ this out there for anyone who might find it helpful.

    [cc lang="csharp" tab_size="2"]
    try
    {
    string newTime;
    System.Net.Sockets.TcpClient t =
    new System.Net.Sockets.TcpClient(”time-a.nist.gov”, 13);
    System.IO.StreamReader rd = new System.IO.StreamReader(t.GetStream());
    newTime = rd.ReadToEnd();

    string[] times = newTime.Split(’ ‘); // Parses The String
    rd.Close();
    t.Close();
    Console.WriteLine(”Todays Date Is: ” + times[1]);
    }
    [/cc]

    I read somewhere that in order for this code to work, the TCP client has to be installed and enabled in Windows Vista. The TCP client is not, be default, enabled in Vista. To install it, Control Panel — Programs and Features — Turn Windows Features On or Off — TCP Client.

    However, I tried this after unchecking my TCP client and it still worked – so maybe it’s just an old wive’s tale! I’d suggest trying it without the TCP client installed – but don’t count on it working if you’re planning on distributing this without further research.

    The second line after the opening try { has ” time-a.nist.gov”, which is the time server. You can swap this out with some of the other time servers below.If you were feeling ambitious, you might try creating a class that will try a random time server on it’s first try and then randomly try other time servers if the first x fail.

    Name | IP | Location
    time-a.nist.gov | 129.6.15.28 | NIST, Gaithersburg, Maryland
    time-b.nist.gov | 129.6.15.29 | NIST, Gaithersburg, Maryland
    time-a.timefreq.bldrdoc.gov| 132.163.4.101 | NIST, Boulder, Colorado
    time-b.timefreq.bldrdoc.gov | 132.163.4.102 | NIST, Boulder, Colorado
    time-c.timefreq.bldrdoc.gov | 132.163.4.103 | NIST, Boulder, Colorado
    utcnist.colorado.edu | 128.138.140.44 | University of Colorado, Boulder
    time.nist.gov | 192.43.244.18 | NCAR, Boulder, Colorado
    time-nw.nist.gov | 131.107.1.10 | Microsoft, Redmond, Washington
    nist1.datum.com | 209.0.72.7 | Datum, San Jose, California
    nist1.dc.certifiedtime.com | 216.200.93.8 | Abovnet, Virginia
    nist1.nyc.certifiedtime.com | 208.184.49.9 | Abovnet, New York City
    nist1.sjc.certifiedtime.com | 208.185.146.41 | Abovnet, San Jose, California

    Tags: , , , ,

  • 21 Sep 2009 /  Code, Technology

    This is an older post, from another [now dead] blog of mine, but I thought I’d throw it up here as well.

    When working in C#, if you are trying to load a jpeg file and you use the System.Drawing.Image.FromFile method on a file that you do not have the proper permissions for, you will get an “Out of Memory” exception. Somewhat misleading – but that is the error resulting from improper permissions.

    I found a web site that claimed that you create a FileStream object from your file and then use the FromStream method on the Image object.

    My solution for loading a file was as follows
    [cc lang="csharp"]
    private void addPhotoButton_Click(object sender, EventArgs e)
    {
    DialogResult newPhoto;
    Image newPhotoImage;
    string newPhotoFileName;
    newPhoto = openFileDialogAddPhoto.ShowDialog();
    if(newPhoto == DialogResult.OK)
    {
    newPhotoFileName = openFileDialogAddPhoto.FileName;
    FileStream photoStream =
    new FileStream(newPhotoFileName,
    FileMode.Open, FileAccess.Read);
    newPhotoImage = Image.FromStream(photoStream);
    }
    }
    [/cc]

    Tags: , ,

  • 17 Sep 2009 /  Technology, Twitter

    Over at OSnews.com I just saw an article about Novell releasing a .NET based SDK for the iPhone. The original article comes from infoworld.com, but I like some of the comments on OS News. I’ve been resisting the iPhone temptation for a while now, but this more than doubles it’s allure to me.

    Say what you want about C# being so easy it’s not even programming any more, the end result of this will probably be more awesome iPhone apps.

    This also is making me wonder what sort of glorious cross-device applications will come of this. For example, C# has made it super easy to develop on the xBox 360, which AsylumFunk is using to create an xBox twitter client.

    Tags: , , , , ,

  • 16 Sep 2009 /  Technology, Twitter

    I don’t care what @erickschonfeld says, rsscloud, pubsubhubbub, and liferecorders are going to be pretty sweet.

    First of all, rssCloud and Google’s pubsubhubbub (PuSH) offer a glimps of a more scalable solution to the need for real-time data. The internet is, and ever more so, all about the exchange of information. Push technology (such as rssCloud and PuSH) allow us to build the machine bigger – better.

    Currently the way many of our daily tools work is by polling. For example, if you use an e-mail client such as outlook what’s happening behind the scenes is that your outlook client is constantly asking the e-mail server “hey, you got e-mail for me yet? how bout’ now? now?…now? how bout now?“. Not terribly efficient. Google’s PuSH and the rssCloud wordpress plugin instead allow the servers to say “you know what? we’ll tell you when we’ve got something for you!”. There’s a lot less overhead incurred in the system if noise is only made when there’s something meaningful to communicate. Google has a great and simple slideshow on this. PuSH and rssCloud vary in use and implementation, but the basic idea is “we’ll tell you when we have something for you, so quit asking”.

    I hear you say “Logically, that makes sense, but how does something like a life-recorder fit into this?”. The application that I propose is only one use, and limited in scope, but a use that I find exciting.

    I was out running the other day, and in an anaerobic-fermentation induced lactic-acid overload, I was thinking about twitter, push protocols, and this tech crunch article on life-recorders that I read. The wheels started turning. I came up with an example use, but it was lame, and I’m embarrassed to mention it. It planted a seed, however, so when I read the article about students taking photos from space on a $150 budget the idea resurfaced [matured].

    Real-time data is important for many things, such as stock-markets and space-flight telemetry. In these uses most users are using a system specifically built for them. Using a device like a life-recorder and push protocols on the internet, anyone can stream real-time telemetry!

    Examples include:

    1. The $150 space-photos device could have an altimeter-life-recorder pushing altitude data every 60 seconds
    2. I could have a gps-life-recorder pushing real time Google map mashups every 15 minutes when I hike King’s Peak
    3. runntellmanrun could push followers updates with Google maps, distance traveled, photos, average speed, and weather automatically as he runs barefoot across the country.

    Overall I’m pretty excited, especially for the real-time globally-distributed telemetry possibilities. Small scale projects, such as the space-photos project, will be able to broadcast telemetry to the world without having to build the infrastructure of a dedicated system. Aaanndd… getting trashy celebrity news even faster will be nice as well.

    Tags: , , , ,

  • 14 Sep 2009 /  Technology, Twitter

    #Twestival last night rocked. It was on the roof of the Hotel Solamar in Downtown San Diego. The event was hosted by Stay Classy, and all proceeds went to the Campaign for Abandoned Youth.

    It was an outstanding event full of fun, great music, and extraordinary people. I had the opportunity to meet and chat with Scot Chisholm of Stay Classy [@classyCEO]. Great guy who, very quickly, had impressed me with the approach to and direction of Stay Classy as an organization. It’s definitely something I’m going to start getting involved with. I also was introduced to TweetPhoto by @rumford. Another awesome guy. I became smitten with TweetPhoto for a few reasons: a) it totally rocks! switching from TwitPic for tweeting photos b) they’re a Diego based startup, and I gotta support the local tech startup scene. TweetWallLive was also a pretty rockin’ deal. @Gebl, of TweetWallLive, was a great guy to meet as well; excellent insight and the best advice on deciding between Canon and Nikon DSLRs.

    Overall, fun night, awesome people, and all for a great cause. Can’t believe that I hadn’t even heard of it until 100 minutes before it started.

    Sunset at Twestival

    Sunset at Twestival

    Tags: , , , , ,

  • 08 Sep 2009 /  Outdoors

    Went on hike today – Cuyamaca Peak in east San Diego County, California. It was a great escape from the city.

    Being 6,512′, the summit is the second highest point in the county. The first highest peak, at 6,535′, is within the Los Coyotes Indian Reservation.

    The trailhead starts off at about 5,000. The view from the top is not too shabby. On a clear day you can see both the ocean and the inland desert all the way to the Salton Sea.

    Although a healthy hike, I didn’t find the trip too strenuous, especially with a narrow paved road all the way to the top. I did find the biggest pinecone I’d ever seen though. See the full photo set on my site at http://davidwkennedy.com/photos_cuyamaca.htm

    The largest pinecone Id ever seen.

    The largest pinecone I'd ever seen.

    Tags: , ,

  • 07 Sep 2009 /  Twitter

    Trying out twitvid from mobile. This was my fish in college. http://twitvid.com/718A5