2012-08-24

Puzzle Languages

There is the Alan Perlis quote:

"A programming language that doesn't change the way you think is not worth learning"

Here are a list of languages that I think of as "Puzzle Languages" because they all force you into somewhat mind-bending new paradigms in order to use.

  • Forth
  • Erlang
  • Scheme
  • Prolog

Of these above, Erlang and Scheme are the ones that I would use for general purpose programming.

Here are two others that at least allow interesting thoughts or patterns of use but are somewhat easier to use in that they allow a normal procedural approach:

  • Tcl
  • Awk
Standard

2012-08-22

Erlang

I’ve been looking at Erlang again this last week because I’ve liked Erlang since I first saw it, but I’ve never really gotten to the point where I knew enough to actually write stuff with it. I think I’ve let myself be lured to Haskell by the promise of more powerful types each time I looked at Erlang, but these days I think I might prefer the simplicity of Erlang.

I was also happy to find out that Erlang comes with what looks like a pretty robust way to package applications so they can be installed an run by a user without forcing them to install a complete Erlang system. That’s pretty awesome.

Current Languages

Here are the languages that I’m spending most of my time studying right now:

  • Erlang – personal enjoyment
  • Java – taking an algorithms course that uses it as the implementation language
  • C# – work

I’d like to put some more time into Go and Lua at some point, and my friend is learning Python, so I’d like to be continuing to play with that also. In addition, I’ve found myself thinking about data types in C a lot recently.

Python SimpleHTTPServer

I’ve complained in the past about Python’s SimpleHTTPServer having slow performance.

I think now that it just takes it a few seconds to update when I push a new version of a file that it is serving. Once that time has past, requests seem to be fine, it’s only if I try to hit it immediately after an update that I see slowness.

So it may be fine if I just give it a chance to update.

Standard

2012-08-16

Technology Churn

I’ve become frustrated over the years with the amount of churn there is in the technology / programming languages space.

There seem to be a couple different types of churn.

  1. Things that are upgraded without regard to backwards compatibility and therefore cause breakage.
  2. Things that work are replaced with other equivalent (or slightly improved) ways of accomplishing the same thing.

The Ruby / Rails community is famous for breaking compatibility between releases.

The Python community on the other hand seems to have a different issue where new things are developed to replace the current system, and after a while you have 3 or 4 different ways to do the same thing, and you have to figure out which way is now the best (and there are usually trade-offs because none of the alternatives actually support all the options of the other ones).

Microsoft is sort of famous for it’s tendency to every couple of years have a new favorite way to accomplish various tasks. Usually the old way is still available, but not as well supported going forward.

The Java world seems like there was a long time where new things would be started, and then not really ever finished, so lots of APIs and packages sort of languished with unfinished functionality.

Languages with High Churn

  • Ruby (type 1)
  • Microsoft languages (type 2)
  • Python (type 2)

Languages with Low Churn

  • C
  • Perl
  • PHP
  • Lua
  • Tcl

In the case of Perl, low churn doesn’t mean that new stuff isn’t getting developed, it just means that usually the old way of doing things is still stable and well supported. This may be the case in other low churn languages also.

Standard

2012-08-13

Early Programming Heroes

I’ve been interested in Steve Yegge’s assertion that one’s tendencies as far as programming preferences are formed partially by who their heroes are in the software world. In an attempt to analyze my tendencies, here are my formative heroes:

  • Charles Moore – creator of Forth programming language
  • John Osterhout – creator of Tcl programming language
  • Richard Suchenwirth – amazing programmer using Tcl
  • Jean-Claude Wippler – amazing programmer using C, C++, Tcl – creator of Metakit, Critcl, starkits
  • Richard Hipp – amazing programmer using C, Tcl – creator of Fossil, Sqlite
  • Paul Graham – writer, entrepreneur and popularizer of Common Lisp
  • Richard Gabriel – writer, entrepreneur and user of Common Lisp
  • Linus Torvalds – amazing programmer using C, creator and maintainer of Linux kernel and git source control program
  • Larry Wall – creator of Perl programming language
  • Brian Kernighan – amazing programmer using C, co-creator of Awk programming language
  • Dennis Ritchie – creator of C programming language
  • Joel Spolsky – writer, programmer and entrepreneur

Later Programming Heroes

Here are people that I have more recently looked up to:

  • Zed Shaw – amazing programmer using C, Python, Lua (and previously Ruby)
  • _why – amazing programmer using Ruby
  • Charles Petzold – writer, programmer using C, C#
  • Donald Knuth – writer, amazing algorithm researcher

Personal Programming Heroes

Generally at each job I’ve had, there have been one or two guys who are just amazing, who get things done and are amazingly productive and solve problems others don’t. Here is a list of the guys I’ve personally known who have blown me away with their abilities:

  • Richard Gottleber – sysadmin, amazing programmer using shell
  • Some guy at Language Computer Corp – amazing programmer using PHP
  • James King – amazing developer, generalist
  • Rich Hansen – amazing programmer (probably in any language used)
  • Michal Chaniewski – amazing programmer using C#
  • Henry Dawson – generalist power user and database developer
  • Reed Parsons – generalist power user and database developer
Standard

2012-08-10

3 Languages: C, Forth, Scheme

Continuing my trend of creating 3 language classifications, Here is the set of 3 languages that I think is fundamental for understanding and implementing compilers, and perhaps interpreters.

Forth will teach you to understand stack machines, and data stacks. If you can implement RPN parsing and stacks, then you can implement Forth.

Once you know how to deal with stacks, then you can use stacks to implement procedure / function stacks. That seems like it allows you to implement something like Scheme.

And from Scheme, you can begin to implement arbitrary language syntax on top of a high level language base.

C is important because it is a useful implementation language for either Forth or Scheme, and it also gives familiarity with at least one style of higher level language syntax that could be implemented once the basics of compiler / interpreter construction are understood.

Emacs again

I found myself doing some programming today, and I can’t deny that I find Emacs more comfortable to type in. So (at least today) I’m trying it again.

Go Website Rewrite?

I’m getting frustrated enough with the performance of the Python SimpleHTTPServer that I’m wanting to move to something else.

I found a simple example of a static webserver written in Go, I wonder how much work it would be to rewrite the the site generation in Go also. It’s not really necessary to have the site generator and the web server written in the same language (they don’t even run on the same machine), but I’ve enjoyed having them be consistent.

Standard

2012-08-09

Go, Lua, and Erlang

This is another trio of languages that I find intriguing. The common factor of all of them is that I find each of them a fun language.

They might work as a secondary fun set of languages to work with when I’m not worrying about being productive.

The are all somewhat more weakly type than C++, Python or Haskell are, but are all small enough that the entire language can readily be kept in mind.

Standard

2012-08-08

Now on Debian

This website is now running on a Debian server.

We switched one of our servers to Debian here at work and that caused me to become curious, so I switched this server to it so I could continue to learn about it.

I also got Linux Mint Debian Edition to play nice with VirtualBox guest additions, so I can potentially use a nice desktop version of Debian for my personal use also.

So far, mostly it’s like Ubuntu, but a few more rough edges as far as default functionality. Hopefully though it will make up for those by being more stable and worry free.

Back to Python for web server

For the moment, I’m back to serving this website using the Python SimpleHTTPServer, since it’s installed (in Python) by default. However, it continues to be a bit slow to load pages, which annoys me. I’ll have to look at something to replace that soon.

C++, Python, Haskell

For the moment, I think I’m just going to go ahead and accept these three languages as my default languages to approach problems with. They seem to work with my mind the best in terms of matching the way I think about things and notate problems, and I can construct a reasonable semantic map from Haskell to Python and from Python to C++ in a lot of cases.

Obviously they have various deficiencies when compared to other languages, but all languages seem to have deficiencies. And this groups seems to work pretty well with the way that I think.

My primary annoyances regarding these languages at this time:

  • Deploying Python apps seems harder than it should be, and possibly still a pain for an end user.
  • None of these languages seem especially favorable to creativity to me, it’s easy for me to feel bored when I think about Python and to some extent Haskell.
  • C++ still scares me a bit – I don’t know that I trust myself to create a real application in it that wouldn’t have bugs that could potentially be exploited in dangerous ways.

On a positive side, at least with Python, and maybe Haskell at some point, I’m hopeful that they may get out of my way and me focus on problems better since there is less about the language itself to confuse or entice me.

Standard

2012-08-06

Choices

One of the hardest things for me to deal with when I’m thinking about trying to do something is having to choose which tool to use to do the job.

I am often the poster-child for the term "paralyzed by choice". I think in some ways it wold be easier if I just had one tool I relied on for everything, so that I would just have to figure out how to build what I want using that tool, rather than first having to figure out which tool is likely to be best, and whether I know enough about that tool to successfully use it, or whether I need to or should spend time to learn more about the tool so that I can use it effectively for the problem I have in mind.

Writing that makes it obvious that there is a huge amount of wasted effort in always going through that process for anything I want to achieve.

Standard

2012-07-30

Minimal Required Skills

I’ve been trying to identify a list of technologies and languages that would be sufficient for a person to be equipped to handle any normal area of programming without additional study.

So far my list looks like:

  • C
  • JavaScript
  • C# or Java
  • SQL
  • HTML and CSS

Note that there is no guarantee that these are the right languages for any particular programmer to feel fulfilled. All I claim is that this combination is sufficient to be employable and have enough background to handle any normal programming need.

Python Deployment

I’ve been playing with Python again as a sort of front-end pseudo-code before writing in C++. As a result, I find myself thinking again about Python as an application development language.

One thing that continues to frustrate me about Python, and which if it were solved would probably cause me to use it more significantly, is the desire to be able to provide a single file (or zipped directory) application that someone could simply execute without requiring a full install of Python to be present.

There have been various utilities to help with this over the past, but many of them seem to have succumbed to bit-rot and seem unmaintained for unreliable.

cx_freeze might be a solution to this. I’ll try it out and see if I can get it to work.

Standard

2012-07-26

C++ BigInteger library

I’ve been using the ttmath library for solving Project Euler problems in C++ fairly successfully.

This is not strictly speaking (I believe) an arbitrary precision arithmetic library, since you have to state the size of the data types at compile time, but it does allow you to specify and arbitrary size for the data type when you specify them, so as long as I choose a large enough basis for the "Int/UInt" type, it works fine.

So far it seems fast enough, and has been easier to work with than trying to use the GMP library


Today I Learned: Pasting in Vim

If you are in insert mode in Vim, you can paste from the system clipboard by typing Ctrl-R * .


Back To Perl (For Web Site)

So after coding site generators and minimal web servers in various languages, I’m back to using Perl for this website, at least for the moment.

I like Perl, and I think it’s a pretty good match for what I want to do here.

I would like to actually code my own minimal webserver in Perl at some point (right now I’m just plugging a PSGI app into Starman.

I have considered doing another recode in Go, and may still do that at some point.

Standard