Joshua's Thoughts

math problems for computer programmers

Tags: , , ,

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

lolcode - the dumbest programming language ever

Tags: , ,

http://lolcode.com/ is a new programming language derived from the lolcats “scene” - if such a thing even exists. ugg.

example:

HAI
CAN HAS STDIO?
VISIBLE “HAI WORLD!”
KTHXBYE

c++ equivalent
#include

int main () {
cout << “HAI WORLD!”;
return 0;
}

How to Pass Arguments to PHP in Command Line

Tags: , , , , ,

I did a little bit of searching this morning for how to pass arguments to php via command line because I was working on setting up a php script to run on a cron in Windows (using WAMP).

It’s actually pretty easy. Say your command line looks like this:

>path-to-php/php.exe path-to-script/script.php

Passing an argument to the php script would look like this:

>path-to-php/php.exe path-to-script/script.php arg1 arg2

PHP will read the arguments using the $argv variable. So in our example, $argv[0] would be the name of the script (script.php), $argv[1] would be arg1 and $argv2[2] would be arg2.

Another example:
>path-to-php/php.exe path-to-script/script.php 15

Say you just wanted to echo out the argument contents:

echo $argv[1];

Pretty cool. Here’s the forum post where I discovered this information.

CIT-120 Week 3 Notes - Output Manipulators and Character Arrays

Tags: , , ,

This week was all about output manipulators, character arrays, and an introduction to logic. We didn’t do a whole lot of review this week but Professor Delta did ask us what we thought about the logic games we did last week. Because most people responded positively to the games, she ended up giving us a homework related to another logic-based game.
Read on…

devunity is now in alpha

Tags: , ,

devunity is an area for developers to create projects and join projects that primarily revolve around social networking apps. for instance, if i wanted to create a new facebook application, devunity will setup all of the facebook framework and then let other users, including myself, work on the main functionality.

this is the second one of these i’ve seen in the past two days. there was a company here in nyc at the web 2.0 expo claiming to do the exact same thing. i’ll try to find the name of it later.

** found it: http://zembly.com/ **