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 "suck". 89 entries found.

You can also try this same search on Google.

Rebooted

As you can hopefully see, I've rebooted the HTML version of this site. I apologize to anyone using IE - I haven't even looked at the site using IE. Everytime I startup Parallels on my MacBook Pro, it locks up the system and I have to reboot. Installing this new theme was pretty painful, mostly because I had to do it with a 20K connection through my cell phone. I'm staying at The New Yorker Hotel in NYC, and even though they advertise "free wireless", it doesn't work for me.

I hope you like the new theme - clicking on the different categories will give you different variations of it. Clicking the "Roller" category will allow you to see version I'll be contributing back to the Roller project. If you see any issues at all, please let me know. Most of them should be fixable with a bit of CSS. The only thing I still need to do is figure out how to get Roller to use the last entry's title in the <title> tag. Google loves good titles.

Update: OK, so most people don't like the reboot - including folks on the CSS Reboot site. Personally, I like the new layout, but agree that the default colors need work. I do like some of the alternative colors, like The Web category's. I'm open to suggestions - what would you like this site to look like?

Silktide SiteScore for this website Update 2: The colors might suck, but my Sitescore results have gone up significantly. The funny thing is the main thing I'm lacking is different titles on each page.

Update 3: I solved the title problem. You can do this in your Roller templates too if you like.

#set( $xmap = $pageModel.getRecentWeblogEntries(1,'nil') )
#foreach( $day in $xmap.keySet() )
   #set( $recentEntries = $xmap.get($day) )
   #foreach ($var in $recentEntries)
       #set ($title = $var.title)
   #end
#end
    <title>#showWebsiteTitle() | #if ($page.Name == "Weblog") $title #else $page.Name #end</title>

Posted in The Web at Apr 30 2006, 11:15:14 PM MDT 17 Comments

Smashed Fingers

Daddy and Jack Today we took the kids to Dave & Buster's for lunch. They're not quite old enough, but they do good. Abbie and I race cars and she can't even touch the gas. After a few seconds of waiting, her car takes off and she's driving - hooting and hollering the whole time. Jack isn't quite tall enough - he can peer over the edge and see a bunch of coins in the machine - but has no idea what it does. He does know that the machine takes coins - and loves putting them in. When he won 100+ tickets today, he was ecstatic - pulling the tickets out and giggling to himself the whole time.

I carried both kids to the car on the way out. We have a Honda Odyssey mini-van (they might be cheesy, but they make awesome cars - spoken like a true dad, eh?). Holly opened the door with the remote. It stopped after opening a few inches - and I reached to open it manually. As soon as I got my fingers around the door, it shut. Youch! I screamed like a little girl. After a few seconds, Holly was smart enough to open the front door and I pulled them out. No dropped kids, which was pretty impressive. It's been a couple hours since then. It was only two fingers, but one is still numb. The good news is I'm still able to type - but they're still throbbing.

Posted in General at Feb 25 2006, 03:37:03 PM MST 7 Comments

MacBook Pro: Kicking ass and taking names

I received my MacBook Pro this morning, and I've spent the day setting it up, doing some development and running some performance comparisons. The setup was easy: I just booted my PowerBook into Firewire mode and copied over all the files I needed. Everything works for the most part. I did have some issues with IDEA and Eclipse, but got both working after doing a few try and try-again shenanigans. Eclipse was crashing when I'd browse to set my workspace; typing it in manually fixed the problem. IDEA hung the first time I opened it; killing it and restarting fixed the problem.

As far as performance, this thing fricken' rocks! Safari launches in under a second and you're browsing before the dock icons hits the top of its first bounce. Firefox is a different story (likely b/c it hasn't been compiled for x86) - it takes 10 seconds to launch. The good news is once it's up, there doesn't seem to be any performance issues. Safari is amazing though - the speed does wonders for GMail and it actually feels like a desktop application.

When I mentioned yesterday that I was going to compare the MacBook to my desktop, Rob Williams said it wasn't a fair comparison. I agree - but I really wanted this machine to be the best machine I could possibly buy. With my (very unofficial) performance tests, it appears like it is. It's faster than my dual-core AMD 64 desktop machine that has 3 GB of RAM. Now, I have had the desktop for a couple months, so it's possible I'm suffering from OS Rot, but still - it's impressive it keeps up. Here are the numbers from my Performance Comparisons page:

For the tests below, I used Java version "1.5.0_06" and had the following variables set: JAVA_OPTS=Xms256M -Xmx384M, $ANT_OPTS=-Xmx256m. I used the CVS version of AppFuse (1.9.1-dev).

ComputerOperationTime (mm:ss)
HP Pavilion a1250n with Windows XP Media Center (dual-core 2 GHz AMD64 3800+, 3 GB RAM)appfuse: clean package-web00:15
appfuse: setup test-all01:51
PowerBook G4 with OS X 10.4.5 (1.33 GHz, 1 GB RAM)appfuse: clean package-web00:30
appfuse: setup test-all03:31
MacBook Pro with OS X 10.4.5 (2.16 GHz, 2 GB RAM)appfuse: clean package-web00:12
appfuse: setup test-all01:28

A couple of interesting things to note:

  • When I first got my desktop, it's numbers were 00:14 for "ant clean package-web" and 01:29 for "ant setup test-all". The MacBook Pro? 00:12 and 01:28. The Windows box had 1 GB of RAM when I ran those tests, but no matter how I tweaked the memory settings once I put 3 GB of RAM in, I've never gotten better numbers.
  • My PowerBook has been dog slow for several months now. When looking up the OS X version on it - I noticed it lists the memory as 512 MB. WTF?! I've had 1 GB in it every since I first bought it! What happened? Did half my RAM go bad or did someone steal half of it during a repair? Oh well, at least I now know the reason it was so damn slow. ;-)

Conclusion: The MacBook Pro is one of the best machines you can buy (laptop or desktop) for Java development. As for the battery life? I'm still doing the "calibration", so I'm not quite sure. Nor do I care - I plan on having this thing hooked up to my 20" cinema display that Virtuas was kind enough to get for me. The display combined with a mouse, keyboard and iCurve is a very nice setup.

Update: I pulled out the memory from my PowerBook and put it back in. Upon reboot, it resulted in the correct (1 GB) memory setting. The numbers above appear to be accurate regardless. I ran some tests again and times were actually slower (maybe because I'm on battery power).

Posted in Java at Feb 23 2006, 05:20:14 PM MST 27 Comments

Dependency Injection with SiteMesh

Let me start off by saying I think that both SiteMesh and Tiles are great frameworks. I was a long time user and fan of Tiles, and I think it's appropriate for certain situations. However, I've been a heavy user of SiteMesh since it passed the 10 minute test. While most heavy users of SiteMesh (the Atlassian guys come to mind) say that it can do everything that Tiles can do, these features are largely undocumented. This is my attempt to document a cool feature.

In a site I recently helped develop, we needed a couple of features:

  • A tabbed menu that highlighted the current tab based on which page you were on.
  • A bunch of "panels" on the right sidebar that changed according to the page.

To make this work, we used the meta tag functionality that SiteMesh provides.

Funny side/related note, I just googled for this tag and found this howto, which is similar to this one.

In our pages, we added the meta tags to set the active menu, as well as which panels to show in the sidebar:

<head>
    <title><fmt:message key="authorList.title"/></title>
    <meta name="menu" content="Authors"/>
    <meta name="panels" content="administration,blogs,events"/>
</head>

Then, in our decorator, we interpret these separately. First, we used Struts Menu (with Velocity) for the navigation system:

<c:set var="currentMenu" scope="request">
    <decorator:getProperty property="meta.menu"/>
</c:set>
<c:import url="/WEB-INF/pages/menu.jsp">
    <c:param name="template" value="/template/menu/tabs.html"/>
</c:import>

The menu.jsp page takes "template" as a parameter so we display the same menu links using a different Velocity template (for example, links at the bottom of the page).

<menu:useMenuDisplayer name="Velocity" config="${param.template}" permissions="rolesAdapter">

Then our tabs.html Velocity template uses the "currentMenu" attribute to determine which menu to highlight.

## displayMenu is defined in WEB-INF/classes/globalMacros.vm
#macro( menuItem $menu $level )
  #set ($title = $displayer.getMessage($menu.title))
  #if ($menu.url)
    #if ($menu.name == $currentMenu)
      <span class="current">
    #end
      <a href="$!menu.url" title="$title"><span>$title</span></a>
    #if ($menu.name == $request.getAttribute('currentMenu'))
      </span>
    #end
  #end
#end

#if ($displayer.isAllowed($menu))
    #displayMenu($menu 0)
#end

As far as the panel injection goes, that's processed using the following logic in our decorator:

<c:set var="panels"><decorator:getProperty property="meta.panels"/></c:set>
<!-- No panels set, use default set of panels -->
<c:if test="${empty panels}"><c:set var="panels" value="different,partners"/></c:if>
<c:forEach var="panel" items="${panels}">
    <c:import url="/WEB-INF/pages/panels/${panel}.jsp"/>
</c:forEach>    

Since this site used WebWork, the <ww:action> tag made it easy to give each panel independence. That is, each panel could load on its own, supply its own data, and not worry about the data being prepared beforehand. Here's an example:

<%@ include file="/common/taglibs.jsp"%>

<h2>Author Blogs</h2>

<ww:action name="'authors'" id="authors" namespace="default"/>

<div class="item">
    <ww:iterator value="#authors.authors" status="index">
        <a href="<ww:property value="blog.feedUrl"/>">
            <img src="${ctxPath}/images/icons/xml.gif" alt="XML Feed" 
                style="margin-right: 5px; vertical-align: middle"/></a>
        <a href="<ww:property value="blog.url"/>"><ww:property value="name"/></a>
        <br />
    </ww:iterator>
</div>

Of course, now that you can use Tiles with WebWork, Struts, Spring MVC and JSF - you could use Tiles for the injection and SiteMesh for the decoration.

Now if we could just get someone to write a JSF Decorator for SiteMesh, like Erik Hatcher did for Tapestry.

Posted in Java at Feb 16 2006, 09:57:23 AM MST 6 Comments

Does JPOX suck?

There's an ongoing effort in Roller to migrate from Hibernate to JDO. Mostly, this is due to Apache's silly rule about no L/GPL dependencies - even if they're downloaded separately. I think this is a valiant effort, especially if JDO performs as well as Hibernate.

However, it was interesting to see the following message on the mailing list this morning:

i have experience using jdo, and jpox in particular, with a commercial product. first, you probably already know this, but jdo is dead (from a spec perspective anyway). it will be phased out in favor of ejb3 persistence. maybe that transition will be graceful, maybe not. i see jpox has ejb3 on their roadmap, but not sure what that means.

second, jpox has really, very atrocious performance issues. the jpox folks admit that performance is a low priority, as they are an ri. if someone wants the details on this, i can dig them up.

Interestingly enough, this message is from a Sun employee. It's interesting to hear someone from Sun say that "jdo is dead". What are you thoughts? Should Roller change their persistence backend just to satisfy Apache?

Of course, now you'll tell me your favorite Apache-licensed persistence framework and why it's worked so well for you. The real question is - are you willing to re-write Roller's backend using it? ;-)

Posted in Java at Jan 25 2006, 10:57:56 AM MST 31 Comments

Skiing in Colorado - it's looking good this year

The last couple of weeks have been frustrating. Actually, it's really been the last couple of years. You see, I live in Denver, Colorado - a city that's close to some of the best skiing on the planet. Furthermore, skiing here is pretty cheap. Starting about 10 years ago, all the resorts reduced their "season pass" prices from thousands to hundreds. You can get a ski pass to Keystone, Breckenridge, A-Basin, Vail and Beavercreek (5 mountains!) for a mere 350 bucks.

When Julie first moved here, we were pretty regular skiiers. We both got passes and went skiing almost every weekend. In 1999-2000, I worked for a .com that had a "9-inch" rule, where we got to go skiing whenever it snowed more than 9 inches the night before. This happened to coincide with one of the best ski seasons ever, and we managed to ski an average of 3 days per week (including weekends). Needless to say, I went from being a decent "black skier" to skiing chutes and bumbs with ease.

Then the kids came. The first year it wasn't so bad. When Abbie was first born, I had my first book deal, and I started AppFuse - so I didn't notice the winter pass me by. That was the first year I didn't buy a pass in quite a few years. The next year, I made sure to buy a season pass and barely got my money's worth (only skiing 5 times). I bought one again last year, and still only made it up 4 times. This year I didn't buy one.

For the last 2 weeks, I've gotten a 9" snow report in my inbox almost every day! It is dumping in Colorado this year and looks to be one of the best ski seasons ever. This year I'm planning on taking Abbie up with me, and getting her started on the "slopes." The problem? Why haven't I been up there yet? Work - how bad does that suck? And it's not real work IMO. It's open source and conference preparation. Ugh.

I need to get in shape, I need to find a client with a 9" rule - and I need to get to the hills! Ahhh, the good ol' days. I miss 'em.

Vail

Note to self: mountain biking and skiing should have a higher priority than any of this career mumbo jumbo. ;-)

Posted in General at Dec 02 2005, 07:54:55 AM MST 6 Comments

PowerBook won't boot after upgrading to 10.4.3

This morning, I began building a new user account for my demos tomorrow at NFJS. I'm doing this because the last time I did demos was a disaster. Since then, I've rebuilt my hard drive, and while things seem faster - a clean user account is the best way to get maximum efficiency. While building the new user, I was prompted by Software Update, and promptly installed Backup 3.0.1 and OS X 10.4.3.

After configuring a number of settings, I rebooted the machine. Now all I get is a gray screen with a dark gray apple on it. The damn thing won't boot. I rebuilt the disk with DiskWarrior, but no dice. Now I'm trying to repair permissions and all that jazz with Disk Utility.

Luckily, I can still boot off my iPod and I can always rebuild an external Firewire drive if I need to. However, I'd much rather get back to where I was this morning. There's nothing like hosing your machine the day before you really need it.

Update: I fixed the problem by reinstalling OS X with the "Archive and Reinstall" option. No data loss, time to backup.

Posted in Mac OS X at Nov 11 2005, 01:12:52 PM MST 6 Comments

Rocky Mountain Software Symposium

This afternoon, the Rocky Mountain Software Symposium returns to Denver for the final show of the year. Of course, this conference is better known as No Fluff Just Stuff, Denver. Lucky for me, I'll be presenting all my sessions tomorrow so I'll at least get one day this weekend to relax. It looks to be a good show, with lots of interesting sessions. Here's mine:

After the presentation class I attended last week, I think all these should be renamed. Unfortunately, I didn't have time to re-organize the presentations, but if I could change the titles, they'd be something like this.

  • Write better code faster with Spring and Hibernate, use AppFuse to simplify both
  • Make your webapps suck less by using Ajax
  • Use Spring AOP and Transaction Frameworks, because they're so damn easy

;-)

Update: PDFs of my presentations, as well as the Ajax demo is available from Equinox's downloads section. Make sure and view the README if you want to run the demo and see how to view the Ajax features.

Posted in Java at Nov 11 2005, 08:27:51 AM MST 8 Comments

Fixing your java.net project's homepage

If you're hosting your open source project at java.net, you might be annoyed by the fact that you can't disable the forums or issue tracker. The forums pretty much suck, mainly because there's no "remember me" on the site and it's a pain to click 3 times just to answer someone's question. They also don't have the ability to quote a previous message. In addition to the less-than-adequate forums, the issue tracker doesn't hold a candle to JIRA.

For the longest time, I've been wanting to remove both the "Discussion forums" and "Project issues" links from the AppFuse homepage. I asked the java.net folks, and they didn't have a solution. Finally, I thought of one on my own.

In case you didn't know - you can create a project_tools.html file in your project's www directory - which allows you to append items to the menu on the left site. Add a little JavaScript action and you can manipulate or remove items as well. Here's what I'm using to remove the link for the Discussion forums, as well as change the Project issues to point to JIRA. If you find any issues with this script, please let me know.

<script type="text/javascript">

function replaceLinks() {
    try {
        var tools = document.getElementById("projecttools");
        var links = tools.getElementsByTagName("a");
        for (i=0; i < links.length; i++) {
            if (links[i].getAttribute("href").indexOf("ProjectIssues") > -1) {
                links[i].setAttribute("href", "http://issues.appfuse.org/browse/APF");
                links[i].innerHTML="JIRA Issue Tracker";
            }

            if (links[i].getAttribute("href").indexOf("ProjectForumView") > -1) {
                links[i].parentNode.style.display = "none";
            }
        }
    } catch (e) {}
}

window.onload=replaceLinks;
</script>

Related: AppFuse and Equinox get some FishEye lovin'.

Posted in Java at Jul 29 2005, 02:39:36 PM MDT Add a Comment

Off to Big Sky Country

Holland Lake In only a few more hours, we're heading on Raible Family Roadtrip #9. Number 7 was when Julie, Abbie and I traveled up the California coast, and number 8 was when my Dad and I drove my '66 Bus to Denver from San Diego. This time it's going to be much more special. The end destination is my favorite place on earth. We're heading for the cabin, which is a log cabin my grandpa built in 1918. I was born in one corner, my sister in the other, and I spent the first 16 years of my life there.

Spending the 4th of July at the cabin has been a long standing family tradition. It's always fun to watch the parade and the O-Mok-See in the small town I grew up in. The Swan Valley is a very special place and my friends that visit often return. It really is one of those uniquely special places on Earth.

I love road trips. Julie hates them, but tolerates the fact that I love them. The main reason we're not flying to Montana is because the flights are very expensive. It's a 1 and 1/2 hour plane ride and a 15-hour drive in the car. It's a good thing we have a DVD system in our Odyssey for the kids - 15 hours is a heckuva long trip.

While I was at JavaOne last week, Julie did some research and discovered that Yellowstone isn't too far out of our way, so we're staying there tomorrow night. I've been to Yellowstone a few times, and every time it takes my breath away. I can't wait to see the look on Abbie's face when she sees an Elk right outside her window.

The best part about the whole trip? It's sure to be the family, laughing and creating memories. But I'm also going unplugged - which I haven't done in a while. For the next week, I'll be without a laptop and refusing to check voicemail or e-mail. E-mail is going to suck when I get back, but the peace of mind while I'm gone is sure to be priceless.

Posted in General at Jul 01 2005, 11:25:40 PM MDT 6 Comments