luminosity comments on Open Thread, July 1-15, 2013 - Less Wrong

4 Post author: Vaniver 01 July 2013 05:10PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (342)

You are viewing a single comment's thread. Show more comments above.

Comment author: luminosity 04 July 2013 07:19:13AM *  0 points [-]

Partly personal preference, partly an inability to answer your question in a Windows programming environment, not being particularly familiar with SQL Server. While you can install things such as postgres, python, etc on Windows, getting a working setup on an ubuntu system to play with for free, is trivial:

e.g.

  • Install OS
  • Open command prompt
  • sudo apt-get install python
  • sudo apt-get install python-pip
  • sudo apt-get install postgres
  • sudo apt-get install python2.7-dev
  • sudo pip install psycopg2
  • sudo -u postgres psql "--command=CREATE USER test PASSWORD testing;"
  • sudo -u postgres psql "--command=CREATE DATABASE testdb OWNER test;"
  • python

  • import psycopg2

  • connection = psycopg2.connect(username='test', password='testing', dbname='testdb')
  • cursor = connection.cursor()
  • cursor.execute('SELECT 1;')
  • print cursor.fetchone()

(Code not tested, don't currenty have an environment to test it on... you get the idea though.)

Again though, this is the environment I do nearly all my coding work in. I'd not be surprised if a Windows developer found getting an SQL Server Express install up and running on their system to be far easier for them. I'm just not able to walk you through that.

Comment author: Alsadius 04 July 2013 07:42:22AM 0 points [-]

Understood. I do not expect that learning Linux is a useful way to spend my time, however, so I'll pass. But Postgres does seem to have a Windows version, so I'll give that a shot. It seems to be what I'm looking for.