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.

My tips o' the day

I found an easy way to update a MySQL database with new columns this morning. The traditional way is to create an ALTER_TABLE script and run it. However, I had added more than 30 columns, and creating this script sounded like a pain in the ass. Keep in mind that I use Hibernate to create my database from scratch - tables, and all. If you're familiar with appfuse, you might be able to use this stuff.

  • Dump the existing (production) database using "mysqldump -c database > database.sql". Edit this file, replacing CREATE TABLE with CREATE TABLE IF NOT EXISTS. The "-c" option includes column names in the insert statement.
  • Create an empty database (appfuse: ant db-init) and export (mysqldump database > create-tables.sql) it.
  • Drop all the tables in the production database (backup first!), mysql < create-tables.sql followed by mysql < database.sql.

Of course, other suggestions are welcome - I'd love to see a mysql diff tool that generates the ALTER script for me!

My other tip is how to start/stop Windows services from the command line - don't know why I haven't used this sooner.

net start "$serviceName"

Where $serviceName is something like "Apache Tomcat 4.1" - use "net start" to see all currently started services.

Posted in General at Sep 09 2003, 02:07:31 PM MDT 2 Comments

PowerBook G4 SuperDrive Upgrade

SuperDrive Upgrade I recently purchased a "SuperDrive" for my PowerBook from MacResQ. Here's the specs on this bad boy:

The PowerBook G4 SuperDrive upgrade is bootable and compatible with Apple's Mac OS X, Mac OS 9, iDVD, iTunes, Disc Burner, Apple DVD Player, Toast, and Retrospect. The drive reads at 24x, writes CD-R at 16x, writes CD-RW at 8x, and writes DVD-R/RW at 1x. A 1-year warranty applies.

Sounds pretty sweet right? To create a DVD (that Julie created in iMovie), we need to purchase iLife, which includes iDVD (which iMovie integrates nicely with, so I've heard). The problem? I went to the Apple Store today to buy iLife and I asked them about this DVD burner. They said that any third-party DVD burner will not work with iDVD. And if it does, it's illegal. So I asked, "If this DVD burner works with iDVD, who's breaking the law?" The tech retorted that both MacResQ is (for selling it) and I am (violation of the license of iDVD). Bummer. Do I care? Not really - I just want to know if iDVD will work with this drive?

If so, I'll buy iLife and be a happy little DVD-burning, software violating mo-fo - just like all the corporate workers who've installed their company's copy of Office on their home machine.

Posted in Mac OS X at Sep 06 2003, 05:22:35 PM MDT 4 Comments

[ANNOUNCE] Hibernate 2.1 beta 3 Released

View the Release Notes, or Download. I won't be upgrading struts-resume or appfuse until 2.1 is released. Not much reason for me to upgrade, since I probably won't use any new features in these projects, but what the hell - upgrading is fun (and unit tests make it a breeze).

Update on Sunday: Beta 3b Released. Here's why:

  • removed Hibernate built-in PreparedStatement cache
  • made Hibernate.close() static

Posted in Java at Sep 06 2003, 11:51:29 AM MDT Add a Comment

JSTL, XPath and the State Tag Library

One of the projects I'm working on has a requirement to assign a user's permissions by state. I'm using the state tag library, which makes it very easy to make a drop-down of states. So, rather than creating a "states" table in the database, I wanted the ability to lookup state's abbreviations and full names in the tag library (since only abbreviations are stored in the database, as a comma-delimited list). So I used JSTL's XML tag to capture the output of this tag and then filter the states with XPath for the user's assigned states. Pretty slick IMO.

<label>Viewable States</label>
<%-- Sets the available states so they can be parsed with XPath --%>

<c:set var="statesHTML">
    <state:state name="state"/>
</c:set>

<% 
    // fake it for demo - real version has these as a bean property
    String[] states = {"CO", "AZ"};
    pageContext.setAttribute("userStates", states);
%>

<x:parse var="states" xml="${statesHTML}"/>
<%-- Loop through and parse the list of states --%>
<x:forEach var="option" select="$states/select/option">
    <c:forEach var="current" items="${userStates}" 
        varStatus="status" >
        <x:if select="$option/@value[. = $current]">
            <x:out select="$option/text()"/>
            <c:if test="${!status.last}">,</c:if>
        </x:if>
    </c:forEach>
</x:forEach>

Posted in Java at Sep 06 2003, 11:43:57 AM MDT Add a Comment

Log4J: 2 Appenders - one gets errors, other gets all (doesn't work)

I sent a message to the log4j-user mailing list this afternoon, but have not received a response - so hopefully someone can help me out. Here's the problem I'm having:

I have two appenders - a console and a file.  I want all messages to 
go to the console and only <= error to go to the file.

In my file appender, I have a filter to only get the error messages:

<filter class="org.apache.log4j.varia.LevelRangeFilter">
  <param name="LevelMax" value="ERROR" />
</filter>

Then in <root> I have:

  <root>
    <level value="DEBUG"/>
    <appender-ref ref="CONSOLE"/>
    <appender-ref ref="FILE"/>
  </root>

From the documentation I've read (i.e. http://tinyurl.com/meef), this
*should* work.  However, all messages get logged to both the console
appender and the file appender.

Any advice is appreciated.

Posted in Java at Sep 05 2003, 10:11:38 PM MDT 6 Comments

I dig Dave's New Look

Dave, I dig your new Bluebar Theme. Very nicely done - now if I could just get you to make "Blogging Roller" into a link with the same href as "Home." I constantly click on it with no results. That goes for all Roller users - please make the title text or image of your blog into a link. Here's how:

<a href="$ctxPath/page/$userName" title="Home">Your Title Here</a>

Posted in Roller at Sep 05 2003, 05:18:13 PM MDT Add a Comment

Dual Monitor Video Card

Found this daddio from some co-workers today: GeForce4 MX440 64MB DDR 4x AGP Card w/Dual VGA. All for a measly $36.55. Now if they only made one of these for laptops. I'd love to make my next computer an Intel-based PowerBook, but you can only plug in one additional monitor to a laptop - I'd love to have dual.

Posted in General at Sep 05 2003, 11:27:52 AM MDT 2 Comments

iCal for Denver JUG

I am once again gripped with that emotion - "there's not enough time in the day!" I wake up at the ass-crack of dawn and still can't seem to get everything done that I need to. So I began planning my days and writing down "to do's" for each day. I'm using iCal for the time being, with Outlook and Yahoo's Calendar in my back-pocket if this doesn't work out. As a small experiment, I created the Denver JUG's upcoming meeting list as an iCal. Feel free to subscribe, I don't plan on deleting it.

Posted in Java at Sep 04 2003, 10:09:27 PM MDT Add a Comment

How to run Tomcat on Port 80

I've had people ask me how to run Tomcat on Port 80 before (as a non-root user). I've never had an answer until now. Today I found that Holger Klawitter has a solution using Kernel space port forwarding. I don't have a need to try this at the moment, but if someone is using it - please share your experiences.

As an FYI, Tomcat 5 will use commons-daemon making this much easier to do. Also, the first Beta of Tomcat 5 (5.0.9) has been released.

Posted in Java at Sep 04 2003, 09:45:16 AM MDT 8 Comments

Good CSS Design at Lee Jeans

Russ reminds us why Web Standards are cool:

From Zeldman which I just recently added to my aggregator, I just saw this great awesome article on how the XHTML/CSS design was created for the new Lee Jeans - One True Fit website.

The overview is short and to the point and gives links to all the tricks used on the page to get the design desired. Adding ?style=false to any of the page's urls will show the non-css markup. The difference is astounding. I'm more and more amazed at the power of a good designer and CSS every day.

This article is very elegant in explaining how CSS and XHTML can simplify your life. I'm a huge fan of web standards and (luckily) have been able to convince most teams/clients to use them in the past couple of years. Just to remind you how easy it is to write XHTML, check out the New York Public Library's XHTML Guidelines.

On a related topic, I've had a few folks ask for my wiki's theme recently. So here it is. Enjoy!

Posted in The Web at Sep 04 2003, 08:24:08 AM MDT Add a Comment