I'm So Bad At This
posted by pope on April 6, 2010 at 2:45 pm
Seriously, how hard is it for someone who has such violent opinions about everything to post anything once in a while? Apparently the answer is: very. Some brief news from my life:
- I'm working for the City of Boston, at City Hall for my next co-op, doing mostly internal web stuff
- I've had a huge change of hear on Python and I regret saying that it blows; we have made up in private and Python will be making a statement on its twitter later today
- Programming Languages is a class that can only be described as "hard as balls"
- I have done exactly 0 of the things that I want(ed) to on this site
- I'm part of a sweet design/development company called Backslash Designs
- The comic has become actually profitable, and new stuff is coming soon
- I'm sort of hungry right now even though I just ate
Well, there it is. And hopefully I'll find a way to post some more later. Or not. Based on previous experience, I'd have to go with not.
Just A Reminder
posted by pope on January 6, 2010 at 5:31 pm
I totally exist. I mean, in real life anyway. Work became somewhat all-consuming, so I sort of disappeared from most of my internet homes. However, I am still around, and now that I've had a bit of relaxation on my winter break, I'm ready to be back and ready to start posting random nonsense that no one listens to.
Quickly: Python Blows
posted by pope on September 25, 2009 at 12:31 pm
Here's a brief example of why I hate Python, and also why I love php. Check out the same code written in each language:
Python:
import MySQLdb
class Eb_db:
def __init__(self):
try:
connection = MySQLdb.connect(host="localhost",
user="hammock", passwd="secret", db="waffles" )
cursor = connection.cursor()
cursor.execute( "SELECT * FROM Syrup WHERE taste = 'delicious'" )
except MySQLdb.OperationalError, message:
errorMessage = "Error %d:\n%s" % (message[ 0 ], message[ 1 ] )
return
else:
self.data = cursor.fetchall()
self.fields = cursor.description
cursor.close()
connection.close()
PHP:
if(mysql_connect ('localhost', 'hammock', 'secret'))){
if(!mysql_select_db('waffles')){
echo 'Could not select the database: ' . mysql_error();
exit();
}
}else{
echo 'Could not connect to the database: ' . mysql_error();
exit();
}
$result = mysql_query("SELECT * FROM Syrup WHERE taste = 'delicious'");
if(!$result){
echo 'No results were found: ' . mysql_error();
}else{
while($row = mysql_fetch_array($result)){
//do as you please, you're iterating over each row now:
//$row['fieldName'] == 'data'
}
}
Two lines of code less for Python, but assuming you didn't know either language, which of those is easier to read through and understand? This is of course also excluding the terrifying and often life ruining indentation-instead-of-braces deal that Python uses to define code blocks.
Someone who actually likes Python, please explain to me how this doesn't suck, because I just don't see it at all.
For starters, the class and def aren't doing anything for you in your Python snippet and have no parallel in your PHP; remove them and you lose two of those scary scary indent levels.
Second, yeah, python's mySQL API isn't particularly slick; for serious use of it you'll want to write a wrapper. I'm not that familiar with PHP but it appears that the APIs are just at a slightly different level of abstraction. But that's a library issue, not a Python issue.
I don't know much about PHP. What happens if you need to connect to two different databases concurrently in one program? I don't see what connects the mysql_connect() call to the mysql_select_db() and mysql_query() calls. Can you seriously only connect to one db at a time? That's a pretty bad failure of library design if so.
posted by Hamilton-Lovecraft on January 26, 2010 at 10:24 pm
A Conversation About Conversation
posted by pope on August 18, 2009 at 12:09 pm
The comment system on this site (and by virtue of it being basically just copypasta, WNV too) really sucks. Anyone who's ever used it (all four of you out there) knows that. It doesn't support replies, doesn't have any way of notifying anyone, including me, who wrote the post in the first place, about new comments, and just plain looks like shit. As a result, I've been looking around for ways to improve it. My extensive searching has brought me to something called Chirrup, a commenting system that uses Twitter as a datastore.
The basic idea is pretty simple. Instead of writing php code that stores your comments in my own database, and then later reads that database to show them, why not put them in a system that I don't have to maintain and has more reliable uptime than my own site does anyway? There are also some further benefits to using Twitter rather than my own database. Right now, I just ask you to type a nickname for yourself on every comment post. The site doesn't care what you type there; you could easily pretend to be me (don't). It also doesn't remember what nickname you typed last time, so you're a stranger to it every time. This doesn't make for a particularly awesome environment for useful discussion. And it's kind of annoying for me because of all the spam. Or, now, annoying for you since I offloaded the annoyance into a captcha in every comment form, which, incidentally, even I still have to fill out if I want to comment anyway. Using your already established Twitter identity will make it both easier for you to comment and at the same time make sure people aren't pretending to be someone they aren't.
The fact that every comment will be posted via Tweet comes with even further added benefits to the site. Rather than being posted in some unknown region of the internet where the guy who wrote the article it refers to probably won't even see it, these comments will be posted to the wildly popular and closely followed world of Twitter, along with my name and a link back to the post. Every time you post something to me, you're also advertising for me! Genius.
There are a few small problems with adopting Chirrup as the sole method of commenting, however. There are two harsh realities that need to be faced. Some people just don't have a Twitter, and some people just don't want their name pasted on what they write. Whether they're calling me names and laughing at my foolish site code, or they really just are thoroughly concerned about privacy, there needs to be some way to support these people. Fortunately there is a simple solution. One option for commenting with Twitter, one option for guest commenting. The guest commenting system will of course have to be written by me, but will still nonetheless use Twitter, because we all know how it turns out when I write my own comment systems. Plus, using Twitter, these guest comments will still be able to join in the discussion of the regular users, just without the convenience of having a unique identity.
So yes, I am going to make Twitter the commenting system on this site very soon. But have no fear, things aren't changing that much; it will still be available to everyone on the internet, and only about six people will ever use it.
posted by Pope on August 18, 2009 at 12:10 pm
Cider Is Delicious
posted by pope on August 13, 2009 at 11:50 am
Cider is a product of TransGaming, and it seriously blows my mind in the best way possible. The process goes a little something like this:
- Me: Hey, Cider, what's u-
- Cider: HEY GIMME A WINDOWS GAME
- Me: Um, what? Why?
- Cider: I HUNGER FOR WINDOWS GAME
- Me: ...okay I guess. Here's Portal.
- Cider: PORTAL? I LOVE PORTAL!
- Me: Yeah me too, it's one of my favorites. So what exactly are you do wit-
- Cider: HERE, HOLD THIS
- Me: What the- You'd better not be using me to hide from the cops again. Wait...is this Portal.app?
- Cider: YEAH
- Me: ...is this Portal...but for OS X?
- Cider: YEAH WHY
- Me: ...i don't
- Cider: PLAY WITH IT
- Me: ...i don't even
- Cider: ON YOUR MAC
- Me: ...I'm so happy right now I can't ev-
- Cider: FEED ME MORE I HAVE HUNGER
And that's the story of how I came to have native OS X apps of my favorite games. Whether or not my puny X3100 can handle such things is beside the point. Things like Half-Life 2 are beautiful; things like Portal would be beautiful if you blink every half second. How TransGaming pulled this off, I can't even begin to imagine. There are limitations to their dark magic though, such as the fact that games with popup menus before the actual game part starts tend to not work out, and some registry nonsense is just too impossible for this to handle. But, other than that, they seem to have figured out a way that just slapping .app on the folder from Program Files means it's Mac compatible now. And my god am I happy with that definition of it. You can never un-see something, and the inner workings of the Windows Registry seems like one of those things I would need some serious eye-bleach for.
Anyway, go get Cider, it's a winner. Or look for some cider-ized games somewhere. I'm sure they exist. You know, somewhere on the internet, perhaps.
show all posts
Top Tags
site news (29)personal (14)
projects (12)
CSS Naked Day (11)
politics (6)
JACKED (6)
(5)
co-op (5)
filesharing (4)
2008 presidential election (4)
all tags
Recent Posts
I\'m So Bad At ThisJust A Reminder
Quickly: Python Blows
A Conversation About Conversation
Cider Is Delicious
Archive
Friends
WarrantyNowVoidThree Pound Universe
All the Questions
Ken McGrady
Cazzu Media
Nick Collins
Jake Rozin
Bryson Steadman
Syndication
blog updates:other site updates:
none yet...




Occasionally when cut-and-pasting code from a tab-formatted source to a space-formatted source, or v/v, I've gotten obvious errors, which were easy to sort out.
posted by Hamilton-Lovecraft on January 26, 2010 at 10:29 pm