Better HN
topnewbestaskshowjobs
Log inSign up

joske2

45 karma · joined Dec 23, 2010 (15y ago) · 19 submissions

Submissions

comment 12y ago · link · parent

I quite like AppCode, not for code formatting perse. More because it has decent refactoring support, better code analysis+quick fixes, and very keyboard friendly. I still miss the storyboard support though. I do come from a Java background, using Eclipse and IntelliJ. XCode was a bit of a disappointment coming from there.

comment 12y ago · link · parent

If you are willing to switch IDEs, then AppCode can do this. (+ clean up your unused imports). There is currently a bug in formatting Kiwi specs, but is marked as fixed in upcoming build.

comment 14y ago · link · parent

I don't understand his point on encapsulation of information versus implementation. If anyone can help me here, I would be grateful.

* Should the user of your object/data have to make this distinction? Does he care if age is a piece of data or the result of a calculation?

* Should the user of your object/data know where a piece of information is? Suppose I start of with having a birthdate attribute in my person hash. I later read something about CQRS and decide to build my person as an event store. My birthdate is now in some event hash inside an events list in person. If I encapsulate this birthdate information, the users of my object/data don't have to change.

Encapsulating information/implementation might "complect" person, but doesn't it make it a lot more simple for the users/callers?

comment 14y ago · link · parent

The point of testing/TDD for me is not (just) about preventing bugs, it is more about having quick feedback. Running a test is faster than waiting until it is deployed and manually clicking around in an application. It is kind of comparable to using a REPL.

comment 14y ago · link · parent

Honestly, I hope there isn't immortality in heaven beyond the grave. Forever is a really long time. The first 1000 years in heaven might be interesting. The billion years after that? meh

comment 15y ago · link · parent

I honestly thought the elisp example code looked pretty bad as well. I don't like the flag-style programming (in-for, continue, destructuring) nor do I like the meaningless names (tt, s, init, continue, js2-lb,..). That one function also has quite a lot of responsibilities (looping while you see commas, error handling, handling simple, destructured and in-for vars,..)

comment 15y ago · link · parent

The idea is that using IDs reduces the reusability of your css rules.

comment 15y ago · link · parent

According to that benchmark native Object.create is faster than constructor functions on Firefox 4.

That said, I wouldn't base my coding decisions on those kinds of micro benchmarks. They say nothing about the impact on actual javascript applications. Using new instead of Object.create may prove completely irrelevant in an application where you are constantly updating the DOM or are doing lots of network calls.

comment 15y ago · link · parent

Object.create is a standard function in ecmascript5. I would add a check such as "if (!Object.create) {Object.create = ... }".

comment 15y ago · link · parent

The dose is discussed in the article. The hypothesis is that 90 pounds of added sugars per person per year is toxic (current levels of consumption). 40 pounds per person per year is supposed to be ok.

comment 15y ago · link · parent

MobileMe and iWork.com are good examples I think.

comment 15y ago · link · parent

I doubt that it has anything to do with technical proficiency. People like Steve Wozniak, Alan Kay, Tim Berners-Lee don't have the reputation of being assholes.

In general, sites like Hackernews or Stackoverflow wouldn't work at all if smart people couldn't handle answering basic questions without being jerks.

comment 15y ago · link · parent

In ES5 you have Function.prototype.bind that returns a new function with this bound to whatever you want. You can also pass extra default arguments. On older browsers you could use es5-shim for this functionality.

See https://developer.mozilla.org/en/JavaScript/Reference/Global...

comment 15y ago · link · parent

Why would you choose Github over Bitbucket for your FOSS projects? I haven't used Bitbucket yet, so I'm interested in a comparison.

comment 15y ago · link · parent

There are other dynamic languages besides smalltalk that have a good IDE. Jetbrains provides IDEs with refactoring support for JavaScript, python, ruby, php and others.

comment 15y ago · link · parent

On my dayjob we did some experiments on wether or not it was economically viable. So we tried classical programming and pair programming. We found that classical programming was more productive, but not twice as productive. However there were a lot less bugs found after an iteration of pair programming. When we factored that in, pair programming did end up being the better choice.

comment 15y ago · link · parent

How can you refactor if you don't have a test suite? Do you manually check everything in your application after every change? That's the main value of having a test suite you can trust. It speeds up refactoring massively.

comment 15y ago · link · parent

I believe one of the first refactoring was for Smalltalk, so it's not impossible. These days you also have IDEs with basic refactoring support for Python, Ruby, Javascript, Actionscript,.. from JetBrains.

comment 15y ago · link · parent

I've worked on such huge Java programs being maintained and updated for over 5 years. I actually don't think it is Java as a language which helps in maintenance. Type checking by the compiler does help, but in reality you have Spring, Hibernate, JSF, JSP,.. where compile time checking doesn't apply anyway.

In my opinion there are 3 things that help with maintenance: * automated tests (to see what breaks if you change something) * refactoring tools (helps in keeping code clean) * domain driven design (helps in mapping a business concept to a piece of code)

These are all things you could do in Python as well.