Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
You searched this site for "java". 1,857 entries found.

You can also try this same search on Google.

The T2000 Arrives

I received my T2000 server from Sun yesterday, and now it sits in its original packaging in my basement. I may not even unwrap and install it. When I originally ordered the server, I heard you could blog about it and possibly win a free one. Since then I've heard different; there's a contest with many entering, and they're only giving away a couple of them. Because of this, I've somewhat lost my motivation to install the sucker. Partly because I know I'll have to send it back, and partly because it doesn't look that fast. Regardless, it's nice to have Jeff's setup instructions if I do decide to assemble/install it.

Right now, my schedule is packed full of client work - all the way until mid-June. So if I'm going to build this bad boy, it'll have to be as part of my "late night" schedule. Right now, that's booked with Spring Live, designs for the CSS Framework and AppFuse/Equinox development.

To further justify my lack of motivation, I don't think the T2000 will solve my OOM issues with CruiseControl and Ant. I've been talking with one of the Ant developers, and it appears to be caused by the <copy> task in Ant. With any luck, I'll find some time to setup CruiseControl and do some performance testing of web frameworks before the T2000 goes back in mid-June, but it doesn't look good right now.

Posted in Java at Apr 18 2006, 09:27:01 PM MDT 8 Comments

Tips for Productivity and Happiness at Work

Every so often, I get asked what my strategy is for "getting things done". This morning, I had a short session of mass productivity, and on my ride into work, got inspired to jot down a few tips productivity tips. Keep in mind that I grew up in the back woods of Montana with no electricity and I'm mostly Irish.

  • Write stuff down. The first and most important means to getting things done is to keep a todo list. I keep mine on Ta-da List and update it daily, if not hourly. My two most important lists are "When I have time" and "This Week". I regularly re-order "This Week" for the current day.
  • Quit reading e-mail and blogs. One of the ways I can tell I'm in uber-productive mode is my unread (or starred) mail piles up and I haven't read any blog posts (or blogged myself) in a couple days. I like GMail because I can easily star an e-mail after briefly skimming it. For some reason, flagging e-mail in Thunderbird or Mail.app doesn't work for me - I rarely go back and find those e-mails. With GMail, I'm always conscious I need to revisit starred messages.
  • Work on open source late at night, with a beer on your desk. While I do get the opportunity to work on open source at my day job, I still find that I'm most productive at night. Maybe this is because no one bugs me via e-mail or IM, or maybe it's just because the world is asleep. The strange thing is I often find myself motivated at 3 p.m. for my 11 p.m. workload. However, when I get to 11 p.m., I'm not motivated to work on anything. I've found that cracking open a beer at 11 when I start helps me focus and quit worrying about all the other computer-related tasks I need to do. Also, on beer #2 or 3, you'll start to forget what time it is and really start getting things done. NOTE: this isn't for rookies. If you're a lightweight and get hammered on two beers - just go to bed when you start coding with one eye shut. It helps to sleep in the next day after doing this. If you finish off a six-pack before going to bed, it's probably best not to check your code in - you're probably going to spend the next day fixing it anyway. Regardless, this is a great way to get started on a new feature because you're less concerned about the details and more concerned about the big picture. I've also found that "bug fixing juice" can be great for fixing bugs - it gives you a different perspective on the problem. I told you I was Irish didn't I? ;-)
  • Work disconnected. To further facilitate not checking e-mail or reading blogs, I've found that going to a coffee shop w/o connectivity is my most productive environment. They have liquid motivation in the form of coffee, and you can feed your brain with breakfast/lunch or some kind of snack. My most productive days are the ones where I show up at my local Einstein's (bagel shop) at 6 a.m., have two cups of coffee, and work with my headphones on. After the coffee and uber-productivity, I often have an awesome ride to work and barely notice the miles. NOTE: I've found that I'm more productive writing code late at night and authoring articles/books in the early morning.
  • Listen to music while you work. Some noise-cancelling headphones and your favorite music can do wonders for your productivity. Of course, earbuds work just as well - whatever makes the music sound good. Good music can really help you "get into the groove" of what you're working on, regardless of whether it's writing or coding.
  • Work long hours on Monday and Tuesday. This especially applies if you're a contractor. If you can only bill 40 hours per week, working 12-14 hours on Monday can get you an early-departure on Friday. Furthermore, by staying late early in the week, you'll get your productivity ball-rolling early. I've often heard the most productive work-day in a week is Wednesday.
  • Avoid meetings at all costs. Find a way to walk out of meetings that are unproductive, don't concern you, or spiral into two co-workers bitching at each other. While meetings in general are a waste of time, some are worse than others. Establish your policy of walking out early on and folks will respect you have stuff to do. Of course, if you aren't a noticeably productive individual, walking out of a meeting can be perceived as simply "not a team player", which isn't a good idea.
  • Sleep. While working late nights can be productive in the short term, doing it consecutively will burn you out quickly. Getting a good night's sleep can often lead to greater productivity because you're refreshed and ready to go.
  • Work on something you're passionate about. If you don't like what you're doing for a living, quit. Find a new job as soon as possible. It's not about the money, it's all about happiness. Of course, the best balance is both. It's unlikely you'll ever realize this until you have a job that sucks, but pays well.

To follow up on that last point, I think one of the most important catalysts for productivity is to be happy at your job. If you're not happy at work, it's unlikely you're going to be inspired to be a more efficient person. Furthermore, if you like what you do, it's not really "work" is it?

Here is some general advice I give to folks about jobs and careers. I realize that I'm biased here because I have a good job and I've been fairly successful in my career. However, I also grew up with virtually nothing, and learned all my computer skills on my own. Therefore, I believe that anyone can be successful (meaning: happy with that they do, and financially stable at the same time) if they put their mind to it.

  • If you're not happy at work, quit. I got into contracting early-on in my career (6 months out of college), so I got spoiled with good rates early on. It was also the late 90s, so you could easily switch jobs if you didn't like the one you were in. However, I've always had the policy that if you hate your job for more than 2 weeks, quit. It's just not worth it. Some people enjoy bitching about their jobs and complaining about their co-workers, so this doesn't apply to everyone. However, if you're truly miserable - quit. I've done this a couple times, and it's always led to better opportunities (even if I had to wait 3 months). Julie's done it once or twice and it's always worked out for the better. Once she even got a 20% raise by quitting her traveling-consultant gig with KPMG and going back to her old company, Qwest.
  • Always try to be a contractor before a full-time employee. This especially applies to younger folks who don't need the security of insurance for the family, stock plans, etc. Contractors typically make 50% more than full-time employees and tend to be excluded from company politics that might make the workplace difficult to deal with. While you won't get billable vacation time, you will get the freedom to take however much vacation you want - as long as you get your stuff done. The higher rates can generally make up for the unbillable time while on vacation. However, if you travel too much for fun (or conferences, etc.), it's likely your year-end salary will equal that of a full-time employee. If you make good money as a contractor, you'll also get the opportunity to start your own company (to save money on taxes). This can be a great learning experience. The biggest fear that folks have about "going independent" is they'll have a hard time finding their next gig. If you're productive and blog about what you're doing, this shouldn't be a problem. I haven't had an "interview" since 2002 and haven't updated my resume since then either. Networking at your local JUG and conferences is key.
  • Don't work at a company with a two-week vacation policy. I've never worked at a company with a two-week vacation policy, and I hope I never will. The two full-time gigs I've had in my career have had no vacation policy. This is usually only found in startups - but it generally amounts to "get your shit done, and you can take off all the time you want". My parents both work for the BLM (government agency) and they get 6 weeks off a year. Furthermore, they can earn "comp time" (more days off) by simply working overtime. If you have the ability to take time off whenever you want, it'll likely lead to you being more motivated to work long and hard - b/c you know when you finish that project, you're heading to Cancun for a week.
  • Don't travel if you have kids. If you're single, traveling for work is pretty cool. New places, new people to meet - and seeing the world can be very cool. If you have a spouse, it's likely your desire to travel will decrease, but it's still not that bad. If it helps your career, it's probably a good move. It also helps to save money since everything you do is generally expensible. When Julie and I first met, she traveled 100% and made $20K more per year b/c of it. When you have kids, everything changes and traveling sucks. You miss their first steps, and when they get to toddler-age, they'll want to go with you. Hearing your daughter say "Daddy, can I go with you?" can be heart wrenching when you're leaving on a Sunday afternoon to spend a week with people you've never met before.
  • Ask for more responsibility. If your job sucks, but the company is pretty cool - you may want to ask for a shift in responsibilities. I was once an HTML Developer at a .com. It sucked because we were constantly waiting on the Java Developers to fix bugs we found in their code. Finally, I got tired of waiting and asked my boss to show me how to fix the Java bugs. Granted, I wrote some pretty horrendous code at first, but my boss and co-workers helped a lot and w/in a year I was doing 80% of the Java Development.
  • Most things can be learned by reading. If you want to learn something new (for your current or next career), the best thing to do is read. The world's knowledge resides in books and you can learn a lot. Of course, the best way to retain that knowledge is by doing, but reading is a great first step.

Those are my tips, many of them off the top of my head. I may add more as time goes on - but hopefully this helps in the meantime. Please share yours if you have any.

Posted in General at Apr 14 2006, 11:24:28 AM MDT 55 Comments

Getting ready for the Sun Fire T2000 Server

T2000 Like Jeff, Bill and Bruce, I signed up for the free 60 day trial of the Sun Fire T2000 Server. Why? Because I heard you can get one for free if you blog about it enough. ;-) My plans are to setup continous integration environments for AppFuse and Roller using CruiseControl. I also hope to do some performance tests b/w Java persistence and web frameworks. Finally, I'd like to some single-server vs. clustered server performance tests using Tomcat.

When we built our house way back in 2004, we had it wired with fiber. Even though we still aren't using the fiber, I also had them install ethernet throughout. Today, I finally took advantage of it. I moved my cable modem downstairs and hooked up RJ45 connectors on both ends, so I can now plug my office network into an ethernet outlet on the wall. Good thing my Dad is a network guy - he made it all pretty damn easy.

It was a great afternoon in Denver: 85 degrees, cold Fat Tires in the fridge, kids running around playing in the kiddie pool - and I got my house re-wired in under 30 minutes. The "old basement" will soon become a server room. Now I need a rack - for the T2000 as well as an old Dell Dimension Fedora box. Any suggestions?

Posted in Open Source at Apr 09 2006, 06:38:06 PM MDT 8 Comments

[ANN] AppFuse 1.9.1 Released

This release includes improvements and upgrades to Tapestry 4.0.1, WebWork 2.2.2, as well as support for using AppGen to reverse engineer database tables (using Middlegen). iBATIS is now supported by AppGen and a Create DAO tutorial has been put together for iBATIS. iBATIS and Middlegen support were provided by Bobby Diaz - thanks Bobby! Also, a big thanks goes to Mika Göckel for writing an XFire Tutorial and installer. To install and configure AppFuse for development, see the QuickStart Guide. Thanks to all the sponsors who have contributed products and free hosting to the AppFuse project.

To see how AppFuse works, please see the following demos (username: mraible, password: tomcat):

Comments and issues can be sent to the mailing list or posted to JIRA.

Posted in Java at Apr 07 2006, 02:26:57 AM MDT 14 Comments

What happened to Middlegen?

In AppGen (AppFuse's code generator), I recently integrated support for generating CRUD code (and tests!) from database tables thanks to APF-95 from Bobby Diaz. Previously, it was only possible to generate code from POJOs, but now both are supported. The "mapping files from tables" is done using Middlegen.

Unfortunately, Middlegen seems to be a dead project, especially since its main web site is missing (fixed!). I'd love to use another project that generates XDoclet tags in hbm.xml files, but I don't believe there is one. AFAIK, the Hibernate Tools project does not support XDoclet with its tools. Anyone know where the Middlegen documentation is located? All the documentation used to be on their site.

The good news is the solution I have works, and it works well. However, I definitely look forward to re-writing AppGen. XDoclet as a templating language sucks, and reading XDoclet tags to determine how to generate the UI seems pretty hackish. Hopefully we can use APT and FreeMarker (or Velocity) to process annotations and spit out code in a future release.

Update: The Middlegen website was lost, due some heavy server upgrades. The problem has been fixed and it's back up and running. Now I don't feel so bad about using Middlegen since the project appears to be alive and well. ;-)

Posted in Java at Apr 06 2006, 05:19:15 PM MDT 13 Comments

gotAPI.com - an API Lookup Service

A friend just IM'ed me a link to gotAPI.com. This is a very cool site that allows you to lookup API information on practically everything I use: HTML, CSS, Java, Spring, Ant. Definitely a good bookmark to have.

Posted in Java at Apr 06 2006, 03:17:25 PM MDT 5 Comments

Busy Weekend

I was planning on taking this weekend off to let my left arm heal a bit. Furthermore, Julie and Holly headed up to Steamboat for some skiing and it was "Daddy Weekend". While the kids and I had a lot of fun, I was unable to overcome my addiction to work.

Saturday night I finally managed to get AppFuse running under CruiseControl. Previously, I'd always run into OOM exceptions before the 10-12 minute process of testing a particular flavor. This seems to be due to Ant and the copying of 700 files 3-4 times makes it run out of memory. For each web framework, the basic install is tested, then tested again with AppGen, and finally iBATIS is installed and tested. While the tests all run and report pass/failed correctly, the memory is so close to being maxed that e-mail cannot be sent, and half the time the webapp isn't viewable. Nevertheless, the process keeps on humming. To see the build status for each different AppFuse flavor, see http://home.raibledesigns.com:8080. Having you all click on this link should crash CruiseControl for sure. ;-)

Last night, I got caught up with working on the appfuse.org website. Rather than having a splash page, I changed it to use frames to wrap the java.net homepage, as well as other AppFuse sites. The top navigation should allow you to navigate to java.net, the wiki, demos and JIRA w/o having to type in new URLs. The fun part of this exercise was using CSS to hide images and compress the standard java.net header. If you'd like to do this for your java.net project, add the following to your www/project_tools.html page:

<style type="text/css">
    .topline, .topbar { border: 0 }
    #banner { height: 0px }
    #banner img { display: none; }
</style>

This week should be a pretty good one. I'm working full-time on finishing up AppFuse 1.9.1, and I hope to have it released before this weekend. My parents are coming into town on Thursday night, so that's my deadline. If I don't have everything done by then, I'll probably release anyway. For the full plan of attack for 1.9.1, please see The road to 1.9.1.

If I can finish the AppFuse release this week, I can work on Spring Live next week. After that, I'm booked up with client work for quite some time. So wish me luck, I'll be burning the midnight oil most of this week.

Finally, it was nice to see that many of you bought into my April Fools joke. While it wasn't as good as last year, I still had fun writing it. As some noted, it's not that unbelievable. However, the part about me dropping something for another is out of character. I changed my major 3 times in college, but never dropped the previous ones. For the record, I like Rails and I've been promoting it at Virtuas and SourceBeat. We've talked about starting a Rails practice, but (to be honest) haven't seen a whole lot of demand from clients. Hopefully that will change in the future and virtuas.com/rails will get filled in.

Posted in Java at Apr 03 2006, 04:09:19 PM MDT 1 Comment

Done with AppFuse, moving to Ruby on Rails

Ruby on Rails For the last few weeks, I've been building an application with Ruby on Rails. While I enjoy its simplicity and the ability to get things done quickly, the thing I really like is there's a whole team of developers supporting this framework. If I develop an application with AppFuse, chances are I'll find a bug or two, and then I'll have to spend additional time that night fixing it. Furthermore, I'm beginning to loath the compile/deploy cycle that AppFuse requires you to do.

As a result of my experience with Rails, and my decision to use it for all future web development, it makes no sense for me to keep maintaining AppFuse. Virtuas has decided to start a Rails Practice and I'm going to be the Practice Leader for it. In addition, I'll be writing a "Rails Live" book for SourceBeat. Hopefully we'll have an ERP out for that by the end of this summer.

If you live near Denver, have a lot of experience with Spring, and are interested in becoming the Spring Practice Leader for Virtuas, please let me know.

Posted in Java at Apr 01 2006, 09:56:12 AM MST 14 Comments

Tapestry 4.0 support in AppFuse's CVS

I spent the last couple of days upgrading AppFuse from Tapestry 3.0.3 to Tapestry 4.0.1. While the integration isn't as clean as I'd like it to be, everything works and all tests pass, so that's good. I did post a few remaining issues to the Tapestry mailing list, but there's nothing major. While the upgrade was frustrating (it took me 4 hours to figure out I needed "validators" instead of "validator"), I feel I know a fair bit more about Tapestry now. Furthermore, my experience on the Tapestry user mailing list was incredible. Yesterday, for every question I'd send, I'd get 2-3 replies in a matter of minutes. It was like having my own personal Tapestry consultant by my side. It goes to show that Tapestry is a thriving community, with a lot of folks willing to help out. Thanks guys - I really appreciate the help.

Update: You can view the FishEye Changelog to see what the upgrade entailed.

Posted in Java at Mar 31 2006, 05:49:25 PM MST 7 Comments

[TSSJS] Java Web Frameworks Sweet Spots BOF

I've finished composing my "Java Web Framework Sweet Spots" document and presentation for tonight's BOF at TSSJS. Unfortunately, the BOF is at 6:30 and Crazy Bob's wedding is at 6. So I won't be able to make it to the wedding, but I do hope to have a toast to Bob and his new bride. I have been successful in securing beer for the BOF, so you'd better get their early if you want a free one. Caesar's doesn't have kegs, so it's $6/beer and we've purchased 100 of them for attendees. After that, it turns into a cash bar. Thanks to Virtuas, Codehaus, SourceBeat and yours truly for pitching in for the free booze.

My presentation tonight will be short and sweet. Rather than going through each framework author's responses, I'm just going to highlight their "sweet spot" responses. This allows me to get away with creating a measly 8-page presentation, as well as have a more interactive session. I've taken everyone's responses to the 6 questions I asked, and compiled them in a document. This document is available on the Virtuas site, just click on the link below to download it.

» View Java Web Framework Sweet Spots

Posted in Java at Mar 24 2006, 05:27:24 PM MST 28 Comments