Tiger Mom Lecture at Stuyvesant

I don’t know why I was surprised when I saw it: Amy Chua (Tiger Mom) will be giving a lecture at my old high school. I have a feeling there wont be too much support from the students despite the fact that many of them had the same kind of parenting she encourages. However I may be mistaken. berryjam.ru

Unfortunately tickets are $45 so I definitely wont find out.

http://www.shsaa.org/index.php?option=com_eventlist&func=details&did=165

Stuy ambitions

From this month’s Stuyvesant High School Alumni newsletter:

Among the additional allocation requests we would like to have the resources to fill this spring are:

  • Physics: Purchase equipment for ion/plasma thruster

I hope they’re making spaceships. Also, I regret never making a spaceship at Stuy.

Sample SMTP interaction

this is what happens every time you send an email, between the receiving server and the transmitting client – it’s kinda cute

the contents of the email are after server says “354 Enter mail…”

Server: 220 hamburger.edu
Client: HELO crepes.fr
S: 250 Hello crepes.fr, pleased to meet you
C: MAIL FROM:
S: 250 alice@crepes.fr… Sender ok
C: RCPT TO:
S: 250 bob@hamburger.edu … Recipient ok
C: DATA
S: 354 Enter mail, end with “.” on a line by itself
C: Do you like ketchup?
C: How about pickles?
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 hamburger.edu closing connection

How to Make Smartphone Apps

This month I will be holding several events teaching how to make apps in 7 steps using AppMakr – no programming required! Also, for every app you publish (using AppMakr or not) before June 15th, Microsoft will send you a $15 Amazon gift card.

Check back here soon for more details on dates and times of my workshops. I’ll also send a message to anyone who’s already RSVPed.

During the events we will be using the following guide to register on App Hub (app marketplace), create an app, and get it published for anyone to download and use.

https://coderoman.com/wp7/AppMakr_Student_Handbook.pdf

If you want to get started by yourself (a good idea since the registration process takes 1-2 days) feel free to download the guide and if you get stuck on anything I’ll be sure to explain it at one of the workshops. Or just make a post on the wall.

If you end up publishing an app yourself, fill out this form and send me a facebook message: http://j.mp/prizeclaimform

php wishlist script/app

Because I can’t help being self-absorbed and excited by all the presents I’m going to get for my birthday, and because I wanted to practice a bit with php, I made a PHP-based wishlist.

Basically it allows your friends to see your wishlist and get dibs on stuff you want so that multiple people don’t end up getting you the same thing.

It’s flat-file based because I don’t fully understand MySQL yet and I like not having to deal with a completely separate entity.

Files involved:

  • wishlist.csv – this contains all the stuff you want, with each line containing “item,description,link” with description and link being optional. Each time a person selects an item they’re going to get you, a wishlist2.csv is created with your original wishlist sans the item he/she picked, and then renamed to wishlist.csv.
  • index.php – reads wishlist.csv and creates a form with a bunch of radio buttons for each item you have
  • wishlist-form.php – processes the item selection and recreates wishlist.csv without the item picked, and shows a thank you message

Example of wishlist.csv:

prodeco bike,+ pegs + rack + fenders? (I LIKE EXPENSIVE THINGS SUE ME),http://www.bikemania.biz/Prodeco_G_Plus_Mariner_Sport_Electric_Bike_p/prodecotech_gplusmar_s.htm
running pants (small/sz 30),cause winter's too cold for shorts
raspberry drops,yummy yummy raspberry drops
origami,bonus points if made out of cash

Code for reading wishlist.csv and the form which displays it:

What are you going to get for Roman's BIRTHDAY??

Since bet everyone's just dying to get me gifts I made this little webpage to make sure no one gets me the same present. Cause who needs 4 electric bikes, amiright?

Whichever gift you pick will disappear from this page.

<?php $row = 1; if (($handle = fopen("wishlist.csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); switch ($num) { case 0: break; case 1: echo " $data[0]
"; break; case 2: echo " $data[0] - $data[1]
"; break; case 3: echo " $data[0] - $data[1]
"; break; } $row++; } fclose($handle); } ?>

Lastly, wishlist-form.php:

<?php
$aGift = $_POST['gift'];
if(empty($aGift)) 
	echo "

You didn't select any presents =(.

"; else { $fp = fopen('wishlist2.csv', 'w'); if (($handle = fopen("wishlist.csv", "r")) !== FALSE) { $row = 1; while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { if ($row!=$aGift[0]) { fputcsv($fp,$data); $row++; } else { $present = $data[0]; $row++; } } fclose($handle); fclose($fp); unlink('wishlist.csv'); rename('wishlist2.csv','wishlist.csv'); } echo "

Thanks for getting $present for me!

"; } ?>

You are the pride of [subject town].