Matt Luongo is a graduating computer science major at Georgia Tech focused on artificial intelligence, networking, and software engineering. He works as an undergraduate assistant for the College of Computing's Technology Services Organization in support of the College's academic resources.
CXF Servlet Issue
Earlier today I ran into a weird error deploying my CXF web service to an embedded Tomcat instance. The error looked a bit like this.
... SEVERE: Servlet /myServlet threw load() exception java.lang.ClassCastException: org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.servlet.Servlet
Annoying. I've seen this before, but never actually had to solve it myself. I figured that my web.xml was misconfigured, but on checking it out, everything seemed fine.
Writing a Graph DBMS in Python
Coinciding with another project of mine, I've decided to design a graph database management system. In Python.
Why in the world would I want to do that? There are a number of solid graph databases out there. What do I hope to accomplish?
Primarily, I'd like to learn. Database systems require developing with a much keener eye toward performance than I'm used to. Beyond runtime and memory optimization, I'll need to constantly juggle I/O time. Revisiting hard drive geometry will be painful, but there is a certain thrill you get from understanding your application's performance to that level, and I plan to chase it.
Python: Not Quite Functional
I ran into an interesting error today scripting at work.
fun = lambda x : print str(x)The above Python code threw a syntax error, which took me a while to work out. To the Pythonista who keeps up, the problem is obvious: lambda functions only accept expressions, not statements. For those less familiar with functional programming, the difference between the two is that expressions can always be evaluated, while statements only yield side effects. In Python prior 3.0, 'print' is a statement, and returns no value, similar to 'while', 'for', and other built-in constructs.
def p(x): print str(x) fun = lambda x : p(x)
This time, the code runs. Why? The function p(x) doesn't explicitly return a value; instead, it implicitly returns 'None'. Unlike traditional imperative languages, Python doesn't draw a distinction between functions and 'procedures'- every function must return.




