×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

The Energy Saved By Ditching DVDs Could Power 200,000 Homes

arjan_t Re:Blu-ray? (339 comments)

I noticed the exact same thing. The reason why we bother is probably because nearly 8 years later it's still the highest quality you can buy, and it was miles better than any streaming format when blu-ray just came out. Even if in 6 years streaming will be in 50Mbit/s with better or comparable quality, then it still means we have had some 14 years where blu-ray was the best thing out there.

I also found blu-rays to be often cheaper than digital offerings (e.g. many TV shows are cheaper on blu-ray than they are on iTunes).

Further more, for a lot of countries (e.g. The Netherlands) download options for TV shows are incredibly limited. It's often impossible for those countries to stream from places like iTunes, Amazon or the Sony store. The number of shows offered on blu-ray is much larger and while blu-rays unfortunately can be region protected there are still more options to import.

about 6 months ago
top

Hard Truths About HTML5

arjan_t Re:On no. 1 & 3: Never trust the client (265 comments)

He means geolocate by the IP and not by what the client says.

Indeed. It doesn't matter much where the data is stored, since the original number originates from the client anyway. If the client wouldn't store the geolocation, someone could still send any location they like to the server.

more than 3 years ago
top

Upscaling Retro 8-Bit Pixel Art To Vector Graphics

arjan_t Re:Wonderful! (325 comments)

Either way, having 10 images of a guy who's head is a pixel block will not help you recreate his face.

Actually it could help improve the image. If those 10 images are part of a movement, then it's theoretically possible to reconstruct more detail. The original image moved along the scan-lines of a camera, and every successive shot might have captured a slightly different part of this original image. Understand the scan-lines and the movement, and there's more possible than you might think.

more than 3 years ago
top

Book Review: RESTful Java Web Services

arjan_t Java EE 6 - Zero XML (49 comments)

In any fully compliant Java EE 6 application server(*), there is no configuration required at all. Just annotate a simple class in any package with @Path and @Produces. Then add a method that you annotate with @GET and you have a rest resource that can be invoked via the URL path specified in the annotations.

Zero XML and you literally have this running in under a minute.

*) Currently only Glassfish V3.x, but although not certified for the full Java EE 6 spec, JBoss AS 6 works too.

more than 3 years ago
top

The Misleading World of Atari 2600 Box Art

arjan_t Re:False advertising is legal (267 comments)

In the early 90's, the Neo Geo box art looked amazing too and guess what, the actual graphics were pretty decent as well (even to today's standard).

more than 4 years ago
top

Where I am now, it's ...

arjan_t Re:FIRST (525 comments)

Pretty damn hot here in The Netherlands. 29~30 degrees room temperature. Just watched a blu-ray on my PS3 and it switched to the highest fan gear, the one you can normally only get by doing the 'fan test'.

(my PS3 is standing freely on a table without anything blocking its vents)

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Doing all my programming in C# (276 comments)

Then you just don't handle them!

I hear you, but that wasn't what I meant really. When I don't want to handle exceptions because I simply can't handle them, I don't mean I want to swallow them.

In my personal experience, it seems that in a lot of cases the only sensible course of action is to let the exception bubble up right to some top handler that does 'handle' the exception by simply aborting the operating.

In a request/response Java EE situation, this simply means aborting the request and displaying a general error page. Runtime exceptions let you do exactly this without all the boiler plate code and verbosity, which can introduce its own bugs simply by means of obfuscating the real code in your system to your programmers.

No, you should declare an own exception, and wrap the exception of the dependencies in that new exception.

Indeed, this is a reasonable approach, but one that does lead to very deep levels of chained exceptions. Now if the exception is really exceptional this might not be the end of the world, but constantly applying the wrap-retrow pattern can still add a lot of mental overhead to your code. Sometimes this is justified, but in a lot of cases all you want is the exception to be handled by the top level exception handler. You're then creating lots of specific exceptions, lots of specific try/catch code, but it's never really used since it's only the first exception in the chain that counts and nothing is ever done with the intermediate ones.

I do agree that checked exceptions are a great way to force people to document what exceptions a method is expected to throw, which is indeed a benefit.

Anyway, I didn't really start the move away from checked exceptions, just observing that this seems to be happening ;)

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Java isn't really built for the future is it? (276 comments)

... To really make this work elegantly, closures are needed, which were on and off the radar for the Java SE 7 release. Because of that, parallel array has somehow stalled. Now that closures are back, so might parallel array be, but I haven't heard anything about it for a while to be honest...

Elegance? Closures? Now you have me scared. Really scared.

Don't be afraid for the unknown my brother. For these kinds of libraries closures actually are very elegant. Apple added a similar thing to C for their GCD library.

And about generics, they are definitely not a useless and dangerous disaster. Yes, you can go overboard with them, but when used in moderation (i.e. 'typing containers'), they work perfectly fine. Much better than having to downcast Object all the time to some type I think might be inserted into the collection.

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Doing all my programming in C# (276 comments)

No, it is actually worse to have only RuntimeExceptions and handle none..

Checked vs unchecked is and endless debate in Java, but to add my 2 cents:

If you only have RunTimeExceptions, then at run time the error actually will surface if you don't explicitly handle them. This means your unit tests and integration tests (you do have those, don't you?) will most likely catch them.

Checked exceptions are only useful if you can handle them, but 99 out of 100 times you can't. If there's a SQLException being thrown, seriously, what can your code do about it? In practice what we see is that either exceptions get wrapped and wrapped and wrapped... up till 10 levels or more deep. 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.

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Doing all my programming in C# (276 comments)

Java checked exceptions do absolutely nothing to help when you're working with dynamically-loaded code, for instance.

That's only partially true. If the language would only have checked exceptions and you would be coding against interfaces (often still the case with dynamically-loaded code), then checked exceptions would still work, whether the code implementing said interfaces was dynamically loaded or not.

Now the problem here is that there are also unchecked exceptions which the code might throw, but this is really unrelated to the dynamic loading. One thing that could break things though, is if you not only dynamically load the code, but also execute said code via reflection. Then indeed checked exceptions might not do anything...

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:What could possibly go wrong ... (276 comments)

People need to remember that if something is really open, then it also means it is open to someone doing their own thing with it.

Right, and so many companies actually did with Java. Only with one 'minor' difference: they didn't call it "Java SE".

The problem with MS was not that it was extending Java, but that it was luring programmers into thinking they were coding for the Java SE standard. If you were at a MS platform and only checked your code with Visual Studio, then you as a programmer wouldn't know. Until your users tried to run your Java app on their Linux or Solaris boxes, and found out it didn't work at all.

A very simple solution for MS would have been to provide flags in their environment for "standard compliance Java development" and "non-standard compliance Java development". If my memory serves me well, they had such flags for C++ in their compiler.

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:The next Cobol? (276 comments)

Java, while widely used is on the down slide. There really hasn't been any new revolutionary additions to the language in about 7 years. In another 10 years, it will become like COBOL is to IBM.

The only thing that has remained the same in about 7 years are the posts about "Java is dead", meanwhile Java is still the most widely used language and in those 7 years additions have been made to the language (generics, annotations, type safe enums, etc) and soon we'll have some extra goodies like closures and automatic resource management. Maybe those are not revolutionary, but enough IMHO to keep the language with the times.

Meanwhile, there is a lot of innovation going on in the platform, especially with Java EE and how it uses annotations for things other languages might use keywords for (e.g. annotations to make methods transactional).

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Java isn't really built for the future is it? (276 comments)

Is Java doomed to get stuck behind in the single processor world

Far from it actually... of course Java has had the absolute low level concurrency primitives from the very beginning (Threads, synchronized blocks, wait/notify). More than half a decade ago, the java.concurrent library was added to the platform, which added tons of goodies for concurrent/parallel programming like concurrent maps, blocking queues, thread pools and executor services, cyclic barriers, programmatic locks with timeouts (which actually performed better than the build-in locks based on the synchronized keyword) etc.

Now Java 7 will be extended with the join/fork framework, which is essentially a thread pool and support code for (recursively) computational intensive operations and supports advanced features like work stealing. The join/fork framework has been specifically designed to scale into the many, many multi-core range. Not just quad, hex or oct cores but well beyond that.

Parallel array is another topic on the agenda, which allows you to express in an almost declarative style operations on arrays, which the library will then execute for you in parallel. To really make this work elegantly, closures are needed, which were on and off the radar for the Java SE 7 release. Because of that, parallel array has somehow stalled. Now that closures are back, so might parallel array be, but I haven't heard anything about it for a while to be honest.

This blog post has a nice summary about some of the added concurrency items in Java 7: http://www.baptiste-wicht.com/2010/04/java-7-more-concurrency/

more than 4 years ago
top

Java's Backup Plan If Oracle Fumbles

arjan_t Re:Doing all my programming in C# (276 comments)

>Does Java still have checked exceptions in common use?

No, I'm sorry for you. The standard platform is moving away from them and is resorting to run time exceptions being mentioned in Java doc. E.g. an excerpt from the platform standard class EntityManager:

public interface EntityManager {
    /**
     * Make an entity instance managed and persistent.
     *
     * @param entity
     * @throws EntityExistsException        if the entity already exists.
     *                                      (The EntityExistsException may be thrown when the persist
     *                                      operation is invoked, or the EntityExistsException or
     *                                      another PersistenceException may be thrown at commit
     *                                      time.)
     * @throws IllegalStateException if this EntityManager has been closed.
     * @throws IllegalArgumentException     if not an entity
     * @throws TransactionRequiredException if invoked on a
     *                                      container-managed entity manager of type
     *                                      PersistenceContextType.TRANSACTION and there is
     *                                      no transaction.
     */
    public void persist(Object entity);

more than 4 years ago
top

In UK, Computer Science Graduates the Least Employable

arjan_t Re:IT is for 3rd worlders (349 comments)

India and China are cranking out about 600,000 engineers a years, and each of those countries has 4X the US population. And wages in those countries are tiny fraction of wages in the US or UK.

Newsweek has an interesting series of articles on that this week. Turns out there actually is a limit to the Chinese success story. I've read the article "Smart, Young, and Broke" with much interest, which is about a Chinese software developer who's in the same boat as the UK graduates. Graduated with excellent results, yet unable to find a decent job.

Another factor is that the outsourcing of IT jobs assume these IT workers don't want to consume any of the IT goods themselves. I'm not sure this is going to be true indefinitely. If you're working in IT, and you produce for €1 that product people in 'the west' are selling for €100, what do you do when you want that product yourself?

You can't possible buy it for the price it's been sold for, since that's about a 100x more than you get payed. But wait... you know it's actually manufactured for €1, so why not convince people to sell it locally for say €2? Then you can buy it, and those people in the West can also still buy it for €100 and everybody is happy, right?

But then some clever kid will realize that especially software can travel just as easy the other way around, so if you can buy it locally for €2 and those crazy Western people are willing to pay €100, why not sell it to them for say €20? This clever kid will instantly make €18, which would be a lot of money for them, and the Western buyer would still feel he has gotten the product dirt cheap! Win-Win, right?

Eventually this will not work of course. Producing low and selling high will only work as long as the kids producing stuff don't also want to consume, don't want to improve their standards of living. In manufacturing this is maybe possible to uphold, but in IT we're talking about highly educated persons, who have the Internet at their fingertips. They also DO want that iPhone and they DO want this 40" hi-def LCD and they are tired of those crappy low-quality VCDs and prefer those shiny new Blu-rays.

Simultaneously, you have opposite forces working in the West. If you want to sell something for €100, then people you want to buy that product also have to make a €100 at the least. With manufacturing this worked, since the lowly payed jobs were outsourced and the local population was trained for higher payed/highly educated jobs. With IT outsourcing this seems to be the other way around; the highly educated jobs are outsourced and the local population is supposed to take on lower payed jobs?

So the Eastern guy producing the stuff we outsource is going to demand more, thereby increasing the average salary there, while the Western guy is going to have to demand less, thereby decreasing the average income there. Soon, "produce for €1 sell for €100" may not work anymore, since Honghui is going to demand €25 for his work and John will have no more than €30 to spare.

more than 4 years ago
top

In UK, Computer Science Graduates the Least Employable

arjan_t Re:Not surprised (349 comments)

I don't quite agree with your ranting against CS. For starters, I don't really see you mentioning the fact that CS typically has different tracks.

At my university we had two main tracks, applied computer science and theoretical computer science, with the first being further sub-dived in "computer systems" and "software engineering" and the theoretical track being sub-dived in "algorithmic" and "foundational computer science".

In the bachelor part of the education (3 years), you get a mix of subjects from all tracks. The computer systems track will give you courses like computer architecture ,which allows you to read this particular nice book: http://www.amazon.com/Computer-Architecture-Quantitative-Approach-4th/dp/0123704901 and where you write your own CPU emulator. It will also give you the subject operating systems, which gives you time to read this book http://www.amazon.co.uk/Operating-System-Concepts-Abraham-Silberschatz/dp/0470233990/ref=sr_1_1?ie=UTF8&s=books&qid=1278151357&sr=8-1 or this one http://www.amazon.co.uk/Modern-Operating-Systems-International-Version/dp/0138134596/ref=sr_1_3?ie=UTF8&s=books&qid=1278151357&sr=8-3 and typically gives you assignments where you write some kernel module like an IO scheduler or memory manager.

The software engineering track will give you subjects about requirements engineering, software engineering (obviously) and teach you diverse stuff like UML diagrams, development cycles, design patterns, etc.

The algorithms track on its turn invited me to look at a diverse range of algorithms (obviously again), but also to datastructures (how does something like a hashmap works internally, what kinds of trees do we have, what variations on linked lists are there, etc).

The foundational track then let me look at stuff like turing machines, grammars, finite state machines, theory of computation etc. This is the stuff few 'programmers' would study by themselves if not told they should.

Finally, knowledge of several tracks was combined for the subject compiler construction, where you had to write in C a Pascal to MIPS compiler. For this course you needed to have (C) programming skills, enough skills to understand a language you might not know yet (Pascal), understand how a machine works at the low level (registers, assembly, etc) and have some idea about context free grammars.

Now all of this is in the bachelor, meaning all the subjects are basically introductions to their respective fields. You're not a scientist yet if you have completed them. In the Master phase, you choose a specific track to specialize in but you can still take subjects from the other tracks if you want. In my case I choose the computer systems track and learned some additional stuff about grids, parallel computing, software architecture, etc. Now the thing is, you can't really say that CS educates you to become a scientist or not or that CS skills have no practical value if you don't take into consideration the track chosen by the student. Obviously an applied computer science track has more practical value for the average company than the theoretical track, but it depends on what you want to do really.

Most of all I don't agree with your point that CS somehow tried to cram knowledge in the heads of dumb students. Far from it... the way I experienced CS was a period of my life where I was simply allotted time and opportunity to directly dedicate on bettering myself. Classes weren't there to teach me stuff, but to *support* me in learning. Basically what the CS program does is compiling a list of books for you to choose from and a set of assignments to challenge you, and the rest really is up to you. If you don't give it your best, you don't progress much if at all. People who don't realize this will drop out or will be sent away. That last thing is maybe a little controversial, but it does uphold a certain level of quality.

Next to that, CS gives you a base level of knowledge, but at least at my University we were also clearly invited to study and practice other materials outside of the curriculum. If your goal is to become the ultimate über programmer (which is indeed not very scientific), participate in open source projects, take summer jobs that let you do some practical programming. Likewise, there are similar opportunities for those wishing to pursue a scientific career, like participating as assistants in ongoing research.

Currently I'm the lead developer of a team of 9. We're building sophisticated enterprise software where we're dealing with some 500k LOC, a rich portal where customers can subscribe, log-in, see their data, etc and a highly clustered back-end capable of doing thousands of transactions per second. This product makes me responsible for the software architecture, the right design patterns being used at the right places, performance at very low levels of the system, setting up the development process for our team, working with complex and sometimes conflicting requirements, etc etc.

A lot of stuff that I studied during university applies to my job... daily!

No, I don't write my own HashMap implementation each day, but when one day some particular HashMap was misbehaving I found the problems in *minutes* since I understand how these things work. The guy originally tasked with solving this particular issue was staring at the problem for the whole day already and could only slam his fist repeatedly on the table crying: "It's broken I tell ya, it's broken!", but he simply didn't understand the (utterly simply) theory behind it.

I also don't construct new foundational CS concepts, but I do apply the stuff I learn practically. A while back some other guy was wrestling with a huge number of if/else statements and many variables involved. After studying his code for a while, I proposed him to use a finite state machine, since it seemed to apply perfectly and would reduce the clutter and complexity of his code immensely. However, he didn't knew what a FSM was. He quickly learned thereafter and did apply it, but because he had never learned about such things in advance he would not have thought of it himself. Googling would also not really helped him here, since he had no idea of what to Google for.

These are just two simple examples, but there have been many, many more of such occasions.

To sum up, CS is absolutely very much worth the effort. Just don't think you can come in dumb, just sit in class every day, come out smart and don't have to learn a thing anymore for the rest of your live. That's not how things work of course. But if you come in reasonably prepared, work hard, and consider the education as a foundation to continue learning, you'll reap the rewards for sure.

more than 4 years ago
top

Re-Purposing the Netherlands' Dike System For Power Generation

arjan_t Re:Great idea (132 comments)

The Netherlands are the most environmentally unfriendly country in the world.

Yeah, all that cycling around instead of riding cars is really bad for the environment. And those windmills they historically used to keep the land (polders) dry... oh man, that really must have dealt some blows to the environment...

more than 4 years ago
top

Re-Purposing the Netherlands' Dike System For Power Generation

arjan_t Re:now now now... (132 comments)

Ever seen a Dutch woman? The average ones aren't really small and certainly not girly. The Dutch dykes were build to last :P

more than 4 years ago
top

The Struggle To Keep Java Relevant

arjan_t Re:I've.never.used.groovy.so.I.have.a.question. (667 comments)

Think about what you're asking. From almost every other dynamic languages, you don't get true primitives - you have an object handle that contains the primitive bytes or an object like Integer .

Well, I wasn't really asking anything to be honest. It's true that the default collections in Java can not store primitives directly, and thus by extension their generic versions can't either.

Java and primitives have a rather debatable relationship with each other. Some say Java would be cleaner if there weren't any primitives and only their Object versions. Like bit-shifting operators and native arrays, they were included in the Java language for the class of algorithms where simple and direct memory manipulation offers huge performance gains. But Java is not really used a lot for these kinds of niches (C and C++ shine here) so most of the time they feel a little out of place and they often bleed into business code where they have no place really.

(or worse, a polymorphic object which is very heavy weight and slow for things like ++)

Well, in Java the primitive wrapper types are final (can't be sub classed) and immutable, so that takes care of a whole slew of problems. However, incrementing a primitive wrapper type may seem heavy weight, since it would always require unboxing of the wrapper, evaluating the increment expression and then creating a new instance (and discarding the previous instance). In the end though, all that matters is what instructions are eventually generated for the CPU. Because of the strong run-time optimizations being done by the VM, the actual code that gets generated may in fact not at all do this and may actually be optimized into a simple register allocated value that gets incremented, instead of the entire Object manipulation with all the complicated stuff around that.

At the end of the day, the generics don't change how you code, they just replace your references to Object with a token. Thus if your algorithm requires storage as per-object, you get NOTHING by storing the primitive.

I agree that the current state of generics in Java won't give you any advantage even if it was possible to declare say a List<int> But just to be sure, let's not confuse that with generics in general (for Object types), which actually do make your code more type safe.

more than 4 years ago
top

The Struggle To Keep Java Relevant

arjan_t Re:the cutting edge itself has moved on (667 comments)

Right, the "Java is needed for advanced stuff" argument. Fact: If your web application is "too advanced for PHP" you are doing it wrong and should simplify your design.

For the love of god, wake up man. Not every web application is Joe's Burgers. Not every web application is essentially a web site with some dynamics. Some web applications are simply enterprise applications where the front-end happens to be rendered via HTML accessible via a web browser. They do heavy computations, processing, reporting, run simulations and yes, they DO NEED concurrency, and yes they DO NEED transactions.

If a web application is "too advanced for PHP" then mark my words "it's too advanced for PHP". The model of fetching parameters from the request at the top of the page, feed them into an SQL query, and iterate over the result set while spitting out some HTML is fine for those 4 page web sites, and maybe even the 20 page ones, but it does not fit every possible application out there.

Are you the same kind of person who walks up to a civil engineer designing that bridge over a large river telling him al his or her schooling and techniques are wrong, and the design needs to be simplified, and that it all can be done in an afternoon instead of 3 years, since that 16 year old kid just threw an old shelf over a ditch and he had a bridge?

And I'm not sure how many times I have to explain this, but there is nothing complicated about USING some of this 'advanced' stuff. Yes, it's quite complicated to implement this under the hood, but guess what, the guys who bring us Java EE implementations have already figured out the hard stuff. I can simply use it, and with 'simply' I really mean 'simply.

But okay, Mr Einstein, let me play along a little. Tell me how 'simplifying' my design magically gives me transactional semantics for non trivial operations.

Any web app will be IO bound anyway.

Good one. Take an app, ANY app. Slap a web interface on top of it, and any part of the app that was CPU bound suddenly becomes IO bound. Really?

Dependency injection is a kludge you only need because Java is static and not dynamic.

Dependency injection is about separation of concerns mister, and has very little to nothing to do with typing.

Transactions should be handled by the framework

Which is precisely how it is done in Java, via the very stable and mature Java Transaction API, that one can either use programmatically or declaratively via enterprise bean. Your point again?

the transaction decorators always been misused by overzealous developers creating huge transactions slowing the application down to a crawl.

Maybe you're referring to some home grown 'transaction decorator' as may typically attempted to be made in PHP by programmers who have a basic understanding of stuff, yet overestimate their abilities and think they can just build transparent transactions themselves. I mean, what could possible go wrong, right? If you're referring to the default declarative transaction support in Java EE, then really this is rarely a problem. If you don't know your stuff and simply do too much work in a transactional method, then you're simply doing too much work. That would have been a problem regardless of using a transactional method or not. Like so many other things, it's a professional tool that's utterly simple to use, but you do have to know what you're doing. Just as you should not blindly make each and every method asynchronous or each and every method synchronized etc.

It proves that you are one of those Java only developers too stupid to learn new languages.

I think it actually proves you are someone who jumps a little too fast to a conclusion. For the record, I started programming when I was 6 in C64 BASIC, quickly moved on to assembly, then C on an Amiga and later Apple, C++ on an SGI Indy, some smalltalk in between, took up a job using C++/MFC on Win32, in University I worked on a rules engine using Prolog, did some work in Scheme, took up some other C++ jobs, did a bunch of Java work... a while back I did some iPhone development using Objective-C, hacked together some Trac plug-ins in Python, ... and of course in between there's stuff like javascript, HTML, SQL even some XSLT.

Do yourself a favor and take a week to learn a dynamic language.

Well, you had your opportunity of being downright rude ('too stupid to learn'), let me now take the opportunity to say that this proves you're one of these PHP developers who is apparently too stupid to understand that not everything on this world has to do with the difference between dynamic and static typing or even strong and weak typing. An MVC framework, concurrency, transactions, O/R mapping, etc has nothing to do with this difference. But of course, only a stupid PHP zealot would ever think that.

more than 4 years ago

Submissions

arjan_t hasn't submitted any stories.

Journals

arjan_t has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?