Dates in Posts Fixed
Posted by Tyler | Filed under tylerbutler.com
Just made a minor fix to the site… I noticed that dates weren’t showing up for some posts. Took me about 5 minutes to figure out that the Wordpress the_date() function had changed:
When there are multiple posts on a page published under the SAME DAY, the_date() only displays the date for the first post (that is, the first instance of the_date()).
Quick and easy change…
Before: <?php the_date() ?>, <?php the_time() ?>
After: <?php the_time("F j, Y, g:i a") ?>
Tags: tylerbutler.com, wordpress
Twitter Experiment
Posted by Tyler | Filed under Projects
I am experimenting a little with auto-tweeting from my blog to Twitter. In general, I dislike when people do this, for the following reasons:
- I get double-exposure to their content. If I am interested enough in someone to follow them on Twitter, and they also have a blog, then 90% of the time I also subscribe to their RSS feed. That means I see their posts in Twitter then also in my feed. That bugs me.
- Tweets are limited to 140 characters, and typically blog posts are longer. That means I see 100 characters plus a link, possibly less in the tweet itself. That’s useless.
At the same time, I find myself tweeting a lot of links, because Twitter is just a more vibrant community than my blog. I get a lot more comments and replies from people there than on my blog. Twitter is a decent place to broadcast stuff, but I don’t like the fact that I can’t easily find the stuff I’ve posted later. Have you tried using Twitter search to find a link you yourself posted in the past? It’s ridiculously bad. I figure if I can just keep it on my own site at least I have more control over the search experience. Another reason I want to do this is to have a centralized place to write stuff, then choose how it’s syndicated. This will let me do that.
In order to address the two issues I have with common auto-tweet solutions, I’ll only be tweeting some of my posts. I am doing this by feeding only posts tagged “tweet” to Twitter via TwitterFeed. In addition, I grabbed a WordPress plug-in that does character counts of posts in the WordPress web UI. This will help me keep my posts that are auto-tweeted short and completely digestible as a complete tweet.
Hopefully this will all come together and work. Let me know what you think.
Tags: twitter, tylerbutler.com
Wikipedia Walks
Posted by Tyler | Filed under Links, Projects
A few years ago I realized that when I would start reading an interesting article on Wikipedia, I would often end up reading 6-8 additional articles that were linked from the original article, then branch out from there, etc. etc. I’d end up in a completely different subject than the one I’d started in, and I learned a lot, plus it was just a ton of fun.
I started calling these Wikipedia Walks. The concept is simple – start at an article you find interesting, then just continue on to any articles linked from the original. Finish when you get bored. To make it more interesting, you should record both the starting article and the ending article, so you can see just how far off the beaten path you’ve gotten.
To start, I’d suggest the article on Game Theory.
Tags: wikipedia walks
LINQ Confusion
Posted by Tyler | Filed under Projects
I find myself using LINQ a lot in my C# code these days. I use collections all over the place, and there’s no doubt that LINQ makes sorting and slicing collections a lot simpler code-wise.
In my most recent weekend project, I need to randomly sort a list of cards, which are represented by an Action class. After some quick searching, I found some articles that indicated the best way to do this would be to sort the list by random GUID. This makes sense, though I certainly wouldn’t have thought of it on my own.
The examples given all worked, but not with my lists… With the following code, the compiler spits out several errors:
List<Action> cards = new List<Action>(); cards.Add( new OneCattle() ); cards.Sort( a => Guid.NewGuid() ).ToList<Action>(); Error 1 Delegate 'System.Comparison<agricola.Action>' does not take '1' arguments Error 2 Cannot convert lambda expression to type 'System.Collections.Generic.IComparer<agricola.Action>' because it is not a delegate type Error 3 Cannot implicitly convert type 'System.Guid' to 'int' Error 4 Cannot convert lambda expression to delegate type 'System.Comparison<agricola.Action>' because some of the return types in the block are not implicitly convertible to the delegate return type
However, using a more explicit LINQ query without a lambda expression seems to work fine:
var q = from a in cards
orderby Guid.NewGuid()
select a;
List<Action> r = q.ToList<Action>();
Anybody know why this is? I haven’t wrapped my head around lambda expressions and the theory behind LINQ to understand what the root cause is…
Site Move and Redesign
Posted by Tyler | Filed under Personal, Projects, Work
The server that is currently hosting the SharePoint version of tylerbutler.com is being decommissioned. Unfortunately, I wasn’t given much notice about this so I have not been able to secure an alternative SharePoint-ready location at Microsoft to host the site. In the meantime I’ve used this opportunity to move the site over to WordPress, and I’ve refreshed the look and feel. Hopefully this will be temporary, since I intend to rebuild the site on the new version of SharePoint once it’s publicly available. But in the meantime, WordPress is serving my needs.
The main www address should be redirecting to blog.tylerbutler.com as soon as the DNS changes propogate. The main RSS feed should be switched over, but I have not yet moved the others. Regardless, though, you shouldn’t notice any differences since I’m using FeedBurner.
Tags: tylerbutler.com
Site Downtime
Posted by | Filed under Projects
Another lesson from my travels: if you don’t pay up your domain name registration before going on a trip, and it happens to expire, your site will become inaccessible. If you tried to visit the site a couple of days ago, you probably hit a brick wall instead. :-) Waiting for me in my inbox when I returned to Brisbane Sunday afternoon were several emails from gandi.net reminding me that my registration of tylerbutler.com was due to expire soon, then really soon, then had expired. Thankfully nobody took it from me while it was available. :-) I got it reregistered and things should be back to normal now.
A quick plug for Gandi – they’re nearly twice the price of some other registrars, but I stick with them because they have a great interface for editing DNS records, they give you a lot of control over the DNS settings themselves, they can host mail for your domain, etc. Well worth the additional cost as far as I am concerned. Highly recommended.
Vista Without Vista
Posted by | Filed under Projects
Are you not quite ready for Vista? Or are you ready, but your computer’s not? :-) I’m sure there’s a variety of reasons why you won’t be able or willing to upgrade when Vista becomes widely available later this month. However, just because you’re still using XP doesn’t mean you can’t enhance your computing experience with some Vista-like functionality.
Better Search
Vista’s Search is integrated throughout the OS, and it’s so much better than XP’s search companion that a comparison is insulting. This one’s a no-brainer to get on XP. If you don’t already have Windows Desktop Search or Google Desktop, download one of them immediately. I prefer WDS 3.0 myself, because it feels a little more integrated into the Windows environment, but they’ll both do the trick.
Explorer Breadcrumbs
While I still sometimes miss the "Go up" button when using Vista, the breadcrumb is a much more usable way to get around a folder hierarchy. Pick up Minimalist’s Explorer Breadcrumbs, and you’ll get something pretty darn close in XP.
Start Bar Search
In Vista, when you hit the Start button, you can type some text and it’ll automatically search your applications in the Start menu and match on what you type. So if you type "word" both Microsoft Word and WordPad will pop up. Once you select one, it remembers, so the next time you want to start Word, you can just press the Start button (either using the mouse or the Windows Key on the keyboard, which is faster), type "word" and press enter. Fast.
Power users have been doing something similar on XP and Server 2003 using the "Run…" menu for years. Win+R to bring up the menu, then type the cryptic name of the program you want to run, like winword (Word) or mstsc (remote desktop client). This works well, but it requires you to remember the exact executable names for each app. Open source app Launchy to the rescue! It makes its own index of your start menu, and once you invoke it using a hot key (I use Win+Space), it works pretty much just like Vista. It even indexes your Control Panel items, just like Vista. No more hunting for those hard-to-find items in the control panel!
Cursors
Vista includes some new cursors. Some people don’t like them, but I think they look pretty snazzy myself. They’re available for XP. You can Google for them, or there are some from an old Vista build at http://www.gurudesign.no/downloads/aero_cursors.zip.
Windows Media Player 11 and Internet Explorer 7
They’re both available for Windows XP. ‘Nuff said.
Sidebar
I’m not a big fan of the Vista Sidebar personally, but if you like the concept of having some widgets or gadgets or whatever you want to call them running on your desktop, then you can check out Konfabulator Yahoo Widgets engine. It’s not exactly sidebar, but the widgets it can run is very similar to Vista Sidebar gadgets. Apparently the Google Desktop sidebar also has the capability to run Google gadgets, so that’s another option.
iTunes Tagging
Posted by | Filed under Projects
One of the things that really annoys me about iTunes is the lack of categorical tagging. Actually, I shouldn’t blame iTunes. I think this is a fundamental limitation in the ID3 tags. What I want is the ability to "tag" music as I listen to it, with terms like "story-song" (songs that tell a story) or "ricardo" (songs that my friend Ricardo has introduced me to). Social music sites like Pandora and Last.fm have this concept, as does just about every "Web 2.0" site in the world. Why not my music player?
Initially when I tried to implement this sort of thing I used the "keywords" field. I would just add the tag to that field, then I created Smart Playlists based on that field. This post at Lifehacker suggests using the "Grouping" field, but the premise is the same.
This approach works fine until you want to edit a bunch of songs and add a tag. When you do a bulk edit of the keywords field in iTunes it’ll overwrite anything that was there previously. So suddenly tagging all that music with "Sasquatch 2006" removed all the other cool tags you had applied. Major suckage.
Today I decided to try a new approach: I just use dumb, old-fashioned playlists. When I want a new tag, I create a new playlist for it. For organization purposes I keep all tag playlists in a folder called Tags. I can then create additional nested folders for categories, and because of how iTunes handles folders with playlists inside, the folders will become aggregators of all the music in playlists underneath them, which is nifty. This means I can see all of the music I have tagged just by clicking the Tag folder
This approach is pretty simple. Adding a tag is easy, and using the tags to drive smart playlists is easy too. Just add an "If <Playlist> <is/is not> <Tag playlist name>" clause to the Smart Playlist. There is a drawback, though… Removing tags is now a pain. From the frying pan into the fire… I have to make sure the song doesn’t appear multiple times in a playlist, and if it does, remove all occurrences. This is because playlists are designed to support multiple occurrences of the same song. If I want to start and end my playlist with My Heart Will Go On, then dang it, I can do it. But for my purposes, it’s not the ideal behavior.
Anyway, none of this really helps my situation, because the iTunes app doesn’t help me manage my tags, build playlists based on them, or anything, natively. All of this is a hack. There are a lot things that it could do to make it easier to tag music. And with the iTunes music store, what if I could check out how other users were tagging the track, and borrow their tags? This is all stuff that is provided by Last.fm, of course, but Last.fm doesn’t manage my entire music collection – iTunes does.
And of course none of this does anything on my iPod. Heck, it can’t even understand playlist folders, which is super super super dumb. Actually, I have a lot of gripes about the iPod UI… maybe a post in Rants is in order…
The Zune and Wireless
Posted by | Filed under Projects
A lot of people have made a big deal about the limitations of the Zune wireless functionality since it was released a few weeks ago. While I totally agree that there is a lot of untapped potential with the device currently, there is at least one "obvious" omission that people have pointed out that simply isn’t a good idea, to be honest.
I’m talking about syncing to the device using the wireless. Sounds cool, right? You just walk into your apartment, turn on the Zune, and Boom! All of your music is synchronized to it. But what people don’t seem to realize is how slow this would be. The maximum bandwidth for USB 2.0 is 480 Mbit/s, or 60 MB/s. 802.11g, on the other hand, has a maximum raw data rate of 54 Mbit/s, or about 24.7 Mbit/s net throughput. Now, by applying some simple mathematics:
480 / 24.7 = 19.4332
This means that syncing to your device using wireless would be roughly 20 times slower than using USB 2.0. Even if we assume the theoretical max data rate for 802.11g, which isn’t realistic, to be clear, you’re still looking at a transfer speed that’s ten times slower. And don’t even think about using 802.11b. Frankly, this doesn’t sound like a good idea.
"So what?" you say. "I can leave the Zune syncing all night and it’ll be ready to go in the morning. Speed isn’t a real issue." OK, fine. You walk into your apartment, you turn on your Zune, and it starts syncing. You go to bed. You wake up the next morning, and your Zune is finished syncing, but it’s battery has also been drained. Good luck using it on your commute.
So what do you do next time? You plug it in so it can charge while it’s syncing. But at this point, why not just plug it directly into your computer to sync and charge at the same time, at a much faster rate? So to me, it’s clear that isn’t really a desirable feature, and I’ll bet that some Program Manager on the Zune team came to the same conclusion.
One thing that I will point out, however, is that many times, when you sync, you’re not syncing that much data. Your library hasn’t changed that much, and the only thing that’s being synced is play counts or updated track info or something. In that case, this feature might make sense. The amount of data wouldn’t be large, so the process wouldn’t take long and the battery drain would be minimal. There might be some scenarios where this feature would be useful. However, I think that a lot of people had a knee-jerk reaction and haven’t really thought through the ramifications and technical limitations of that feature. But hey, that’s what we PM’s get paid for, right? :-)
Patrick Has a Wii, or, Experimenting with Microformats
Posted by | Filed under Projects
My friend Patrick managed to get his hands on a Wii, and I am a bit jealous, to say the least. My own weekend Wii hunt did not go well, but I plan to persevere and head back out next weekend. Supposedly the Redmond Target is getting a bunch in on December 17th, so I’ll be standing in line if you want to join me.
However, this post is really meant to be about Microformats, an interesting little technology that allows you to add a bit more metadata to existing markup, ostensibly to provide a better way to work with that data and leverage it in unique ways. I learned about it at the Gilbane Conference a couple weeks ago, and I wanted to do some checking to make sure you could leverage them on your MOSS site if you wanted. Seems like you can, as this post suggests.
If you view this post in Firefox you’ll see a little icon next to Patrick’s picture above. This is done using CSS, but you won’t see it in IE because IE doesn’t support :before and :after. But anyway, this isn’t all that interesting, because I could already do that using CSS. What is interesting, however, is if you go to http://inside.glnetworks.de/2006/06/05/microformats-have-arrived-in-firefox-15-greasemonkey-06/ and download the Greasemonkey script there. Then return to this page, and you’ll see that miraculously the following menu has been added above Patrick’s name:
Nifty, huh? If you’re using that same Greasemonkey script you’ll also notice that the text above about standing in line to get a Wii at Target is an event that you can add to your calendar:
All of the data in the sentence I wrote is wrapped in some appropriate tags that a compatible client reader (Firefox + Greasemonkey script in this case) can parse out and act on. Plus, because it’s well-known markup, there’s a nice backwards compatibility story for downlevel clients. For example, looking at this page in IE is pretty boring, but stuff lights up when you use Firefox and the script.
Anyway, this all goes to show that there is a lot of opportunity for Microformats to take off if there’s better client support. Just consider RSS – now browsers inherently know how to read some markup in the header of the page and automatically detect RSS feeds on a page. It’s not hard to image a time when Firefox will include the functionality currently offered through the Greasemonkey script natively. Plus there’s some great tools already out there for dealing with this type of data. Just check out this link to Technorati, which will automatically parse out the hCards on this page and let you download them as vCards.
I could also write some code that runs on the server and outputs special JavaScript and CSS when Microformats are encountered. Then no client side support would be necesarry. I’ll be looking into this in the next few weeks. Anyway, I think there’s a lot of potential to include Microformats in more places on my site, so keep your eyes peeled. :-)
Hello, visitor from the Internet. You may have arrived here expecting to see a site built on top of SharePoint, and are no doubt confused by the fact that tylerbutler.com is running on WordPress.
You can subscribe to this site in a variety of different ways. The best and simplest way is via RSS. There are three main RSS feeds: