Saturday, December 27, 2008

Teaching the internet generation to code

My 12 year old nephew is a heavy user of Vista, abuser of MSN, scoundrel on teh internetzor, and is fair on english. I will not discuss how much further I was at that stage, but I believe that the creation of nifty GUI OS' and xtrem good looking games has minimized the incentive of writing code to do stuff. So how do we teach coding to the internetzor generation and make it interesting for those with a short attention span?

Wednesday, December 24, 2008

GStreamer - multimedia fun on a plugin architecture

I've poked around GStreamer and the bindings for Java. GStreamer is a framework for "constructing graphs of media-handling components". For example a video player from "scratch".

Sunday, December 21, 2008

Do we need WSDL?

WaddleJoe Gregorio wrote a blogpost that asks if we need WADL, for describing REST services, and effectively WSDL. He argues that we do not need something as expressive as XSD every time we write a WSDL contract, and that we should avoid doing the same error with REST and WADL.

GStreamer, can do streamed music?

I'm going to take a dive into GStreamer, to find out if it is possible to use as a mixer for my music application needs. I'm going to input music from different sources, do some adjusting of volume, effects and write to file or stream to the net.
Can someone give me some pointers to GStreamer, and possibly on Java?

Features

Saturday, December 20, 2008

PS3 doing Java - Sexy, and almost there

The promise of what I have been investigating is that Java applications can be run directly inside the normal PS3 GUI, as well as other Blu-Ray players, without requiring any kind of hacks on behalf of the end user. It may not be the ultimate base for writing applications, but it should not be too hard to port applications, games and so on from other J2ME applications that exist for mobile phones and so on. Shoutcast player or Opera Mini on PS3 anyone? :)

This is a summary of developing Java applications on PS3 and Blu-Ray, in hope that someone else will pick up the loose ends.

Tuesday, December 9, 2008

Setting up a BD-J development environment sucks!

I've recently looked at how one can set up a Blu-ray development environment for developing Java apps on a PS3.
The HDCookBook project seems like a good starting place, since you need alot of files to surround your BD-J Java apps when on the disk. Fine enough, but expect some hassle of changing file names if you want to put them on a memorystick.
Next step, run ant for compiling the project... You need to download "BDJ.jar". You can find it AFTER INSTALLING NERO ON WINDOWS. Aaargh. Three hours later, we've found our bdj.jar.
Java ME SDK? It requires you to register at Sun... Ok, done that. Next step, Install sun_java_me_sdk-3_0-ea-win.exe on Windows. I HAVE A MAC!!! AHRG! Who needs multi-platform portable javacode when you can distribute it as .exe files!?

Do they even want people to develop on their platform? This is not inviting! And stop the stupid Ant stuff. Maven is the only way of distributing sourcecode and knowledge that works.

Java on PS3

Today, I saw a Java Powered logo on the side of my PS3 box. Hmm... What does that mean?

If you install linux on the PS3, it can ofcourse run Java. But my sources indicate that it has little resources, and the requirements for installing are a little tough for the regular gamer.

The JVM installed on PS3 is placed there to meet the BluRay standard to show menus and stuff, called BD-J. From what I can gather after a quick Google, its an interpreted JVM, which is far slower than a regular Sun JVM. The PS3 is claimed to be one of the fastest, but probably not optimized in any way to cater for the multitude of Cell processors. And the BD-J does not help running Java applications in the web browser.

So, why would we want a native JVM on the PS3 specialized for Cell? Because it's damn cool :) Perhaps for running web servers. But a JVM capable of running Applets in the PS3 Web Browser could mean that Sony could capitalize on the enourmous amounts of Java games located on the web available freely to PS3 owners. Ofcourse, the native games will still have better funding and perform better, but allowing free applications could create the same community of developers and games as Apple has benefited from. Without the drawback of locking in developers to a single platform.

Update


Apparently, running games off a USB memory stick works. Will be back with more on the subject

Sunday, December 7, 2008

Groovy does Neo4J thanks to Maven Simplicity

Guillaume Laforge, Groovy Project Manager, kicked off a debate on the Neo4J mailing list with his post Groovy and Neo4J. He stated some examples of how Neo4J could be more Groovy. However, since most Neo4J developers aren't familiar with Groovy, the topic wasen't tested out further.

Therefore, with of my L337 skillz in Groovy, Neo4J and Maven, I saw it my destiny to create a simple Neo4J test in a Groovy environment to validate Guillaume's propositions. Along the way, I had to add some GMaven magic, embedded Neo4J, Mercurial version control and Maven Archetype for distribution. No wonder why I didn't get this out the door yesterday! ;)

Thursday, December 4, 2008

Bleeding Edge Technology

bloody-knife

Proverb of the day: Bleeding Edge Technology - It aint fun if it doesn't hurt

Sunday, November 30, 2008

On demand development IDE plugin as a resource to the source code

A cumbersome task which everyone who wants to join a software development project, opensourcy or enterpricy, is setting up the development appropriately. This is becoming more apparent due to the new programming and scripting languages and frameworks like Rails which pop up every now and then. We are getting somewhere (Maven 2)when it comes to making sure the source code compiles and runs out of the box. But the development environments still need to be downloaded, installed, and configured (allthough Maven can help here) and license keys entered.

However, there is hope!

Tuesday, November 18, 2008

Grails impresses yet again with its plugins - Todays tidbit: SoundManager

Grails and its plugins doesn't cease to impress me. I tested out the Grails SoundManager plugin today, which is a thin gsp wrapper around a javascript library for playing mp3's in a webpage. The documentation is short, has all you need to know, and Grails fixes the rest. Just what I need for creating my web-playable music "shop".

Update - SoundManager will also play videos and streamed content :D

Friday, November 14, 2008

Does insta-backup Dropbox impress the blasé crowd?

DropBox small logoI tried out dropBox today. Nice intro vid, simple app for mac which says that "Everything inside this folder is kept up to date with what's on the web. If you do any changes, they are instamatically updated elsewhere" Not only that, but if you have another machine online that uses the same account and has the same file, they are automatically updated. Did I mention versioning?
One use is the shared-excel-spredsheet which holds all the current tasks and work in progress.

cloudbox

Wow, nice


now I can both do backup and collaboration with other people via the web. Next thought is; I've already thought out how I could do the same stuff with Subversion. Only thing is that neither me or anyone else had the time to implement it.

Are we blasé?


First people go "oooh, I've never seen anyone do that before", 5 minutes later, they're browse off to slashdot. Jesus would have a hard time finding a crowd these days.

Wednesday, November 12, 2008

Grails 1.1 got Maven support - So What?

You know you've been wasting too much time blogging in the sphere when, renowned developers start stalking YOU :)
Anywho, the comment I recieved informed me that Grails 1.1 Maven support is out, giving Maven developers much needing air-mileage towards a Grails firstclass-citizen-goldcard. Predecessor Octo was, what I reckon, a shell around Ant scripts for doing Grails tasks, distancing Maven from responsibility of doing the nitty-gritty building and wiring.

So why should you care who builds your Grails project?


Because of the nifty reusable plugin functionality you get out of the box from maven. And more importantly with Grails, control of how you wire your app together.

The current state of the new Maven plugin


I can't see no Ant anywhere. It might be because I've been lazy and havent poked around the poms, but until contradicted, I choose to believe that Maven is in charge. One difference is the added folders, src/main/webapp aso. Does it work as it should yet? Of course not, it wouldn't be bleeding edge if it did, but well enough for me to get a good impression and a list of issues to report back on.

Conclusion


If the Maven plugin picks up speed inside GrailsDev, I'm a happy camper! Good Work!

Idea for create-archetype-from-existing-project plugin

The project I'm working on is teh best, and I don't have time to create an archetype from it! Why should I need to structure the project in a different way to create the archetype? If I do that, I cannot continue working on the code. The plugin should be able to rip out all the non-generic stuff, like groupId, projectId, folders, wrap them in templates so they are automatically filled and presto, you have a new archetype.

Idea for simple-jar-lib plugin

Often, when one looks at someone elses project, the artifact dependencies are a mess! The jars litter a lib/ folder, and often have no version or groupId, and it would be beneficial to structure them into a local repository. Another case is when you wish to supply an artifact which is not located in any external repository, but wish to have it close to your project in the VCS, for convenience. And the artifact has no pom. I believe the maven-dependency-plugin has a similar functionality which can be used with legacy maven1 projects, which do not require the advanced folder structure, but still requires a pom present.

Thursday, November 6, 2008

Yahoo Pipes - SOA for the Web?

I recently learned of Yahoo Pipes after poking a little around WeFeelFine.org's technostack, and 50minutes of videocasts later, I'm quite engaged!

the-toobes-of-yahooSo how would I describe the Ytoobes? Online present ESB with simple BPEL engine and editor. What's so special about this, is that they've lowered the learning curve for being a SOA Web configurer, and provide advanced functionality to the up-until-now static pages of non-enterpricy webpages!

When I look into my crystal ball, I see

  • Screenscraping webpages for providing RSS feeds

  • Advanced forms and workflows embedded into "static" databaseless webpages

  • A new contestant for enterpricy integration


HuskerMedia Demo Pipe

Conclusion


A serious competitor for web-datasource extraction with a low entry-level for adoption that can be expensive to miss out on!

Wednesday, November 5, 2008

Java applets churn random stalking app

wefeelfineTED has an interesting video presentation of the random-stalking application WeFeelFine.org, which scours the bloggosphere for unstable emo's.

The important part is Java Applets as the choice of technology! :) At a first glance, they have chosen to discard standard swing components for getting the custom look and feel.  But the use of Applets for a thick client and an opensaucy API makes me all warm and fuzzy inside. I will definitely poke inside the app and the technology stack "When I find time"

"I feel Java Applets"

Thursday, October 30, 2008

Developing an enterpricy solution for less

Enhetstester som kjøres automatisk og jevnlig utover utviklingsperioden
Testene fungerer som dokumentasjon, og viser hva som er lov/ikke lov, best practices og gjør det lettere å komme igang med noen annens kode
Et mål kan være å få koden enklere for at den skal bli mer oversiktlig, og lettere å begynne å jobbe mot.

Dele opp operasjonene i komponenter som gjør minst mulig. De har en startposisjon hvor de henter noe fra disk og legger resultatet tilbake når prosessen er ferdig.
Dette sikrer at kompleksiteten holdes lav, og at man kan skalere de komponentene som bruker mest ressurser.
Lett å holde track på hvor langt en gjennomkjøring har kommet.
Unngår å ha en lang kjede med dyre operasjoner som kan feile halvveis

Hold deg til enkle standarder som finnes på markedet.
RSS, XML, JSON, REST, "Ruby on Rails", komprimert XML
Pass på grensesnittene (Interface), særlig ut mot kunden. Disse må endres så sjelden som mulig.
Skill grensesnittene fra implementasjon

Ny funksjonalitet som "Endring av kundedata" kan godt implementeres med "Ruby on Rails"
Prøv å holde kompleksiteten lav. Trenger virkelig kunden alt det han spør om?
Enkle applikasjoner som ikke har avhengigheter til hverandre.
REST tankegang for å manipulere dataene, helt ut til Webgrensesnittet kan være en stor fordel

Ha Load balancer og throttlers mot integrasjonspunkter og interfacene mot kunden.
Dvs at dere har kontroll på antall forespørsler som kommer inn og som går ut mot kunden.
Det er en fordel å kunne skru av og på traffikken for å hindre at systemet henger seg, og lett kunne switche aktive systemer og endepunkter

SIMPLICITY IS THE KEY

Wednesday, October 29, 2008

The state of Applets - Java SE 6 Update 10



I've had my hopes up high since Sun promised to leverage Java Applets. Java SE 6 update 10, "Consumer Edition" was recently released. I dusted off the would-be-could-be shelf and took Applets for a spin ten years later to see if it delivers.

Competing framework Flash delivers what Java developers should have been able to do 10 years ago. But I've invested too much know-how in Java and Swing. So, what are my expectations?

Monday, October 27, 2008

MicroXP just made Windows sexy for development

There are times you have an application or job task which requires windows, and you need a Windows box with the least amount of hassle and small footprint.

Behold MicroXP; a stripped down version of WindowsXP. Match weight: 100MB distro, <500MB HDD, <50MB RAM, ~10min almost inputless installation and <20 second bootup time!!!



Just to test it out for development in parallels, downloaded Java 6 JDK, Maven and tested out the Smacking up Groovy demo in less than 10 seconds which creates a full Java/Groovy development environment with no hassle. And it worked!

Conclusion: Damn sweet footprint! You can propably get your chores done, and still be smiling. Bill Gates won't love us, but since when has he appreciated Java anyways?

PS. I have been using OS X for over a year, and allthough MicroXP is sweet and sexy, I'm still content with having moved away.

Friday, October 24, 2008

Embedding a Groovy Console in Spring context

In search of the perfect way of adding a console to my Java application, for debugging and test purposes, I stumbled upon the article Embedding a Groovy Console in a Java Server Application by Bruce Fancher. It has a code demo of which runs two flavors of Groovy Consoles from the Spring context of his application. This vantage point gives one access to all the services available to spring, and sits smack in the middle of the most important parts of your application where you can access services and databases. Check out the supplied demo, which still runs nicely with Ant + Tomcat.

Saturday, October 11, 2008

Smacking up a Groovy demo in less than 10 seconds

Write mvn groovy:console , and you will get a console where you can execute Java/Groovy code by typing ctrl+enter/+enter.

If I were to learn a new language, or Java from scratch again in the University, This way of packaging would make a HUGE difference!


What next?


The sweet spot for using Groovy is

  • Familiarity to Java developers. Paste in your favorite Java code, and it will compile

  • Java classes are imported and used as normal

  • Strings, Files and many other standard classes have been extended with often-used functionality

  • Handling stuff on the file system - copying, deleting aso

  • Parsing XML in a nice DSL

  • Simple SQL/JDBC

  • Binding together a Java application


Resources


Tuesday, September 30, 2008

I thought I'd post updates on what I'm interested in, to give a glimpse of what I'm looking into and have moved away from. Perhaps I'll have enough data to create a graph someday :)

Up and coming



  • Neo4J - A graph store - no more ORMappings

  • Qi4J - A composite development framework, a new way of writing Java applications, a way of life

  • Groovy GRAILS - Excellent for prototyping Java stuff

  • Mercurial - When thinking different, why not Version Control as well?

  • Swing Appframework, Java6u10 - Propably the next big thing in Rich Internet Applications

  • Visualization of graphs - Am looking for a nice, easy API for creating several hierarchical trees that I can drag and manipulate

  • Amazon EC2 - Java enabled servers on demand!

  • Twitter, Blog, IRC -New (and revisited) ways of communicating intra-project/company

  • javaBin, JavaZone - Working with the JavaZone conference for a year was damn fun!

Monday, September 29, 2008

Mavenized Neo4J example

The weekend after JavaZone, I was one of the participants on a "GeekCruise", where we looked into emerging technologies such as Qi4J, Neo4J and Enterpricy stuff.
Matrix diagram
In short, Neo4J is a network/graph database that promises to deliver Web 3.0, Semantic Web and RDF greatness. 

Friday, September 26, 2008

Graph visualization of a Java application

Wouldn't it be great to visualize the object graph and relations of Java classes or of a running Java application?
Graph viz

Tuesday, August 12, 2008

Remote debugging applications running from Eclipse with IntelliJ

I'm not an advocate for using Eclipse or any of it's relatives (IBM RAD). But on some projects, I can't avoid having to use it because the project only works on in Eclipse.
As often as I can, I will try to use IntelliJ because of its superior user interface. But when the code can't run from IntelliJ, I've set up a quick tutorial to setting up cross IDE debugging.

Saturday, July 19, 2008

Pre and post condition validation with OVal as intruments of software architecture

I have for the past couple of weeks been fiddling around with OVal - the object validation framework for Java™.
Setting up a project to utilize OVal for the first time wasn't easy, as you can read in my post "Problems with IntelliJ AspectJ plugin".
I've created a simple Mavenized project, which should ease setting up, testing and getting an impression of the potential of OVal.

Saturday, July 12, 2008

Problems with IntelliJ AspectJ plugin - SOLVED

I've looked into Oval Java Validation Framework, which seems quite nifty. The problem with it is that it doesn't work right out of the box if you want the extra bonus features, such as pre and post validation. For that you need AspectJ support, and for that... Well, lets just say your learning curve put on some weight.

This post is regarding solving an issue you may get when trying to use IntelliJ's AspectJ plugin. When running the test I've added here from IntelliJ, You get the message:

Error: ExactAnnotationTypePattern was written by a newer version of AspectJ

Friday, June 27, 2008

Reading up on Groovy and Grails

The good thing about Groovy is its likeness to Java, and reading Groovy code should pose no difficulty to a seasoned Java programmer who's taken a days worth reading. The problem with Groovy is writing good code. Not because you do it wrong, but you can always write it better! As with Ruby, there are alot of nifty features in the language that shortcuts ugly code in Java. But, you have to know that these features exists before you can use them. Grails? It just might become the next dogma in Java application development!

This is the litterature list and resources I've used in my pursuit of becoming a Groovier developer:

Wednesday, June 25, 2008

The joys of Sun Spotting

I've had one joyful day of tinkering with a SUN SPOT developer kit, courtesy of javaBin

  • My first impression is WAY COOL.

Monday, June 23, 2008

Java Sorting Box for dynamically invoking receptors

System color is not a requirement.The system I want to create must invoke the receptor's call(x) with the objects from the pile that correspond the receptors interface.

I have a pile of objects of the classes; PinkTriangle, GreenSylinder and RedSquare, implementing Interfaces Triangle, Square and Circle, and a set of receptors; TriangleHole, SquareHole og SircleHole, who's call(x) functions accept Triangle, Square or Circle interfaces (or children).

Wednesday, June 18, 2008

Vizualizing metadata with Google maps

Google mapsI'm amazed by the imagery you get on google maps with terrain, images and wikipediaarticles.

I see a hammer I want to use, now to find some nails.

Lets say you work for a news publicist who wants to leverage their articles metadata quality to make navigation and search easier for their customers and researchers and writers.

Tagging with metadata requires that the metadata is applied correctly and in a standardized fashion. Vizualizing the metadata can make the categorization easier and be an incentive for revisiting already tagged metadata and improving it.

Sunday, June 15, 2008

Miss detective

AUser story: Find anonymized celebrity

Norwegian media have a nasty habit of "half-telling" stories of people in focus of the police or are on the media shitlist. Finding these people should initially be hard, but by gathering the pieces of information, one can often easily find out who that person is. Often weblogs tell what the media "anonymize" or aren't allowed to, and may draw their own conclusions. Like a miss detective, the application will help a curious person of finding out who the victim of media hatred is :)

Exibit A: Lommemannen

The "pocket man" is someone notorious for asking small boys to "find out what's in his pockets".

Lazy loading from a Topic Map


  1. Load topics from my.xtm

  2. Car.list()

  3. [car1, car2].isAlsoA(Boat.class) - Which of these cars are also a boat. Or by using another context query


Why dynamic - Later ask for things that is only known to the TM. Define the relations statically by Interface, when needed.

Objects contain no state/reference to other objects. The TM has this information, and it depends on context.

Define which domain class are to be decorated. Some functions like list are generic, while owthers such as car.isAlso(Boat.class) have to be known how to build by query API

Creating the next big idea

Note to self:

  • Good Ideas are the ones that are simple to understand and take little time to implement

  • The more complexity in the idea, the more it will cost and risk increases

  • Stop when you've created a minimalistic prototype. Work should then be used on documenting it. What you have made now is most likely the most valuable part

  • Before you start implementing, make sure that the prioritized task is the one which gives the most value

  • Tasks should never be longer than 'til the end of the day. You will feel more satisfied and vigorous if you accomplished the task and can walk away from it with a clean concious, rather than beeing irritated of the work you still have to do, which you can't start on for another week

  • Keep expectations low and commitments few until confident in delivering. It might be a painful to walk away from a project which doesn't have the right of life

Saturday, June 14, 2008

Dissecting Grails for Maven building

Show me your war, and I will tell you how it does!

Upgrading a Java project from a legacy buildsystem to Maven involves lots of reverse engineering to understand how the application works. Starting to investigate a project by its deliverables is often the most easy, taking a working application and picking away piece by piece, like dissecting a frog, to see if it still works after some abuse and halfchanced guesswork.

I started by grails create-app'ing a simple book tutorial grails app, and grails war'ing it. The contents of the war were extracted into src/main/webapp of a maven demo project, supported by groovy-all, GMaven (Groovy Maven plugin) and Maven Jetty plugin.

Thursday, June 12, 2008

java.no as a student resource

java.no, maintained by javaBin, is a resource for a mature crowd of Java developers.

The majority of newbie Java developers, are students looking for tutorials, demoes and code samples to complete their 101 programming homework. Alas, like The Serverside and InfoQ, java.no alienates new Java developers. Todays agenda is architecting billion dollar enterprise systems, improving project agility or Business Intelligence. It is way past telling how to write hello world or make a robot play soccer, and I don't think the Java news resources ever have written how to.

Saturday, June 7, 2008

Tagger Tracker

Detailed: Community driven website for tracking tagers, where users can:

  • upload pictures of the artwork

  • upload surveillance footage

  • track time and place

  • comment on style, similarities and possible suspects.


Sentral to this application is a file. A file is a record of a sighting, containing time, positioning sightings on a street map, footage of incident, linking to other files or a suspects portafoilo and comments. The suspects gather a portafolio of files.

It is important that the site offers anonymizing the information, such that the incriminating details can be uploaded, but is only accessible for people with the right credentials. The information also needs a rating system to say something about the propability and correctness of information, to increase the data quality. Such an application will need an active set of moderators to avoid negative publicity.

Data analysis: The application must facilitate finding similarities between files, and finding relations between sightings and the motivation, and profile of suspects.

This can help structuring information such as

  • places of interest and facilities often visited (home, work, school)

  • social events

  • drinking/drug habits


Implementation: Topic map to store and relate the gathered information. Simple data storage of pictures and video footage. Map integration with Google maps or similar. Simple forum or wiki to discuss the sightings. Tracker GUI to view the material based on suspects, elapsed time, put sightings into context events such as parties aso, location of maps, spot similarities between artwork.

Conclusion: Creating a Tagger Tracker should not face any implementation difficulties. Creating an active community of commiters should not pose a problem. The moral issue of playing neighbourhood vigilante is something to be aware of, but differs according to application and country. Such an project has the potential for great opensourceness, but most likely little flow of income.

Copyright of the author. Creative Commons license.