About Chris Bunch

September 5th, 2007

I’m Chris Bunch, a student assistant at “Central IT” at Cal State Northridge, and I’d like to build on Ryan’s excellent summary of why this is here with my take on it. Over the last year here at CSUN, the three of us (you’ll see some of Brian’s work someday soon) have had a “unique” experience dealing with the ramblings of IT. We try to maintain a large amount of legacy code written in OCaml, a functional programming language. We’ve seen it used for many things that I never thought I’d see a functional language used for, and in some certainly unique ways.

Now I’m not saying that OCaml sucks, or that functional languages shouldn’t be used for things like web pages or identity management, as it apparently worked fine for everyone who worked at Central IT before us. It’s just the way it was done and the lack of information that was handed off to us that leaves us in a rut whenever shit breaks. In fact, to someone who lacks the thorough knowledge that can only be gained by programming it ourselves or having a complete knowledge transfer, these applications appear to be simply Byzantine at times (told you it was a real computer science term guys!). That pretty much captures the essence of it from my side, but I’ll write more when I become dissatisfied with this later.

Anything I write on here I also have on my personal blog; check it out if you like!

What is the deal with not using HTTPS?

September 5th, 2007

If you are running an enterprise application that authenticates a user for any reason, YOU NEED TO USE HTTPS! I’ve been irked lately by the large number of companies that have customers (or users) log into their accounts where things of great security are kept (social security numbers, credit card numbers, etc.), but send everything you would need to get to them over cleartext.
Read the rest of this entry »

HTTPS, Tomcat and Load Balancers.. Oh My!

August 22nd, 2007

During the implementation of a new servlet application on Tomcat we encountered an HTTP/HTTPS issue during redirects. The user would browse to a servlet via HTTPS, through a load balancer that handled SSL decryption, and during the execution of the servlet, they would be redirected to another URL. However, that redirect would be generated as a fully qualified HTTP address. This poses a problem. The page was originally requested as secure content, and the user is redirected to an insecure URL. Ultimately, the user sees a security warning. We figured it out by using the Tamper Data Firefox extension.
Read the rest of this entry »

Converting Simple OpenGL Code from C++ to Perl

August 22nd, 2007

Over the last few weeks I’ve been trying to learn OpenGL. However, I’ve had a miserable time trying to get various implementations of it to work on my Mac, notably with C++ and Java. I was surprised to learn that installing the Perl OpenGL implementation (or POGL) is pretty simple, and that converting OpenGL code written in C++ to Perl is also reasonably easy. The following is a heuristic method you can use to do the same, using an example from the OpenGL SuperBible by Richard S. Wright, Jr. The code is freely available from his site at http://www.starstonesoftware.com/OpenGL/, and feel free to use my Perl conversion of his code.
Read the rest of this entry »

IRC Notification Bot

August 20th, 2007

This was a fun little side-project we used to relay messages into IRC from linux servers when certain events occurred. The specific case was for Tomcat restarts. We wanted to know when startup.sh and shutdown.sh were executed. This would allow the helpdesk or the NOC to be notified if Tomcat was restarted inappropriately.

I used PircBot from Jibble, configured by Spring, to take inbound messages from a server and translate it into an IRC post within one or more channels.
Read the rest of this entry »

About Halycon

August 19th, 2007

How much time does one programmer spend researching problems and errors instead of actually coding? Sometimes we spend all day troubleshooting some issue, searching for salvation among the limitless lines of documentation, websites, and blogs — often with little success. On occasion, we strike upon a particularly good solution. So, as much as this blog a chance to help others in a similar situation, it’s as much a way for us to document our own challenges for future reference.

So what’s “Error:Success”? It’s a example of a beautifully vague error message generated by some applications we’ve had the pleasure of working with. Usually this error means that no error occurred, or does it? That’s the fun of it! You just never know…

Our main hope is that our trials and tribulations help someone out there, and if not, simply documenting them may save ourselves hours of re-research.

Building A Better Spring Action

August 19th, 2007

One thing that still confuses me about Spring’s Action classes is the lack of implicit access to the MessageSource. If you’re using Spring’s MVC or Spring’s WebFlow, you’ve undoubtedly used a MessageSource to define localized messages and errors, but you have to go out of your way to access it. Additionally, I needed every class to have access to my Log4J configuration and the ability to print the contents of a stacktrace. So I extended the AbstractAction, FormAction, and MultiAction classes to provide these features to all of my classes:
Read the rest of this entry »

Errno 24: Too many open files

August 19th, 2007

During a load test one day, we started getting the error “Too many open files” in our logs. Well, to be exact, we received a lot of errors that seemed unrelated, however, just before the spew of errors there was one slapd error that stated “Too many open files.” Turns out that each shell has a limited number of filehandles available to applications running within that session. To resolve it, we used the “ulimit” command within *NIX to increase the number of handles, and restarted slapd.

  1. Stopped LDAP (slapd)
  2. Executed “ulimit -a” to view current limit
  3. Executed “ulimit -n <number>” to increase the limit
  4. Restarted LDAP (slapd)

After doing that, our load tests ran smoothly.

Why another blog, and why Error:Success?

August 19th, 2007

How much time does one programmer spend researching problems and errors instead of actually coding? Sometimes we spend all day troubleshooting some issue, searching for salvation among the limitless lines of documentation, websites, and blogs — often with little success. On occasion, we strike upon a particularly good solution. So, as much as this blog a chance to help others in a similar situation, it’s as much a way for us to document our own challenges for future reference.

So what’s “Error:Success”? It’s a example of a beautifully vague error message generated by some applications we’ve had the pleasure of working with. Usually this error means that no error occurred, or does it? That’s the fun of it! You just never know…

My only hope is that our trials and tribulations help someone out there, and if not, simply documenting them may help us in our future endeavors.