Archive for the 'Computer Science' Category

I had to teach a co-worker how to insert data from a comma separated value file to a PostgreSQL database table today, using Python as the scripting language. This utilizes the pyscopg2 database adapter for Python 2.4.

import psycopg2, sys

try:
	conn = psycopg2.connect("""dbname='mydatabase'
		user='mikeatlas'
		host='localhost'
		port='5432'
		password='apassword'""")
except:
	print "Unable to connect to the database"
try:
	myfile = open('mydata.csv', 'r')
	for line in myfile:
		splitlineArray = line.split(',')
	cur = conn.cursor()
	sqlStatement = """INSERT INTO myTable
			(col0,  col1,  col2,  col3,  col4)
			VALUES ('"""+splitlineArray[0]+""",
				'"""+splitlineArray[1]+"""',
				'"""+splitlineArray[2]+"""',
				'"""+splitlineArray[3]+"""',
				'"""+splitlineArray[4]+"""')"""
	cur.execute(sqlStatement)
except:
	print "Error looping file into database"
try:
	conn.commit()
except:
	conn.rollback()
	conn.close()
	print "Error with transaction"

Dilbert fodder

Friday, April 14th, 2006

Boss: Add spaces here, here and here.
Dilbert: Ok, done.
[a few days pass]
Boss: Change the color here and add color to that thing over there
Dilbert: Ok, done.
[a few days pass]
Boss: Add lines so I’m less confused about where each thing ends.
Dilbert: Ok, done.
[a few days pass]
Boss: This looks very messy and unprofessional. Can you do something to it to make it simpler and use only two colors?
Dilbert: !!!

True story :(

Work Enviornments

Friday, February 10th, 2006

So I’ve been working my new coop job at Basis Technology for the last month or so.

Just a minute ago I was sitting in the office kitchen talking with the head of IT about how .NET developer salaries are currently skyrocketing. According to him, VB.NET yearlies are going for $60k. VB.NET? Gross. I would consider myself a mid-level C#.NET developer, which he quoted at $80k. How soon till I graduate? Jeez. Who knows, though, you have to wonder if those are inflated salaries or what. CNN even confirms it. It’s no wonder the international grad students at Northeastern don’t speak a sentence that doesn’t contain some sort of phrase containing “.NET” in it when talking about jobs. They know where the money is going!

And while I was having this conversation, someone else walked into the room and commented on the fact that I was chatting it up, “You are the most outgoing intern!”. The head of the IT replied “Well, that’s why he actually has a girlfriend!” Pretty funny. But this leads me to a bigger issue that I’ve been mulling over for a little while now.

I am extroverted. Maybe I wasn’t when I was younger and wasn’t the most popular kid in school, but these days I most definitely am. My personal friends have attested to this without a doubt. And I’m a minority at my current coop. Basis’ software does some pretty technical things in regards to linguistic and computational analysis. My supervisor correlated this with the high number of introverted-types of people working here - the more technical the software company, the more introverted the [developers] company is. I mean, I could go the whole day without speaking to anybody if I wanted to. I find myself initiating most “hellos” in passing, for example. People tend to look at the ground when walking around the office, and I know it’s not because they’re sad. Perhaps this can be attributed to the fact that many here are of non-western nationalities, where eye contact is socially disrespectful.

It’s not that bad, though, but I wish my work area actually had the lights on. The nearby developers seem to enjoy 24/7 darkness. Not me. I might even be feeling the hints of seasonal depression from it? Okay, maybe not, but when it’s cloudy outside I might as well be in a room with no windows.

Everyone here is friendly, though, and I’ve been kept busy doing some engaging JSP database driven linguistic as well as business oriented web application projects. But I’ve already started to pick up on the fact that this may not be the kind of company I’d want to work in for the long run - I need to be working with more extroverted types. I don’t have a specialty niche (financial, linguistics, graphics, robotics, etc.) type of software I am focused in on (yet).

I think, after graduation, the first job I should seek should be with a software consulting company. I have a broad range of talents that can be applied for diverse projects and I’m extroverted and work well with people. I think I’d get the most out of my talents in that kind of environment.

But this is exactly what coop is all about - find out about yourself and about what kind of place you’d like to work at after college or grad school. I’m glad I’m able to figure it out now instead of going to a 4-year school and then be stuck in an entry level position for years at some company that turned out to not fit my personality and skills properly.

On Sergey and his cowsuit

Sunday, December 11th, 2005

On the X-Googler blog, Doug shares a hilarious story about interviews on Halloween day:

Another Googler did, in fact, tell me once about answering interview questions as Sergey, attired in a full-size cow suit, absentmindedly stroked his rubber udder. In retrospect, a roller hockey getup seems fairly formal by Google standards.

Boxscores for PHP Fusion released

Saturday, November 26th, 2005

I have released a college-weight wrestling boxscore infusion for the PHP-Fusion content management system. You can see it in action at the NECCWA website, as well as a version for high school weights on the e107 content management system at MassWrestling.

The source is released under the GPL and you can find more informaton on it at my CV.

My best work at Pyxis is released

Sunday, November 6th, 2005

Here’s a press release from Pyxis Mobile (my last coop) that talks about their newest product version, mPlatform 5.0.

All the talk of connecting to “disparate data sources” in the MDM relies heavily on the work I designed and developed, which was named the PAF: the plugin application framework. It’s so rewarding to read about something that I contributed so much to - be so talked up so strongly in a press release!

I was doing some homework today for CSU480 - Systems and Networks. It involved me writing a C program that spawned a new process. I also had some questions to answer about threading and synchronization. It led me to poke around Wikipedia, which can be just as distracting as playing a video game - as many others know, you find yourself opening link after link to related articles; such that when you decide to stop, you are no longer reading something in wikipedia that has much of anything to do with what you came looking for initially.

Anyway, I happened to “stumble upon” this particular article, titled The Free Lunch is Over: A Fundamental Turn Towards Concurrency in Programming, by distinguished programmer, Herb Sutter.

I read it from start to finish. You know, my professors keep dropping the question, “Can Moore’s Law really continue to hold up?” And the answer seems to be: Definitely not, and it won’t hold up much longer in the near future and I speculate by the end of my undergrad studies this will be even more evident. Sutter points out that chip designers are going crazy coming up with optimizations to improve performace that go beyond the simple physical downsizing of transistors and the increase of cache size on CPUs. Things like hyperthreading and branch prediction, or multi-core chips are what are being used to get small (in comparison) increases in performance.

Recently (9/27/05), I went to a speech hosted by NEU:CSS:ACM and ECE:IEEE given by Shweta Kabadi, an architect for Intel Corporation. In her introduction and at various times of her monologue, she dropped hints about how “Intel is moving towards ‘platform solutions’”, or, as I’d like to interpret it, “away from CPU architecture”. It seems like Intel knows what’s up. They’re aware of how increasingly difficult it has become to speed up the raw Mhz of CPUs! If Intel is “moving more towards x and y”, then it is an indirect admittence that Moore’s law is soon going to stop holding up for them. If that be the case, then profits are at risk, so obviously they have to start looking in other directions to increase profitablity.

Another thing that I found particular exciting about Sutter’s article is the impetus that the focus on future performance of applications really will depend on better programmers and not better hardware. I know that threading is relatively a new concept for me and I’ve only recently coded a few multi-threaded applications, but it is somewhat reassuring when he compares the learning curve undergone to understand object oriented programming to be about as steep as concurrent programming is. It gives me confidence that I will have to have a good understanding of threading, because future application performance leaps won’t be made with hardware; they’ll be made in software.

So I’m ready to learn. I’m confident that if concurrency in applications is the next fundamental important paradigm that we need to embrace, which, now I strongly believe to be true after reading this article, I’m excited to learn it better and perhaps set myself ahead of my peers by excelling in it sooner than later. If processor performance is going to plateau, then my role as a software developer plays much more importance in the future demand for higher performce applications.

Email

Thursday, August 25th, 2005

Spotted this in the parking lot at work yesterday.
A co-worker guessed that they must work for Constant Contact, an email marketing company down the hall from us.

Merging .NET assemblies with ILMerge

Saturday, August 20th, 2005

I was speaking with one of the senior developers here about moving some of the various projects that exist in the server solution into one project, such that there would only be one assembly .DLL file that needed to be distributed with each component, ie “Library.dll”, or even just a packed single executable file that included the libraries.

Apparently you can do this and still keep your projects separate in your solution.

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly. Also, if the primary assembly has a strong name, and a .snk file is provided, then the target assembly is re-signed with the specified key so that it also has a strong name.

Looks neat.

Funny old computers

Monday, July 11th, 2005

Here’s a German site full of (laughable) PCs that were once on the market back in the 80’s and perhaps earlier. C64s and AppleIIe, eat your heart out.

I can imagine they must have cost a few thousand each….at the time!

The best part is that I submitted it to Boing Boing, and it got accepted! Which also made it hit the del.icio.us popular page (notice I was the firstto post it at the bottom of the post list.