Jeff and .NET

The .NET musings of Jeff Putz

Sponsors

News

My Sites

Archives

February 2007 - Posts

Reflections after almost a year since switching to Mac

OK, so it really has only been about 11 months, but with the new Parallels release yesterday, I do feel like one era has ended for me, and another has begun. Keep in mind that I'm an ASP.NET developer, I've built every one of my desktops ever, and generally well adapted to Windows, as most geeks are. That said, here are some observations. I won't say they're free of passion, because frankly the shiny metal boxes have made me enjoy using computers again.

Macs are more expensive, sort of.
Let's just get this out there now. The cost of entry into the Mac world is a little more expensive. It's just not more expensive where you think it is. Part for part, most Macs end up pricing out about the same as any Dell, give or take a hundred bucks. It's just that, unlike Dell, there are no low-end Macs. When I bought my Mac Pro a few months ago, with its dual dual-core Xeons, the equivalent Dell was actually about $50 more.

The expense for me has been in other related areas, mostly software. I had to buy Parallels so I could run Windows. I had to switch to a different off-site backup service (oddly enough, .Mac is least expensive for my needs). I did have to buy the Mac version of Office, though I admit I don't use it much. You bet I'll buy the OS X update too. Again, in terms of hardware, I feel I got more than what I paid for compared to a Windows machine, but I am paying for some quality software that I already had on Windows.

OS X is more than eye candy, it's just "better."
I have a very hard time trying to nail down why I like OS X better than Windows. Sure there is the stability, security and lack of virus threats thing, but there is something just less offensive about it. Widgets, Expose, the dock, clean lines and textures... it all just adds up. One tangible thing is the way that you don't really have to tweak it. Windows was always about getting TweakUI and doing registry hacks to make it work the way you wanted, where as I don't really do anything to OS X other than shrink the dock. Navigating the settings is so much easier.

Windows on a Mac.
The switch to Intel was huge, and the reason I own Macs today. BootCamp was a great start, Parallels rocked my world, and now with coherence, I have the best of both worlds. I doubt Visual Studio will ever ship as a Mac native version, but in this arrangement, it almost doesn't matter.

The right-click issue, delete key and scrolling.
Holding down Ctrl to do a "right-click" in certain apps is not a big deal. In Parallels you just hold the button down slightly longer to do the same thing. You get used to it. And keep in mind too that this only applies to the laptop. My Mac Pro has a standard Microsoft wireless mouse on it. I don't understand why scrolling on the touch pad, by dragging two fingers horizontal or vertical, isn't a standard feature on every laptop. It's so common sense and simple. It is weird that there is no dedicated delete key, but again, not an issue if you're using a non-Mac keyboard.

Stunning hardware design.
This is really a bigger deal than I thought. I liked my last Dell laptop, but the MacBook Pro is so elegant. It has smooth edges, it's not plastic all over, it's thin and it doesn't have ports on four sides. It feels good in your hands. I know that doesn't make it more useful, but consumer electronics devices are more appealing when they're pretty and functional.

There are some minor things I don't like, like not being able to override the sleep mode when you close the lid, but I did get over that awhile ago. It was also annoying that the initial units had those giant blobs of thermal paste that sucked at getting the heat out, but I did resolve that on my own without much drama.

Very few "What the hell is going on?" moments.
You know what I'm talking about. Those instance where Windows is churning away at you hard drive for reasons not clear to anyone. That never happens in OS X. The OS is responsive almost all of the time. Sure, there is weirdness now and then, but it's not frequent. I'm not suggesting that Windows XP isn't stable, it just does stuff that you can't explain. When I boot my Windows machine at work, it's time to go off and get a beverage or use the restroom. OS X boots quickly, without loading ten thousand little things into the task bar thingie.

Final Cut Pro.
I wanted to edit HD, and Avid's constant compatibility nonsense, dongles and daily updates got annoying. This was my first motivator for switching.

Office compatibility.
I've read of people having issues with using Windows Office documents on the Mac version, but I haven't run into any problems. Granted, I don't use it much, but I do have a Word template with crazy macros (a screenplay template) that works exactly the same without issue.

General Web compatibility.
Stuff on the Web is almost universally functional on the Mac, the only serious exception being Windows Media stuff. I don't know why Apple doesn't work out a deal to put Flip-4-Mac on pre-installed. That's the only issue that I've run into.

The included iApps.
The Apple marketing makes a lot of noise about the iLife apps. I use iTunes, obviously, and beyond that, the only one I use regularly is iPhoto. And I have to tell you, the app is awesome. I'd like it if it could do some tagging tricks more effectively, but I suppose they'd like you to buy Aperture. I played with iDVD once just to get a Windows Media file from my DVR to a DVD, and it just worked. iChat also just works, even with video chat to other Mac users. I did a three-way with the same AIM screen name I've had for almost ten years. Everything "just works" for the most part.

Crazy stuff that isn't well documented.
I learned a couple of days ago that I can type Command-Shift-4, and the cursor turns into a cross hair. Drag and lasso a part of the screen, release, hear camera shutter noise, a PNG of what you roped is created on your desktop. That's one of all kinds of things baked into OS X that I just didn't know about.

Battery life.
I generally get about three hours on a charge, which is usually adequate. That assumes of course that you aren't running your screen at full brightness. I used to get about the same on the Dell, so that sounds about right.

So overall, I'm really happy living in a Mac world. I have beautiful hardware running uncluttered UI, and I can still do the Windows stuff when I need to. I'm a happy camper.

New Parallels Desktop for Mac... coherence final and awesome!

A little over a year ago, the day that Apple announced BootCamp for the Intel-based Macs, I left work at lunch and went to the Apple store to buy a MacBook Pro. I could finally enjoy the wonders of Final Cut Pro and HD editing with more than enough power for Windows-based development.

That was only a half-way step though, and when Parallels released their product shortly thereafter, the game was changed. Big time. No more rebooting, and I was able to do my Visual Studio stuff right there in a virtual machine. However, even this arrangement made me feel a little dirty, being a big fan of OS X.

Well, with the new release of Parallels, I won't feel dirty anymore. Through a feature called coherence, once you boot that virtual machine, all your stuff can run in a window on the OS X desktop, with a dock icon. Even the start menu can be reached from the dock. Seeing as how Mac users tend to be more window driven anyway, it's nice to not have things obscured by the Windows desktop. And that makes things like Expose work better too. F10, and you see every window, including Windows windows, tiled on screen. Sweet.

Check out the video...

http://www.parallels.com/products/coherence/

 

Legit gripe or developer snobbery?

I've been writing about developer snobbery for years on this blog. Would it include this?

http://duggmirror.com/programming/Why_Can_t_Programmers_Program/

It's very borderline. I agree there are a lot of useless people out there. I've interviewed them.

However, you need to be careful about how you conduct this stuff. The truth is that I have no idea what the mod function is in C#/.NET, because in real life I would never use it. That's not to say I couldn't look it up though. Many of the most brilliant code monkeys I know didn't study computer science at all. They may not know design patterns by name, but they'll code your punk-ass under the table with clean and elegant code.

The truth is, if you drilled me on OOP glossary words in an interview trying to stump me, I wouldn't want to work for you. I have readily available code to download online. Read that and then tell me if I don't know what I'm doing.

No Mix for me

After much consideration, I decided I'm not going to Mix this year. The first issue is that I can't find anyone to give me an RSVP code, and I don't really want to spend a grand for it. I might have considered it but the content doesn't apply closely enough to what I'm really interested in, I don't think. Maybe I'm wrong on that, but it'd be an expensive mistake to make.

It's a bummer though, because I sure would enjoy hanging out at The Venetian with my blue friends again. 

Where I work: Insurance.com in the news

Where I work:

The Plain Dealer

(they describe my environment on page 3)

POP Forums: Milestone I

So it's a month and a half later than I had hoped (or several years, depending how I choose to look at it), but I finally got POP Forums to the first milestone in the ground-up rewrite.

My goals for M1 were pretty straight forward:

  • Let go of the legacy that dates back to 2001 and my lack of skill at the time.
  • Be a lot faster.
  • Use template controls whenever possible, even if I had to roll my own.
  • Log moderation and security actions.
  • Include as much of the original functionality as possible.
  • Create search that actually works and doesn't rely on SQL's FullText.

I'm happy to say that I'm there. I'm sure there is some lint, but I'll deal with that. I'm getting the list together now for M2, which will also be the first beta, and I'll let that out into the wild. In the mean time, I'm starting to build a new version of CoasterBuzz around this version, so I can begin "dog-fooding" it as soon as possible.

Something happened this year that I didn't expect: I got a day job that I liked. For all of the contracting and indie work I was doing, I'm surprised at how satisfying it is. For that reason, I didn't act on the forum as quickly as I would've liked.

Still, there were some lessons. The first of which was to ditch the whole Membership/Profile thing. It was too restrictive and slowed me down. It's certainly possible to write a thin wrapper around the forum for these API's, but making the forum itself adhere to it was an exercise pain-in-the-ass-ed-ness. I also learned that unit testing and TDD is a good thing, but making it religion also slows you down and reduces value in the process. Most importantly, I realized that starting at the UI is a really good idea for a Web app. Building this grand class library and making the UI consume it is really stupid because you build code you don't need, or miss the code you do need.

So in a few weeks, when CB is up and running, I'll revisit to finish out the feature list. At that point, I'm not sure what I'll do, but I think I'm going to go back to selling it for some reasonable price. Of course I'll include the code, and use the honor system in terms of downloading it.

There's an instance of a recent build here, complete with data from CB:

http://beta.popforums.com/Forums/
 

Anyone find the calculation for US daylight saving switch?

Due to the geniuses in Washington, we're dealing with a new daylight saving time schedule this year. (Bastards.) That means our clever little apps that translate UTC to local time and back will be broken.

So has anyone figured out how to calculate if a time falls within the adjustment period?
 

An ASP.NET AJAX "ah ha" moment

I've been forcing myself to focus on really diving into the meat of the ASP.NET AJAX framework, and today I had a breakthrough moment.

Unless you've been living under a rock, you know that the framework allows you to declaratively contain normal ASP.NET stuff in an update panel container, and the post-back stuff that normally happens on a page, refreshing the whole thing, automagically just updates a little area of the page instead. Almost no new learning required. Sweet.

But the real strength comes in the ability to hook into the plumbing and do even more cool stuff. There are a ton of samples. I wanted to try something simple, to extend a TextBox control that would update a Label control's text with every single keystroke, via processing on the server. (Yes, I know this is easily done client-side in Javascript, but this was more of a proof of concept.)

At first I was a little frustrated, because the documentation isn't great. It lacks context and direction. If I can find a little bit of time I fully intend to write a tutorial on this. But with enough screwing around, I finally made it work. About 30 simple lines of Javascript, coupled with a fairly simple C# class, and off I went.

The code for use in the page is simple, and every key stroke in the text box calls the server, and the server redraws the contents of the Label:

<asp:TextBox ID="MyText" runat="server" AutoComplete="off" AutoPostBack="true" OnTextChanged="MyText_TextChanged" />
<sample:KeypressExtender ID="KeyPressExtender" runat="server" TargetControlID="MyText" MinimumCharacters="2" />

<asp:UpdatePanel ID="MyUpdate" runat="server" RenderMode="block">
    <ContentTemplate>
        <p><asp:Label ID="Result" runat="server" /></p>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="MyText" />
    </Triggers>
</asp:UpdatePanel>

The trick is really getting in touch with Javascript events, and understanding the fairly detailed way in which Microsoft has created an object model, er, class library. Both. It is one thing but looks like the other. Then it's just a matter of tying together how the client and server get along.

Now that I really get it, I feel confident I can move forward to make neat stuff.
Jobs on DRM

Steve Jobs says we should ditch DRM...

http://www.apple.com/hotnews/thoughtsonmusic/

I'm right behind him on that front. I think that being the third or fourth largest music retailer, it lends some credibility to what he says. DRM gets in the way for legal customers, but doesn't prevent pirates from doing anything. It absolutely floors me that the record companies don't get this. It's very unfortunate, and I doubt Jobs can convince them otherwise.

Quality time with ASP.NET AJAX

I've been playing with the new AJAX extensions quite a bit lately, and overall I'm impressed. In terms of doing post-back-ish type stuff, it's so ridiculously easy to do everything you did before, only without having the full page refresh. That makes you look like an all-star for almost no cost.

Rolling your own stuff is less easy, and sometimes even frustrating. For example, I'd like to update a Repeater with new data as a user types in a TextBox (the server control variety). You can easily wire the update panel to deal with a TextChanged event, but only when the control loses focus (tab, click out or enter). It sounds simple, but I can't figure out how to do it. Looking at the auto-complete sample in the toolkit shows way too much code for way too many possibilities.

I partially blame the documentation. It's thoroughly complete, and thoroughly without context in many cases. For example, you have a topic called "Adding Client Behaviors to Web Server Controls by Using ASP.NET AJAX Extensions", and one called "Adding Client Capabilities to a Web Server Control by Using ASP.NET AJAX Extensions." What's the difference? It's not clear by reading it because the terms "behaviors" and "capabilities" is unclear to me. I'm starting to understand, but there's a serious lack of context.

I guess this learning curve is to be expected, especially with my general lack of ability in digesting information without context. (I'll be honest, I wrote my book for people like me, and the feedback has been good for that reason. Perhaps if I can really get my head around it, I need to write just such a book for the AJAX extensions.)

If I could offer constructive criticism for the people maintaining the documentation, it would be to offer a clearer understanding of how to use this stuff with server controls, because that's the world most of us have lived in since ASP.NET was beta. I understand the strong abstraction that allows you to use the script libraries with any platform, but that's less useful for those of us that have no desire to do so.

Despite my issues, I think the framework overall is good stuff, and I hope I can find the time to really dig in and do "neat stuff" with it. 

More Posts Next page »