March 2010
1 post
Every time you use CSS, you're doing...
Each AOP term and its HTML/CSS counterpart…
If you’re viewing this in your Dashboard, you may need to click through to see this table.
AOP
HTML/CSS
explanation
join point
every HTML element
places you could possibly apply behavior
pointcut
CSS selector (e.g. #nav span.highlight)
expression that specifies which places to apply behavior
advice
CSS declarations (e.g. color:...
January 2010
1 post
To die without your love knowing how you really...
…must be the worst fate imaginable.
Question: How do you communicate how you really feel? How do you let your love know that she is loved? Really loved. You know you love her… but does she really get it?
I struggled with these questions for a long time. Being naturally bad at communicating due to programmers’ Asperger’s didn’t help. Last year, though, I...
December 2009
3 posts
It's hard to change a little. It's much easier to...
When you try to change a little, your old mindset still has its old values and attachments, and you inevitably slide back into your old groove. But when you change enough to create a new mindset, you can free yourself from your old way of looking at things and create a new groove.
Homer Simpson’s ass groove comes to mind. Moving over a few inches would be painful at best. Moving...
Robot Visions
When I was a kid, barely old enough to read, I saw this book Robot Visions, by Isaac Asimov in the bookstores. I poured over Ralph McQuarrie’s illustrations (long before I ever knew who he was) and wanted to read it more than anything else.
Now, almost 20 years later, I discovered it in my uncle’s library — the original hardcover edition — and I’m finally reading...
1 tag
The Purpose
I want to make software that people use. I’m tired of making stuff that gets used by one person once a month.
The purpose of software ultimately boils down to one of these things:
To help people work
To entertain people
To teach people
To keep people safe
To help people pursue happiness
Software can help people. If it doesn’t, it hasn’t fulfilled its purpose.
I...
November 2009
5 posts
1 tag
The Question
A skilled sculptor can form any shape. A skilled programmer can make any program. The only question is, what?
I think this rings true with anyone who has spent 10 years in the field. After a certain point, you start to realize, there’s nothing you couldn’t program. Sure, there are challenges. How do you get it to be fast enough? How do you allow it to scale big enough? But at...
Conrad Barski of lisperati.com gives a taste of his new (not yet released) book, Land of Lisp, at Philly Lambda. On Lisp + Game Programming!
How to Convert a Local Branch in Git to a Remote...
This is a little more obscure git-svn recipe I derived today. Thought I would share it.
Basically, I was prototyping a new feature on a local branch in git. Later, I decided I wanted to push that local branch into an svn branch so that my svn comrades could see it. So I started with a local branch following svn trunk with purely fast-forward commits. And the following did the trick.
Create...
1 tag
Blub by Convention (In Defense of Arc)
The entire Arc language is just a few Scheme macros. …Or so the criticism says.
I can’t use Common Lisp. mapcar, lambda, destructuring-bind, etc. These are things I use all the time, yet they have some of the longest, most unnecessary names.
Scheme is the Java of Lisps. define, begin, list-ref, etc. It was seemingly designed to be as descriptive as possible, and in doing so,...
October 2009
1 post
Alternative to XML Validation
The desire to validate the structure of a document has come up a number of times recently. Say you have a public service where one of its operations takes in a complicated tree-structured document. You want a way to:
use a programming-language-agnostic data format for your document;
formally specify the expected structure of the doc;
validate that input to calls to your service actually...
September 2009
1 post
The unspoken truth about managing geeks →
Articulates the mindset of many developers.
It’s not about being right for the sake of being right but being right for the sake of saving a lot of time, effort, money and credibility. IT is a team sport, so being right or wrong impacts other members of the group in non-trivial ways.
Truly insightful.
IT pros would prefer to make a good decision than to get credit for it. What will...
August 2009
2 posts
Sending an IM via Gtalk in Clojure
Email has its place, but when it comes to short notifications — of the status of a job, for example — IMs work great.
If you think of your software as your co-worker — someone you work with who helps you do your job — all kinds of functionality just make sense. Would you rather your co-worker emailed you or IMed you? Then the software should do that.
This code snippet...
If you would be ...
Here’s something I’ve noticed recently: if you would be Xed, be Xable.
A few concrete examples…
If you would be taught, be teachable.
If you would be understood, be understandable.
If your software would be used, make it be usable.
And last but not least, the quote of Ovid that inspired it all: If you would be loved, be loveable.
July 2009
1 post
Git Config
Here’s the .gitconfig file I’ve been using. The aliases let you type “git ci” and execute “git commit -v” for example. And color is essential. Going back to svn is like going back to black & white TV.
[user]
email = you@blah.com
name = Your Name
[color]
ui = auto
diff = auto
status = auto
interactive =...
June 2009
1 post
Setting Up Clojure
Notes I made back in April for setting up Clojure on my MacBook. Kyle is planning a workshop on this soon.
# get Clojure and clojure-contrib library
cd ~/projects
svn checkout http://clojure.googlecode.com/svn/trunk/ clojure
svn checkout http://clojure-contrib.googlecode.com/svn/trunk/ clojure-contrib
# build Clojure
cd clojure
ant
# make a clojure executable on your path
echo 'java -cp...
May 2009
1 post
Knowledge Representation
When I write a program, what I’m essentially doing is writing down my best understanding of how to solve a problem or accomplish a task. My best understanding.
For the sake of this discussion, let’s say the problem I’m trying to solve is how to best peel an orange for eating.
An interesting thing happens, though, when I spend hours and hours talking about the problem,...
April 2009
3 posts
Good Design = Balance
Good design is all about balance.
Aesthetics makes your product attractive and approachable. It makes people want to try it.
Usability makes your product pleasant to use to get a job done. It makes people want to continue to use it.
Economy makes your product practical. It makes people willing to pay for, and thus, support you making it.
Without any one of these things, your product...
Important Points from Stumbling on Happiness
These are my notes from reading Stumbling on Happiness by Daniel Gilbert. I’ve recounted mostly just the conclusions, so if you’ve never read the book, I urge you to do that before reading this; it’s kind of a spoiler. Plus, I find that hearing conclusions before I hear the evidence or argument sometimes increases my defensiveness, thus decreasing my ability to extract value...
March 2009
2 posts
Absolute Subjective Truth
When someone I know has a baby…
I say: Congratulations! :-D
I think: I’m sorry… :-/
Yes, I was lying to all of you. The funny thing is that people with kids reading this are probably thinking “I’m sorry…” towards me. After all, they get so much joy and life fulfillment from their kids.
Truth depends on your perspective. Depending on what...
What Web Frameworks Are Missing
The single biggest feature common web frameworks like Rails are missing out of the box is credit card payments.
Right now, no one bothers implementing credit card payments until a site has become “production”. Single-person projects or small startups don’t bother making this at first b/c they would much rather spend their time running up hill, prototyping new, hard, or...
January 2009
1 post
1 tag
Macro Patterns
I was talking about Lisp macros with Kyle and we decided to write down the patterns of different macros we’ve seen and what they allow you to do, with the intent of teaching others.
Interesting things you can do with macros:
resource management (e.g. with-open-file)
behavior injection à la AOP (e.g. memoization, debug printing)
alternate control-flow constructs
alternate looping...
December 2008
1 post
1 tag
(Non-)Total Functional Programming
I’ve been getting back into language design again. (I haven’t written anything about it since August!)
Not too long ago I was introduced to Total Functional Programming. The paper is very interesting, and at first, the concept sounds great. Increase the ease of proofs of properties of your code at the expense of Turing-completeness. Who needs Turing-completeness anyway.
But...
November 2008
1 post
The Abstraction Machine
The Lord of the Rings is not fantasy; it’s abstraction. J. R. R. Tolkien strived for applicability, the idea that symbols do not stand for just one thing, like say, Middle-earth standing for England in World War II, but that the reader can instead apply the story to many many different things.
Abstraction and application are antitheses. One builds, the other breaks down. The mind is an...
October 2008
11 posts
1 tag
Techies Vs. The Business
I love making software; I’m a techie geek. I’ve also always been interested in running and owning a business — an aspiring businessman. Right now, though, I’m employed. And I’ve learned there is always an infuriating tension between the technical people and the business people — infuriating to everyone on both sides of the divide.
If you’ve ever...
September 2008
2 posts
Hacking FriendFeed with Metafeeds
I did a search in FriendFeed and noticed that at the bottom it had a feed icon. This gave me the idea of creating an imaginary friend out of the search results so that I could get everything about “meta”, for example, in my FriendFeed home page. This could be really useful; kind of like Google Alerts but streamed into my FriendFeed.
I tried it and it works great! Trying to learn...
August 2008
4 posts
1 tag
Code Maintenance Tool Wish-List
At my day-job, I am forced to maintain code that I did not write, that I am not familiar with, and whose authors no longer work at the company. Did you say “documentation”? Hah! No, my friends… it is just me and the editor.
I am a designer. A prototyping programmer. I do my best work when given vague requirements, lots of freedom, and a blank editor. And in my experience,...
July 2008
8 posts
Story Lessons, Continued
I’ve written about Story before and gave it its own post. But as I learn about people, I’ve learned some new things.
First of all, most people don’t realize they’re characters in a story — their life story. They don’t step outside the system, as Hofstadter says. Alfred, for example, doesn’t realize he is a character playing a role in the movie The Dark...
1 tag
Story — A Life Philosophy
A good story makes a good life.
A good story writes itself.
A good story has story arcs.
A good story cycles between extreme tension and relaxation.
A good story has nothing unnecessary.
A good story intertwines meaning everywhere with everything.
A good story keeps many things a mystery until all is revealed at the end.
A good story changes characters.
A good story spans generations.
A...
Programming Concepts People Just "Don't Get"
It occurred to me that there are many concepts in programming, like say, monads, that are so obviously hugely important to some people, but others seem to just “not get” them. When one of these people that groks monads tries to convince those that don’t how important the concept is, they fail miserably, mostly because others have no experience with monads to relate to. So how...
The Musical Element
<meta>
There simply isn’t enough time to write about all the ideas in my mind. I originally wanted to create a working prototype so that I could blow everyone away with this follow-up post, but that would have taken even more time. I’m spread too thin as it is. So I’m not going to spend much time writing about some of my ideas about the primal element of programming. ...
The Primal Element
Over the weekend I went camping. (Fireflies are beautiful, aren’t they?) Being obsessed with programming, it was nice to return to nature for a little while.
At one point, performers captivated the attention of everyone there. It’s easy, really, when you have music with a good beat, fire, and sexy dancers. How can people not be captivated.
That’s what made me think…...
June 2008
1 post
Moving from Blogger to Tumblr
Note: if you just want to use the importer, go here.
I’ve been using Tumblr for about 6 months now, and I’ve loved it from the start. Up till now, I’ve only used it for my tumblelog and a few private groups for projects. But every time I posted on my regular blog, I missed Tumblr. That’s what gave me a crazy thought: move my blog to Tumblr.
Yes, we can finally start...
May 2008
2 posts
1 tag
The Prototype-Production Knob
Once you’ve seen the progression that software goes through from birth as a hacker’s one-night-stand, to 3-man garage-startup’s baby, to Small Corp’s stubborn adolescent, to The-Next-Microsoft’s bloated 1000-developer software-engineering nightmare… you simply can’t ignore it and the programming language feature it seems to demand.
Hardening
In the...
An Arc News Forum
For my monthly Day of Hacking, I decided to put together my own news forum, yc-style. Luckily, it’s the demo app of Paul Graham’s Arc.
Within a day, I got my own forum up and running, quick and dirty. But it took some effort drawing from multiple sources, so I thought I’d document the steps I took here, all in one place.
Setup a Host
Arc runs on top of MzScheme, which...
April 2008
4 posts
My Ideal Job
Somewhere in New York there is a metaprogramming job with my name on it.
Where exactly? I haven’t found it yet, but I’m sure it’s keeping an eye out for me. ;-)
1 tag
PL What-Ifs
What if you compiled a source language to multiple target languages? gaining the benefit of more than one platform.
For example, what if you were creating a brand new language that you wanted to be type-safe with all the intricacies of Haskell’s type-system, but you wanted to take advantage of libraries written in Ruby. And you created a compiler that first compiled your program to...
1 tag
The Phase Concept
Anyone who’s been following my blog for a while may have seen a pattern by now. Everything I’ve written about programming languages has a theme, which when extrapolated, has one logical conclusion: to create a compiler for a programming language that is a good tool for creating other programming languages (possibly mini languages otherwise known as APIs or DSLs) with a GUI editor that...
What I've Been Up To
The more I actually do, the less I write.
In November, I didn’t blog a single post. The time I usually spent writing went to doing Project Euler problems and learning Haskell.
Last month, I gave a presentation on functional programming with Haskell for Philly Lambda. In order to better understand Haskell (and Lisp) for the presentation, I wrote a simple Lisp interpreter in Haskell. ...
March 2008
1 post
1 tag
Meta-Problems
The other day, I overheard one co-worker showing Emacs to another co-worker. The one who was new to Emacs said something like, “Oh, it doesn’t do X?” The Emacs proponent replied, “Well, no, but you could always implement it if you want it.”
And this statement sounded really familiar. It sounded just like Paul Graham’s description of the Blub language (which...
2 tags
Stand on the Shoulders of Giants
I feel like I haven’t even written a useful piece of code in ages because the mere thought of boilerplate code stops me in my tracks. This is one of the main motivations behind creating a new language free of hindering boilerplate code. But then you start running into other problems.
The egotistic developer will believe that creating a new programming language is the key, secretly...
February 2008
2 posts
1 tag
The Cost of a New Language
As I described in my post on tool-making, the most sensible thing to do is to minimize total cost to reach your goal. Accounting for all costs, it occurred to me that creating new tools such as programming languages can inadvertently increase total cost by reducing the usefulness of other tools designed to be used with other languages.
For example, gdb is an extremely useful tool for working...
January 2008
1 post
In the future...
In the future, no one will be using test-driven development. Instead, we will be using proof-driven development. A programmer will create a specification for a program in a language like Gallina and prove its safety and correctness using a proof assistant like Coq. Once done, a compiler will transform the specification and proof into an executable program which is proven to be semantically...
December 2007
4 posts
1 tag
The Greatest Contribution to Programming Languages
Thinking about tools, it occurred to me that the greatest contribution to programming languages is not any single language. No, not Lisp, C, ML, Haskell, Qi, or any of the more obscure yet equally great languages.
The greatest contribution someone could make to the programming language and compiler community is not to make a great programming language, but to make the tools necessary for...
Design — A Life Philosophy
Every problem is a design problem full of design choices. Even the choice to take a hands-off approach is a design choice. Every decision you make in your life — what to eat for lunch, what to do as a profession, who to hang out with on Saturday night — is a design decision. Each and every one of us does our best to design our life. Why would you ever choose something unless you were convinced...
1 tag
On Practicality and Tool-Making
A comment on my last post on design and programming languages spawned the following.
Q: Are you implementing some of your ideas?
A: It’s always in the back of my mind to design and implement my dream programming language. This blog is in part my outlet for ideas that come streaming into my mind about programming languages. In fact, it’s my only outlet. The more specialized you...
2 tags
1, 2, n
It’s the 1, 2, n rule in software development.
You do something once. You do something twice. And the next time you do it, you generalize it for all times henceforth.
Waiting longer to generalize is painful at best. In the worst case, it leads to maintenance nightmares as when the same thing is done 14 times in 14 different places, each time slightly different than the rest.
...
October 2007
3 posts
Quantity Implies Quality
Quantity implies quality.
Example: In recent news, a professor searched 2,985,984 possible candidates for a universal Turing machine. In an earlier era when computing power was scarce, that may have been too many to search in a practical amount of time. But this guy found the answer. (Well, maybe.)
Example: Chess-playing is currently a prediction problem, but if resources increase enough to...
Everything Is a Compiler
All algorithms can be classified into one of the following.
Search Engines
Prediction Engines
Networks
Operating Systems
Compilers
This becomes obvious when you look at what programs do from a high level: search, predict, communicate, manage resources, and translate/transform.1 Search
Searching is when you start with a question and your goal is to determine the answer. The answer...
Perl Is Female
I’m learning Perl now. I’ve used it before but never got deep into it.
From a logic-foundations perspective of programming languages, Perl makes absolutely no sense. Its semantics have no rhyme or reason. It is completely illogical.
I searched for a Perl language spec and found this on wikipedia.
There is no written specification or standard for the Perl language, and no plans to...
September 2007
7 posts
1 tag
Methods to the Aha
When I was a fresh CS major at CMU, I took the standard 15-251 Great Theoretical Ideas of Computer Science class. The professor Steven Rudich introduced us to some amazing topics. Even though I was never able to use it to its full potential, the most valuable thing taught was what he called the “aha! method”. In other words, he taught that there was a method to getting to the point...