11 August 2008, 18:25 in Programming
OpenGL vs Direct3D
This old article, by Paul Hsieh from 1997, describes some of the significant historical events that occurred in the early days of the OpenGL and Direct3D graphics APIs.
The following is from a 1996 entry in John Carmack’s .plan file:
The overriding reason why GL is so much better than D3D has to do with ease of use. GL is easy to use and fun to experiment with. D3D is not (ahem). You can make sample GL programs with a single page of code. I think D3D has managed to make the worst possible interface choice at every oportunity. COM. Expandable structs passed to functions. Execute buffers. Some of these choices were made so that the API would be able to gracefully expand in the future, but who cares about having an API that can grow if you have forced it to be painful to use now and forever after? Many things that are a single line of GL code require half a page of D3D code to allocate a structure, set a size, fill something in, call a COM routine, then extract the result.
The world of computer hardware and software has changed a lot since then, but the information is interesting nonetheless.
Also see this comparison between OpenGL 1.2 core and Direct3D 8, and the Wikipedia entry on Direct3D vs OpenGL.
8 August 2008, 19:07 in Martial Arts
Singapore training trip
This year in May I spent a week in Singapore with Brandon and Troy for a martial arts training holiday. We did some training in Tabimina Balintawak under Sir Bob Tabimina himself, and we trained some knife combatives with Charley. I also got to meet Richard and some of the other guys from Singapore for the first time.
Balintawak is a family of combat systems developed in the 1940s by Grand Master Venancio “Anciong” Bacon in the Philippines. A single rattan stick is used as the primary training tool, but it is not just a stick fighting art. Tabimina Balintawak is Sir Bob’s own variation of the style. The philosophy is to end the fight expediently; it is counter-offense system with emphasis on strong impenetrable defense. This contrasts with most other weapons based styles which focus on the long range and offensive elements.
Tabimina Balintawak focuses on the development of appropriate reactions, timing and speed. This can be applied to a variety of weapons (stick and knife) or bare hands fighting. The approach is very different to most martial arts where the focus is initially on techniques or applications, and the timing and reactions which actually make those techniques work come later. Tabimina Balintawak is about the development of appropriate reflexive response under pressure in real time.
The movements are simple and efficient, nothing fancy. The emphasis is on gross motor movements such as waist turn, hips, and legs, rather than on fine motor movements with the hands. The idea is to zero your mind and use your reactions and reflexes, rather than cognitively think about what is happening and how you are going to react (which is too slow).
The training is done one-on-one with the instructor personalizing the training for each student. The instructor “feeds” the student attacks and the student defends and counters. The instructor always keeps the student just above their comfort zone, continuously pushing them by increasing the speed or intensity, varying the tempo, introducing new attacks, or increasing the level of deception. While the training is not physically hard, it is tiring due to the psychological pressure and overloading of your brain.
Sir Bob is a true martial arts master, as opposed to someone with a day job who does martial arts as a hobby, or a business man who uses martial arts to make money. He is also a very interesting person with a warm heart. It was an honor to train under him. He may be old, but I wouldn’t want to cross him!
On most days we did do two training sessions, one in the early afternoon and one in the evening, each for 2 hours. We also did some knife combatives training under Charley, focusing on how to escape from some common knife hold up situations from both in front and behind. One night we visited the local BJJ club, run by Jason. Troy took the class, focusing on hip movement. We had a wrestle with the guys and then went out for a meal after.
This was my first time in Singapore (outside of the airport) and I really enjoyed it. The weather was warm, the food was tasty and cheap, the people were friendly, the shopping was good, and the training was awesome. It was a much needed break from work and the Perth winter.
Going overseas to train is something I definitely want to do more often. Being in another place and culture, away from the distractions of every day life, and surrounded by other people with a passion for martial arts was a fantastic experience.
1 August 2008, 12:44 in Politics, Religion, World Issues
James Duane: Don't Talk to the Police
James Duane, a US law professor, explains why innocent people should never talk to the police. The video goes for 28 minutes.
Duane recommends that lawyers always advise their clients are always advised to exercise their Fifth Amendment right to remain silent. He cites the following main reasons:
- There is no way it can help.
- If your client is guilty – and even if he is innocent – he may admit his guilt with no benefit in return.
- Even if your client is innocent and denies his guilt and mostly tells the truth, he can easily get carried away and tell some little lie or make some little mistake that will hang him.
- Even if your client is innocent and only tell the truth, he will always give the police some information that can be used to help convict.
- Even if your client is innocent and only tells the truth and does not tell the police anything incriminating, there is still a grave chance that his answers can be used to crucify him if the police don’t recall his testimony with 100% accuracy.
- Even if your client is innocent and only tells the truth and does not tell the police anything incriminating, and his statement is videotaped, his answers can be used to crucify him if the police don’t recall the questions with 100% accuracy.
- Even if your client is innocent and only tells the truth and does not tell the police anything incriminating, and the entire interview is videotaped, his answers can be used to crucify him if the police have any evidence, even mistaken or unreliable evidence, that any of his statements are false.
This applies to US law but is still interesting nonetheless. I wonder if the same logic applies here in Australia?
Comments [1]
31 July 2008, 14:09 in Computing
Make Outlook keep emails on server
Here is a simple tip that may make your life easier if you use POP3 email accounts and use Microsoft Outlook to check your email, but occasionally also want to use webmail when away from your PC.
The problem is that by default, Outlook downloads your emails and removes them off the server. This means that if someone sends me an email and I check my email at home in Outlook, then the email no longer exists on the server. When I get to work the next day and login to my webmail, the email isn’t there, so I can’t read it or reply to it until I’m at home again.
It would be great if I could use Outlook at home for its powerful features yet still be able to view the emails from webmail for some time. Fortunately there is an easy solution…
In Outlook, under the settings for each of your email accounts, you can specify that Outlook should leave a copy of messages on the server for a number of days.
![]()
If you set this to say, 2 days, then you can still see any emails in your webmail for 2 days after you downloaded them in Outlook. This works well for me.
30 July 2008, 22:36 in General
Torch recommendations
I like to keep a couple of torches around the house in the event of a power failure, and also one in the car in the event of a breakdown. I wanted to recommend a few different models that I like: the Fenix TK10, Fenix L1T, and Fenix E01.
The Fenix TK10 is a compact high quality tactical style torch that uses two 3V CR123A lithium batteries. It has two brightness settings: 225 Lumens for 1.5 hours, or 60 Lumens for 10 hours. It is very bright and a makes a good torch to keep in the car or around the house. The only disadvantage is that the CR123A lithium batteries are more expensive and harder to find than the more common AA or AAA batteries; it would probably be worthwhile ordering some with the torch itself. See here for a review. I paid around ~AUD $80 delivered from Fenix-Store.com.
The Fenix L1T uses a single 1.5V AA battery and a 3W LED, and has two brightness settings. The high brightness level is 37 Lumens for 3.3 hours, and the low brightness is 10 Lumens for 10 hours, but these figures are quoted for Ni-MH batteries. It retails for around AUD $50. It’s very small and has the convenience of AA batteries but is still quite bright. See here, here and here for a review.
The Fenix E01 is small and cheap, but still high quality. It only costs around AUD $15, utilises a single 1.5V AAA battery, and gives a constant brightness of 10 Lumnes. It’s 7.1cm long by 1.4cm in diameter, and weighs 14g excluding the batteries. Because of its small size it makes a great torch for a girl to keep in her handbag, or it can easily be kept in the bag you take to work or in the glove box of your car.
You can buy these from Torchworld.com.au or Fenix-Store.com.
For more information, see Candle Power Forums and FlashlightReviews.com (sadly no longer updated).
Comments [1]
30 July 2008, 22:36 in Computing
Virus scanners
To me a virus scanner should be discrete and lightweight. It should not hog system resources or slow things down drastically, and it should not constantly pop up annoying messages to tell you to update or reboot your PC and so on. Of course it should also be effective at detecting and cleaning viruses!
For the last few years I have used Computer Associates VET anti-virus on my main PC at home. For the other Windows PCs I have at home I used the free edition of AVG. My VET subscription recently expired, and even though I’ve been happy with it, I spent some time evaluating some of the options.
BitDefender is quite cheap and many users are satisfied with it. However after a bit of searching the web I came across quite a few forum posts or articles where people had experienced problems on Windows Vista or when running games.
I use Kaspersky Anti-Virus at work. It appears to have good virus detection and it’s quite configurable, but it seems to slow the system down quite a bit.
AVG seems pretty good and I will continue to use the free edition on my spare PCs.
ESET NOD32 does not appear to be that well known; I hadn’t heard of it until recently. It has a reputation for being lightweight and unintrusive, and apparently has excellent virus detection. I liked it best out of the virus scanners I tried and ended up buying a license for my main PC which runs Windows Vista.
8 April 2008, 19:07 in Computing
Using Subversion to manage documents
There are various documents that I frequently want to access or modify from various computers, such as home or work or a friend’s house. Previously what I would do is either email files to myself, or copy them back and forth via USB flash drives. This is time consuming, insecure, and error prone (to get mixed up about which copy of a file is the most recent one). As a better solution, I decided to use a Subversion repository.
Subversion is a version control system, typically used by programmers to manage their source code, but it can be used to store all manner of things (in this case mainly Word documents, Excel spreadsheets, and plain text files). The normal Subversion client is a command line utility, but various graphical user interfaces are available; I use TortoiseSVN which conveniently integrates into Windows Explorer.
Using Subversion to manage my documents has several benefits. I can now access my files over the internet from any computer (provided that it has a Subversion client such as TortoiseSVN installed which is quick, easy, and free). Subversion maintains a full history of changes to the repository, so it is possible to go back and find that bit of info you deleted the other day, or figure out at what point you changed a certain sentence in a file. The files are safely backed up on a remote server, so even if my computer dies I haven’t lost them. Finally, committing changes to the repository or getting the latest changes from the repository literally takes seconds to initiate; less clicks / keystrokes / fumbling is required compared to copying files to a USB drive or emailing them. Love it.
Comments [2]
7 April 2008, 12:37 in Programming
John Carmack's dev diaries
John Carmack is one of the co-founders of iD Software and lead programmer of famous computer games including Wolfenstein 3D, Doom, and Quake. It is old news by now, but his development diaries from 1997 to 2004 have been put up online. There is some interesting stuff in there, and it is worth a look if you are a programmer or a fan of his games. He also maintains a blog but it seems to be very infrequently updated.
John Romero, famous game designer and programmer and the other co-founder of iD Software, also has a blog.