Ayende @ Rahien

It's a girl

How would you learn a new platform?

Here is an interesting problem that I am facing. I have a pretty good working knowledge of computing, and while I can usually manage to get the gist of a new technology in a short amount of time, that is only useful for talking about it, not actually applying that. I am currently trying to figure out the parts where I am missing, and plug the holes. And I am running into a bit of a problem here.

A case in point, I can read Java, and I can probably write C# code in Java, but I can’t write a Java application. Not for lack of technical skills, but just because I lack the practical knowledge on how to do so.  The problem is that it is going to take too long for me to slog through everything myself, especially since my main problems are in things like IDEs and usage patterns, which aren’t really stuff that you learn from reading about it.

I am thinking on taking a Java course, not so much for the content of the course, as the ability to actually build Java apps in an environment where I can ask questions. On the other hand, picking the right course is problematic, I am not going to sit through “this is a for loop", but I don’t want to be the guy with the blank stare.

Comments

Patrick Smacchia
11/23/2009 10:29 AM by
Patrick Smacchia

Stupid question: why learning Java?

Sure being open-minded, having a large vision... is a good thing but on the other side technical deep knowledge is highly valuable. IMHO real technical expertise is a rare skill. Someone that pretends being both a Java and a .NET expert is for sure, not as good as a fully dedicated .NET or Java expert. It was possible 5 years ago but today, the platforms has grown so much these days.

Why learning Java instead of being an even better .NET developer to value your time even more?

Frank Quednau
11/23/2009 10:35 AM by
Frank Quednau

Maybe after the brutal and perverse modification of type resolution by applying every single exotic and rarely used .NET feature one can know about ayende is through with it and needs something new to stain!

Nic Wise
11/23/2009 10:39 AM by
Nic Wise

Personally, having taught Java, c#, delphi and other languages over the years, I dont think there is a course you could do which would give you this. All the ones I've come across are WAY below you, not to mention that you are likely to distract the rest of the class, as the knowledge gap is so wide.

Personally, I'd consider either a) get hold of skills matter, being you have worked with them already and/or b) work out a small project you know well (rhino.* for eg) and port it, focusing on the tools not the language. Then build something bigger - port your new CMS to java, just for kicks. again, you are focusing on the platform, not the solution, as you have solved the solution already.

If you are a resharper user, consider using intellij idea. Keybindings and terminology are very similar. IDEA kicks arse too :)

I'm in the same boat. I've done java in the past, but I'm not an expert any more - I've done C# since beta. I can read it without any issue, and the concepts, tools etc all make perfect sense, but if I had to greenfield an app, I'd be screwed. But I do know of people to ask for help (Eg www.illegalargument.com) :) Stackoverflow.com might be a good one, too.

Maybe, if you want to up skill really quickly, find a java shop in your area and see if you can pair with someone on a project - you are bringing a MASSIVE experience to the table, so pairing with an intermediate dev might be beneficial to both parties. Or a shop which does Java and .NET and offer some free training/pairing/whatever for their .net people. Thoughtworks comes to mind.

Or find an open source java project and contribute, tho that is on your own, so maybe not so beneficial or quick.

I had to do the same learning postgres a few weeks ago. Took a week of banging my head on the wall, thinking "why doesn't PG do this thing that MSSQL does? WTF?", but now (after asking some people with oracle skillz) I'm a lot more comfortable with it.

Steven
11/23/2009 10:42 AM by
Steven

Just dive into it. Learn on the job. It might be hard, but you'll pick up the most veryquickly. The language itself is not the hard part as it's just an other language. It's more about the deploy platforms and frameworks (and even there are a lot of parallel tracks).

I made this switch exactly 2 years ago when I started as a freelancer after 4 years of C#. The first month I implemented some POCs for myself and then I just went for it. As IDE, use IntelliJ, the shortcuts are the same as the ones from Resharper. Never liked eclipse, but that's a personal preference. And as always, Google is your best friend ;-)

Rafal
11/23/2009 10:53 AM by
Rafal

There isn't probably a course that will teach you how to write applications in Java, you must learn by actually writing them. Now there's a question, what applications you want to build - web, desktop, mobile, with what framework - there are hundreds of various application frameworks in Java and every developer has his own choice...

Bernhard
11/23/2009 11:10 AM by
Bernhard

I've once had a pretty good Java course exactly for what you are searching. It was called something along "Java for Programmers with experience in object oriented languages" (poorly translated from German).

It was pretty good for what you want to achieve. It concentrated on the difference of these two languages instead of for loops etc.

Included was a pretty good introduction to Eclipse and the tools involved.

If I would have had to pay it by myself - I would've learned Java by myself - but my former employee payed for it - and it was an effective way to get started in Java.

Here is the link to the course (in German, sorry for that):

www.integrata.de/.../3324.html

Tomasz Modelski
11/23/2009 11:31 AM by
Tomasz Modelski

My best practise in such cases is to find some technology expert, sit with him in the same room or office, try to do your job, and from time to time ask questions to expert.

For example, currently I'm learning Sharepoint (WSS, MOSS) (implementing something in sharepoint).

I called to my friends from Sharepoint company and agreeded with them that I will sit in their team room, implement my project and ask them from time to time.

And it worked good. With minimal burden to them, I've learned a lot (mostly tools, terms, deployment, .... ), they have some fun and some interesting conversation (how to do this .... ) in team room while breaks.

Steve
11/23/2009 11:50 AM by
Steve

I've been going down the same path actually. (Sorry Patrick, there is considerable benefits in not being so singularly focused - that is one problem I have with some .net developers...)

Let me share a bit of a path I have taken.

(1) I started out just reading some basics, setting up a class_path, etc... this is short learning curve, but building a simple java app with no tooling gives a good perspective.

(2) I actually pulled down Netbeans, and on their website they have, ie. 5 or so tutorials. Grails, Spring MVC, GWT, nice, short, but clearly aimed at getting you up and running quickly. There were very value. Why Netbeans when Eclipse is the 'standard' ? Because I didn't want to be tied into 'just' learning an IDE and Netbeans is very familiar to me after using Visual Studio for all these years.

(3) I took interest in Grails, as it uses Spring + Hibernate, etc.. and was very close to my interest in web applications - uses convention over configuration, DSL language, etc... I went to grails website. Ended up getting 'STS' - SpringSource Tools - that integrated Grails into the IDE. Then I got Grails in Action, etc...

Why all this ? Seems painful ? Yes, at first... but then, it didn't take long to start to gain some familiarity. It was enjoyable.

I think next step is looking for some Java equivalent user groups in my area to hook up with. I'm a consultant and we have some good java developers at my company, I'm hoping to find opportunities there.

One thing I have found out so far is that these guys find tools like hibernate to be a standard, IOC (Spring) as a standard - not a fight with a corporation that will only use Microsoft products regardless of a better open source solution, etc...

Now, I really love .NET, at the same time, they 'write anywhere, deploy everywhere' is still very powerful in java - code in Eclipse on a Mac, Linux, Windows - deploy to a Mac, Linux, Windows, mobile devices (ie. Android, Blackberry), etc...

Steve
11/23/2009 11:54 AM by
Steve

Clarification to above : STS is Eclipse really with Spring's tooling support baked in. Not limited to just grails - it covers Spring in general, but here is sample http://www.grails.org/STS+Integration.

The benefit I have in these tools Ayende, is they include a basic built in web server (ie. like Cassini), built in database in grails - in memory for just learning, testing, built in java container etc... build in junit, etc... so when you hit 'run', you have the entire environment there for the taking

Demis Bellot
11/23/2009 12:21 PM by
Demis Bellot

I feel for you. Having spent a few years as a Java developer, moving to C# is a breath of fresh air. Although I would say its still the best option to develop statically-typed cross platform applications with, which I believe is the main reason it still has a lot of momentum behind it.

Although fortunately the Java language has stagnated in features over the past few years so its actually easier to learn Java from C# rather than trying to learn C# from a Java background. I would say the main hurdles is the 'opt-in', zero-convention configure everything coupled with the 'lets abstract everything so we can plug in any implementation at every point' leads itself to a lot more configuration and code that what you will be used to.

Unfortunately the Java standard libraries are a lot less useful than the .NET BCL which is why you pretty much need to utilize external packages to get anything done. Luckily there is a thriving 3rd party component eco-system and places like http://jakarta.apache.org/ will most likely have a library for anything you will need. The maven project ( http://maven.apache.org/) will help manage these dependencies with the cost of extra configuration and time spent learning yet another tool.

My tip is if you had to learn java, than rather than learning the 'Java way' pick a framework like 'spring' http://www.springsource.com/products/enterprise and learn how to do things 'the spring way'. Also I find it best to 'learn by doing' so if possible look for an mature opensource java project (there are many around) if the domain you're interested in and hit the ground from there.

Although if you can get by just targeting the JVM (i.e. not having to use Java) than Scala may be more appealing ( http://www.scala-lang.org/) as it's an advanced statically-typed language targeting the JVM that has been getting some high-profile converts like twitter lately.

Andrew Rea
11/23/2009 12:36 PM by
Andrew Rea

I think you are doing a great thing picking up Java. Thinking about your Profiler you are making inside WPF, you may want to also Consider Java FX as I think both for web and application development it is the equivalent product from SUN as the WPF / Silverlight is from Microsoft.

Mihai Lazar
11/23/2009 01:01 PM by
Mihai Lazar

Go get yourself Bruce Eckel's Thinking in Java.

Then download Netbeans and just start coding.

Nothing will be familiar, you won't know why you have to write string as String or why some methods are missing from StringBuilder, and you won't know why the freakin' designer is worthless 80% of the time, but it's all a java course will have to teach you.

So just start coding something, google what you don't understand and have a blast.

Andrew Rea
11/23/2009 01:31 PM by
Andrew Rea

That last comment has a good point, "Download NetBeans"

Choice of IDE. Eclipse is mega popular, but me personally, I use NetBeans for my Java Development. I have tried both, and I just like the feel of the NetBeans IDE more. Not sure what it is. When you go to the Plugin Wizard" you will be impressed with how much is on offer I think.

pete
11/23/2009 01:41 PM by
pete

I have learned a new technology ever 2.5 years for the last 20 years. The first question is the new technology just new to you? Something like java has been around for a long time so it makes it easier to learn. I would look on line for two books one would be a book that covered the basics. This book you would mostly skim. But you would get the basics like use eclipse to do this and that.. Get the latest source from this and that. The second book would be more advance. You might have to reread sections but no one is looking at you going dam your slow. Then the next step is find a good online resorce for java. Place where you can post questions and get answers. There are many places for this sort of thing.

Where it gets tricky is learning a technology where it is new to everyone. Say like learning fluent NHibernate. There are well established forms today. But that was not the case in fall 2008.

There is really only way to do that. Online groups and asking questions.

When ever I sit down to learn a new technology I have to be convinced it will add value. Is my company going to move to this technology? Does a new contract require I know this? If we started doing this technology would it add more quality to software I produced? What sort of small project can I use to expairment with this new technology? If my company is not moving this way, will I still be happy at my job after I learn this or will I need to find a new job after learning this? OR would I rather spend the time rollerblading or hanging out with friends.

Jon Fuller
11/23/2009 01:53 PM by
Jon Fuller

I've tried to do this type of thing myself, and I've found the absolute best way to get up to speed on a new technology and it's toolset is to pair with an experienced dev on that platform. You'll get to know the nuances of the tools, and you'll learn his opinions and most importantly why he has those opinions. You'll pick up tips and tricks about fundamentals (that are different than their .NET counterparts) and understand how they build up their knowledgebase. I'd guess a week or so would put you well on your way.

Seth Petry-Johnson
11/23/2009 05:27 PM by
Seth Petry-Johnson

I agree with everyone that's supported an interactive method of learning the new platform, as opposed to reading blogs or books.

I was originally a ColdFusion programmer and I got my start in .NET by taking a class. The class was designed for programmers switching platforms, so it skipped the "this is a for loop" stuff and focused on the tools, techniques, standards and idioms that we need to know to use the new platform in a somewhat standard way.

I found the experience to be extremely helpful. Being able to ask questions and talk to other people dramatically shorted the learning curve and helped me to avoid picking up bad habits early on. If you can find a small class, aimed at people of a somewhat similar level of experience, go for it.

Phil
11/23/2009 05:33 PM by
Phil

I agree with the comments of the first commenter (Patrick Smacchia). There are many quirks that make C# and Java different and learning both to become an expert at both in my opinion too is a bad idea. However, in addition which may not be a smart move but its best for me- I believe you should master a small section of .NET and have a background in the otherd. I work with ASP.NET and supporting tools (like ASP.NET AJAX) etc. I only know a little of WPF, WFC, Microframework, compact framework and the others. It will take me a very long time to be phenomenom at ASP.NET. Learning the other big components (like WPF) and their quirks to the extent of being great at them also will take me too much time.

Trent
11/23/2009 06:58 PM by
Trent

I played with Java a year or so ago. I liked Eclipse, in that it was free and I could find VS things occasionally. Right now I'm learning Python and there are some great online resources. Python is fantastic for parsing text, working with NLP, and super easy to get going right away. I like to use books for this kind of thing, so I can skip the "create a for loop" thing.

Chuck
11/23/2009 06:59 PM by
Chuck

An alternative approach is to forget about the IDE. IMO, you don't need one to get your chops. A good text editor and a web browser will do the trick just fine!

Ayende Rahien
11/23/2009 07:17 PM by
Ayende Rahien

Patrick,

Because I don't think that there is value in trying to be a better .Net developer.

Or, let me rephrase that. I can learn more about specific topics, I can become an expert in WCF or another special topic like that.

That wouldn't make me a better developer, it would only give me knowledge that I would be able to acquire at the same point in time when I would need it.

In other words, I already know the basics for .Net, there isn't going to be a huge learning curve to just about any topic that I want.

Learning a new platform means that I would have to do more than learn some new API, and I find that my lack of practical experience in bothering me

Nic,

You are bringing some excellent suggestions to the table. However, since my problem isn't actually with design or understanding, I think that I am going to try to take an advanced Java course and hope the instructor have enough patience to explain to me how to compile/run/debug the code :-)

That would hopefully kill two birds in one stone

Rafal,

I don't actually care for what I am writing, I am more interested in the tooling experience, how to do things, what are the standard approaches for problem solving, etc.

Steve,

I agree with your approach, but I think it is quite time consuming. My hope is that by taking a course I can cut down on the time required to be proficient.

Andrew,

I will admit that I want to make the profiler cross platform. But Java FX isn't likely the way to go there.

Mihai,

That takes time, a course is a way to reduce that time

Phil,

I don't aim to be a Java expert, but I would really like to wipe that blank look off my face whenever if I want to do some Java programming.

Chuck,

I know the language, and I am not really afraid of the API.

What I need to know is IDE, build tools, management, etc.

ng
11/23/2009 07:34 PM by
ng

I just came to the java world from the .NET world about 3 months ago. I'm still learning, but it really hasn't been too hard. I certainly miss a lot of the things that make .NET great - LINQ in particular - but it hasn't been too bad. I just feel like I'm programming C# 5 years ago since I have to use for loops.

A few observations:

Maven is awesome.

Intellij is awesome.

Guice has spurred Spring to make some nice advancements in its IoC container.

StackOverflow is your friend.

After checking out the various mocking frameworks I've settled on Mockito and quite like it.

If you use Maven, you don't have to stress out about how you'll structure things - it's very strongly suggested you do it the Maven tried and true way.

I haven't had to do much data access yet, but I'm pretty sure you could get the hang of Hibernate :)

ng
11/23/2009 07:40 PM by
ng

also...

http://dddsample.sourceforge.net as far as I know was an app on which Eric Evans had a lot of input. You of course may not being doing DDD, but I still think looking through the source is a good introduction to how things are done in Java in a good way.

Jimmy Chan
11/23/2009 09:53 PM by
Jimmy Chan

Why don't you pick a good Java developer into your team? Explain the profiler design, let them do in Java. You see, learn, and ask anything about Java to them, no need taking "boring" courses

Terry
11/23/2009 10:06 PM by
Terry

Ayende, don't take a step back!!!!!!!!!! Java is a dinosaur language that's dying. Learn Scala instead. j/k :-)

Ayende Rahien
11/23/2009 10:52 PM by
Ayende Rahien

Jimmy,

I have done that, but most of the work is done over the net.

That is not really conductive for learning.

Terry,

Baby steps

smurf
11/24/2009 12:53 AM by
smurf

java has some interesting frameworks, but i don't think, that you'll get much fun out of that language itself

junior programmer
11/24/2009 04:03 AM by
junior programmer

i don't believe in shortcuts especially in working knowledge. i think most of the concepts/underlying (like why things are done the way they are) take time for the brain to observe and experience to see for yourself. but having someone to show you will definitely save a bit of time up front. in terms of language, why give erlang a try? isn't concurrency and functional language supposed to be the future? ^_^

Patrick Smacchia
11/24/2009 08:10 AM by
Patrick Smacchia

Or, let me rephrase that. I can learn more about specific topics, I can become an expert in WCF or another special topic like that.

It takes year to become an expert. My soft uses heavily GDI+/WindowsForm and I learn everyday since 5 years. Yesterday again I learnt some obscur win32 tricks concerning displaying a native windows. It is all a matter of productivity, now I know how it works and I'll be faster in the future.

I already know the basics for .Net, there isn't going to be a huge learning curve to just about any topic that I want.

I don't agree, being an expert in a .NET related fields (WPF, WCF, WindowsForm, IL...) takes long times and is highly valuable. For me an expert is someone that actually develop for months or years with a technology, not someone that reads one or two books on the subject.

Ayende Rahien
11/24/2009 11:20 AM by
Ayende Rahien

Patrick,

Expert according to your definition, sure. I just don't care about that.

Can I get good job done without spending years on a particular topic?

That is my criteria.

Patrick Smacchia
11/24/2009 11:28 AM by
Patrick Smacchia

Can I get good job done without spending years on a particular topic?

Good job cannot be done fast. You know the project I am working on, it cannot be done properly without years of advanced development and a deep expertise on plenty of .NET related topics.

I wonder what is your definition of developer expert if its not being able to solve under the hood problems in hours and not in days. Take the recent WPF mem leak you had on NHProf recently. This is the typical kind of under the hood problem I am talking about.

ayende.com/.../reproducing-a-wpf-memory-leak.aspx

Ayende Rahien
11/24/2009 11:34 AM by
Ayende Rahien

Patrick,

I wouldn't call myself a WPF expert by any means, but being able to isolate the problem required absolutely no WPF knowledge, all it took was standard .Net debugging skills.

And those applies across the entire stack. Once I got something small & reproducible, I got an answer in a matter of minutes.

And I disagree that good job cannot be done fast, it is most certainly possible. Most of NH Prof was done "fast".

Patrick Smacchia
11/24/2009 11:55 AM by
Patrick Smacchia

Most of NH Prof was done "fast".

Do you mean that developers of rockstar products like VisualStudio, R# or CodeRush take years or decades to make awesome products but it could be done faster?

I don't think that quoting NHProf is relevant coz the product is v1.X.

http://www.nhprof.com/

I am not a DB guy and don't know too much NHProf but I know that it is a fantastic tool that help a lot its user. But I guess also that you have ideas to make the product smarter, nicer, faster, with more facilities, with amazing features that you are planning for the future. In 2 years, NHProf v2 or v3 will be incredibly better than what is NHProf v1 now and such quality gap will take you months and years of hard development. This is what I mean by good product cannot be done fast, it just requires deeper and deeper expertise.

Ayende Rahien
11/24/2009 12:04 PM by
Ayende Rahien

Patrick,

I have seen products that had hundreds of man years invested in them flop, I have seen products that had maybe a week of work soar.

There is no real correlation between awesomeness and the amount of work on a product.

Bad good products do get better when you improve on them, for sure.

That doesn't mean that you need to be an expert in the field you are working on to be able to create them

Patrick Smacchia
11/24/2009 12:47 PM by
Patrick Smacchia

Sure, the time spent and the number of developers on a product doesn't mean success nor quality. Also, I've seen successful products done by non-experts. But they were successful just because they met their market, the original idea and schedule were good but the product quality was very low.

Within the last years I learnt with my team to develop features in a optimal way. I don't want users of the product felt some compromise were done. I don't want them feeling that it is good, but it could be better developed. This will be especially true in the next major version we spent the whole 2009 year on. This is my conception of software engineering.

Manoj Waikar
11/24/2009 02:19 PM by
Manoj Waikar

I agree that pairing with other experts looks like a good idea to shorten the learning curve. You might want to read this - blog.thinkrelevance.com/.../hacker-in-residence...

This company works in Clojure and one of its founders wrote the Programming Clojure book. And as you might already know, Clojure works on top of JVM, and an added bonus is that you'll learn a whole new functional paradigm.

Mike Brown
11/24/2009 03:57 PM by
Mike Brown

It's been said before but it's worth repeating. Take a project that you can do in you sleep on your platform of choice and port it to the new platform. Force yourself to do things in the manner of a native platform developer.

Find the bloggers that everyone is pointing to in the other platform's community and read their content voraciously.You learn the neatest tricks from the community leaders.

but the most important thing is to practice practice pracice. As I'm sure you know, there's much more to programming a different language than syntax.

Petar Shomov
11/24/2009 08:40 PM by
Petar Shomov

Hi Ayende,

I have an idea. A lot of people exchange language teaching in their native language, teach each other for an hour. I am told it works great. So I have an offer for you: I offer that we can do a few sessions over some screen sharing thing and I can help you with your questions regarding Java as far as I can and in return I get to ask you some questions about things you know. I will probably be getting the better end in this deal but I think it still be beneficial for you too ;). My environment I have used and feel comfortable talking about is:

Java(generics is probably the most sophisticated thing in Java), Spring (IoC, AOP, MVC, MVC portlet, and some more I can't remember right other), IntelliJ is my IDE and you will prefer it if you are using the R# intellij bindings, Tomcat, Jetty, Unit testing for different technologies, mocking, TDD, some web services stuff (Apache CXF), and a few more things I am probably forgetting.

Call me ;)

gunteman
11/25/2009 12:03 AM by
gunteman

About a year ago I had to venture into the Java world (first with a browser applet, believe it or not). The language itself presented no problems, but Eclipse took some getting used to. A solid tool, no doubt, but VS2008 seems easy in comparison. After that, my most lasting impression is that the Java world has somewhat moved on from the pattern paralysis that surrounds .NET, but instead moved on to be frameworkaholism. There's a framework for everything, and as if insanely intricate Ant builds wasn't enough, the casual coder now often have to deal with the hurdle that is Maven...

Ayende Rahien
11/25/2009 09:58 AM by
Ayende Rahien

Patrick,

I fully agree with you, but I think that you'll admit that 95% of the time, you aren't dealing with technical difficulties with the platform.

You are dealing with algos, design, features, etc. Running into deep tech problems just doesn't happen all that often.

Ayende Rahien
11/25/2009 09:59 AM by
Ayende Rahien

Petar,

I'll probably do that, but not in the near future, probably in a month and a half

Patrick Smacchia
11/25/2009 11:07 AM by
Patrick Smacchia

Ayende our experience differ on this point. I often try to get the most of the platform and I often end up with deep technical difficulties with under the hood P/Invoking things. On my current project I estimate resources are partitioned this way:

40% feature

50% non functional requirement: usability, ergonomy, UI polishing, performance, memory consumption, responsiveness

10% bug fixing, reliability

Certainly more recent fully managed technology like WPF can help focusing more on features themselves.

Joshua Arnold
11/25/2009 05:27 PM by
Joshua Arnold

Having served my time in the Java world and seeing the work that you do, you're right in saying that it's not your understanding of technology or design that's going to be your obstacle. I love .NET but I strongly believe that Java has its place.

The fundamentals are what kill everyone when they work w/ Java: building/compiling/packaging and splitting up "projects" since it can be a pain. I imagine a couple days of fiddling with that and you'll be ready for any advanced course.

You're far more experienced than I am but my suggestion would be to port a small application over (specifically something leveraging WCF) in incremental steps: 1) Direct port 2) modifications to incorporate usage patterns and 3) modifications to take advantage of platform-specific features.

Mischa Kroon
11/30/2009 02:30 PM by
Mischa Kroon

Suggestion:

Try to pick the trainer you respect most for Java, or most convenient for you to visit.

Then email then with the question which course you provide would work best for me to follow. With a paste from this blog post.

Raj Aryal
12/14/2009 09:03 PM by
Raj Aryal

This is a must (for every developer, java or not)

Effective Java - Programming Language Guide

Latest trend inclines towards:

IOC with Spring (not j2ee standard framework), google frameworks for java and ejb3

Needless to say and I am sure you know as much as anybody else, hibernate orm

Comments have been closed on this topic.