Skip to content

Instantly share code, notes, and snippets.

View andreineculau's full-sized avatar
:bowtie:

Andrei Neculau andreineculau

:bowtie:
View GitHub Profile
@andreineculau
andreineculau / gist:2549185
Created April 29, 2012 10:21
Books to sell

Books to sell

  • Introduction to Risk Management and Insurance Idag Mark S. Dorfman 150:-
  • Principles of Risk Management and Insurance Idag George E. Rejda 150:-
  • Macroeconomics - understanding the wealth of nations Idag David Miles , Andrew Scott 150:-
  • Principles of Corporate Finance Idag Richard A. Brealey , Stewart C. Myers 150:-
  • Study Guide for Managerial Economics and Business Strategy Idag Michael R. Baye 150:-
  • Managerial Economics and Business Strategy Idag Michael R. Baye 150:-
  • Applied International Trade Analysis Idag Harry P. Bowen , Abraham Hollander 150:-
  • Introduction to economic growth Idag Charles I. Jones 150:-
@andreineculau
andreineculau / gist:2647886
Created May 9, 2012 18:42
REST: filtering
If you have
/cars
/cars/{carId}
/individuals
/individuals/{individualId}
and then
/individuals/andrei
needs to link to my cars, which would be /cars?individual=andrei
(( side-tracking here: maybe http://api.garage.com/cars?individual=http://api.garage.com/individuals/andrei seems better since the URIs are the IDs ? wdyt? ))
@andreineculau
andreineculau / jira2branch.sh
Last active October 9, 2015 13:47
JIRA ticket to branch name
#!/bin/bash -e
# Usage # copy from browser "JIRA-205\nTicket title"
# $ jira2branch # echoes jira-205-ticket-title
# $ JIRA2BRANCH_TEAM=team jira2branch # echoes jira-205-team-ticket-title
# $ jira2branch team2 # override mode
# echoes jira-205-team2-ticket-title ignoring $JIRA2BRANCH_TEAM
OS=`uname`
@andreineculau
andreineculau / 1_reference_class_by_name.coffee
Created October 31, 2012 08:10
call static properties of the current class in coffeescript
class A
@temp: 'A'
constructor: () ->
console.log A.temp
class B extends A
@temp: 'B'
constructor: () ->
super
console.log B.temp
@andreineculau
andreineculau / gist:5037129
Last active December 14, 2015 05:40
http-status-codes-json vs http.STATUS_CODES (node built-in)
100 Continue
101 Switching Protocols
102 Processing
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
@andreineculau
andreineculau / 1.huh.coffee
Last active December 15, 2015 15:49
scope in JS
m =
x: 1
getX: -> @x
getX = m.getX
console.log m.getX(), getX() # 1 undefined
@andreineculau
andreineculau / gist:5426128
Last active December 16, 2015 11:18
Online projects/ideas revolving around github repos and gists
@andreineculau
andreineculau / fun.erl
Created April 25, 2013 13:57
Escape strings so that they are not treated as Regular Expressions JavaScript, Erlang
re:replace(Str, "[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\,\\\\\^\\$\\|\\#\\s\\&]", "\\\\&", [global]).
@andreineculau
andreineculau / gist:5970012
Created July 10, 2013 20:25
andreineculau: Programming is not only syntax/semantics. Leave that to a readability/simplicity benchmark. Focus on models, patterns, higher level stuff

rambling re: tweet

By no means do I want to sound assertive. I lack a lot of knowledge in the area, so please slap me and set me straight, teach me a thing or two. The only thing that I standby is that it is stupid to explain syntax, to re-invent syntax, to argue about syntax, to have a liberal syntax, etc. Whatever does not matter (i.e. produce added value) should be standardized IMO. Eliminate mundane topics from the discussion to elevate the quality level. There are better things to do. That said readability, performance, simplicity, portability, ... still matter. A lot, I'd say.

Dictionary to level-off the communication

  • syntax - something that a parser can recognize e.g. PEG; the string 'function'
  • semantics - something that a parser can associate syntax to. e.g. AST/parse tree; the fact that the string 'function' is associated with the concept of a function
  • higher level stuff - paradigms (OOP, FP, LP, etc), models/concepts (monads, clas