HNHacker News
TopNewBestAskShowJobs

danprager

47 karma · joined September 17, 2007

CTO at www.austhink.com

Work/software/family blog: dailykibitz.blogspot.com Martial arts: maaml.blogspot.com

"Show me the meta-programming!"

submissionscomments
danprager··on The best unknown activist investment of 2009
I put it down to a limitation of the Aussie (and other) stock exchanges. The shares had dropped to $0.01, when their true value was negative, given the stapled obligations that they carried. Bolton should have been paid to take on the debt in the first place.

A whole lot of other people apparently made the same transaction unwittingly, without reading the fine print, as it were. The sellers of the $0.01 shares were paid a peppercorn and washed their hands of the debt.

I reckon this is a problem for the regulators. Once the shares dropped below the value of the remaining obligations (give or take) a fairer price would be negative. Alternatively, trading should be suspended because there's a fair argument that the company is insolvent at that point.

Instead, this fact was hidden behind a little "complexity" and inadequate rules.

Bolton just took advantage of a broken situation.

danprager··on Why unit testing is a waste of time
Good, but overly long article. I have reached the similar conclusions in favor of functional tests over the last decade or so.

Personally, I have worked seriously used DBC, TDD, and automated scenario testing, and hybrids in that order of learning.

My conclusions about the sweet-spot (and this may vary depending on your area):

1. Automated functional testing in the large, and DBC in the small is a winning combo.

2. Special techniques for graphics intensive programming: I get my scenario tests to show what's happening on the screen, and I can slow 'em down and step through 'em

3. I never got a lot of dependency injection / mocks (like the author) -- not sure if I don't get 'em or application area is wrong

4. You need special techniques for intensive algorithmic code where there's a combinatorial explosion of cases and line coverage won't do; e.g. randomly generated test cases + compute intensive sanity checks

Bottom-line: Automated scenario tests exercise the code; DBC pin-points illegal states.

DBC = Design by Contract = pre-conditions + post-conditions + invariants. In practice understanding the method (this takes work) and writing explicit pre-conditions gives ~70-80% of the benefit. To do invariants well needs language support.

danprager··on Why unit testing is a waste of time
Kent Beck's book: Test-Driven Development

Don't just read it: Work your way through it. You need to follow the recipe to develop the discipline/knack.

Fairly quick and reasonably easy.

danprager··on Parsing Roman Numbers - Beautifully
Side-track: The Romans used IIII for 4, not IV, etc. which was introduced by early printers (not dot-matrixes ;-) to save space, so the original system was more additive.

Looked at in this light, you can see more easily how humanity progressed from tallying, to counting on fingers -- use fingers to tally up to four, take the thumb to represent five -- to the abacus and Roman numerals.

danprager··on Why MIT switched from Scheme to Python
They do work; they just don't integrate with the built-in types: Why should they?

Try instead:

  car(cons(1,2)) 
    -> 1

  cdr(cons(1,2)) 
    -> 2

  car(cons('a', cons(2, 3))) 
    -> 'a'
danprager··on PLT Scheme Blog: PLT Scheme v4.1.5
Well right now you are using an application -- Hacker News -- that is written in pg's Arc language which runs as an interpreter on MzScheme which is part of PLT Scheme.

Why don't more people use DrScheme, HTDP, etc.? This is a question about learning, culture, change, etc. more than any particular environment, method, etc.

danprager··on "Fake Steve Conroy" fesses up: Twitter satire of Australian Communications Minister
In the spirit of FSJ, intended in part to satirize Australian governmental attempts to increase internet censorship.

Some of the tweets:

"Apparently LOL means 'Laugh Out Loud' and not 'Lots Of Love'. Now I'm going to have to re-read all those internet comments about me."

"about to board my flight to Melbourne .. nabbed seat 1B! a person in a wheelchair was going to get it .. lucky IM CONROY! Trump card played!"

"When I Googled for information on how to circumvent surrogacy laws in Victoria, I bookmarked the results so we could ban the sites later."

"The filter is a community service; it's not just about removing content, we can also repair content. We can make it truthier."

"I don't think it's unreasonable to compare the National Filter Network to a cure for Super-AIDS; both of them protect children."

"Dear journalists; please do not continue to report on my enormous penis and ability to please the ladies. My personal life is off-limits."

"Today I received an I-Phone. The IT people tell me that it is biometrically activated, but no matter how much I lick it, it won't turn on."

danprager··on The Real Secret of Thoroughly Excellent Companies
There have been a few attempts to methodologize a more "consultative approach" to Sales, notably SPIN Selling, Strategic Selling and Solution Selling.

The last of these has been the most successful, and interestingly it was cooked up by a tech. support guy, Mike Bosworth, who was "persuaded" to try his hand at Sales.

I have tried to summarize the essence of Solutions Selling here: http://dailykibitz.blogspot.com/2009/01/distillation-of-solu... and have just released a product, bSelling, intended to support this kind of approach: http://dailykibitz.blogspot.com/2009/03/first-web-based-prod...

danprager··on Are app stores just another type of walled garden?
An app store gives somewhere for vendors to hang up their shingle (like a mall), and -- depending on the barriers to entry -- gives some assurance to "shoppers" looking for apps.

We've just launched a new business app, bSelling - http://bcisive.austhink.com/solutions/bselling, on Salesforce.com's App Exchange for add-ons to Salesforce CRM, and wish that there were more such stores.

It's actually a bit like the Microsoft stranglehold on the old PC software market; there were certainly negative aspects, but the standardization effect was certainly market-making.

danprager··on Experience report: Making the bSelling add-on to Salesforce & promoting it on AppExchange
For our first web-based product we (Austhink software) decided to go straight for integration with the web-based Salesforce CRM, and put it up on Salesfore.com's AppExchange marketplace.

We've only just got it up there, but I thought that our experience may be of interest to those looking to play in the "Enterprise 2.0" (i.e. cloud-based, single-sign-on, Saas, mashed-together apps) space.

danprager··on Lisp after Python after Lisp
Yes, these idioms would work in Javascript too.

I guess the point is that people are starting to discover that languages like Python and JS support these functional idioms quite nicely.

Remember when all the books on JS pretended that it was some kind of crippled cousin of Java (as the name suggests), rather than a Scheme-lite in Java-esque syntax (as its designer has opined).

danprager··on Zuora - subscription billing and recurring payments
We've looked at them. There service is pretty slick, and well-backed, but you need to pay a significant monthly fee (with 12 month lock-in) to get started, so you would want to have a good turn-over before going with them.

They seem to be set up for this scenario, offering services to change over from your previous system.

danprager··on Lisp after Python after Lisp
Yes, in that case the inner function has access to the arguments of the outer function. But you can go deeper -- e.g. declaring an inner function inside code inside the out er function -- which also knows about the local variables in the outer function.

Or if you're only doing it once use a lambda (with the same advantages).

danprager··on Lisp after Python after Lisp
Yes, "named let" is lovely, but perhaps less obvious for the non-cognoscenti. It also doesn't translate into Python, etc.
danprager··on Lisp after Python after Lisp
Learning Scheme helped my Python by teaching me some new (to me) idioms, besides the first-class function stuff.

For example, it is natural in Scheme to declare a lot of local information, including local function definitions. These have the great advantage of knowing about variables within the local environment. So rather than declaring an external function with heaps of parameters to pass in local state, you just declare a local function which automatically gets access to the variables in the surrounding scope.

The same idiom works neatly in Python too, but didn't occur to me previously.

* * *

Also after learning Python and Scheme, Ruby felt a bit like a cross between the two, and quite comfortable.

danprager··on Heist: a Scheme interpreter written in Ruby
"A big barrier to entry for Scheme is getting a nice environment set up"

Dunno: DrScheme is very nice out-of-the-box.

danprager··on Coding Horror: Finishing The Game
Another possible collapse would be to say "I have two children, and the oldest [or youngest] is a girl". That would disambiguate GB & BG, by effectively stating I have G? [or ?G]. Then the odds would be 50%.
danprager··on Do you read?
I too enjoy reading. I commute and read books on the train. I also read a bit before going to bed and otherwise opportunistically. I read multiple books at once, and this can be a problem. I have sworn not to buy any more books from Amazon this year. I borrow books from my local library.

My favorite book this year is The Naked Ape by Desmond Morris, because it made me think about people and their behavior from a new (to me) perspective. His autobiography is also good fun.

Why do I read? Reading properly is like entering into a fully immersive virtual world, where your imagination paints the pictures, sounds, etc. You also get to learn new stuff and when reading fiction or autobiography experience many worlds vicariously.

danprager··on What's your vanity rank?
Propose away!

Here's another: How many hits in the top 10 do you get? I get 5.

danprager··on Why Hygienic Macros Rock
Most languages short-circuit ands and ors already, but adding additional short-circuiting demands macros:

My practical example of this is my desire for a short-circuit "implies" operator to use in assertions (typically in post-conditions).

I want to able to write checks like

  assert (foo != null _implies_ foo.someProperty);
where the _implies_ operator short-circuits.

Writing my own implies(a,b) function is no good in most languages, because strict evaluation would yield a null-reference exception in the example when a is null.

Without macros I end-up writing:

  assert(a == null || a.someProperty); 
or worse

  if (a != null) { assert(a.someProperty);

With lisp-strength macros I could easily add an implies operator and get readable rather than clever code.
danprager··on Experience as a teacher turns out to be worthless
Just because testing was a reaction to crappy schools doesn't mean that it leads to improvement.

* * *

I don't have time to start my own alternative school and report back to this thread. But I note that

  Brin & Page, Jeff Bezos, Jimmy Wales, Will Wright
all attended Montessori or Montessori-influenced schools.
danprager··on David Ogilvy Branding Commandments
Thanks for the constructive feedback; I think that all of those suggestions would help.

The slideshow at least partially addresses some of these issues, but if that contains the more effective message, then Ogilvy's point about finding an ad that works and repeating it may well apply.

danprager··on David Ogilvy Branding Commandments
Really refreshing to read such clear and down-to-earth advice on advertising / promotion / branding.

Anyone care to review how well my firm's new product + web-site http://bcisive.austhink.com/ (pre-launch) stack up against the Ogilvy check-list?

danprager··on There are many things you can say about Emacs...
cua-mode (Common User Access) gives you Ctrl+X / C / V as per Windows, and mouse highlighting, apparently without interfering with standard emacs key-bindings too much:

http://www.gnu.org/software/emacs/manual/html_node/emacs/CUA...

danprager··on Ask YC: How many people here have a degree and are programmers?
PhD in Mathematics (computational physics), 1997. Self-taught at programming from age 14. After finishing my PhD I decided to get out of academia. Didn't want to work as a "quant", hence: software (mainly programming).
danprager··on Math For Programmers
Linear algebra -- matrices etc. -- is the bit of my undergrad. mathematics that I use most often in programming.

I really liked the informal text by Gilbert Strang, "Introduction to Linear Algebra". The 3rd edition is quite expensive, but Strang's video lectures are available here:

http://web.mit.edu/18.06/www/Video/video-fall-99.html

For "getting" mathematics as a way of problem-solving, I suggest Polya's books, starting with "How to Solve It".

danprager··on When non-programmers write software
There is an echo in the article of Christopher Alexander's view that architects -- professional house designers -- tend to generally make less functional choices in house design than people who design their own homes. The architect's goals may include a desire to produce something that looks stylish, but (s)he does not have to live in the result.

In the case of custom software development -- also home design -- the happy medium surely involves the professional working closely _with_ the client.

OTOH if you have sufficient skills and the time to combine both roles I say: Go ahead and enjoy the ride.