tag:blogger.com,1999:blog-89769905777869615832024-02-19T18:02:46.028+01:00Strongly Typed, Loosely CoupledNick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.comBlogger45125tag:blogger.com,1999:blog-8976990577786961583.post-64190933714579245342011-02-24T17:52:00.002+01:002011-05-24T12:18:55.992+02:00Project Coin Examples with JDK 7 Developer PreviewMark Reinhold announced availability of the first JDK 7 developer preview today. Reason enough for me to give some of the Project Coin features a shot. I won't get into details here, but instead just show some quick examples. Most of them are self-explanatory anyway.
Source code is also available via github.
Strings in switchfinal String str = "foo";
switch (str) {
case "foo":
Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com2tag:blogger.com,1999:blog-8976990577786961583.post-3736705395666256172011-01-28T12:26:00.001+01:002011-01-28T12:27:04.172+01:00Oracle 1-year reviewIt's been about a year now since Oracle aquired Sun. Here is a short review of what happened since then:Oracle pulled the plug on the servers of the PostgreSQL build farm with no warning, see here.
Oracle kills OpenSolaris? OpenSolaris Board Quits En Masse, see here and here.
Prominent Sun employees leave the company, including James Gosling, Tim Bray, Simon Phipps, Tor Norbye, Kohsuke Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com5tag:blogger.com,1999:blog-8976990577786961583.post-2829297829312627552010-11-09T09:46:00.003+01:002010-11-09T09:49:51.968+01:00More Impressions of Python (from a Java developer)Jeff Bail has just written an article on his first impressions of Python. I've been teaching myself Python for the last two weeks as well and I generally share Jeff's impresssions. I just wanted to add some more.
Compared to JavaPython is not that different from Java. Generally it is said that Python is easy to learn. For Java developers it is probably even easier. It's not that different like aNick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com7tag:blogger.com,1999:blog-8976990577786961583.post-89722729475482768532010-07-21T16:45:00.002+02:002010-07-21T16:47:41.894+02:00Lambdas in Java Preview - Part 5: Apache WicketThis is the fifth part in a series of blog posts (read the previous part) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This time I'll have a look at how the addition of lambdas could possibly change the API of the Apache Wicket web framework.
If you are not familiar with Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com3tag:blogger.com,1999:blog-8976990577786961583.post-70940468765491172052010-07-15T09:56:00.003+02:002010-07-21T16:46:25.980+02:00Lambdas in Java Preview - Part 4: Proposal UpdateThis is the fourth part in a series of blog posts (read part 3 and part 5) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part describes shortly the changes of a new proposal, that has been published while writing this series, and how it changes some of the examples in Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com4tag:blogger.com,1999:blog-8976990577786961583.post-71546562165421610052010-07-13T17:10:00.002+02:002010-07-15T11:19:07.333+02:00Lambdas in Java Preview - Part 3: Collections APIThis is the third part in a series of blog posts (read part 1, part 2 and part 4) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. In this part I'll focus on how the addition of lambdas could affect one of the most used standard APIs - the Collections API.
Note: While writing Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com3tag:blogger.com,1999:blog-8976990577786961583.post-6678364518502756912010-07-05T12:11:00.005+02:002010-07-05T16:14:33.958+02:00Lambdas in Java Preview - Part 2: Functional JavaThis is the second part in a series of blog posts (read part I) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part focusses on general functional programming techniques, which will be available through the addition of lambdas. Functional programming (although I still Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com8tag:blogger.com,1999:blog-8976990577786961583.post-16463419573629993682010-06-30T13:10:00.003+02:002010-07-05T12:13:21.349+02:00Lambdas in Java Preview - Part 1: The BasicsAs announced at Devoxx last year, closures (or better lambda expressions) will (probably) be added to JDK7. The team of project lambda has checked in initial parts of the implementation into the OpenJDK repositories. This is the first part (see part 2) in a series of blog posts giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com12tag:blogger.com,1999:blog-8976990577786961583.post-33657765868726392142010-06-14T20:33:00.001+02:002010-06-14T20:36:50.769+02:00Eclipse Helios Preview for Java DevelopersThe final release of the new Eclipse 3.6 - Helios is coming close on June 23. Here is a short overview of some of the new features for Java developers.
Open Implementation
Open Implementation, which was available by holding Ctrl and hovering over a method in the editor, is now also available in the navigate menu and can be bound to a keyboard shortcut (e.g. F4?).
Expressions View
When Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com0tag:blogger.com,1999:blog-8976990577786961583.post-89095500517250254702010-06-01T14:19:00.004+02:002010-06-01T14:53:01.656+02:00So you find Java 7 closure syntax nasty?Two days ago Baptiste Wicht blogged about the first version of closures pushed by Oracle. He says "This syntax is a little bit shocking, but I think we’ll get used." and the comments to his post go like "Really ugly" and "terrible syntax". Same over at Java Posse Google Group: "closures are looking worse by the day", "I realllllly don't like the look of them", "Wow that's ugly. Source code Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com10tag:blogger.com,1999:blog-8976990577786961583.post-10222789211555652622010-02-07T11:33:00.019+01:002010-02-08T22:27:07.551+01:00Groovy++ Performance - Now we're talkin'This is a follow-up of my last post, where I compared the runtimes of the quicksort algorithm implemented in Java, Scala, Groovy and Groovy++. Groovy++ came up with a significant improvement over Groovy. But there was a comment by ait (Thanks ait) on how to improve the performance of the Groovy++ implementation even further, by changing a single line. In fact, this improved the performance Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com19tag:blogger.com,1999:blog-8976990577786961583.post-9876286936042008502010-02-06T23:23:00.022+01:002010-02-07T21:35:20.538+01:00Groovy++ vs. Groovy vs. Java vs. Scala - Performance UpdateI've been writing about a performance comparison between Java, Scala and Groovy in this and this post, where I compared the runtimes of these languages for a straight-forward (and far from idiomatic) implementation of the quicksort algorithm. As you might have heard, there's a new kid on the block: Groovy++ a.k.a. static Groovy. I was eager to see, how this would improve Groovy's results. So, (Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com7tag:blogger.com,1999:blog-8976990577786961583.post-31075252493675591912009-12-16T20:48:00.011+01:002009-12-16T21:03:31.256+01:00Lift from a Wicket Developer's PerspectiveI've been messing around with Scala again lately. After learning the basics of the Scala language, I decided to have a look at the lift web framework - "the simply functional web framework". In this highly subjective post I will outline, why I'll stick with Wicket. My Lift ExperienceTo be clear, I'm not an experienced Scala developer. I did my first steps in Scala a year ago or so, and I just Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com18tag:blogger.com,1999:blog-8976990577786961583.post-8446116459132963812009-11-13T09:08:00.018+01:002009-11-17T18:07:30.967+01:00Concurrency is not such a big Deal ...... when it comes to web development.In the current debate about the future of Java (Java the language, of course) and which alternative language would be an appropriate successor of Java (Scala, Clojure, ...), much of the discussion focuses on the question, which language provides the better concurrency model in order to utilize multi-core processors in the future. Actually, I'm not an expert inNick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com0tag:blogger.com,1999:blog-8976990577786961583.post-50788231489730562492009-10-26T23:29:00.019+01:002009-11-17T18:07:35.740+01:00A Scala Console with JavaFX (Experimental)It's been a while ago, when I started implementing a Scala console with JavaFX. And orginally I've never thought about publishing it, because it was (and still is) an experimental, personal project. But today I started playing around with it again, and I decided to push it to github and write a short post on it. So, if you are interested, you are welcome to read the source code, try out the Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com3tag:blogger.com,1999:blog-8976990577786961583.post-55631746994487030522009-10-24T18:02:00.026+02:002010-02-09T13:00:53.898+01:00GroovyBot - Developing a Groovy Google Wave RobotGoogle Wave is a communication and collaboration tool developed by Google, which is currently in preview and available only to a limited number of users. Last week, I was chosen to be one of those users, and as there's also a Java API available to extend the platform, the first thing that came to my mind was to build a Groovy robot.This post gives a short introduction of how to build a Google Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com3tag:blogger.com,1999:blog-8976990577786961583.post-21776250851810364772009-08-18T19:58:00.011+02:002009-08-19T09:54:21.292+02:00Scala Tail RecursionIf you are into Scala, then you eventually may have heard about tail recursion or especially tail call optimization. This post sheds some light on what tail recursion is and on Scala's ability to optimize tail recursive functions.Tail recursive functionsIn Scala it is common to write in a functional style, and recursion is a technique frequently used in functional programming. A recursive Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com5tag:blogger.com,1999:blog-8976990577786961583.post-21887512380058520642009-07-12T14:56:00.010+02:002010-01-30T00:35:23.301+01:00Wicket, Spring, JDO on Google App Engine - Sample ApplicationIn my previous post on Wicket on Google App Engine I described the basics of how to set up a simple Wicket application that runs on GAE. This post takes the next step and describes how to set up a simple CRUD application. The source code of the sample application is available here. OverviewThe sample application is a simple contacts application, where phone numbers can be associated to persons. Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com18tag:blogger.com,1999:blog-8976990577786961583.post-51486546359685809942009-07-02T22:54:00.004+02:002009-07-05T22:58:09.800+02:00Java vs. Scala vs. Groovy - Performance UpdateIt's been quite a while since my post on the micro benchmark comparison between Java, Scala and Groovy. Since the Groovy developers tackled some performance issues with the Groovy 1.6 release, I thought, I'd give it another try. I used Groovy 1.6.3, Scala 2.7.5 and JDK 1.6.0 Update 14. I left the code that I used for the last comparison unchanged. I did not make much use of any specific language Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com42tag:blogger.com,1999:blog-8976990577786961583.post-66027626892012828062009-05-26T23:30:00.011+02:002009-06-29T07:12:02.376+02:00Eclipse Galileo ReleaseThe upcoming Eclipse Galileo Release is currently in RC state. This post highlights some of the new features.Update-ManagerFinally, the update manager works again. With the Ganymede release I really had huge problems to install updates, both on my working machine and my personal machine. Mostly because of some strange error messages. In Galileo the update manager works fine and its design has Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com6tag:blogger.com,1999:blog-8976990577786961583.post-91974361479127660232009-04-27T22:36:00.018+02:002009-04-30T12:45:31.947+02:00Wicket Patterns and Pitfalls #5This is the fifth article in a series of articles about common patterns and pitfalls when using Wicket (http://wicket.apache.org). Most of these patterns apply only when using Wicket in conjunction with Spring and Hibernate and these might be very specific, but others are more general. The last article was about the pitfalls related to Wickets HTTP session usage. This time a pattern for Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com5tag:blogger.com,1999:blog-8976990577786961583.post-3174008399699508692009-04-09T23:47:00.028+02:002009-07-13T17:48:06.049+02:00Wicket on Google App EngineGoogle App Engine now supports Java. Let's get Wicket running on it, quickly.Note: This post covers the basics of setting up Wicket on GAE. This subsequent post takes the next steps of setting up Spring and persistence with JDO and provides the source code of a sample application.1. Use the Eclipse plugin to create a projectThe Eclipse plugin can be installed via Eclipse Update Manager and it Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com25tag:blogger.com,1999:blog-8976990577786961583.post-88875203085409739072009-04-07T22:00:00.005+02:002009-04-10T02:43:01.552+02:00Wicket Patterns and Pitfalls #4This is the fourth article in a series of articles about common patterns and pitfalls when using Wicket (http://wicket.apache.org). Most of these patterns apply only when using Wicket in conjunction with Spring and Hibernate and these might be very specific, but others are more general. The last article was about the OSIV-LDM-Pattern and its pitfalls. This time it's about HTTP session Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com7tag:blogger.com,1999:blog-8976990577786961583.post-73163709401070949272009-03-25T08:37:00.015+01:002009-03-26T16:29:28.050+01:00Wicket Patterns and Pitfalls #3This is the third article in a series of articles about common patterns and pitfalls when using Wicket (http://wicket.apache.org). Most of these patterns apply only when using Wicket in conjunction with Spring and Hibernate and these might be very specific, but others are more general. See also Wicket Pitfalls and Patterns #2.OpenSessionInView-LoadableDetachableModel-Pattern and its Nick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com5tag:blogger.com,1999:blog-8976990577786961583.post-26900786447055891492009-03-17T07:50:00.020+01:002009-03-17T11:54:14.683+01:00Wicket Patterns and Pitfalls #2This is the second episode in a series of articles (see here for the first article) about common patterns and pitfalls when using Wicket (http://wicket.apache.org). Most of these patterns apply only when using Wicket in conjunction with Spring and Hibernate and these might be very specific, but others are more general. This article illustrates how Wicket's SpringBean-Annotation can lead to subtleNick Wiedenbrückhttp://www.blogger.com/profile/08284848227891035967noreply@blogger.com4