Closet...
...اینجا می‌نویسم برای اینکه یادم بمونه... تا راحت‌تر فراموش کنم
Monday, March 07, 2011
Necessaries

PS. Finally I moved to the new system. Let's get back to work!

Labels: , ,

Thursday, February 03, 2011
Some random notes on the art of debugging (of numerical codes) - Part 1

- Consistency is the key. Start small. Write 1D version first, test it and when it was OK move to higher dimension codes. It's much easier to debug in 1D than 2D. Your 2D code should do the exact same thing as your 1D code if you feed it the same emulated 1D data in 2D format. This is the same for 2D to 3D expansion.

- Try the naive test cases before running your big-bang simulation. Zero state, unit state and well-known physical special conditions are good starters. If your method is symmetric, definitely test for the conservation of symmetry on symmetric initial condition. Think about special conditions that only test a special part of your code. Be creative.

- If you are going to test the order of convergence without comparing with exact solution, that is using some sort of three level Richardson extrapolation, test the tester routine with manually coarsen data from some arbitrary fine data before accusing your code of order deficiency. I guess you don't want to measure the Golden Gate Bridge with a 10-cm ruler which takes few hours and then find out the ruler has a half-life of order 10 second and thermal linear expansion coefficient of order 10/°C, do you?

- If running your code line-by-line takes one day, it better to do that instead of 10-day clueless wandering in thousands lines of code.

- Take notes of the debugging procedure and use revision control, period

- If you are coding using GNU tools and you are an Emacs person, learn to use GDB in Emacs, it is incredibly powerful. Add Speedbar and you are on fire.

Labels: , ,

Monday, July 26, 2010
"GNU Emacs comes with ABSOLUTELY NO WARRANTY"... That's why it works!

Labels: ,

Monday, March 15, 2010
I'm finally done with the course works and finals (at least this is what I am hoping for!), so I am going to do what I like, the research stuff, 8-5. (8 hours a day, 5 days a week... are you doing it 24-7?! Get a life... joking, I'm lazy! You keep up the spirit ;] )
Since the members of the group that my advisor work with are all Emacs gurus, my advisor suggested to do all the programming stuff in Emacs, even though he is a vi person himself. He said that if you want to be taken seriously, you better have a common language with them, and yes, Emacs is one of them, believe me! I have seen them do fantastic debugging procedures in Emacs that you cannot do in any other environment. Anyway, after 6-7 months of playing with Emacs, I'm feeling it and since I'm terrible at remembering stuffs, I'll put here the things that I think are necessary to remember later or worth referring to.

Emacs tips for lazy grad students - 1
A good color theme is essential in Emacs (Not using Emacs?! oh, sorry to disturb... go play your game!) Forget making your own color theme from scratch! In other words, if you are geek enough, you are not reading this post or you already have a personalized Emacs color theme carrying with you as a personal identity since you were 12 years old. Anyway, I didn't like the default color theme and the others provided in emacs-goodies-el package suck. Searching the web, I found bunch of color themes and after a few weeks of testing I settled with color-theme-subdued. It is a good one! The installation instruction is also included in the link.

Labels: