the corner office

a blog, by Colin Pretorius

« Migratify, migratify me... | Main | Damnandbuggerit »

# Newbie

I can already see that I need to start visiting just about every 'best practice' Java website, and start reading every article they have, from day one. I know the language, I kind-of know my way around the APIs, but I've realised that's the least of my worries.

The more I work with it, the more my 'sense' of systems architecture and appreciation for elegant design goes out the window.

Ask me to 'architect' a Notes system spanning multiple databases, throw together tens of LotusScript libraries to build huge agents that run for hours, and I can do it in my sleep. It's What I Do.

Ask me to get the same thing done in Java (accessing and manipulating relational data), and I realise just how much real-world experience counts. I don't believe that Java is 'harder' than Notes, it's just a completely different paradigm.

No, scratch that. It *is* harder than Notes. Not in terms of the language itself, not in terms of relational design, nor even the more comprehensive APIs, but in terms of just how many things Notes takes care of for you. Imagine you *had* to build an extra layer of abstraction before you could even work with Notes data. Imagine your Notes UI had to be built or patched together on the fly.

And it's not that taking care of your data access, or your UI/web display is impossible, either. It's just that the founding fathers have forged ahead and laid down the rules, and this inaccessible 'best practice' sits there leering at you, taunting you as being inexperienced and out of your mind if you opt for simpler Java roads to go down.

Nor is it the case that a solid Notes (LotusScript) developer is writing less complicated code, or even less worthy code than a Java developer, it's just that they're spending less time sculpting mountains of shite with gummed up interfaces to each other, and spending more time on solving business problems. The whole MVC thing (in modern-day terms; separation of data, presentation and business logic) is a shining example.

This is big in Java. MVC is supposed to be important because it keeps things separate and easier to understand, maintain, extend and re-use. These tie in very closely to Object-Oriented theory, but these goals were around waaaay before OO programming became vogue. I'm an OO fan through and through, but my completely uneducated opinion is that the separation is only a good thing if it doesn't fsck up your application to the point where you can't see the business logic for the trees. Too often I see the separation becoming more important than the original goals of having better code. The end result? Contrivance instead of elegance.

What I like about Notes is that within reason, you're able to keep your presentation, data and business logic in reasonably separate 'heaps' if you like, and you're able to find a happy balance between maintaining your 'piles' and focusing on getting things done. Java 'best practice', such as I'm discovering it, seems to carve these apart with a meat cleaver, seal everything in airtight boxes, and then encourages you to build mind-blowingly elaborate and theoretically-correct interfaces between them to the point of lunacy.

I know this is probably my inexperience talking. An experienced Java developer would probably tell me to get knotted. I know that in a year's time I could be laughing when I see posts like Spuggy's. I know that I can absorb these sorts of things, but the question is: do I want to?

File under: notes/domino, techie : {2004.01.20 16:57}

Comments:

1. Ben Poole (2004.01.20 - 21:11) #

Re learning Java best practice / how to do that thang: you're not alone mate ;-)

2. jonvon (2004.01.20 - 21:49) #

here, here. we're all in it together man...

one thing i've found that has at least started to help me is i'm trying to write javadoc for my classes. its amazingly good at pointing out to me as i'm writing this stuff just how retarded my designs are. i mean, i start out with the idea that i'm going to write something that will be very easy for other people to use, and by the time i'm (half-way) done writing the javadoc i'm already rewriting my code.

3. Colin (2004.01.20 - 21:58) #

Ben, I just replied on your site as well :)<br><br>I've come to the conclusion that lots of practice and selective breaking of rules that make sense to me is the way I'm going to go with Java. I think it's especially the case that the only way to learn is to try, mess up and re-organise and rewrite code and keep doing it. It's not efficient and gets frustrating when your end-goal is gurudom but looking back, I suppose that's largely how I improved (and keep improving) my phat LS skillz. And I have a long ways to go before LS gurudom, at that ;)<br><br>At the same time I'm also going to invest in some of those overpriced, bloated 'Java for anal retentives' books so that even if I don't like what I'm reading, I at least can gripe from an informed perspective. Although I know that by the time that's firmly entrenched in my noggin, I won't be whingeing because like the rest of the high priests have already learned, the earnings potential will probably be that little bit higher. Sneaky buggers.

4. Colin (2004.01.20 - 22:05) #

jon, good point. I've been finding that if I carefully document my methods etc, I force myself to give more thought to what I'm doing. Otherwise I tend to 'speculatively' code new chunks just to see if it works, and then keep 'speculatively' accreting gunk until I have a big rickety mess.

Having said that, sometimes if I think too much my mind implodes under the sheer weight of options ;)

5. Ben Poole (2004.01.20 - 23:42) #

On that point, as we all know, XP promotes test-based coding... and this is something that really makes sense to me for the same reasons as scribbling out documentation helps jonvon.

6. jonvon (2004.01.21 - 22:16) #

re mind implosions... doing the javadoc thing definitely slows everything down. for me i think it basically doubles development time, esp if i start rewriting stuff. goes faster with a good tool like eclipse but still... i guess you get what you pay for.

:-)

Add a comment

Your name (mandatory):

Your email:
Your email address is not displayed
Your home page:

Comment (sorry, no HTML):

Remember details?
Yes No

meta

-home-
about
contact
disclaimer
articles
code
link blog

style: [?]
[plain.dark.blue]

Categories

java
linux
music
notes/domino
personal
politiek
studies
techie
thee_blog
world

RSS Feeds

rssfeed all posts
rssfeed all cmts
rssfeed tech posts
rssfeed tech cmts

Archives

2009.01
2008.12
2008.11
2008.10
2008.09
2008.08
2008.07
2008.06
2008.05
2008.04
2008.03
2008.02
2008.01
2007.12
2007.11
2007.10
2007.09
2007.08
2007.07
2007.06
2007.05
2007.04
2007.03
2007.02
2007.01
2006.12
2006.11
2006.10
2006.09
2006.08
2006.07
2006.06
2006.05
2006.04
2006.03
2006.02
2006.01
2005.12
2005.11
2005.10
2005.09
2005.08
2005.07
2005.06
2005.05
2005.04
2005.03
2005.02
2005.01
2004.12
2004.11
2004.10
2004.09
2004.08
2004.07
2004.06
2004.05
2004.04
2004.03
2004.02
2004.01
2003.12
2003.11
2003.10
2003.09
2003.08
2003.07
2003.06

© Colin Pretorius