Category Archives: Uncategorized

Ski Dubai

I found out about ski dubai via treehugger blog. They quite rightly point out how immensely terrible this is for the environment.

One of the major problems facing the world is it’s unification. All places are becoming the same, becoming a monoculture. It’s not just a problem for sentimental reasons – I like that I can have pals in other countries and that we can interknit more and more. I like that people know more languages so that we can all converse. But, you don’t need to go snowboarding when you are in dubai. It will never be as good as the alps or the rockies, and the costs are immense. Yes, we can do it, but we probably shouldn’t. Instead, we should work on better ways to enable you to get to where the amazing stuff is.

But OH OH OH would I like to have it in my backyard. Except, come to think of it, the heat venting from this would probably make my backyard look like Dubai.

Interestingness

endless
endless,
originally uploaded by antimethod.

Flickr.com has a new feature called “interestingness” that helps you find pictures that knock you for a loop. Since it is a huge social site, they can see who’s looking at what and how they got there. They can analyze who’s commenting on a picture, what strange combinations of tags are on it, etc. And then they generate from this data a page full of pictures that you have just GOTTA see.

Along the way, it wouldn’t hurt you to join. Maybe you are interesting?

Blog from WORD

Looks like Blogger, current host of this humble blog, has released a plugin for Microsoft Word that lets you post and edit straight from the application!  Nice!  No more trying to compose in the tiny blogger text window.  
This is some very nice integration and it’s really the kind of synergy that open api’s allow.  Word is a very nice application for writing in, and why shouldn’t you be using something made for writing?  I like the idea that I might write a post in Word and publish it from there, then post to my blog, someone subscribes from the feed and they may read it in their email client or some feed reader.  All of this with no webbrowser involved.  This is what’s nice about the future today.

Colatown still hot in the future

Interesting – I’m reading Charlie Stross’s awesome novel “Accellerando”. It’s a great read – fast paced, full of amazing ideas and new technology. It is so full of ideas that there is a whole wiki article emerging about it as a study guide. And, even cooler, Charlie saves us a trip to the library by providing the book for free as a download on it’s website. Yup, you can buy it or you can get it for free.

So anyway, I’m reading away when this line jumps out at me:

Rome is hotter than downtown Columbia, South Carolina, over Thanksgiving weekend

– that means Rome is very hot. In the summer, there is nothing between Columbia and hell but a screen door.

New Delicious features

I’m mad for del.icio.us – I keep all of my bookmarks there and use it to discover new cool stuff all the time. It’s how I discovered that little bitty browser in the post below.

Browsing the new blog for the site, I discovered two cool new features.
First, you can now bookmark sites and add a tag for:username. That user will see links for them in their “for” section. This is a great cool way to bookmark stuff for yourself and then make sure that pals get a chance to see it as well. Feel free to bookmark any good stuff for me with the tag “for:snarkhunt” It does raise the issue of spam, as now a spammer could simply script up something that spiders through the site, grabs usernames, then spams with for: tags. Presumably, their could be some sort of whuffie based response. Personally, I like using delicious as a pull based discovery device. I subscribe to where I find the good stuff I like.

The other feature I just noticed is the new posting scheme. This makes it easy for blogs and the like to make it easier for you to bookmark. I just changed my blogger template to put a little post to delicious link on every post in the footer. If you’ve got a delicious account, you should give it a click.

If you don’t have a delicious account you should probably look into it. Delicious is wonderfully useful without an account, but even more useful when you are using it instead of just searching it.

For example, here’s my inbox of links:



Anything tagged with any of those tags on the right that I am interested in shows up right there for me.
Think what subjects you’d be interested in seeing links for…

Bitty Browser

I’m playing around with this bitty browser thing.

Will this thing work? It should be a browse of my delicious links.


Playlist copier

I have a pocket pc that I use to listen to music. I like to change up what i’m listening to while I’m using PocketMusic – which is excellent.
So I wrote a little app to take whatever playlists I’ve created on my computer and copy them over to my sd card for use on the go.
Things that I will do if I figure it out – try to go around having to take sd card out and use usb writer . see if there is someway to just go through active sync.

Since I didn’t see this trivial app out there – I created it.
Here you go.
Gpl License please. If you make something better from this, please let me know and please give it away.
Following is the contents of mainwindow.cs

using System;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;

namespace PlaylistCopier
{
 /// 
 /// Summary description for playlistcopier
 /// 
 public class MainWindow : Form
 {
  private TextBox txtPlaylistPath;
  private Button btnOpen;
  private GroupBox grpPlaylist;
  private GroupBox grpSaveTo;
  private TextBox txtSavePath;
  private Button btnSavePath;
  private Button btnCopy;
  private StatusBar sb;
  private OpenFileDialog ofd;
  private SaveFileDialog sfd;
  private ProgressBar progressBar;
  /// 
  /// Required designer variable.
  /// 
  private Container components = null;

  public MainWindow()
  {
   //
   // Required for Windows Form Designer support
   //
   InitializeComponent();

   //
   // TODO: Add any constructor code after InitializeComponent call
   //
  }

  /// 
  /// Clean up any resources being used.
  /// 
  protected override void Dispose( bool disposing )
  {
   if( disposing )
   {
    if (components != null) 
    {
     components.Dispose();
    }
   }
   base.Dispose( disposing );
  }

  #region Windows Form Designer generated code
  /// 
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// 
  private void InitializeComponent()
  {
   this.txtPlaylistPath = new System.Windows.Forms.TextBox();
   this.ofd = new System.Windows.Forms.OpenFileDialog();
   this.sfd = new System.Windows.Forms.SaveFileDialog();
   this.btnOpen = new System.Windows.Forms.Button();
   this.grpPlaylist = new System.Windows.Forms.GroupBox();
   this.grpSaveTo = new System.Windows.Forms.GroupBox();
   this.txtSavePath = new System.Windows.Forms.TextBox();
   this.btnSavePath = new System.Windows.Forms.Button();
   this.btnCopy = new System.Windows.Forms.Button();
   this.sb = new System.Windows.Forms.StatusBar();
   this.progressBar = new System.Windows.Forms.ProgressBar();
   this.grpPlaylist.SuspendLayout();
   this.grpSaveTo.SuspendLayout();
   this.SuspendLayout();
   // 
   // txtPlaylistPath
   // 
   this.txtPlaylistPath.Anchor = 1);
   this.txtPlaylistPath.Location = new System.Drawing.Point(8, 24);
   this.txtPlaylistPath.Name = "txtPlaylistPath";
   this.txtPlaylistPath.Size = new System.Drawing.Size(352, 20);
   this.txtPlaylistPath.TabIndex = 1;
   this.txtPlaylistPath.Text = "";
   // 
   // btnOpen
   // 
   this.btnOpen.Anchor = 2);
   this.btnOpen.Location = new System.Drawing.Point(368, 24);
   this.btnOpen.Name = "btnOpen";
   this.btnOpen.Size = new System.Drawing.Size(24, 24);
   this.btnOpen.TabIndex = 2;
   this.btnOpen.Text = "...";
   this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
   // 
   // grpPlaylist
   // 
   this.grpPlaylist.Anchor = 3);
   this.grpPlaylist.Controls.Add(this.txtPlaylistPath);
   this.grpPlaylist.Controls.Add(this.btnOpen);
   this.grpPlaylist.Location = new System.Drawing.Point(16, 24);
   this.grpPlaylist.Name = "grpPlaylist";
   this.grpPlaylist.Size = new System.Drawing.Size(400, 56);
   this.grpPlaylist.TabIndex = 3;
   this.grpPlaylist.TabStop = false;
   this.grpPlaylist.Text = "Find Playlist";
   // 
   // grpSaveTo
   // 
   this.grpSaveTo.Anchor = 4);
   this.grpSaveTo.Controls.Add(this.txtSavePath);
   this.grpSaveTo.Controls.Add(this.btnSavePath);
   this.grpSaveTo.Location = new System.Drawing.Point(16, 88);
   this.grpSaveTo.Name = "grpSaveTo";
   this.grpSaveTo.Size = new System.Drawing.Size(400, 56);
   this.grpSaveTo.TabIndex = 4;
   this.grpSaveTo.TabStop = false;
   this.grpSaveTo.Text = "Copy To";
   // 
   // txtSavePath
   // 
   this.txtSavePath.Anchor = 5);
   this.txtSavePath.Location = new System.Drawing.Point(8, 24);
   this.txtSavePath.Name = "txtSavePath";
   this.txtSavePath.Size = new System.Drawing.Size(352, 20);
   this.txtSavePath.TabIndex = 1;
   this.txtSavePath.Text = "";
   // 
   // btnSavePath
   // 
   this.btnSavePath.Anchor = 6);
   this.btnSavePath.Location = new System.Drawing.Point(368, 24);
   this.btnSavePath.Name = "btnSavePath";
   this.btnSavePath.Size = new System.Drawing.Size(24, 24);
   this.btnSavePath.TabIndex = 2;
   this.btnSavePath.Text = "...";
   this.btnSavePath.Click += new System.EventHandler(this.btnSavePath_Click);
   // 
   // btnCopy
   // 
   this.btnCopy.Location = new System.Drawing.Point(16, 160);
   this.btnCopy.Name = "btnCopy";
   this.btnCopy.Size = new System.Drawing.Size(40, 23);
   this.btnCopy.TabIndex = 5;
   this.btnCopy.Text = "Copy";
   this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
   // 
   // sb
   // 
   this.sb.Location = new System.Drawing.Point(0, 199);
   this.sb.Name = "sb";
   this.sb.Size = new System.Drawing.Size(424, 22);
   this.sb.TabIndex = 6;
   this.sb.Text = "Ready";
   // 
   // progressBar
   // 
   this.progressBar.Anchor = 7);
   this.progressBar.Location = new System.Drawing.Point(64, 160);
   this.progressBar.Name = "progressBar";
   this.progressBar.Size = new System.Drawing.Size(352, 23);
   this.progressBar.TabIndex = 7;
   // 
   // MainWindow
   // 
   this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   this.ClientSize = new System.Drawing.Size(424, 221);
   this.Controls.Add(this.progressBar);
   this.Controls.Add(this.sb);
   this.Controls.Add(this.btnCopy);
   this.Controls.Add(this.grpSaveTo);
   this.Controls.Add(this.grpPlaylist);
   this.MaximumSize = new System.Drawing.Size(960, 264);
   this.MinimumSize = new System.Drawing.Size(168, 248);
   this.Name = "MainWindow";
   this.Text = "Playlist Copier";
   this.grpPlaylist.ResumeLayout(false);
   this.grpSaveTo.ResumeLayout(false);
   this.ResumeLayout(false);

  }
  #endregion

  /// 
  /// The main entry point for the application.
  /// 
  [STAThread]
  static void Main() 
  {
   Application.Run(new MainWindow());
  }

  private void btnOpen_Click(object sender, EventArgs e)
  {
   
   ofd.Multiselect = false;
   ofd.Filter = "M3U Files|*.m3u";
   if(ofd.ShowDialog() == DialogResult.OK)
   {
    this.txtPlaylistPath.Text = ofd.FileName;
   }
  }

  private void btnSavePath_Click(object sender, EventArgs e)
  {
  
   
   //sfd.Multiselect = false;
   //sfd.Filter = "*.m3u";
   sfd.DefaultExt = ".m3u";
   
   
   if(sfd.ShowDialog() == DialogResult.OK)
   {
    this.txtSavePath.Text = sfd.FileName;
   }
  }

  private void btnCopy_Click(object sender, EventArgs e)
  {
   
   FileInfo fi = new FileInfo(txtPlaylistPath.Text.Trim());
   FileInfo fo = new FileInfo(txtSavePath.Text);
   DirectoryInfo dirOut = fo.Directory;
   FileInfo fcur;
   TextReader tr;
   if8) == null)
   {
    MessageBox.Show("Problem Opening " + fi.Name + "for reading.");
    return;
   }
   //get linecount of the playlist
   int i = 0;
   while(tr.ReadLine() != null)
   {
    i++;
   }
   tr.Close();
   progressBar.Step = 1;
   progressBar.Maximum = i;
   progressBar.Minimum = 0;

   tr = new StreamReader(fi.OpenRead());

   
   TextWriter tw;
   if9) == null)
   {
    MessageBox.Show("Problem Opening " + fo.Name + "for writing.");
    return;
   }
  
   

   try
   {
    sb.Text = "Copying";
    string line;
    while( (line = tr.ReadLine()) != null)
    {
     //is this a comment line?
     if (line.StartsWith("#"))
     {
      //It's a comment line.
      
      //progressBar.
      //write it to the new file and then keep going
      tw.WriteLine(line);

      //increment progress
      progressBar.PerformStep();
     
     }
     else
     {
      //it's a file path
      //find the file
      fcur = new FileInfo(fi.Directory.FullName + @"\" + line);
      
      if(fcur.Exists) //only move good files
      {
       //only move files that don't already exist
       FileInfo ftest = new FileInfo(dirOut.FullName +  @"\" + line);
       if(!ftest.Exists)
       {
        //copy it to the new file directory 
        DirectoryInfo dirnew = new DirectoryInfo(dirOut.FullName + @"\" + Path.GetDirectoryName(line));
        if(!dirnew.Exists)
        {
         //Parent directory of new file doesn't exist yet

         
         // need to create the parent dir for the file.
         dirnew = dirOut.CreateSubdirectory(Path.GetDirectoryName(line));
         if(! dirnew.Exists)
         {
          MessageBox.Show(@"Can't create "+ dirnew.FullName);
          return;
         }
         
        
         fcur.CopyTo(dirOut.FullName +  @"\"+ line);
        }
       }
       //write the entry to the new playlist
       tw.WriteLine(line);
       //increment progress
       progressBar.PerformStep();
      }

     }
    }
   }
   catch(Exception ex)
   {
    MessageBox.Show(ex.Message + ex.StackTrace);
   }
   finally
   {
    
    tr.Close();
    tw.Close(); 
    progressBar.Value = 0;
    sb.Text = "Ready";
   }

   
   
  }


 }

 //TODO: separate out the concept of a playlist into an interface


}
  1. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  2. System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right  (back)
  3. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  4. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  5. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  6. System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right  (back)
  7. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  8. tr = new StreamReader(fi.OpenRead(  (back)
  9. tw= new StreamWriter( fo.OpenWrite(  (back)