Oracle Discontinues Free Java Time Zone Updates
New submitter Noel Trout writes "For a long time in the Java world, there has been a free tool called the 'tzupdater' or Time Zone Updater released as a free download first by Sun and then Oracle. This tool can be used to apply a patch to the Java runtime so that time zone information is correct. This is necessary since some time zones in the world are not static and change more frequently than one might think; in general time zone updates can be released maybe 4-6 times a year. The source information backing the Java timezone API comes from the open source Olson timezone database that is also used by many operating systems. For certain types of applications, you can understand that these updates are mission critical. For example, my company operates in the private aviation sector so we need to be able to display the correct local time at airports around the world. So, the interesting part is that Oracle has now decided to only release these updates if you have a Java SE support contract. Being Oracle, such licenses are far from cheap. In my opinion, this is a pretty serious change in stance for Oracle and amounts to killing free Java for certain types of applications, at least if you care about accuracy. We are talking about the core API class java.util.TimeZone. This begs the question, can you call an API free if you have to pay for it to return accurate information? What is the point of such an API? Should the community not expect that core Java classes are fully functional and accurate? I believe it is also a pretty bad move for Java adoption for these types of applications. If my company as a startup 10 years ago would have been presented with such a license fee, we almost certainly could not have chosen Java as our platform as we could not afford it."
it's Time to switch to python
Snowden and Manning are heroes.
First because I'm not using java. And don't expect jack from Oracle, who still uses java by choice?
Do they want to promote an alternative? How does this affect the OpenJDK?
Who's surprised?
This has me wondering about Oracle's motives. Maybe they have made an internal assessment that java is on a downward path anyway and they might as well make as much money as possible while they can?
The beginning of the end of Java for the 'rest of us'.
The information needed to provide the updates is freely available, so cannot someone else provide the updates ? Just get tzupdater to download from a different place. I am not a Java programmer, so forgive me if I have got the wrong end of the stick.
Even better change the Java functions to get the information operating system, on Linux the tzdata, then Java is kept up to date as the OS is kept up to date.
It seems clear to me that Oracle really doesn't want Java except for an easy way to gain control in the mobile interface market. It always seem merely collateral damage from acquiring Sun. The only real attention it seems to have gotten was rebranding. And with Google developing their own compatible engine for Android, Oracle's grand plan is now a pipe dream. Hence their crazed copyright lawsuit against Google for uncopyrightable APIs.
Specially with that Xbone announcement.
I remember back in the early 90s a friend of mine was so excited about Java. He said it was going to destroy Microsoft and desktop computers as we know it. We'd live in a wonderful fully networked world running completely on Java. It would make the problem of differing platforms obsolete because anything written for one platform would seamlessly run on every other.
I replied that while Java would have its uses, overall it would not make a dent in anything the general user actual does on computers. I think time has proven me right. The fact that Oracle is gripping it so tightly as to nearly kill it, isn't helping my friend's position either.
Python is terrible and the primary implementation is far beyond terrible.
The implementation is not. Know the words you're using.
(to the tune of "let it be" by the Beatles)
The time to move away from Java was as soon as Oracle bought Sun.
I don't know if Python is the answer for everyone, and I know changing to a different language is about as big of a pain as there is, but the jig was up after Sun was bought.
Not surprising. Given the refusal to remove those bloody Java sponsors from the JRE. Piss off the end users and now the developers.
Area51 - We are watching...
IBM provides free access to the Olson database updates:
http://www.ibm.com/developerworks/java/jdk/dst/jtzu.html
Was this post even necessary?
http://lmgtfy.com/?q=java+olson+database
If the information is mission critical, it is valuable. Pay for it.
python java and c# all compile to bytecode.
Snowden and Manning are heroes.
Why doesn't java use the operating system to provide that information in the first place? At least on operating systems that provide that sort of information, which isn't just "linux" but pretty much all unices.
Also, ISTR the source updates maybe twice a year, and is free, so I don't see why java has to be so special. Then again, oracle is a very special company in that regard. Everybody needs this, and in fact needs everybody else to have it too, so it's stupid penny pinching that's going on here.
And it is very stupid, just like their handling of patches for critical holes turned out to be criminally stupid. It's not like their head honcho needs the money, seeing how he squanders it on airport fines and the like.
it's Time to switch to python
Develop software - production software - in an interpreted language?
Not on my watch.
C# and Microsoft is looking better everyday.
Better let Google know they're doing it wrong then.
Do my job for me.
Some of our developers have switched to Joda Time classes as they're easier to use that those built into Java proper. They even give instructions on how to manually update the time zone tables. (We didn't develop the code, we're just happy customers): http://joda-time.sourceforge.net/
So, who is surprised by Oracle's move here? Nobody with a eyes and a brain. Oracle just doesn't know what to do with a community.
Does this make Microsoft or C# look so great? No way! They started out less free than Oracle is now and haven't really changed.
Why do I develop in Java (I also know C, C++ [and the assembler code they generate], Python, SQL [MS and non-MS dialects] -- so why choose Java?)? Because I want to write programs for my slightly less shackled Android phone.
And the next plan of action is...?
There are a bunch of options... for starters, google the problem. Next, just wait: some bright spark will put out a tool that uses local time zone info (configurable) to update some Java installation's (configurable) idea of time zones automatically (or not, configurable).
It happened with MySQL, it'll happen with Java. "The more you tighten your grip, the more star systems will slip through your fingers."
Douglas Adams' fictional book cover still has the right initial instruction: "Don't Panic!"
cheers...ank
Still hoping for Gentle Treatment...
I was about to suggest openjdk, but there's no telling what jre your customers will use unless you bundle the jre in (and you make your program update the jre).
If Oracle won't release free-beer TZ patches for older JRE/JDKs, then your only I-refuse-to-pay-Oracle option is to update your app to keep up with the latest JRE/JDK releases. Yep, that means refactoring Java 5/6 code to Java 7, but hey, at least you aren't paying Oracle for their software.
You can enforce this by requiring a minimum JRE revision:
String version = System.getProperty("java.version");
Should the community not expect that core Java classes are fully functional and accurate?
That's capitalism at work. Now maybe Google can come to the rescue by re-implementing all Java APIs in Dalvik (Android), after which they (Google), can push for wider desktop/server Dalvik adoption.
DNS is a great protocol for distributing a relatively small piece of infrequently changing information to a very large number of clients. It has a global infrastructure of caches, supports delegation of authority. Sounds like a good match.
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
Citation?
Not to mention great support for firewall traversal. It gets even into many places that HTTP does not.
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
Java has been evil since last millenium. I haven't had it on any system since it made Windows 98 BSOD so much just from the Yahoo Messenger.
FOSS will find a way.
Signature intentionally left blank.
I hate python with a passion. Code should be readable without knowing the language, and python fails that miserably with all the syntax hidden in the white space.
I'm guessing the right answer here is for people to stop using their TZ update patches and just implement a FOSS version.
You have an argument to back that statement?
Only kidding, I know you don't have a clue of what you are trying to talk about.
Java and Mission Critical do not go together.
...and discontinue Java altogether.
If the latter, you should consider a move away from Java entirely. Due to all of its security issues we're moving to products that either do not require Java on the client or we're pressuring our niche vendors to get away from it. When we talked to one of our primary vendors we learned they had already gotten so much heat that they had started a rewrite already. By the end of summer they will not be using Java any more.
We do operate corporate jets but not as our primary business. Trust me, they can afford any price increase you need to cover your overhead of a rewrite.
For us, a the value of the individual apps using Java has been outweighed by the enterprise-wide costs of patching Java and cleaning up infected PCs. But whatever you do, please don't re-write your applications in Flash. :-)
I wonder if this is related to the problem BBC found with providing a time-zone accurate data to global users.
http://news.slashdot.org/story/13/06/06/012207/bbc-clock-inaccurate---100-days-to-fix
There might be some risk associated with providing a time service accurate everywhere, when you can't possibly know how the users depend on it ...
I clearly hadn't read more than the first few lines of the help on Java TimeZone info or I could have found out that the answer was already there, without having to wait for it. As another poster pointed out IBM already provides free Java timezone updates.
Let me google that for you! But more to the point, writing a tool that will grab those updates for yourself and storing it where you need it looks like a bash script or batch file candidate. Our brains are more than a match for Oracle's bean counters. Let's use them!
cheers...ank
Still hoping for Gentle Treatment...
Since you don't know what "beg the question" means, and aren't willing to find out, just stop using the phrase period.
Python is terrible and the primary implementation is far beyond terrible.
Yes, but Python's bytecode is much higher-level than the bytecode used by the other three, because it doesn't have explicit typing of variables or direct integer manipulation. The performance implications are substantial if you're performing any non-trivial calculations. (Of course, if your process is I/O bound, this is largely irrelevant...)
Python also cannot be efficiently multithreaded, which is a killer for many high-performance applications.
nothing is hidden
newlines are used in place of semicolons and indentation defines code blocks
in most other languages {} define code blocks and indentation implies code blocks to the reader, sometimes misleading the reader.
Snowden and Manning are heroes.
If the whitespace still bothers you - it means you haven't even spent 15m using it.
How this impacts openjdk? does it uses the same Olsen timezone data or has another tool for updating it?
"I think this line is mostly filler"
it's Time to switch to python
Sorry, no. Perhaps it was time 10 years ago if ever. Now is too late. Even Google is using less Python these days.
"I think this line is mostly filler"
it's Time to switch to python
Develop software - production software - in an interpreted language?
Not on my watch.
C# and Microsoft is looking better everyday.
Better let Google know they're doing it wrong then.
I always thought the Wars of the Reformation were a fascinating, if horrible, part of history. It's always fun to see them re-enacted in spirit with programming languages. Nobody is planning to destroy Bohemia though, right?
Bytecode is but a concept and there are many different, incompatible implementations. Like programming languages and compilers.
"I think this line is mostly filler"
"Develop software - production software - in an interpreted language?"
What the hell do you think Java and C# are? Compared to C and C++ they are interpreted languages.
Do not look at laser with remaining good eye.
it's Time to switch to python
Develop software - production software - in an interpreted language?
Not on my watch.
C# and Microsoft is looking better everyday.
Python is commonly compiled at first use these days, much like the Java JIT compilation process.
If you want a legitimate reason to avoid Python for mission-critical stuff, it's the lack of rigorous development-time type-checking.
stage 1:
replace the class against your own timezone class.
stage 2:
get rid of Java as you might run into the next mission critical situation soon. You will eventually, the question is just when.
There might be other Java implementations around which are really open so you might be able to just switch to that one. Wish you luck.
Considering that Java appears to be a flimsy screen door in any company's firewall, I would think that most SANE organizations would've started moving off of that platform YEARS ago...
Buzzing the information Superhighway at Warp speed
Most people don't want to use the craptastic open source Java when a perfectly good closed source one exists.
First, update the JVM of your customer regularry so you will benefit from any olson TS update and your customer will benefit from security fix as well. I know IT guys do not like to push updates, but this is the reason hacker loves IT :)
Second, you could bring your own TZ model directly plug to the olson database format (so no "tool" required)
Last, you could even contribute this to OpenJDK or IcedTea so that Oracle can put their code to the trash :P
Rgs,
TM
Or, you know, you had a merge happen that moved around whitespace without anybody noticing, which resulted in still syntactically sound Python that just happened to have entirely different semantics that destroyed a bunch of customer data. Just as a random example of why whitespace syntax is horrible.
You aren't seriously suggesting that we replace timezone data with DNS lookups, are you?
TZ data does change often -- the summary itself says 4-6 times a year -- but not nearly often enough that doing it via DNS or anything similar makes sense. And not every application has 100% Internet access -- many have 0%, and even those that usually have access don't have it 100% of the time (but instead 99.999...%).
DNS doesn't have a provision for "well, I had data, but it's a few days out of date, and I can't seem to refresh it, so here's the old data" that I'm aware of. A small change could be made to enable that, where each JVM basically works as a slave of the TZ master zone, but really -- it's using a grenade to kill an ant.
In this specific case, the fix is likely to be for somebody to write a tool to import the TZ updates from the formats that it is available in (such as the ones used by *nix systems) into the one used by the Sun/BEA (now both Oracle) javas and insert it.
Braces allow for automatic formatting.
Whitespace shouldn't encode anything other than separation between meaningful elements. Definitely not blocks.
Besides, untyped languages are unmaintainable crap. They're nice for throwing crap together quick, but having to figure out what the code does (with typical level of comments...) is a painful experience.
Why?
Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
I've spent years using Python and I still hate it. Luckily for me, Google has marked it deprecated.
DNS does -not- lend itself well to the format of the information required. The database isn't just the current timezone offset for a location, it's also a full history of all timezone offsets for that country including daylight savings. Multiple data points for each country of an unknown number.
Additionally the types of lookup required to find the offset for a specific point in time require indexed data to be searched in a particular manner mean you can't just do a DNS lookup and cache its result. The closest you could manage is a lookup for a location+timestamp and leave the DNS server to do the calculation, but on a second precision that means the cache won't be of any value and the network lookup time means it's useless for any application wanting to do any large number of timezone conversions (eg database server).
Therefore you need an indexed local database. Regardless of whether you get that by DNS or HTTP (or locally from the local copy of olson in zoneinfo) you need a tool to update that DB.
If you have a source code control system that rearranges white space? What??
Java lost me many years ago for various reasons. But not using Java was more of a gut feeling as opposed to a well thought out plan. But now between the this craziness and the non stop drip drip of security flaws I have now moved into the camp that anyone using Java on a new project is just drinking the kool-aid. With Oracle at the helm you just know they have a spreadsheet with a time-table for monetizing Java harder and harder as time moves forward.
My guess is that Oracle has seen the writing on the wall that many business organizations are solidly Java and can afford any "minor" fees involved. What they are missing is that many university CS departments are dumping Java in favor of Python as Python is becoming the defacto language of academia. My prediction is that Java will ever so slowly fade as it is ensconced in the business world and isn't going anywhere there. But that the cool kids will see it as their grandfather's language and actively avoid it. I am not suggesting that Python will replace Java just that with CS students not giving a crap about Java they won't choose it for new projects.
One thing that has long annoyed me about Java progammers is this whole, "Let's wrap every damn thing in a object." Then you end up with an architecture that looks like the traveling salesman problem done by someone on LSD.
The real question is:
Why on earth does JREs need their own timezone descriptions?
What modern OS does not have this information up-to-date via system updates?
if you are doing intensive calculations and they slow down execution you can write those parts in c
Snowden and Manning are heroes.
"we almost certainly could not have chosen Java as our platform as we could not afford it."
So why are you still using it?
"If any question why we died, Tell them because our fathers lied."
Maybe it's a problem for the people using Sun's Java. Open JDK in Linux use the package tzdata-java that is updated regularly and in sync with the tzdata package that keeps the system's time zone information.
I think we have a different definition of hidden.
Of course you can always find poorly formatted code that's confusing, but the bottom line here is that this is not an appropriate way of using white space. White space is for the purpose of separating elements and making it more readable.
The fact that most other languages use {} to denote blocks is a good reason to use that in other languages as well. It's something that works, is clear in intention and after all these years, nobody has come up with anything better.
It should be up to the developers as to how precisely they format their code for legibility, not the people writing the language.
The only solution you have is to begin moving away from Java.
The reality is that Java is no longer free (as in beer or speech) and so the sooner you start to leave it, the better.
Items like this will only just continue to get worse as time moves forward.
Your watch runs Java?
rewriting history since 2109
Eddie Münster rebellion anyone?
Loading...
...or I could just use one of the other two dozen high level languages that has a far better implementation. For a new project, why would anyone use Python over Go? They have basically the same semantics except Go has far better performance and has decent threading model.
It should have been modded +1 Funny.
Just rewrite it in C! Then notice it's still slow and rewrite outer loop in C too! Oh, what the hell, just dump Python and write everything in C!
PS: LuaJIT and PyPy think your will is weak and CPython is hulking, slow monster.
Firstly, Oracle are still updating timezones as always in updates to the JDK/JRE.
From an old Oracle post though there is this guide
https://blogs.oracle.com/coffeys/entry/want_the_latest_tzdata_support
Which breaks down the process for folks who want to build their own TZ updating tool.
"You know you want me baby!" - Crow T Robot
O dear,
Not this often repeated crap.
I'll give you that Java can be within an order of magnitude of C++ - but faster or as fast?
You're dreaming.
There is no closed source Java. Java 7 and OpenJDK 7 are the same thing, same source code. There used to be some parts of Java that was not owned by Sun when they first started open sourcing Java 6. Those parts remained closed in the official release and the community provided shims for the OpenJDK. Oracle has replaced a lot of that closed stuff with new open source code in OpenJDK 7/Java 7 and there might be no closed source stuff left in it, or not much. The goal is for it to be 100% open.
Oracle is even merging the JRocket JVM with Hotspot. I think some of this was done in Java 7, and the rest in Java 8. JRocket was a commercial high performance JVM they acquired from BEA. Some of the monitoring and diagnostic tools from JRocket will remain closed and commercial, but the JVM itself will always be GPL.
This begs the question, can you call an API free if you have to pay for it to return accurate information?
No it does not beg the question.
What is "Begging the Question?"
"Begging the question" is a form of logical fallacy in which a statement or claim is assumed to be true without evidence other than the statement or claim itself. When one begs the question, the initial assumption of a statement is treated as already proven without any logic to show why the statement is true in the first place.
A simple example would be "I think he is unattractive because he is ugly." The adjective "ugly" does not explain why the subject is "unattractive" -- they virtually amount to the same subjective meaning, and the proof is merely a restatement of the premise. The sentence has begged the question.
What is it Not?
To beg the question does not mean "to raise the question." (e.g. "It begs the question, why is he so dumb?") This is a common error of usage made by those who mistake the word "question" in the phrase to refer to a literal question. Sadly, the error has grown more and more common with time, such that even journalists, advertisers, and major mass media entities have fallen prey to "BTQ Abuse."
While descriptivists and other such laissez-faire linguists are content to allow the misconception to fall into the vernacular, it cannot be denied that logic and philosophy stand to lose an important conceptual label should the meaning of BTQ become diluted to the point that we must constantly distinguish between the traditional usage and the erroneous "modern" usage. This is why we fight
Well, that explains why my watch battery only lasts 15 minutes...
This. Python is the best of all worlds. You get low dev time for all non-computationally-expensive code, and can write as much as you need to in C. And C without having to write IO in C is just lovely!
Sorry if you don't like pointers. But the coddling of CS students with Java courses these days is just laughable.
Java is a pile of inconsistent garbage. Gosh, is in length or size for this type? Is it a method or attribute? Good luck because all of the Java built-ins and base JRE module types are different.
*No* code is readable without either knowing the language or knowing something similar. Hence the word 'code'. (COBOL is a particularly perverse and ironic example.)
I find Java readable because I know Java, I know C++, and I like its style as a personal matter of taste, but none of those are a reflection on the language itself.
I always thought the Wars of the Reformation were a fascinating, if horrible, part of history. It's always fun to see them re-enacted in spirit with programming languages. Nobody is planning to destroy Bohemia though, right?
It has been placed in parentheses already. The functional languages laid claim to it.
I can't believe this post isn't modded up more. More and more I feel like the readership of slashdot is a bunch of script-kiddies rather than professional coders. The idea that you would use whitespace to denote something as important as scope is ludicrous. In fact, the idea that you would use whitespace to denote ANYTHING is ludicrous.
Because, well, buying from convicted thieves, cheats, and liars is a rational deduction in your knowledge base?
[head on desk]You have just casted perl's to this parent.
The benchmarks game is the first link that comes to mind.
Feel free to compare it against other languages on the benchmarks game. Python, Ruby and PHP are the slowest languages in widespread use and to make it even worse Python and Ruby both have global interpreter locks because their implementations aren't thread safe. They're terribly slow even when most of their libraries are thin wrappers around C libraries.
Do you not think that Microsoft is in nearly the same position as Oracle?! C# might have a number of short-term benefits, but you will end up in the same spot sooner than later.
This is STUPID. Information such as time zone should be set and updated at the OS level, not the application level.
As if them curlies magically make blind automerges absolutely harmless.
Also, Google sucks.
Java's been as unsexy as a leaky toilet for a long time...
Meaningless statement is meaningless both ways.
It's not really the version control's fault, per se. Let's say, for instance, that you have two heads where one diverges from the shared ancestor because somebody added some block (like a conditional or ) around existing code, and the other added a line of logic right after that that was related enough that it should have gotten indented with the rest. Obviously the person managing the merge botched it, but if you make the mistake of trying to use vimdiff to handle merges, it's pretty easy to see how that kind of mistake could have been made. The bottom line is that while in every language there's probably some number of places you could hit backspace a couple of times and still end up with correct syntax but disastrous behavior, in Python, you have orders of magnitude more, and most of them are a lot harder to spot.
And just so we're clear, my scenario is not hypothetical. It really happened to another team where I work. There's no way anybody will ever convince me that whatever Guido thought he was getting out of whitespace as syntax was even remotely worth it. Anybody who uses Python in any sort of enterprise environment is insane.
How exactly are you merging? Unless your merging mid-line I don't see how you could mess up whitespace with a merge.
I find the redundancy of using both whitespace and curly braces (one for the humans, one for the compiler) even more ludicrous.
If whitespace is such a bad way of denoting scope why indent in C?
I'd say it's pretty consistent garbage, in that it's garbage on a consistent basis.
Newlines are for breaking up long lines and indentation is for ease of readability (blocks or whatever your coding style standards dictate).
Fixed layout languages date back to the 1950s (Fortran, for example).
Have gnu, will travel.
Own up to your company's bad decisions, bite the bullet, and STOP USING PROPRIETARY SOFTWARE!!!
Seriously, you people who complain about all your own bad decisions are really getting on my nerves. Java was a bad idea 10 years ago even without the time restriction. Why? Because they throw in a time restriction whenever the fuck they want. Your company was stupid enough to be duped.
To be fair, I've personally witnessed benchmarks where Java's memory allocation and garbage collection outperform C++'s default new operator behavior (with appropriate deletes so that there are no memory leaks) by a huge margin.
However, modifying the C++ version to utilize custom new and delete operators for the necessary classes to cater to the specific demands of such an application once again pushes the C++ version's performance ahead of Java, as expected. The difference in runtime speed, however, is not as great as you might think. In the case I witnessed where this was done, the Java version took only about 20% longer to complete.
The Java version used *WAY* more memory, however.
File under 'M' for 'Manic ranting'
If whitespace is such a bad way of denoting scope
Because I might want to use it within the same scope for purposes of readability.
why indent in C?
Why indeed? I can write an entire C program in one line. But my boss pays based on KLOC, so the more white space, the better.
Have gnu, will travel.
DNS is a great protocol for distributing a relatively small piece of infrequently changing information to a very large number of clients.
Not to mention great support for firewall traversal. It gets even into many places that HTTP does not.
Not that I want to encourage you idiots (Java addicts) with your substance abuse problem, but perhaps NTP may be a better way?
Uh static typing... compiler will catch all of those errors and a decent editor will catch them on the fly
However, modifying the C++ version to utilize custom new and delete operators for the necessary classes to cater to the specific demands of such an application once again pushes the C++ version's performance ahead of Java, as expected.
I'm aware of such tests - but all they confirm is that pre-allocating a chunk of memory and re-using it is faster than individual allocate/deallocates.
That's not really that surprising. vector and other containers in C++ provide methods for storage (pre)allocation that can perform similarly.
If anything, it indicates that the program code is probably less than stellar C++ (stack allocations won't cost you anything and your destructors should be empty for value types).
Modern C++ shys away from OO derivations, too, where you should be using templates to get your abstraction for (almost) no runtime cost. Don't use virtual function calls - they're expensive - derive from a template class or use functors and get an inlined call for (almost - one byte) free.
Now don't forget Java has other things working against it (class recompilation, profiling, JVM stalls due to housekeeping etc).
A native compiled C++ program won't stall or halt your running threads. It's predictable.
Now we can argue about the effort to write decent Java and decent C++ and there I'll agree Java is a much more approachable language.
Oracle, like Microsoft, doesn't understand the value proposition of Open Source. They are walling themselves off to keep it out. Unfortunately the walls are also keeping customers out.
In fact, the idea that you would use whitespace to denote ANYTHING is ludicrous.
Yesyou'reabsolutelyright.Weshouldjustgetridofitentirely.Itsavessomuchtimetypingwhenyoudon'thavetousethespacebaratall.
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
My company has an infrastructure in aws that runs us ~20k monthly. almost everything in our development stack is ruby, python and JavaScript. We build applications to manage, analyze and visualize (beautifully) large data sets of mostly geospatial data. A language is a language. Just because its "main" or standard execution environment isn't engineered to your needs doesn't mean that alternative engines exist or that it isn't extremely useful for those whose needs align with it.
Arguing about which language is better in general outside of a specific context is ignorant and naive or nothing more than personal preference.
...and now displays the incorrect time in your locale.
Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading
I wish you weren't anonymous do I'd be sure to never interview you
This begs the question
No, no it doesn't.
systemd is Roko's Basilisk.
[Python and Go] have basically the same semantics . . .
Seriously? If you believe that statement you are lacking experience in one or both of those languages.
Go has the same problem that Ruby has: too many damn weenies in the community.
I don't mean an overabundance of men and penises, which is indeed a problem for both, but the smugness and the attitude one must endure when dealing with them.
I try to stay current with the technologies that others are using, so I've worked on some small personal projects in Ruby, Go and Python. I usually ask questions in IRC when I happen to get stuck.
When I was asking questions about Ruby and Go, the people there would constantly tell me that what I was doing, or even just aiming to do, was "wrong". So, I'd give them the benefit of the doubt. Hey, maybe I am wrong, and maybe they do have a better way. Yet every single time their suggestions would not help me attain what I wanted, would obviously not work, or were even outright harmful in some cases.
I never got this in the Python IRC channels. When I asked a question, they'd give me helpful answers, or at least help orient me in the right direction. They wouldn't take a holier-than-thou attitude with me. They wouldn't flat out tell me what I wanted to do was "wrong". They wouldn't give me suggestions rife with obvious security holes or other bugs.
The Python community helped me with my problems, and made me more efficient. The Go and Ruby communities just made me feel annoyed, like I was dealing with a bunch of know-it-all teenagers. Then again, maybe that is exactly what was happening. I was dealing with adult men and women when using Python, but I was dealing with passively-rebellious youth when seeking help with Go and Ruby.
You're worried about a language that is 'interpreted' why exactly? Do you think there is a C machine out there? Or even an Assembly machine? No.
If you cycles are that important, you can drop into C in the appropriate places by including python.h.
Seriously, get a grip.
I'm aware of that. My question pointed specifically to the timezone implementation. If the relevant parts are open source it should be not hard to write an alternative utility.
"I think this line is mostly filler"
Hi Trolly McTrollerson,
If you care that much about speed, you should probably consider something other than Java and C#.
My normal practice when I need to insert debugging statements while debugging a program is to put in these lines right at the left margin without any indentation. This makes them stand out clearly when I come back to clean things up when everything is working. I would not be able to do this with Python. This is one big reason I never want to use it.
As someone who was been a .NET developer in C# since it came out, this is welcome news to see Java developers abandoning their platform in droves.
Sorry to sound harsh, but I heard from so many middle managers and CIOs over the years, "Why don't you use Java?" "I noticed you don't use Java, what's wrong with you?" "What about Java?" "Have you looked into Java?" I had one snarky middle manager buy me a Java book for Christmas one year.
Sorry, I don't use Java and every day more and more people are saying the same thing.
I'm a big tall mofo.
If cross platform is a requirement it instantly disqualifies python - the API layer is low level enough that it exposes just too much platform specific weirdness and getting anything to work relyably on both windows and linux is a nightmare. (also 100% test coverage is a requirement unless you like syntax/used before assigned, etc. errors at runtime, this is a general problem of scripting languages)
The simplest thing to do would be a switch to "shudder" Mono (not to be confused with .Net) while not as good as the offficial .Net release or Java it at least comes close to cross platform and static code verification.
Shit, I think I might work on some code you have written in the past. The rest of us curse the fucker who put debugging crap all over the place, without any indentation. It makes our code really fucking awful to work with, to the point of us having stripped out most of this unindented junk.
Can you give some initials or other discreet way of identifying the company (or companies?) that you've left code at?
I've had to use python for classes. I write perfectly good code with it. And yes, it is still an abomination and I'm happy to go back to other languages. It is like COBOL's Last Stand or something. *shivers*
I used to work with a guy -- years and years ago -- that discovered that the IBM FORTRAN compiler would allow you to omit spaces. Having to read his code littered with statements like "DO10I=IBEGIN,IEND,IINCR" was a pure joy. On the other hand, I've long avoided diving into Python because I cannot see why anyone would want to consider whitespace as a language element.
CUR ALLOC 20195.....5804M
Check me, but Java uses the Olson tzdata files as it's base. So is there enough documentation on the format of the files in Java's lib/zi directory tree to create a tool for converting the current tzdata package to something Java can use? That'd be the route I'd take, possibly looking at the OpenJDK source code to see if there's useful information there.
The ideal route would be to replace the standard Java classes with ones that used the Olson database directly, but the way the JRE packages classes that's probably infeasible.
You query for a location+timestamp and you get a timezone rule back that includes a timestamp range it is valid for.
This information you cache locally, and before making more DNS queries you check of you have locally cached info for that location for which the requested timestamp is within a previously returned timestamp range.
That does not sound too difficult. It is much like the operation of the existing library, which uses a static table instead of DNS queries but still needs to have
separate information for different timestamp ranges.
The obvious solution is for someone to come up with a drop-in replacement for the stock timezone APIs and then use whatever method Java has for overriding stock functions (not sure what it has, I haven't written any Java code in years) to make the JRE pick that up instead of the stock code.
They're both poorly designed imperative languages with terrible type systems. On the spectrum of garbage they're close enough.
Barely anything works right on it. Basic items (like scroll bars and generic fonts) don't work right and support of HTML formatting is not worlking. The JFileChooser SEGFAULTS every time you click anything (the native code is hiding the problem) and performance is poor.
Why the hell you would you suggest that crap to anybody?? If you are not using the Oracle or the IBM JDK you have no idea of what you are doing.
Only a subset of Oracle Java is in OpenJDK. But features like Swing don't work right on OpenJDK.
Presumably it was supposed to be stripped out and that was the reason for leaving it unindented.
There is a "maximum caching time in case of failed lookups" which might play to that.
I used to work with a guy -- years and years ago -- that discovered that the IBM FORTRAN compiler would allow you to omit spaces. Having to read his code littered with statements like "DO10I=IBEGIN,IEND,IINCR" was a pure joy
Okay, that's just evil.
On the other hand, I've long avoided diving into Python because I cannot see why anyone would want to consider whitespace as a language element.
FWIW, I used to feel that way until I started using it. It took me about a day to get used to significant whitespace, and after that I decided it's a really nice, elegant language. Give it a shot, and you may be pleasantly surprised.
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
Sure, Oracle are being dicks about this, but complaining because you don't want to pay for updates so your product continues to work properly is also lame.
Not you, but the articles writer. Your company has been freeloading for 10 years...
You can also code your own time zone support.
Sleep your way to a whiter smile...date a dentist!
Yes, IBM provides free updates but only to IBM JDKs and JREs, not from other vendors (Oracle for example). Read the details in the link to ibm.com
How about government stop f*cking around with timezones? Studies have now shown that the energy savings from Daylight Savings was illusory. Any benefits of doing plus or minus an hour here and there seem to forget the support costs. And Java's problems here are a great example.
I was managing my company's Outlook/Exchange environment when the US govt last expanded Daylight Savings. What an incredible, and entirely unnecessary, pain in the ass. (Especially as way too many patches/routines were issued only just before the changeover, and were generally poorly documented.)
The world needs 24 timezones, and that's it. (Yes, Newfoundland -- quit trying to be stupid different with your 30 minute time differences.)
If governments want something to show and drum up support/campaign money, just keep passing your local equivalents of Elvis Day. Something harmless.
If you were worried about problems that might happen when different people owned Java, then you should have listened to Richard Stallman and never started using it in the first place.
As it is, thanks to Stallman and others, there are now open alternatives.
"First they came for the slanderers and i said nothing."
I met one of the guys that worked on the original Python spec and asked why they wrote Python when there were so many other languages already to choose from and he said, oh, I don't know, it's another language. And your sarcasm not withstanding, you can eliminate spaces like that as long as you replace them with another deliminator, which is actually the whole point.
Try C# if you want to be really pleasantly surprised.
Sorry if you don't like pointers. But the coddling of CS students with Java courses these days is just laughable.
I don't quite understand it either. Isn't the point of Computer Science to teach people the principles behind the operations of the computers we use every day?
If you're not learning the premise of CPU registers, memory allocation, jumping, returning, and all that happy crap that I honestly wish I understood better, what in the hell is the actual science behind modern computing then? Doesn't it make sense to start with the raw assembler involved in the top three (or so) CPU architectures and then move up from there, learning the foundation that they all compile down to in the end anyway, so that you can see the impact that your compiled code will have as you're writing it?
Primarily I'm just agreeing with your notion that Java is likely an inappropriate medium for conveying the concepts behind the magic that we interact with every day in the millions of CPU cycles that can transpire during a single keystroke; the processes occurring in Windows alone that take privileged, direct hardware access for something like USB communication and keyboard/mouse interaction and lock it right-the-hell down to the point where the operating system can extend these things into User mode without allowing them to compromise the kernel is a titanic feat of engineering... and I've known people with Bachelors' degrees in computer science that seem basically oblivious to the nature of how that even works. It's entirely possible that they didn't care, but I digress.
Granted, my work with interpreted scripting languages causes me to find the concept of pointers and type casting and memory allocation and garbage collection to be inane, silly chores that I shouldn't have to worry about to Get Things Done.... but someone should, and their credentials should reflect that. The fundamental principles underlying modern computer systems and their continuing evolution depend on it.
Boot Windows, Linux, and ESX over the network for free.
> If the whitespace still bothers you - it means you haven't even spent 15m using it.
Or it means that your editor is changing spaces to tabs and not displaying tab characters.
Whitespace should _only_ be space characters and line feeds. Mixing tabs and spaces is bound to fail. Once you have configured your editor to never use a tab then all will work well.
In fact, the idea that you would use whitespace to denote ANYTHING is ludicrous.
Yesyou'reabsolutelyright.Weshouldjustgetridofitentirely.Itsavessomuchtimetypingwhenyoudon'thavetousethespacebaratall.
CLOSEBUTYOUHAVETOGETRIDOFTHEPUNCTUATIONMARKSTOOITSCALLEDSCRIPTUMCONTINUUM
In the Wars of the Programming Languages, no episode was more vicious than the Whitespace Battles.
Then why not just write in c? Or at least use Lua instead of Python since Lua plays better with C/C++
I don't quite understand it either. Isn't the point of Computer Science to teach people the principles behind the operations of the computers we use every day?
No. The point of computer science is to teach methods of reasoning about the behaviour of computers. Yes, this involves knowing those basic principles, stuff like what pointers are, how memory can be divided and allocated between different tasks, how it can be reused after it is no longer required, and so on. But much more fundamentally it involves understanding the principles of what a program is, how data structures can be built up from individual stored items, and so on, and this is much easier to teach in a higher-level language than a lower-level one.
A computer science program should teach students at least four languages:
- A high level language, suitable for building complex data structures. It should have garbage collection, and would typically be object-oriented.
- A low level language, suitable for describing memory management tasks
- An assembly language, to show how machines work at the register level
- An additional high level language. If the first high-level language was object-oriented, this language should be functional. If the first was functional (there are a handful of programs that teach a functional language first, and it may be a reasonably good idea) this should be object-oriented.
Additionally, at least one of the two high level languages needs to have good support for parallel operations (e.g., a good library of communication and synchronization primitives), or a third high level language will be required to cover this.
My course, back in the 90s, went a little overboard. I learned:
Pascal (first high level language, used for data structure courses)
C (used both for low level computer architecture stuff and for compiler design course, due to interface with flex/bison)
PERL
68k and 32000 assembly language (two different hardware level projects using two different development kits)
C++ (only OO language)
A non-standard and peculiar language with integrated primitives for concurrent programming
Miranda (a functional language somewhat similar to ML)
Prolog
I think disorganisation led to there being too many languages on the list. Java could have replaced 3 of those items with a single language, and a few years after I graduated it did.
Google is not legally required to have data integrity, to care about your data, or to have any concern for a system or application crash,
and their applications, when crashing, don't affect anyone in a 'real' way (e.g. losing peoples entire savings, having them die, etc)
other than whiny users until they can fix the issue or spin the loss of user data in the press.
Just because Teh Googz is doing it, doesn't mean it's the right technology for all applications.
The low level details of the CPU implementation are a very small corner of computer science. It's mostly about the applied mathematics of computing which is completely language agnostic.
From Wikipedia:
The IEEE Computer Society â" identifies four areas that it considers crucial to the discipline of computer science: theory of computation, algorithms and data structures, programming methodology and languages, and computer elements and architecture. In addition to these four areas, CSAB also identifies fields such as software engineering, artificial intelligence, computer networking and communication, database systems, parallel computation, distributed computation, computer-human interaction, computer graphics, operating systems, and numerical and symbolic computation as being important areas of computer science.
riight.. because all software test cases cover all scenarios every time
if you are doing intensive calculations and they slow down execution you can write those parts in c
If you're working in C# or Java you're much less likely to need to, and if you need to be productive you should avoid working in C or C++ at any cost -- Java programmers have been shown to be up to 200% more productive than C++ programmers working on the same task, and C++ is a somewhat more productive environment than C. C/C++ solutions also have significantly more bugs in them (up to 50% more, depending on the type of task).
The ability to drop to C is fine, but if you're planning on using it for more than occasional small functions you'd probably be much better off finding an environment with performance that's good enough that you don't need to.
Sigh. I am a ten year python guy, and... it really does pain me to admit the truth of your statement.
To be clear -- there /are/ ways a competent architect can work around the GIL. Many of them even catching on in typical design. But the lack of true multi threading is still a real and legitimate concern/problem/flaw.
Given that I have not been able to recommend Java while feeling like a honest professional since the moment Oracle bought Sun... what I'm saying should be taken with...a palmful of salt.
http://www.jython.org/jythonbook/en/1.0/Concurrency.html#no-global-interpreter-lock
Running Python with Java is a way to get the best of both worlds. And it does work just fine as long as you have a developer that is competent to handle the juxtaposition.
But sadly, I can of course not recommend Java to any professional these days without advising a lot of 'due diligence'
I do want to pitch a few things your way though WRT high performance apps.
1) Much like Java, python bytecode is smaller.
For a well structured application, in which you can fit your VM, or a stripped down VM entirely in memory or better yet l3 cache....
The effective 'smaller' JIT can have cache localization benefits that will blow your typical C/C++ performance away (and most Java guys are such fools with memory management I have only once seen an application written in a manner that comparison was fair).
Yeah, we won't be beating Fortran any time soon though.
2) If you're threading your high performance applicaiton, I hope it really is an application that needs threading, and not /just/
- running on windows
- need 'lighter' or 'faster to create' processes
- GUI updating
- Some sort of glorified network FIFO
I know there's real reasons to use threads. But in truth, (working in Python or not) -- every single time I've worked with someone who suggested them, they did so for the wrong reason. The only 'right' part of it was that they knew the API pretty well.
3) Most engineers and scientists I have had the intense displeasure of working with are better working in Python than Fortran, Java, whatever. But really, that's the language design -- and I wouldn't advocate COBOL just because it's more readable or writeable. I will advocate a tool for making jobs accessible though.
They are unfortunately utterly incompetent as software engineers and debuggers in either language, but usually they can manipulate a custom API in a subset of python if you give them a template to work from.
But if they get it running well in Python, it's usually pretty portable to a faster language.
Unless they're a genuine stack-overflow-copy-pasta-idiot.
Those... really can't be helped.
It significantly reduces the potential harm. For instance, you are going to be hard pressed to find a spot in Java where I can change scope on a line of code by only editing a single consecutive set of characters. It doesn't solve all problems, but if somebody could kindly describe what the fuck more important interest python is serving by using whitespace as syntax, maybe I'll believe it was a reasonable decision. Which seems more important to you: having to yell at people slightly less frequently for not following your company's style guidelines (you do have style guidelines besides just indentation rules, right?), or watching for somebody screwing up a merge in such a way that makes your code do something entirely different without changing anything besides indentation? I think anybody who doesn't see how fucking stupid of a tradeoff that is has had way too much koolaid.
Scrap the conditional. They *are* interpreted languages. So was BC-Algol. So are many versions of Lisp and Scheme.
But do note that just because one implementation of a language is interpreted, doesn't mean that the language is inherently interpreted. UCSD Pascal was an interpreted language. FPC Pascal is not. Lisp 1.5 was an interpreted language. SBCL Lisp is not.
It's true that I haven't heard of any compiled versions of Python, Ruby, or Smalltalk, but that's not proof that they are impossible. (Pyrex comes close WRT Python, as possibly does Cython...but IIUC it's WRT Python2, not Python3.)
Currently my language of choice is D (Digital Mars D), but I sure envy Python it's collection of libraries. And most of the time I'll try to use Python first.
I'm afraid that I consider C a nest of bug-prone constructs. And C++ isn't any better. (I really dislike the STL and boost isn't that much better. Dealing with unicode in either language is too much pain to bother with. (C *is* useful as a glue layer to foreign libraries. C++ doesn't even have that utility.) And pointers are one of the worse aspects, second only to non-range-checked arrays, with free casting of RAM locations in third only because it's rarer.
I think we've pushed this "anyone can grow up to be president" thing too far.
Why is this news? Why is everyone complaining? They are saying they'll no longer be updating Java 6. You want your TZ updates, move to Java 7!
This just in: the Commodore 64 will no longer be supported by Atari.
Given the history of MS, I would expect him to end up in a worse spot.
Java has been GPLed, and Oracle has pretty much lost the law suit claiming copyright on the API documentation (IIUC). So Java just needs to be forked NOW. (I believe that this is in process.)
MS has given no indication that they will ever release C#, and certainly they have refused to release certain parts of .NET. So I expect that C# will end up wholly proprietary. (After all, they *are* the copyright holders, so they can release new versions under any license they choose.)
I think we've pushed this "anyone can grow up to be president" thing too far.
IIUC, Ruby2 *is* thread-safe. It's just that its libraries aren't. So the native implementation maintains a GIL. OTOH, there are a couple or three implementations that DON'T have a GIL. One of which (JRuby?) runs on the JVM.
I think we've pushed this "anyone can grow up to be president" thing too far.
Seriously did no one notice that this is for Java 6? Update to Java 7. Way to make a story out of nothing. I hate Slashdot editors.
Sorry to correct you, but it bothered me, in decreasing amounts, for the first 6 months that I used Python. (OTOH, I was also bothered by Ruby's @, @@, and $ annotations. That bothers me for a day or so every time I come back to the language, whereas Python's whitespace no longer bothers me...but I do use tabs rather than spaces, despite opposition on the mailing list. It's perfectly safe and grammatical as long as you don't mix spaces and tabs in the initial whitespace.)
I think we've pushed this "anyone can grow up to be president" thing too far.
Your own quotation doesn't seem to support your assertion:
Emphasis mine. One of the four "crucial areas" is the CPU implementation.
It may have seemed evil -- especially for those of us who worked with that guy and had to read his code -- but there was actually a purpose for his coding style: it was supposed to save disk space. Really. Unfortunately, the savings were miniscule compared to other things one could do to save space. Like instruct the XEDIT editor (this was back in my VM/CMS days) to not add the sequence numbers to columns 73-80 while working with the file. There were file compression utiliities that worked much better when they didn't encounter those useless numbers. If memory serves (and I'm pretty fuzzy on this not having used it since the early '80s), there was even a CMS filemode number that caused files to be saved on disk in a compressed format and I recall writing macros to remove the sequence numbers from files that had them inserted by an editor user who didn't know the trick to disable them. Ah, the weird crap we had to do back then.
CUR ALLOC 20195.....5804M
GP was right...Java (and C#) is a compiled languages. The bytecode is interpreted by the virtual machine just as the machine code would be interpreted by an actual machine. The important thing is that there is a compilation step that will do type checking and variable name checking to ensure that you don't have fat-finger bugs.
Spoken like somebody who hasn't ever coded. You've got ( ) { } [ ] and arguably "" and '' with which to surround things you want enclosed. Now, it is debatable as to whether the current consensus as to which to allocate to what is correct, but the fact of the matter is that if you enclose something with those pairs of characters that people will naturally get the hint that something has been enclosed.
Whereas using tabs and newlines in this fashion conveys no such thing.
What's more, because the newline terminates the line, it means that you can't do things like split regexes onto multiple lines to enhance legibility as those would be executed as if they were intended to be different lines of code.
Just because you don't understand why the convention is typically to use curly braces like that instead of white space, does not mean that it's an arbitrary decision. It just means that you need to read up a bit before you speak up.
I turned on "show hidden characters" after the first hour of using Python... I now keep it enabled in all editors all the time. Keeps you from messing up pretty much all documents (although tab stops can do crazy things to layout still).
Character 0x20 is just a character on screen; nobody said it always had to be a blank.
You've sort of just proven the GP's point. The Romans didn't have spaces or punctuation in Latin, and they could read and write just fine, the reason why English and most modern languages do have whitespace is that it makes it easier to read in a more efficient fashion. The language itself would function just fine without the white space, it's just that you would need to know a much larger number of words before you could start reading.
Computer Science is about Computers exactly as much as Astronomy is 'about' telescopes. Means, not an End.
* Attribution lost in the mists of time. No, it's not Edsger Dijkstra.
The linked page says that Java 6 has reached end of life, and that further patches will cost money. So, is the problem in fact that you (the poster) run your application on outdated software? Would it still be an issue if you ran a current version?
License here: http://www.ibm.com/developerworks/java/jdk/dst/license/en.html
Read it first !!
Python bytecode is not machine code, and the Python VM isn't very fast. All .pyc files do is speed up loading of the application. Python is ridiculously slow. Even proper Python JITs like PyPy aren't as fast as, say, Lua or JavaScript, just because Python's semantics are so convoluted (although JavaScript's semantics are convoluted _and_ useless, so...)
That said, it hardly matters. The big different between Java and Python is that with Python you'd also need to choose an operating system so your application would work reliably, whereas with Java you can get closer to the "run anywhere". Case in point, Java handles all of its time and data internally, whereas Python would use the operating system facilities for timezone data.
Time-zone updates are often released after time-zone changes have taken effect which is not useful for airlines selling tickets for future travel. In fact sometimes even the Olson DB release is after the fact and so we must manually update it ourselves before hand.
We create a single patch jar loaded on the bootclasspath to override the JVM and JodaTime time-zone data in a single step such that to update production JVM's, we just have to replace that single jar and restart the JVM.
We use the javazic compiler from OpenJDK7 to process the latest (patched if need be) Olson DB. The patch jar overrides the standard class “sun.util.calendar.ZoneInfoFile” such that standard JDK classes (Date/Calendar) use time-zone data from that patch jar. The patch when loaded also sets the system property “org.joda.time.DateTimeZone.Provider” to our own provider such that the patch is also the source for time-zone data for JodaTime.
All this is wrapped up in a simple ant build complete with unit testing to cross check that JodaTime and Calendar make time-zone transitions at the same time in each time-zone for the next 365 days. We also mandate use of JodaTime over Calendar but sometimes Calendar can't be avoided so ensuring the time-zone info is in sync between them is a must.
Haven't looked yet at how this might be affected by JDK8 and JSR310, but am sure the process can be updated to cover them.
CPython "compiles" a Python program to bytecode, but that's just a pickling of the parse tree. Does this bytecode get further compiled to native code nowadays, or does it get interpreted like CPython has always done?
So I guess you only use purely RISC processors?
Ican'tagreewithyoumore.Whitespacehasnoplaceinsyntaxatall.Let'sdumpitall.
If you have the source code for the patch for this version of java, then can't you just make your own version of this API?
to be fair to Microsoft, they never even suggested that programming in .NET would be anything other than quite expensive for the tooling.
Unless you count the Express versions.... in which case, yeah... they're just as bad as Oracle. But at least you still have Java, unlike Silverlight and XNA and VB6 :-)
good for you, tabs were invented for one reason - and that is indentation. So it bothers me that the recommendation is to use spaces - which are a PiTA. If Python only used tabs for indents, I'd be ok with it, though I still think braces to enclose code blocks is a sensible idea.
Professional ? I have not really seen any discussion about low level styling issue like this one in at least a decade. In practice, nowadays, you have to actively fight against your editor to have a mismatch between indentation and blocks, professional developers have moved on to nitpick about other stuff.
The fact that there are people that feel strongly about something that even the shittiest editor on the market will handle flawlessly instead of, I don't know, the difference in basically everything between java and python, is what makes feel slashdot readership has turned in a bunch of script kiddies arguing with a bunch of older developers turned project manager a decade ago.
I think that Oracle has just killed their golden goose! Gee, I wonder just how long before some one else addresses this issue? 10...9...8...
Sometimes, real fast is almost as good as real-time.
Right...for some definition of "terribly slow" that includes "fast enough to run 'thousands of real-world business applications around the world, including many large and mission critical systems'" http://www.python.org/about/quotes/
Yes, but Python's bytecode is much higher-level than the bytecode used by the other three, because it doesn't have explicit typing of variables or direct integer manipulation. The performance implications are substantial if you're performing any non-trivial calculations. (Of course, if your process is I/O bound, this is largely irrelevant...)
Python also cannot be efficiently multithreaded, which is a killer for many high-performance applications.
We already knew python is bad for high performance, but that goes for all bytecode languages, including java. If speed is important you should think of C/C++ or similar.
My experience is that C/C++ isn't even harder to port than Java as I have a history of strange java issues. It's not even that hard to write portable C++ if you know what you are doing. Portability might not be an issue for the original poster, but if it isn't, then why pick java in the first place?
The linked page clearly states:
"The current Time Zone information is included with every update release of Java SE.
As of February 2013, Java 6 is at End of Public Updates. Developers and end-users are encouraged to update to more recent Java SE versions that remain available for public download. For users who need continued access to critical bug fixes and security fixes as well as general maintenance, such as the TZUpdater, for not publicly updated versions, long term support is available through the Oracle Java SE Support Program."
So either use a current Java release, or if you must use an EOL/EOS version of Java and need TZ updates find another way or pay for support.
This does NOT equal Oracle no longer providing free TZ updates for Java.
The bottom line is that while in every language there's probably some number of places you could hit backspace a couple of times and still end up with correct syntax but disastrous behavior, in Python, you have orders of magnitude more, and most of them are a lot harder to spot.
I have had to deal with the aftermath of one incidence of that sort. But it was not Python code, it was C++ code. One * character was missing from the code. By the time the problem was discovered, that one missing character in the source code had resulted in the accidental deletion of 100000 email accounts.
Yes, and CPU implementation is a further subdivision of computer elements and architecture.
Then the details of register use are an even further subdivision.
I've done work in the field since the 70's. The last time I had to worry about CPU architecture was as a junior in college in 1971 when I was porting Spacewar from a PDP-1 to a PDP-8. Mostly these days it's all about algorithms in high level languages.
There is an ongoing project for development of a python front end for GCC. I don't know its current status but it most be experimental.
Also there is the Java implementation of Python, JPython. By virtue of running over the JVM Just In Time compiler Python code gets compiled to native code in runtime eventually.
I can understand your point about C but the lastest C++ compilers are looking real good for the same job, even if you limit yourself to a subset of C++. I have been converting some old libraries and small apps from C to more modern C++ using mostly strings and maps and I can report that is much safer and readable than C. Just using std::string to replace char*s have been a pleasure in security gained, even if std::string is not very nice.
Practically hadn't needed pointers in most cases.
"I think this line is mostly filler"
I do that as well — for very short-term insertions of debugging code.
Of course, it's imperative to remove it or, at the very least, properly indent it, before checking it in.
As a side note, every source code version control system should have a customizable pass/no-pass filter that can reject the checking in of improperly formatted code.
If you can't code in binary, you ain't worth shit.
“He’s not deformed, he’s just drunk!”
Hmm... the Defenestration of Prague started the wars, and defenestration involves being pushed through a window... C# started it!
Hail Eris, full of mischief...
E pluribus sanguinem
Yet Python is perfectly fine without curly braces and never leads to oversights due to faulty indentation. And not having to type the bloody curlies is heaven.
Maybe you need to code a bit more (in Python) before you speak up?
... but does anybody else think the whole world should just move to 24 hr GMT, and get it over with.
perhaps you missed the tokenization section of parser class
a non-word character is required to seperate tokens (words).
this is true in python as well. and it's been this way since we
got enough paper to not mind wasting space on vowels and spaces,
many kyears ago.
Yeach, because Python is a replacement for Java.
It's easy to find a mistake with brackets by using a code reformatter. Not so much when you rely only on indentation -- unless your IDE is really smart.
What would really be nice is if people would stop treating quirks and oddities as big advantages. Sometimes, something is just plain different, and that's it.
With that said, I really, really wish other languages would start supporting quotes like Perl does. I'm really sick of having to escape quotes when doing some quick-n-dirty scripting with HTML.
While that isn't the most precise analog I've ever read, when combined with the sibling posts, it makes quite a bit of sense!
:)
Thanks
Boot Windows, Linux, and ESX over the network for free.
I never really liked Java, I liked the idea of java. I *really* liked the idea of optimized bytecodes that could be JITed. Java was full of promise. It may well have gotten a C++ interface.
I wanted java to do well. It could have been a great thing. Richard Stallman was right, I suspected he was right all along, but I was optimistic that Sun would do well. When Ass Hole Ellison (AHE for short) bought sun, I knew it would get worse.
The last two reasons for using Java are tomcat and Android, and Android "java" doesn't matter much because it isn't even java byte codes. I guess tomcat could be replaced by PHP.
What kind of fucking moron uses Java these days. Sheesh, get with the time grandpa.
Yes, and CPU implementation is a further subdivision of computer elements and architecture.
Then the details of register use are an even further subdivision.
I've done work in the field since the 70's. The last time I had to worry about CPU architecture was as a junior in college in 1971 when I was porting Spacewar from a PDP-1 to a PDP-8. Mostly these days it's all about algorithms in high level languages.
Aren't these details important to understand for what might be non-obvious reasons?
:P
To give an example, take a look at gaming consoles. Performance and graphics get better over time because programmers write "to the hardware" with increasing precision as the product ages, and this provides a benefit that's almost completely unseen in modern general purpose computing.
The technique of "expanding the loop" to increase performance is a common tactic taken by programmers, no? I know I've done it with scripts before. Are modern compilers simply so good at optimizing binary code that extending this from a high-level language to the assembler it compiles to is simply not a reasonable thing to expect a programmer to be able to do?
I know I'm showing my ignorance on the subject, but of all the things I've ever researched for my own enrichment, C/C++ types of languages constantly fail to make sense to me... and I'd like to know more about the interplay between them and what actually goes on at the level of the CPU assembler-type code itself, but it seems like even getting partially fluent enough to understand what's going on in a dozen lines of ASM is an impossible dream.
Boot Windows, Linux, and ESX over the network for free.
Having spent about 2 months programming in Python and walked away disliking the whitespace constraint, I can flat out say you are mistaken.
Don't get me wrong, I like Python a lot... but I consider the whitespace for block notation to be one of it's worst features, and the root cause of other misfeatures.
Is this left over from copyright issues on the Olson database? There was a book publisher that complained that the tzdata was taken from their book and so they had a copyright on it and they wanted cash. It was settled but that doesn't mean they didn't hip of Oracle for a bit of their pile of cash.
https://en.wikipedia.org/wiki/Tz_database#2011_lawsuit
The NTP protocol knows nothing about time zones. You would need to extend the protocol.
"NTP provides Coordinated Universal Time (UTC) including scheduled leap second adjustments. No information about time zones or daylight saving time is transmitted; this information is outside its scope and must be obtained separately."
https://en.wikipedia.org/wiki/Network_Time_Protocol
Everything I write is lies, read between the lines.
We could also use DNS to cache malling addresses so I can do a look up when I forget my postal code. Caching phone numbers so I can lookup my own phone number would be great too. We could also feed our agendas into DNS so, when I do a lookup for Sat.Jun.8.10.00.00.EDT.2013.mydomain.com, I get the coordinates of my 10 o'clock meeting, that took place this morning.
I think that we are really in the Stone Age with regard to DNS. We haven't even started to realize the mighty power that DNS possesses and we haven't discovered even 0.0000001% of use cases where DNS could be used to help save humanity.
Everything I write is lies, read between the lines.
By themselves, neither high-level bytecode or a lack of fine-grained threading preclude high-performance apps. It's more a lack of engineering talent being thrown at optimizing the interpreter.
Javascript is an excellent example. It doesn't have strong types and operates at a similarly high level of abstraction. Unlike Python, the language is not thread-safe at all and relies on the interpreter to start isolated instances of itself to be able do multiprocessing safely. Yet, many existing Javascript implementations are now fast (Google's V8 is within spitting distance of native C/C++) and many high-performance, highly-concurrent server-side applications are implemented with node.js.
So, it's not impossible to eventually get similarly good performance with Python in general; it will just take the right kind of incentives and funding.
Everybody has been shitting on us since the beginning, and, to be quite honest, I don't know who you spoke with, but I've found the ruby community to be more helpful than the java, perl, and bash communities combined. I don't know, but flinging more shit doesn't help end the flame war.
Stop generalizing. Fucking anonymous coward.
It's not like Oracle is the provider of the time zones. Java uses the standard and open Arthur Olson zone info ones, and only modify the zone files to fit within the java framework.
What it boils down to is that Oracle wants money for what they themselves are freeloading.
What's needed is for java to be able to use unmodified zoneinfo files, or an open source zone info compiler that can convert them for use by any java installation.
About damn time.
although IIRC Oracle tends to use a lot of code from this project as part of the stock JVM.
Isn't that a violation of IP of some sort? What is openJDK licensed under?
I never cared for Java, or Silverlight, or any other language that requires plug-ins.
It's turning into a nightmare at our enterprise. Some teams have projects that are only compatible with older versions of Java, and the GPO keeps pushing out new versions of Java to keep up with the security updates, and then it breaks the older projects.
So it's a scramble for the support team to figure out all which versions you can use for which project.
And then on top of that, we can't use Chrome because for some reason it disables Java if it's not the newest version, and even after downloading and installing the latest Java, Chrome still doesn't recognize it. I think it has something to do with 32-bit vs. 64-bit. So basically my app that runs amazing on Chrome, can't be used because I have to link out to these other older projects that still use Java.
Such a PITA.
UCSD Pascal was an interpreted language.
It also had (for at least a couple of architectures) a p-code to native compiler, making bytecode interpretation optional, or only used during debugging.
So, you did a merge and then immediatly entrusted important customer data to the newly modified program with no backups?
I'd suggest that whitespace is the least of your problems.
Larry Ellison is the prince of Nigeria right?
In python you sorta have to work with multiprocessing, using message queues.
This will also allow you to offload non-trivial calculations to C.
Downside: more work, and it might be costly to transfer the dataset.
Advantages: very flexible.
This begs the question, can you call an API free if you have to pay for it to return accurate information? What is the point of such an API? Should the community not expect that core Java classes are fully functional and accurate?
The point of a free API is the ability to create independent implementation, exactly because this kind of scenario can and will happen everytime you depend on a library. There are open source implementations of the java runtime. They don't have all the latest features, but the reference implementation is complete. This may be worth investigating. If it costs less to make your software running on an OSS runtime than to buy an oracle license, go for it...
The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
I've only done work in the field in this century—but the last time I had to worry about CPU architecture was probably 6 months ago, when my employer upgraded the chipset for some high-performance internal software. The importance of computer architecture to an individual developer simply varies based on workload: it matters for mine, it doesn't matter for yours, big whoop. However, the importance of computer architecture to the field as a whole should not be underestimated.
Well you could with implicit line joining:
def square(x):
print(
'DEBUG: x=%x' % x)
return x*x
Note that the print starts indented but since a parenthesis is opened the rest of the statement can continue anywhere on the next line. Until the closing parenthesis whitespace rules are ignored.
http://docs.python.org/3/reference/lexical_analysis.html#implicit-line-joining
But really you should use the logging module and set log levels. Debuggers are good tools as well, but I usually rely on unit tests to track bugs (or rather, not have to track them down).
I didn't miss it, but GP apparently did. I just pointed out that white space is already significant in most languages.
If the whitespace still bothers you - it means you haven't even spent 15m using it.
Thank you! you have made manifest my biggest beef with Python: "If xxx bothers you, you haven't Seen The Light(TM) yet". The beef with whitespace ranges fifth, take or give. Second to fourth all have to do with Community Attitude (the soul of the language, so-to-speak).
I've coded a couple of thousand lines in Python (and it has taken me more that 15m, Im' not that fast).
While I understand the design decisions (it's not the first language having taken that decision, after all), I don't agree with it: i write programs for others to read them (and for the parser/compiler to transform them). I do appreciate the freedom I have in this extra chennel.
No it doesn't.
Code should be readable without knowing the language, and python fails that miserably with all the syntax hidden in the white space.
If this is your chief concern, then I think you're barking up the wrong tree. If you actually don't know the language, there are many features of Python to make it poorly readable to any person without actual knowledge of the language to an extent much greater than could ever be the case with simple syntactic issues. (The existence of two distinct kinds of stack frames or the superclass chain linearization rules are two obvious things that come to mind.)
Having said that, a language different from the ones you know is only comprehensible to you if it isn't actually all that much "different" - otherwise what would be the point of being different - so this isn't a Python-specific issue.
Ezekiel 23:20
What's preventing you from writing one?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Classical Latin used a raised dot between letters, at least on stone.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Generally though the whitespace is either visible (albeit indirectly) as in the case of a CR/LF, or it doesn't matter syntactically whether it's a tab or three spaces (or four or five or a hundred).
That isn't the case with Python.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
GP and you are insanely Wrong. C# is NOT a compiled language, never was, never will be and was Microsoft Answer to Java. I dare you to run anything you write in C# without all the runtime libraries and without windows OS.
I can do that with C and C++ easily.
How about Erlang? It has been battle tested and runs decently fast. It seriously rivals anything in the server space. http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1
If something is mission critical for your business, why would you balk at paying for it? Do you pay for office space, electricity, insurance, computers, internet?
Oracle is not your Mom or Dad. You have been living on Oracle's couch for free. Now it is time to pay rent, or move on and get your own place.
Blame your phone battery on it too then - your sim card is more likely to run java than not (I'm not kidding, embedded java is actually fairly mature thing).
Java 6 updates are discontinued for free, Java 7 is not. Update Java on your machine.
I can see it coming. This is the kind of shit people were afraid of with Oracle and now.... here it is. Jesus. I seriously didn't think they would do this.
What other language has the same quality GUI toolkit graphical packages, an open source text indexer like Lucene, an immense set of 3rd party APIs for just everything , first class data structure s built in , runs on both Linux and Windows comes with a scene graph / browser widget and has great IDE support?
I just read this back and it sounds like I am being sarcastic. I am not. This is a serious question because we absolutely need to have timezone support- no question and there's no way we're paying Oracle type prices to have it, so I guess my decades old investment in Java is about to go bankrupt.
Great. Fucking ASSHOLES.
Oracle reminds me of Matt Taibbi's great characterization of Goldman Sachs-
Goldman Sachs is a great vampire squid , roaming the earth, poking its blood funnel into anything that smells like money"
It has to do with Java's obsession of being its own environment and avoiding any impure non-Java interaction. Every decent OS already has a timezone database and tools to query it; Java has to build its own. Same idiocy that makes it impossible for one to queue mail on a system locally (using fork/exec sendmail) - Java can't do exec so sending mail requires an SMTP server. And it goes on and on, where pretty much every OS advances or features that aren't in Java, are not available to use.
LOL so you go from one proprietary controlled software to another proprietary controlled software? What's to say M$ won't pull the same shit they did in the past or that Oracle does right now with Java?
Custom electronics and digital signage for your business: www.evcircuits.com
If it bothers you that much, use tabs and tell your text editor to display them as something appropriate.
Do note, however, that compiling rather than interpreting, code doesn't automatically make it faster. Most attempts to compile Python that I've seen, e.g., use the same PyObject routines that the interpreter does. This means that you can speed up things like for loops, but anything fancy, like generators, doesn't gaim much, as the interpreter already uses pretty much optimized methods.
Thiis is something that is too often not understood. If what you're doing is mainly invoking things that are distant from assembler, you don't gain that much by using a compiler. ..it can even slow you down in some cases. (Still, it would be nice to see whether a compiler could actually speed up python much over, say, PyPy. Pyrex/Cython gets around some of the limitations by allowing variables to be declared as cints, but that's not really Python. And if you stick to straight Python, IIRC, you don't see much gain.)
I think we've pushed this "anyone can grow up to be president" thing too far.
If I am reading the linked article at oracle.com correctly, this change only applies to Java6 which they say is at end of public updates. They call out the TZUpdater as an example of software that will no longer be updated but they are saying no more updates of any kind to Java6 unless you have a support contract. Java6 is approaching 7 years old now so I don't think it is unreasonable to ask people to upgrade Java7 or pay for continued updates.
What's preventing you from writing one?
Apart from Java not being one of the languages I write anything in because I don't like it any better than Visual Basic?
It's answered; you just have to read it.
.
No standard library? Yup, you can add and subtract super fast. Good for you.
Newlines are for breaking up long lines and indentation is for ease of readability (blocks or whatever your coding style standards dictate).
Fixed layout languages date back to the 1950s (Fortran, for example).
It's not so black and white.
Some languages distinguish between statement separators and statement terminators. And what is considered whitespace too.
Shell scripts, for example. Newline terminates except in buffered context, and is not considered part of whitespace. Which is why the following are different
A=B
C=D
and
A=B C=D
And while whitespace itself isn't significant, well-meaning editors who seek to reduce redundant whitespace (like the slashdot editbox) don't always grok cases like
cut -d\ -f 2 # TWO spaces after the backslash
Yet, Bourne shell isn't considered a fixed layout language.
Not consistently, there may have been some where they did that, but it was definitely not always the case.
Some might argue that this is the first step in Java's death. I don't think so.
Sure, with C# basically matching all features of Java, and with it coming by default on all windows boxes, and with it being available with Mono and pretty much all the same platforms as Java, Java is no longer the only run anywhere language.
However, Java is used by so many products and it runs so many systems, it will be decades before it could die.
Dude, everyone knows Bohemia got what it deserved after it pushed those guys out of a window. FUCK Bohemia.
The answer to this is simple. Nobody should be using the brain-dead Oracle date and time classes anyway. They are a terrible, bug-infested, convoluted mess. This is just the straw that broke the camel's back.
The answer is Joda Time:
http://joda-time.sourceforge.net/
Works the way you expect it to, and can directly access the public tz database without any help from Oracle. Oh, and by the way, it is a fantastic API for dealing with dates and times.
What's needed is for java to be able to use unmodified zoneinfo files, or an open source zone info compiler that can convert them for use by any java installation.
http://joda-time.sourceforge.net/tz_update.html
How's that?
http://joda-time.sourceforge.net/tz_update.html
How's that?
It won't do you any good if you aren't a developer shop. It's not a drop-in replacement, but requires code changes to use it.
Just switch to Joda Time open source library. They provide tz updates as well: http://joda-time.sourceforge.net/tz_update.html.
Sadly they don't include php with any of the pre-compiling accelerators like Eaccelrator. It's pretty common to get 5 to 10x performance increase using this.
--- It is not the things we do which we regret the most, but the things which we don't do.
CPython "compiles" a Python program to bytecode, but that's just a pickling of the parse tree. Does this bytecode get further compiled to native code nowadays, or does it get interpreted like CPython has always done?
Implementation details can vary, although the conversion of the raw source to bytecode form is one of the more expensive parts of the execution process, so any cached compilation can pay off.
For serious optimization, go beyond straight native code to something like a JVM (jython) which can analyze run-time code usage and re-optimize on the fly.
Is your Python implementation interpreted, or JIT-compiled?
Is your Java implementation interpreted, or JIT-compiled?
Is your C# implementation interpreted, or JIT-compiled?
Of the three, at least two are almost certainly JITted. Can you guess which two?
Karma: Poor (Mostly affected by lame karma-joke sigs)
One more nail in the Java coffin.
In fact, the idea that you would use whitespace to denote ANYTHING is ludicrous.
I agree with this in principle; and indeed, the whitespace thing kept me from learning Python for a number of years. However, I must note that every time I look at any C-syntax code that isn't indented properly, it irritates the ever loving fuck out of me. So maybe the whitespace thing isn't that bad.
Anyhow, I still have no desire to learn Python, at least until they can figure out which version they're on. I don't really want to waste time learning Python 2 because Python 3 is the way forward, but at the same time, I don't want to learn Python 3, only to find out that a library that I need only runs on Python 2. Also, as of the last I checked, Django only runs on Python 2.
So, yeah. Can't really justify learning Python right now, whitespace or not.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
If the whitespace still bothers you - it means you haven't even spent 15m using it.
Whitespace doesn't bother me at all. Improperly indented C-syntax code makes me want to vomit.
For me, it's the fact that Python can't figure out what version it's on. Python 3 is clearly the way forward, but many important packages, including Django, are Python 2-only. I'm not going to waste my time learning Python 2, and neither am I going to learn Python 3 until, at the bare minimum, Django is stable under it.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
For serious optimization, go beyond straight native code to something like a JVM (jython)
But then you're back using Java and dealing with One Raging Asshole Called Larry Ellison.
FYI -- As per Henrik's blog [1], the TZUpdater tool will be made available, likely by EOB pacific today (June 10). Much thanks to all who provided constructive feedback and apologies for any inconvenience. - Don [1] - https://blogs.oracle.com/henrik/entry/tzupdater_for_jdk_7_available Disclaimer - I work for Oracle, and am on the Java SE PM team.
What's more, because the newline terminates the line, it means that you can't do things like split regexes onto multiple lines to enhance legibility as those would be executed as if they were intended to be different lines of code.
You do know that you can escape newlines in Python with backslash, right? And that newlines are ignored inside parentheses?
Scrap the conditional. They *are* interpreted languages.
They are JIT-compiled, not interpreted. Well, okay, Sun JVM does some bytecode interpreting alongside JIT-compilation, but .NET is a pure compiler.
Just because compilation happens later doesn't make it an interpreter.
It's true that I haven't heard of any compiled versions of Python
PyPy is an implementation of Python based on a JIT-compiler.
MS is the copyright owner of one particular implementation of C#, but the spec is out there, and Mono has been following it very closely. So C# can be forked just the same.
One other difference is that C# spec, and portions of .NET APis (in particular, all the fundamental classes - pretty much the kind of thing Oracle sued Google over) are covered by "open specification promise", which is basically a patent grant to anyone implementing that spec.
That. At the end of the day it doesn't matter what programming language you use if your algorithm is shit.
Get the algorithm right. If performance is not good enough, profile and optimize hot spot(s).
CPU architecture can and will change. Unless you're a hardware guy or in a pretty specific niche field, trying to get too clever with low level optimizations is only going to be shooting yourself in the foot when the new architecture changes the rules on you next year. Also - if you picked the correct algorithm, the compiler/cpu instruction set will likely be optimized for it sooner or later.
Unless you're in a very niche field, software is generally written to survive multiple generations of hardware advances.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
Consoles (and gaming in general) are an unusual niche. Most software that does real world stuff has to survive across multiple generations of hardware, where the low level details change. The compiler, OS scheduler, etc know better (and certainly will know better in future) than you with regards to what resources are available and how to use them for most of your program's lifetime.
In a fairly counter-intuitive way - hardware evolves to run the software faster. This is why we're still running on x86 lookalike machines - because intel designs hardware to run existing software.
Don't get me wrong - i'm not saying you won't get better performance in the short term. But over the long term, all that work you did will be invalidated next hardware cycle. And if you chose an intelligent algorithm in the first place, chances are the hardware will evolve to run it faster.
Unless you're in a high performance critical niche industry - Spend your time making the lower level details of your code correct, safe and secure instead.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
So maybe you should learn java instead.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
So maybe you should learn java instead.
I'm already pretty decent in Java. Looking for something new to learn so I don't get bored.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
you might want to bench on a multicore server with J9 jvm
Thus untold man-years lost on debating silly stuff like how your code should be styled. At least Python places some constraints on that, so people have less silly shit to waste their time on.
Well, for one they don't use version control - instead, they use indentation and likely comments to mark the changes. Sigh.
if you use pypy all three are
Snowden and Manning are heroes.
Consoles (and gaming in general) are an unusual niche. Most software that does real world stuff has to survive across multiple generations of hardware, where the low level details change. The compiler, OS scheduler, etc know better (and certainly will know better in future) than you with regards to what resources are available and how to use them for most of your program's lifetime.
Thank you! That actually makes a lot of sense. "Trusting the scheduler to know better" is actually something I rely on a lot as an example with regard to hypervisors. I don't want to make the mistake of pinning VMs to certain CPUs or cores unless I know for a fact that it's a good idea, and I shouldn't have to! The scheduler should be smart enough to make that decision on its own, and if I can expect that, so should a programmer. Right? :D
In a fairly counter-intuitive way - hardware evolves to run the software faster. This is why we're still running on x86 lookalike machines - because intel designs hardware to run existing software.
It certainly does. The thing that makes me step back and raises the questions I've made is that "software bloat" is often attributed to "eating up" performance advancements in hardware. If proper computer science education's goal is to minimize this effect, what level of knowledge achieves this? Proper code construction? Is it more about knowing what type of loop to use than it is about the amount of memory you allocate or whether you thread properly?
:P
Don't waste too much time on that if I'm just completely off base; as I said, I have no proper CS education, but the concepts behind it are some of the most interesting things I've ever read about. It makes me wish I had gotten into using assembler back in the DOS days, when it mattered more
Don't get me wrong - i'm not saying you won't get better performance in the short term. But over the long term, all that work you did will be invalidated next hardware cycle. And if you chose an intelligent algorithm in the first place, chances are the hardware will evolve to run it faster.
Unless you're in a high performance critical niche industry - Spend your time making the lower level details of your code correct, safe and secure instead.
That's the crux of my argument. Performance is basically the assembler-level expression of your code structure's higher-level construction. You do hit on a very important point. No one can learn everything, so it may indeed be a better idea to teach "safe" versus teaching "fast." Regarding the OP's point though, it's probably best to do that from the standpoint of several different coding languages. Start with something that's fully-managed code, and then work your way down to something more "raw," like C?
The thing that gets me about Java is that it runs on top of the JVM. Perhaps the solution to that conundrum is to move the JVM into hardware, which is something that I recall Sun attempting and mostly failing at doing for mainstream x86 hardware. It'd be kind of funny if the ongoing lawsuit was between Oracle and Intel, but I digress.
Thanks for your input, sir!
Boot Windows, Linux, and ESX over the network for free.
The point was, if you use Java or C#, there is no "if you", they just are (in any implementation you're likely to be using, anyway).
Karma: Poor (Mostly affected by lame karma-joke sigs)
No such thing as an interpreted languages. You can have a language that has an interpreted implementation, there are C interpreters.
Both Ruby and Python are bytecode compiled, and Python actually saves the bytecode in a file, just like Java.
Depends.
Long running programs usually run faster than equal C++ apps because of JIT. The JVM will have much more relevant information than a static compiler will ever have.
If you have high performance mathematical needs, C or C++ is a worse choice than Fortran which will make it much easier to write and debug and will run faster.
Most applications are not CPU bound in more than a few spots, at best. It is why slow shitty languages like PHP can perform decently in its little niche.
Of course, that the Eve Online client is mainly Python(obviously not running the stock implementation, it runs stackless python) is lost on people. Which is too bad, because if they realized it, then they would stop confusing language with language implementation.
Trust me, I could write an interpreter for C(C++ is essentially unparsable) and it would be beyond slow.
Because whitespace is supposed to be used to make it easier to read, not denote scope.
The use of whitespace in Python makes it much weaker than it could be. That and they stupidly added statements into the language, everything should be an expression(ie evaluates to a value).
Everyone(who has the slightest clue, uses whitespace to properly format their code anyway, why enforce it at the cost of a weaker language?
Erlang, Ocaml, Haskell, Ruby(much cleaner and more powerful than Python), Scala, Go,Clojure...
My suggestion would be to skip Django. Besides the differences between 2 and 3 are _trivial_ compared to what you'll need to learn about Django.
My suggestion would be to skip Django.
What is your suggestion for Python-based web applications, then?
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
If you had read a few more lines you might have understood that the IBM timezone updater tool only works on IBM JREs...