Development
Next Entries »10:44am and I’m still an unemployed
Saturday, April 22nd, 2006Until Monday at least! Yesterday I finished up the last bits of fanfare at my old company, and left amidst a Pho induced coma shortly after lunch. After an afternoon of drinking and hanging out with Mike and Cyn I went home to sleep.
Unfortunately I think Ian got me sick when I carpooled with him this week, so today I’m trying to take it easy. I’ve got some mild sniffles and a case of the blahs. I’m thinking it’s going to be pretty minor so long as I get plenty of rest and take my vitamin C.
After reviewing the official blogging policy at my new employer I’ve decided that for the first time ever I’m actually going to talk about specifics at work, and name the company:
As of Monday I will be a Program Manager I for Microsoft. I know it might seem silly to some of my readers that I’m going to Microsoft being such an avid Apple fan and all, but I’m really thinking that this is going to be an excellent opportunity to learn more about project management and get some good experience under my belt.
I’m quite excited about starting Monday and really want to go the extra mile and make sure to impress. Even if I’m only going to be with the company for 2-5 years I want to make a good impression and learn how to be a software ninja so that someday when the singularity comes I hopefully won’t be left out for cold.
MenuMeters where have you been all my life
Monday, April 3rd, 2006I just discovered a kick-ass little utility for OS X called MenuMeters. Up until now I had always been running Activity Monitor and iStat Pro. I used iStat for detailed information, and the “floating CPU utilization” feature of Activity Monitor tucked away in the corner to keep an eye on my processor.
I’m a big graphs geek and always like to feel like I have my finger “on the pulse” of whatever machine I’m currently using. MenuMeters manages to elegantly answer all of my at a glance wants, and does so with not only a small memory footprint, but also minimal processor utilization.
![]()
It’s quite configurable, and as you can see it gives all sorts of information about your CPU, disks, network utilization and more. I’m sold! MenuMeters is free, open source, OS X only.
Unix philosophies applied to general programming
Wednesday, December 7th, 2005Ronny has a great blog dedicated to software quality and he just made a really interesting post on the fundamental philosophies of Unix software development. These are simple principals that I think should be applied to all software projects.
Rule of Modularity: Write simple parts connected by clean interfaces.
Rule of Clarity: Clarity is better than cleverness.
Rule of Composition: Design programs to be connected with other programs.
Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
Rule of Simplicity: Design for simplicity; add complexity only where you must.
Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
Rule of Transparency: Design for visibility to make inspection and debugging easier.
Rule of Robustness: Robustness is the child of transparency and simplicity.
Rule of Representation: Fold knowledge into data, so program logic can be stupid and robust.
Rule of Least Surprise: In interface design, always do the least surprising thing.
Rule of Silence: When a program has nothing surprising to say, it should say nothing.
Rule of Repair: Repair what you can — but when you must fail, fail noisily and as soon as possible.
Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
Rule of Diversity: Distrust all claims for one true way.
Rule of Extensibility: Design for the future, because it will be here sooner than you think.
What are your thoughts? I think this is very similar to Adam Bosworth’s comments on how Google has been able to make such an extensible and scalable high-performance system. I’m going to spend some time pondering how to apply these principles to more than software development, and rather to life in general.
Prime number detector: sieve method
Wednesday, December 7th, 2005As promised I have implemented an Eratosthenes Sieve algorithm for prime number detection. This method differs from the brute force method in that rather than detecting if a given number is prime, it detects all primes up to n. Basically you step through an array removing all multiples of known primes starting from the bottom up. If a number has not been removed from the array it must be prime.
$step = 2; //initialize our counter
while ($step <= $totest):
if ($sieve[$step] == true) { //if this number is prime then
for ($multiples = ($step * 2); $multiples <= $totest; $multiples = $multiples + $step){
$sieve[$multiples] = false; //set all multiples of $step to non-prime
}
}
$step++; //increment $step and begin again
endwhile;
I added a simple bit of code to let the viewer select if they want to see the prime numbers alone, or highlighted amongst the entire array of numbers. I’m playing around with the ability to make the list of numbers wrap at the square root of n but that’s a little dodgy at the moment.
This is getting easier and easier. Next I’m going to tackle databases and start doing some MySQL work. I have a lot of plans and ideas for customizing SugarCRM but that will require me being back in the swing of things with RDBMS technology.
Prime number detector: brute force method
Tuesday, December 6th, 2005Tonight I continued my development efforts and implemented a simple brute force algorithm that detects if a given number is prime. You can see it in action or check out the code I used:
$max = (int)(sqrt($totest) + 1); //set the max value to test
$isprime = true; //initialize the $isprime variable
for ($i = 2; $i <= $max; $i++) { //for loop from 2 to $max
//Determine if $totest is divisible by $i
if (fmod($totest, $i) == 0) { //is there a remainder?
$isprime = false; //the number is not prime
$i = $max; //exit the loop
}
}
Neat huh? Not too complicated but fun to do. Next I’m going to implement a sieve algorithm to determine if a series of numbers is prime or not.
Fun with multidimensional arrays
Monday, December 5th, 2005So my experiments with PHP have been going well. I have been slowly getting back into the programming thing. Tonight I sat down and tackled arrays, and specifically multidimensional arrays. My result was a nifty little script to generate a multiplication table. If anyone is interested in the source code leave a comment on this post.
It’s pretty simple I know, but it’s a start. Next thing I’m going to tackle (another night when it’s not past my bedtime) is going to be two prime number generators based on both the sieve and brute force methods. As a child when I was learning programming the first time I had a fascination with prime numbers and they always are fun to play with when learning how to implement algorithms in a given language.
Hopefully I’ll be comfortable enough with all this by this weekend to start working on databases again. I have an idea for an application that mixes a blog and a wiki with a focus on tracking information for a recruitment shop. It would be of significant use not only to myself, but hopefully to other techno-geek recruiters out there.
MAMP is nifty stuff
Saturday, December 3rd, 2005Even better! So I had been working with the default Apache install on my powerbook, and had installed MySQL, and PHPmyAdmin for my development environment. I had been somewhat at a loss for other tools (aside from trusty TextWrangler) until today when a reader turned me on to MAMP. It’s a simple install, and provides a great separate development environment for my PHP stuff while leaving “production” code for the default Apache install. It makes it even easier to play around with stuff, and comes with a ton of documentation and optimization extensions.
MAMP installs everything I had and more, while keeping everything (including the separate applications and the wwwroot) in it’s install folder making it easy to blow away the databases and development environment if you have to.
Getting back into development sure has been interesting so far. It’s been years since I’ve picked up something in earnest and I’m quite pleased with how quickly PHP is coming back to me.
Code for food?
Saturday, November 19th, 2005Codeforfood.org comes from a rather interesting chapter in my life. It was during the middle of the .com bust and I had all but hit rock bottom. After being unemployed for more than 18 months I had come to the conclusion that desperate times called for desperate measures. In an effort to get noticed amongst the throngs on unemployed tech workers here in Seattle I decided to put a bit of a twist on the cliche homeless guy standing on the street-corner begging for work and do it myself. I bought this domain to have a place to direct the media and potential employers that would be interested in looking at my resume or credentials.
It’s funny that this site would turn into a primary blog given that the original codeforfood.org site had a blog like format. It did not actually employ a proper CMS system however as the entire weblogs revolution was still a year or so off. I coded the entire site in static HTML, updating and adding to it every night as my journey continued. In the interests of posterity I have preserved the original code for food webpage.
So I suppose that begs the question of why I am recycling the domain and letting it rise out of the ashes of my old weblog Sparktoblog! and become my primary little niche in cyberspace. It’s simple really - I’m getting interested in coding again, although not professionally. After landing a position as a Recruiter during my code for food publicity stunt I let my technical skills dwindle over the next four years until I rediscovered web development when I created Sory Electronics in response to Sony’s malicious DRM rootkit. Given that our societies future is looking evermore technical I want to at least do some small technical thing to try to keep up with it all.
So here I am, Wordpress, Photoshop, and a good text editor loaded up on my powerbook and ready as I ever will be to face new challenges in cyberspace. I might not be coding to eat anymore, but I sure will be enjoying coding more than I did all those years ago when I stood on a street corner holding my sign.
Next Entries »