Uncategorized

Pulled the trigger and bought a Mac – now where to buy RAM?

Thanks for everyone’s input today about what Mac laptop to get. Here’s what I ended up getting:

MacBook Pro 15.4″
2.16 GHz, 1 GB RAM, 120 GB Hard Disk, 128 MB graphics card


After people pointed out some good reasons to go for the Pro, the decision was then about the higher-end version or not. The benefits of the more expensive version would have been a faster processor (2.33 vs 2.16) and a 256 MB graphics card. The faster processor didn’t seem worth the extra price. The extra graphics RAM was more tempting, I don’t know, maybe I should have gone with that instead. As someone pointed out, the upcoming CS3 release from Adobe is going to have more intense graphics requirements, which was one reason to go for the Pro vs. non-Pro. Maybe once I get CS3 I’ll have wished I went with the 256 MB graphics RAM. But I figure I’m gonna drop 3 GB of RAM in there, so I should be able to run whatever the hell I want without problems.

So one more question for people out there: where should I buy a single 2 GB stick of RAM for a MacBook Pro Core 2 Duo?



Someone pointed out macsales.com, and I was checking out the different options. There are three different options I could go with. I’m not a RAM expert, so I have no idea what the benefits and drawbacks for any of these choices are. Here are the choices:

  1. $260 – Other World Computing Brand
  2. $340 – Micron
  3. $450 – Samsung

Crucial’s got a 2 GB stick for $355.

They all look exactly the same to me. The only difference I can spot is that the Micron option says it’s “128 x 8” versus the other two are “256 x 64”. I have no clue what this means. Is there any reason to not go with the cheapest option?

I’m going to be using the 1 GB stick of RAM that comes from Apple and just adding the new 2 GB stick I buy. Is there any brand that would play better with the 1 GB stick from Apple?

Standard
Uncategorized

About to buy my first MacBook, any thoughts?

MacBook Pro

MacBook Black

I’m about to pop my Mac cherry. It’s time for an upgrade from my old Toshiba Portege m200 tablet that I’ve had for about 3 years. I’m trying to decide whether to go with the Pro or non-Pro version of the MacBook, weighing the pros and cons of each. This is yet another case of a long-time Windows user switching to a Mac. The last Apple computer I had was an Apple II E. For a variety of reasons I’m switching, but the Paralells virtualization software is a driving force that got me to actually make the decision.

Size
I like a small laptop. I have a 24 inch widescreen monitor on my desk, which I use most of the time if I’m working at home. Over the past few years I’ve come to really appreciate the small form factor of my current laptop. It’s a 12-inch display and it’s light (just over 4 pounds). That 12-inch display packs a 1400 x 1050 resolution, so that’s sweet for a laptop that small. Part of the reason I really value the small size is that for the past 2 and a half years I’ve been commuting an hour each way via train to work every day. I often work on the train, so being able to easily carry around my laptop and pull it out without breaking a sweat has been important to me. That said, I’m not going to be commuting any longer, so maybe the small lightweight aspect isn’t as important to me anymore.

In terms of MacBooks, I’m deciding between the 13-inch MacBook and the 15-inch MacBook Pro. The 17-inch MacBook Pro is out, I’m not even considering something that big.

Should I get the best?
As a tech junkie it’s always hard for me to not buy the hottest thing available. In the computer world you always pay a premium for the newest, fastest machine. But you know you’ve got the most badass thing you can get. My roommate works for Google and gets a free MacBook Pro for work. I have the opportunity of getting a better one 🙂

I have an itch to get the fastest machine I can get with the most RAM I can get. So now I’ve got to control my desire and hold off on buying a $3,200 laptop (most expensive MacBook Pro config I could get) until I consider whether it’s actually worth it.

As I see it I have 3 options:

  1. $1,756 – 13-inch black MacBook @ 2 Ghz
    2.0 Ghz, 2 GB RAM, 120 GB drive
    The best non-Pro MacBook available. 2 GB RAM through Apple is only slightly more expensive than doing it through an external vendor, so it’s worth the convenience.
  2. $2,393 – 15-inch MacBook Pro @ 2.16 Ghz
    2.16 Ghz, 3 GB RAM, 120 GB drive
    Includes $355 RAM upgrade from Crucial (one two-gig stick).
  3. $2,893 – 15-inch MacBook Pro @ 2.33 Ghz
    2.33 Ghz, 3 GB RAM, 120 GB drive
    The fastest processor with the most RAM I can get. Includes $355 RAM upgrade from Crucial (one two-gig stick).

[Note: these prices include an educational discount I get for being an employee of Stanford University, and they all include the extended AppleCare plan.]

I’m currently leaning towards option #2, but trying to determine if it’s worth $640 more than option #1. There’s a part of me that wants to jump at the 2.33 Ghz version just because, but is that really worth an extra $500? I can buy a lot of booze for $500.

Hard drive
I’ve got a 600 GB external drive, so I’m not putting a priority on the internal drive space. I’ve got 50 GB on my current Windows disk that I’m going to transfer over with Parallels Transporter. So I figure I can deal with a 120 GB disk just fine.

RAM
Each of those options has the most RAM you can stick into the machine. The 13-inch MacBook can only have a max of 2 GB. The 15-inch Pro can have a max of 3GB. Something sneaky is that you can’t order the 2.33 GHz machine with one one-gig stick of RAM (but you can for the 2.16 GHz machine). I can get a 2GB stick from Crucial for $355. This means if I get the 2.33 GHz machine, I end up with one one-gig stick that I don’t use. Versus the 2.16 GHz machine allows me to only order one-one gig stick, so I’m not paying for something I’m just going to throw away (I’ll pretend I’d try to sell it on ebay, but I know I’m too lazy). Another option would be to just get 2 GB of RAM instead of 3. I’m definitely going to get at least 2. My current Windows laptop has 1 GB and when I run Flex Builder in Eclipse, Flash 9, Photoshop, and Illustrator all at the same time it gets a little unhappy. So if I want 3 GB of RAM that pushes me toward the 2.16 GHz MacBook Pro. Is it worth it? I don’t know, I suppose I could always upgrade later.

Display considerations
I like high resolutions, even on small screens. The 1400 pixel wide resolution on my current 12-inch screen is awesome. I’m young and have good eyesight at close range, so I like the screen real estate and don’t have trouble reading the small text. The 13-inch MacBook has a resolution of 1280 x 800. The 15-inch Pro has a resolution of 1440 x 900. And obviously the Pro version’s screen is physically larger. This pushes me toward the 15-inch Pro.

I have a 24-inch monitor that requires that my laptop be able to output at least 1600 x 1050 (which my current laptop was barely able to do, with some tweaking). Both MacBooks can output to high enough resolutions for external displays. The non-Pro can output up to 1920 x 1200, which is enough for me. The MacBook Pro can output a ridiculous max resolution of 2560 x 1600, far more than I need. This one’s a tie.

I was talking to someone at 360Flex and they told me that the non-Pro MacBook can only mirror the screen when using an external display, not extend the desktop. Maybe this used to be true and got an upgrade, because looking at the specs on Apple’s site it says that both the non-Pro and the Pro can do mirroring and extended desktop. While I don’t use my external monitor and my current laptop screen at the same time very often, I do occasionally, and I certainly want that option. I’ll assume the Apple specs don’t lie to me, so this one’s a tie.

So I guess I’ve got to decide if the better display, the slightly faster processor, and the extra gig of ram are worth $640. Or maybe I’ll impulsively buy the fully pimped out 15 incher. If anyone has any thoughts that might help me decide, let me know. And if anyone knows the cheapest (but still reliable) way to get a single 2GB stick of RAM for a MacBook Pro, hook me up.

Standard
Uncategorized

Why I don’t read books

I’ve never read a programming book. I realized this when I got sent a promo copy of the Flex 2 with Actionscript 3 book from Friends of ED. [Side note: start blogging and you get sent free shit.] I was flipping through the book and I realized, wow, I’ve never read one of these before. So it got me thinking about why that is. Clearly people learn programming stuff through books, there’s got to be a market or else they wouldn’t make the books. Am I the norm or the exception?

Timeliness
First I figured this was because this was a Flex book. I’ve been following Flex for a while now, and the newest information has always been online (like any emerging technology these days). So in a sense everything contained in this book has already been written one way or another. The newest information will never be in print, that’s just the nature of the web. If I want the newest info on Apollo I’m going to read the alpha release docs on Adobe Labs, or Mike Chambers’ blog posts, or watch the apollocoders mailing list. The Apollo books are coming, but they’ll always be a big step behind what’s available online.

But then I realized I’ve learned bunches of other stuff that wasn’t brand new. When I was first learning PHP and MySQL there were tons of great books available. But for some reason I never bought a book. Maybe I’m just too cheap (discussed below). Or maybe I’m just too lazy. My bookshelf doesn’t have any programming books (at home or at work). The only books I’ve ever partially read were for some CS classes at school, but that was more to make sure I got the info that was going to be on an exam.

The copy/paste factor and learning by doing
Whenever I’m learning anything computer-related I’m doing it as I’m learning it. That’s the only way I can learn, and I’d be surprised if you find anyone who’s all that different (when it comes to computer programming). You’re not going to learn how to program Actionscript or use Photoshop by reading a book without having one hand on the mouse the entire time. So that means you read at your computer, with the book next to you? Or you read a chapter, then go and try it out on a computer? As I was flipping through the Flex book, I saw lots of Actionscript code. There’s an entire example app that gets created in that book. Cool, but that’s pretty much useless to me without being able to run the code myself, and tweak it a bit and see the results. You’ve got to be able to copy and paste the code and run it yourself. Book publishers know this, so they include downloads or CDs with the code. But now I only need the book for the non-code pieces, which brings me to my next point.

Learning from code versus learning from written paragraphs
I’d be interested in getting other developers’ perspectives on this, but I was thinking about how I learn and whether I learn more from example code or from written text describing the code and the method of programming. If I were to rate learning through code or learning through text, each on a scale of 0-5, I’d give learning through code a 5 and learning through text a 1. If a tutorial doesn’t have code I don’t read it. I think Google code search is the best learning resource ever.

So if we look at the ratio of text to code in this book, I’d say it’s at least 50-50 text-to-code. I’d be interested in seeing the ratio of comments-to-code included in the Flex framework source files. In terms of learning Flex, the framework source is the single most valuable resource I’ve had. They commented the hell out of it, but the code is the focus. You want to learn how the ComboBox component animates the drop-down menu when it gets selected? Go and read the source of ComboBox.

On-demand learning
I don’t know what I want to learn tomorrow. I might play with some custom components I’m working on, or play with Flex mapping components, or explore how to deploy my apps as Apollo apps. Or I might not ever learn any of that stuff and I might go off on some other tangent instead. So am I going to get a book about any of that? No. Am I going to read tutorials and comprehensive guides before I start playing? No. I’m going to start a project, try to do what I want to do, and when I can’t figure it out I’m going to look up what I need to know. Which brings me to my next point.

Learning in tiny bits
Books are too long. There’s just too much information in them. I learn in tiny nuggets, and I only learn the stuff that gets me to the next step in a project. If I’m working on a project and I need to figure out how to pull in an RSS feed into a flex app then that’s exactly what I want to learn, and only that. Once I get stuck at another point then I’ll go and figure out what I need to get past that point. But I don’t want to read a book that tells me in generic terms how to use a technology. I might never use half the information in a book, so why would I waste my time learning it?

The web gives me tiny bits of info that I need. And if you’re searching for programming information on Google, you can pretty easily figure out how to search and get directly to the result you need. It’s rare that I try to look something up on Google that I can’t find the answer to (obviously it happens, at which point I post questions to mailing lists). And the number of tiny bits of information is amazing. Whether it was a question someone answered on a mailing list, or a blog post, or an example in official documentation, somewhere someone has shown you how to do almost everything you want to know. And often you can find an answer to a specific question without wading through irrelevant content. Google is like learning surgery as you’re cutting, books are like medical school.

I’m a cheapskate
And I don’t like paying for something I can get for free (wow, that statement applies to so many other things). Everything you need to learn ANY programming language is available for free online. That said, book publishers can feel free to send me free shit, I like getting stuff for free, even if I don’t really want it.

I guess it just boils down to how different people learn. I’m sure tons of people have had great experiences learning from books. I just don’t get it. I can’t figure out why I would want to buy a book and read it when I can learn everything I need to learn by going online. So I don’t know, am I the norm or the exception?

Standard
Flex/Flash/Actionscript

Why I LOVE Flex – Charting example

Oh man. Take a look at this example I whipped up last night. This takes the google-finance-esque charting example from Brendan Meutzner and steps it up a notch. Now we’ve got two sets of charts, overlapping each other so we can easily compare the data. Drag the selected range of either of the charts using the sliders on the bottom portion and you’ll understand what I’m talking about.

This took me literally 3 hours to whip up. Hot damn. Show me an example like this in AJAX that didn’t take months to create. Hell, just show me an AJAX example at all.

This is a real application, not just a pretty demo. My girlfriend is a clinical psychology Ph.D. student at UC Berkeley. She’s running some psych studies and needs to compare data they captured from different subjects in the study. So as I’m talking to her last night and she’s describing what she’s trying to do, I think, gee, that sounds like it would be a sweet little Flex app. (In case anyone’s wondering, the sample data I published here is not from real subjects, so don’t get all privacy-advocate uppity on me) So I get to play with fun charts in a real-world scenario, and UC Berkeley gets some free Flex work.

Anyway, click the screenshot below (or this link) to launch the example. Right click to view source, or view source here.

chartcompare_screenshot.jpg

Standard
Flex/Flash/Actionscript

Try to read this code

I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line:


vm.bottom = o.bottom + (isNaN(btb) ? 
  (controlBar && !isNaN(btt) ? btt : isNaN(btl) ? bt : btl) : 
  btb);

Honestly?

I’ve used conditional expressions a lot, and even nested conditional expressions occasionally, but adding that third level of nesting makes a line of code that I can hardly read. My head almost exploded.

Standard
Flex/Flash/Actionscript

Flex Panel component with ControlBar docked to the top instead of bottom

Today someone asked on flexcoders if you can make the Panel component dock the ControlBar component to the top of the Panel instead of the bottom of the Panel. The short answer is no, you can’t. The longer answer is you can extend Panel and make a few minor adjustments and then yes, you can.

Here’s an extension of the Panel class that allows you to specify a new property: controlBarPosition, which can either be “top” or “bottom”.

The one caveat about this class is that if you set the control bar to be placed at the top, you should set the roundedBottomCorners style of the Panel to false. Otherwise the bottom corners of the control bar will be drawn rounded as well, which looks kind of weird if they’re not at the bottom of the panel (if you’re curious why take a look at the source of mx.skins.halo.HaloBorder, around line 470).

View the source.

This movie requires Flash Player 9.

Standard
Flex/Flash/Actionscript

ImageMap component added to FlexLib

I’ve added a new Flex component to FlexLib: an ImageMap component that is an attempt to replicate client-side image maps in HTML. If you know about image maps in HTML then this component should be self-explanatory. Basically it lets you define clickable areas of an image, either rectangles, circles, or polygons. THe component dispatches various events for those hotspots, such as mouse over, mouse out, click, etc. So you can capture the mouse events and do whatever you want, like launch the link by using navigateToURL(), which is what would most closely resemble the HTML image-map functionality. But you can also do anything else you want when the event fires.

I tried to make it so you could basically just copy/paste the HTML code that you have for an existing client-side image map. So your MXML might look like this:



    
    
     WA
     OR   
    
  
  

You define the

attribute either using MXML or AS (I used MXML in the example above). Then within your map tag you have a series of

tags. Each area tag should have a shape attribute and a coord attribute. Basically you should be able to generate your image map in whatever you use already (DreamWeaver, etc) and just copy and paste it into your MXML Flex app.

View the documentation
View the source of the example MXML file.

To get the source of the ImageMap component, download the FlexLib project from Google code.

Here’s the example:

This movie requires Flash Player 9.

P.S. I stole the image map of the USA from the fine people at HotPads.com. Don’t sue me guys!

Standard
Flex/Flash/Actionscript

FlexLib demo shown at 360Flex Keynote

Just thought I’d do a quick post with a link to the demo of FlexLib components that Ted Patrick showed at the keynote on the 3rd day of 360Flex. The demo shows most of the components currently in FlexLib. Right now my brain’s a little too fried to remember if there’s stuff in the library that I didn’t include in the demo. Check the source out of the svn to actually get the source for any of these components.

I’m planning on including the rippling water effect in FlexLib as well, along with the smoke/fire effects. But those aren’t in there now, I’ve got to find some time to work on them a bit more before they’re ready to go.

Anyway, here’s the demo.

If you want more info on FlexLib, read over the wiki pages on the project page. If you have questions just email me. If you want to contribute your code (and you all should!) then read the wiki page about contributing. Basically you’re going to send us your code (or a link to your source) and we’ll start integrating it into the library. Once we give your code the FlexLib stamp of approval you’ll get set up as a contributor and you can submit code to the repository yourself.

360Flex is now over, I just got home from San Jose, my head’s still spinning, bed is calling. I might try to write up my thoughts on the 360Flex conference overall and eventually do a post or two. Or not, we’ll see. Gotta say it was sweet though, good times all around.

Standard
Flex/Flash/Actionscript

My RSS Reader featured in 360Flex keynote! Here’s the newest version with smoke

This morning was the kickoff of the 360Flex conference. I got an email last night from Mark Anders from Adobe who was giving the keynote letting me know that he was going to show the RSS Flex app I made during the keynote. SWEET! I was excited to see it up on the big screen this morning.

Here’s a photo of Mark presenting the RSS reader:
360Flex Keynote

Be sure to check out the 360Flex photo stream on flickr for more pictures from the conference.

He got to show off the newest version I updated a bit. I added the colored smoke effect last night. And during the day today I made a slight change to the rotation effect. It now rotates either left or right, depending on if you click an icon to the left or right of the currently selected icon (thanks to Alex Uhlmann for this suggestion). And it defaults to load the Flex category when it first loads, because we all know that’s the most important category.

View the newest version here.

The whole day overall was awesome, thanks a million to Tom Ortega for getting this whole thing together. I enjoyed the sessions today, but even more I enjoyed meeting a lot of the people I’ve only known through blogs or email. I got to pass out a bunch of my ridiculous business cards. If you haven’t said hello, find me at the conference over the next two days. I still don’t have any challengers to show me a more ridiculous Web 2.0 business card, so I’m going to claim the title until someone steps up to the plate and hands me something utterly ridiculous.

Standard
Flex/Flash/Actionscript

New Flex Component: Convertible TreeList

Here’s a Flex component I made a few weeks ago and never got around to blogging about. It’s included in the FlexLib library. This is a component that combines the List and Tree controls that are included in the framework. This was inspired by the left nav menu of the new Flex Style Explorer. That app has a navigation menu that can be displayed either as a Tree control, if there is enough space, or a list of icons if we need to conserve space. I figured that was a great way to display the same data two ways.

So you can have one component, set the dataprovider once, and you can switch it between showing the data as a Tree, text-only List, icon-only List, or a text and icon List. You can set the mode property of the control to determine how it displays.

So what?
It came to my attention today that the reason for this component isn’t as obvious as I thought. So I’ll try to explain. This component is for the situation where you have a list of items in a Tree, but you might want that Tree to take up much less horizontal space, so you want those items to be displayed as a straight List of text or icons instead. Normally what you would do is have two controls, a List control and a Tree control, set the dataproviders separately (since a List can’t take heirarchical data) and swap one out for the other if you wanted to change them. This component makes it so you don’t have to do any of that swapping yourself, it’s done for you, and all you have to do is set the mode property of the control.

Take a look at the documentation on FlexLib. Here’s a direct link to the source code of this component in FLexLib. The best way to get it though, is to check out FlexLib from the SVN repository.

Here’s the example. The top component shows how you can dynamically set the mode. There are four options, Tree, text List, icon List, and full List. The bottom examples shows a more real-world example where you would want to change the mode depending on how much space you have available.

This movie requires Flash Player 9.

P.S. Thanks to Jeffry Houser for donating the flexlib.net domain!

Standard