Wednesday, July 28, 2010

My First Major Memory Leak

Just over an hour ago, I encountered this initially frightening error: "OutOfMemoryError: GC overhead limit exceeded". I broke the garbage collector...woohoo!

Stumped about what might be eating up heap space, I immediately put my great Googling Powers™ to work, and soon found Eclipse Memory Analyzer (MAT).

Turns out I wasn't closing the ResultSets and Statements (?) properly. What a great program! All you have to do is generate a heap dump file from your exception-spewing program, feed it into MAT and it gives you a leak report, with charts and details. Very helpful!

Here's a great tutorial for using it: Eclipse Memory Analyser (MAT) - Tutorial. You don't have to download MAT as an Eclipse plugin (i.e. through the software updates window), you can download it from the site as a separate program.

Sunday, July 25, 2010

More Parsing Work

Since last week, I've started to integrate my reputation model with the system I'm working for. The end is in the sight, so my tasks are to finish integration, write a paper and short report and make a poster for the final day.

All I can say at this point is, thank goodness for regex generators and GNU screen!

Tuesday, July 13, 2010

Languages to Learn (when I have free time)

- Learn Python. Looks easy enough.
- Learn Ruby (on Rails). I've been interested in learning some kind of scripting language for a while now, and I was very inspired by a seminar I went to last semester, in which Paul Campbell talked about Ruby on Rails.
- Learn proper bash programming, since I fell in love with Linux...


The Mid-Term Research Day is finally over, it was fun to see the different slideshow designs and presentation styles! The three people who won definitely deserved it. Well done everyone!

Monday, July 12, 2010

Bad Thing

- Recursion. I was experimenting with it over the weekend (again, I am so exciting) and it completely locked up my machine. I suppose I wasn't being very careful, but how was I supposed to see whether it would work or not? ):

Now for a Good Thing:

+ Got some very constructive criticism from my supervisor about my presentation for tomorrow. I'm grateful to have a supervisor who's always interested and arranges weekly meetings.


The Mid-Term Research Day is tomorrow, good luck to everyone with their presentation!

Monday, July 5, 2010

ODCSSS Mid-Term Research Day Approaching + Anti-Procrastination Tips

The ODCSSS 2010 Mid-Term Research Day is fast approaching (12th @ B1.06), time to put together a set of shiny and informative slides, as well as brush up on my rhetoric and admittedly rather poor explanatory skills. For our Software Engineering Project III last year, I enjoyed putting together most of the slides.


z.ky's Anti-Procrastination During Programming Tips
  • Read Sophie's World by Jostein Gaarder (or any kind of philosophy 101), it will fill you with philosophical insight and help you think clearly. I spent all weekend holed up in my room reading up to Hellenism (yes, I'm very exciting), and enjoyed an extremely productive day today.
  • Make sure you know what you have to achieve, and how to go about it. Sometimes when I find myself completely stuck, it's because I don't actually realise what my next task is, or how to do it. The next point follows on from this!
  • Try planning on paper: dissect the architecture of your program, write down problems to fix/what to implement next, optimizations that could be made...don't spend too long poring over a notebook though, set a time limit so you can return to the screen without coming to a complete standstill while planning.
  • Surround yourself with other hardworking (I think everyone from the lab will laugh at this...) people for motivation.
  • If you work well under pressure (like me), remind yourself of all the people who believed in you and your work, and helped you get to this point - don't disappoint them! Think of deadlines which seem very far away...if you procrastinate more, they won't remain so far!
  • DON'T KEEP A BROWSER OPEN! Once you get on any sort of social networking/media site, the temptation to keep refreshing and waiting for updates (to procrastinate on) is immense. I was working so hard today that I forgot to check Twitter :P
  • If you're working with nice people, ask them to keep you on point by reminding you to get back to work. Sometimes it works better than telling yourself.

Remember: many minor (coding) breakthoughs lead to a big breakthrough! As long as you keep working hard, things will only get better (:


I just realised that I really hate my vocabulary and 'blogging persona' here...hopefully that will change next time.