Newsletter: Lowest prices viagra Viagra lowest price Buy cialis uk Buy viagra online cheap Phentermine very cheap Soma bike Phentermine hoodia diet pill Diet online phentermine pill purchase Herbal viagra alternatives Information viagra woman Cheap pharmacy viagra Effects of long term xanax use Viagra high blood pressure Order hydrocodone online Phentermine prescription diet pill Viagra online uk Phentermine with master card Cialis drug for impotence 2005 comment december leave viagra Cleocin Tramadol saturday delivery Viagra dangers Viagra for woman information Anti cialis impotence Phentermine money orders Vicodin prescription Discount phentermine prescription Purchase soma online Xanax photos Phentermine cod delivery Prempro Generic money order viagra Phentermine ionamin canada Cod diet phentermine pill Lexapro and xanax Cod xanax Purchase tramadol Cash on delivery phentermine Meridia vs. Phentermine Cialis levitra viagra compare Vicodin for sale Prescription free viagra Xanax dosage 3mg xanax Lamictal Sample viagra Drug loss phentermine weight Prescription xanax Prescription phentermine with cod payment Buy phentermine without a prescription Phentermine free shipping Information viagra Cialis comparison levitra Generic name viagra Xanax precriptions Free viagra trial Lotrimin Xanax and valium Xanax overnight delivery Free shipping with phentermine order Cyber pharmacy viagra Meridia Viagra online ordering Buy ambien online Meridia side effects Information about street drugs or xanax bars Generic uk viagra Meridia order Generic overnight viagra Phentermine pharmacies online Bob dole viagra Paris france cheep viagra Herbal online viagra Lowest price on phentermine Phentermine diet drug Buy phentermine shipped usps Online viagra Phentermine online consultation Viagra without prescription Comparison levivia viagra Concomitant use of cialis and levitra Viagra herbal Buy phentermine cod Tramadol 100 mg no prescription Xanax photo Buy viagra line Xanax prescription Alprazolam xanax over night Lopid Phentermine by cod Viagra overnight delivery Buy cheap cialis Viagra advertisements Tramadol 50mg Viagra buy in uk online Hydrocodone guaifenesin Tramadol dog Xanax death Xanax american express Buy viagra canada Ambien withdrawal Diet hcl phentermine pill Phentermine in stock ready to ship saturday delivery Pictures of mylan xanax Hydrocodone apap Phentermine from mexico Cheap cialis generic Herbal substitute viagra Vicodin es Celexa phentermine Drug screening phentermine Adipex diet phentermine pill Phentermine weight loss pills Comparisons on online viagra suppliers Dilantin Phentermine blue capules 100 mg viagra Hydrocodone info Cialis vs viagra Drug interaction sibutramine and phentermine Buying phentermine without prescription 50mg generic viagra Adalat Naproxen 37 effects phentermine side Lovastatin Vicodin online Buying vicodin online Lexapro Is klonopin stronger than xanax Cialis information Buy phentermine in the uk Glipizide Phentermine free consultation Cheap phentermine perscription Phentermine hcl Compare viagra price Pharmacy phentermine sister Online pharmacies with doctor consultation for viagra Prozac and phentermine Xanax dosages Phentermine and fast shipping Vicodin picture Xanax depression Next day phentermine 120 tramadol Viagra free pill Generic viagra cialis 25 mg viagra Order cialis uk Atropine Viagra on line Order xanax online Chemical name for viagra Levivia and viagra Xanax uses Tramadol effects Alesse Xanax tablet Xanax overnight Phentermine cod shipping Fda approved phentermine Xanax xr 3 mg Buy canada cialis Prescription weight loss medication phentermine Xanax effects Discount cialis online Cheap tramadol 180 Viagra generico impotencia Amiloride Viagra alternatives uk Buy generic xanax Phentermine from canada Chromium Hydrocodone cough syrup Viagra overnight delivery Xanax withdrawal symptoms Snorting phentermine Hydrocodone ap ap Real phentermine Online pharmacy duromine viagra international Cialis tablet Phentermine forums and chats Phendimetrazine No prescripton phentermine Drug screening phentermine Colon cleanse ambien Order ambien online Soma online Buy online tramadol Phentermine weight loss pill Overnight tramadol Viagrafix corporation Lipitor Veterinary use of tramadol Phentermine us Phentermine online prescriptions Lisinopril with viagra Xanax long term use Buy hydrocodone overnight Alcohol hydrocodone Viagra soft tabs Different types of phentermine Cialis dysfunction erectile levitra viagra Phentermine delivered overnight Phentermine online no prescription Fioricet Buy cheapest online place viagra Saturday delivery cheapest phentermine Filing income tax buy tramadol Phentermine no doctor Phentermine pharmacy cod Cheapest secure delivery cialis uk Drug interactions tramadol elavil Ash of soma Cialis online sales Dog xanax Pulmonary hypertension viagra Xanax on line Cheap tramadol cod No prescription cialis Best viagra prices online Herbal viagra Xanax online prescription Phentermine resident sale virginia Viagra sales uk Viagra xenical Xanax death Does it viagra work Viagra online order guide Cheapest diet phentermine pill Phentermine 37.5 no prescription Viagra patent expiration Cialis info Cheap price on phentermine Free viagra canada Phentermine prescriptions online Viagra for sale Order phentermine cod Viagra story Generic ambien Buy pal pay phentermine using Valium vicodin Ambien cr Best price phentermine Phentermine no rx needed Viagra shelf life Best viagra prices online Fastin phentermine Purchase phentermine Purchase fioricet Fioricet order Cheapest phentermine Buy soma Cheap phentermine perscription Alternative to viagra drug Non prescription phentermine Add link phentermine purchase Phentermine 180 Advair Low price phentermine Cialis review Xanax online overnight Tramadol drug Natural viagra free samples Online phentermine prescriptions Otc viagra How do i stop taking phentermine Female viagra alternative Lowest price viagra Herbal phentermine forum Cialis forums Buy phentermine tablet Viagra generico impotencia Cialis viagra Online consultation phentermine Grapefruit xanax Herbal viagra Buy vicodin without prescription Inform your doctor medication phentermine dose weight Information viagra woman Hydrocodone withdrawal symptom Difference between cialis and viagra Buy viagra online uk 100 mg tramadol How viagra works Buy phentermine with no prescription Clomipramine Viagra info Cialis levitra better Killer pain tramadol Diet online phentermine pill Cheapest phentermine online no prescription Augmentin Get phentermine Blindness viagra Hydrocodone for ibs Hydrocodone effects Stopping xanax Xanax libido Buy cialis soft tabs Ambien side effects Generic cialis uk Viagra dose Xanax pics Oxycontin xanax bars percasettes and lor tabs Buy phentermine online cash on delivery Saturday delivery phentermine Order phentermine online 5 buy online no prescription Diet phentermine pill Fioricet medication Discount phentermine online Generic fioricet Phentermine 37.5&90 $89 mastercard Cialis eli lilly Cialis no prescription Viagra pill picture Cialis online discount Phentermine meridia xenical review Order xanax on line Does phentermine speed up metabolism Fioricet info Phentermine pharmacy cod Phentermine addiction Online xanax prescription Phentermine cod overnight Cialis tablet Cheap diet phentermine pill Soma getting Buy cheapest online viagra Buy cheap no phentermine prescription Cheap viagra canada Tools needed for injecting xanax Buy viagra pill online Buy phentermine prozac Tramadol dosage for dogs Ecotrin Generic viagra online Xanax overnight shipping Generic meridia Cheap viagra pills Phentermine amide Compare generic viagra prices Ephedrine 150 tramadol Urine drug testing of tramadol Alternative to viagra online Prescription order viagra online What is phentermine How long xanax stays in system Tramadol use in dogs Free phentermine prescriptions Generic soma Viagra prescriptions online Drug vicodin Phentermine 15 mgs Cheap phentermine without a prescription Buy viagra in uk Ambien and pregnancy Mastercard phentermine Phentermine hormone Hydrocodone lortab Taking viagra or levivia as a booster for cialis Phentermine on line w&o prescription Cheap tramadol cod free fedex Best cialis price Hyzaar Cheapest phentermine 90 day orders Viagra without a perscription Ambien on line Maxzide Online viagra sales Ssri phentermine heart Free sample prescription for viagra Buy viagra internet Phentermine diet medication Buy online viagra where Mexican phentermine Viagra cheap prescription Buy xanax online without a prescription Picture of generic xanax Good morning viagra commercial Negative side effects of phentermine Diet ingredient phentermine pill Tramadol dosage Appetite suppressants equivelant to phentermine Phentermine and blood in stool Soma addiction Add a link viagra Generic viagra cialis Viagra free pill How long xanax stays in system Nortriptyline Buy xanax no perscription needed amex accepted Is viagra safe for woman Xanax info Cheap tramadol without prescription Cialis new viagra Effects long phentermine side term Vicodin withdrawal Ionamin phentermine Purchase tramadol without a prescription Cialis drug prescription Paris cheep phentermine Viagra tablets Phentermine gynecomastia Hydrocodone info Inexpensive viagra Canada xanax Does phentermine help weight loss Paris france cheep viagra Finasteride 100 phentermine How fast does phentermine work Cialis comparison levivia viagra Order cialis uk Buy phentermine Cialis for woman Diet phentermine Ambien prescription Cheap discount phentermine Phentermine forum Free viagra without prescription Canadian pharmacy phentermine 90 cod count day phentermine How long does xanax stay in your body Tramadol avinza drug interaction Inject xanax Cialis price 5 cheap Kaopectate Cialis viagra Picture of xanax pill Phentermine discount Permax Xanax drug testing Cyber pharmacy phentermine Drug interaction xanax and holy basil Buy cheap fioricet No prescription phentermine free shipping Lowest prices on phentermine Is phentermine addictive How to inject xanax pills Ambien online Physican's desk reference phentermine Phentermine canadian pharmacy Phentermine tablet Phentermine diet pill side effects Amphetamine Afrin Buy viagra 1 Viagra overdose Generic ambien Ambien overnight Tramadol cheap Phentermine hcl side effects Phentermine 37.5mg tablets What does phentermine do to your heart Viagra testimony Order phentermine c o d Cheap prescription viagra Viagra on line uk Best online deal for phentermine Premphase Viagra prescriptions Fda us approved phentermine Order xanax paying cod Buy generic online phentermine Ambien cr dosage Can i buy phentermine anywhere in uk Generic soma Phentermine purchase Buy herbal viagra Female viagra Xanax for anxiety Viagra prescriptions Cialis injury lawyer ohio Phentermine sales What does phentermine look like Phentermine and sibutramine be combined Tramadol prescription Viagra pill picture Xanax next day delivery Mark martin viagra Generic viagra in canada Buy no phentermine prescription Viagra and levivia Erection viagra Phentermine risks Epivir Diet discount phentermine pill No perscription xanax cheap Phentermine hoodia Importing cialis from canada to us Xanax valium Viagra substitutes Buy xanax without prescription Xanax 2mg Fioricet phentermine shipping Cheap phentermine online 37 5 Buy vicodin without prescription 180 phentermine Mexican pharmacy phentermine Phentermine blogging Xanax cod 50mg generic viagra Buy online viagra Phentermine shortage Phentermine fact Compare prices tramadol

How to Navigate Large Codebases Quickly

To break up all of the high score posts, I’m just going to publish this old thing I never finished. I think it’s a good starting point for a good article or something.
Every developer gets dumped into a large codebase they don’t know anything about at one point or another in their life. Torque has 1.3 million lines of code spread out over 2800 files, not including TorqueScript. The Windows XP tree is estimated to have 40 million lines of code.

How are you supposed to comprehend something this large?

The answer is simple. You don’t. It’s likely you’ll never know exactly how the whole system works. Even the people that wrote it will not know over time. The best you can do is create a model about how each of the pieces of the system work and correct this model as you debug and learn more about it. I asked a guy during an interview how he explores a new body of code. His response was that he liked to look at every file and function and see how it all works. Can you imagine trying to do that to Windows XP? You’d never have time to write new code!

How does one build a model of an application? I usually start by simply using it for a while. The goal is to grasp what the major bodies of functionality are. The next step is to pick a small modification and figure out how to implement it. Then you start using the tools below to figure out how to do it. The reason for this is to create a filter in which you can start examining the source code. Without it, you’re just staring at a huge monster with no weapons to attack it!

Grep and Find in Files. This is probably the best tool for doing this kind of exploring. Most of the other tools are just refinements of this. Just start searching for keywords that are similar to your modification. If you’re working on a GUI library and your modification is to create a “SuperButton”. Just do a grep for “Button” through the source tree. You’re likely to get waaay too many hits for a simple query like that. This is where you turn to regular expressions. Change your search to “class.*Button” to find out where the Button (or descendant class) are implemented, assuming C++ as the target language.

Go to definition. This is in Visual Studio and Eclipse. You can right click on any symbol and select “Go to definition”. This will take you where the class or function is defined. A shortcut for above.
Get callers (Eclipse) , or Find All References (Visual Studio) This lets you see what uses a particular object/method. Useful to figure out code flow/structure and to figure out how large of an effort changing that object/method will be.
Breakthings! I love just commenting out large bodies of code and watching the effects on the system. This is a great way to validate assumptions about what a body of code does. I just recently confirmed I was looking at the wrong piece of code by commenting it out and not seeing the effect I expected.
Remember Project forces. The reasons behind why a particular piece of code was written are rarely purely techinical. Some pieces of the system may have been written under different time constraints, different goals that do not apply anymore, or just different coding philosophies at the time. Keep this in mind while mining through a new codebase, it will help understanding of the code (and also of the team that wrote it).

more highscores, how borring

A good day so far: Gave my two weeks of notice today. It was hard to do because this is a cool place to work. But I’ll be making games soon, so that’s even cooler! Also, a new Robotron highscore today: 413850. I talked to a guy at PAGDIG ( who met Eugene Jarvis the creator of Robotron. Apparently, he asks if you break a million. So that’s definitely my new goal. More content soon, I hope! 😉


New (old) highscores!

I got these a while ago and have been too lazy to post.  Q*Bert: 137320, Robotron: 387875

Qbertrobotron 387875

Still need to work on my homebrew Wii robotron clone. I have a “player” working. Need to get hit detection and enemies on the screen next.

Homebrew Weekend

I’ve got free time again and I want to try out some homebrew console development. I’ve got a Wii, so I’m looking at GameCube homebrew for now. The steps as I see them are:

  1. Get someone elses homebrew working on my system.
  2. Get a dev environment setup, compile someone elses stuff and run it.
  3. Write some silly stuff of my own (I’m thinking Robotron ripoff)
  4. Profit!

I’ve got step 1 done. I bought a Datel SD Media launcher which allows one to load .dol and .bin files off of a SD card. I’m curious how the Datel CD is bootable by the Wii. How’d they pull that off? I also got some cheapo Gamecube controllers and downloaded some ROM’s from here:

So now I’m onto steps 2 & 3, this is my launchpad for that:

Update:  Neat, that didn’t take very long to do.  I was expecting quite a fight to get a dev environment running for some reason.  Onto step 3!

New Q*Bert high score!


QBert high score! 118420

Not Breathing — The Black Old Pueblo

I got this new disc from Not BreathingThis disc is awesome. The great tracks on the disc are Dead Voices on Acetone and the crazy one about treating your mom right (What’cha Mom Wearing).

I also get a random bonus prize with my disc:

not breathing fun kracker jack prize
It’s some random ass circuit board that looks like it used to plug into something judging by the traces at the bottom.  This is why it’s best to order direct from the creator. 😉

Effective searches

Being smart about searches is key to exploring large codebases. You have many approaches to take to get better searches:

One must exploit language syntax to get search results that don’t suck. Some examples for C++:

  • To find out where a method is implemented, prepend :: to the method name. An example would be “::OpenPort” to find all implementations of the OpenPort method. The great thing about this trick is that it filters out the definition in the .h file, and it filters out users of the method (except for static callers).
  • To find out where a method is called from, prepend the -> operator to your search “->OpenPort” will hit most of your callers.

One must also exploit code base conventions.

  • In the Torque Game Engine there’s a scripting language. The engine exports functions to the language with a macro called “ConsoleFunction” or “ConsoleMethod”. So if I want to find out all of the console functions & methods available to me. I can use the following regular expression: “Console.*(” and get my list.

Some IDE’s (Visual Studio, Eclipse) will give you this information without these searches. Which is nice to use when they work and when it’s available. The great thing about these text tricks are they work everywhere that “Find-in-files”/grep is implemented.
You can get away without such tricks. But you’ll spend a lot more time parsing your search results for the information you really need. I’d rather spend that extra time slacking. 😉 More tricks to come as I remember/use them!


Robotron high score
Got my best score in Robotron 2084 recently: 136600. I’m not a super master by any means, but that’s damn good for me. Here’s a pic from Ground Kontrol. Gotta take the pic because the machines are reset nightly. It’d be cool to start a Flickr pool, or random high score site for Ground Kontrol.

From Windows to Mac

I’m not a convert, but I’ve had to jump over to port a project I’ve been working on. Here are some of my thoughts about it:

The Good

  • Spotlight is great. I don’t use Finder to launch anything. I never understood why navigating the Start Menu, or using Finder was a good way to launch apps. I usually know what I want to launch, I don’t always know where it lives in the launch structure. For Windows I had written a tool called kbLaunch which does a similiar thing.
  • Bundles are awesome. It’s nice to return to such a simple concept of an application living within a single directory. It definitely beats throwing files all over your system.
  • Having Unix command-line utilities again is really fun. I stopped running FreeBSD/Linux at home a few years ago after fighting some program to watch a DVD. So it’s been a while since I’ve had these nice tools. I might just install Cygwin on my Windows box now.
  • Apple Mail’s search is waaay faster than Outlook
  • Not a user thing, but Apple has released 4 revisions of OSX since 2001. In that same timeframe, Microsoft has only released Windows XP and 2003 Server.
  • Time Machine looks really cool. I’m a huge fan of revision tracking and having it integrated into the file system with a slick UI on top is really promising.

The Bad

  • Keyboard support isn’t as good as Windows. I’m a big fan of using the keyboard to select menu items. I can smash Alt-F F 3 and open a recent file in Visual Studio really really fast. But on the Mac, you can’t seem to open a specific menu with the keyboard. I know you can hit Command- something to get to the Apple menu and navigate over to the other menu items. But that’s really slow and frustrating.
  • Window overload. The Mac seems to be a bit too eager to create lots of Windows to keep track of. Before I found the 3 pane option of XCode, I could open 30-40 windows while editing some source code. Trying to wade through all of that was really hard. Apple seems to be trying to solve this with Expose’ and the upcomming Spaces (which seem to be just virtual desktops). I really like the tab approach that most Windows application have adopted and I feel it helps keep the perceptual hit of the UI lower. Although, ideally I think I’d like to switch to any active window with a Spotlight-like interface. Hrmm, maybe I’ll go hack that into kbLaunch!
  • Network shares. I don’t think I “get” how it works on the Mac yet. I can navigate to them fine. But they will disappear on me for some reason. Then I have to renavigate to them again. Also, I can’t seem to rename a share to something that is easy for me to remember. If 5 people share their drive as “Macintosh HD” I get 5 mounted disks named “Macintosh HD” that I can’t discern which is which.
  • Safari is brutal. Apple should just push Firefox as their browser and maybe have an OSX goodie enabled build of it.
  • This is more Googles fault. But if I search for an Apple API call, the first hit is usually a “page not found, redirecting” message from Apple instead of just going to the right place. If I search for a Windows API, I normally get the MSDN page first up.

Stuff to explore

  • Automator. I haven’t spent anytime with it yet. It seems like a nice way to glue things together.

The Summary

After actually using the Mac for a while, I like it. Having a nice looking Unix box is a good time. As I said above I’m not a convert. But it is a pleasant environment to work in. For day to day things, I’m just using Firefox and Emacs on both platforms, so it’s not too different. Windows and Mac are basically two flavors of kool-ade, but they’re both just a lot of sugar.

Microsoft Application Updater Block

Microsoft Application Updater Block is supposed to be an example of “best patterns and practices”. It is a decent amount of good code that can be used to build an automated updating solution for your software.

It’s got a lot of great features: compression, only downloading the files that have changed, and hash checking to ensure you’re getting the right file. It’s got unit tests for everything.

The problem with it is, if you try to use them all together it fails horribly. Out of the box if you try to use compression you can’t use the hashes to conditionally download. If you try to use all of these features together you need to store the following info per file:

  • Filename
  • Compressed hash
  • Uncompressed hash

Then you need to modify the code to check the uncompressed hash for the conditional download and check the compressed hash to verify the file you got is correct. Finally, you run it through the uncompressor component to get your uncompressed version. Another annoying bug with the hash checking feature is that it does not support salted hashes. But the tool you use to generate the hash has the salted hash enabled by default.

Overall, it’s a good package but needed some tweaking for real use. I think .NET 2.0 is suppossed to have a new mechanism for updates that I hope is more mature.