Hacker Newsnew | comments | show | ask | jobs | submit | locnguyen's comments login

Is there an option to telecommute full or part time? I moved back to OC after living in Santa Monica and working at business.com for a year and a half. I don't want to move back or drive on the 405 every day.

-----


Sorry, I don't think there are any telecommute options at this time.

-----


Congrats Michael! I've been using your tutorials as my primary learning resource for a few weeks now. It's the most succinct one out there and shows a newbie everything s/he needs to know to get up and running.

-----


I really want to give the Kindle or Nook a chance. I read a lot of non-fiction and having everything on one portable device would be super convenient. The only concern I really have is whether technical books with all their code, screenshots, and diagrams are rendered properly.

-----


I have the Kindle 2, and it's basically a non-starter for tech books. The Kindle DX, though, should be better, particularly if you have PDF versions of your books.

-----


The Kindle DX has rendered all of my PDFs exceptionally well, including graphics. The only issues are that it is only 16 shades of grey-ish and you can't really change the zoom on PDFs (you can rotate the screen to geta little bit of zoom from landscape mode, but that's it)

-----


Does the zoom problem hamper your ability to read small graphs? I would be concerned about graphs that fit into one of two columns on the page.

-----


First off, congrats to the team. Has anyone on HN used the framework extensively to give an opinion and compare experiences with other frameworks?

-----


I'm using it for my current project, currently ~6k semicolons.

Stream of thought time! Forgive the sloppy writing, which will be full of interjections.

Obj-J is more verbose than regular JavaScript. More use of objects and method selectors than callback functions. I usually prefer callbacks to delegate objects. It's easy to just make a catch-all object and use that with an anonymous function if you'd rather not specify a class for something that requires a delegate method, though it's not idiomatic Cappuccino/Cocoa.

Cappuccino is almost identical to Cocoa. If you have experience with Cocoa you can just switch off the part of your brain that wonders how you should be doing something and just do it like you would have with Cocoa, and it'll just work, as they say. Not terribly exciting, but it works – and frighteningly well. I spent over a month working on my app, testing exclusively in WebKit and Firefox. Lots of what would be called advanced behavior "for a browser app" (but nothing that would be called advanced for a desktop app from 5 years ago) and making it work in IE required just a few tweaks, most of which were unrelated to Cappuccino (comet longpolling library I was using, Orbited.)

Good stuff:

Awesome, responsive, feels-right GUI stuff. Can't break objects by clicking and dragging around. No weird jumping around behavior. Stuff doesn't get dislodged, misaligned, etc.

Don't have to work with the DOM. At all. This is a huge deal if you have a background in desktop GUI stuff – if all you've ever used is the DOM you have no idea what you're missing. It's pretty terrible for anything except vertically scrolling pages of text. Working with the DOM was like having someone beat on your shins with a baseball bat. "No I want the box to go there. There! THERE! ARGHOSOIJSD"

Built-in serialization for Cappuccino classes. Canvas/vector abstractions. GUI building in Apple's Interface Builder. IE, WebKit, Opera, Firefox all work from the same code without apologies. Much more finessed event handling.

Bad stuff:

Awful debugging. Worse than regular JS debugging. Usually can't even easily tell what line a syntax error is on.

Still has tons of stupid JS problems – implicit globals, type coercion everywhere (with JS primitives), slow as molasses.

About a 10% performance hit on tight loops if you use Obj-J message sending in them.

Mostly non-existent documentation. Still in rapid development, things change a lot. If you don't already know how to use Cocoa, expect to be totally lost.

Other stuff:

Has its own event loop. Allows for more flexibility than only DOM events, but it might cause problems if you use other JS code that uses events.

Building Cappuccino in Linux had a few hiccups, but I got it working (they were related to Ruby 1.9.) Just Works in OS X without any tweaking necessary.

Best reason to use it: Cocoa is not perfect by any measure, but we know it works for GUI apps. Cappuccino is like Cocoa; it works.

A lot of effort has gone into Cappuccino. Behind the scenes, a lot is going on to maintain the transparent layer of browser compatibility that you get to work with. There are warts and issues, but you can absolutely build something with it right now and it will work.

-----


A lot of good points. About debugging, I would strongly strongly disagree.

The Safari 4 / WebKit debugger is actually getting quite good. Add on top of that the profiler and support for native method names we added to WebKit, and you've got what I consider the best debugging environment in any browser.

Break on exception works well, and even though you are seeing post-processed code, it looks nearly identical to the original.

(The parse error problem is just a generic Safari problem, and Firefox reports much better context for that particular class of error, just something that's useful to know)

About this statement:

      Still has tons of stupid JS problems – implicit globals, type coercion everywhere (with JS primitives), slow as molasses.
There are plenty of globals, but they are intentional. If there are a few strays becoming global, they are bugs we'd be happy to fix. In user code, the global situation is actually slightly better than vanilla JS because we give any top level vars file level scope rather than global scope.

And finally:

      About a 10% performance hit on tight loops if you use Obj-J message sending in them.
That sounds off to me. You can't blindly trust the WebKit or Firebug profilers, because they are not time based, but rather call based, which disproportionately affects short methods.

But even if its true, if a 5-10% performance hit on a critical loop is important, there's nothing stopping you from grabbing the method implementation and calling it directly, completely negating any potential performance hit.

One line of code will grab and store a method implementation, then you can just call it directly in your code:

      var sel = @selector(aSelector:),
          impl = class_getMethodImplementation([object class], sel);

      for (var i=0; i<1000; i++)
            impl(self, sel, arg1, etc);
In general, on the scale of an entire application, the overhead of message sends is much less than 10%.

-----


Most of my errors are syntax errors, not programming errors, and indeed they are annoying in WebKit/Safari/Chrome. Firefox will sometimes give me the line, sometimes it won't. The named methods and profiling do indeed work well (I wouldn't lump profiling under debugging though.)

There are plenty of globals, but they are intentional. If there are a few strays becoming global, they are bugs we'd be happy to fix. In user code, the global situation is actually slightly better than vanilla JS because we give any top level vars file level scope rather than global scope.

Yeah, I'm talking about my code, not yours :)

But even if its true, if a 5-10% performance hit on a critical loop is important, there's nothing stopping you from grabbing the method implementation and calling it directly, completely negating any potential performance hit.

Right, that's what I do, just like in Obj-C/C.

And I'm definitely not going to argue about the performance of Cappuccino as a whole. I find it to be the best performing browser GUI framework.

edit: I use the profiler in Chromium, if that matters. :]

-----


Great, glad to clear these things up. I definitely agree about the syntax error thing. We'll try to make it a priority to commit a fix to WebKit.

-----


Some comments; I'm focusing on the negatives below, but I'll note that Cappuccino is a truly fantastic idea and exactly what web development should be.

Obj-J is more verbose than regular JavaScript. More use of objects and method selectors than callback functions. I usually prefer callbacks to delegate objects. It's easy to just make a catch-all object and use that with an anonymous function if you'd rather not specify a class for something that requires a delegate method, though it's not idiomatic Cappuccino/Cocoa.

I have to agree here -- delegates are a really poor replacement for closures, which is one thing JS can do pretty well. Delegates are definitely idiomatic Objective-C (although, Obj-C now has blocks), but it'd be nice if the standard libraries embraced closures.

Awful debugging. Worse than regular JS debugging. Usually can't even easily tell what line a syntax error is on.

I found this to be an enormous issue, especially due to the fact that without a compiler, I tended to have stupid type errors cropping up that took way too long to debug.

Mostly non-existent documentation. Still in rapid development, things change a lot. If you don't already know how to use Cocoa, expect to be totally lost.

The lack of stable releases, a clean binary installation (don't clutter up my system), proper documentation, et al, makes the project fairly difficult to approach -- especially without a type-checking compiler and poor debugging support. It's a bit of a moving target if you're going to try and use it, and there's a lot of gotchas that will require you to go to the source to figure them out.

-----


Not sure what you mean by lack of stable releases. Are you saying that the releases are not stable, or that the release schedule is not stable?

I believe our releases have been fairly solid, but I do admit they don't follow any predictable schedule. We'd like that to change, but there are higher priority problems for us at the moment.

We also do offer a clean installer. First, all of cappuccino works without installing anything. It's self contained in a single app folder. Second, the tools all come bundled in one installer, which puts files wherever you like, defaulting to /usr/local/share/objj. We ship the documentation with the same download.

And as for the type-checking compiler part, we actually have an experimental type-checking runtime available on github. Improvements are, as always welcome. But not having a type-checking compiler is certainly par for the course in the JavaScript world, so I don't quite see how it counts against Cappuccino.

All that being said, yes it is young, yes it is a moving target, and yes there's a lot of work left to be done.

-----


Not sure what you mean by lack of stable releases. Are you saying that the releases are not stable, or that the release schedule is not stable?

Both -- the releases were generally infrequent and tended to have issues that require running the latest versions from git to resolve.

We also do offer a clean installer. First, all of cappuccino works without installing anything. It's self contained in a single app folder. Second, the tools all come bundled in one installer, which puts files wherever you like, defaulting to /usr/local/share/objj. We ship the documentation with the same download.

My experiences trying to build from source (which was necessary as the releases fell considerably behind the development with requisite bug fixes) resulted in a bit of a mess in my home directory and the destination root (as well as interdependencies between), rather than just building cleanly in-place, but perhaps I was operating it incorrectly.

And as for the type-checking compiler part, we actually have an experimental type-checking runtime available on github. Improvements are, as always welcome. But not having a type-checking compiler is certainly par for the course in the JavaScript world, so I don't quite see how it counts against Cappuccino.

The primary count against Cappuccino vs straight JS is the difficulty in tracking down issues when they inevitably emerge. It sounds like things might have improved for Safari 4 users, however.

Not that I wouldn't mind type-checking for JS, too.

All that being said, yes it is young, yes it is a moving target, and yes there's a lot of work left to be done.

Absolutely. Please don't take my criticism as anything but friendly intent.

-----


Note that you don't actually need to run the installer. You can just add "Tools/objj/bin" from the download or "$CAPP_BUILD/Release/env/bin" from the build to your PATH.

We probably don't make that clear anywhere, sorry.

-----


Regarding delegation, I feel both closures and delegation have their place. We have been adding closure-based API in the areas we feel make sense (things that have a single expected callback return for example). However, I feel that things like TableView delegates and data sources still benefit much more from the delegate model than the closure model, and yes its because its more restrictive. If you look at NSTableView, it has many many datasource and delegate methods that are intricately related, and forcing you to group them in an object leads to better code in my opinion.

Perhaps more importantly, delegates and data sources allow you to do the Interface Builder-style visual development that we are aiming for. There really is no way to do this sort of thing with closures, unless you consider "double click on an object and type some code" to be visual development, which I do not. This is why I think closures make a lot of sense for things like network connections, callbacks for panels, etc. but less sense for things that in the common case really do represent connections and interactions between objects.

Interestingly though, we have recently been thinking of ways of "allowing both" easily. In other words, either making everything closure based behind the scenes and providing additional APIs for delegate, or making everything delegate based and transparently creating anonymous delegate objects for closures.

-----


Yeah I find that delegation makes more sense in an OO context when the states between the delegate and other object are closely entwined. TableView data source is a perfect example, basically the two states need to stay consistent with each other but provide several standardized methods for modifying or reporting changes to state, which is where I think delegate methods shine. "Just waiting for something to return" is where I think they tend to be cumbersome when you have lambdas at your disposal.

In this regard I think JS and Obj-C are now starting to converge, which is interesting.

-----


While more profiling related than debugging - if you haven't seen it, check out this post on profiling by Francisco:

http://www.alertdebugging.com/2009/04/29/building-a-better-j...

-----


We (madebysofa.com) are using it for an upcoming product. The most important lessons we learned are:

- We can really bring near-desktop-class-user-experience to the web, and that's amazing.

- Cocoa programmers pick it up fast. In our case a week or so, and one more for all the tools around it (press, nib2cib).

- Some stuff is missing/broken in the framework, but you can look at the source and fix it! We're not used to that with regular Cocoa where we have to basically guess what is happening inside.

-----


I started using it to build our app's web UI. Really like it, but because of maturity switched over to Flex for the time being.

-----


Nested forms scratches the worst itch for me. Compared to the other changes it's nothing huge, but it sure makes day-to-day coding more developer friendly. That's what RoR is about anyway.

-----


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: