Wise on Tech Hacks, scripts and ideas for the refined geek.

16Feb/100

Windows Phone 7 Series

So the cat is slowly climbing out of the bag on Windows Phone 7 Series. I think I'm allowed to say that I've seen it, and that its awesome. The initial set of information was announced at MWC, to pretty rave reviews.

I'm new to blogging about Microsoft, so I won't say any more, for fear of messing up. Follow CKindel on Twitter, and plan to be at MIX 2010 if you're interested in learning more about this pretty revolutionary step in mobile device interaction.

21Jan/100

Stream Video to your iPod or iPhone

Looking for a simple way to stream your (non-iTunes) video library to your iPhone or iPod touch over WiFi? Check out Air Video from InMethod.

The server app transcodes your media on-the-fly so you can consume formats the iPhone OS doesn't support. The newest version even offers experimental web-delivery. The app comes in two parts -- the server that runs on your Mac or PC, and the Client that you install on your mobile device. The server advertises itself over Bonjour, so there's virtually no set-up involved. In practice, files that need conversion before playing start-up on my iPhone within about 30 seconds.

The free client can view only 3 videos from your server. The $2.99 full version has no limits. I'd love to see additional mobile devices exported, but otherwise I'm very satisfied with my purchase.

30Dec/091

AppleTV for Mac

This remains the most popular thing I've ever posted -- despite the fact that its really nothing special. The meat of it is a little start-up script that contains no undiscoverable tricks. I don't even use it any more!
Nonetheless, it's in-demand, and I can't find a hosting method that can keep up. So, here's my solution:

  • The start-up movie is no longer available here -- it probably shouldn't have been posted here to begin with. If you find someone with a Patchsticked AppleTV, it's trivial to SCP in and grab the start-up movie (discussed here.)
    You can also use any other movie you want, which you specify when you edit the script.
     
  • The screen saver never worked right on a normal Mac, but Scott Q has engineered a replacement. His link appears to be down, but get in touch with him and send him your thanks.
     
  • The script itself is still available here.
    Copy and Paste the script into the AppleScript editor, updating it to provide the path to where ever you want your start-up video, and save it as a run-only script. Add it as a Login item in your account, and you're set.
     
  • The background image I made is awful (it was just a screen shot) and I'm sure someone's made better, but I'll keep that here if you want it. If you do this right, you should only see the wallpaper for a few seconds anyway, so if you make yourself an all black image, or find a nice Apple logo, you'll be all set.

And honestly, that's all that was released. Like I said, nothing magical. My Mac Mini worked fine as a Home Theater PC, but eventually I just went with an actual hacked AppleTV (which smoothly handles anything but MKV) because I wanted my Mac for other things. If you find any other great ideas, feel free to share them here!

Tagged as: 1 Comment
9Dec/090

Print to PDF in Windows 7

doPDF is simple, lightweight, installs in seconds and 100% compatible with Windows 7. It may not be feature-heavy, but it meets the need, and I like it.
If converting a document to PDF for archival or sharing is something you need to do, check out doPDF 7.0.

Filed under: Links No Comments
10Nov/090

Super Quick Timezone Change in Windows 7

With my new job, I find myself frequently (twice a week) switching between EST and PST. This can be confusing when planning meetings and other events on my calendar, because I have to mentally keep track of where each attendee is. Often I find myself switching my time zone back and forth using the "Change Date and Time Settings..." dialog in Windows 7.

Wouldn't it be nice if there were a faster way to do the switch? Well, it turns out there is! To do this, we're going to build a simple batch file for each Time Zone we spend time in. Here's an example -- repeat for each zone you want.

  • Open Notepad and enter this code:

@echo off
cls
echo Switching to EST...
echo.
tzutil /s "Eastern Standard Time"
echo Done!

  • Save the file in your C:\Windows directory as: est.cmd
  • To invoke, hold the Windows key on your keyboard, and then press R -- this will invoke the "Run..." dialog
  • Type: est
  • Hit enter

Your clock will be instantly switched to Eastern Standard Time, and if you're using Outlook, your calendar will update too. Once you get used to the keystrokes, you can change time zones in less than two seconds.

Tagged as: , No Comments
5Oct/090

Assorted, Scattered Objective-C Notes as compared to C#

A outlet is like a pre-known property that can be bound
(ie: drag destination object to origin object and assign to the outlet (property) nextKeyView)

myObject.methodToCall(parameters)
is like
[myObject methodToCall:parameters];

int i = myObject.assignValue;
is like
int i = [myObject assignValue];

form.Window(makeKeyAndOrderFront(target));
is like
[[form window].makeKeyAndOrderFront:target];

object myObject();
is like
id myObject;

string myString;
is like
NSString *mystring;

Defining an instance method:
private string myMethod();
is like
- (NSString *)myMethod;

Defining a class method:
public DateTime myMethod();
is like
+ (NSDate *)myMethod;

private float convertAmountbyRate(float amt, float rate)
is like
- (float)convertAmount:(float)amt byRate:(float)rate;

convert.convertAmountbyRate(1.0, 2.3);
is like
[convert convertAmount:1.0 byRate 2.3];

public interface myInterface : myClass {...}
is like
@interface myInterface : NSObject {...} @end

Filed under: Hacks No Comments
5Oct/090

Assorted, Scattered JavaScript Notes

Boolean(value) method returns false for falsey values, true for truthy values
falsy: false, null, undefined, "", 0, NaN
truthy: everything else: "0", "false"

+ as a leading operator converts a string to a number: +"42" = 42. Same as Number("42") = 42), parseInt("42", 10) = 42
+"3" + (+"4") = 7

=== !== do not do type coercion, slightly faster

if (a) {
return a.member;
} else {
return a;
}
can be written as
return a && a.member;
if the first operand is truthy, return the second operand, else, return the first

but for || if the first operand is truthy, return the first operand, else, return the second:
var last = input || somethingElse;
so if input is truthy, then last is input, otherwise set last to somethingElse

you can label loops and break them by label:
myloop: for (whatever)
{
break myloop;
}

//other loop
for (var name in object) {
if (object.hasOwnProperty(name))        //avoids looking at objects we might have inherited from
{
name //is the current member
object[name] //is the current member value
}
}

//multiple conditions in switch statements
switch(something) {
case ";";
case ",";
case ".";
isPunctuation();
break;
default:
somethingElse();
}

//exceptions and object literals
throw new Error(myReason);

throw {         //create an "object literal" creates an exception object on the fly
name: myexceptionName,
message: reason
};

//object literals
an object literal is wrapped in { }
a name can be a names or a value
values are any type
: seperates names and values
, seperates pairs
object literals can be used anywhere a value can appear
var myObject = {name: "Jack", 'goto': 'Jail', grade: 'A', level: 3};
var myName = myObject.name;     //extracts "Jack"
var destination = myObject['goto'];     //extracts "Jail"
var destination = myObject["name"];     //extracts "Jack"
var destination = myObject[goto];       //returns an error because goto is a reserved word, hence the other notation

//maker function
function maker (name, grade)
{
var it = {}; //makes a new empty object, good shorthand
it.name = name;
it.grade = grade;
return it;
}
var myObject = maker("Jack", "A");

//an object with an object as a member, shorthanded
var myObject = {
name: "jack",
grade: "a",
clothes: {
pants: 'blue',
shirt: 'red'
}
};

//if you have more than a couple parameters in a function, why not make them an object?
function myfunc(pa, pb, pc, pd, pe, pf)
myfunc(pa, pb, pc, pd, pe, pf)
vs.
function myfunc(specs)
myfunc({ pa: '1', pc: '3', pb:'2', ... })

** note: variables that are not var'ed become implicitly global

//specify object's prototype on creation? linkage -- doesn't really exist
var newObject = object(otherObject);
//gives it a secret pointer to otherObject, but the secret pointer is used for retrieving only NOT storing
//object (lowercase) is a method that Yahoo made up
//different than

var newObject = Object() which equals: var newObject = object(Object.prototype)

delete myObject[memberName];    //deletes (sets to undefined) a member of an object

myArray[myArray.length] = 3     //appends to end of array (same as pop)

var myArray[]   //creates a new array?

Filed under: Code Snippets No Comments
16Sep/090

Snow Leopard

I haven't been this nervous upgrading an OS since going to 10.1. Snow Leopard cleans up a lot of the underlying architecture of the OS -- but sometimes that comes at the expense of older applications, or those not written to exacting standards.

I understand why they did Snow Leopard, and I dutifully shelled out my $35.99 CDN, but I wasn't surprised when a few of my apps didn't work after the upgrade:

  • AutoMount Maker didn't work right away, but after I installed Rosetta (via an in-OS download) and rebooted it came back to life. Likely its a PowerPC compiled binary.
  • Google Reader Notifier didn't work, apparently due to some uninitialized variables in the code. A patch has been posted in the comments of the author's website, and it works great.
  • Windows Live Sync is the biggest casualty. It won't sign in once you go to 10.6. This is frustrating, since I'm quite dependent on it. Microsoft has acknowledged the problem, but there's no ETA on the fix. I may have to switch to DropBox.

I also have an older version of Photoshop (CS2) that I haven't tried yet, but expect it won't work. Additionally, if you (like me) keep your apps organized into folders, all the Apple apps' new versions will be put in the root of the Applications folder again. If you're Dock items link to the organized executable, you may find that they don't work. Simply over-write them with the new versions.

Its nice to have native Google Calendar syncing, but the way it handles calendars other than your main one (it calls them delegates and puts each calendar under its own header) is ugly and annoying.

Over-all, I'm sure this is an important release, and I know Apple did a lot of work with 3rd party developers to get them ready for this -- app breakage, at this point, is the fault of the application creators. But still, without much new eye candy, this was a pretty annoying upgrade, with not much apparent user benefit. Good thing it was so cheap.

18Aug/090

Windows 7 is Good

Quite simply Windows 7 is really, really good. So good, in fact, that it finally gives my Mac a run for its money. Its a maturation of Vista -- eliminating many of the annoyances, while introducing some great new ideas -- but still not going after some of the more ambitious technologies that were dropped from Vista by the time it was released. In short, this is a cleaned-up Vista -- not a whole new OS.

Still, there are a few things new that are worth the learning curve... and maybe a couple that they probably could still stand to improve.

Good

  • The new Taskbar is fantastic. If the Mac OS Dock and the Windows XP Taskbar had a baby, it would look like the Windows 7 Taskbar.
    It does take a bit to get used to, but I think most people are going to love it. Just like in OS X, your favorite applications get left on the bar -- whether they're running or not, they're sitting there waiting to be invoked. This drastically reduces the number of times you have to dig into the Start Menu to find something you use all the time. Running applications are shown on the Taskbar as before -- in place if you'd already had them there, sequentially if not. They can be re-sorted while running, and the icon indicates if there's more than one window open. Aero Peek lets you look at each of those windows to decide which one you want to bring to the top.
  • On a related note, the WinTray is being re-vamped. This is the list of icons next to the clock on your Taskbar. The new behaviour isn't enforced by Windows, so its up to application developers to change how their app runs, so this transition will be slow. But the eventual goal is to reduce clutter in the WinTray. The application icon in the Taskbar is now the source of notifications and contextual controls. Right clicking on a properly implemented Taskbar icon will invoke the application's menu of actions, and the icon itself can change to a "needy" color to get your attention.
    Some icons will still belong in the WinTray but, as in Vista and XP, you get control of what ones show up.
    If you're used to looking for status notifications next to the clock, this is going to be an adjustment. I've already missed a few IMs because I wasn't watching my Taskbar icons -- and this is maybe my first complaint. The "needy" state is shown with a fairly subtle orange glow. It looks pretty, but its not nearly as attention-grabbing as the bouncing/badgeable Dock icon in OS X.
  • The Control Panel continues to get cleaned-up, and that's always a good thing. But I've never liked how Windows, by default, hides control panels into categories. This introduces a "beginner" and "advanced" mode for the Control Panel, which is a UI no-no. Just make the default UI better, guys!
  • Networking is really cool now. Apple's use of ZeroConf is insanely great, and I wish everyone would implement it, but Microsoft has done a fantastic job of a more brute-force auto-discovery. It finds all sorts of devices on my network, and then uses the Internet to look up more information about them. Vista had a similar feature, and it was cool, but Windows 7's is even cooler.
  • Libraries are a little awkward, but I think they're a step in the right direction. Most people don't actually keep all their documents in "My Documents" and most people don't actually keep all their pictures in "My Pictures." Libraries let you mark any folder as belonging to the Documents/Pictures/etc... library, automatically indexing them for fast searching and easier retrieval from the Start Menu. Even network shares can belong to a Library, as long as their set-up for offline use.
  • Boot times and wake-up times are much faster than Vista. We have a small laptop with a slow hard drive. With Vista, waking up from sleep was painful. We'd open the lid, have a meal, and by the time we were finished it would be ready to use. In Windows 7 boot is noticeably faster, wake is exponentially faster.
  • Actually, everything feels snappier in Windows 7. Apparently, it doesn't benchmark any better, but they've moved more of the UI processing to the GPU, allowing the system to feel more responsive, even if its working hard in the background. Mac OS X made similar moves starting in OS X 10.4, and Vista did make a big deal of GPU use, but with Windows 7 they really seem to have gotten it right. I use my machine hard, and its very rare that the UI ever feels blocked or sluggish.
  • There are other cool features buried in Windows 7, but I predict that the average home user won't be touching them any time soon: media streaming is pretty cool, but you have to have a pretty Microsoft-centric household for it to be useable. Media sharing continues to improve, as does the Media Center, but these are somewhat niche features at the moment.

Not As Good

  • Networking is still frustrating. If your network provides a happy, simple path to connecting, you won't have any issues with Windows 7. If you need to do any advanced configuration, you'll be frustrated that, yet again, getting to the actual Network Connection properties is even further hidden from you than in Vista. Its great that things have been simplified, but sometimes I want to right click on the connection and manually change some settings. Windows 7 seems determined to make that difficult. No other OS does this, and Windows shouldn't either.
  • They've removed a lot of the cruft that used to come with the OS. This is generally a great idea, but I miss a couple things. For one, there's no Mail client that ships with Windows. None at all. You're supposed to go download Windows Live Mail. I understand why they did this, but sometimes its handy to have a quick and dirty mail client built-in. Similarly, Vista introduced a Calendar app, and Windows 7 discarded it. Calendaring in OS X with Apple's built-in iCal is wonderful, supported system-wide, integrated well with all their apps, and supports open standards for publishing and subscribing. Vista's Calendar seemed like a tentative step in that direction, but then they abandoned it in Windows 7 and offered no alternative -- save for Microsoft Outlook. One might be led to think that they were wary of doing Calendaring right at the OS-level because it might cannibalize sales of Microsoft Office.
  • The Start Menu continues to be a pet peeve of mine in Windows. I like the concept -- in fact, I usually adjust my Macs to have a Start Menu-like folder in the Dock -- but I absolutely hate the way Microsoft insists on organizing it. Even if you try to re-organize it, apps will put themselves back where Microsoft thinks they should go. This is not unique to Windows 7, but I sure wish they'd fix it.
    There are some improvements here though -- with pinned apps now being able to expose pop-out menus of recent documents, even if they're not running.
  • Windows Media Player. Really, does anyone understand the UI on that app? I launch it to watch movies, and close it as soon as the movie is done, because just looking at the interface gives me a headache. Also, why can't I hit spacebar to Play/Pause my show? Why do I have to fumble around for the mouse, then acquire the relatively small Play button?

And that's it... that's all I can think of that bugs me. Over-all Windows 7 is rock solid, super stable (Explorer crashes on me maybe once a week, but starts right back up where I left off.) I've yet to see a blue screen, or have driver issues. In fact, they've drastically improved driver handling, and I don't think I've even once had to look in Device Manager (although a friend trying to install on a slightly older machine has reported some headaches, so YMMV.)

For the install itself, I did a clean install, rather than an upgrade from Vista. Upgrades are supported, but clean is so much better. The whole thing was pain-free, took less than half-an-hour, and left me with no concerns about whether or not I'd configured everything right. In fact, it was quite like an OS X install -- just point at the drive you want it on, and let it rip. No questions asked, it just works.

If you're running Vista right now, you need to go Windows 7.
If you're running Windows XP on newer hardware, you need to go Windows 7 to get the most out of your machine.
If its an older machine, and its running XP well, maybe you should just stick with what works. But when you're ready to upgrade, you'll want Windows 7.

In short, Windows 7 is for everyone. Maybe you don't need it today, and I wouldn't throw out a Mac for Windows 7, but the two OSes really do stand shoulder-to-shoulder now, and I'm happy to have Windows 7 in my technology family.

Tagged as: No Comments
24Jun/090

Staying In Sync

What do you use to keep multiple computers in sync? I think I've got a pretty good toolset down. Here's what I use...

Mail: Google Apps for Your Domain IMAP access. Same mail on my phone, both computers and on the web.

Calendar: Google Calendar. Sync tools or ActiveSync access are available for virtually every platform.

Bookmarks: XMarks (formerly FoxMarks). Google had a plug-in for FireFox that worked great, but they've stopped development. XMarks now has IE support.

Documents: Windows Live Sync (formerly FolderShare) works very well for a subset of our documents -- its PC and Mac, despite its new name. Mozy back-ups archived stuff.

Media: iTunes sync/sharing with our iPhones and the AppleTV for music and movies. iPhoto pushes to Flickr and Facebook, and I keep a manual back-up as well. A UPnP service running on the media computer lets us share content with the XBox and PS3.

Until recently I was using Plaxo for keeping my Contacts in Sync, but they've killed their offering by making it a "Premium" service. Now I'm stuck manually exporting my Google Mail Contacts to CSV and importing them into Outlook periodically until someone comes up with a better option -- there's a few out there, none work well.

Side rant about MobileMe: I tried to hard to make a go of it, but the service just sucks. iDisk is abysmally slow -- especially when compared to DropBox or Windows Live Sync. Calendar syncing is all or nothing... so its nothing. Only the Contacts sync works well -- but not $100 a year well.

Filed under: Articles No Comments