Life and Projects

I just lost my job. This happening was unexpected except to the deep knowledge of my subconscious, who, for the last week, has been practicing what to say when it happened. The reason is that my “level of productivity is not sufficiently high to justify [my] contract rate”. I agree with this, and although the whole thing has got me feeling a tad worthless, I am not beating myself up about it. The project was less familiar territory than I had expected, being of primarily object-oriented design (rather than functional — and yes “functional design” is a real thing). I have done a lot of OO programming in my day, but since I have started functional programming, my OO code never seems good enough. I now spend a good proportion of my time searching for cleaner, smaller, more obviously correct solutions, when the code that I am criticizing would have been just dandy 5 years ago.

Anyway I won’t blather on anymore justifying why I am still a good programmer nonetheless. This post is about the future.

In any case, I feel like the event woke me up. I was spending my 25 hours working on a project I didn’t really care about (despite it being fun and working with good people), a few hours a week on my own projects, and the rest of the time on who-knows-what. Chilling out, wasting time on the internet, watching netflix, getting high and playing the piano. It’s all a fine, relaxing lifestyle, but I am disappointed that I was spending so little time on my projects. So, I resolve to spend no less time working than I was before — at least 30 hours per week, all for my own goals.

For my own clarity, and for the interested, here is what I’m working on:

  • Evo (codename), a “serious” real-time strategy game written in Haskell, with my friend Max. The purpose of this game is twofold: (1) to be a ridiculously fun real-time strategy game (nothing good has come out of that genre for a few years) and (2) to prepare and exposit Haskell as a game development platform. Perhaps it is yet another attempt to solve my 6 year old thesis Game Programming is Too Hard.
  • Vatican, a lazy specializing interpreter, taking after the work of Michael Jonathan Thyer’s dissertation. This is largely a research project, in which I would be happy to get 1% of the performance of GHCi — just something to start from. Here is the repository.
  • An experimental programming language with a unique view of types: types are just properties (eg. “f :: Int -> Int” is another way of saying “for all x, if x is an Int then f x is an Int”). The language is essentially an untyped lambda calculus, but comes with a proof language in which the usual types and many more sorts of properties can be expressed and verified. There is some (mechanism as-yet undecided) macro facility that allows traditional type inference to be encoded as a macro in the language. There are a lot more ideas for this language floating around, but I am trying to stick to the principle “everything it does, it does perfectly”, so I’m holding off on new features until I know exactly where in the picture they appear.
  • I will consider blogging as officially one of my projects, to continue improving my writing. I am converging on a functional design methodology, my antipattern post hinting at its direction. But the feedback I’ve received on that post makes me realize that the argument and the details are not yet clear. I’d like to keep writing about it and exploring this methodology in order to one day pin it to rigorous principles.

30 hours a week of the above, or projects that the above evolve into. I don’t need to be a pedant: I know when I am and am not being productive.

Get up in the morning, work all day. –Philip Glass

About these ads

21 thoughts on “Life and Projects

  1. Hey Luke,

    I am proud of you for being so optimistic, and I am happy that you now have ample time to work on projects. I also think you and your boss failed to communicate from day one, so it is no surprise he fails to see how valuable you actually are.

  2. For bullet 3: you should read up on NuPRL (nuprl.org), if you haven’t already. What you’re describing is exactly how types work in NuPRL.

  3. Hi Luke,

    I’m sorry to hear you lost your job. But I’m glad you’re still optimistic! Best of luck in your new pursuits, and keep those blog entries coming. :-)

    Martijn.

  4. You should really delete this blog post and be more careful about your public face.

    You weren’t fired, they just can’t afford your work. They will pay for a lower quality cheaper service.

    Please consider your public face and remove this post.

  5. Anonymous, you have a point, and I have reworded the post a bit to reflect that. But save for wording subtleties, nothing I have said is untrue. My blog isn’t an advertisement for my career. It’s here both for people who are interested in my technical ideas and for people who are following my journey to find a place in the world. Thanks for your concern, though.

  6. I’ve got friends with job troubles as well… both drudgery-of and lack-of. It’s good to hear that you are positive about it! Far better to worry about the future than the past.

  7. All of your projects sound really interesting, but you’re dividing your attention a lot with so many active projects. It might be better to try to trim it down to one or two and hit pause on the other stuff. Best wishes on your work. I’m interested to see what you come up with.

  8. Dude, I am really sorry to hear about this. The world needs more good functional design, and it’s unfortunate that not everybody recognizes the merit in it or knows what to do with it when they are lucky enough to have someone like that in-house.

    I don’t think anyone can (should?) write good OO code in an OO/functional hybrid language, for the record. A good designer will go functional, and an imperative programmer will go OO; but the intensionality/extensionality contradiction is nearly insurmountable and (IMAO) reflects poor language design.

    > There is some (mechanism as-yet undecided) macro facility that allows traditional type inference to be encoded as a macro in the language.

    WOOT! Now you’re sounding like a proper Lisp hacker :)

  9. Good luck! Really wish you the best. I’m glad writing is on your list.

    It was a tough blow to the psyche last year when I was laid off, plz take care of urself! :-)

    (Your honesty in the post is very refreshing, I had to scale my online speech way back when I took a contract at a bank late last year, but by then I just needed the money, even I had to reassimilate into the almost total loss of freedom of speech that comes with a big corp job, hope for not too long.)

  10. Keith: It’s not so much about the number, but about balance. I’ve got all my bases covered. Evo for when I’m feeling results-oriented; Vatican for when I’m feeling low-level and performancey (or for when I feel like I need to make a contribution to the world less distant than Pluto); the language for when I’m feeling idealistic; and writing for when I’m not in the mood to code. Another mealsworth of music, served with a girlfriend dessert, and I could eat this every day my whole life.

    Spencer: Yeah you helped me realize that for a language to be truly extensible, you have to be able to work on the insides of programs too. The mechanism to do this that still gives me my precious, precious properties (mainly uniform abstraction) will require some thought, however.

    Everyone else: Thanks for your support. It helps me to carry out my plan without fear :-)

  11. Right, ultimately a question of what fraction of the language constructs end up being first-class is how I’ve been thinking of it. Lisp made code first-class, which once you get used to it makes other things look like C in various disguises. :)

    Trying to optimize my language leads me to believe that first-class macros totally blow away uniform abstraction. Take the case of (f (g x)) — even if all symbols are constant, you can’t beta-expand (g x) until you know that f is an evaluating function, not a syntactic macro. (In Gnarly you don’t know this until f is bound.) In fact, I think first-class access to the eval function in general (which is ultimately what macros are) will have this problem, though I’m not sure about that (does eval even have a type signature?). Of course, you could have non-first-class macros, but that’s kinda lame IMA[rrogant]O.

  12. Typing eval requires typed syntax. So in Haskell-land using HOAS we would write something like:

    data Term :: * -> * where
    Apply :: Term (a -> b) -> Term a -> Term b
    Lambda :: (Term a -> Term b) -> Term (a -> b)
    Integer :: Int -> Term Int

    Then

    eval :: Term a -> a

    The syntax can get fancier, especially with the help of dependent types. But all it does is lift the typechecking burden out a level. Dependently-typed languages have the ability to write the “well-typed interpreter”, a function which can typecheck syntax for the language in which it is written and then execute it without any unsafe casts.

    Anyway, that’s not remotely like what I have in mind. My current inclination is to use something like LISP-style quasiquoting, so that you can tell lexically whether your code is going to be interpreted syntactically or semantically. You still get uniform abstraction on the semantic pieces, which can be interspersed with the syntactic pieces. But it’s not entirely clean or minimal.

    And my most, er, conservatively radical idea is to make it an IDE feature. I.e. there is no true language support for interpreting code syntactically. On the contrary, the IDE can produce semantic code like:

    \f. \x. f x x

    Or, using a different setting, code that looks like that could “compile” to:

    lam (\f. lam (\x. app (app (var f) (var x)) (var x)))

    Which is in a form suitable for automatic consumption.

    Aw, look at me. I’m ramblin’ again. Wal, uh, hope you folks enjoyed yerselves. Catch ya further on down the trail.

  13. I totally understand the job loss, it has happened to me before.
    I have a lot of trouble working on projects that desperately bore me, even if the people are really great.
    I don’t know how to beat that problem, but it is responsible for regular job changes on my part. I end up switching jobs because I know I’ve burnt out on the one I have, and I don’t want to drag down the project/people.

  14. How will Evo be different from the ‘canonical’ RTS?

    I’ve always wanted one which played more like non-deterministic chess, instead of using a flood of units whose position doesn’t really matter.

  15. It’s great that you are sharing your experience with others. You should not feel worthless for being laid off. Your work is not you and it’s not your life. Been there, done that. Apply for unemployment and enjoy your times off. Make sure you dig out all the projects from your “SOMEDAY WHEN I HAVE MORE TIME” folder and complete as many as you can. You can never be sure you will have another chance like this one. JK Rowling wrote Harry Potter after being laid off and became the richest woman in England.

  16. Hi Luke, regarding “Evo”, I look forward to playing it and also you might be interested in an RTS game that I programmed in Haskell.

    http://github.com/yairchu/defend
    it’s kinda real-time chess with fog of war.

    it’s not polished/finished but it is playable (needs two people and comps to battle).

    Regarding employment – surprisingly I have a funny story to share that sort of involves you. About a year ago a friend who follows your blog sent me an email saying that you’re good and looking for work in NYC (looking for work part was at lukepalmer.net. nowadays a broken link). I e-mailed the Luke Palmer from lukepalmer.net and it turned out that he was someone else entirely from you.

  17. Hi,
    a similar view on types as you state is also discussed in the first sections of:
    “Type Inference for Datalog with Complex Type Hierarchies”, Max Schaefer and Oege de Moor, POPL 2010, even if for quite different goals. It might be still interesting to compare these views of types.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s