Draft Review of Java 7 "Measures and Units" 220
Jean-Marie Dautelle writes to inform us that the public review period ends on July 8 for JSR-275, "Measures and Units" Early Draft. The JSR-275 will be a major enhancement for Java 7 by providing "strong" typing (through class parameterization) and easy internationalization of Java programs, preventing conversion errors. The latest version 0.8 is available as a PDF. The reference implementation is provided by the JScience project under a BSD license."
Meh (Score:2)
Bah (Score:2)
Re: (Score:2)
40 rods per hogshead? Geez, what do you drive, a diesel-powered aircraft carrier?
I thought my SUV was bad, but it gets 440,000 rods per hogshead.
Re: (Score:2)
40 rod per hogshead to miles per gallon
Re: (Score:2)
Similar to Fortress (Score:5, Interesting)
getting tired of Java ... (Score:5, Interesting)
I've spent most of the last 10 years building desktop and web applications with Java: AWT, Swing, JSP, Struts, J2EE, EJBs, and on and on.
Through all those years I've had to fight perceptions of Java being hard to distribute, slow, difficult, insecure, and over-engineered. I've done pretty well in the battle, and produced some pretty nice products.
Maybe I'm having a bit of a mid-life crisis, and I'm wondering where to go from here. I'm looking at alternatives for development: AJAX, Ruby, PHP, and Adobe AIR. But nothing out there (outside of the Microsoft world) does everything that Java does as well -- but Java just doesn't do GUI too well. Although GWT is pretty cool. And I've always thought Applets were underrated and under-utilized.
The point of this rant? Java 7 doesn't excite me in the least. Me and everyone I know are firmly planted in Java 5 (or is it 1.5? I always forget) and we don't appear to be moving to Java 6 (1.6?) -- so why should we care about Java 7 (1.7?).
Anyway, that's my rant. Any suggestions are greatly appreciated!
Re: (Score:2)
wantii.com
Re: (Score:3, Informative)
You are definitely right that there are too many frameworks
Re: (Score:2)
I don't know if I'd say that... I would bet that more developers are using frameworks than not. The reason I would suggest that there are too many frameworks is that I firmly believe in the "best tool for the job" mantra, but to really decide which is the best tool, you have to have some experience with each tool before you can decide. If I read your post correctly, it sounds like you use
Re: (Score:2)
As for the "lack of discipline," I really don't think we can fault developers. Deciding on a framework should be the job of an architect.
Hrrmmm. In an ideal world that's true. Many projects don't have a dedicated architect whose job it is to just evaluate frameworks all day though. Software development has a history of not being very ideal, one reason being it's still an actively developing field. I've looked into frameworks again recently, and picking one is like picking a religion. Everyone touts the
Re: (Score:2, Insightful)
I didn't mean to sound hostile to Struts; I use it also. I find that some projects are made more complex, unnecessarily complex, as a consequence of the complexity of tools that are used. I regard java frameworks as just another class of tool It occurs to me that great swaths of the common framework capabilities go unused in a given project. I strive for simplicity, introducing a
Re: (Score:2)
After having used both, I would agree that WebWork was superior, and I am glad the Struts2 is based more on WebWork than Struts1.
Re: (Score:2)
Assembler on bare metal. It'll be a change.
Re: (Score:2)
Re: (Score:2)
Since I ditched Java I've been coding by arranging large stones in binary patterns.
Re: (Score:2)
Re: (Score:2)
"Assembler on bare metal. It'll be a change."
I've also programmed in java for a long time - since '99. And I'm totally burnt out on the "yet another UI on top of a db" that seems par for the course in java - and in php, ruby, Qt etc for that matter so that's not really an exciting option for me
However, I programmed in C/C++ five years before java, and more importantly, I've been using linux since '96 and exclusively since '99. So I got an opportunity to port linux emb
Re:getting tired of Java ... (Score:5, Interesting)
I agree about the features of Java 6 & 7. I code to Java 5 but run in the latest and greatest VM because they continue to make performance enhancements there.
As for GUI development, I believe that we will see some progress made there. Right now, there is some good competition going on between Swing, SWT, and other toolkits. And now, QT just came out with QT Jambi [trolltech.com] which looks really cool. The bottom line is that eventually, one of these toolkits will emerge and become the defacto toolkit. Remember, cross platform UI is a hard problem to solve. They'll figure it our eventually. Or, you may get tired enough and write one yourself :)
Re:getting tired of Java ... (Score:5, Insightful)
Re:getting tired of Java ... (Score:4, Informative)
Re:getting tired of Java ... (Score:5, Informative)
Language-wise Java 1.6 doesn't include any changes; check out the docs for the -source option for javac [sun.com].
Re: (Score:3, Insightful)
What!? Java 6 I'll give you was not as big a change as Java 5, but Java 6 was mainly a stability, manageability and performance [sun.com] oriented release, but even that came with some pretty big changes - support for scripting languages with the Rhino JavaScript engine included for instance. Also, the Consumer JRE [java.net] changes will be backported to it, with the Kernel JVM, the Quickstarter and Direct3D/DirectX pipeline improvements in Windows to catch up with the OpenGL pip
Re:getting tired of Java ... (Score:5, Informative)
- JSR 294 Improved Modularity Support (superpackages); so we can define the API that is public for a library, so the user doesn't have to see all the public functions.
- JSR 296 Swing Application Framework; which helps us build better Swing GUIs faster in a more standard way.
- JSR 295 Beans Binding and JSR 303 Beans Validation
I was really excited about that Consumer JRE / Java Kernel, which was suppose to minimize the size of the JRE so you could bundle a 5mb JRE for a normal Swing Application, but they decided on pushing that to Java 6! so it's arriving as a patch late this year. It will probably include a very nice looking look&feel as well as GUI drawing optimizations using DirectX on Windows.. pretty cool.
We can also hope for Closures, which would make our GUI code a lot neater.. My company and everyone that I know (except Apple) have moved to Java 6 - and the IDEs such as Eclipse and new technologies like Open-Terracotta are making me love Java! Especially cause we are developing applications / algorithms that run on many different platform.. Java is really the only way cause its fast enough and rock solid.
Re: (Score:2)
Re: (Score:2)
Funny but I have found Applets underrated and over-utilized!
I think the HUGE number of trivial Applets "Hover buttons" ruined the reputation of Java.
Things like VNC show the real power of applets. Too bad they where so rare.
Resources & UI (Score:2)
If have done a fair amount of that too and my biggest gripe: having to write user interfaces in source code or UI builder generating source code! The problem with this approach is that you are tied into some builder and the code generated is ugly. Compare this it to Visual Studio (on MS-Windows) or Interface Builder (on MacOS X) which both generate binary resource files in
Re: (Score:2)
Re: (Score:2)
Well it doesn't need to be binary, but at least in format that is optimised for specifying resources, and is easily machine parsable. XML certainly fits these needs, but the deployed file should still be in binary, since it makes for faster processing.
Re: (Score:2)
OTOH if your gui builder insists on mixing generated code with your own code then i agree it sucks.
Re: (Score:2)
The point of this rant? Java 7 doesn't excite me in the least. Me and everyone I know are firmly planted in Java 5 (or is it 1.5? I always forget) and we don't appear to be moving to Java 6 (1.6?) -- so why should we care about Java 7 (1.7?).
Modular Java and Kernel JVM (JSR 277 & 294) which should improve Applet start time to be comparable to Flash.
SwingLabs components, take a look for yourself, these guys are making some nice UI enhancements.
Java Application Framework (JSR 296) providing a pre-built framework for common application tasks.
Bean Bindings (JSR 295), so you no longer have to write your own update code.
JavaFX? I don't know much about this, but it could make GUI development interesting.
Media Components, this one I'm especially
Re: (Score:2, Informative)
When you program Eclipse RCP applications, you don't just spend less time fudging around w/ GUI widgets and more time plugging in large chunks of functionality provided to you (for free) in the framework. Tasks that would have taken me months alone have been shortened up to a matter of weeks...
Perhaps JavaFX (Score:3, Interesting)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:getting tired of Java = Python! (Score:5, Funny)
Re: (Score:2)
Neat idea (Score:5, Informative)
For the unitiated, Guy Steele (of Scheme fame) is building a new language for scientific computing called Fortress [sunsource.net]. It has some nice ideas that really should have been there by now. The language would have saved countless headaches in not just scientific but probably all mainstream software development projects.
Of course, its just one of the pet projects in SUN Labs
Re: (Score:2)
Source code? (Score:2)
I thought we were getting the source code this year, I know we're only halfway through but...
Re: (Score:2)
/usr/bin/units (Score:2)
Code sample (Score:4, Funny)
kilograms j = 40;
dollars k = 70;
print(i+j+k);
Re: (Score:2, Funny)
kilograms j = 40;
dollars k = 70;
print(i+j+k);
Cheers!
Philosophy of numbers (Score:5, Interesting)
The idea is based on the philosophy that numbers do not exist in isolation. It is possible to speak of, e.g., the number 5 as an abstract entity unto its own, but that should be rare. Most of the time, "5" refers to the ratio "5:1", where the "1" refers to something tangible. In science, the "1" is denoted with units. The problem is, starting with tabulating machines, then onto electronic calculators, and even multi-gigabyte computers, numbers are almost universally represented (erroneously) as the former -- purely abstract numbers. The units are stripped off.
As any struggling physics or chemistry student knows, one can fake one's way through a test by doing "dimensional analysis" on test questions. If the units cancel out properly and agree, you've probably got the right answer.
Compilers should be doing dimensional analysis at compile-time. I had originally hoped to create C++ templates -- which are evaluated at compile-time -- to do this, but I couldn't quite see how to get them to handle all the possible permutations of unit combinations and conversions -- at least not easily. It really needs to be built into the language.
With a compiler enforcing dimensional analysis, it would force programmers to think through every formula and calculation. Novel unit combinations would arise as a result of creating database reports. E.g. a payroll report might have $/2-week pay period. A conversion somewhere to $/year would be another unit, and the conversion between $/2-week pay period and $/year would be clearly definied in one place rather than sprinkled throughout the code.
Putting conversions in one place is the first thing I did when I cleaned up some pre-existing source code that I took over. I explicitly created three coordinate systems (device, world, and screen) and created two two-way conversions to go between the levels. Before that, there were conversions all over the place, each a little different, each with different handling of roundoffs and some even with hidden fudge factors. ("Conversions in one place" can be done without developing a units system, as it has its own benefits.)
I blame a lack of education on the philosophy of numbers for programming languages relying upon naked numbers for so many decades. Rote algorithms for addition, subtraction, multiplication, and division taught in elementary school are the foundation of this vacuous philosophy.
It could even be responsible for the public's acceptance of no gold standard for the dollar. They're not demanding to know what the reference point of "one dollar" is.
And of course it's the Federal Reserve that can print endless money for the war in Iraq, thank to the lack of a gold standard.
So there you have it -- lack of units in programming languages and the war in Iraq have a common cause: the lack of correct philosophy on numbers taught in schools.
Re:Philosophy of numbers (Score:5, Insightful)
I was agreeing with you completely until you said that. There can be no reference point for "one dollar". A currency system lifts the burden of a barter system from its users. Without the dollar, you'd have to bake bread and swap it for internet connectivity, or something. How much bandwidth can you get for a loaf of bread? The same question applies to the dollar. Currency is a tangible way to represent the virtual concept of value. There is no unitary value of value so there can be no fixed unitary value for a currency. A free-floating currency values itself according to what its users think it's worth, which is, IMHO, the only sane way to value a virtual concept.
Ian
Re: (Score:3, Insightful)
It could even be responsible for the public's acceptance of no gold standard for the dollar. They're not demanding to know what the reference point of "one dollar" is.
I'll do you one further, as we get further and further from solidity with numbers we will get progressively worse at handling it. As we deal with less and less cash, the money we have simply has less weight. We've all seen this phenomenon, anyone who does everything with cash will typically be better at handling their money, b/c they're "ha
Re: (Score:2)
Re: (Score:2, Informative)
physical.d [csc.kth.se]
The example is by Oskar Linde.
Re: (Score:3, Informative)
They're not demanding to know what the reference point of "one dollar" is.
I'm no economist, but this statement confuses me. You're really saying that it was somehow better when someone could say "one dollar equals
Money is meaningless outside of
Re: (Score:2)
Gold has the use as money, mystique and respect through the millenia.
No, the value of the dollar comes from the IRS. Try using something other than a dollar as money, such as a gold coin. The IRS requires you to attach a fair market value in terms of dollars (Federal Reserve Notes, really), and then pay a
Re: (Score:2)
Yeah, it only has that mystique because we consider it to be valuable --- you've got a tautology here: you've just said here is that gold is valuable because we think gold is valuable. It has very little intrinsic value of its own --- it's reasonably (but not especially) rare, it has some interesting (but not especially interesting) chemical properties, and it looks nice. A currency based on gold is just as artifical as any other fiat c
Re: (Score:2)
No, I said gold is and will be valuable because it has been valuable -- a prediction based upon a long-standing trend.
Silver has mo
What gold standard? (Score:2, Interesting)
I really don't understand this obsession with the Gold Standard. A gram of gold has no intrinsic value either, any more than one US dollar does. (Other than for making connectors on circuit boards). Its value, like the dollar, lies purely in what other people are willing to exchange for it - and like a paper currency, that 'value' can fluctu
Re: (Score:2)
There are two problems I see with that idea:
Re: (Score:2)
Re: (Score:2)
The sine of an angle is a dimensionless quantity, but only if the dimensionless quantity is a ratio of two length measurements (except when the angle is measured in steradians, then it should be dimensionless with the units of plane over plane). And vice-versa: the arcsine takes a dimensionless quantity, but only if its a ratio of length (or planes).
Mathema
I don't know... (Score:3, Interesting)
Case in point: As if EJB3 has anything to do with EJB2 other than sharing the same name.
Re: (Score:2)
We've been using this for the last few months (Score:4, Interesting)
Re:Java 8 (Score:5, Funny)
Take it from me, I work in HR at a Fortune 500 company, so I know a thing or two.
This AC is totally right. Every time I need a decision on which language I should use to implement a product, I always go straight to HR; preferably HR in fortune 500 company. Those folks really know their stuff!
As if what companies use has anything whatsoever to do with this paper... I agree Java sucks, but this has nothing to do with whether or not someone is "employable" after reading this paper - it has to do with a fairly smart group of folks trying to make Java a bit better for numerical work. (i.e. for the public sector, more often than not)
Re: (Score:3, Interesting)
Useful for NASA? (Score:2)
Such that if a.qty = 1 and a.unit = foot
and b.qty = 12 and b.unit = inch,
c
Re: (Score:2)
Re: (Score:2)
Take it from me, I work in HR at a Fortune 500 company, so I know a thing or two.
I lack a degree and my experience is to all over the map for me fit nicely into one of your fortune 500 peg holes. I'll have to continue working for one of the smaller companies that your company outsources its work to.
BTW, I do happen to user C# in my current job. However, that does not mean that there are no jobs in Java available. There is merit in learning Cobol, and trade schools that still teach it. Someone has to maintain the old code.
Re: (Score:3, Informative)
Rule #2 - When making a point, do not discredit yourself
Re:Java 8 (Score:5, Informative)
Lets see what jobs are actually out there:
Just goes to show how out of touch HR really is.
Re:Java 8 (Score:5, Funny)
HR? I'd be surprised if you know what color database has the most RAM [wikipedia.org].
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Incidentally, why put speed of light in that stupid form? 3.00*10^8 is a much nicer way, and deals with significant figures to boot!
Re: (Score:3, Interesting)
Not to mention the tremendous amount of jobs for java-coffee-machine-engineers!
Re: (Score:3, Informative)
your java-results probably also contain "Javascript" (think of jobs for web 2.0, ajax, etc.).
Dice has 2098 listings in java results that happen to match javascript, very few of which are exclusively javascript without java. which still leaves approximately 14k java jobs vs the fact that the C# search also turns up C jobs, which lowers C# down to barely 5k.
Not to mention the tremendous amount of jobs for java-coffee-machine-engineers!
On Monster maybe, but not on Dice.
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
Maybe Java really is more popular, but I've seen a lot more shops using .Net than Java.
It may be that .Net has more shops than Java (I don't know), but Java likely has bigger shops which account for more positions within a single shop. After all, you don't run .Net on Sparc, Alpha or Power architectures. With sales reps from Sun, IBM, HP, Bea and Oracle all pushing Java stacks, it shouldn't be surprising that there is more demand for Java developers than for .Net developers.
Re: (Score:2)
Re:More Java growth? (Score:5, Funny)
Yes. A couple of classes for handling metres, kilograms and seconds is the killer application for Java. All other languages/operating environments will disappear overnight.
Re: (Score:2)
Re: (Score:2)
You are assuming that there is equal demand for Java and C# developers, but a lesser supply of C# developers. What people are seeing on dice and monster is both a higher demand and supply for Java developers compared to C# developers. From my own looking around, the average offered pay for Java developers is higher than for
Re: (Score:2)
The world is more complex than Ec 101
You are assuming that there is equal demand for Java and C# developers, but a lesser supply of C# developers.
Not quite. I am *projecting* that if people start sounding off that c# has been 'dealt a death blow' while pronouncing that 'java is growing bigger everyday' that the supply of new c# coders will dry up, while the supply of new java coders will boom.
From my own looking around, the average offered pay for Java developers is hi
Re: (Score:3, Funny)
Java sucks [googlefight.com]
Re: (Score:2)
java/.Net crashes [googlefight.com]
Re:More Java growth? (Score:5, Interesting)
The figures you quote show
What is bad news for
The JCP won't spell the "death knell" to C# or
Re:More Java growth? (Score:5, Insightful)
Now with
MS' presence on codeplex is also helping the community side a bit, especially with Patterns & Practices (which a lot of things done by that team, altered by the community, eventually makes it in the real things, like Project Acropolis).
Thats mostly speculation mind you, but it should be interesting...
Re:More Java growth? (Score:5, Interesting)
So, tell us (Score:2)
And while your at it (Score:5, Funny)
Re: (Score:2)
I've used both languages long enough to know that both are far better than the bad ol' days of writing C++. Both are well thought out, and have strong class libraries. Both have a wealth of 3rd party code out there.
Loving one shouldn't require you to hate the other.
If I was writing some server
Re: (Score:2)
The other thing about the
Re: (Score:2)
Re: (Score:2, Insightful)
It has more applications, more libraries, more documentation - all from years of industry backing, making Java a behemoth when it comes to implementing anything. And Java has Eclipse, C# has Visual Studio. Eclipse is amazing. Visual Studio is, well, it's good but it does not compare to Eclipse in terms of features and extensibility and stability.
Recently I had to mine information from a Paradox 7 database. I had an existing C# middleware server to adapt to
Re: (Score:2)
Re: (Score:3, Interesting)
BTW the
Re: (Score:3, Insightful)
I have used both C# and Java in my work, also. My experience is a little different. The two languages are very similar, both the languages and the class libraries. Java is best for portable applications, C# is best if you are on Windows only, and need to access underlying parts of the O/S, such as getting the icons for a specific file type.
If I needed a C# programmer, and came across a first rate Java programmer, I would not hesitate to hire him/her for the C# job (and vice versa).
Re: (Score:2)
Re:i like this a lot (Score:5, Informative)
You want the honest answer or the sugarcoated one?
Sugar: JScience is getting attention now because Sun is standardizing it through the JCP.
Honest: Because you've been living in Microsoft la-la land? JScience has been around in the form of the J.A.D.E. library [dautelle.com] for at least 5 or 6 years; probably longer. Jean-Marie has worked diligently over the years to make sure that Java has had top-notch support for scientific programming. The fact that he's getting recognition by the JCP members is nothing short of splendid. He deserves every bit of it.
Re:Ugh... (Score:5, Insightful)
Perhaps you are a perfect programmer who never makes mistakes. Some of us, despite our best efforts, do make mistakes occasionally; perhaps we simply weren't thinking about how this code would interact with someone elses code at the time; perhaps we just made a typo; perhaps we hadn't quite had our coffee yet; who knows, but mistakes happen to everyone (except, apparently, yourself). In the case that mistakes creep in, it is nice to be able to catch and fix them as early as possible, rather than having a complex and expensive bug hunt somewhere down the line. Spending a moment to actually document requirements and intentions in a form that can be checked (be it statically, or automatically at runtime if you leave checks on) efficiently and regularly is a good thing. Most of us do that already in the form of static types which are checked at compile time. Adding some expressivity to that (via a more powerful type system, contract annotations on methods and objects, an automated unit testing system, or just extra static checks on units) isn't a bad thing, especially if it is optional (as it often is).
I can have some sympathy for the complaint that adding bits and pieces in this rather piecemeal (and in the case of this particular implementation, somewhat clumsy and verbose) fashion is poor. Ideally adding means to decently document and express requirements and intentions should be something added to the language as a whole, with an overriding vision of how it should work. For that see Eiffel, Spec#, Fortress, or languages with more expressive type systems like the ML family and Haskell. Still, with something as simple and encapsulable as dimension and unit checking, why not just throw it in as a convenient optional extra? If you don't like it, don't import the library that implements it.
Re:Ugh... (Score:4, Insightful)
Relying on the things you list alone will result in abject failure, not only in the system itself but the philosophy of the developers -- "I did xyz, I'm safe, there will be no errors." There's only so much you can do within the base language itself before you start catering to the stupid and putting the system in a nice, safe, less-useful box.
Re: (Score:2)