Thursday, April 25, 2013

What have I learned so far?


  1. Getting people's attention on the internet is very difficult.  Try posting a lync on a Google+ community that you think matches your target audience and see how many people visit your site as a result.  Probably one or two people at most.  If you're going to paid route, it might be tempting to go with a service offering a lower cost-per-click than GoogleAdwords, but in my limited experience the less expensive services provide lower quality traffic.  Now I see why so many sites offer free content to attract attention.
  2. SEO is easier for static content then for dynamic content.  There are some amazingly ugly websites - poorly laid out and with tons of ugly ads, that do quite well.  Try googling "middle school math" and you'll notice that the first hits are just pages of links to other content.
Combining facts (1) and (2), I'm thinking that for my website, it would be best to create some static content that is free and open to the public.  In my particular case, I will use my web app to create some freely available HTML & PDF math worksheets.  Easier for Google to crawl (though it is possible to get Google to crawl JSON), and (just as important) other sites are much more likely to want to link to free content.... more links means improved search results.


Wednesday, April 24, 2013

Nice usability checklist

http://userium.com/index.html

Looking for beta testers!

I'm looking for math teachers who would like to use a web app to creates quizzes, tests, and worksheets aligned to the common core standards.  If you are interested in being a beta tester, please email me - I'm on gmail at lukas.halim.  If you're willing to try the site and provide feedback, I'll send you a $10 Starbucks gift card for your trouble.

Experimenting with Paid Advertising

I'm currently experimenting (meaning small amounts of $$$) with using the following paid advertising sites to direct traffic to www.mathtestnow.com:
  • Google AdWords.  Google is ubiquitous but, as this article explains, it also tends to be expensive.
  • BidVertiser.  I just put in a request with them today.  They offer a 20 dollar free credit (if you enter your paypal info), so I figure I have nothing to lose.  One thing I dislike about them - they offer a "Toolbar creator" - in my opinion those things are basically malware.
I haven't tried these yet, but I probably will:
  •  Outbrain.com: http://www.outbrain.com/ - it looks as though they focus on written content rather than webapps, so this may not be a good fit.
  • Virurl: https://virurl.com/ - it sounds like a decent concept, but my experience with it was very similar to this post, Is VirUrl Just a Haven For Click Fraud and Bots?  The cost-per-click is vastly less expensive than Google Adwords, but the quality of the clicks appears to somewhere between garbage and fraudulent.
Perhaps I should also try http://www.usertesting.com/, recommended by someone on quora.

Also, Google still hasn't crawled the site.  Given how much AJAX there is, I prbably need to read Google's article on how to make AJAX data crawlable and this stackoverflow explanation.

Finally, Udemy has a useful article on how to find beta testers.  In particular, I should try to find beta testers on the common core forums.

Tuesday, April 23, 2013

Progress

I'm continuing to work on www.mathtestnow.com.  Today I've mainly been focusing on cosmetic changes and getting the site indexed.  Here are a few specifics:

  • Allow users to switch from the logon page to the registration page without doing a page refresh.  Changes were made here: www.mathtestnow.com/user/index.php
  • Fixed a problem where the most recently added equation was not formatted by MathJax.  Added a pause after updating the AngularJS model but before calling the MathJax.
  • Trying to make it easier to understand what you are supposed to do when you come to the test creation page.  Previously you can only see one dropdown, but I changed it so that there is a pre-selected option... I think that makes it clearer how the thing works.


Friday, April 19, 2013

Launched!


Added a domain name and moved the latest code to production!  Here it is:

Next Steps
  • Figure out the priority for the following:
    • Technical Changes
      • Add more problem types - at least come up with a full slate of 6th grade
      • Add link to saved tests
      • Add editable headings
      • Allow users to delete questions
      • Allow users to reorder questions
      • Improve formatting of printed test
      • Add options for printed test
        • two column option
        • adjust space between questions
      • Allow users to regenerate test in single click
      • Add "proper" contact functionality
      • Browser compatability issues - IE8 in particular.
      • JSON security
      • Add google analytics
      • Add Stripe (should I just hold off on this and start with a 30 day free trial?)
    • Getting Beta users
      • Get traffic via google adwords
      • Search Engine Optimization
      • Bug people I know to take a look
      • Find math teachers or people working on the comon core and ask them to look
    • copyright / trademark

Thursday, April 18, 2013

Notes on O'Reilly's JavaScript Web Applications

Notes on JavaScript Web Applications

Link to code for Holla: http://github.com/maccman/holla
  • MVC
    • Model - the data and any logic associated with the data
    • View - the presentation layer. 
      • In a JS application, the view will HTML, CSS, and JS templates
    • Controller - the user interaction layer. 
      • "Controllers are the glue between models and views.  Controllers receive events and input from views, process them (perhaps involving models) and update the views accordingly.  The controller will add event listeners to views when the page loads, such as those detecting when forms are submitted or buttons are clicked.  Then, when the user interacts with your application, the event trigger actions inside the controllers." (pg 5)
  • ORM - Objection-relationonal mappling
    • Basically, how to convert a hierarchical object into record(s) in a relational database and vise versa

Notes on JavaScript

JavaScript Prototypes - "Each object has an internal link to another object called its prototype. That prototype object has a prototype of its own, and so on until an object is reached with null as its prototype." From JavaScript: The Good Parts, "In classical languages, objects are instances of classes, and a class can inherit from another class.  JavaScript is a prototypical language, which means that objects inherit directly from other objects."   From page 50, "In a purely prototypical pattern, we dispense with classes.  We focus instead on the objects.  Prototypical inheritance is conceptually simpler than classical inheritance: a new object can inherit the properties  of an old object."  Article by Crockford on Prototypical Inheritance


Lexical vs Dynamic Scope -  "In lexical scoping (or lexical scope; also called static scoping or static scope), if a variable name's scope is a certain function, then its scope is the program text of the function definition: within that text, the variable name exists, and is bound to the variable's value, but outside that text, the variable name does not exist. By contrast, in dynamic scoping (or dynamic scope), if a variable name's scope is a certain function, then its scope is the time-period during which the function is executing: while the function is running, the variable name exists, and is bound to its variable, but after the function returns, the variable name does not exist. http://en.wikipedia.org/wiki/Scope_(computer_science)#Lexical_scoping_and_dynamic_scoping.  Perhaps lexical scope can be roughly summarized as "scope as written" while dynamic scope is "scope as run."



Quote about JavaScript: "Many of JavaScript's featurs were borrowed from other languages.  The syntax came from Java, functions came from Scheme, and prototypal inheritance came from Self.  JavaScript's Regular Expression feature was borrowed from Perl." JS: TGP pg 65


Function Scope vs. Block Scope
"Most of the commonly used programming languages offer a way to create a local variable in a function: a variable that, in some sense, disappears when the function returns... Many languages take function scope slightly further, allowing variables to be made local to just part of a function; rather than having the entire function as its scope, a variable might have block scope, meaning that it's scoped to just a single block of statements."  JavaScript has function scope, not block scope.

Suggestion for JavaScript Global Variables
"I use a single global variable to contain an application or library.  Every object has its own namespace, so it is easy to use objects to organize my code." JS:TGP pg 97

Steps to Launch My Website

Steps to Launch
  • Add Save funcational
  • Add Print functionality
  • Load saved test
    • (currently it is just randomly loading one particular saved test)
  • Add Contact functionality, even if it is just a link to a gmail address
  • Fix formatting for sign-up page 
  • Get/choose DOMAIN NAME
    • connect domain name to amazon server
  • Logout button
  • check that you can't browse server directories
  • 30 day trial
  • Deploy code to prod

Can wait until after launch
  • Add google analytics
  • copyright / trademark?
  • Add more problem types
  • Add editable headings
  • Allow users to delete question
  • Add Stripe (should I just hold off on this and start with a 30 day free trial?)
  • Add "proper" contact functionality
  • JSON security

Project Progress

I'm working on a web app that will create printable (pdf) math tests.  My tech stack:
  • Server (WAMP for dev - very easy setup!, Ubuntu server on Amazon Cloud for prod)
    • PHP - I originally tried Django, but the user community seems a lot smaller than the community around PHP.  Also, it seemed like it was better designed for sites that host a large number of pages (like newspapers) rather than single page web apps like what I wanted to do.  Also, I tried to implement some simple AJAX and it was taking FOREVER... switched to PHP and I had AJAX going in under 30 minutes
    • MySQL - it would be nice to have a database that could easily store JSON, but I don't have time to investigate whether switching to MongoDB or similar would work
    • pdflatex - for creating pdf files with equations.  I spent a lot of time investigating whether it would be possible to create word documents (easier for the end user to edit) but eventually decided that there was no easy way to do this.  On my windows PC I'm using MikTex.
  • Client
    • Twitter Bootstrap - used to make things look semi-professional.
    • AngularJS - Used because the two-way data binding greatly reduces and simplifies my JavaScript code.  Before I made the change to Angular I was writing code to create the HTML, then go an write separate code to update the corresponding JSON.
    • JQuery or AngularUI - I haven't figured out yet whether I will need these
  • Other
    • Asymptote SVG - the dominant open source tool that allows you to problematically create publication quality mathematical images 
    • Payments - Stripe looks like the best in terms of cost and easy of use, but I haven't investigated this that much yet
    • Login system - I'm using Angry Frog's PHP login script
General Design
  • All of the logic for creating the math questions (using random numbers) happens on the server side.  I originally was doing with JavaScript on the client, but changed for the following reasons:
    • Preventing others from stealing my code
    • Future enhancement idea - entire test can be regenerated based on existing questions with new random numbers and a new pdf file can be created.
    • Code itself seems less messy this way
    • PHP page can automatically generate a set of all sample questions in JSON form all in one shot - nice for testing
Issues
  • Getting MathJax to play nicely with AngularJS.  I posted a question on StackOverflow.