April 3, 2008
(Note: I'm cleaning up some old drafts which have been sitting around for awhile.)
A couple of years ago while setting-up a new J2EE server cluster using the Implementing Multitier Hardware Load Balancing with ColdFusion MX for J2EE or JRun article, I needed to setup a proxy filter for ColdFusion requests. Given that the application I was setting up used a context root of /, the proxy rule listed in that article would not work. Instead, thanks to my former co-worker Rod, I now have a regular expression which will redirect all basic requests for ColdFusion:
-
^((?:\S*.cfml?\S*)|\S*/(?:\?\S+)?)$
This regexp works for the following combinations:
-
hello.cfm?hello=2
-
hello/
-
sadfa/
-
dasd/?hello=231
-
xo.cfm/hello
-
hello/dookie.cfm
-
dookie/hello.cfm?thisvar=dookie
-
/
And the following requests are not proxied:
-
/hello.html
-
hello.html
-
hello/hello.html
Obviously these are just basic test cases, but it should leave all CSS, image, JavaScript, etc. type requests to the webserver, and pass on everything else to the app servers. You would also need to change it to include direct requests for .cfc files if you're doing anything like Flash Remoting, Web Services, etc directly to CFC's.
April 2, 2008
Currently, my main workstation at home is a Dell Dimension E520 which primarily runs Ubuntu 7.10, but I also dual boot into Windows XP for my photography hobby. One problem I had after upgrading to Ubuntu 7.10 from the default Ubuntu install which the E520 shipped with was getting sound to work. After trying several solutions in this forum thread, I finally got it working again.
March 4, 2008
Filed under: ColdFusion, Culture, Disciplines, Django, Frameworks, Java, Languages, Python, Ruby, Ruby On Rails, Software Engineering, Tech News As both a fan and user of the great technologies Python, and the Sun JVM (primarily via Java),
I was very happy to come across this eWeek article which says that Sun announced the hiring of two key Python engineers. You can read more about the hiring of Ted Leung and Frank Wierzbicki at their respective blogs.
I had pretty much written off Jython as being dead quite some time ago, but luckily it has had a lot of recent activity and is starting to catch back up with C-Python. By both hiring key JRuby and Jython developers, it looks like Sun is making sure the JVM stays relevant beyond Java and continues to evolve as what in my opinion is the best option for cross-platform applications.
Having a long background in ColdFusion (an Adobe language which compiles down to Java bytecode and runs on the JVM), I've seen first hand the benefits of moving a language to the JVM, and I look forward to seeing more progress on both JRuby and Jython on the JVM.
February 26, 2008
Filed under: Apache HTTPD, Apache Tomcat, Culture, FreeBSD, JBoss, Linux, MySQL, OS X, Operating Systems, PostgreSQL, Servers, Tips, Hacks, & Tricks, Windows This is just a quick entry on how to see which software is using which ports. This comes in handy when trying to install an application server, web server, etc, and are getting errors like "port is in use".
Basically in any Unix type derivative such as Linux such (Ubuntu, RedHat, SuSe, etc.), as well as Mac OS X, all that you need to type this at the command line:
-
lsof -i
I remember there being a couple of commands in Windows which you could do this with, but it's been so long since I've used Windows on a regular basis I honestly don't remember how to do it. I do know you can use TCPView to accomplish the same thing, however.
February 18, 2008
It seems like for at least a couple of years now, I've had problems when trying to login to newegg.com with Firefox. Across different installs of Firefox, on Windows, OS X, and Linux, etc.. no matter what I tried, Firefox just didn't work at all. Today after my typical google search session, I did find a couple of solutions which took quite awhile to track down. If you're having problems logging into to Newegg, give these a try:
Easy solution:
In the address bar of Firefox, type:
-
about:config
Search or scroll down to the section called "network.http.sendRefererHeader" and change this value to 1.
For some reason, this was set to 2 on my machine.
Annoying solution:
Something is probably corrupt in your Firefox profile. Given that you're the type of person who shops at newegg, AND uses firefox, you can probably figure out how to create a new profile on your own.
Anyhow, give those a try and see if they work. It's nice to be able to shop on Newegg again with Firefox!
February 7, 2008
Oof. The site was offline for a good 30 hours or so. I attempted to add a Ruby On Rails install to FastCGI for a family related project I've been working on and my server totally exploded.. even the file system became unreadable. It reminded me a lot of a 'buildworld' upgrade gone awry on FreeBSD. I think the Debian VPS image was so out of date that it ate itself trying to process all of the updates. Since that happened I decided to move to a shiny new Futurehosting Ubuntu VPS which is bigger/better/faster (1 GB of RAM now, previously 512 MB) and I can already tell that this machine is much faster than the past.
After having to learn a lot of MySQL DBA magic to repair some very broken databases in my backup, get DNS, Apache, MySQL, and all of that other sort of junk setup again, the site is finally back up with no data loss much to my surprise.
I'll be working on getting my other sites back online as well as upgrading/updating everything, and hardening this server a bit more, so if you see any blips over the next few days that's why.
January 30, 2008
Filed under: A Day In The Life Of, Culture, Frameworks, Hibernate, JBoss, Java, Languages, Maven, Servers, Spring, Tips, Hacks, & Tricks, Tools I'm going to skip over a rant about how much Axis2 sucks in order to pass a tip on how to include Axis2 artifacts (AAR's, MAR's, etc) into an EAR file using the Maven plugin to package EAR files, maven-ear-plugin. It's a pretty obvious solution but if you're in a hurry like I've been to convert a project from a single WAR to one with several EJB's, a WAR, etc, there are a lot of new things to learn all at the same time (how classloading works with EAR's in JBoss, how to share the same Hibernate transactions between your web app and EJB's, etc), and this was one of those little things which wasn't immediately obvious. If you're seeing exceptions like these when trying to package an EAR in Maven:
-
[INFO]
-
------------------------------------------------------------------------
-
[ERROR] BUILD ERROR
-
[INFO]
-
------------------------------------------------------------------------
-
[INFO] Failed to initialize ear modules
-
-
Embedded error: Unknown artifact type[mar]
-
[INFO]
-
------------------------------------------------------------------------
-
[DEBUG] Trace
... you've came to the right place.
There are many ways to setup your package structure under Maven2 to build EAR's, but essentially what I do is create a root level project which packages a given application into an EAR, and nothing more. Once you have the maven-ear-plugin setup for the most part, all that you need to do is to tell the Maven EAR Plugin to treat the various Axis2 pieces of shit packages like JAR's:
-
<plugin>
-
<artifactid>maven-ear-plugin</artifactid>
-
<configuration>
-
<archive>
-
<manifest>
-
<addclasspath>true</addclasspath>
-
</manifest>
-
</archive>
-
<artifacttypemappings>
-
<artifacttypemapping type="mar" mapping="jar"/>
-
<artifacttypemapping type="aar" mapping="jar"/>
-
</artifacttypemappings>
-
</configuration>
-
</plugin>
This is just one of many gotcha's I learned about while working on an aforementioned project. In fact it's really pretty hard to find any comprehensive documentation on getting EJB3, Spring, and Hibernate working together on JBoss with a typical Java web application, especially while using Maven. I have a sample project I used to work through some of the integration issues with this, and will hopefully be able to wrap it up and add it to Google Code in the next few weeks to provide an example of getting all of these technologies to play together.
December 14, 2007
UPDATE: I was up too late, and didn't notice that it's update 6 for Java, not Java 6. This is just another update for Java 5... *sigh*
I've been up pretty late doing a little work and tying-up some last minute Christmas shopping, and out of the blue this Apple update window popped-up:

I'm super glad to finally see an Apple release of Java 6! I've been developing with SoyLatte lately and was going to write a quick tutorial on how to get it up and running on MacOS X, so I guess I don't necessarily need to do that now. Although given Apple's secrecy about Java releases and the future of Java on MacOS X, it certainly doesn't hurt to have an alternative around.
I'm still on Tiger-- I assume Leopard users are seeing this update too?
December 6, 2007
Filed under: Disciplines, Java, Languages, OS X, Operating Systems, Software Engineering, Tech News, Tips, Hacks, & Tricks For those many of you (including myself) who have been waiting almost a year now for Java 6 to be properly supported on the Mac, the wait is over if you're a developer-- Landon Fuller has released SoyLatte 1.0, which is a port of FreeBSD Java 6 to MacOS X which will eventually end-up as part of the OpenJDK. This seemed to come together very quickly once Leopard came-out and was missing Java 6.
Though Java 6 didn't provide quite as much new syntactic sugar as Java 5, the performance increases in Java 6 are pretty dramatic. I highly recommend giving Java 6 a look if you're doing any development which runs on the JVM if you haven't already switched.
Keep in mind that this is mostly a developers port as it's not yet integrated into Cocoa, the MacOS X native GUI. Desktop applications will run under X11, but this is the next hurdle to tackle (though it seems to be a pretty big one).
November 1, 2007
Filed under: Algorithms, Computer Science, Culture, Data Structures, Design Patterns, Disciplines, Software Engineering, Tech News, Tips, Hacks, & Tricks Having came across several interesting stories within the past week or two which were all career related, it reminded me of all of the good resources I've came across over the past few years related to the craft of Software Engineering. Maybe you're just looking to get started in Software Development and aren't sure if it's for you, or maybe you're a manager wondering why your employees are leaving-- all of these items and more are covered here.
1. Getting Started
Not sure if you were cut-out to be writing code for the rest of your days?
Are you feeling different than your peers? Justin James wrote an interesting list-- 10 signs that you aren't cut-out to be a developer.
Now that you've decided you are genuinely interested in becoming a programmer, there are many, many ways to go about this. If you don't have any idea what direction to head to, a good starting point is Getting Started in Programming.
2. Get Your Resume In Shape
Resumes are yet another major thing to get right. A resume is what can get your foot into the door into the company of your dreams, or put you in an infinite job search loop with very little feedback. There are many opinions and guides to creating the perfect programming resume, and here a couple which I've found to be the most helpful are Writing a Resume That Will Land You a Programming Job and Resume Pitfalls Every Programmer Should Avoid. Most programmers are notoriously bad at presentation and should also think about giving their resume a face lift. It also might not hurt to take a look at the 100 most searched for resume keywords and add them to your resume if they match your skills and experience.
3. Starting your Job Search
One of the best ways to get jobs is to reach-out and network with people you know to see what jobs they know about. The most natural and unobtrusive way to do this is to sign-up for LinkedIn and import your address book.
A good way to see what sort of jobs are out there and what the market is like is to use a job aggregator and search engine like indeed.com. There are also some other sites to take a look at which it doesn't have permission to index such as craigslist. You may also find out about jobs through local mailing lists or user groups. You could also check into companies that you like and are interested in by going to their website and seeing if they have any open positions which fit your skills and experience.
There are of course many large and popular job sites which you might want to hit individually if you aren't finding what you're looking for via indeed.com-- sites like Monster, HotJobs, and Dice are all good places to start.
4. Prepare For The Big Interview
If you've been in the industry for awhile you know that what you can expect during the interview process is it being completely unexpected. There are a wide variety of interview techniques used by companies, and none of them seem to be the same. I think one really good overview on what to do is Preparing for a Software Engineering Interview. While that is a good overview, you have to prepare for a very wide variety of questions. Here are a lot of resources to prepare you for an intense Software Engineering interview process including some general interview tips as well:
- How To Pass a Silicon Valley Software Engineering Interview
- Google & Microsoft Algorithm Questions
- 50 Common Interview Questions & Answers
- Everything You Wanted to Know About Getting a Job in Silicon Valley But Didn't Know Who to Ask
- Programming Interview Questions
- Developer Job Interview Questions and Answers - This is probably the most exhaustive list of technical questions I have ever seen!
- How To Answer 23 Of The Most Common Interview Questions
- Answers To Technical Interview Questions
- Questions At A Google Job Interview
- IT Interview Open Questions Database
- "Why Should I Hire You?" and Other Favorite Interview Questions
- How To Answer The Toughest Interview Questions
- Five Essential Phone Screen Questions
- 25 Most Difficult Job Interview Questions (and their answers)
- The Top 10 Questions Every Programmer Should Ask on a Job Interview
Although you should be prepared for a wide variety of potential interview questions, you should also be prepared to ask plenty of questions of your own. Bruce Eckel provides a good list of questions which you should ask during an interview, and you should also be prepared to take some ownership during the process as well.
You should also make sure to dress appropriately for an interview-- it is not the time to break-out your DEFCON 1999 shirt, nor should you make an unnecessary trip to your local department store for a suit. Unlike most other white-collar professions, you are actually at a disadvantage if you wear a suit to an interview, but you should at least take the time to clean yourself-up and look like a well adjusted adult.
If you happen to be on a team trying to land a new developer and you experience great candidates turning you down over and over again. One thing to be conscious of is how poor interviewers drive away talent.
If you didn't get the job, it wouldn't hurt to read 25 Reasons You Didn't get the Gig to brush-up on your interviewing and presentation skills before you give it a try again. Or maybe it's just a sign that you're ready to start your own company or do freelance work from home, there are plenty of reasons you don't need a job.
5. Got The Job? Improve Your Situation
There are many things you should be doing to improve your career and general well being even while employed. For one, you should always continue learning-- whether this be new languages, frameworks, or even learning more of the classic Computer Science topics in depth, don't forget to prevent yourself from becoming stale. The one constant about technology is that it's always changing, and you will need to keep-up on your own time to stay competitive.
At the same time, being the master of a particular domain is not all it's cracked-up to be-- make sure you spend plenty of time outside of programming as well for a balanced life. I try to learn as much about as many topics as I can, and from time to time find some interesting lessons in life you can later apply to what you do. Travel to new places, try things you normally wouldn't do, try new cuisines, and in general find ways to grow your mind.
Programmers aren't known to be the most extroverted, gregarious people in the world (myself included), but you should make an active effort to meet new people in your field. Whether that be at user group meetings, conferences, chat rooms, mailing lists, message boards, etc, you'll find that having connections in the industry is a very good thing to have. I've mentioned it before, but LinkedIn (no affiliation other than a user of their service) is a really great place to keep in touch with your network.
A topic that many programmers overlook is budgeting and investing-- we've all been guilty of it at one time or another! It's easy to be wasteful when making a decent salary as many software developers do. Here are a few resources which will help you get a handle on your money and start making it work for you by doing more with less, and investing more:
- 15 Ways To Keep More Of Your Money
- The Spending Plan: Budgeting for Non-Budgeters
- 9-Step Beginner's Budget
- Healthy Food on an Unhealthy Budget
- 2006 Makeover, Step #2: Budgeting and Saving
- How to Create a Zero-based Budget
- Budgeting For Non-Budgeters
- 50 Smartest Things To Do With Your Money
- Where to Put $5,000 Now
- How To Save $1 Million For Retirement
- How To Invest $20, $100 and $1,000+
- 20 Investments: Introduction
- MoneyChimp: learn Stock Market Investing, Index Funds, Valuation Models, and more.
6. All Things Must Come To An End
Once you've been in a job for awhile, it's pretty much inevitable that you will leave for greener pastures for a variety of reasons, or be forced to move for various reasons. You might even find yourself alone after many of your co-workers leave via a mass exodus in which management has no control over. If you feel that you're in a salvageable position, some links which might help you analyze what the problems are in hopes of fixing them include:
- Why Top Employees Quit
- 50 Ways a Manager Can get Employees to Quit
- How To Lose Half of Your new Hires Within A Year
- Managers fail to find out why employees leave
- 1/5 Employees Quit Within The First Two Years
- Why Great Employees Quit, And What You Can Do To Keep Them
- Top 10 Reasons People Quit Their Jobs
Perhaps you're tired of your job for various reasons and are weighing whether or not you should stay? A couple of articles which might help you make the decision on what to do include What To Do When the Thrill is Gone and Do I Stay or Do I Go.
Although this is quite an exhaustive list which took me quite a long time to write about and assemble, I'm sure I've missed plenty of tips or resources to pass-on. If you have any to add, be sure to leave them in the comments!
Thanks to Flickr user McBeth for the perfect photo.
devnulled is a blog which caters to software development related issues with a bit of a pro-unix slant. devnulled has been featured on Slashdot, Digg, the Indeed Blog, O'Reilly Hacks, and del.icio.us/popular.
Brandon Harper, the author behind devnulled,
is a Pragmatic Software Engineer primarily working with Java and ColdFusion, but also dabbles in Python, Ruby, FreeBSD, and Linux. He's been
programming since age eight, professionally for over nine years, and has been been published in various industry publications and popular websites.
Brandon also enjoys music, politics, command prompts, and things with wheels a wee bit much.
EMail Subscription
Recent Entries
- A Regular Expression To Proxy Basic ColdFusion Requests
- How To Fix Sound Problems In Ubuntu 7.10 Gutsy on Dell Computers
- Getting Behind Python: Sun Hires Python & Jython Developers
- How To Display Which Processes Are Using What Ports
- Can’t Login To Newegg in Firefox? Here’s How To Fix It…
- Aaannnddd… We’re Back
- Maven: Including Axis2 Artifacts into EAR’s
- News Flash: Apple Finally Released Java 6 for MacOS X!
- Java 6 for Developers on MacOS X: SoyLatte Reaches 1.0
- Advice For Managing Your Career: 50+ Resources For Programmers & Software Engineers
- Just Installed MadKast - Blog Sharing Made Simple
- Farewell CFDJ: My Last Year on the Editorial Board in Review
- Dilbert Groks Java
- How To Stop The Creation of .DS_Store Files
- Interesting Details About the Space Shuttle Operating System
- How To Show Hidden and Protected Files in OS X Finder
- Me.dium Now Open To The Public– Announces IE 7 Support & New Widget
- Development in Mac OS X: How To Fix the Lame Default Font in Eclipse
- How To Repair User Permissions In Mac OS X
- Dell Dimension E520 With Ubuntu Linux Review

Posted By:
Link
Comments (2)