Why are programs written with plain text?

Currently, we write programs by typing text into files, and running a compiler over those files to interpret the text we typed. This seems like it should be a historical accident.

A programming language is structured. Writing invalid code is rejected by the compiler. However, text files are inherently unstructured. Structure has to be imposed on the text file by external tools – compilers, IDEs, etc.

Why not represent programs as databases of statements/functions/etc? This would lead to a ton of benefits. For one, invalid programs would be impossible. This saves a huge amount of time where programmers currently fix typos in code, saves resources where compilers/static analysis tools read those files to find errors, etc.

It seems like we’re approaching the problem from the wrong angle. Right now, we write down a program in an unstructured format, and build tools to see if the thing we wrote down is valid. Instead of all of that, we should just write the programs in a structured format (read: database/something else which isn’t a text file) in the first place. This is akin to writing a bunch of instructions in a Word document, then writing tools to parse that Word document and produce a program, rather than just designing a program which lets you directly generate programs.


People often mention that it’s good to be grateful for what you have in life, etc. This isn’t a topic I spend much time thinking about. What use is there in noting what you think is good about the world, when that time could be spent experiencing the world/making it better? However, today I had a thought: Instead of appealing to vague statements like, “Be happy you’re alive”, etc, I think the notion of gratitude is a lot more impactful when you consider the size of the universe.

The universe is ridiculously large. In the universe, there is a gigantic number of atoms. My body represents an extremely small fraction of all atoms in the universe. Based on my (layman’s) understanding of current science, it should be assumed that intelligent life (read: life which can perceive the universe, reflect on it, etc) also represents a tiny fraction of all atoms in the universe.

My atoms could just as easily be a blade of grass, a spec of dirt, or a chip of porcelain on a toilet. The odds that any given atom is going to be part of a being which can perceive the universe are (I’d assume – I haven’t done an actual calculation) very, very low.

The odds of being a perceiving entity are overwhelmingly low. Any day in which a person is alive, sensing, and perceiving the universe, is a day that their atoms are not hanging around as a motionless clump of stone. And that’s something to be very grateful for.

Visual Studio Object reference error when viewing DataSet properties in an RDLC

System/software used:

  • Visual Studio 2015 Enterprise Update 2 (14.0.25123.00)
  • Windows 7 Enterprise

In Visual Studio, if there is an “Object reference not set to an instance of an object” messagebox displayed when opening an RDLC file -> Dataset properties, open the
Package Manager Console, and fix any errors.

To reproduce:

  • Open an RDLC file in Visual Studio.
  • Open the “Report Data” panel.
  • Right-click a Dataset in the “Report Data” panel -> “Dataset Properties”.
  • Object reference error pops up.

To fix it:

  • I had to uninstall the Powershell Tools for Visual Studio 2015 add-on. That’s probably not the best option, but it solved this problem at least.

This is a weird error. Why would the Powershell Tools extension have anything to do with an RDLC dataset’s properties? *shrugs shoulders* This should probably be moved/reported to the Powershell Tools extension team.

Querying 2D and 3D space

In programming, we have the ability to query databases. We can say, “Show me all customers born after 1980”, and get back a set of customers matching those conditions.

A thought occurred to me that: we don’t seem to have a simple, default ability to query 2D or 3D space. For example: assume we have a virtual world, such as a 2D map in a videogame. As a user, I should be able to say, “Highlight/retrieve all regions in this 2D map that have R >= 200, G >= 250, B >= 250”, or “Highlight/retrieve all polygons in this 3D environment with a certain color, and a certain shape”.

What prompted this? A recent article discussing 3D maps used for self-driving cars. It would be useful to query all 3D maps across the world for cases of specifically-shaped stop signs or stop lights, and annotate them on a map, for example.

Maybe it’s time to write a new SQL? Space Query Language?

Maybe the way to solve this is to build game engines on top of relational databases, and use the underlying database for querying? It kind of sounds like a montrosity, but it’s kind of intriguing also…

Using an X220i keyboard in a T410


With that disclaimer: recently I had a problem where part of my Lenovo T410’s keyboard stopped working. I have a spare Lenovo X220i available, which is built almost identically to the T410. So I decided to swap out the keyboards. So far, this has worked – no problems. Posting this in case someone else has this situation in the future.

Rant: Why money isn’t neutral

People often make the argument that money is “neutral” – it has no morality. Money doesn’t have political power; money only lets you buy goods/services. It’s true that money mainly lets you buy goods/services. However, importantly, one of those things that money lets you buy is other peoples’ time. In the U.S., we have a democracy for electing leaders – people vote on who they want to put in office and, more or less, those people get into office. A problem is that money allows a person to have others enact their desires. If someone has $1,000,000,000, then they can afford to tell ~33,000 people making $30,000 a year what to do for 8 hours a day, over a year. That’s 660 people in every state taking actions, every day, to serve a single person’s interests. The person with money is “buying the good/service of another person’s labor”. In exchange, the person with money gets to have their wishes carried out, with little/no questioning from the people carrying out the work. If the workers disagree significantly with the work, they’re fired or work elsewhere.

How can a society consider money to be orthogonal to politics when large sums of money allow the wealthy to control how classes of people spend large portions of their lives? A better way to say it might be: If I gave one person in the world the ability to order around 100,000 people [for example] for a year and enact their will, including using those people to change laws for the person with money’s benefit, how is such a system not directly contradicting democracy? People have democracy at polls, but not at work, and thus you see journalists/workers enacting the will of the wealthy at work, which directly influences decision-making at the polls.

Money equals (at least in some cases) time spent by workers. Money equals the power to tell people what to do for a period of time, and have your will enacted in the world. Ergo, money is power, and it is not neutral.