Wednesday, October 16, 2013

Books and Courses

A list of books and courses that I've found highly instructive.

Project Management
  • How to Run Successful Projects III - The Silver Bullet by Fergus O'Connell

Design

Programming Language


Largely inspired by this reading list on Agile.

Saturday, July 20, 2013

Sym Object Model

Might be a good idea to use the Javascript Object[1] for Sym's internal structure:
  • A JavaScript object is an unordered collection of properties.
  • Properties consist of a name and a value.
  • Objects can be declared using object literals.
  • Top-level variables are properties of window.
Imagine what it would be like if we can easily construct a Sym object simply using JSON notation.

Source:
  1. JQuery in Action

Sunday, June 30, 2013

Sym folders

Folder Structure

Sym
  \sym  : source code
  \test : testing code
  \docs : documentation

On Testing

Also like the idea of Thomas Andrews in [1] to put unit test code in the module itself:
if __name__ == '__main__':
   do tests...

References:

  1. http://guide.python-distribute.org/example.html
  2. http://stackoverflow.com/questions/61151/where-do-the-python-unit-tests-go

Add modules by specific path - e.g. for testing

import sys
sys.path.append('..')  # add path to module, in this case the parent directory
 

import some_module

Saturday, June 1, 2013

Python Tip - If you've accidentally deleted your .py files, all is not lost...

Recover .py files using uncompyle

If you've accidentally deleted your .py file, all is not lost. Use uncompyle to recover:

  git clone https://github.com/gstarnberger/uncompyle.git
  cd uncompyle/
  sudo ./setup.py install

  uncompyler.py thank_goodness_this_exists.pyc > recovered_file.py


See Also

Python Tip - Create and detach a child process

Create and detach a child process

Use the following code to create and subsequently detach a child process

  DETACHED_PROCESS = 0x00000008
  pid = subprocess.Popen([sys.executable, "longtask.py"],
                         creationflags=DETACHED_PROCESS)

  pid.poll()  # Returns: None if child still active
              #          returncode otherwise 


In Sym, a complex component will be made up of a parent process and related child processes. 

See Also


Wednesday, May 29, 2013

Using sym for notifications and predictions

As a follow-up on the sym workflow posted earlier,  here are some uses for sym.

Notification applications

The following will apply to any kind of notify-on-change kind of apps:
  1. Create sym check the price of gold continuously called say, goldpx
    1. Link goldpx to diffcheck
    2. Get sms notifications whenever the price of gold changes

Prediction applications

This is quite rough but does seem doable.
  1. Create a sym that's a neural network called say, nn
    • Set nn mode to train
    • Link goldpx to nn for a day or so. 
    • Set nn mode to predict 
    • Link nn to diffcheck
    • Get sms notifications whenever the neural network a change in the price of gold