WTFisThisRegister, Beginner’s Flask App: Dictionary based on Flaskr (uses sqlite3) and deployed to Heroku

Over the course of a night and morning I built a small flask app (Flask is a micro web framework for Python. Django is similar but more heavy-duty). It is essentially a dictionary. You can search for an entry by its keyword, or view the helptexts for all the entries, or (if you are logged in) add and remove entries. It is a straightforward derivative of excellent the Flaskr tutorial.

For me, I am really proud of this app even though it is dirt simple and not much to look at because this is the first time I really interacted with a database in a programming language.

The intent was to make a database of documentation for the AVR Atmega328P microcontroller. However, since then I have decided to move to using a mediawiki (sample page).

The app may be seen live at salty-retreat-5363.herokuapp.com. The username is “admin” and the password is “default”. The database gets wiped at least once every 24 hours.

If you’d like to run the app locally and play around with source code, please see https://github.com/nouyang/WTFisThisRegister for detailed instructions. That page also details how to deploy this app (or similar ones, such as Flaskr) to Heroku. I used http://dillinger.io/ to play around with markdown online and learn it and actually document this project with a proper README.

Things Learned

Here are some things I learned in the course of making this:

  1. Gitignore files need to be created before you run “git add .” — in general, the line telling it to ignore a file needs to exist before you added it to the version control, git won’t automagically remove it for you.
  2. Heroku DOES play with sqlite3 but not happily, for instance the database will be wiped at least once every 24 hours. See https://devcenter.heroku.com/articles/sqlite3.
  3. Virtualenv does NOT like spaces in your directory path! This was tricky to debug as even in -v verbose mode the full path for my virtualenv packages was shortened and so I couldn’t even notice that my path had spaces in it.
  4. Databases use cursors.

The Process

Here are some images from the process. Click on them to view them in full resolution.

1. First I started out just using a dictionary (no database involved) and a single hello.py file.

2. I then followed the Flaskr tutorial. After doing so I wanted to modify it so that the text was monospaced and preserved whitespaces, because it doesn’t by default.

I used the “pre” tag at first.

but soon switched to using CSS.

This actually caused me a lot of headache later troubleshooting why there was random whitespace in my design, because I didn’t restrict where the CSS was applied enough. So much whitespace:


 In the end I had this file: https://github.com/nouyang/WTFisThisRegister/blob/master/static/style.css

.helptext { preserve whitespace with wrapping CSS }

and the corresponding code in the html file was

 <div class="helptext"%gt;
{{ entry.helptext|safe }}</div>

3. I wanted to be able to delete entries, so I added a delete button.

In show_entries.htmloops can’t show it because blogger can’t escape this HTML properly :/ In the main python file:

@app.route('/delete', methods='POST'])                                                                                         
def delete_entry():
if not session.get('logged_in'):
abort(401)
g.db.execute('delete from entries where keyword = ?', [request.form['entry_to_delete']])
g.db.commit()
flash('Entry was successfully removed')
return redirect(url_for('show_entries'))

The “?” is a safe why for sqlite3 to accept text (in this case, whatever was entered in the form with the name entry_to_delete).

4. I learned to play around with the database to test my SQL commands in the terminal:

 $ sqlite3 /tmp/flaskr.db
sqlite> select helptext from entries where helptext='PCMSK0'

5. Finally I added a search functionality to the site:

@app.route('/search', methods=['POST'])                                        
def search_entries():
keyword = request.form['searchterm']
cur = g.db.execute('select helptext from entries where keyword = ?',
[keyword])
result = [dict(keyword=keyword, helptext=row[0]) for row in cur.fetchall()]
return render_template('search.html', result=result)

And set the homepage to be the search page:


@app.route('/')
def show_search():
return render_template('search.html')

6. I learned about initializing databases, namely by dumbly thinking I needed to include the flaskr.db file and no schema.sql file in the repository to allow other people to get it working on their systems. Actually, I was just missing a line, “init_db()”, before “app_run()”. In the end I am still keeping it without that line so that I have persistence in the database (I can stop the server and restart it and the database entries will still be there).

All in all I learned a lot! Do browse through the source code and play it with yourself if you’d like.

 =========================================

Liveblog Notes (kept here for reference)

http://flask.pocoo.org/docs/quickstart

http://maximebf.com/blog/2012/10/building-websites-in-python-with-flask/
https://github.com/trtg/flask_assets_tutorial

(did not use: http://www.realpython.com/blog/python/python-web-applications-with-flask-part-ii-app-creation/)

http://flask.pocoo.org/docs/tutorial/introduction/ Ah! Here’s the hands-on quickstart.

Hmm, well now the newlines show up but long lines aren’t wrapped.
To fix:
http://stackoverflow.com/questions/642140/retain-newlines-in-html-but-wrap-text-possible

.page { width: 70%;
min-width:35em;
border-radius:5px;
}

Modifying the database name: How are you supposed to properly do this? I just deleted /tmp/flaskr.db and then ran in the shell:
sqlite3 /tmp/flaskr.db < schema.sql

and things seemed to work again.
Include a delete button in the future:
If you don’t want your data wiped clean, DO NOT do 
$ python
>>> from flaskr import init_db
>>> init_db()
Instead, to play with sqlite3 commands,
sqlite3 /tmp/flaskr.db
And then use the same commands as in flask, but with semicolons.
So to lookup something we need the WHERE command:
e.g. for me it is:
select helptext from entries where keyword=”PCMSK0″;
Uhm, okay, now how to display it in my flask app?
ahh what are database i am so confused
http://www.zetcode.com/db/sqlitepythontutorial/
http://docs.python.org/2/library/sqlite3.html

Let’s install the AVR eclipse plugin
http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_GCC_Toolchain#Debian_and_Ubuntu
http://www.instructables.com/id/How-to-get-started-with-Eclipse-and-AVR/step13/Quick-Tour-Of-Cool-Features/ (windows)

sudo apt-get install eclipse (270+ MB! sigh)

sudo apt-get install gcc-avr binutils-avr gdb-avr avr-libc avrdude

http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download

Heroku deploy
http://flask.pocoo.org/docs/quickstart/#quickstart-deployment
https://devcenter.heroku.com/articles/getting-started-with-python

  1. Install heroku toolchain
  2. Login to heroku
  3. Install and activate virtual environment
  4. Install dependencies (why do I need gunicorn? not sure) 
  5. Make a Procfile
  6. Run foreman and check in browser that app is up on localhost
  7. Download the python .gitignore and add the “venv” line to the top
  8. my own step: add to github, git remote add origin https://github.com/nouyang/WTFisThisRegister.git

https://help.github.com/articles/ignoring-files
OH. The .gitignore file does NOT go in the root directory directly. No wonder everything failed and I just had to delete my github repo and also the .git folder in my root directory.

Instead,

For example, you might create the file at ~/.gitignore_global and add some rules to it. To add this file to your cross-repository configuration, run git config --global core.excludesfile ~/.gitignore_global. Local per-repository rules can be added to the .git/info/exclude file in your repository. This method can be used for locally-generated files that you don’t expect other users to generate.

Wait, but what if there’s one file, e.g. a passwords for the database file, that I don’t want to commit? Maybe it’s just messed up because I did the git init and then added the gitignore file or something funky, I don’t remember. http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring

Okay, so now I want to pull the config parameters (passwords, admin usernames, secretkeys) out into a separate file that is gitignored.
Done. Created a file called databaseconfig.py, added the line “from databaseconfig import secretkey, username, password” to the main python file.

Oh I should generate a real secret key
http://stackoverflow.com/questions/18247971/print-python-os-urandom-output-on-terminal
python
>>> import os, binascii
>>> binascii.hexlify(os.urandom(24))

Whoa they actually mean create the file ~/.gitignore_global, not create ~/.gitignore_global/.gitignore
Whoops.

http://stackoverflow.com/questions/4824188/git-ignore-vim-temporary-files
Also, vim and gedit create swap files not covered by github’s gitignores, so add

*~

and

*.swp
*.swo

to ~/.gitignore_global

Yes! Succesfully used .gitignore for once.

(venv)nrw@nrw-PC:~/projects/WTFisThisRegister$ git commit -m “init”
[master (root-commit) 35b1400] init
 10 files changed, 228 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 Procfile
 create mode 100644 README.md
 create mode 100644 WTFisThisRegister.py
 create mode 100644 requirements.txt
 create mode 100644 static/style.css
 create mode 100644 templates/layout.html
 create mode 100644 templates/login.html
 create mode 100644 templates/search.html
 create mode 100644 templates/show_entries.html

Now add it to github.
git remote add origin https://github.com/nouyang/WTFisThisRegister.git
git push -u origin master
Okay, now to finish the heroku deploy.
heroku create 
git push heroku master

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Whoops I need to add this computer to heroku.
https://devcenter.heroku.com/articles/keys
$ ssh-keygen -t rsa
/home/nrw/.ssh/id_rsa already exists.

Whoops, let’s not overwrite that, maybe it will break github. 
cat ~/.ssh/id_rsa.pub
and copy that into heroku under Account (https://dashboard.heroku.com/account).
Alright, let’s try pushing to heroku again.

—–> Launching… done, v3
       http://salty-retreat-5363.herokuapp.com deployed to Heroku

Yay!!
Oh noes. It doesn’t work on heroku… Is that because I gitignored the databaseconfig.py file and so it doesn’t exist on heroku?
Guhuhuh I guess I should learn to use github branches.
Okay nevermind, I found a better answer than having two branches to maintain and update if I ever change anything (bletch).
This gives a clear explanation and example: https://devcenter.heroku.com/articles/config-vars
So in the main python file I put
SECRET_KEY = ENV[‘SECRETKEY’]
and then in the terminal I type
heroku config:set SECRETKEY=blahblah.
Then, git add, git commit, and then git push heroku master.
NOPE that didn’t fix it ;____; wahh I am sad.
Let’s research….

http://stackoverflow.com/questions/18037027/flask-app-failing-on-heroku-but-working-with-foreman
WHOA good point I forgot to turn debug off! Whaaaa. Okay that is terrible of me.
# configuration
DEBUG = False
WAH. still sad.
Let’s try to fix foreman by adding the var to .env… Does that work?
.env does not like spaces around the equal sign assignment operator!
S3_KEY=mykey
NOT 
S3_KEY = mykey
Oh! Make sure to add “import os” to the main python file if we are using os.environ. DUH.

Note: Only today I realized that in pasting URLs from the location bar in chromium-browser (ubuntu 12.10) into blogger, the URLs are automatically turned into hyperlinks, but they remain plain old text and I have to manually turn them into hyperlinks when I copy them from firefox, my main browser 🙁 Such a weird specific bug.

Ah? It still doesn’t work?? Why? It works locally on foreman, but not remote on heroku.

Okay, let’s look at the heroku logs.
https://devcenter.heroku.com/articles/logging
ImportError: No module named databaseconfig

Whoops. So a gitignore issue.
UGH. Everything becomes 10x more complicated when working in a virtual environment. Fine. I’ll take the hit and jump full out into non-localhost environment, where I can’t just run “python blah.py” I have to run “foreman start” and other issues. Because foreman looks for a “.env” file. But python does not. (http://stackoverflow.com/questions/12335488/cannot-use-environment-variables-for-settings-in-django)

The solution is to use os.environ.get() instead.

Okay, so I’ll just write a short if statement checking if os.environ.get() is None. 

SECRET_KEY = os.environ.get(‘SECRETKEY’) #for heroku deploys.                
if SECRET_KEY == None:                                                      
    SECRET_KEY = secretkey    

Great, now my config works in with both “foreman start” and “python WTFisThisRegister.py”.

Now to get databaseconfig to show up in heroku. Do I want to?
No. A cleaner solution instead of all this is to use try, importerrors. Since the present of databaseconfig.py can be used to indicate that we are running it locally.

ahhhh now the /entries works locally but there is an internal server error remotely. WHY.
http://stackoverflow.com/questions/8950674/debugging-a-flask-app-running-in-gunicorn

Instead of foreman start, just use foreman run python app.py if you want to debug your application in development.

 Maybe it’s an issue with gunicorn or procfile or whatever that stuff is?
 web: gunicorn WTFisThisRegister:app        
http://ryaneshea.com/lightweight-python-apps-with-flask-twitter-bootstrap-and-heroku
changed to
web: python WTFisThisRegister.py

Okay, still works locally but not remotely. Maybe it is a port issue. Sucks that these tiny changes debugging production (heroku environment) take forever to try (30 seconds for each time I git push heroku master)

2014-01-12T05:58:48.956357+00:00 heroku[web.1]: State changed from crashed to starting

Yay! Fixed ports issue.

AGH. Still internal server error. WTF.
http://stackoverflow.com/questions/7653010/import-sqlite3-with-python2-7-on-heroku
So sqlite3 could NOT be used on the previous version of heroku. However, I think it should be able to now?
https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
http://stackoverflow.com/questions/7784471/using-sqlite3-on-heroku-cedar-stack 
CANNOT. Ugh. So this is all pointless. Time to migrate to postgreSQL or something that supports sqlite3.

Sigh. I guess I’ll just submit a documentation issue about this whole fiasco.
https://github.com/mitsuhiko/flask/issues/949

Okay, looking into how other people deployed their flaskr projects.
https://github.com/mjhea0/flaskr-tdd
This person has a LOT of documentation and talks about jquery / AJAX. Todo for the future!

https://github.com/mjhea0/flaskr-tdd/blob/master/app.py
WAIT. WTF. It looks like you can use sqlite3, I’m just dumb and you have to include the databse in your root directly, not off in /tmp/ somewhere.

So, looks like DATABASE = ‘flaskr.db’

sqlite3 ./flaskr.db < schema.sql

Note that the way I have it set up — foreman locally will run with Debug = False, heroku will run with Debug = false, and python locally will run with Debug = True. A rather peculiar state of affairs, but fine for me.

Let’s debug the download-from-github install for the Readme.
$ virtualenv –distribute –no-site-packages venv
The –no-site-packages flag is deprecated; it is now the default behavior.
New python executable in env/bin/python
Installing distribute………………………………………………………………………………………………………………………………………………………………………done.
Installing pip…
  Error [Errno 2] No such file or directory while executing command /home/nrw/projects/t…env/bin/easy_install /usr/share/python-vi…p-1.1.debian1.tar.gz
…Installing pip…done.

Installing existing pip-1.1.debian1.tar.gz distribution: /usr/share/python-virtualenv/pip-1.1.debian1.tar.gz
fails. 
Nope, I’m using –distribute and it fails.

 http://stackoverflow.com/questions/10068388/virtualenv-returning-a-no-such-file-or-directory-error
sudo apt-get remove python-virtualenv
sudo pip install virtualenv

bash: /usr/bin/virtualenv: No such file or directory

Sigh.
sudo pip uninstall virtualenv
sudo apt-get install python-virtualenv
NOPE still get the error.
Spaces?
UGH. It’s because my path had spaces.

Gender Gap in Engineering: My Take (stop looking solely within the U.S. and do more active experiments instead of surveys)

Continuing the spate of blog posts, I’d like to write down my take on feminism, engineering, and the gender gap.

My overall thesis is that we should 1) stop looking solely within the U.S. and 2) do more active experiments instead of passive surveys to improve the current state of affairs, because rapid change is possible.

Countries with a Majority of Female Science Degrees and Other Surprising Statistics

Let’s start out with some surprising statistics from “What Gender is Science” (as a nicely laid-out pdf here) (I highly recommend read the entire article if any of the following statistics intrigue you):

in Indonesia, where 48 percent of engineering graduates are female (compared to a 49 percent share of all Indonesian college and university graduates). …
While American computer scientists are depicted as male hackers and geeks, computer science in Malaysia is deemed well-suited for women because it’s seen as theoretical (not physical) and it takes place almost exclusively in offices (thought to be woman-friendly spaces).

Of particular note, in several countries women earn the majority of science degrees! Tell that to anyone that tells you that the low percentage of STEM women in the U.S. indicates women are inferior at STEM.

source

One theory is that in developing countries, income matters more and there are fewer career choices, therefore women are drawn to engineering.

Next, note these historical graphs of women in computer science. Here’s one about the dismal state of affairs in CS:

source

Note in particular that in the 1970s in a single year there was a 4% increase in percentage of CS degrees awarded to women — rapid change is possible. But in CS in particular, the percentage of women in CS has steadily declined for the last three decades

source: page 33, Ch. 2, Gender Codes (here in PDF format if you have MIT certs) [1]

If you want to be enraged (or if you care about these issues at all), please listen to this riveting and passionate 8 minute talk which features the fact that in 1987 42% of programmers were women  [1] (or see first graph in picture above) and also features a bunch of really NOT classy ads.


Phoenix Perry – “Embodied play design and building a female developer community” – Open Hardware Summit 2013 from OSHWA on Vimeo.

Fun note, that is actually a page from the Cosompolitan Magazine! Oh how times have changed.

source 

That article is recommended reading too. 

Computer science has always been a male-dominated field, right? 

Wrong.

My main takeaway:
(A) Rapid change is possible.

(B) We should pay more attention to cross-cultural studies to understand what other countries / cultures have that the U.S. does not and attempt to replicate it in the U.S.). Many studies are focused solely on the U.S. or other developed countries (at least the ones covered in the SWE literature review I’ll talk about in a second), which seems shortsighted to me, although I can understand the reasoning (scientific rigor). Caveat: We have to be very careful that we don’t just draw broad conclusions (e.g. “Muslim culture encourages gender equality in math/science scores,” an analysis against here).

(C) It’s a shame that facts like the existence of countries with some measures of gender parity are not covered in engineering school — they’ll be covered in NarwhalEdu‘s intro to engineering course for sure. I’m going to make my own happy bubble on the internet free of some of the indignant ignorance you can find online.

SWE Lit Review

My reading of the Society for Women in Engineering’s Annual Literature Reviews 2011 and 2012 went along the lines of “look at all these contradictory studies we’re not really sure about anything.” I still highly recommend reading them, though, for upbeat attitudes like this:

These women (33 female Greek engineer-managers) also talked about their efforts to find ways to show why it’s actually _good_ to be a female engineer, how being female makes you a better engineer.

The lit reviews also force you to not just read studies that reinforce your existing theories. They’re available in some weird and annoying webapp here: 2011 and 2012, or as PDFs I uploaded to google docs here: 2011 and 2012.

I highly recommend reading them.

My complaint with all this studying is that much of it is so passive. Let’s send out these surveys and try to interpret the results. Oh oops guess what it’s really hard to interpret these results and these other people in this other part of the country get contradictory results. Maybe we should split the results by sex orientation or race or different categories of engineering or, wait everything is more complicated than we think.

Time’s a-wasting, friends. ^^ Let’s go out and try things in the world, and reserve analysis for plotting how we can radically change the status of affairs. That’s the plan, see you folks in two decades.

What follows is a small selection of the articles I have been reading as well as the sole footnote.

Wikipedia

For those craving some wikipedia, here are relevant articles (I have not read them all yet):

Feminine Engineer?

If you search from “feminine engineer”, the following blog posts pop up. I have excerpted a paragraph from each to entice you to click through and actually read them.

The Triplet State: Feminine, Female, and an Engineer

It’s almost as if society views being feminine, female, and an engineer as a forbidden quantum triplet state.  Even though quantum mechanics claims that a triplet state is impossible, it occurs.  In life there are always people to prove our preconceived notions wrong.  So maybe I am some sort of living dichotomy, a natural Frankenstein, of abstract-minded romantic and a systematic logician.  I am a Barbie-blonde cookie-cutter creation of femininity and a rebel fighting to fit in a male-dominant world.  So if I could chose two words to stereotype myself, I would chose female engineer.

Must a woman tone down her feminine side?

My 16 year old daughter adores math and engineering, and wants to be either a nuclear engineer, or a civil engineer. However, she is also a very, very girly girl who loves high heels, glitter, wearing pink, party dresses, and, well, just think Engineer Barbie, or Legally Blonde. She has been told that she will need to tone it down (a lot) if she plans to be taken seriously in engineering.

Female Engineering Student Stereotypes
An interview with MITERS‘s own Star Simpson!

On the subject of femininity, Star and I somehow got on the subject of shaving. As it turns out, neither of us shaves albeit for different reasons. To paraphrase Star, “it seems like a waste of time. Instead of shaving, I could be doing engineering – that’s what all of the guys are doing” 

… “A focus group of male engineering students told us that women in engineering were ‘nerdettes’ who are plain or ugly, despite visual evidence to the contrary [my emphasis]. Senior women engineers increasingly tried to look inconspicuous in order to avoid hostile or situationally-inappropriate attention from faculty and peers, or to avoid common accusations from faculty that they were flirting.  (National Academy of Engineering, 2006). 

… Or is the influx of women engineers changing engineering? It seems like everything is pointing towards women being changed by engineering but I so badly want it to be the other way around.

Why Being a Female Engineer is Awesome (Part 1)
(There is no part 2).

It’s actually kind of uncomfortable sometimes how much people love that I’m an engineer. One woman I met monolouged for a good 10 minutes about how she admired me for breaking down boundaries and making a difference. 

… Even less drunk people have the same reaction. I met a well respected author at a swanky awards ceremony once, and when she heard what my job was she said that engineering was “basically magic”  to her. Unfortunately it wasn’t J. K. Rowling,  because that quote would have been extra awesome. But as it stands, I’m pretty sure only engineers and magicians can claim that people think they have some super human powers. I mean,  just look at Iron Man.

True Child | Femininity & Science, Technology, Engineering, Math
A collection of some interesting research papers on this topic (complete with abstracts).

http://techcrunch.com/2013/10/10/how-harvey-mudd-transformed-its-computer-science-program-and-nearly-closed-its-gender-gap/
Dr. Maria Klawe is the lady who has achieved near-gender parity in Harvey Mudd’s CS program since becoming president in 2006 (less than a decade ago!).

Why female H.S. not study engineering
1) it’s boring
2) won’t be good at it
3) wouldn’t want to hang out with dorks and nerd

Footnote

[1] 42% number is from the book Gender Codes, page 32:

In 1987, computer systems analysts comprised 34% women, while computer software developers (e.g., programmers) comprised 42% women. Incidentally, computer systems analysts have also been better paid on average than computer software developers on average, between 1971 and 2006.

If you want to dig deeper and get the raw data, I was able to find the data for the bottom graph, % women with CS majors, in publicly available NSF data. The Gender Codes book looks at data from 1966-2006, the latest data is here (1966-2010). I believe the author used #33 “computer sciences” under “Field of Degree.” (PDF, XCL, image preview:

or in percentage form here).

I could not, however, find the relevant Bureau of Labor Statistics for the graph from which the 42% statistic is drawn. The citation in Gender Codes is a terse “13. Bureau of Labor Statistics Database, accessed May 2008, courtesy of Peter Meyer.” and I was not able to navigate the BLS site sufficiently well to find this data. BLS does have a nice beta dataviewer in-browser tool, but it only had 2010-2012 data.

END FOOTNOTE.

….well, so much for building robots today.

cheap after-christmas makeup sales are great

hot on the tail of “to be feminine or not to be” (which remains unresolved although people have been emailing me interesting thoughts) i would like to announce that after-christmas makeup gift kit sales are the best! they’ll probably also give me skin cancer in 10 years but whatever I’m only wearing them at home anyway.

target had E.L.F. makeup which was pretty cheap ($1 to $3 items for things that usually cost in the $10 range, e.g. mascara or eyeshadow). HOWEVER! at Walgreens 50% off (for the most things, it was a bit tricky) Christmas Sale I found $1 for 24 colors of eyeshadow and $5 for 18 colors of nail polish!

upside-down for more brain flexibility!

 so great. all the nyan will soon be mine. mwahaha

after being home for a week i have also rapidly diminished the amount of time it takes me to apply eyeliner, and hopefully i will not be interested beyond the basics of makeup. so i think this phase of my life should be pretty short. maybe up-dos (hair) are next. MAYBE IN A YEAR I WILL LIKE SPORTS. ahhh fake identity crises are so much more fun than the real thing

anyway so i can spend 5 minutes and troll the world so great.

look i’m trying to be feminine in the safety of my house where guys I interact with won’t get the wrong idea (although my parents will get the wrong idea that I am doing it to find a boyfriend =__= NOT. I’m doing it to troll the engineering world*) and I won’t be harassed on the street. bring it on internet haters. in the picture but probably too grainy to tell: earrings, lip stain + lipstick, nail polish, eyeshadow, eyeliner.

*EDIT: Actually I feel the need to more explicitly state my feelings on this matter. (A) I’m an engineer from MIT working on my own company. Really, whoever I date had better not think that my appearance is more important than my other characteristics. (B) The whole idea of doing things because they “appeal to guys” is just plain insulting to me. I put on makeup to have fun with identity and appearances — that is, I do things for myself, not out of subservience to some abstract male opinion of me. (C) It also sucks that society devalues being single, as if we are somehow broken or less happy if we decide to focus on work instead of relationships. My friends and I are not daunted by the prospect of never finding a partner, because we are happy by ourselves, and I think we are better off for it. END EDIT.

Although I must admit that when I had rainbow hair

thanks Annie!

(but was dressed in my normal no-makeup, free [male] tshirt, jeans) in Cambridge, MA, and MIT the only comments I ever got to my face were very positive (“your hair is awesome!” along those lines). so maybe the world is great so long as I don’t wear a skirt! WE’LL SEE system identification on the real world for the win. let’s give it some feminine input and see the output.

Judy taught me this trick: put a base coat on and then after the first coat dries put on a coat of glitter!

some day soon i will write a longer story about how awesome feminine people like Jordan and Maja and Judy broke the stereotype in my head that feminine = incompetent / ditzy. because they are some really fantastically competent people. and then i was like WHOA FASCINATING NEW WORLD and then here i am.

also people spend so much time on sports / games, why is spending time on makeup considered for “non-engineers”? yea, stop and think about that. the only plausible reason is because it’s associated with being feminine and therefore stereotypically inferior.

…i never thought i’d be a makeup person either.

the current plan is to be feminine half the time and a male hipster the other half of the time in the course videos

😛 okay just kidding I have no idea what I’ll end up doing, probably whatever I feel like when I wake up the day we film. We might even design the course so that there’s no facetime and it’s all handwriting.

ALSO EGADS I posted a selfie I don’t know how I feel about myself anymore

Happy holidays all!

projects blog (nouyang)