The place that documents all of the crazy ideas I have and all of the wacky projects that come from them.
Saturday, May 17, 2008
Stupid Facebook
I had been wondering why there wasn't a "Facebook Reader" application that allowed me to browse through all of the actions of my friends on Facebook like I do with items in RSS feeds in Google Reader, so after waking up and feeding Charlie this morning, I decided that I would start playing around with making my own. I started reading the Facebook API and playing with PopFly (which is actually kind of cool), but I couldn't figure out how to get access to the mini-feed data. I did some more searching and I finally realized that Facebook doesn't make the mini-feed data available, and I know understand why so many people complain about Facebooks death grip on your data. I joined the group that's trying to petition for this to change, but there's just over 40 members, so I'm not keeping my fingers crossed.
Tuesday, April 22, 2008
My Old Code
So I'm out sick today and I decided to put all of my old code up on a Google Code Project. It's probably not that exciting, but if anyone is ever interested they can check it out here.
Wednesday, February 20, 2008
A question of ethics?
One thing that I have always struggled with regarding my current job is being part of the "war machine". Obviously, I know that war is a horrible and deeply saddening affair, but I also realize that it's a necessary evil and that if we don't maintain our military might that someone else will. So it's kind of a bittersweet type of thing, and I also take comfort in the fact that I work on a defense missile (so in a certain aspect you can say I'm stopping war, or at least part of it).
But on to the real purpose of this post. I just saw an article on Slashdot, and it really struck a cord with me. The article basically talks about the dangers of being careless and how all engineering/programming should be deliberate, but a lot of the comments just point the finger at management/capitalism/other "invisible hands". I agree with the principle and have even experienced it myself, but I believe that trying to point the finger at someone else without taking some personal responsibility is just plain dumb. There's always pressure to get things done in any job, but I believe that the biggest responsibility of any job (not just engineering/programming) is to make the judgment about how crucial any potential problem is and take the appropriate action.
But on to the real purpose of this post. I just saw an article on Slashdot, and it really struck a cord with me. The article basically talks about the dangers of being careless and how all engineering/programming should be deliberate, but a lot of the comments just point the finger at management/capitalism/other "invisible hands". I agree with the principle and have even experienced it myself, but I believe that trying to point the finger at someone else without taking some personal responsibility is just plain dumb. There's always pressure to get things done in any job, but I believe that the biggest responsibility of any job (not just engineering/programming) is to make the judgment about how crucial any potential problem is and take the appropriate action.
Friday, December 7, 2007
The Myth of Dynamic Typing?
My last post has also got me thinking about a different idea (dynamic programming paradigms), and I have begun to think about this topic as programming languages versus scripting languages. I personally prefer programming languages, but I can't deny the power of scripting languages. I've often heard that the power of scripting languages comes from dynamic typing and the ability to give any variable of any type to a function and let it do it's thing. But I think this is flawed logic, because at some point the type becomes fixed and the appropriate algorithm must be used to handle this data. So dynamic typing is just a convenience for the programmer that abstracts away a piece of the truth. And now you have to ask yourself, "Why couldn't this same mechanism be done with templates, functional programming, and other mechanisms in a programming language?" The correct answer is that there's no reason it couldn't be.
I think that the problem is not that the programming languages are compiled, statically typed, or any of the other non-sense that you always hear, but the problem is simply what we expect from them. We expect a language like C/C++ to be low-level, operating system agnostic, and portable without any of the "mess" of GUIs, rendering capabilities, etc. But we expect a language like MATLAB/Python to be high-level, operating system agnostic, and portable with all of the "power" of GUIs, rendering capabilities, etc. Each of these paradigms definitely has it's own pros/cons, but I just think that the divide that exists between the two doesn't necessarily have to be as big as it is right now.
This also brings up the real topic that I am actually interested in, "Why can't databases (and their results) be statically-typed?" Why can't I do something like this:
struct Transaction
{
unsigned int id; //Primary Key
Date date;
DecimalValue amount;
std::string description;
};
struct BudgetCategory
{
unsigned int id; //Primary Key
std::string name;
DecimalValue budgeted_spending;
PaymentType frequency;
};
struct Transaction_BudgetCategory
{
unsigned int transaction_id; //Foreign Key(Transaction.id)
unsigned int budgetcategory_id; //Foreign Key(BudgetCategory.id)
};
auto_type category_sums =
SELECT BudgetCategory.name, sum(Transaction.amount)
FROM Transaction_BudgetCategory, Transaction
WHERE Transaction_BudgetCategory.id == Transaction.id
GROUP BY Transaction.id;
Obviously I'm talking about a whole new language/paradigm, but why couldn't you do something like that? The compiler could figure out the appropriate types and create the appropriate structure for you. I know that this is kind of what LINQ is trying to do, but my understanding is that with LINQ you have to create your own structures to store the results in, and why can't the compiler just do it for you?
Maybe I'm just dreaming or not seeing the drawbacks to something like this, but I still think it'd be cool.
I think that the problem is not that the programming languages are compiled, statically typed, or any of the other non-sense that you always hear, but the problem is simply what we expect from them. We expect a language like C/C++ to be low-level, operating system agnostic, and portable without any of the "mess" of GUIs, rendering capabilities, etc. But we expect a language like MATLAB/Python to be high-level, operating system agnostic, and portable with all of the "power" of GUIs, rendering capabilities, etc. Each of these paradigms definitely has it's own pros/cons, but I just think that the divide that exists between the two doesn't necessarily have to be as big as it is right now.
This also brings up the real topic that I am actually interested in, "Why can't databases (and their results) be statically-typed?" Why can't I do something like this:
struct Transaction
{
unsigned int id; //Primary Key
Date date;
DecimalValue amount;
std::string description;
};
struct BudgetCategory
{
unsigned int id; //Primary Key
std::string name;
DecimalValue budgeted_spending;
PaymentType frequency;
};
struct Transaction_BudgetCategory
{
unsigned int transaction_id; //Foreign Key(Transaction.id)
unsigned int budgetcategory_id; //Foreign Key(BudgetCategory.id)
};
auto_type category_sums =
SELECT BudgetCategory.name, sum(Transaction.amount)
FROM Transaction_BudgetCategory, Transaction
WHERE Transaction_BudgetCategory.id == Transaction.id
GROUP BY Transaction.id;
Obviously I'm talking about a whole new language/paradigm, but why couldn't you do something like that? The compiler could figure out the appropriate types and create the appropriate structure for you. I know that this is kind of what LINQ is trying to do, but my understanding is that with LINQ you have to create your own structures to store the results in, and why can't the compiler just do it for you?
Maybe I'm just dreaming or not seeing the drawbacks to something like this, but I still think it'd be cool.
Subscribe to:
Posts (Atom)