"Checked exceptions are only useful if you can handle them, but 99 out of 100 times you can't."
Then you just don't handle them! But this will be an explicit decision, while in the RuntimeException case you are not forced to document this decision.
"In practice what we see is that either exceptions get wrapped and wrapped and wrapped..."
And this is a good thing. One of the most important job in exception handling is not recovery, what most people think, but changing the abstraction level, collecting context information and giving useful information for debugging.
"Alternatively, your code can declare the exceptions being thrown by its dependencies, but then you end up with dependencies bleeding into layers where they have no business."
No, you should declare an own exception, and wrap the exception of the dependencies in that new exception.
Anyway, most of the exception handling idioms boil down to:
- wrap, rethrow
- log, rethrow
- log, swallow
- handle, swallow
- partly handle, wrap, rethrow
If the exception handling syntax makes these cases concise and readable, and allows to factor out common patterns (attachable exception handlers; inheritance like constructs) then I think all of the pain with checked exceptions could be reduced to the point where the benefits overweight them.
"Java checked exceptions do absolutely nothing to help when you're working with dynamically-loaded code, for instance."
The same is true for invoking methods through reflection. Or transforming bytecode through custom classloaders, etc.
But these are low-level techniques that should be used with care -- exactly because they can break things in unexpected ways. But this is not an argument against checked exceptions.
"The worst thing you can do is catch all exceptions silently in the outmost method."
No, it is actually worse to have only RuntimeExceptions and handle none. In the static version, at least a code reviewer will immediately see the empty catch blocks, while in the dynamic case the problems will remain hidden.
In the checked case, when I ignore exceptions (catch, and do nothing) at least I document it explicitly in the code by writing the empty catch block. This is not true for unchecked ones.
I think checked exceptions are largely misunderstood. When people complain about them, they unknowingly, but almost always complain about the try..catch construct -- it is very wordy, annoying, inflexible and is almost impossible to factor out common idioms.
This article will be the perfect one to start my little Flame War and abuse my precious, well-undeserved mod points to distort the conversation, downmod logical arguments to HELL and give rise to the brainless mob, thus poisoning the global Karma and drive the masses towards the unavoidable conclusion of my ultimate plan, and finally achieve TOTAL WORLD DOMINATION!!
"But is he actually writing his own, or using existing solutions (Map reduce/Cassandra/etc.)"
He is building tools on top of existing solutions. So thats a mid-way approach.
"Anyway a good tutorial and some API docs are enough to use most of these things. No need for a degree for that."
What companies do not have is usually _time_. That's why it is perfect to use students to do that. And I think this is a fair solution. I, as an advisor benefit from remaining in touch with the industry and know what is relevant -- and teach with this in mind. They benefit, because they would probably not allocate time for this task otherwise -- but students have to do MSc theses. Students benefit, because they do cool, real life stuff, but still doing interesting research level work.
This very much depends on the University. One of my students is already working for a company optimizing database systems -- practically a consultant company.
Now the MSc (and BSc) thesis and the work of the student is about these new NoSQL stuff. While it is certainly not a development job per se, but it is definitely driven by the requirements of a real world company. I think this is a good compromise. Also helps that the company owners will kick the guy's ass more effectively if he slacks off:D
No, I am not:) I just tend to not write explicitly about myself in public places. As you realized however I do not make it impossible to guess, and it is not a strict rule, just I do not like to give it right away:)
This is again completely the opposite in my country. If you do not have a CS degree in a prominent university you will not get a good job because graduates are given a priority. I don't know why is this the case, and why there is a difference from the UK. Anyway, I don't complain:)
Currently in my country CS students could choose from as many jobs as they please. Most of the students already start working during their studies. There is also a government push to reduce the number of non-technical degrees as they cannot get a decent job.
Interesting to see that this is quite the opposite of the UK situation.
Don't forget, for the public even "linear" and "exponential" is jargon -- it is extremely hard to avoid these simple words, and there are a lot of others.
Maybe it would be useful to make a list of these "simple" terms that are unknown for the general public.
My personal experience (not just in science) that the best teachers are those that were mostly autodidact. Learning how to learn things without help is an experience that is very useful for transferring knowledge.
1. They will understand the importance of a good teacher -- which they lacked 2. They will know the hardest roadblocks for understanding -- which they suffered
That is why the curriculum should focus the more theoretical stuff at the beginning, and the more practical stuff at the end. In the beginning the remaining time is just too large and the material could go obsolete, but in the final years it is fine to go into the details. Sadly, by forcing us the BSc-MSc system this system is now all backwards. I hope we change back to the German Hauptschule-Universität system.
"Someone with a Ph.D. is smart enough to know how ignorant he is." That's soooooooo false. Just the opposite.
"Checked exceptions are only useful if you can handle them, but 99 out of 100 times you can't."
Then you just don't handle them! But this will be an explicit decision, while in the RuntimeException case you are not forced to document this decision.
"In practice what we see is that either exceptions get wrapped and wrapped and wrapped..."
And this is a good thing. One of the most important job in exception handling is not recovery, what most people think, but changing the abstraction level, collecting context information and giving useful information for debugging.
"Alternatively, your code can declare the exceptions being thrown by its dependencies, but then you end up with dependencies bleeding into layers where they have no business."
No, you should declare an own exception, and wrap the exception of the dependencies in that new exception.
Anyway, most of the exception handling idioms boil down to:
- wrap, rethrow
- log, rethrow
- log, swallow
- handle, swallow
- partly handle, wrap, rethrow
If the exception handling syntax makes these cases concise and readable, and allows to factor out common patterns (attachable exception handlers; inheritance like constructs) then I think all of the pain with checked exceptions could be reduced to the point where the benefits overweight them.
The problem is that try...catch is not suitable.
"Java checked exceptions do absolutely nothing to help when you're working with dynamically-loaded code, for instance."
The same is true for invoking methods through reflection. Or transforming bytecode through custom classloaders, etc.
But these are low-level techniques that should be used with care -- exactly because they can break things in unexpected ways. But this is not an argument against checked exceptions.
"The worst thing you can do is catch all exceptions silently in the outmost method."
No, it is actually worse to have only RuntimeExceptions and handle none. In the static version, at least a code reviewer will immediately see the empty catch blocks, while in the dynamic case the problems will remain hidden.
In the checked case, when I ignore exceptions (catch, and do nothing) at least I document it explicitly in the code by writing the empty catch block. This is not true for unchecked ones.
"Then they decided to use a library that used a library that dynamically loaded some JDBC drivers that threw unchecked exceptions in some cases. "
In other words, checked exceptions can only help when they are used.
I think checked exceptions are largely misunderstood. When people complain about them, they unknowingly, but almost always complain about the try..catch construct -- it is very wordy, annoying, inflexible and is almost impossible to factor out common idioms.
This article will be the perfect one to start my little Flame War and abuse my precious, well-undeserved mod points to distort the conversation, downmod logical arguments to HELL and give rise to the brainless mob, thus poisoning the global Karma and drive the masses towards the unavoidable conclusion of my ultimate plan, and finally achieve TOTAL WORLD DOMINATION!!
Oh, wait...
No one cares a shit about crises. They concentrate all they effort to make short term money. When a crisis hits, they cry for bailout.
But we have the fine girls.
"But is he actually writing his own, or using existing solutions (Map reduce/Cassandra/etc.)"
He is building tools on top of existing solutions. So thats a mid-way approach.
"Anyway a good tutorial and some API docs are enough to use most of these things. No need for a degree for that."
What companies do not have is usually _time_. That's why it is perfect to use students to do that. And I think this is a fair solution. I, as an advisor benefit from remaining in touch with the industry and know what is relevant -- and teach with this in mind. They benefit, because they would probably not allocate time for this task otherwise -- but students have to do MSc theses. Students benefit, because they do cool, real life stuff, but still doing interesting research level work.
This very much depends on the University. One of my students is already working for a company optimizing database systems -- practically a consultant company.
Now the MSc (and BSc) thesis and the work of the student is about these new NoSQL stuff. While it is certainly not a development job per se, but it is definitely driven by the requirements of a real world company. I think this is a good compromise. Also helps that the company owners will kick the guy's ass more effectively if he slacks off :D
No, but I do think that the status of CS jobs is similar there. Anyway, there are a lot of statistics on the Eustat, maybe I take a look at it.
(Mostly)
It depends. At my university you have to specialize somewhat in the last semesters, and many of the MSc theses are industry related.
No, I am not :) I just tend to not write explicitly about myself in public places. As you realized however I do not make it impossible to guess, and it is not a strict rule, just I do not like to give it right away :)
And don't forget that CS salaries for a given country may be higher than the average in THAT country, but still lower than the EU average.
"Do I speak your language"
Dunno :)
"how cold are your winters?"
Average low temp (last 10 years) is 2C
lowest in 10 years is -23
I will not tell it explicitly, but it is in Central-East Europe.
Just the same here (avoid naming my country -- but it's also in Europe)
Extending my earlier comment: http://developers.slashdot.org/comments.pl?sid=1705838&cid=32770770
This is again completely the opposite in my country. If you do not have a CS degree in a prominent university you will not get a good job because graduates are given a priority. I don't know why is this the case, and why there is a difference from the UK. Anyway, I don't complain :)
Currently in my country CS students could choose from as many jobs as they please. Most of the students already start working during their studies. There is also a government push to reduce the number of non-technical degrees as they cannot get a decent job.
Interesting to see that this is quite the opposite of the UK situation.
I hope this is real, because this would be very bad for a joke.
Er, why would you use your mouse in LyX???
Don't forget, for the public even "linear" and "exponential" is jargon -- it is extremely hard to avoid these simple words, and there are a lot of others.
Maybe it would be useful to make a list of these "simple" terms that are unknown for the general public.
My personal experience (not just in science) that the best teachers are those that were mostly autodidact. Learning how to learn things without help is an experience that is very useful for transferring knowledge.
1. They will understand the importance of a good teacher -- which they lacked
2. They will know the hardest roadblocks for understanding -- which they suffered
That is why the curriculum should focus the more theoretical stuff at the beginning, and the more practical stuff at the end. In the beginning the remaining time is just too large and the material could go obsolete, but in the final years it is fine to go into the details. Sadly, by forcing us the BSc-MSc system this system is now all backwards. I hope we change back to the German Hauptschule-Universität system.
"Someone with a Ph.D. is smart enough to know how ignorant he is."
That's soooooooo false. Just the opposite.