May 5th, 2008
In my everyday work, I spend a lot of time waiting on SolidWorks to finish a task. The SolidWorks task scheduler is able to remove some of these burdens by allowing them to be run overnight. The great thing about the task scheduler is that it allows me to select folders or groups of files and runs the task in a separate SolidWorks instance for each file it finds. It also has a timeout for each file to complete its task. This means it can keep churning through all of the files and recover from a problem with one of the files (SolidWorks 2008 is notoriously unstable).
The problem is that the number of tasks available is limited. There is the Custom Task which allows you to run a custom program or macro, but for some reason removes the file selection capability. It is for this reason that I set out to recreate the functionality of the task scheduler, but with the ability to run any macro (or multiple macros) in separate instances of SolidWorks for entire groups of files. I call it SolidWorksBatchRunner. Read the rest of this entry »
Posted in SolidWorks | No Comments »
February 12th, 2008
I ran into a hard to spot bug the other day and decided to share it. I worked on some code for a while and then fired up my browser to test it. I would be using Xdebug straight from Eclipse PDT, but I can’t get it to work with the latest php snapshots for Windows. Anyway, when I went to test it, there was no output. It turns out that php-cgi had segfaulted. I spent the better half of a day trying to figure out the problem. When I thought I had figured it out, I would try to write up a test script for just that problem, and all of them ran just fine. Just when I was about to give up, I found the problem in this little class I was sure couldn’t be wrong.
Read the rest of this entry »
Posted in PHP | No Comments »
October 29th, 2007
With the implementation of the get_called_class() function in PHP, prototype based programming in PHP is possible. The new function is in both PHP5.3 and PHP6 snapshots. So, I went back to the drawing board and came up with a fully capable class. The $this keyword is usable, as well as being able to use the self, parent, and static (new with the late static binding patch) keywords. Code after the jump. Read the rest of this entry »
Posted in PHP | 3 Comments »
December 28th, 2006
I have been using PHPEclipse for quite some time. I have used the Eclipse Java debugger and was impressed with how much debugging time it saved. However, when I tried to get the debugger working in PHPEclipse, I ran into some problems. This might have something to do with using the latest version of Eclipse, but I never spent the time to figure it all out. I had some spare time today, and decided to try out the Eclipse PHP IDE.
Read the rest of this entry »
Posted in PHP | 2 Comments »
November 6th, 2006
For those who have been doing a lot of Javascript programming, you know what prototype-based programming is all about. The basic idea is that functions can be added to classes dynamically. In Javascript functions can be added to a static class (using prototype) and it will be added to all instances of the class, or they can be added to a specific instance and only be added to that instance.
Anyway, lets get to the point. I decided to try adding this functionality to PHP. I’m not sure why its a good idea, or if it even is, but I’ll let you be the judge of that. Read the rest of this entry »
Posted in PHP | 11 Comments »
February 14th, 2006
I was having a conversation with my friend the other day when he suggested that the best thing about getting married was merging the two DVD collections. This was funny by itself, until my other friend gave his counter-argument of the other obvious benefits of being married. I won’t give you the exact words, because it would make it less funny for me, and I believe it will be more humorous to you if you just imagine what he said.
Anyway, the conversation didn’t end here. Then I said something about my DVD collection, and he said that it may be the reason I am single, because everyone knows that women are just looking for a guy with all the right DVDs. I thought about arguing against this, but then I realized the DVD collection is a perfect scapegoat for singleness. Just blame it on the DVD collection, not your other inadequacies. So for all the single people out there, its not your fault, its your DVD collection’s.
Posted in Random Thoughts | 2 Comments »
January 11th, 2006
So I finally thought of something to write here. I’m sure a lot of people have heard the following proof that girls are evil:
First we state that girls require time and money.
Girls = Time * Money
And as we all know, “time is money”.
Time = Money
Therefore:
Girls = Money * Money = Money 2
And because “money is the root of all evil”:
Money = Evil 1/2
Therefore:
Girls = (Evil 1/2)2
And we are forced to conclude that:
Girls = Evil
Well I want to prove that money is imaginary.
We know that “money is the root of all evil”:
Money = Evil 1/2
And I doubt anyone would disagree that evil is negative:
Evil < 0
We know that the square root of a negative number is imaginary:
(-1)1/2 = i
And so money is imaginary:
Money = i * ( | Evil | )1/2
Posted in Random Thoughts | 9 Comments »