HNHacker News
TopNewBestAskShowJobs

chrizel

397 karma · joined May 20, 2011

submissionscomments
chrizel··on Announcing new tools, forums, and features
I'm evaluating GitLab at work currently - primarily for its code review features and really like it. Read a lot about Phabricator yesterday as a possible alternative, and am considering testing it.

I wonder how it compares to GitLab. Is it possible to set up protected branches, where I can say, only users X and Y are allowed to push to the master branch? Can I do a code review and then finalize it when I'm finished and does the author get notified with a summary like the new GitHub code review feature? Because currently in GitLab the author does get a notification email for every line comment I make, which is also not really the perfect way of doing it.

I already know that Phabricator squashes the changes into one commit, I think I can live with that. (because it promotes small code reviews) Does Phabricator have any problems with git rebase, where I'm refreshing a feature branch with the most recent master state? What I really like about the merge/pull request workflow of GitLab is, that multiple developers can work together on one feature branch while a merge request is open and can be used as a discussion platform for the changes - is this possible with Phabricator?

Also I'm wondering how solid the issue tracking is, and if the project workboards can compete with Trello. Can it be used by non-developers without giving them access to the code?

Looking forward to test Phabricator tomorrow.

chrizel··on Swift-X tool to cross compile Swift and Objective-C(++) code to Android
Another option that I'm currently using for a prototype at work is Java (or any JVM language) via RoboVM http://www.robovm.org - it works similar to Xamarin so it compiles Java bytecode to LLVM to a native binary. The advantage over Xamarin is, that it uses the Apache 2 license so doesn't require hefty license fees or a subscription and you are independent. RoboVM will be released in the next couple of month in version 1.0 and it works very very well.

My current prototype uses Java for all the backend / business logic (data base communication, file access, network access, threading etc.) and it communicates via a JavaScript bridge to a WebView UI layer for which I have targets for iOS (RoboVM), desktop (JavaFX), HTTP server (Jetty) and later possibly Android. All from a single Java code base which shares large amounts of code between the platforms.

chrizel··on How to stop feeling lonely
> And believe me there is some life-changing pua literature out there which is very sophisticated and rather about deep psychological concepts.

Thanks for your post. Do you have any recommendations for good pua literature?

chrizel··on JetBrains Doomsday Sale - 75% off for 24 hours only
The "one IDE to rule them all" is IntelliJ IDEA. You will get most functionality of the other IDEs via plugins: http://plugins.intellij.net/?idea
chrizel··on Preventing memory leaks in Backbone.js
That's not a problem just for IE. It's a problem that browser vendors could only solve by giving us WeakMaps (which could come in ES6 http://wiki.ecmascript.org/doku.php?id=harmony:weak_maps#wea... )...

The problem is, you have a bunch of subviews which are registering events on some collection models... when you rerender your parent view your subviews get recreated but your previously created subviews stay in memory because the backbone events system still stores references to the old views which aren't really needed anymore. The only solution is to explicitly remove the events when subviews a destroyed (or better use a solution like in the submitted article) or use a library like https://github.com/marionettejs/backbone.eventbinder

chrizel··on Preventing memory leaks in Backbone.js
But you have to keep in mind, according to the code (https://github.com/documentcloud/backbone/blob/master/backbo... ) this will only get rid of the events on this.model and this.collection. If you are using another field or model (like in your example myModel, if it is not the same as this.model) -- then you will still get memory leaks.

Backbone is a real pitfall here in larger projects and you have to keep memory leaks in mind when using Backbone events. (sadly JavaScript has no WeakMaps yet, which would solve the problem for us) That's why projects like Backbone Marionette or EventBinder exists which are handling the Backbone events leaking problem better than bare bones Backbone alone. See http://lostechies.com/derickbailey/2011/09/15/zombies-run-ma...

In a very large application I'm writing at the moment I've introduced a common View parent class which extends Backbone views with proper subview handling and correct event disposal. So in my views I can write something like this (works very similar to the Backbone view's DOM "event" mapping field, but instead of DOM events we are talking about Backbone events here) [Edit: well, looking at the submission article, that's very similar to the solution described in the article]

    objectEvents: {
      'model change': 'reload',
      'collection reset': 'render'
    }
Then my View class handles the rest: it connects the events in the constructor and disconnects them correctly on remove(). The only thing you have to keep in mind is that you have to remove all old subviews explicitly when they get recreated. That's when my subview handling kicks in, because I have some helper methods like addSubView and removeAllSubViews which get called when re-rendering the parent view.

Backbone subview handling can be a real pain and memory management has to be kept in mind. Every time you are using the "on"-method you should ask yourself when this event gets destroyed and if it could lead to a memory leak. Or you should use something like EventBinder. https://github.com/marionettejs/backbone.eventbinder

chrizel··on Vim as you IDE
How well does Arch run on the MacBook Air? Looks like a great setup, would be interested in more info about it too.
← PreviousPage 3 of 3