Surrealwebs.com logo left half Surrealwebs.com logo right half
No, not Ackbar, Ackermann
me

The recursive Ackermann function, ever heard of it? Wanna know how to do it in PHP?

function ackermann( $m , $n )
{
   if ( $m==0 )
   {
      return $n + 1;
   }
   elseif ( $n==0 )
   {
      return ackermann( $m-1 , 1 );
   }
   return ackermann( $m-1, ackermann( $m , $n-1 ) );
}

echo ackermann( 3, 4 );
// prints 125
							

Done. Ok, so it doesn't look that tough, but put in some big numbers (like say 125,250) and don't come back crying to me. Oh, yeah, check out my entry (that's right, it's mine) for this function at Rosetta Code (rosettacode.org).

 

by: Adam | 02-Apr-2009
I finally did it!
me

That is correct. I bought the book as soon as it hit paperback and then let it sit on the shelf, until now. Star Wars™ Allegiance by renowned Sci-Fi author Timothy Zahn. Set between episodes IV and V, Allegiance takes you on a journey with 5 defecting Stormtroopers, and Han Solo, Chewbacca and Luke (Leia shows up once or twice as well). For 5 deserters of the Empire they sure are lucky, they get to meet Darth Vader and Mara Jade. In one book!

It may take you a bit to get into it but when you do you will not want to put it down. So, if you haven't already, pick it up and read it. You can even buy it from Amazon buy clicking on the link over there on the right ($1.95 at the time I wrote this). It's well worth it.

 

by: Adam | 03-Jul-2008
LG CU500 Memory Card Issues
me

I have an LG CU500 phone through Cingular AT&T that does not like my 1gb MicroSD card. Every time I turn my phone off or remove the battery the phone stops recognizing the card and gives me a "not ready" error... every time. I got sick of having to scour the web looking for the solution whenever this happened (I do not turn my phone off very often) so I decided to post here so I know where to find the fix.

This fix is different than the one I normally use but it works more reliably. Simply:

  • Engineering menu (277634#*#)
  • click port setting
  • click mass storage
  • click mass storage remove
  • exit out completely

That is it. Easy huh?

 

by: Adam | 12-Jun-2008
Lost, without it
Lost

Are you a fan of the TV show Lost? Are you still reeling from this past season? Are you looking for anything to do with the show? Have you seen this yet?

As another awesome season has come to an end and with the eternal hiatus before us I have found a funny summation of happening thus far. Titled "The Opening Act from the Original, Unused Teleplay of Lost's Pilot Episode," this tidbit of writing genius is sure to make any Lost fan smile.

 

 

by: Adam | 09-Jun-2008
Yet again...
pic

Surrealwebs.com has gotten yet another makeover. The last layout was getting stale, after all it was in place for over 2 years, ancient in internet time.

I do not have a lot of freelance projects going on currently as I am busy with work. I do not mind so much because I get to do what I love everyday so I do not feel the need to fill a programming void. I work for Kaplan Schweser as a web programmer. Work is by no means boring or tedious like it can be in the advertising world. We are hiring DBA's and senior level PHP programmers. If you are interested Check us out.

 

by: Adam | 15-Mar-2008
Content Management Systems
Drupal Logo

I love programming just as much as the next guy programmer but sometimes a task can be so repetitive/boring that you loathe it. There is a solution to this monotony in the form of Open Source Content Management Systems. There is a wide variety CMSs to choose from and OpenSource CMS lets you try most of them out on their site before you download and install them on your server.

I have tried a few different CMSs myself and I prefer Drupal. Drupal has an extensive set of base features as well as a development community which is continually releasing more and more addons. There is no reason to feel overwhelmed setting up your site with Drupal, there is plenty of documentation as well as a support forum to help you with an issues that you may have.

by: Adam | 15-Mar-2008
Washington Post News

Biden: Iraq Must Show Progress
Vice president warns Iraqi officials U.S. support of Iraq could end if country descends into violenc...

Palin Plays by Own Rules, Again
Analysis | But are her rules those of someone capable of winning GOP's presidential nomination?

Palin to Resign as Gov., Citing Probes, Family
Decision to step down by end of July stuns political establishment, provides endpoint to this chapte...

more Washington Post articles »
 
Ars Technica

Light touch: a design firm grapples with Microsoft Surface
For most, the traditional combination of mouse and keyboard is not just a mode of ...

E3 2009: Who won? Who lost? Who wins a golden Ars?
Is E3 really finished? After weeks of planning and scheduling, a frenzied four days...

Panel report: opening up government to better data
The Orwellian-sounding Committee on National Statistics (CNSTAT, part of the Nation...

more Ars Technica articles »

  








Links
Lost Podcast with Jay and Jack

get firefox

Class B

"Never increase, beyond what is necessary, the number of entities required to explain anything" - William of Ockham