The Source for Java Technology Collaboration
User: Password:



Kathy Sierra's Blog

January 2004 Archives


What's so bad about making it easier to learn Java?

Posted by kathysierra on January 19, 2004 at 12:55 PM | Permalink | Comments (26)

I was talking with author Dori Smith recently, and it turns out we both experienced a similar phenomenon: angry email and online posts about how we were making it too easy to learn Java. But is that really such a terrible thing? I know there's a lot of on- and off-line grumbling about whether it's a good idea to "teach the unteachable" or try to encourage "people who have no business programming in the first place."

Yes, this is an old debate (I like what Simon Phipps had to say after JavaOne), but my being on the receiving end of some of the anger is still kind of new to me, so I'd like to hear more about what's driving this mini-backlash against the new wave of books and developer tools intended to bring the not-quite-C++-gurus into the Java fold.

Is this in fact "dumbing down" and de-valuing the Java language and/or de-valuing Java programmers? Should we (Dori and I, and all other folks who try to teach Java to others or who build tools like Project RAVE) deliberately impose artificial barriers to entry to help guarantee that only the best and brightest can ever write Java code?

Is it really true, as some claim, that managers everywhere are going to snap up these one-step-beyond-supersizing-it programmers and toss out all the ones with real knowledge and skills? Is it true that if one needs a gentle introduction (or at least a different *kind* of introduction) to, say, the world of OO development, that it means he has no hope of ever becoming good at it?

Is there no way a Java developer can be any good without a CS degree? (Although there's always a certain amount of snobbery on both sides -- the CS grads (who may not have had real world experience) vs. the hard-core real-world vet who doesn't need no stinkin' degree.) Is there only one True Path by which a human can become a good Java programmer? And if there is, WHO decided what that path was supposed to look like? Is it possible that the path looks like that simply because... well, simply because it always HAS looked like that?

I might be kidding myself, but I like to think that *anyone* who is capable of learning to do this, and has the passion and interest in working at it and growing and improving, deserves the chance. Just because someone needs (or maybe just WANTS) an easier, brain-friendlier way to get started doesn't automatically mean that person is an idiot/dummy. And it doesn't mean that this person is doomed to write terrible code for life, bring large-scale projects to their knees, and signal the final dealth blow to the careers of seasoned developers.

OK, it sounds like I'm being melodramatic, but these are almost verbatim statements I've heard. But the weirdest thing for me is that some of the more vocal complainers I've heard from act as though they themselves were *born* with their knowledge and skills. But once upon a time, they too were absolute beginners. Everyone has to start somewhere.

Roger Schank, one of my favorite AI professors (founder of the Cognitive Science Society, former director of the Yale Artificial Intelligence Project), claims that the whole approach to teaching (and especially technical subjects) in higher ed in the US is almost completely contrary to everything we know about how the brain works. He claims (and the learning theories certainly seem to back this up) that students learn *in spite of* the ways in which complex subjects are taught in school, rather than *because of*. So, why do these methods still persist in universities? He believes there is a certain amount of, "Well, *I* had to suffer through it like that, and by god, SO WILL MY STUDENTS." And the whole thing just propogates forever, including extending into corporate training.

I guess I'm really bringing in multiple arguments here, so I'll try to summarize the main questions I have:

* Is it wrong to make it easy for those without a formal CS background or years of programming experience to learn Java and/or OO?

* Is it wrong to make learning a complex (and serious) technical topic *fun*? Does it degrade the topic? Does it degrade/insult those who worked hard to become expert at that topic?

* Now that just about all C/C++ programmers already know Java, who are these next 7 million going to be?

* Assuming there *is* at least *some* danger (and I believe there is) that some will come in to programming jobs lacking the understanding and appreciation we know they need, is there something we can do?

* In other words, rather than complaining that these next 7 million are going to be our downfall, can we take steps to help the new folks learn and appreciate more of the art and craft of OO development?

These new folks are going to need not just some "how-to" skills, but also "what-to" and "why-to" and "when-to" understanding. I'm not buying the whole sky-is-falling idea, but still, the concerns aren't completely without a basis. So, what can we do to help?



MIDP 2.0 is just too much fun.

Posted by kathysierra on January 14, 2004 at 08:52 PM | Permalink | Comments (9)

I've spent the last few weeks playing with the Wireless Toolkit and MIDP 2.0. I've been in EJB-land for the last several years, so it's quite a shock going from big ol' gravel-hauling apps where it takes about a dozen objects to do Hello Bean, to these tiny little things where each object is precious.

But man oh man is it ever fun! The MIDP 2.0 Game API is so easy to use. In about 15 minutes after flipping through the API and the MIDP spec, I built a multi-frame animation, fully user-controllable, with automatic double-buffering, in about a dozen lines. And that 15 minutes includes creating the graphics! Until I started playing with it, I really had no idea how simple and clean it is to use GameCanvas and Sprite.

Of course, developing and deploying games for *real* devices is a *lot* more involved--I'm just using the emulators that come with the Wireless Toolkit. But I'm paying attention to the JTWI spec and trying to work within the constraints recommended for portability. And there's that little issue of, well, virtually no devices in the US that currently support MIDP 2.0. Still, I haven't done something so quickly and simply since the old Applet days. Except that was Java 1.02, when I had to walk uphill in the snow both ways to do my own double-buffering and, oh yeah, roll my own scrolling text area because the original one in AWT didn't exactly *work*.)

And it's a walk down memory lane, too. I'm looking at the new MIDP 2.0 Style Guide, and I could swear I'm reading word for word some of the things we used to all do and say about writing games 10 years ago--reduced indexed color palettes, extreme caution with object creation, putting up a splash screen while you wait for your first offscreen buffer to be displayed... but it's great fun and so satisfying to use the Wireless Toolkit--you get instant gratifcation. So different from writing enterprise beans or even servlets/JSP. You sit down at your editor, and a few minutes later you have this cool thing running in your choice of faux phones. (Although I have NO idea what's up with that scary-looking thing in the toolkit they call the "querty device". Yikes.)

So here's the part that sucks--NO SUPPORT FOR MAC OSX! Yes, you can do MIDP development on the Mac, with a little effort and configuration, but you cannot run the Wireless Toolkit. And apparently the Borland tool is no longer supported on the Mac either. In fact, there are apparently NO useful J2ME development environments for OSX. That just sucks. I *did* manage to get the Wireless Toolkit to run under Virtual PC on my Mac (thanks to Michael Yuan for letting me know that he got it running, or I wouldn't have tried). It's painfully slow, of course, but no slower than my ancient PC. And all because of one small piece of the toolkit that's apparently native? I've talked to Ariel, the lead developer of the WTK, I think, and he was happy to hear I had it running under Virtual PC, but did not know of--or have plans for--a Mac version. (He's still my hero for making the toolkit, though). I talked to the "Java guy" at Apple (Dan Steinberg introduced me to him at MacWorld, but I forgot his name) and Dan and I both made our points about wanting J2ME developer support on the Mac. I'm sure tons of other people have complained about this... I know there have been other blogs here and on O'Reilly about it. But I just thought I might as well add my own special way of complaining. : )

It's so easy to get started playing around with MIDP 2.0, that I don't know why more folks aren't trying it out. It takes, like, five minutes to install the toolkit (45 minutes if you have to first install Virtual PC on the Mac!), and you're good to go (all you need to do is tell it where your JDK lives). After that, it's so simple to write, build, and run (in emulation) your first little app:

1) Launch the KToolbar part of the toolkit. It comes up immediately with a little window and waits for you to Create or Open a project.

2) Create a new project just by giving it a name for your project and a class name for your MIDlet.

3) Most helpfully, the tool builds a complete directory structure for you in the "apps" directory within the toolkit home. It makes *everything* you need, and even tells you where to place your source file.

4) Open your editor and type in a little MIDlet (a class that extends MIDlet). These are tiny little things, mostly, with lifecycle callbacks that work much like applets. There are plenty of examples that come with the toolkit. Be sure to name the class with the name that you specified when you created the new project.

5) Click the Build button. Really. That's it. It compiles your little MIDlet and (assuming you don't get compiler errors) it's ready to run.

6) Click the Run button. Up pops the default, garish-yet-somehow-stylish emulated phone. You'll see your project name and a "launch" button. Select the "launch" button and there you go! Wow!

7) Oh, you made a mistake and it doesn't work correctly? No worries. Change your source code, hit "save" in your editor, and click Build again. It really is that simple. Geez. Compare this to the steps to try even the simplest bean or--these days--even a simple web application requires some effort to configure and deploy into Tomcat correctly. Yes, we have Ant scripts for everything, but there's just a hundred and one picky little things that can always get you, especially when moving to a new machine, new version of Tomcat, etc. But this Wireless Toolkit, well, like I said--instant gratifcation.

The best news today seems to be that most developers doing MIDP development *are* in fact doing games. Small games. That means that some lucky folks are doing real-world development where you can have a complete product built and delivered in a week or less. Yeah, there are plenty of headaches for those doing real deployment, but these Java-enabled devices finally *are* starting to appear now, even in the US, in a Big Way. (Sure, 2.5 years after it was announced at JavaOne that these days were just around the corner, but still. It HAS finally happened.) And MIDP 2.0 support can't be *that* far behind.

So if you just want to have some fun, and who knows -- maybe soon you'll have a chance to work full-time or even just on the side on some little mobile device games--download the Wireless Toolkit and play. It's the least painful New Java Thing To Learn that I can think of, and it'll help you get your simple game chops back. Lunar Lander. Asteroids. You *know* you used to make those things when you were *really* supposed to be studying for midterms...

Besides, *small* things are now culturally popular. There's the Mini Cooper. The new iPod Mini. And there's Mini Java. (Yeah, yeah, I know it's MICRO, but "mini" is cooler.) So I'm now unofficially insisting that J2ME is Java 2 Mini Edition.



Rekindle your passion for programming

Posted by kathysierra on January 08, 2004 at 02:01 PM | Permalink | Comments (7)

I'm sitting here at MacWorld Expo in San Francisco. I flew more than a thousand miles to get here, and I'm paying for it out of my own pocket. Why? Because it gets me excited. I'm surrounded by cool technology (I've waited my whole life for Apple's new GarageBand software). I do it because I'm happier and more productive if I stay enthused, and attending conferences has always worked for me. So I pay it for it myself, even if it has no direct *business* value.

Life's better when I'm motivated and passionate. And yeah, sometimes it's *easy* to stay enthused, like when I worked as a game developer. But as much as I deeply appreciate enterprise Javabeans, as an EJB developer the most thrilling part of writing and deploying a bean for me was coming up with a JNDI name (and we had a naming convention anyway, so that pretty much sucked the creativity out of *that* decision). So when I moved from doing fun GUI things (which I loved) to doing server-side enterprise things (which I, well, did *NOT*, unless it was Jini, but that's a whole different story), I had to find my own ways to stay pumped up. I don't mean pumped up for *life*-- that's what skiing is for. I mean pumped up for *work*. I'll be damned if I'm going to spend 7 to 12 hours a day with no passion. Life's just too short (or is it too long? I can never remember which one works best here) to spend that much time without this level of excitement.

So I go to conferences. That's *my* way. I've been doing it for the last 15 years, and it has always been worth every penny (although I try desperately to get my employers, when I'm employed, to pay for them).

Do I go to learn? Yes, but that's not my main goal. I go to become swept up in the enthusiasm. To risk my life trying to catch the t-shirt tossed to the crowd at the end of the demo. To see the dog walking the floor with a webcam on his back.

I'd love to hear about conferences (or any other events or activities) that get YOU excited, but here are my all-time favorites:

MacWorld San Francisco.

The Game Developer Conference (I don't care WHO you are, or whether you have ANY interest in building games, you'll still love this one)

JavaOne (duh)

GeekCruise (to be honest, this is one I have not paid for myself... I went as a speaker)

Siggraph

Now, I have to say that my experience with a conference will be very different from someone else's... a lot of people don't like JavaOne, for example. But I always go in with the attitude that I WILL get something beneficial from the show, by allowing myself to be caught up in the excitement. I don't go in with the expectation that I'm going to learn a gazillion killer tips and land a new job/promotion/raise. Last year's JavaOne, for example, was worth it just to hear Josh Bloch do his "Tiger, Tiger Burning Bright" poem. Not as cool as a Coldplay concert, but this guy has a lot of fans (me included), and most of the (standing room only) folks in the room were pumped up about Tiger after that. And yes, that enthusiasm fades as you get back to your cube and realize you have still MORE to learn (and still no time in which to learn it), but I believe that in some dark corner of your mind, that sense of excitement still hovers, waiting for you to encourage it. To water it and keep it alive.

To rekindle the flame and help remind you why you DO love Java, and why writing Java (even if it's not what you get to do on your day job) makes you part of a very exciting group. ; )

So, some might say that it's an employer's job to keep that spark going, by paying for the development of the developers. And I believe that this is one of the best investments an employer can make. But I'm not willing to make my level of personal passion dependent on my employer. Yes, my employer DOES benefit by the enhanced quality and productivity and creativity that comes from my having attended these conferences, both from a learning-new-things and feeling-more-excitement perspective. But if my employer's too short-sighted to see that, I'm doing it anyway. I'm doing it for the quality of MY daily life.

And to get the latest iSkin for my iPod (in a shade of blue that matches my eyes, of course).





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds