Hacker Newsnew | past | comments | ask | show | jobs | submit | instcode's commentslogin

If anyone decides to change the release channel, you can do it now by modifying 'app.update.channel' in about:config to nightly, aurora, beta...

Update: http://support.mozilla.org/en-US/questions/940799


I don't think creating a new language just to compile the source to Javascript is a good move, especially when Javascript is being under heavily supervised & supported by a huge web development community. If Javascript isn't that expressive or weird, fine, why don't we just fix it or find another replacement? I find myself is comfortable to work on a language that's close to the platform than fancy languages that try to hide/fix trivial problems and take away other good aspects of the language. There are enough languages to learn already and CoffeeScript is probably fade away once these[1] kind[2] of stuffs[3] become stronger.

[1] http://www.ecmascript.org/

[2] http://www.mascaraengine.com/

[3] http://code.google.com/p/traceur-compiler/


The Firefox Mobile (Android) scores a necessary point (235+9 bonus) to be the leader.


I think a user content generated community where huge number of people participate needs an explicit feedback system. We all want to learn from the good sources and filter out what aren't worthy and we need a way to distinguish them. If you think the point rating system isn't good, it doesn't necessarily mean we don't need it.

Here is my suggestion: How about we use the absolute points to rank a comment in a different scale, such as if a comment collects enough a number of point, it will be ranked as 1 star, then 2 stars... and so on. In this way of rating, we not only get what we want but also not to follow "group thinking" as someone said in this thread.


I'm using 4.0 "full-time" and it's the nightly build :). The only thing you need is Compatibility Reporter extension. It's here: https://addons.mozilla.org/en-US/firefox/addon/15003


I'm very happy with the result. However, on some javascript intensive webpages, such as https://console.aws.amazon.com/s3/home, it hangs the whole Firefox for a little while. Hopefully with a long timeline to the release, no such issues remained.


I'm also using Minefield 4.0b8pre as my primary browser and always look for new "nightly" update with hoping it solves the annoying bug: location bar doesn't synchronize with the displaying page/tab. Other than that, FF 4 has a very nice looking UI and it's fast.


I hate to say this and I know I will be downvoted by "hackers" but I really don't understand why people (who know limited or nothing about Java & blindly follow the norm) always pick the word "ugly", "stupid" for Java? What superior of PHP to Java when with Java I can program from a stand-alone app to webapp, from client side to server side, from desktop to mobile app?... If you are a coder, you must pick a language & a standard lib to be master, and I would say that picking a language that only sticks to a very specific application platform (web-only, desktop-only...) is a very bad choice. I started from C/C++ and moved to Java and I feel very comfortable to use/study Python, C#, Scala & Ruby.. but PHP, get off, never & never ever!

One last thing (to convince more PHP people to downvote me) is, if you are spending most of your time on PHP or a web-only-language, you will never see the beauty of asynchronous I/O, socket programming, threading, hooking...

Update: When I mentioned "web-only-language", I was thinking of people who use & only use Ruby with RoR for web apps. I don't know how many developers who can't distinguish between Ruby & RoR but I guess it's not a small number. And of course, what I said is toward to those who aren't willing to learn new things. They always think about web & only web.


beauty of threading? shudder

anyways. I have some reasons for my strong dislike of Java: a) checked exceptions, b) no method pointers or something similar and c) lots of the code produced by the community out there (and in the standard library itself) is full of FactoryFactoryFactories and other typing intensive, mind-bending and ultimately useless abstractions (most of them not DRY at all either).

Back in 2004 I did strongly consider Java though, but ultimately, I didn't have time to implement this web application AND learn a new library (learning the language is easy. learning the library is what makes you slow in the beginning).

As a side note: Said web application also accesses locally connected barcode scanners over the local serial port. Unfortunately the only way to do this (aside of a locally installed client) is still using a Java Applet which I've also written back in 2004. So I do have the Java experience to know that I don't quite like it :-)


"beauty of threading? shudder"

Indeed, this whole thread's reminding me of:

"Combining the sanity of threads with the robustness of web development" http://wearehugh.com/public/2010/08/html5-web-workers/


Java throwables come in two flavors: Exceptions like IOException which must be checked, and Errors like AssertionError which do not need to be checked. If you really, really don't like checked exceptions you can easily build libraries and write code that rely exclusively upon unchecked exceptions. I wouldn't personally recommend this design methodology.


Errors and unchecked Exceptions in Java should not be confused. An Error is typically reserved for the runtime environment for a "this ship is sinking, abandon all hands" kind of unrecoverable error. More properly Exceptions in execution that aren't checked in Java extend RuntimeException and not Error.

The stigma that Java has too many checked exceptions is no longer true with modern Java code. Everyone is using unchecked children of RuntimeException almost exclusively. Of course, there is still plenty of legacy code out there using outdated checked exception paradigms.


lots of the code produced by the community out there is full of FactoryFactoryFactories and other typing intensive, mind-bending and ultimately useless abstractions (most of them not DRY at all either

So what? Why does the code produced by others in "the community" affect your perception of the language and/or tools, if you aren't using their code?


Whether you fall in line or not, the culture around Java is around writing code to a certain style. Agree or disagree, there's an argument that by writing in a style that is familiar to Java programmers, your code is easier to read and maintain.

If you're one guy off in a corner, write however you want. But if you're not, you have to take the culture into consideration. And if you are one guy in a corner, why are you using Java?


I just started working for a large enterprise corporation (one of the biggest financial companies in the world). We have a lot of old code written in Java that needs to be maintained. I've been trying to advocate new ways of doing things, but almost every time the other developers will respond with, "that's just not how we do things here."

Java has a very strong culture around it. I worked in academia and startups previously and I didn't realize that there is a huge number Java programmers who do nothing but program in Java. They aren't interested in learning new languages and will only grudgingly learn a new framework. Their biggest concern making sure the lowest common denominator can still maintain the (unmaintainable) code.

An example is unit testing. Our current "unit" tests start up a JBoss instance, connect to the development databases, and take ~5 minutes to run just one test. But I've been told not to waste my time working on anything more modular and that if I'm going to put in any time working on unit tests, I should contribute to the framework everyone else is already using.

It can be quite soul crushing.


Where do you sit? I'm on the 5th floor, by the stairwell.


I was on two, but Lumburgh asked me to go ahead and move my desk downstairs into the storage locker.


Did you find the can of pesticide I left down there for you?


> It can be quite soul crushing.

Always remember: "It's easier to ask for forgiveness than for permission."

If you want to do better than the cultural norm demands, nothing's keeping you. What's the worst that can happen?


I'm already doing it. I set up cucumber + webrat to run through some quick UI tests. I wrote a mock-object framework into the last feature I designed so I could test it. There's still a huge resistance to change. I'm just hoping I can show how useful it is in the long run. In the short run it just looks like I'm wasting a lot of time tinkering on silly side projects.


I don't think that your company's conservative attitudes are because of their usage of Java.

I think that "one of the biggest financial companies in the world" would be just as conservative and anxious about the tiniest technology changes with any language: Ruby, Perl, or Fortran.

The attitude you describe sounds like it has more to do with being a large financial institution and the type of place where software development is a "cost center", not a profit maker.


This is exactly why java was invented (IMO). So you could pay someone $10/hr as a cog to solely work on the SupportEmailButtonFactory's


It is MUCH easier to show someone how something like a single 5 minute unit test holds them back from being bigger better badder. Unit testing should take less than a minute for ALL of them in a project to run.

Ask for forgiveness after you do something...

The other way to go about it is to 'gingerly' find the single ally, and build on that.


Because when we call Java "ugly" or "stupid," it's the community we're talking about. My room mate is an extremely talented Java programmer, and he can fly around Eclipse[1] like a giant rainbow steamroller[2]. He uses Java like it should be used, and it's great. But I don't think he represents the community.

He tells me horror stories of code he refactors at work written by people in his own office, or worse, outsourced companies, and it's bad. It seems to me that that kind of code is more representative of the community.

When you're going to join a project, you have a better chance of encountering code not sucking if the overall culture of that language is better.

[1]: http://www.youtube.com/results?search_query=eclipse+sorcery [2]: http://theoatmeal.com/comics/literally


Ha, if you are thinking that way, I would suggest VB.NET or C# instead. Why? I remember the first time I was creating an MFC project using Project Wizard, I felt like I'm a fool looking at a bunch of auto-generated text & having no clue what it is about. And once again, I was in the same situation when I was using VS.NET to generate code for my first ASP.NET web app. But I still completed that webapp without even knowing what code is for. Does that make VB.NET/C# community more stupid than Java? Does that mean C#/VB.NET should be the ugly & stupid thing other than Java? So, you should better have another way to explain that.


I think for web applications, most people use a "community" provided framework, various libraries, etc. Java has been a locus for that mindset (as in the classic: http://discuss.joelonsoftware.com/default.asp?joel.3.219431.... ) It's not just parody though: http://www.docjar.org/docs/api/org/outerj/pollo/xmleditor/Fa...


do you think you'd have been better off with a statically typed language though?


personally, I prefer the dynamically typed languages.

but I hate. No. HATE PHP's type conversions with its == operator.

    0 == 'foobar'
but

    true == 'foobar' && 0 == false
so

    true == false ?
eek.

Yeah. I know === exists. But if you have to compare strings and numbers, why is the default conversion method you do the lossy one? If you compare a number to a string, why can't you convert the number into a string and compare the two strings? Why convert the string into a number which will be lossy in most cases?


There's == and === - they do separate things.

http://stackoverflow.com/questions/359494/javascript-vs

It's not that hard to get your head around, and at least one other major language does it this way.


agreed, but == being a non-associative operator is still just sick.


I think you mean non-transitive. But yes.


Sometimes it is "easier" to just type: if (isThisReturningEmpty()) {} instead of typing: if (isThisReturningEmpty() === "") {}

And if you know something could return 0 (which is not empty), you should know to do a type-sensitive check). You are trading off HAVING to set types with HAVING to check types when needed (I think the latter is better).


Note that this isn't anything to do with dynamic typing: Python is very dynamic, but it doesn't have this weird coercion (or is it "automatic type conversion"?).

I hate this as well, but, I love dynamic typing. They aren't the same thing.


Since when are there pointers in PHP?


there are none, but to implement a callback you also wouldn't have to declare an inner class implementing some interface that in turn declares tens of methods just to react to that one callback.

In PHP 5.3 you'd just pass the function (which of course will pass a pointer to that function) and in earlier versions you'd hack something with eval or variable-variables which, while bad, is still better than either writing half a screen full of empty methods or inheriting an inner class from some meaninglessly named class that only exists for you not to have a screenful of empty methods.


In all versions of PHP, callbacks are extremely easy (no eval or variable-variables required). You just have to pass the name of function or method around and use the call_user_func() function to call it.


I disagree that you have to pick one language and one language only to be really good at. At least after you've become a decent programmer. As a polyglot (I can start a project comfortably in PHP, Python, Ruby, JS, Erlang, and wouldn't feel too out of place working in Clojure or Objective C), I think a "master" programmer is someone who's gotten to that point to realize that a programming problem is a programming problem regardless of language. Language is only the syntax you use to formulate your answer.


I do agree with what you say, but there is a gamut with 'programming problems' on one end and 'work' on the other. Especially on the web, most of programming is work, not problem solving. When doing work in a language/framework, knowledge of other languages/framework can distract you. For example, a Java-only specialist would know whether substring takes start offset and length or start and end offsets arguments. I would have to look it up (or wait for the IDE to help me), but I do know that C# and Java disagree about it.


Until recently, an ignoring a brief foray into Limbo, I've been a PHP only/focused programmer. I've been working with python more in the past year as I've been doing more work with data processing and statistical analysis for which PHP really doesn't have the tools.

Having said that I wonder if missing the 'beauty' of async I/O etc has more to do with the projects people take than the language. Would a python or ruby developer who focuses on creating web apps have any more familiarity with those concepts than a PHP developer?


because PHP provides practically NO means for async I/O whereas the other languages do.

One of the reasons for this is because PHP was designed to quickly handle single HTTP requests. The scaling is ment to be done on the app-server side and that single request that your script is serving at a given time will take as long as it will take anyways.

So you don't really need the async I/O (in theory).

Python and Javascript (and to some degree ruby) rely on their own web servers implemented in their own language, in many cases with no or bad (GIL) concurrency at which point it gets more interesting to move into an event based model where it becomes imperative that operations don't block.

There async I/O becomes important.

So: PHP: concurrency by firing off another apache/fastcgi process or thread. Don't worry about blocking on I/O.

node.js and some python/ruby frameworks: concurrency by using an event based system. Because one operation blocks the whole server, they need to be quick. async I/O becomes important.

Of course the evented model has huge advantages too: You worry much less about races, you get huge performance with a simple architecture and you can potentially handle much more concurrency (because each thread/process consumes resources that your one evented process does only once).

Both paradigms are interesting, but having first-class functions certainly makes an evented model more convenient to work with.


Async I/O is important for any time the connection needs to be kept open while processing the request under heavily concurrent conditions; it's less about not blocking on I/O, than it is about avoiding the overhead of context switching in the kernel and the extra resources of keeping a thread / process alive for the duration of the request. I don't see it as less or more important in a PHP context than an event-based model. However, without an automatic CPS transformation (continuation passing style) of the source of your request handling logic - in particular, continuations at the boundary points all I/Os - you do need to write to a pattern which is in effect event-driven.


Curious, what language is web-only… And spending most of the time with PHP does not prevent you from trying all these thing in the remaining time.


PHP is pretty much considered web-only. Sure you can use it on the command line (never seen it myself) and yes you can do Gtk stuff with it but that doesn't change the perception of it even if you can argue differently.

EDIT: I don't hold that view because of the things I mentioned but I am pretty sure a lot of programmers do.


I have been writing command line scripts in PHP for the most part of the past 18 months.

I will have to agree with you that PHP is perceived as a web language. Hopefully with more articles like these that perception will change.


I have also been writing PHP command-line scripts, or rather maintaining them.

They are a bad idea, in general. PHP is designed for a very specific purpose: Very quickly building web pages in a CGI or mod_php environment and spitting them out. Everything else is an afterthought, and it shows.

For example, if you try to manipulate the filesystem extensively using PHP you will eventually trip over its "stat cache". PHP caches the result of stat() calls, presumably assuming that, hey, it is more important to avoid redundantly calling stat() during the time-sensitive rendering of your web page than it is to actually return correct information about the state of the filesystem. I mean, how often do symlinks change or files get moved during the rendering of a typical web page? And how much web-page-rendering code really depends on being able to read a link, then read the link again after the link has changed on disk? You can afford to ignore that stuff at the language level, if you're PHP.

The result is that you have to learn about the stat cache and remember to call clearstatcache() all the time when manipulating the filesystem in PHP.

That's just one example of why it's better to use Ruby or Perl to write command-line scripts. These languages were designed with command-line scripting in mind. Indeed, this is the flip side of the reason why PHP eventually drove out Perl as a web development language: Perl was originally designed for command-line scripting, and PHP was originally designed for the web. Use tools for their proper purpose.


Use tools for their proper purpose.

Java was originally designed for programming embedded devices. Python was originally designed as a teaching language. One anecdote suggests that Lisp's original designers always intended to add syntax to the language.

Perhaps a decade after a language's invention it's possible to discuss its current suitability and design for specific tasks more than its original design intent.

(I consider PHP's relative ease of deployment over everything else far more explanatory of its ubiquity than any original design intent.)


Good example!

Things like "stat cache" and "memory leaks" are what I watch out for when I write command line scripts in PHP. Also, I do not run my scripts as a daemon and I make sure that they do not run for more than a set maximum execution time.

So yeah, it may not be the most perfect choice but, it beats : having to learn another language when I know what to look out for when I write a command line script in PHP.


Curious, what language is web-only…

JavaScript. Sure, in theory you can use it on the server for other things. Have you seen that happen lately?


Now with node.js, it isn't as clear cut as you make out it to be. It's not there yet, but in the not so distant future, you can use node.js for your scripting needs.

Running on v8, it has an edge in terms of execution speed over other scripting languages. And the javascript syntax and semantics is something most of the developers are familiar with.

If you don't like writing nested closures, you have coffeescript which makes the code pretty, and also brings in some new features viz. list comprehensions, splats, satement modifiers etc.


Considering that nodejs is the hottest hype on the block, yeah, I have.


Wait, is it 2009 again?


I have written a certain amount of Javascript this year to run on Windows machines. This was because a) I needed the scripts to run on Windows, b) I did not wish to have to install another language (say Python) on the machines, c) I really really did not want to do them in VBScript.


> if you are spending most of your time on PHP or a web-only-language, you will never see the beauty of asynchronous I/O...

FYI, JavaScript programmers use asynchronous I/O all the time. That's what the 'A' in AJAX stands for...


When you have a hammer everything looks like a nail.


Your app icon still can beat up gluegadget's ;-). Anyway, thanks both for your works!


My younger son made that icon, and at first the ad was for my older son's website that sells tshirts, http://hackertees.com/ I'll pass along the complement to my younger son.


It can be explained by the fact that Opera isn't the main rivals of Firefox in the browser market.

Edit: http://arewefastyet.com/faq.html

  The team's explanation: Right now, the performance tests
  are run on a Mac, which means no IE. Also the tests rely on
  a "shell" JS engine that runs in a command line. It doesn't
  test browsers. We'll change that, eventually.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: