Before I start telling you the story which led me to write on this topic, I feel I'm obligated to reveal the main idea of this post:
In order to copy programming homework, you mustn't be a dumb fuck. (And a few ways to avoid being one)
And now the story. I have a colleague (let's call him John) at work who also checks programming courses homework at my college. Our college is really harsh about students copying programming homework (you can xerox algorithms homework, but programming is a big no-no).
Friday, May 15, 2009
Tuesday, April 28, 2009
Opening a PHP to Java socket
In a project I've been working on recently we needed to integrate a functionality we have in a few Java classes we developed in to a PHP script. If those specific classes could be wrapped in a simple command-line app, it would not have been a problem, as you can execute command-line apps from PHP easily. But! These specific Java classes took very long time to load (around two seconds!) before they could be used.
Saturday, February 7, 2009
Accessing command line from PHP code
It is sometimes necessary (or easier) to execute command line commands from within PHP code, in this post I will show an example of such usage. If you only need an über-basic example, here it is:
This little piece of code will copy the running script to newfile.php. If you're not satisfied yet, keep reading.
<?php
$thisf = $_SERVER['SCRIPT_NAME'];
`cp $thisf newname.php`;
?>
This little piece of code will copy the running script to newfile.php. If you're not satisfied yet, keep reading.
Tuesday, January 13, 2009
Setting up the terminal (Ubuntu)
My first encounter with Ubuntu happened when I started my current job. In contrast to Fedora (the Linux distribution installed in school) it was easy and stable, and for the first time I really started to appreciate Linux. When I had to pick a distro to install on my laptop for Communication Applications course the choice was pretty obvious.
Subscribe to:
Posts (Atom)