function date(man, woman)


if(areCompatible(man, woman) == true)


haveFun(man, woman)

beFriends(man, woman)

makeLove(man, woman)

return evaluateMarriage(man, woman)


elseif(areCompatible(man, woman) == false)


haveFun(man, woman)

beFriends(man, woman)

return beHappyAsFriends(man, woman)




* If there’s an error, split the objects up,

* send one to beMiserable()

* and the other to beUnreasonable()




Activate Windows 7 after using an Upgrade disk

I like it!

Windows 7 is great! I’ve been playing around with the beta at work for a while and I’m pretty impressed. So impressed that I actually BOUGHT the FAMILY PACK! That’s right, I bought 3 copies of Windows 7! That’s gotta tell you something! It installed flawlessly on my MacBook Pro, my Mac Mini, and my trust custom PC. I didn’t have to hunt for a single driver.

Uh.. there’s a problem here..

Since I actually own several copies of Windows XP, I bought the Upgrade version of Windows 7. The box says:

If you are upgrading from Windows XP, you will need to back up your files and settings, perform a clean install and then reinstall your existing files, settings, and programs.”

Not a problem, it’s never a good idea to upgrade over your existing stuff anyway, It’s like building a new house on a rotten foundation, so I ALWAYS do a fresh install. And that’s just what I did, I erased my hard drive (after backing everything up!) and installed a fresh coat of Windows 7. However, when it came time for me to activate, I got a nasty message saying that I didn’t have the right license to do a fresh install.. and I COULD NOT ACTIVATE!

Lucky for me, I have a good friend named Google that told me how to bypass this little GLITCH! Here are the steps you need to take if you run into the same issue.

  • Once you have reached the desktop, click Start, type: CMD
  • Right-click CMD, click ‘Run as administrator’
  • At the command prompt, type, regedit
  • Go to HKLM/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/mediabootinstall
  • Changed its value from 1 to 0
  • Go back to the Command Prompt, type the following: slmgr /rearm
  • Restart the PC and use the activate windows to re-enter your product key

And that should do it! It’s a silly thing, but Microsoft can’t get everything right.

I’d like to thank Andre Da Costa for posting that tip on a forum somewhere.

How to get SproutCore running on Ubuntu 8.04

I had some issues getting it running.. so here’s what I done did to fix it.

Open up a terminal, crack your knuckles, then:

  1. sudo apt-get install ruby
  2. sudo apt-get install rubygems
    • You also need rubygems, since sproutcore is such a gem.
  3. sudo apt-get install ruby1.8-dev
    • You’ll need this in order for some things to compile during install.
  4. sudo apt-get install build-essential
    • You’ll need this in order for some things to compile during install.
  5. sudo gem install sproutcore
    • Hey look, we’re installing sproutcore finally!
  6. sudo nano ~/.bashrc
    • For some reason, Ubuntu doesn’t know to look in the Ruby bin folder so we need add this line at the very bottom of the .bashrc file: export PATH=$PATH:/var/lib/gems/1.8/bin
  7. Save the file (CTRL + X), and close the terminal.
  8. Open a new terminal and type sproutcore poop and hit enter.. yay, it worked?

*note: When presented with the option, I always chose the ruby install, not win32 or jruby.

Now to go and learn, my friend.. LEARN!

Zemanta Pixie

I’m a cunning Linguist!

A graphical depiction of a very simple css document

Image via Wikipedia

I’m on a mission from God

During the last year, I’ve been on a quest.. a quest to learn the next best thing in programming. I’ve taken trips here and there to engage in week-long training courses, boot camps, and so on. For the last decade or so, I’ve been a .NET programmer, I’m not the best, by far, but I’m not the worst either. I know enough to do any task I’ve ever needed to, and what I don’t know I at least know how to look up.

Stick with what you know!

.NET is a fairly simple technology to use, and I enjoy it, but I don’t want to be one of those developers that puts all his eggs into one basket, then ends up out on the street when a new technology comes around and becomes the next hot thing. I’ve tried quite a few technologies, so before I forget them all.. here’s what I’ve dabbled in:

  • Flex:
    • + Uses Flash for UI, so it looks EXACTLY the same in every browser!
    • + You pretty much DRAW the UI, so it’s easy and, dare I say it, FUN!
    • – No direct ability to talk to a database.. how limiting!
    • – Flex 2 didn’t talk with .NET very well, you needed a middle-man (WebORB) to do any real work and that was a real pain.
  • Silverlight:
    • + Works with .NET
    • – It’s Microsoft‘s version of Flash, not many people have it on their computers!
    • – Not nearly as fun to “Draw” your interface as Flex.. why couldn’t Adobe and Microsoft just work together?!
  • Ruby on Rails:
    • + Easy to learn
    • + Intuitive
    • + Uses MVC
    • – Doesn’t run on IIS.. easily.
    • – Requires supreme geek abilities to publish it on your own server.. I enjoy sunlight too much.
  • PHP:
    • + By far the most popular language on the web.. tons of supporting documents
    • + Fairly easy to learn
    • + Works with IIS!
    • – Uuuuugly! Anyone who codes in it has nightmares.
  • Jaxer:
    • + Javascript on the client AND server!
    • + No need to know anything other than HTML, CSS, and Javascript!
    • – Doesn’t play well with IIS
    • – Performance and scalability haven’t been tested.
    • = I’m keeping an eye on this one.
  • Django:
    • + Easy as heck.. a web framework for Python
    • + Actually had fun coding in it.. that’s rare.
    • + Uses MVC
    • – Doesn’t work at all with IIS! Damn!
  • SproutCore:
    • + An AJAX framework, used by Apple
    • + Creates Javascript code to do a lot of work for you on the client.
    • + Uses MVC
    • + Integrates well with server-side technologies
    • Mac required; I’d have to do the .NET stuff in Windows, and SproutCore on a Mac.. doesn’t sound fun! (They’re working on Windows compatibility though.) Update 2008-06-18: Now works with Windows.

What else you got?

I think that’s it. I may have forgotten something though, I have tried a lot. I don’t regret any of it though, I’ve learned tons about these technologies and, more importantly, about myself as a developer. If nothing else I know I’m not one of those developers that looks down on anyone not using what I’m using. Each technology has strengths and weaknesses and it’s up to the developer to choose the right one for the task at hand.

So what, you think you’re better than me, punk?!

Yes.. I am.. get over it.

Zemanta Pixie

Displaying IP address with Javascript

Sometimes you need to check the users IP address and want to use Javascript to do so, bu Javascript has no way of getting that info. That’s why I’ve created a simple script that allows you to access the IP via JavaScript.
Simply copy this to your HTML:

<script src=””></script>

That will return a simple JavaScript variable named myIP which contains the users IP address. API for ASP.NET (VB)

Below is the code needed to use’s API which is in REST instead of .NET’s webservice standard, SOAP.

Usage is simple:

  • copy the function to your page
  • Import System.Net
  • call the function while passing the required endpoint and your valid diggKey ( a standard url like: )
  • it will return a DataSet with the required info!

Thanks to for providing the C# version of this!

Shared Function diggRaw(ByVal myEndPoint As String, ByVal diggKey As String) As Data.DataSet
  Dim myURL As String = "" & myEndPoint & "?appkey=" & diggKey
  Dim myReq As HttpWebRequest = WebRequest.Create(myURL)
  myReq.UserAgent = ".Net"
  Dim myResp As HttpWebResponse = myReq.GetResponse()
  Dim myStream As New System.IO.StreamReader(myResp.GetResponseStream)
  Dim myDS As New Data.DataSet("Digg")
  Return (myDS)
 Catch ex As WebException
  'If there's an error, return a dataset named "Error"
  'You can just check the .DatasetName to see if it's an error.
  'If it IS an error, Table(0).Row(0).Item(0) will contain the message.
  Dim myError As New DataSet("Error")
  Dim myTable As New DataTable("Error")
  Dim myRow As DataRow = myTable.NewRow
  myRow("Message") = ex.Message
  Return (myError)
 End Try
End Function