Awhile back I got the idea for a website where there was a unicorn which would be shaded based on its current mood. The whole idea was like a mood ring but with a unicorn. Well, ladies and gentlemen, I present to you:
This is a prototype but you get the idea.
If you can afford ~$15 (USD) a month I highly recommend you follow my guide here and use Usenet instead of BitTorrent. Really, using Usenet is worth it, I promise.
Regularly scheduled program:
This past week, I started hacking my Apple TV. Really, I wanted to stop giving Comcast $85 a month for cable which I did not really watch all too often. I am going to write a longer post concerning my experiences and such later this week, however, there is one use of the Apple TV which I have found immensely useful – a BitTorrent client. Really, it’s very useful to have my Apple TV downloading torrents, silently, without the need to use one of my other machines.
The problem I ran into, however, was the fact that the last stable compiled version of Transmission for the Apple TV (or that worked on the Apple TV, rather) was v1.06. It worked but, 1.06 is old and I wanted something newer.
Without getting in the details, versions of transmission > 1.06 require the new version of libcurl provided in OS X > 10.4.8 which the Apple TV is using. Therefore, I grabbed the needed items and compiled myself a statically-linked version. I still ran into issues compiling the newest version; I randomly grabbed 1.51 (which is from THIS YEAR, at least) and compiled it on my 10.6 machine. I will work with getting something newer; this is a start.
Everything worked, so here is the download link for anyone who would like it, enjoy!
A few notes:
- Unlike the older versions, clutch is built-in
- You will need to place the ‘web’ folder somewhere, run “chmod 755″ on it
- Run the command (without quotes)
- Edit the transmission config file (/Users/frontrow/Library/Application Support/transmission-daemon/settings.json) and change the line with “rpc-whitelist” to
- The included transmission-remote is a command-line utility to interact with the daemon
This is going tobe a quick rant.
In my line of work, I deal with a couple of vendors who have sold my employer .NET (ASP 2+) applications and utilities (both of which are usually written in C#). I appreciate the fact that .NET makes a lot of stuff pretty quick, trivial and really maximizes the time of each programmer using it. Also nice is the fact that .NET works well on any machine with .NET installed (and even in some cases, Mono).
What annoys me is the fact that programmers, I think, often rely on the fastest and least efficient solution instead of looking at the problem and finding the best solution.
For instance, one application with which I am working puts out a huge (200MB or so) XML file. Problem is, the data source which is the “feed” for this XML has some quirky data which results in elements/nodes needing to be removed. The vendor “gave us help” and provided a utility which strips the bad stuff out but it also reads the ENTIRE XML file into memory. Based on what is happening, it looks like they are using the XmlDocument class.
Yes, that class is useful and I am sure it’s useful to have the whole XML file in DOM and in memory. It’s really bloody inefficient, though. Yes, it’s simple to use but the compiler is doing a lot of complex things. Instead, my solution:
- Open file
- Read line-by line
- Look for bad data
- Keep track of where “it” is relative to the current element
- If the element is “OK” flush it to a temporary file
- Overwrite the input file with the temporary file
All said and done, it takes about 1/3 the time and about 1/30th the memory. Plus, the vendor hard-coded the items “to look for” in the application. Seriously, using an App.config file is trivial in .NET 3.5 and there is no reason this should not use 3.5 since it’s a stand-alone console application.
Just because it looks simple to the programmer does not mean it’s simple for the computer, too.