Day 3 Week 8 on JFLAP

  1. Fix can’t drag nodes after adding edges in TMEditor and NPDAEditor bug
  2. Edge label position update after adding edges
  3. In delete mode, when the label clicked has only one transition, the edge is deleted
  4. Click on label to delete in FAEditor
  5. getStackAlphabet and getTapeAlphabet functions moved to NPDA.js and TuringMachine.js
  6. Use ‘a,b;c’ form in NPDAEditor and ‘a;b,R’ form in TMEditor. The scenario here is to use ‘;’ to separate input and output

Day 2 Week 8 on JFLAP

Today I added NPDAEditor, whose UI is very similar to TMEditor I completed several days ago. For edit/delete edges I did the similar thing with TMEditor, just that the third column is for the user to type instead of choosing from L, S or R. Then I fixed several things in both files: users can now put in □ and λ by leaving an entry blank when creating or editing an edge; alphabets are not updated when users load files from local directories. One problem to fix is the alphabet does not update when users delete nodes using the right-click menu. I didn’t check but this is probably a problem for FAEditor as well. I will fix this tomorrow.

For the next step I’m going to improve the UI for traversal displaying in NPDA and Turing Machine editors. There are also some label position issues with both editors.

Day 1 Week 8 on JFLAP

    1. dragging boundary set for initial states. Initial markers now always appear
    2. one-click clear labels button added for FAEditor when coming back from minimization or conversion
    3. LaTex enabled in create exercise page. Instructors are able to type in LaTex such as m^n, which will appear as superscripts in exercises.

    1. edit and delete edges features added to TMEditor: in edit mode, clicking on a label will show a table containing transitions. Users can then change characters or delete transitions. Enter to confirm, Esc to cancel.


Class Database in Duke-CSA app

For the July 4th weekend I added the class database collected by CSA to the app. The database contains past students’ comments about classes at Duke. Since people in CSA wanted it in the app, I looked into this yesterday.

The ‘database’ is actually a Google form document. I downloaded as csv and then used an online converter to convert it to JSON, which can be read by iOS. To make the networking of the app consistent, I uploaded the JSON file to Parse instead of my own server. After getting the JSON asynchronously from the internet, I’m saving all of the ‘courses’ into the memory and load the UITableView. This doesn’t fill the memory because all information is just plain text.

I then classified the courses based on the first character of their class numbers and added an index list by the table view so users can go to courses with a certain starting letter by clicking on the index list. I also added a search controller with scope buttons, so users can search by class number, class name, professor of the class, or all of the above. Clicking on a search result or a normal course will bring the user to a detail view of the course, which presents all information we have about the course.

I really want to know how to let users ‘bounce scroll’ to the next class available. This will be very handy when they want to view the next or the earlier comment on the same class. Instead of going back to the table view, using only one gesture (scroll) will be a huge boost of user experience.

Progress Update on Duke-CSA iOS app

Since last time, there are several features that I added to the app:

  1. vote buttons highlight when clicked. They are configured in a way that shows the state of the user’s vote on a certain question/answer. For example, when the user already downvoted a question but then clicks on the upvote button, the downvote button will unhighlight and the vote is increased by 1
  2. in compose question/answer view, text views resize its content when the keyboard appears or disappears, so users can always see what they are typing.
  3. in the main view of the Q&A section, users can now choose to order the questions by vote or by post time. There’s also a nice slider underneath the buttons to show users’ current choice.

Day 5 Week 7 on JFLAP


  1. move traversal functions to TuringMachine.js
  2. move save/load file functions to TuringMachine.js
  3. add delete node function
  4. add undo/redo and cancel buttons
  5. enable right click to edit nodes
  6. drag to add edges: after dragging a box appears at the middle of the dragged path, just like JFLAP

Demo of TMEditor: