149 reputation
6
bio website
location Tokyo, Japan
age 30
visits member for 3 years, 10 months
seen Jul 29 at 8:22

I'm a programmer working in Tokyo, currently in Haskell.


Sep
24
awarded  Autobiographer
Aug
23
awarded  Critic
May
3
comment What do you look for when debugging deadlocks?
I debugged a couple of dead locks like this today. The trick was to wrap pthread_mutex_lock() with a macro that prints the function, line number, file name and the mutex variable's name (by tokenizing it) before and after acquiring the lock. Do the same for pthread_mutex_unlock() too. When I saw that my thread's froze, I just had to look at the last two messages, there were two threads trying to lock but never finishing it! Now all that's left is add a mechanism to toggle this at runtime. :-)
Nov
1
comment What is “syntactic delegation”
Cool! C# seems to have a lot of these nifty features. Events is another cool feature.
Nov
1
comment What is “syntactic delegation”
Great answer! Do you know why delegates are implemented using protocols in Objective-C when the language has support for message forwarding?
Nov
1
accepted What is “syntactic delegation”
Nov
1
asked What is “syntactic delegation”
Sep
25
awarded  Scholar
Sep
25
accepted What are the benefits of not including other header files in a header file?
Sep
25
awarded  Teacher
Sep
24
asked What are the benefits of not including other header files in a header file?
Aug
6
awarded  Supporter
Aug
6
comment Should functions always return a success/failure status?
Returning status when it makes sense is great. But is it a good idea to make it a coding standard to make your methods always return an error code? That way, you'd just end up discarding the return values most of the time (coz they don't mean anything) and ignore the crucial ones too.
Aug
6
awarded  Student
Aug
6
asked Should functions always return a success/failure status?