Archive for the ‘ Software Development ’ Category
When I first started coding I believed it was good enough to get stuff working, and then move on to solving the next problem. I’d spend a little time designing, but most of my time implementing and testing. My primary concerns were correctness followed by efficiency. I didn’t see the point in re-factoring code until [ READ MORE ]
Fixing bugs is a good way to learn a new code base. You often go through the procedure of understanding the high level software architecture, and are then given what appear to be fairly straightforward bugs, however, if the nuances of a system are not understood you will end up introducing more bugs than you [ READ MORE ]
Everyone once in awhile I get have to go for coding mode to designing and writing HTML and CSS for an internal tool or translating it into Velocity. I’ve learned to use Firebug to debug most HTML and CSS issues. Lately, I’ve been running into table formatting and layout issues, here are few tags and [ READ MORE ]
I’ve written a couple of posts recently on Lazy Loading, and some of the issues relating to how Hibernate creates and manages proxies. While lazy loading itself is meant to improve performance, it can still lead to exceptions caused by objects being detached from their session. As a web service becomes more distributed, and the [ READ MORE ]
In my previous post: ClassCastException is a Proxy Problem I talked about how Hibernate tries to optimize the loading of objects by lazily fetching the parent class object, and returning a proxy for the subclass instead of the actual subclass, thus causing a ClassCastException when the proxy is cast to the actual subclass. The proxied object doesn’t contain member [ READ MORE ]
I often face the following exception in Hibernate not on my local developer machine, but in production across several servers: java.lang.ClassCastException: mint.hibernate.MathCourse$$EnhancerByCGLIB$$ed898f0d This happens when I try to do something like this: Set<Courses> courses = getCoursesDao().getCourses(userId); for (Course c : courses) { MathCourse mc = (MathCourse) course; // do something with mc } Assume MathCourse is a subclass of the abstract [ READ MORE ]
Last week I attend the Percona conference in Santa Clara. The purpose of this conference was to talk about performance related to databases specifically mySQL. Most of the talks went over my head. However, there was one talk I attended “Website on Speed” by Philip Tellis from Yahoo! that I thought was outstanding. In his [ READ MORE ]
In my previous post Cheap Tricks to Fullfill Your Need for Speed, I talked about how you could reduce the memory footprint of your data base query by using a SQL query instead of a Hibernate query, and retrieve only the columns that are you need. However, there maybe times when you actually want to use [ READ MORE ]
As I’ve mentioned countless times, the performance of a website can really make or break a user’s experience. Everyone places emphasis on tuning and sharding databases, and buying multi-threaded and multi-core processors. These are all viable solutions but they are either pricey or labor intensive. So what are some quick and clean ways to improve [ READ MORE ]
Part I: Principles of Debugging As fate would have it I run into fellow developers all over the world. For example, I traveled all the way to Buenos Aires to study Spanish and get away from the tech-centric bay area and its ubiquitous engineers; ironically on the first day of my Spanish class I sat next [ READ MORE ]