Sunday, August 15, 2010

git

If you want to remove a file from the repository, but keep it in your working directory, simply use:
git rm --cached

Wednesday, July 14, 2010

URI query string for POST

Question - is it ok to do a post with query parameters in the URI... eg. the URL people include in our notify POST - can it be http://bla.com/notify?applicationId=234324

Answer - the spec seems to allow it - it can be considered as extra "scoping" information in the URI

so the query string is used for scoping, the post body is the actual data that is being sent to the server

see

http://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not

Sunday, April 25, 2010

Resetting oracle xe system password

sudo su - oracle
if $ORACLE_SID not set
cat /etc/oratab
ps -ef | grep smon


. oraenv

enter XE for the ORACLE_SID and set ORACLE_HOME as install dir (look it up in /etc/init.d/oracle-xe)

then run

sqlplus / as sysdba
alter user system identified by newpassword;

Tuesday, February 16, 2010

How do sessions work in java?

Are there any problems with using cookies?

Saturday, August 8, 2009

If you want to put your code in lib/ but you have your features and steps under features/ .. create a file called features/support/env.rb with the following (cucumber will load and run it)


:.unshift File.dirname(__FILE__) + "/../../lib"
some xml

SICP #1

Lecture 1

fixed point - finding the fixed point - take a guess, then apply the function
successively til "it doesnt change much" - how does this work? what does it mean?

eg. use fixed point method to find sqroot - find fixed point of average(x, y/x)


higher-order procedures take as inputs and outputs, procedures

generic operations - eg the many interpretations of '+'

2 ways of dealing with large scale systems
- oo
- operations on aggregates - "streams" eg. a signal processing engineer designing a large electrical system

another way to handle complexity - design a new language that highlights salient things and hides irrelevant detail

"meta-linguistic abstraction"

Three things about a language:
- primitive operations
- means of combination
- means of abstraction - how to make larger order primitives

lisp
definitions are just expressions

lambda - "make a procedure"

key thing about lisp - there is no arbitrary distinction between things that are primitives and things that are defined

case analyses

(DEFINE (ABS X) (COND ((< X 0) (- X)))

lisp - you can define all other constructs for it


(DEFINE (TRY GUESS X)
(IF (GOOD-ENOUGH? GUESS X)
GUESS
(TRY (IMPROVE GUESS X) X))))


recusion - go on ininitely - fix point?

summary

what we are doing is "expressing imperative knowledge"

Wednesday, June 24, 2009

Rails Webapp stuff

Configuration: db
Db migrations
Active record
Validations
Controller, routing
View, layouts
scaffold now generates useful code
Helper functions in views
Sessions, storing sessions
Error reporting and logging - the "flash"