Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java

Submission + - UIDL: User Interface Description Language (uidl.net)

Dominic Cioccarelli writes: "UIDL aims to create a scriptable, JavaScript based language for expressing complex user interfaces. The main features of a UIDL page are the ability to create complex user interfaces (using Swing based widgets) and to communicate asynchronously with server based objects (using the JSON-RPC protocol). While this may sound similar to AJAX, the implementation is much cleaner thanks to the ability to natively instantiate complex UI components within the browser and the ability to transparently present server based objects via their JavaScript proxies."
Programming

Submission + - Community Codesigning Certificate for J2ME (darkskiez.co.uk)

darkskiez writes: "Nokia have "fixed" a bug which allowed you to install your own root certificates on your own mobile phones, this is no longer possible on Series60 v3 phones. This means that as a hobby developer you cannot make a mobile java application that runs as trusted with full api permissions, without purchasing a $300 to $500 certificate per year. This looks like it is being relaxed a little in the upcoming 3rd generation Mobile Information Device Profile.

In an attempt to reclaim a little more access to their own hardware, there has been limited success at patching some phone firmwares, and I have started a project to facilitate the purchasing of a shared codesigning certificates for the community."

Programming

Submission + - Server-side vs client-side RIA programming?

jole writes: "Currently Flex is the king of declarative RIA frameworks, GWT is the best client-side Ajax framework for Java-programmers and JSF is the most dominant declarative server-side framework. In addition to these classes of frameworks, we find that server-side Java-based (not XML-based) UI frameworks still have their place for two reasons: 1) security gained from not exposing UI logic to client, 2) easiness gained for direct access to all Java API:s, full unrestricted execution environment and lack of communication layer design.

What is your opinion — which approach (client- or server-side; Java, XML or JavaScript) is the best and why? What is your favorite RIA toolkit for Java programmers?"
Java

Submission + - Raven: An Elegant Build for Java (onjava.com)

kevin_conaway writes: Matthieu Riou wrote an interesting article on Raven, a build system for Java powered by Ruby. His premise is that Raven allows you access to the full power of a scripting language including things like conditions, loops, exceptions and complex data structures and that this is an improvement over linear, "toy" build systems like Ant and Maven.
Programming

Submission + - Refactoring: Improving the Design of Existing Code

kabz writes: "Refactoring: Improving the Design of Existing Code
Martin Fowler with Kent Beck, John Brant, William Opdyke and Don Roberts.
In the Addison-Wesley Object Technology Series.

Refactoring (as I'll refer to the book from here on in) is a heavy and beautifully produced 418 page hardback book. Martin Fowler is a UK-based independent consultant who has worked on many large systems and is the author of several other books including UML-Distilled.

Refactoring is a self-help book in the tradition of Code Complete by Steve McConnell. It defines its audience clearly as working programmers and provides a set of problems, a practical and easily followed set of remedies and a rationale for applying those techniques.

Code refactoring is the process of restructuringing code in a controlled way to improve the structure and clarity of code, whilst maintaining the meaning of the code being restructured. Many maintenance problems stem from poorly written code that has become overly complex, where objects are overly familiar with each other, and where solutions implemented expeditiously contribute to the software being hard to understand and hard to add features to.

Typically refactorings are applied over a testable or local scope, with existing behavior being preserved. Refactoring as defined in this book is not about fixing bad designs, but instead should be applied at lower levels.

Testing a la Extreme Programming is emphasized as a control for ensuring that program meaning is not changed by refactoring. It is not over emphasized, and this is not a book about testing, but it is often mentioned and stays in the background through the book.

The refactorings presented in the book are not intended as a comprehensive solution for all problems, but they do offer a means to regain control of software that has been implemented poorly, or where maintenance has been shown to simply replace old bugs with newer ones.

The book is divided into two main sections, introductory material that introduces and discusses refactorings, and a lengthy taxonomy of refactorings that includes both examples and further discussion. The introductory material consists of a long worked example through simple Java code that implements printing a statement for a video store. Despite the simplicity of the code, Fowler shows in clear detail where improvements can be made, and how those improvements make the code both impressively easy to understand, and easy to maintain and add features.

Several key refactorings are demonstrated in the opening chapter including Extract Method, Move Method and Replace Conditional with Polymorphism. This is a book about programming in the object oriented paradigm, so as you might expect, the first two refactorings refer to extracting and moving object methods either into new methods, or between objects. The third example provides a means to replace special cased behavior in a single object type by deriving a sub type of the object and moving type specific code to the sub types. This is a fundamental technique in object oriented programming, and is discussed here in practical terms.

Now that several actual refactorings have been introduced, Fowler provides a solid and well thought-out discussion of the why's, when's and when not's of refactoring. For example, code can decay as features are added, and programmers special-case, or bodge additional functionality into existing objects. Fowler argues that the bitrot and decay makes software more unreliable, leads to bugs and can accelarate as the problem gets worse. Faced with these problems, refactoring should be used to improve local design and clean up and improve code, leading to better software, that is easier to maintain, easier to debug, and easier to improve with new features as requirements change.

However, there is a caveat, in that since software functionality should remain unchanged during refactoring, the process of refactoring consumes resources, but provides no easily measureable value. Fowler confronts this issue in a section that discusses how to communicate with managers, that you are performing refactoring work. He denies being subversive, but his conclusion is that refactoring should essentially be folded in with normal work as it improves the overall result.

This is a bit like goofing off on the basis that you'll think better after 20 minutes of fooseball. I'd definitely subscribe to that theory, but many others may not.

Kent Beck guests in Chapter Three for a review of the issues in typical software that suggest a refactoring may be needed. This chapter is entitled Bad Smells in Code, and most of the smells presented will be familiar to any reasonably experienced programmer, and they will be a great learning experience for less experienced programmers. I got the same feeling reading this chapter as I did when I first read Code Complete. Here was someone writing down names and describing problems that I had a vague unease about, but was too inexperienced to really articulate or do something about. Typically the refactorings address the same kind of issues that a code review with a skilled experienced programmer would address. Long parameter lists, too long methods, objects delving about in each others private variables, case statements, related code spread across different objects etc. None of these problems are debiliting in themselves, but added up, they lead to software that can be prone to error and difficult to maintain.

Most of the remaining substance of the book, 209 pages, is given over to a taxonomy of refactorings. These 72 refactorings are covered in detail with comprehensive simple examples presented in Java. Each refactorings is given a clear name, a number and a line or two of descriptive text. The motivation for the refactoring is then discussed, often including caveats and cautions. The mechanics of implementing the refactoring are then listed, with 1 or more (and often more) examples of implementing the refactoring. Refactorings range from the very simple to more complex examples such as Convert Procedural Design to Objects.

Due to the difficulties of reproducing large and complex sections of code, Fowler sticks with relatively simple examples. These seem to grate on him more than the reader, and he can come across as somewhat embarrassed when we look at the employee, programmer, manager pay example for the tenth time. I certainly didn't have a problem with it though.

Conclusion

This is a very well written and fun to read book. I personally feel that much of the material is implied by from Code Complete, but Fowler does a fantastic job of expanding and formalizing the idea of applying explicit refactorings. Much like Code Complete gave a motivation for keeping code well commented and laid out, this book presents the case for care and feeding of how to structure software. To fight bitrot and technical debt, poorly structured and unclear code should be targetted and refactored to improve structure and clarity. This gives a very real payback in terms of less required maintenance, and ease in adding features later on down the line.

Despite the fact that all the examples are in Java, the ideas are easily transferable to C++ or any procedural object oriented language.

Highly recommended."
Java

Submission + - Is it possible to make a game with only 4KB? (java4k.com)

ArniArent writes: "A game programming competition, at Java4K.com (http://www.java4k.com), has just started. This is the fifth time it's running and might be one of the largest game programming competition in the Java community, with over 50 games submitted each year! Everyone are allowed to submit their game, as long as it follows the simple rules; the game must be written in Java and final package 4KB max! You might ask, what can you do with only 4KB? Are these text based games? Amazingly they have managed to create very nice looking 2D and also 3D games that are fun to play. This might be a good start for anyone interested in learning game programming, and is also a good time consumer for anyone who got nothing better to do over the holidays! :) Check out http://www.java4k.com for more information."
The Internet

Submission + - Gamespot editor fired over review of Eidos game 2

PocketPick writes: Kotaku is reporting that following a unflatering review of the game Kane & Lynch: Dead Men, long-time editor Jeff Gerstmann is no longer under the employment of video gaming website Gamespot and it's parent, CNET. Kane & Lynch, a game published by Eidos for the Xbox 360, PS3 & PC, has been heavily featured in flash, image and text advertisments on Gamespot's website since the release on November 13th, inevitably leading to questions whether or not Mr. Gerstmann's firing was motivated by pressure from Eidos.
Biotech

Submission + - Gene Study Supports Single Bering Strait Migration (eurekalert.org)

Invisible Pink Unicorn writes: "One of the most comprehensive analyses of genetic variation ever undertaken supports the theory that the ancestors of modern native peoples throughout the Americas came from a single source in East Asia across a northwest land bridge some 12,000 years ago. One particular discovery is of a 'unique genetic variant widespread in natives across both continents — suggesting that the first humans in the Americas came in a single migration or multiple waves from a single source, not in waves of migrations from different sources. The variant, which is not part of a gene and has no biological function, has not been found in genetic studies of people anywhere else except eastern Siberia. The researchers say the variant likely occurred shortly prior to migration to the Americas, or immediately afterwards.' The full article is available online from PLoS."
OS X

Submission + - Java 6 available on OSX thanks to port of OpenJDK (bikemonkey.org)

LarsWestergren writes: Many Mac users have been upset that Apple has not made Java 6 available on the platform. Landon Fuller posts that there is a developer preview release available of Java JDK6 on Mac OSX, Tiger and Leopard. It is based on the BSD port of Sun's Java 6 and is made available under the Java Research License. Charles Nutter posts about impressive JRuby performance gains using Java 6 on his Mac.
Education

Submission + - Transition from Academia to Industry 2

Pseudonymous writes: I am an assistant professor in a computer science department wanting to go into industry (not out of choice but necessity). Over the past pretenure years, I have worked on pretty theoretical problems, involving algorithms and complexity so I think I am unprepared or unskilled to join the software industry. I have of course taught the basic courses in C and Java (which unfortunately does not mean that I know enough to jump into a huge software project). So how do I go from a theoretician to someone that industry might value ? What skills should I aim to develop before I put myself out there ?
Java

Submission + - Announcing jMonkeyEngine version 1.0!

Moondevil writes: After more than four years of hard work and many point releases, the developers behind the jMonkeyEngine are proud to announce the release of version 1.0 of their Java game engine. The jMonkeyEngine is a high performance game library providing all the tools needed to build quality 3D games and applications in Java. Used by professional game companies such as NCsoft, Three Rings, Jadestone and others as well as government and hobbyist developers, the jMonkeyEngine has raised the bar for quality Java-based 3D entertainment.

Learn more about the jMonkeyEngine and get involved today at its website.

I am transcribing the announcement made at their website.
Java

Submission + - Java 6 and Leopard 3

nyri writes: "As a professional Java coder and consultant, I switched to OS X two years ago. I felt that my Java stuff works on it. After release on Java 6, I have felt otherwise: there is no OS X release. I assumed that Leopard would have Java 6 but I haven't seen a trace of it. I am seriously considering moving back to Windows (Linux, alas, is not an option for me in my corporate enviroment).
Has Apple, for some reason, decided that Java support does not pay off? Is this just a delay or has Apple decided to abandon Java support for good? Maybe you fellow slashdotters can give some answers to these questions.
All in all, other Java coders out there, how long are willing to put up with this kind of blatant ignorance of your needs? Or, do you have some nice technical solutions to this, which I am not-so-blissfully ignorant about?"
Java

Submission + - Is Java ready for Safety Critical Applications? (javolution.org) 4

dautelle writes: "Last week, I was invited at the Space 2007 conference to introduce Javolution (open source Java library) to rocket scientists. Here is the paper presented. This might seem like good news for the Java platform. But is Java ready for use in safety critical applications? Or in other words would you trust your life to a Java program?"

Slashdot Top Deals

To do nothing is to be nothing.

Working...