Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like this sentence: We cut the cost/time of this implementation by 90% or more, not by coding more quickly, but by thinking more clearly.

I think that this is valid for most projects in any language.



Yes, but the raison d'être for Prolog is to do declarative/logic programming, which is fundamentally about programming by writing a clear, logical model of the problem, that incidentally happens to be executable / queryable.

"Declarative programming clears the mind." - Sterling & Shapiro, _The Art of Prolog_

Provided you don't abuse the cut operator, a Prolog program will consist of a series of rules which each have a logical meaning in isolation. Reasoning about Prolog code is so different from trying to unravel what's actually happening with several layers of OO polymorphic dispatch, it's not even funny.

"Elegance is not optional." - Richard O'Keefe, _The Craft of Prolog_


I've always been a fan of the "Don't just do something! Sit there." approach to work. Not only do I sometimes find really clever ways around a problem, or weird issues that wouldn't immediately be apparent, I also save a whole bunch of potential RSI :)

Added benefit: When it is time to start coding, you can amaze your coworkers by brain dumping a decently coded solution at typing speed.


That's one of the most understated advice. Quite often managers like to see lots of code, or developers have screwed up incentives and get payed by the lines of code. If a manager walks by, their heart gladdens when they see you banging on the keboard like mad -- to them that equals to "work being done". They fail to realize that sometimes that equals to "more un-necessary garbage added to the existing pile of code" that will eventually make the product unstable, brittle and hard to maintain.

Sitting there with a notepad and a pencil thinking about the problem is when I find I actually solve the difficult problems not when I type furiously at a keyboard.


Too right.

One day myself and another guy were debugging a piece of code by staring at it, figuring the logic out in our heads and pitching theories back and forward. The boss walked past, saw we were sitting there "doing nothing" and told us to do some work... ugh!


I have no idea how this works, but it does: when sharing a screen with someone and doing work: if one of you is pointing at something code-looking, the boss reverts to thinking you are working. This works even if you are discussing non-work things... its not content they care about but form :/


At a talk, someone (might have been Eric Evans) said something along the lines of when he was modeling a domain with a group, he wouldn't let them leave until they had three different ways of doing it. Even if the first was perfect and the last two ended up being stupid, forcing them to brainstorm other ways of doing it often came up with hidden gems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: