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

2012-07-25

Today I Learned: SQL Union

Sql unions allow you to treat a common set of columns between two tables as a unified table, or rather it allows one to group the result sets from two sql queries into 1 result set as if it came from one table.

Vim Again

The pendulum seems to be swinging back toward me using Vi / Vim as my primary text editor. Or rather using Vi style keybindings, sine I was still often using Vim, just with Emacs style keybindings (via vimacs)

I may still use Emacs proper, but I think it will be mainly in the context of working with other programs, or substantial tasks, rather than using it for quick edits.

Standard

2012-07-24

C++ BigInteger class

I’ve been going through the first Project Euler problems again, this time in C++. I’m reaching the point where I need some kind of an arbitrary precision integer math library.

Today, I actually find myself thinking about trying to write my own string integer class. I’m sure this isn’t efficient, and while I’m fairly sure I could deal with large integer addition, I’m not at all sure about subtraction or multiplication or division.

Standard

2012-07-23

The sum of all knowledge

It seems to me that pretty much every paradigm in programming is probably present in some form in one of the following three languages:

  • C++
  • Perl
  • Common Lisp

That makes me wonder if it’s worth studying those three languages to try to have access to the interesting ideas that other smaller languages tend to specialize on.

Programming Language Bundles

These days I often find myself trying to come up with sets of languages that would cover all the application domains that I am interested it.

One bundle that I have often considered is C++, Python, and Haskell. I don’t know that it deals with every area as well as the above combo of C++, Perl, and Common Lisp, but there are some nice overlaps semantically between the languages. I find that I can use a sort of hybrid Haskell and Python notation as a pseudo-code that I can then translate into C++.

There’s enough overlap between Python’s default data structures and STL data structures in C++ that I can mostly mechanically translate a simple Python program into C++.

Standard

2012-07-17

Run with g++

I had a fun realization today.

The simple shell script below which I named "run"

#/bin/sh
g++ $* && ./a.out

would let me compile and run simple programs without it being obvious that there was a compile / link step.

Thus I can just do:

run hello.cpp

and get "hello world".

Standard

2012-07-13

JavaScript As Cross Platform GUI

I’ve been thinking about GUI toolkits the past couple of days. It’s been annoying to realize that the even with the 3 major cross-platform toolkits (Qt, Wx and Tk) you can really only target the major desktop OSes (Windows, OS X, Linux). There’s no way to apply that learning to any of the mobile space.

To my mind JavaScript/HTML/CSS is really the only technology where what you learn in one environment would really transfer to all of the other environments readily.

However, that leads to the question of how you actually do desktop apps in JavaScript/HTML/CSS. Currently I’m thinking that you start a lightweight web server and the use that as the application engine.

If you are interested in being able to deploy the app then it’s important that the webserver be self contained. It also needs to be written in a language that has the libraries / capabilities to interact with whatever host systems you need to connect to (filesystem, database, etc).

The architecture that makes the most sense to me currently is to write a webserver where urls are mapped to functions rather than files, so that each function you need the interface to support is simply a separate url for an http call.

Then the HTML page in the browser just makes an http call for each user action that requires activity from the engine.

Standard

2012-07-10

Current Languages

Here are the current languages that I’m thinking I want to be my staple languages:

  • C
  • Go
  • Perl
  • PHP
  • JavaScript
  • Erlang

Each of these gives something that the others don’t provide. It seems like SML might be trying to sneak in there also. I also can’t totally discount Tcl in the realm of providing things the others don’t. However, I currently find Tcl a little frustrating to program in. But that may be because I tend to push it too hard when I try things in it. I think it excels as a portable command line script engine, but it becomes kind of annoying to me when I try to do intensive processing with it.

Standard

2012-07-08

3-day Weekend

This Weekend I took Friday off so Jayne and I could go to El Campo to visit her extended family and see her aunt and uncle celebrate their 50th wedding anniversary. Aside from visiting, I did the following:

  • Went through "A Tour of Go" – wrote all example programs, but no exercises
  • Wrote a couple Project Euler problems in Go
  • Finished A Little Java, A Few Patterns
  • Finished chapter 1 of Mastering Algorithms with Perl
  • Finished chapter 2 of Minimal Perl

Not much sight seeing, but fairly productive in study and socializing.

Standard