> ChrisAcheson.net_

Posts Tagged ‘programming’

I Dislike DotNetNuke

Friday, April 20th, 2012

Lance McNearney nails it on Stack Overflow:

Welcome to developing for DotNetNuke, where the official website provides zero documentation and everything is learned from experimentation, blogs, forums and sites attempting to sell you something.

Promotion For New Freelance Clients

Friday, December 30th, 2011

I’m offering new freelance clients 50% off my regular rates on the first 10 hours of work that I do.  If you need software or web development work done, take a look at my resume, then contact me if you like what you see.  If you know someone who needs work done, feel free to send them my way!

Math for Programmers

Wednesday, April 1st, 2009

I bookmarked a blog post called “Math for Programmers” years ago on one of my random “scratch space” wiki pages, and just rediscovered it tonight.  I figured I’d share:

The right way to learn math is breadth-first, not depth-first. You need to survey the space, learn the names of things, figure out what’s what. [...]

I think the best way to start learning math is to spend 15 to 30 minutes a day surfing in Wikipedia. It’s filled with articles about thousands of little branches of mathematics. You start with pretty much any article that seems interesting (e.g. String theory, say, or the Fourier transform, or Tensors, anything that strikes your fancy.) Start reading. If there’s something you don’t understand, click the link and read about it. Do this recursively until you get bored or tired.

My timing on this is interesting.  Over the past few days I’ve started playing a bit of poker (Texas hold ‘em, against computer players in PokerTH), in lieu of my usual habit of compulsively playing quick games of FreeCell at random moments.  For the sheer nerdy fun of it, I want to write a program to calculate the exact odds that I have a better hand than all of my opponents, given the cards that are visible at any particular time (pre-flop, flop, turn, and river).

I’m sure it’s a solvable problem, but I’m having trouble simplifying the staggering number of permutations involved.  For example, assuming you’ve got your two-card hand, there are 1,225 possible hands that a single opponent could have from the remaining 50 cards.  If you have six opponents, there are approximately 9×1017 possible combinations of hands that they could have.  We only care about the best hand among our opponents, so I think we can simplify things by assuming that the math is the same for six opponents as it is for one, except that any given hand is six times more likely to occur.

Anyway, I’m thinking of reading up on combinatorics.  I got a bit from my discrete math and probability & statistics courses in college, but I feel like I’m missing something here.  I’ve always been interested in probability and permutations in games, so it seems like a good subject to pursue.

How to get ProFont working in Ubuntu

Saturday, March 21st, 2009

At the suggestion of a friend, I’ve recently started using a font called “ProFont” for my programming and other terminal-related activities.  It’s quite nice, and designed to be readable at small sizes.  I use it at 8 point:

8 point ProFont in an 80x24 terminal

8 point ProFont in an 80x24 terminal

I don’t actually use 80×24 anymore, but you get the idea.

It didn’t immediately work when I installed it on my main machine (which runs Kubuntu), and it took some digging to figure out why.  It turns out that fonts on modern Linux machines are handled by a horrible chimera.  There’s the new font system, “fontconfig”, as well as the old “core X font subsystem”.  The instructions that I had found online installed ProFont into the old font system, but not into the new one.  I also tried using the GUI font configuration tool provided by KDE, but it did nothing.

After much searching and frustration, I discovered that Ubuntu and its variants have fontconfig configured to not use bitmap fonts by default.  ProFont is a bitmap font, and such fonts are usually used by old X applications that use the old font system.  The reason for this configuration is that a lot of the bitmap fonts have the same name as other fonts on your system, and if they’re enabled they may in some instances end up being used instead of the typically better-looking vector fonts that you usually see.

In order to get ProFont working, you’ll need to add an exception to your fontconfig configuration.  I suggest editing the ~/.fonts.conf file, which contains user-specific options.  Here’s mine, with the part that I added in bold: (more…)