MEET: Day 23 – Sports Day
July 18th, 2010Last Wednesday our students finished off the day with “Sports Day.” This involved such activities as soccer…
(super image heavy post, lots more under the cut)
MEET: Day 17 – Javascript Lecture & UI Prototypes
July 12th, 2010This post is coming 5 days late because a weekend trip to Tel Aviv and the World Cup final got in my way.
Last Thursday Shiri taught Y3 about Javascript, the wonderful language that makes the internet work.

Image heavy post – more after the cut.
WHOOOOOOOOOOOOOOOOOO!!!!!!!!!
July 11th, 2010
Simple online SQL client: PHP script
July 8th, 2010Yesterday morning I gave my Y3 students a lecture on databases, and when prepping I realized I needed an easy way to have them practice some basic SQL scripts. Fine, I thought, there must be something online I can have them use. So I went searching.
- phpMyAdmin – nope, too complicated.
- MySQL workbench – nope, installing software is too problematic.
- Command line – nope, too difficult for some of them. The real lesson would get lost.
aaaand that’s all I could find. What? I couldn’t just have them log in somewhere and run some queries? Harumph. I’ll just write one myself.
<?
$db_name = 'DB_NAME'; // The name of the database
$db_user = 'DB_USER'; // Your MySQL username
$db_pass = 'DB_PASSWORD'; // ...and password
$db_host = 'DB_HOST'; // The host of your database
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Database Access Script</title>
</head>
<body>
Type your query in here:
<form action="<?php echo $PHP_SELF?>" method="post" >
<textarea name="query" rows="10" cols="60" ><? echo (isset($_POST['query']) ? $_POST["query"]:"DEFAULT QUERY TEXT")?></textarea>
<input type="submit" value="Execute Query" />
</form>
<table cellspacing="0" style='border-width: 0 0 1px 1px; border-style: solid;'>
<?
if(isset($_POST['query'])){ //then process query
$query = $_POST["query"];
mysql_connect($db_host, $db_user, $db_pass);
@mysql_select_db($db_name) or die( "Unable to select database");
$result = mysql_query($query);
if (!$result) { //db returned an error!
$message = '<b>Error:</b> ' . mysql_error() . "\n";
$message .= '<br /><b>Sent query:</b> ' . $query;
die($message);
}else{
echo "Success!<br />";
$a = mysql_affected_rows();
echo $a . " rows were affected.";
//display column headers
echo "<tr>";
for($i=0;$i<mysql_num_fields($result);$i++){
echo '<th style="border-width: 1px 1px 0 0; border-style: solid; padding: 5px 20px 5px 20px; margin: 0; background-color: #CCC;">'.mysql_field_name($result, $i)."</th>";
}
echo "</tr>";
$num = mysql_num_rows($result);
//for loop for all rows
for($i=0;$i<$num;$i++){
?>
<tr>
<?
$row = mysql_fetch_row($result);
for($j=0;$j<count($row);$j++){
echo '<td style="border-width: 1px 1px 0 0; border-style: solid; padding: 5px 20px 5px 20px; margin: 0;">'.$row[$j]."</td>";
}
?>
</tr>
<?
}//close for loop for rows
}//close else
mysql_close();
}
?>
</table>
</body>
</html>
Voila. I just point my students to the URL and they have full access to the database.

MEET: Day 15 – Database Lecture
July 7th, 2010All photos in this post credited to Ben Chun! Thanks Ben. :)

Yesterday I started off by giving a lecture on databases to my Y3 students. Parts of it were a little tedious and, as expected, they had some difficulty learning joins, but towards the end… well, see for yourself. :)


For their final exercise, I set up a dummy database with a “students” table, and gave them these instructions:
- Put your information into the students table (INSERT statement)
- Change someone else’s name in the students table (UPDATE statement)
They then promptly got into a furious UPDATE battle with each other’s names. At one point everyone’s first name was “Adam” and everyone’s last name was “Rocks,” although that was quickly changed to “is gay.” Little scamps.
If you want, you can find my lecture slides here.
Oh, and a big ol’ shout out to my Y3 students who found my blog from our exercise today. Y’all are awesome!
MEET: Day 14
July 5th, 2010I am psyched! I had a wonderful day with my students, and I’m really excited to see this project develop. We started off with a lecture from Ben on Servlets:
He had a few labs for everyone at the end, which caused more trouble than expected. It’s only our first day of real class and there are definitely some hiccoughs left in the system. We got everything pretty happily worked out in the end, though.
This post is image-heavy. Click below to read the full entry.
MEET: Day 13 – 1st day of class & the 4th of July
July 4th, 2010You haven’t heard from me since the beginning of the month, and that’s because all of us were busy preparing for today – the first day we met the students! I was sooooooooo nervous this morning, and there were definitely a couple “oh shit I don’t know what I’m doing” moments, but over all things went really great! The kids are amazing; I’m really lucky to be teaching Y3. My students are all wicked smart, pretty mature, and already know what they’re doing (not to mention they’re all excellent English speakers). Unfortunately I didn’t get any pictures today, but my camera is definitely on the packing list for tomorrow!
Oh, and there was that other big thing marked by today – the 4th of July! As we are all a bunch of Americans (and one Canadian and one Singapore-ian) we decided to celebrate by doing the most American thing we could think of – we went to McDonald’s.
I have quite a few pictures in this post, so I’m going to cut it off here for the sake of all of you skimming through this on our MEET aggregator. You are following all of us, aren’t you?
MEET: Vampires: the 5 min lecture
July 1st, 2010We had to present a 5 minute lecture on any topic. I did the Android life cycle – you can find it here. But what you should really watch is this one.
:D Sorry, Justin.
MEET: Feed Aggregator!
July 1st, 2010There are a bunch of us who are blogging during our time here, so I created a place for you to read them all at once. Check out:
http://clarebayley.com/meet2010/
For all the MEET-related info you can handle! I’ll be adding feeds to it as the other instructors give them to me.
MEET: Day 9 – Falafel & kittens
June 30th, 2010That may be the best post title I have ever written. But really, that’s what happened today! We were in our regular classroom doing some group exercises this morning, and we heard a cat meowing. There are a lot of cats on the Hebrew U campus, so we didn’t think much of it at first, but it kept going and it was really loud. Eventually Mustafa went over to the window, pulled back the curtain, and lo and behold there was a tiny black kitten sitting there. Not on the windowsill, inside the room! It must have been there for the entire 2 hours we’d already been working, but it didn’t say anything until then. We moved towards it and it freaked and ran out of the room. We spent a fair bit of time trying to catch it but it really didn’t want to be caught, so we gave up and went to get falafel.

Why yes, those are french fries on top! Or chips, as they call them here. Sweet jesus they are delicious. You wouldn’t have thought falafel and fried potato would go together, but omnomnomnomnom. The amazing hummus and superb pita bread helps a fair bit too.
While I’m at it, here are the few photos I took while we were on top of the Mt. of Olives, before beginning our tour of the Old City. First, a spectacular view of the Temple Mount.

And then some camels.














